This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: small CSE bugfix
Richard Henderson <rth@redhat.com> writes:
> On Tue, Jul 24, 2001 at 12:07:17AM +0400, Denis Chertykov wrote:
> > IMHO: my previous patch was not correct.
> >
> > Better patch.
>
> > ! validate_change (x, &XEXP (x, 0),
> > ! cse_process_notes (XEXP (x, 0), x), 0);
>
> How can this be right? You're ignoring the result of validate_change.
Really I copied this from the end of the `cse_process_notes':
for (i = 0; i < GET_RTX_LENGTH (code); i++)
if (fmt[i] == 'e')
validate_change (object, &XEXP (x, i),
cse_process_notes (XEXP (x, i), object), 0);
return x;
}
I think it's equal to:
{
rtx old = XEXP (x, 0);
XEXP (x, 0) = cse_process_notes (XEXP (x, 0), x);
if (! memory_address_p (GET_MODE (x), x))
XEXP (x, 0) = old;
}
IMHO: it's more safe than old string:
XEXP (x, 0) = cse_process_notes (XEXP (x, 0), x);
Denis.