This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/18694] [4.0 regression] loop miscompilation at -O1 (-ftree-ch)
- From: "law at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Dec 2004 20:12:29 -0000
- Subject: [Bug tree-optimization/18694] [4.0 regression] loop miscompilation at -O1 (-ftree-ch)
- References: <20041127224610.18694.falk@debian.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From law at redhat dot com 2004-12-10 20:12 -------
Subject: Re: [4.0 regression] loop
miscompilation at -O1 (-ftree-ch)
On Fri, 2004-12-10 at 19:57 +0000, kazu at cs dot umass dot edu wrote:
> ------- Additional Comments From kazu at cs dot umass dot edu 2004-12-10 19:57 -------
> Subject: Re: [4.0 regression] loop
> miscompilation at -O1 (-ftree-ch)
>
> Hi Jeff,
>
> > > I think so. :-)
> > I don't. :( I think it'll record tmp_1 = next_2, which is actually
> > wrong, even though it doesn't actually cause problems with this
> > testcase.
>
> IMHO, you should really think of it as tmp_1 -> next_2 or "tmp_1 is a
> copy-of next_2". It is a one-way relation, not an equivalence because
> it is not symmetric.
Err, no. You're totally warping how the the equivalency code is meant
to work. It's a symmetric relationship and it's your patch that is
making it asymmetric.
> Let me also think hard to see if I can prove my patch is correct or
> come up with a counterexample. I certainly don't intend to push my
> patch blindly.
Don't bother. The patch is wrong. There's a couple of very simple
ways to fix this problem that I'm evaluating.
Jeff
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18694