https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110304
--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to cqwrteur from comment #11) > Actually mine > > template<::std::unsigned_integral T> > inline constexpr T add_carry(T a,T b,T carryin,T& carryout) noexcept > { > [[assume(carryin==0||carryin==1)]]; > a+=b; > carryout=a<b; > a+=carryin; > carryout+=a<carryin; > return a; > } > > can be pattern-matching without builtins. This might be more universal and > be optimized very early on. And you are trying to say what with this? This is pattern matched by the r14-1837 change, and covered in the gcc.target/i386/pr79173-5.c testcase.