https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100858
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2021-06-02 Ever confirmed|0 |1 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- That's really a duplicate of 100858 - this case can be handled by sinking as well since we "sink" the return. Make it void bar(); int foo(bool f) { if (f) { bar(); __builtin_abort (); } else { bar(); return 2; } } to force hoisting. Hoisting is done by PRE but that requires a LHS and doesn't handle calls with side-effects.