[Bug optimization/14792] New: [tree-ssa] cast elimination opportunity involving an AND
kazu at cs dot umass dot edu
gcc-bugzilla@gcc.gnu.org
Wed Mar 31 02:55:00 GMT 2004
Consider:
void bar (void);
void
foo (unsigned int a)
{
int b = a;
if (b & 1)
bar ();
}
I get:
foo (a)
{
int b;
_Bool T.1;
int T.0;
<bb 0>:
b_2 = (int)a_1;
T.0_3 = b_2 & 1;
T.1_4 = (_Bool)T.0_3;
if (T.1_4) goto <L0>; else goto <L1>;
<L0>:;
bar () [tail call];
<L1>:;
return;
}
We could skip "b" like so
T.0_3 = a_1 & 1;
--
Summary: [tree-ssa] cast elimination opportunity involving an AND
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=14792
More information about the Gcc-bugs
mailing list