+2004-12-12 Richard Henderson <rth@redhat.com>
+
+ PR rtl-opt/17186
+ * reg-stack.c (move_for_stack_reg): Handle source register not
+ live with a nan.
+
2004-12-12 Richard Henderson <rth@redhat.com>
PR target/18932
if (regstack->reg[i] == REGNO (src))
break;
- /* The source must be live, and the dest must be dead. */
- if (i < 0 || get_hard_regnum (regstack, dest) >= FIRST_STACK_REG)
+ /* The destination must be dead, or life analysis is borked. */
+ if (get_hard_regnum (regstack, dest) >= FIRST_STACK_REG)
abort ();
+ /* If the source is not live, this is yet another case of
+ uninitialized variables. Load up a NaN instead. */
+ if (i < 0)
+ {
+ PATTERN (insn) = pat
+ = gen_rtx_SET (VOIDmode,
+ FP_MODE_REG (REGNO (dest), SFmode), nan);
+ INSN_CODE (insn) = -1;
+ return move_for_stack_reg (insn, regstack, pat);
+ }
+
/* It is possible that the dest is unused after this insn.
If so, just pop the src. */