https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80546
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> --- void ptr4 (__int128_t *p) { __int128_t a = p[1]; __int128_t b; __asm__ ("# gpr reg %0" : "+r" (a)); b = ~a; __asm__ ("# gpr reg %0" : "+r" (b)); p[0] = b; } void ptr5 (__int128_t *p) { __int128_t a = p[1]; __int128_t b; __asm__ ("# gpr reg %0" : "+r" (a)); b = ~a; __asm__ ("# gpr reg %0" : "+r" (b), "+r" (a)); p[0] = b; } For ptr4 which has: (insn 10 9 17 2 (set (reg/v:TI 122 [ b ]) (not:TI (reg:TI 125 [ a ]))) "bool3.h":39 493 {*one_cmplti3_internal} (expr_list:REG_DEAD (reg:TI 125 [ a ]) (nil))) (insn 17 10 12 2 (set (reg:TI 126 [ b ]) (reg/v:TI 122 [ b ])) "bool3.h":40 1197 {*vsx_movti_64bit} (expr_list:REG_DEAD (reg/v:TI 122 [ b ]) (nil))) and therefore it is quite likely pseudo 122 and 126 can be the same register IRA considers it with the patch cheap, but it does so also for ptr5 with: (insn 10 9 19 2 (set (reg/v:TI 122 [ b ]) (not:TI (reg:TI 125 [ a ]))) "bool3.h":49 493 {*one_cmplti3_internal} (nil)) (insn 19 10 18 2 (set (reg:TI 127 [ a ]) (reg:TI 125 [ a ])) "bool3.h":50 1197 {*vsx_movti_64bit} (expr_list:REG_DEAD (reg:TI 125 [ a ]) (nil))) (insn 18 19 13 2 (set (reg:TI 126 [ b ]) (reg/v:TI 122 [ b ])) "bool3.h":50 1197 {*vsx_movti_64bit} (expr_list:REG_DEAD (reg/v:TI 122 [ b ]) (nil))) where it is more expensive.