------- Comment #3 from matz at gcc dot gnu dot org 2010-02-01 00:21 ------- 3.4 had this as initial RTL:
(insn 3 2 4 (set (reg:DI 60) (mem/f:DI (reg/f:SI 53 virtual-incoming-args) [2 a+0 S8 A32])) -1 (nil) (expr_list:REG_EQUIV (mem/f:DI (reg/f:SI 53 virtual-incoming-args) [2 a+0 S8 A32]) (nil))) (insn 4 3 5 (set (mem/f:DI (addressof:SI (reg/v:DI 59) 58 0xf7c9a4a4) [2 a+0 S8 A64]) (reg:DI 60)) -1 (nil) (nil)) (insn 15 7 16 0 (parallel [ (set (reg/f:SI 7 sp) (plus:SI (reg/f:SI 7 sp) (const_int -12 [0xfffffff4]))) (clobber (reg:CC 17 flags)) ]) -1 (nil) (nil)) (insn 16 15 17 0 (set (mem/f:SI (pre_dec:SI (reg/f:SI 7 sp)) [0 S4 A32]) (addressof:SI (reg/v:DI 59) 58 0xf7c9a4a4)) -1 (nil) (nil)) (call_insn 17 16 19 0 (call (mem:QI (symbol_ref:SI ("foo") [flags 0x41] <function_decl 0xf7c9a438 foo>) [0 S1 A8]) (const_int 16 [0x10])) -1 (nil) (nil) (nil)) addressof RTL and handling was removed in 2004, but was our way of making this optimization on RTL. So this would now need to be implemented in expand or something :-/ Well, or by implementing some more memory optimizations on RTL (recognizing that mem1 has same content as mem2, and using &mem1 where &mem2 was used and the former somehow is "better"). Not committing to MEM to start with would be better, obviously. -- matz at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |matz at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42919