https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71016
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2016-05-09 Target Milestone|--- |6.2 Ever confirmed|0 |1 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- So PRE still does the desired tranform: <bb 2>: if (i_4(D) != 0) goto <bb 3>; else goto <bb 4>; <bb 3>: i.1_1 = (long unsigned int) i_4(D); _2 = __builtin_clzl (i.1_1); _5 = (long int) _2; <bb 4>: # _7 = PHI <_2(3), 17(2)> # prephitmp_8 = PHI <_5(3), 17(2)> return prephitmp_8; but then later phiopt comes along and un-does it: --- t.c.172t.forwprop4 2016-05-09 13:15:20.830707963 +0200 +++ t.c.173t.phiopt3 2016-05-09 13:15:20.830707963 +0200 @@ -6,7 +6,7 @@ { long unsigned int i.1_1; int _2; - long int _5; + int _7; long int prephitmp_8; <bb 2>: @@ -18,10 +18,10 @@ <bb 3>: i.1_1 = (long unsigned int) i_4(D); _2 = __builtin_clzl (i.1_1); - _5 = (long int) _2; <bb 4>: - # prephitmp_8 = PHI <_5(3), 17(2)> + # _7 = PHI <_2(3), 17(2)> + prephitmp_8 = (long int) _7; return prephitmp_8; } I think this was intended to be an enablement transform of some sort - obviously here it mis-fires.