From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7332 invoked by alias); 3 Oct 2011 19:13:38 -0000 Received: (qmail 7323 invoked by uid 22791); 3 Oct 2011 19:13:37 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_ZJ 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; Mon, 03 Oct 2011 19:13:24 +0000 From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/50603] [x32] Unnecessary lea Date: Mon, 03 Oct 2011 19:13: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: X-Bugzilla-Severity: normal X-Bugzilla-Who: ubizjak at gmail dot com 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: Status Last reconfirmed Ever Confirmed 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: 2011-10/txt/msg00124.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50603 Uros Bizjak changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2011-10-03 Ever Confirmed|0 |1 --- Comment #1 from Uros Bizjak 2011-10-03 19:13:02 UTC --- This is the same issue as in: FAIL: gcc.target/i386/pr45670.c scan-assembler-not lea[lq] We expand to addsi_1 with memory operand: (insn 7 6 9 2 (parallel [ (set (reg:SI 68) (plus:SI (reg:SI 69) (mem/f/c/i:SI (symbol_ref:DI ("foo") [flags 0x40] ) [2 foo+0 S4 A32]))) (clobber (reg:CC 17 flags)) ]) pr50603.c:3 253 {*addsi_1} (expr_list:REG_DEAD (reg:SI 69) (expr_list:REG_UNUSED (reg:CC 17 flags) (nil)))) and then fail at combine with: Trying 6, 7 -> 9: Failed to match this instruction: (set (reg:SI 70 [ *D.3235_5 ]) (mem:SI (zero_extend:DI (plus:SI (mult:SI (reg/v:SI 65 [ x ]) (const_int 4 [0x4])) (mem/f/c/i:SI (symbol_ref:DI ("foo") [flags 0x40] ) [2 foo+0 S4 A32]))) [3 *D.3235_5+0 S4 A32]))