[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 May 12 12:10:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48702
--- Comment #13 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-05-12 10:52:54 UTC ---
(In reply to comment #12)
> (In reply to comment #3)
> > I have a patch that makes it fail on trunk as well. IVOPTs generates
> >
> > for (p = &a; p != &a - 3; --p)
> > *(p + 3) = ...
> >
> > and alias analysis doesn't like this invalid pointer.
>
>
> I wonder why ivopt does not select the iv candidate whose base is &a+3.
I think that one is not in the list of initial candidates.
I think for that sake we would want to add stripped &base + object size (+ 1?)
(if we know it) as IV candidate iff iv->step is negative, iff iv->step is
positive continue to add &base.
I don't like the alias oracle fixups too much, but I guess we have to
benchmark both alternatives.
More information about the Gcc-bugs
mailing list