This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/25553] Missed removal of load
- 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: 7 Apr 2008 01:44:19 -0000
- Subject: [Bug tree-optimization/25553] Missed removal of load
- References: <bug-25553-6528@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from pinskia at gcc dot gnu dot org 2008-04-07 01:44 -------
This turns out to be PRE for global decl issue as the following is done
correctly (at least on the trunk):
int g(int);
int f(int tt, int *t)
{
if (tt)
*t = 2;
else
*t = 3;
return g(*t);
}
--- CUT ---
f (tt, t)
{
int prephitmp.9;
int D.1182;
<bb 2>:
if (tt != 0)
goto <bb 3>;
else
goto <bb 4>;
<bb 3>:
*t = 2;
prephitmp.9 = 2;
goto <bb 5>;
<bb 4>:
*t = 3;
prephitmp.9 = 3;
<bb 5>:
D.1182 = g (prephitmp.9) [tail call];
return D.1182;
}
*** This bug has been marked as a duplicate of 23455 ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25553