diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 09e625a15ff..58952cdebd0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2006-03-28 Roger Sayle + + * expr.c (emit_group_store): Only create a new pseudo reg if the + quantity it needs to hold isn't already a suitable pseudo. + 2006-03-28 Jeff Law * timevar.def (TV_TREE_PHI_CPROP): New timevar. diff --git a/gcc/expr.c b/gcc/expr.c index 2d5c359e139..f579e27c865 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -1890,8 +1890,13 @@ emit_group_store (rtx orig_dst, rtx src, tree type ATTRIBUTE_UNUSED, int ssize) for (i = start; i < XVECLEN (src, 0); i++) { rtx reg = XEXP (XVECEXP (src, 0, i), 0); - tmps[i] = gen_reg_rtx (GET_MODE (reg)); - emit_move_insn (tmps[i], reg); + if (!REG_P (reg) || REGNO (reg) < FIRST_PSEUDO_REGISTER) + { + tmps[i] = gen_reg_rtx (GET_MODE (reg)); + emit_move_insn (tmps[i], reg); + } + else + tmps[i] = reg; } /* If we won't be storing directly into memory, protect the real destination @@ -1918,7 +1923,8 @@ emit_group_store (rtx orig_dst, rtx src, tree type ATTRIBUTE_UNUSED, int ssize) } else if (!MEM_P (dst) && GET_CODE (dst) != CONCAT) { - dst = gen_reg_rtx (GET_MODE (orig_dst)); + if (!REG_P (dst) || REGNO (dst) < FIRST_PSEUDO_REGISTER) + dst = gen_reg_rtx (GET_MODE (orig_dst)); /* Make life a bit easier for combine. */ emit_move_insn (dst, CONST0_RTX (GET_MODE (orig_dst))); }