[Bug tree-optimization/82776] Unable to optimize the loop when iteration count is unavailable.
amker at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Oct 31 10:08:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82776
amker at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |amker at gcc dot gnu.org
--- Comment #3 from amker at gcc dot gnu.org ---
(In reply to Jakub Jelinek from comment #2)
> Perhaps at least when seeing an unconditional POINTER_PLUS_EXPR with
> constant increment and no other bumps for the same pointer in the loop, we
> could derive upper niter bound from that, even when the loop has multiple
> exits etc.
Yes. GCC's niter analyzer only analyzes exit condition with induction variable
involved while it's not the case here. As a result, niter analysis is skipped
for the loop. In this code, the no-wrapping information is actually with the
IV, as you suggested, we should be able to refine bound information when niter
analysis of exit condition is skipped. I will have a look. Thanks.
More information about the Gcc-bugs
mailing list