https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92227
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target| |x86_64-linux-gnu Status|UNCONFIRMED |WAITING Last reconfirmed| |2019-10-26 Component|tree-optimization |target Ever confirmed|0 |1 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- __builtin_sadd_overflow does not need to clobber or set any flags if is done correctly. Just like a compare might be done without using the flags register. I don't see what you are exactly complaining about if __builtin_sadd_overflow produces the correct results.