public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/52528] New: combine bug (powerpc testcase)
@ 2012-03-08  5:18 cltang at gcc dot gnu.org
  2012-03-10 14:57 ` [Bug rtl-optimization/52528] " cltang at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: cltang at gcc dot gnu.org @ 2012-03-08  5:18 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-05-26 13:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-08  5:18 [Bug rtl-optimization/52528] New: combine bug (powerpc testcase) cltang at gcc dot gnu.org
2012-03-10 14:57 ` [Bug rtl-optimization/52528] " cltang at gcc dot gnu.org
2012-03-12 14:14 ` rguenth at gcc dot gnu.org
2012-03-15 10:05 ` cltang at gcc dot gnu.org
2012-04-15 14:55 ` mikpe at it dot uu.se
2012-04-23 19:07 ` ebotcazou at gcc dot gnu.org
2012-05-26 13:57 ` ebotcazou at gcc dot gnu.org
2012-05-26 14:02 ` ebotcazou at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).