https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85096
Bug ID: 85096 Summary: [6/7/8 Regression] Unnecessary(?) MOV instructions for int128 addition Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org CC: uros at gcc dot gnu.org, vmakarov at gcc dot gnu.org Target Milestone: --- __uint128_t add128(__uint128_t a, __uint128_t b) { return a + b; } GCC with -O3 produces: mov r9, rdi # a, a mov r10, rsi # a, a add r9, rdx # a, b adc r10, rcx # a, b mov rax, r9 # tmp93, a mov rdx, r10 #, a ret GCC 4.8.5 produced: mov rax, rdx # D.1732, b mov rdx, rcx # D.1732, b add rax, rdi # D.1732, a adc rdx, rsi # D.1732, a ret Clang produces: add rdi, rdx adc rsi, rcx mov rax, rdi mov rdx, rsi ret and ICC: add rdi, rdx #3.14 mov rax, rdi #3.14 adc rsi, rcx #3.14 mov rdx, rsi #3.14 ret #3.14 I don't know which component this should be, but Jakub suggested to CC Vlad and Uros, so maybe one of you can re-assign it to the right component.