https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79830
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
Status|UNCONFIRMED |NEW
Last reconfirmed| |2017-03-03
CC| |amker at gcc dot gnu.org
Component|c++ |tree-optimization
Version|unknown |7.0.1
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
It is induction variable optimization (-fivopts) that re-writes the main
induction variable. We have
Original cost 17 (complexity 2)
Final cost 17 (complexity 2)
Selected IV set for loop 2 at t.C:44, 4 avg niters, 0 expressions, 1 IVs:
Candidate 5:
Var befor: ivtmp.25_108
Var after: ivtmp.25_107
Incr POS: before exit test
IV struct:
Type: sizetype
Base: 0
Step: 32
Biv: N
Overflowness wrto loop niter: No-overflow
Replacing exit test: if (i_32 >= 0)
but it doesn't seem to account the extra cost for the exit test replacement
when facing equal original/final cost.