https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79593
Jeffrey A. Law <law at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |law at redhat dot com
--- Comment #20 from Jeffrey A. Law <law at redhat dot com> ---
Could we perhaps attack this in RTL DSE?
If we look at the RTL .dse2 dump we have:
(insn 84 24 92 4 (set (reg:SI 0 ax [116])
(mem/c:SI (reg/f:SI 7 sp) [6 %sfp+-8 S4 A64])) "j.c":21:35 67
{*movsi_internal}
(nil))
(insn 92 84 93 4 (set (mem/c:SI (reg/f:SI 7 sp) [6 %sfp+-8 S4 A64])
(reg:SI 0 ax [116])) "j.c":21:35 67 {*movsi_internal}
(expr_list:REG_DEAD (reg:SI 0 ax [116])
(nil)))
insn 92 is clearly a dead store.
Walking up in the dump file we have:
**scanning insn=84
mem: (reg/f:SI 7 sp)
after canon_rtx address: (reg/f:SI 7 sp)
after cselib_expand address: (reg/f:SI 7 sp)
after canon_rtx address: (reg/f:SI 7 sp)
varying cselib base=1:1 offset = 0
processing cselib load mem:(mem/c:SI (reg/f:SI 7 sp) [6 %sfp+-8 S4 A64])
mems_found = 0, cannot_delete = true
**scanning insn=92
mem: (reg/f:SI 7 sp)
after canon_rtx address: (reg/f:SI 7 sp)
after cselib_expand address: (reg/f:SI 7 sp)
after canon_rtx address: (reg/f:SI 7 sp)
varying cselib base=1:1 offset = 0
processing cselib store [0..4)
mems_found = 1, cannot_delete = false