This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/31375] New: missed loop-if transformation / branch reduction.
- From: "pluto at agmk dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Mar 2007 12:56:44 -0000
- Subject: [Bug tree-optimization/31375] New: missed loop-if transformation / branch reduction.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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