------- Comment #2 from rguenth at gcc dot gnu dot org 2010-06-29 12:07 ------- Note that the issue is that PRE pessimizes code by transforming
if (D.3841_10 != 0) goto <bb 4>; else goto <bb 7>; <bb 7>: goto <bb 5>; <bb 4>: pos_11 = i_24 + 1; <bb 5>: # pos_1 = PHI <pos_23(7), pos_11(4)> # limit_4 = PHI <limit_25(7), limit_9(4)> i_13 = i_24 + 1; to if (D.3841_10 != 0) goto <bb 4>; else goto <bb 7>; <bb 7>: pretmp.4_22 = i_24 + 1; goto <bb 5>; <bb 4>: pos_11 = i_24 + 1; <bb 5>: # pos_1 = PHI <pos_23(7), pos_11(4)> # limit_4 = PHI <limit_25(7), limit_9(4)> # prephitmp.5_21 = PHI <pretmp.4_22(7), pos_11(4)> i_13 = prephitmp.5_21; which exposes the fact that we do not do code-hoisting presently. Removing the IV restriction from PRE would create i_24 + 1 as new IV with an increment in the latch block. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2010-06-29 12:07:13 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44711