From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8877 invoked by alias); 17 Nov 2014 05:01:09 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 8837 invoked by uid 48); 17 Nov 2014 05:01:04 -0000 From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/63906] [5 Regression] lra_remat miscompiles glibc on aarch64 Date: Mon, 17 Nov 2014 05:01:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: blocker X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc short_desc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-11/txt/msg01460.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63906 Andrew Pinski 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 --- 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.