https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85683
Alexander Monakov <amonakov at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization Status|UNCONFIRMED |NEW Last reconfirmed| |2018-05-07 CC| |amonakov at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Alexander Monakov <amonakov at gcc dot gnu.org> --- Smaller testcase: void f(void); void g(int *p) { if (!--*p) f(); } On gcc-7.3 this is optimized by the peephole2 pass so it doesn't really help with register pressure (combine pass seems more suitable for that); don't know why the peephole doesn't trigger on gcc-8.