This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/52528] New: combine bug (powerpc testcase)
- From: "cltang at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 08 Mar 2012 05:18:03 +0000
- Subject: [Bug rtl-optimization/52528] New: combine bug (powerpc testcase)
- Auto-submitted: auto-generated
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.