This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/69008] gcc emits unneeded memory access when passing trivial structs by value (ARM)


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69008

Michael Collison <michael.collison at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|target                      |rtl-optimization

--- Comment #3 from Michael Collison <michael.collison at linaro dot org> ---
Changed to component rtl optimization. Occurs on other targets as well. On
MIPS, for example, generates two redundant store to memory at -O2:

(insn 5 23 6 (set (mem/c:SI (reg/f:SI 29 $sp) [1 t+0 S4 A32])
        (reg:SI 4 $4)) bugzilla_69008.c:7 310 {*movsi_internal}
     (nil))
(insn 6 5 18 (set (mem/c:SI (plus:SI (reg/f:SI 29 $sp)
                (const_int 4 [0x4])) [1 t+4 S4 A32])
        (reg:SI 5 $5)) bugzilla_69008.c:7 310 {*movsi_internal}
     (nil))
(insn 18 6 30 (use (reg/i:SI 2 $2)) bugzilla_69008.c:9 -1
     (nil))
(note 30 18 27 NOTE_INSN_EPILOGUE_BEG)
(insn 27 30 32 (clobber (reg:SI 28 $28)) bugzilla_69008.c:9 -1
     (nil))
(insn 32 27 29 (sequence [
            (jump_insn 28 27 17 (simple_return) bugzilla_69008.c:9 629
{*simple_return}
                 (nil)
             -> simple_return)
            (insn 17 28 29 (set (reg/i:SI 2 $2)
                    (plus:SI (reg:SI 4 $4)
                        (reg:SI 5 $5))) 13 {*addsi3}
                 (nil))
        ]) bugzilla_69008.c:9 -1
     (nil))

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]