From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3292 invoked by alias); 8 Mar 2012 05:18:20 -0000 Received: (qmail 3282 invoked by uid 22791); 8 Mar 2012 05:18:18 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_CR,TW_RX 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, 08 Mar 2012 05:18:05 +0000 From: "cltang at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/52528] New: combine bug (powerpc testcase) Date: Thu, 08 Mar 2012 05:18:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cltang at gcc dot gnu.org 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: Message-ID: 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/msg00663.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52528 Bug #: 52528 Summary: combine bug (powerpc testcase) Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization AssignedTo: unassigned@gcc.gnu.org ReportedBy: cltang@gcc.gnu.org Target: powerc-linux The below testcase: struct S { unsigned a : 30; unsigned b : 2; }; int foo (int b) { struct S s = {0}; s.b = b; return bar (0x000b0010, 0x00040100ULL, *(unsigned long *)&s); } currently on trunk (target powerpc) compiles to: foo: lis 6,0x4 li 5,0 ori 6,6,256 li 7,0 crxor 6,6,6 b bar Notice the incorrect code generated: no construction of the 1st arg (reg 3), and wrong code for the 3rd arg (reg 7) I have diagnosed this as a problem in combine, and have a patch in testing. Opening this issue for status tracking.