This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: CSE bug (gcc.c-torture/execute/980605-1.c)
- To: carlo at runaway dot xs4all dot nl
- Subject: Re: CSE bug (gcc.c-torture/execute/980605-1.c)
- From: "David S. Miller" <davem at dm dot cobaltmicro dot com>
- Date: Mon, 6 Jul 1998 09:07:00 -0700
- CC: egcs at cygnus dot com, law at cygnus dot com
- References: <199807061449.QAA00051@jolan.ppro>
From: Carlo Wood <carlo@runaway.xs4all.nl>
Date: Mon, 6 Jul 1998 16:49:04 +0200 (CEST)
I have investigating the same bug for a few days, and I think I
have evidence that this patch can't be correct.
This is a preliminary post, I am not done with my research at all.
But I thought it would be better to tell you that I am working on
this too - and that I'd like to do a little more research before
Davids patch is added :).
Don't fear, Jeff wrote a more complete fix and checked it in last
night. But I believe you are looking at a different bug.
However I want to mention that I think fundamentally the problem
exposed with this CSE bug still exists generically, even with Jeff's
fix. I do not believe that everyone in the compiler who rewrites
insns within' a libcall block properly update the REG_EQUAL notes at
the end. I could argue that every call to validate_change() should
check for this situation, but even then all possible cases won't be
handled.
Jeff, when I showed my version of the patch to a few people I was
cautioned that I might have broken the SH target because it does very
strange things with libcalls. Did you check to see if your version of
the changes have this effect? Essentially I believe they make a
multiply or some other insn which clobbers a lot of hard registers
look like a libcall so that CSE can still occur in their presence.
Later,
David S. Miller
davem@dm.cobaltmicro.com