https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43892
--- Comment #28 from Christophe Leroy <christophe.leroy at csgroup dot eu> --- Looks like we have a way to do it. Works at least with GCC 5.5, 8.2, 9.2, 10.1 unsigned long g(unsigned long a, unsigned long b) { unsigned long long s = (unsigned long long)a + (unsigned long long)b; return (s >> 32) + s; } 00000020 <g>: 20: 7c 63 20 14 addc r3,r3,r4 24: 7c 63 01 94 addze r3,r3 28: 4e 80 00 20 blr Though GCC 4.9.4 does: 00000014 <g>: 14: 7c 69 1b 78 mr r9,r3 18: 7c 8b 23 78 mr r11,r4 1c: 39 00 00 00 li r8,0 20: 39 40 00 00 li r10,0 24: 7d 6b 48 14 addc r11,r11,r9 28: 7d 4a 41 14 adde r10,r10,r8 2c: 7c 6a 5a 14 add r3,r10,r11 30: 4e 80 00 20 blr