https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127570
--- Comment #1 from Hongtao Liu <liuhongt at gcc dot gnu.org> --- ivopt itself produces better result for the loop body, now it have 2 ivs ivtmp.6_40 = ivtmp.6_41 + 1; ivtmp.7_37 = ivtmp.7_38 + 1; before my change, it's just 1 iv, and an extra add is need for address calculation: _40 = i_27 + _41; _38 = i_27 + _39; i_24 = i_27 + 1; But the loop exit condition is rewritten with new iv and causes miss-optimzation for jump threading. Apparently ivopts is not aware that jump threading relies on the original exit condition with m available. Maybe jump threading can be enhanced to handle that?
