This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/51988] value_replacement in PHIOPT should handle even the cases where there are other PHIs even with non equal value
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 25 Jan 2012 00:58:45 +0000
- Subject: [Bug tree-optimization/51988] value_replacement in PHIOPT should handle even the cases where there are other PHIs even with non equal value
- Auto-submitted: auto-generated
- References: <bug-51988-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51988
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-25 00:58:45 UTC ---
I have a patch which fixes the testcases in comment #3 and comment #5. The
testcase in comment #0 will be fixed with the patch in
http://gcc.gnu.org/ml/gcc-patches/2012-01/msg01195.html and this new patch.
Here is a testcase which still cannot be done with the other patch:
int g(int,int);
int f(int t, int c)
{
int d = 0;
int e = 0;
if (t)
{
d = t;
if (c) e = 3;
}
else d = 0, e = 0;
return g(d,e);
}
--- CUT ---
I am going to submit the current patch after testing and leave this bug report
open for the above testcase (since the first one is fixed as the patch I
reference here is approved).