From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2397 invoked by alias); 26 Jul 2012 07:51:30 -0000 Received: (qmail 2373 invoked by uid 22791); 26 Jul 2012 07:51:26 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 26 Jul 2012 07:51:14 +0000 From: "zhenqiang.chen at linaro dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/53735] thumb1 spill failure with -Os Date: Thu, 26 Jul 2012 07:51:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: zhenqiang.chen at linaro dot org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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 X-SW-Source: 2012-07/txt/msg01955.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53735 zhenqiang.chen at linaro dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |zhenqiang.chen at linaro | |dot org --- Comment #4 from zhenqiang.chen at linaro dot org 2012-07-26 07:50:25 UTC --- Root cause: r8-r11 is not available for THUMB1 with -Os. In function arm_conditional_register_usage (arm.c), you can find the code if (TARGET_THUMB1 && optimize_size) { /* When optimizing for size on Thumb-1, it's better not to use the HI regs, because of the overhead of stacking them. */ for (regno = FIRST_HI_REGNUM; regno <= LAST_HI_REGNUM; ++regno) fixed_regs[regno] = call_used_regs[regno] = 1; } If removing the code, the result is OK (r8 is used).