https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89134
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
The issue is that GCC cannot prove finiteness of the loop since inc(i) could
just return i itself. So I can't see how this optimization would be correct.
Note the loop isn't unswitched but only path-splitting exposes it.
And cddce then rightfully complains:
cannot prove finiteness of loop 2
Marking useful stmt: if (n_7(D) > i_10)
cannot prove finiteness of loop 1
Marking useful stmt: if (n_7(D) > i_16)