https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116544
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|target |rtl-optimization Status|UNCONFIRMED |NEW Known to fail| |12.3.0 Ever confirmed|0 |1 Last reconfirmed| |2024-08-30 --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- A couple of things. Looks like there is a missing optimization on the gimple level: ``` if (c.2_7 != 0) goto <bb 3>; [50.00%] else goto <bb 4>; [50.00%] <bb 3> [local count: 238871722]: _61 = MEM[(long long int *)f.0_1 + 16B]; _62 = (int) _61; e[2] = _62; _37 = MEM[(long long int *)f.0_1 + 40B]; _30 = (int) _37; goto <bb 5>; [100.00%] <bb 4> [local count: 353842862]: _15 = MEM[(long long int *)f.0_1 + 16B]; _14 = (int) _15; e[2] = _14; _5 = MEM[(long long int *)f.0_1 + 40B]; _6 = (int) _5; <bb 5> [local count: 247801162]: # _25 = PHI <_30(3), _6(4)> ``` But then jump2 (which is after RA) goes wrong when it is commoning the 2 bb.