https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87238
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ra --- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Note I had to change the testcase to be using size 128. But this is interesting, IRA was able to figure the memset return value: (call_insn 14 13 17 2 (parallel [ (set (reg:DI 0 x0) (call (mem:DI (symbol_ref:DI ("memcpy") [flags 0x41] <function_decl 0x7efee90fd200 __builtin_memcpy>) [0 __builtin_memcpy S8 A8]) (const_int 0 [0]))) (unspec:DI [ (const_int 0 [0]) ] UNSPEC_CALLEE_ABI) (clobber (reg:DI 30 x30)) ]) "/app/example.cpp":10:16 47 {*call_value_insn} (expr_list:REG_RETURNED (reg/f:DI 95) (expr_list:REG_DEAD (reg:DI 2 x2) (expr_list:REG_DEAD (reg:DI 1 x1) (expr_list:REG_UNUSED (reg:DI 0 x0) (expr_list:REG_CALL_DECL (symbol_ref:DI ("memcpy") [flags 0x41] <function_decl 0x7efee90fd200 __builtin_memcpy>) (expr_list:REG_EH_REGION (const_int 0 [0]) (nil))))))) (expr_list (clobber (reg:DI 17 x17)) (expr_list (clobber (reg:DI 16 x16)) (expr_list:DI (set (reg:DI 0 x0) (reg:DI 0 x0)) (expr_list:DI (use (reg:DI 0 x0)) (expr_list:DI (use (reg:DI 1 x1)) (expr_list:DI (use (reg:DI 2 x2)) (nil)))))))) (insn 17 14 18 2 (set (reg:DI 0 x0) (reg/f:DI 95)) "/app/example.cpp":10:16 53 {*movdi_aarch64} (expr_list:REG_DEAD (reg/f:DI 95) (expr_list:REG_EQUAL (plus:DI (reg/f:DI 64 sfp) (const_int -512 [0xfffffffffffffe00])) (nil)))) But not actually use it. REG_RETURNED (reg/f:DI 95) Instead if used the REG_EQUAL ....