[Bug tree-optimization/48702] [4.6/4.7 Regression] optimization regression with gcc-4.6 on x86_64-unknown-linux-gnu
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Apr 21 12:39:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48702
--- Comment #8 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-04-21 12:39:10 UTC ---
(In reply to comment #7)
> IVOPTs generates
>
> ivtmp.25_24 = (long unsigned int) &array;
> array.26_26 = (long unsigned int) &array;
> D.2769_27 = array.26_26 + 0x0fffffffffffffff0;
>
> <bb 3>:
> # ans_21 = PHI <ans_16(4), 0(2)>
> # ivtmp.25_20 = PHI <ivtmp.25_19(4), ivtmp.25_24(2)>
> D.2741_10 = ans_21 * 2;
> D.2767_25 = (void *) ivtmp.25_20;
Actually D.2767_25 is already the problem as it can point before &array.
> D.2737_15 = MEM[(int *)D.2767_25 + 12B];
Here we assume that the memory reference happens only to array[3] or beyond,
as D.2767_25 is assumed to at least point to &array[0] but never to &array[-1].
Other passes could derive similar info for D.2767_25 given that points-to
analysis computes it points somewhere into array.
More information about the Gcc-bugs
mailing list