https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63906
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vmakarov at gcc dot gnu.org Summary|[5 Regression] dse after |[5 Regression] lra_remat |reload miscompiles glibc |miscompiles glibc on |with lra_remat turned on |aarch64 |aarch64 | --- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- No the problem is LRA_REMAT thinks: (insn 2653 217 219 13 (set (reg/v/f:DI 3 x3 [orig:97 needed ] [97]) (mem/c:DI (plus:DI (reg/f:DI 29 x29) (const_int 152 [0x98])) [34 %sfp+-136 S8 A64])) dl-deps.c:224 42 {*movdi_aarch64} (nil)) Is really sp but it is not as sp has changed just a few instructions above: (insn 210 2652 214 13 (set (reg/f:DI 31 sp) (minus:DI (reg/f:DI 3 x3 [1110]) (reg:DI 1 x1 [485]))) dl-deps.c:224 218 {subdi3} (nil)) Meaning LRA_remat cannot think sp is a constant if alloca is ever used.