aboutsummaryrefslogtreecommitdiff
path: root/gcc/ssa.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ssa.c')
-rw-r--r--gcc/ssa.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/gcc/ssa.c b/gcc/ssa.c
index 835bf55..b81a8ac 100644
--- a/gcc/ssa.c
+++ b/gcc/ssa.c
@@ -916,18 +916,26 @@ rename_insn_1 (ptr, data)
}
case REG:
- if (CONVERT_REGISTER_TO_SSA_P (REGNO (x)) &&
- REGNO (x) < ssa_max_reg_num)
+ if (CONVERT_REGISTER_TO_SSA_P (REGNO (x))
+ && REGNO (x) < ssa_max_reg_num)
{
rtx new_reg = ssa_rename_to_lookup (x);
- if (new_reg != NULL_RTX && new_reg != RENAME_NO_RTX)
+ if (new_reg != RENAME_NO_RTX)
{
- if (GET_MODE (x) != GET_MODE (new_reg))
- abort ();
- *ptr = new_reg;
+ 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));
+ }
}
- /* Else this is a use before a set. Warn? */
}
return -1;