ssa.c (rename_insn_1): Handle RENAME_NO_RTX correctly when handling undefined values.

* ssa.c (rename_insn_1): Handle RENAME_NO_RTX correctly when
        handling undefined values.

From-SVN: r57564
This commit is contained in:
Chris Lattner 2002-09-27 00:50:50 +00:00 committed by Richard Henderson
parent 5fd452e8de
commit cde0ce6e71
2 changed files with 15 additions and 13 deletions

View File

@ -1,3 +1,8 @@
2002-09-26 Chris Lattner <sabre@nondot.org>
* ssa.c (rename_insn_1): Handle RENAME_NO_RTX correctly when
handling undefined values.
2002-09-26 Richard Henderson <rth@redhat.com>
PR opt/7520

View File

@ -924,20 +924,17 @@ rename_insn_1 (ptr, data)
{
rtx new_reg = ssa_rename_to_lookup (x);
if (new_reg != RENAME_NO_RTX)
if (new_reg != RENAME_NO_RTX && new_reg != NULL_RTX)
{
if (new_reg != NULL_RTX)
{
if (GET_MODE (x) != GET_MODE (new_reg))
abort ();
*ptr = new_reg;
}
else
{
/* Undefined value used, rename it to a new pseudo register so
that it cannot conflict with an existing register */
*ptr = gen_reg_rtx (GET_MODE(x));
}
if (GET_MODE (x) != GET_MODE (new_reg))
abort ();
*ptr = new_reg;
}
else
{
/* Undefined value used, rename it to a new pseudo register so
that it cannot conflict with an existing register. */
*ptr = gen_reg_rtx (GET_MODE (x));
}
}
return -1;