https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98977
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2021-12-23 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Depends on| |3507 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Confirmed, PR 3507 is part of it (maybe all of it) as shown by: #include <stdbool.h> #include <stdint.h> extern bool z, c; uint8_t f(uint8_t dest, uint8_t src) { uint8_t res = dest - src; //z = !res; c = src > dest; return res; } Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3507 [Bug 3507] appalling optimisation with sub/cmp on multiple targets