https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59371
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hubicka at gcc dot gnu.org --- Comment #19 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Steve Ellcey from comment #15) > I am not sure yet where and how to improve this automatically but I have > found an interesting hand optimization that could point to a way to fix > this. If I change the original function: Perhaps tree-ssa-loop-niter.c could figure out that the IV has this kind of behavior and some loop optimization could then version the loop - one predicted likely with finite number of iterations and another one infinite. Honza?