This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/15357] New: [tree-ssa] combing if statements
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 May 2004 22:11:17 -0000
- Subject: [Bug optimization/15357] New: [tree-ssa] combing if statements
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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