https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94566
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|11832, 33315 | Depends on| |33315 --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- I've verified my old fix for PR33315 does t.C:11:45: optimized: sinking common stores to D.8528._M_value ... conv2 (int i) { struct strong_ordering D.8528; int _7; <bb 2> [local count: 1073741817]: switch (i_2(D)) <default: <L3> [0.00%], case -1: <L5> [33.33%], case 0: <L1> [33.33%], case 1: <L2> [33.33%]> <bb 3> [local count: 357913942]: <L1>: goto <bb 6>; [100.00%] <bb 4> [local count: 357913942]: <L2>: goto <bb 6>; [100.00%] <bb 5> [count: 0]: <L3>: __builtin_unreachable (); <bb 6> [local count: 1073741824]: # _7 = PHI <-1(2), 0(3), 1(4)> <L5>: D.8528._M_value = _7; return D.8528; still not optimized further tho. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=11832 [Bug 11832] Optimization of common stores in switch statements https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33315 [Bug 33315] stores not commoned by sinking