https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118267
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 CC| |aoliva at gcc dot gnu.org Version|unknown |15.0 Keywords| |missed-optimization Status|UNCONFIRMED |NEW Last reconfirmed| |2025-01-07 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Confirmed. ifcombine sees <bb 2> [local count: 1073741824]: _3 = rt_2(D)->cfg1; if (_3 != 0) goto <bb 5>; [50.00%] else goto <bb 3>; [50.00%] <bb 3> [local count: 536870912]: _6 = rt_2(D)->cfg2; if (_6 != 0) goto <bb 5>; [50.00%] else goto <bb 4>; [50.00%] <bb 4> [local count: 268435456]: _7 = rt_2(D)->cfg3; <bb 5> [local count: 1073741824]: # iftmp.0_5 = PHI <1(2), _7(4), 1(3)> return iftmp.0_5; Maybe it's confused about the value-replacements in the PHI (the constant 1) or it's confused by the lack of a compare in BB 4 (it's implicitly _7 != 0).