[Bug optimization/15357] New: [tree-ssa] combing if statements
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun May 9 22:11:00 GMT 2004
The following two functions should give the same asm (If the branch cost is high
enough):
int g(void);
int h(int a, int b, int c, int d)
{
if (a==b)
if (c==d)
return g();
return 0;
}
int h1(int a, int b, int c, int d)
{
if (a==b && c==d)
return g();
return 0;
}
And these two:
int j(int a, int b, int c, int d)
{
if (a==b)
goto a;
if (c==d)
goto a;
else
goto b;
a:
return g();
b:
return 0;
}
int j1(int a, int b, int c, int d)
{
if (a==b || c==d)
return g();
return 0;
}
--
Summary: [tree-ssa] combing if statements
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Keywords: pessimizes-code, memory-hog, compile-time-hog
Severity: enhancement
Priority: P2
Component: optimization
AssignedTo: pinskia at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
OtherBugsDependingO 15241,15348,15352
nThis:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15357
More information about the Gcc-bugs
mailing list