From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24909 invoked by alias); 3 Sep 2014 06:17:58 -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 24836 invoked by uid 48); 3 Sep 2014 06:17:54 -0000 From: "zhenqiang.chen at arm dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/59535] [4.9 regression] -Os code size regressions for Thumb1/Thumb2 with LRA Date: Wed, 03 Sep 2014 06: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: 4.9.0 X-Bugzilla-Keywords: missed-optimization, ra X-Bugzilla-Severity: normal X-Bugzilla-Who: zhenqiang.chen at arm dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: vmakarov at redhat dot com X-Bugzilla-Target-Milestone: 4.9.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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-09/txt/msg00908.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59535 Zhenqiang Chen changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |zhenqiang.chen at arm dot com --- Comment #20 from Zhenqiang Chen --- Here is a small case to show lra introduces one more register copy (tested with trunk and 4.9). int isascii (int c) { return c >= 0 && c < 128; } With options: -Os -mthumb -mcpu=cortex-m0, I got isascii: mov r3, #0 mov r2, #127 mov r1, r3 //??? cmp r2, r0 adc r1, r1, r3 mov r0, r1 bx lr With options: -Os -mthumb -mcpu=cortex-m0 -mno-lra, I got isascii: mov r2, #127 mov r3, #0 cmp r2, r0 adc r3, r3, r3 mov r0, r3 bx lr