https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100080
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization Ever confirmed|0 |1 Last reconfirmed| |2021-04-15 Status|UNCONFIRMED |NEW Component|tree-optimization |rtl-optimization Version|unknown |11.0 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Confirmed. At -O2 combine manages to drop the call to foo () (indirectly), at -O3 it does not. There's not much difference on the GIMPLE level