https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110304
--- Comment #6 from cqwrteur <unlvsur at live dot com> --- i can guarantee my implementation is optimal on these no flags architectures without the need of optimizations from backend. Then there would be no need to do backend specific optimizations on mips riscv and loongarch Using the type itself prevents casting. It is the users responsibility to ensure the value is either zero or one. Get Outlook for Android<https://aka.ms/AAb9ysg> ________________________________ From: jakub at gcc dot gnu.org <gcc-bugzi...@gcc.gnu.org> Sent: Monday, June 19, 2023 2:22:10 AM To: unlv...@live.com <unlv...@live.com> Subject: [Bug c++/110304] __builtin_adcs missing and jakub you miss the point of builtin_adcb https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110304 --- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- The reason for | rather than + is clang compatibility with its misdesigned interface. It never returns 2 as carry-out, even if you add 0xffffffffU, 0xfffffffU and 0xfffffffU. But, if pattern matching can prove the carry-in is only in [0, 1] range, then all of +, | or ^ act the same and if target provides uaddc5/usubc5 patterns, it will be pattern matched. -- You are receiving this mail because: You are on the CC list for the bug. You reported the bug.