From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13608 invoked by alias); 3 Nov 2014 10:17:15 -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 13583 invoked by uid 48); 3 Nov 2014 10:17:12 -0000 From: "vries at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/63718] [5 Regression] ARM Thumb1 bootstrap fail after fuse-caller-save info in cprop-hardreg Date: Mon, 03 Nov 2014 10:17: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: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries 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 attachments.created 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/msg00094.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63718 vries at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vries at gcc dot gnu.org --- Comment #5 from vries at gcc dot gnu.org --- Created attachment 33874 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33874&action=edit tentative patch, adds missing clobbers Joey, thanks for doing the analysis and the clear bug report. I cannot formally confirm at this point since I don't have an arm bootstrap setup, but I agree, those missing clobbers (while not causing problems otherwise) will cause problems with fuse-caller-save. I'd say the fix is to add the missing clobbers. Attached tentative patch implements that fix. Using the patch, I build a c-only arm compiler, compiled an example with -mthumb and -march=armv4t and observed the new clobbers on the return in the final dump: ... (jump_insn 19 18 20 (parallel [ (unspec_volatile [ (return) ] VUNSPEC_EPILOGUE) (clobber (reg:SI 0 r0)) (clobber (reg:SI 1 r1)) (clobber (reg:SI 2 r2)) (clobber (reg:SI 3 r3)) ]) test.c:9 773 {*epilogue_insns} (expr_list:REG_UNUSED (reg:SI 3 r3) (expr_list:REG_UNUSED (reg:SI 2 r2) (expr_list:REG_UNUSED (reg:SI 1 r1) (nil)))) -> return) ... Could you try out the patch and see if it fixes things for you? Thanks, - Tom