From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24505 invoked by alias); 24 May 2011 23:27:48 -0000 Received: (qmail 24496 invoked by uid 22791); 24 May 2011 23:27:48 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 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; Tue, 24 May 2011 23:27:34 +0000 From: "hjl.tools at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/49114] [x32] 454.calculix in SPEC CPU 2006 failed X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC Component 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 Date: Tue, 24 May 2011 23:35:00 -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 X-SW-Source: 2011-05/txt/msg02271.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49114 H.J. Lu changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vmakarov at redhat dot com Component|target |rtl-optimization --- Comment #3 from H.J. Lu 2011-05-24 23:14:55 UTC --- gen_reload has if (CONSTANT_P (op1) || MEM_P (op1) || GET_CODE (op1) == SUBREG || (REG_P (op1) && REGNO (op1) >= FIRST_PSEUDO_REGISTER) || (code != CODE_FOR_nothing && !insn_operand_matches (code, 2, op1))) tem = op0, op0 = op1, op1 = tem; When IN is (plus:SI (subreg:SI (reg/v/f:DI 182 [ b ]) 0) (const_int 8 [0x8])) OP0 is SUBREG. Swapping seems odd since we prefer SUBREG as OP0. I am testing this patch @@ -8528,7 +8528,9 @@ gen_reload (rtx out, rtx in, int opnum, enum reload_type type) code = optab_handler (add_optab, GET_MODE (out)); - if (CONSTANT_P (op1) || MEM_P (op1) || GET_CODE (op1) == SUBREG + if (((CONSTANT_P (op1) || MEM_P (op1)) + && GET_CODE (op0) != SUBREG) + || GET_CODE (op1) == SUBREG || (REG_P (op1) && REGNO (op1) >= FIRST_PSEUDO_REGISTER) || (code != CODE_FOR_nothing