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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[5 Regression] lra_remat    |[5 Regression] dse after
                   |mis-compiles glibc on       |reload miscompiles glibc
                   |aarch64                     |with lra_remat turned on
                   |                            |aarch64

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
It looks like dse is removing more stores when lra_remat is enable:

(insn 538 537 2663 41 (set (mem/f:DI (plus:DI (reg/f:DI 1 x1 [581])
                (const_int 16 [0x10])) [1 runp_409->next+0 S8 A128])
        (const_int 0 [0])) dl-deps.c:283 42 {*movdi_aarch64}
     (nil))


That is for:
            newp->next = NULL;
            tail->next = newp;

DSE (after reload) thinks tail->next is the same as the store to newp->next
with LRA_REMAT turned on.
**scanning insn=538
  mem: (plus:DI (reg/f:DI 1 x1 [581])
    (const_int 16 [0x10]))

   after canon_rtx address: (plus:DI (reg/f:DI 1 x1 [581])
    (const_int 16 [0x10]))

   after cselib_expand address: (plus:DI (reg/f:DI 31 sp)
    (const_int 16 [0x10]))
....
**scanning insn=539
  mem: (plus:DI (reg/v/f:DI 2 x2 [orig:88 runp ] [88])
    (const_int 16 [0x10]))

   after canon_rtx address: (plus:DI (reg/v/f:DI 2 x2 [orig:88 runp ] [88])
    (const_int 16 [0x10]))

   after cselib_expand address: (plus:DI (reg/f:DI 31 sp)
    (const_int 16 [0x10]))

   after canon_rtx address: (plus:DI (reg/f:DI 31 sp)
    (const_int 16 [0x10]))
  varying cselib base=2:4287 offset = 16
 processing cselib store [16..24)
**scanning insn=539
  mem: (plus:DI (reg/v/f:DI 2 x2 [orig:88 runp ] [88])
    (const_int 16 [0x10]))

   after canon_rtx address: (plus:DI (reg/v/f:DI 2 x2 [orig:88 runp ] [88])
    (const_int 16 [0x10]))

   after cselib_expand address: (plus:DI (reg/f:DI 31 sp)
    (const_int 16 [0x10]))

   after canon_rtx address: (plus:DI (reg/f:DI 31 sp)
    (const_int 16 [0x10]))
  varying cselib base=2:4287 offset = 16
 processing cselib store [16..24)

Reply via email to