[Bug optimization/14706] New: [tree-ssa] range checks should be merged.
kazu at cs dot umass dot edu
gcc-bugzilla@gcc.gnu.org
Wed Mar 24 05:22:00 GMT 2004
We know that fold() can fold (a > 10 && a < 20) into
((unsigned int) (a - 11) <= 8).
We should also be able to optimize foo() in a similar way.
Note that bar() can be implemented using a conditional move and no jump.
int g;
void
foo (int a)
{
if (a > 10)
if (a < 20)
g = 0;
}
void
bar (int a)
{
if ((unsigned int) (a - 11) <= 8)
g = 0;
}
--
Summary: [tree-ssa] range checks should be merged.
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Keywords: pessimizes-code
Severity: enhancement
Priority: P2
Component: optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kazu at cs dot umass dot edu
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14706
More information about the Gcc-bugs
mailing list