https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99620
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Yeah. If you write it explicitly as: auto sub_good(u128 a, u128 b) { u64 l; bool k = __builtin_sub_overflow (a.l, b.l, &l); auto h = a.h - b.h - k; return u128{l, h}; } it will be optimized too.