This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/15452] New: [tree-ssa] Optimize cascaded a = a == 0;
- From: "kazu at cs dot umass dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 May 2004 03:26:19 -0000
- Subject: [Bug tree-optimization/15452] New: [tree-ssa] Optimize cascaded a = a == 0;
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
This is very similar to PR 14758.
int
foo (int a)
{
a = !a;
a = !a;
a = !a;
a = !a;
a = !a;
return a;
}
I get:
foo (a)
{
<bb 0>:
a_2 = a_1 == 0;
a_3 = a_2 == 0;
a_4 = a_3 == 0;
a_5 = a_4 == 0;
a_6 = a_5 == 0;
return a_6;
}
Do the obvious optimization.
--
Summary: [tree-ssa] Optimize cascaded a = a == 0;
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Keywords: pessimizes-code
Severity: enhancement
Priority: P2
Component: tree-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=15452