public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/25287]  New: PPC has conditional indirect jumps if ra allocates the a in ctr before the jumps
@ 2005-12-06 21:07 pinskia at gcc dot gnu dot org
  2005-12-06 21:09 ` [Bug target/25287] " pinskia at gcc dot gnu dot org
  2005-12-23  5:53 ` pinskia at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-12-06 21:07 UTC (permalink / raw)
  To: gcc-bugs

Code:
int f(void *a, int b)
{
  if (b ==1) goto *a;
  g();
  if (b ==2) goto *a;
  g();
  return 1
}

This is very minor but I thought it would be cool if GCC could do something
like:
.f:
        mflr %r0
        cmpwi %cr7,%r4,1
        std %r30,-16(%r1)
        std %r31,-8(%r1)
        mr %r30,%r3
        mr %r31,%r4
        std %r0,16(%r1)
        stdu %r1,-128(%r1)
        mtctr %r30
        beqctr %cr7,.L3
        bl .g
        nop
        cmpwi %cr7,%r31,2
        mtctr %r30
        beqctr %cr7,.L3
        bl .g
        li %r3
        blr
.L3:
        mtctr %r30
        bctr


-- 
           Summary: PPC has conditional indirect jumps if ra allocates the a
                    in ctr before the jumps
           Product: gcc
           Version: 4.2.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=25287


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

* [Bug target/25287] PPC has conditional indirect jumps if ra allocates the a in ctr before the jumps
  2005-12-06 21:07 [Bug target/25287] New: PPC has conditional indirect jumps if ra allocates the a in ctr before the jumps pinskia at gcc dot gnu dot org
@ 2005-12-06 21:09 ` pinskia at gcc dot gnu dot org
  2005-12-23  5:53 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-12-06 21:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2005-12-06 21:09 -------
Ignore the:
.L3:
        mtctr %r30
        bctr
Part
and "beqctr %cr7,.L3" should have been "beqctr %cr7"


-- 


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


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

* [Bug target/25287] PPC has conditional indirect jumps if ra allocates the a in ctr before the jumps
  2005-12-06 21:07 [Bug target/25287] New: PPC has conditional indirect jumps if ra allocates the a in ctr before the jumps pinskia at gcc dot gnu dot org
  2005-12-06 21:09 ` [Bug target/25287] " pinskia at gcc dot gnu dot org
@ 2005-12-23  5:53 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-12-23  5:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2005-12-23 05:53 -------
Confirmed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-12-23 05:53:16
               date|                            |


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


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

end of thread, other threads:[~2005-12-23  5:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-06 21:07 [Bug target/25287] New: PPC has conditional indirect jumps if ra allocates the a in ctr before the jumps pinskia at gcc dot gnu dot org
2005-12-06 21:09 ` [Bug target/25287] " pinskia at gcc dot gnu dot org
2005-12-23  5:53 ` pinskia at gcc dot gnu dot 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).