This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: 6 GCC regressions, 2 new, with your patch on 2002-07-20T23:26:42Z.
- From: Geoff Keating <geoffk at geoffk dot org>
- To: Richard Henderson <rth at redhat dot com>
- Cc: Jan Hubicka <jh at suse dot cz>, Roger Sayle <roger at eyesopen dot com>, gcc-patches at gcc dot gnu dot org, gcc-regression at gcc dot gnu dot org
- Date: 24 Jul 2002 16:48:32 -0700
- Subject: Re: 6 GCC regressions, 2 new, with your patch on 2002-07-20T23:26:42Z.
- References: <200207210301.g6L31ih19173@maat.sfbay.redhat.com><Pine.LNX.4.33.0207202158420.21322-100000@www.eyesopen.com><20020721193843.GD22786@atrey.karlin.mff.cuni.cz><20020724164042.B26512@redhat.com>
Richard Henderson <rth@redhat.com> writes:
> On Sun, Jul 21, 2002 at 09:38:43PM +0200, Jan Hubicka wrote:
> > This is really interesting case. The beggining of function contains:
> > (insn 4 3 6 0 (nil) (set (reg:SI 62)
> > (mem/f:SI (plus:SI (reg/f:SI 16 argp)
> > (const_int 4 [0x4])) [4 y+0 S4 A32])) 45 {*movsi_1}
> > (nil)
> > (expr_list:REG_EQUIV (mem/f:SI (plus:SI (reg/f:SI 16 argp)
> > (const_int 4 [0x4])) [4 y+0 S4 A32])
> > (nil)))
> >
> > And later also:
> >
> > (insn 12 6 21 0 0x401a3a80 (set (reg/v/f:SI 64)
> > (mem/f:SI (plus:SI (reg/f:SI 16 argp)
> > (const_int 4 [0x4])) [4 S4 A8])) 45 {*movsi_1} (nil)
> > (nil))
> >
> > cselib notices the equivalence and cprop actually does the replacement
> > of reg 64 by reg 62. But the REG_EQUIV note is not really valid, as the
> > value of memory copy y is not valid during the function (overwriten by
> > bar call).
>
> Your reasoning is incorrect. REG_EQUIV is a _local_ equivalence,
> free to be killed at any moment. REG_EQUAL is the global equivalence.
It's the other way around. rtl.h says:
/* Like REG_EQUIV except that the destination is only momentarily equal
to the specified rtx. Therefore, it cannot be used for substitution;
but it can be used for cse. */
REG_EQUAL,
Thus, it looks like the right thing for this problem is to generate a
REG_EQUAL note instead of a REG_EQUIV.
--
- Geoffrey Keating <geoffk@geoffk.org> <geoffk@redhat.com>