[Bug rtl-optimization/44838] [4.6 regression] RTL loop unrolling causes FAIL: gcc.dg/pr39794.c

rguenth at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Jul 7 11:06:00 GMT 2010



------- Comment #24 from rguenth at gcc dot gnu dot org  2010-07-07 11:06 -------
In

   ...
   *p_1 = x;
   y = *(p_1 + 1);
   ...

I can say that *p_1 does not alias *(p_1 + 1) independent on what code
is around.  If it would be

BB3:
  # p_1 = PHI <p_0, p_2(3)>
  *p_1 = x;
   y = *(p_1 + 1);
  p_2 = p_1 + 1;
  goto BB3;

that would be still correct (I can exchange those two statements).

For cross loop-iteration dependence after unrolling you would see
accesses based on different pointer SSA name bases.

Now on RTL we are not in SSA form and so yes, this change might be
a bit fishy (I, too, just discovered this side-effect and I assumed
passes would already to something here).

A way around this is to either adjust or clear MEM_OFFSET.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44838



More information about the Gcc-bugs mailing list