This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/14016] New: [tree-ssa] User variable get eliminated, only to be replaced with compiler generated ones
- From: "dann at godzilla dot ics dot uci dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Feb 2004 08:01:59 -0000
- Subject: [Bug optimization/14016] New: [tree-ssa] User variable get eliminated, only to be replaced with compiler generated ones
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
For:
void test55 (void)
{
int u;
int XXX, YYY;
XXX = foo ();
YYY = bar ();
if (XXX != 5 && YYY)
{
u = XXX + 22;
if (u != 27)
baz ();
}
}
The .optimized dump looks like:
;; Function test55 (test55)
test55 ()
{
int T.1;
int T.0;
<bb 0>:
T.0 = foo ();
T.1 = bar ();
if (T.0 != 5 && T.1 != 0) goto <L0>; else goto <L2>;
<L0>:;
if (T.0 + 22 != 27) goto <L1>; else goto <L2>;
<L1>:;
baz ();
<L2>:;
<L3>:;
return;
}
The XXX and YYY variables have been replaced with the compiler generated T.0
and T.1
T.0 and T.1 are created in .generic
T.0 = foo ();
XXX = T.0;
T.1 = bar ();
YYY = T.1;
T.2 = XXX != 5;
T.3 = YYY != 0;
T.4 = T.2 && T.3;
in .dom1 XXX and YYY in the T.2 and T.3 assignments are replaces with T.0 and
T.1
T.0_1 = foo ();
XXX_2 = T.0_1;
T.1_3 = bar ();
YYY_4 = T.1_3;
T.2_5 = T.0_1 != 5;
T.3_6 = T.1_3 != 0;
and finally dce2 eliminates XXX and YYY as they are not used anymore.
--
Summary: [tree-ssa] User variable get eliminated, only to be
replaced with compiler generated ones
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dann at godzilla dot ics dot uci dot edu
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14016