From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23923 invoked by alias); 2 Mar 2012 14:36:19 -0000 Received: (qmail 23789 invoked by uid 22791); 2 Mar 2012 14:36:16 -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; Fri, 02 Mar 2012 14:36:03 +0000 From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/46716] [4.4/4.5/4.6/4.7 Regression] wrong code generated with -mno-sse2 -m64 Date: Fri, 02 Mar 2012 14:36: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: accepts-invalid, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: ubizjak at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.4.7 X-Bugzilla-Changed-Fields: Summary 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-03/txt/msg00222.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46716 Uros Bizjak changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|[4.4/4.5/4.6/4.7/4.8 |[4.4/4.5/4.6/4.7 |Regression] wrong code |Regression] wrong code |generated with -mno-sse2 |generated with -mno-sse2 |-m64 |-m64 --- Comment #8 from Uros Bizjak 2012-03-02 14:35:24 UTC --- This is just a matter of always forcing the "natural" mode for the register, even when type system does not agree with this. See the comment for gen_reg_or_parallel on this issue. I am testing following patch: Index: config/i386/i386.c =================================================================== --- config/i386/i386.c (revision 184774) +++ config/i386/i386.c (working copy) @@ -6338,15 +6338,16 @@ construct_container (enum machine_mode mode, enum } if (n == 2 && regclass[0] == X86_64_SSE_CLASS && regclass[1] == X86_64_SSEUP_CLASS && mode != BLKmode) - return gen_rtx_REG (mode, SSE_REGNO (sse_regno)); + return gen_reg_or_parallel (mode, orig_mode, + SSE_REGNO (sse_regno)); if (n == 4 && regclass[0] == X86_64_SSE_CLASS && regclass[1] == X86_64_SSEUP_CLASS && regclass[2] == X86_64_SSEUP_CLASS && regclass[3] == X86_64_SSEUP_CLASS && mode != BLKmode) - return gen_rtx_REG (mode, SSE_REGNO (sse_regno)); - + return gen_reg_or_parallel (mode, orig_mode, + SSE_REGNO (sse_regno)); if (n == 2 && regclass[0] == X86_64_X87_CLASS && regclass[1] == X86_64_X87UP_CLASS) return gen_rtx_REG (XFmode, FIRST_STACK_REG);