public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/31375]  New: missed loop-if transformation / branch reduction.
@ 2007-03-27 12:56 pluto at agmk dot net
  2007-03-27 13:24 ` [Bug tree-optimization/31375] " rguenth at gcc dot gnu dot org
  2007-03-27 18:01 ` pinskia at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: pluto at agmk dot net @ 2007-03-27 12:56 UTC (permalink / raw)
  To: gcc-bugs

long condition( void );
long f1( void );
long f2( void );

void foo( void )
{
        for ( ;; )
                if ( condition() )
                        f1();
                else
                        f2();
}

foo() could be transformed to bar():

void bar( void )
{
        long (* f[ 2 ])() = { &f2, &f1 };
        for ( ;; )
                f[ condition() ]();
}


-- 
           Summary: missed loop-if transformation / branch reduction.
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pluto at agmk dot net


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


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

end of thread, other threads:[~2007-03-27 18:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-27 12:56 [Bug tree-optimization/31375] New: missed loop-if transformation / branch reduction pluto at agmk dot net
2007-03-27 13:24 ` [Bug tree-optimization/31375] " rguenth at gcc dot gnu dot org
2007-03-27 18:01 ` 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).