Commit a9bf4fe2 by Alexandre Oliva Committed by Alexandre Oliva

re PR debug/53671 (Many guality test failures)

PR debug/53671
PR debug/49888
* alias.c (memrefs_conflict_p): Improve handling of AND for
alignment.

From-SVN: r188868
parent 1ca63357
2012-06-21 Alexandre Oliva <aoliva@redhat.com> 2012-06-21 Alexandre Oliva <aoliva@redhat.com>
PR debug/53671
PR debug/49888
* alias.c (memrefs_conflict_p): Improve handling of AND for
alignment.
2012-06-21 Alexandre Oliva <aoliva@redhat.com>
* ddg.c (build_intra_loop_deps): Discard deps of nondebug on debug. * ddg.c (build_intra_loop_deps): Discard deps of nondebug on debug.
2012-06-21 Alexandre Oliva <aoliva@redhat.com> 2012-06-21 Alexandre Oliva <aoliva@redhat.com>
......
...@@ -2097,25 +2097,32 @@ memrefs_conflict_p (int xsize, rtx x, int ysize, rtx y, HOST_WIDE_INT c) ...@@ -2097,25 +2097,32 @@ memrefs_conflict_p (int xsize, rtx x, int ysize, rtx y, HOST_WIDE_INT c)
break; break;
} }
/* Treat an access through an AND (e.g. a subword access on an Alpha) /* Deal with alignment ANDs by adjusting offset and size so as to
as an access with indeterminate size. Assume that references cover the maximum range, without taking any previously known
besides AND are aligned, so if the size of the other reference is alignment into account. */
at least as large as the alignment, assume no other overlap. */
if (GET_CODE (x) == AND && CONST_INT_P (XEXP (x, 1))) if (GET_CODE (x) == AND && CONST_INT_P (XEXP (x, 1)))
{ {
if (GET_CODE (y) == AND || ysize < -INTVAL (XEXP (x, 1))) HOST_WIDE_INT sc = INTVAL (XEXP (x, 1));
xsize = -1; unsigned HOST_WIDE_INT uc = sc;
return memrefs_conflict_p (xsize, canon_rtx (XEXP (x, 0)), ysize, y, c); if (xsize > 0 && sc < 0 && -uc == (uc & -uc))
{
xsize -= sc + 1;
c -= sc;
return memrefs_conflict_p (xsize, canon_rtx (XEXP (x, 0)),
ysize, y, c);
}
} }
if (GET_CODE (y) == AND && CONST_INT_P (XEXP (y, 1))) if (GET_CODE (y) == AND && CONST_INT_P (XEXP (y, 1)))
{ {
/* ??? If we are indexing far enough into the array/structure, we HOST_WIDE_INT sc = INTVAL (XEXP (y, 1));
may yet be able to determine that we can not overlap. But we unsigned HOST_WIDE_INT uc = sc;
also need to that we are far enough from the end not to overlap if (ysize > 0 && sc < 0 && -uc == (uc & -uc))
a following reference, so we do nothing with that for now. */ {
if (GET_CODE (x) == AND || xsize < -INTVAL (XEXP (y, 1))) ysize -= sc + 1;
ysize = -1; c += sc;
return memrefs_conflict_p (xsize, x, ysize, canon_rtx (XEXP (y, 0)), c); return memrefs_conflict_p (xsize, x,
ysize, canon_rtx (XEXP (y, 0)), c);
}
} }
if (CONSTANT_P (x)) if (CONSTANT_P (x))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment