Commit f745c7a2 by Alasdair Baird Committed by Jeff Law

recog.c (validate_replace_rtx_1): Only perform substitutions of arguments to…

recog.c (validate_replace_rtx_1): Only perform substitutions of arguments to commutative and comparison operators...

        * recog.c (validate_replace_rtx_1): Only perform substitutions
        of arguments to commutative and comparison operators once.

From-SVN: r17482
parent 6a093053
Sun Jan 25 22:00:25 1998 Alasdair Baird <alasdair@wildcat.demon.co.uk>
* recog.c (validate_replace_rtx_1): Only perform substitutions
of arguments to commutative and comparison operators once.
Sun Jan 25 12:30:18 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* sparc.c (output_cbranch): Add default case in
......
......@@ -510,14 +510,19 @@ validate_replace_rtx_1 (loc, from, to, object)
break;
}
fmt = GET_RTX_FORMAT (code);
for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
/* For commutative or comparison operations we've already performed
replacements. Don't try to perform them again. */
if (GET_RTX_CLASS (code) != '<' && GET_RTX_CLASS (code) != 'c')
{
if (fmt[i] == 'e')
validate_replace_rtx_1 (&XEXP (x, i), from, to, object);
else if (fmt[i] == 'E')
for (j = XVECLEN (x, i) - 1; j >= 0; j--)
validate_replace_rtx_1 (&XVECEXP (x, i, j), from, to, object);
fmt = GET_RTX_FORMAT (code);
for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
{
if (fmt[i] == 'e')
validate_replace_rtx_1 (&XEXP (x, i), from, to, object);
else if (fmt[i] == 'E')
for (j = XVECLEN (x, i) - 1; j >= 0; j--)
validate_replace_rtx_1 (&XVECEXP (x, i, j), from, to, object);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment