public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/31557]  New: return 0x80000000UL code gen can be improved
@ 2007-04-12 21:10 pinskia at gcc dot gnu dot org
  2007-07-02 21:35 ` [Bug target/31557] " pinskia at gcc dot gnu dot org
  2009-05-14  5:19 ` bje at gcc dot gnu dot org
  0 siblings, 2 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-04-12 21:10 UTC (permalink / raw)
  To: gcc-bugs

Testcase:
unsigned int f(void)
{
  return 0x80000001UL;
}

This should be able to done in three instructions:
.f:
        li 3,1
        oris 3,3,0x8000
        blr

Right now it is done as:
.L.f:
        li 3,0
        ori 3,3,32768
        sldi 3,3,16
        ori 3,3,1
        blr
Which is (0x8000 << 16) | 1 but (0x8000 << 16) is what is done for oris.


-- 
           Summary: return 0x80000000UL code gen can be improved
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
GCC target triplet: powerpc64-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31557


^ permalink raw reply	[flat|nested] 7+ messages in thread
[parent not found: <bug-31557-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2024-03-05  0:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-12 21:10 [Bug target/31557] New: return 0x80000000UL code gen can be improved pinskia at gcc dot gnu dot org
2007-07-02 21:35 ` [Bug target/31557] " pinskia at gcc dot gnu dot org
2009-05-14  5:19 ` bje at gcc dot gnu dot org
     [not found] <bug-31557-4@http.gcc.gnu.org/bugzilla/>
2012-08-13 23:03 ` PHHargrove at lbl dot gov
2012-08-14  0:31 ` PHHargrove at lbl dot gov
2024-03-05  0:16 ` bergner at gcc dot gnu.org
2024-03-05  0:20 ` pinskia 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).