This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/63906] [5 Regression] lra_remat miscompiles glibc on aarch64
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 17 Nov 2014 05:01:04 +0000
- Subject: [Bug rtl-optimization/63906] [5 Regression] lra_remat miscompiles glibc on aarch64
- Auto-submitted: auto-generated
- References: <bug-63906-4 at http dot gcc dot gnu dot org/bugzilla/>
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.