2004-03-04 Eric Botcazou <ebotcazou@libertysurf.fr>
PR optimization/14235
- * expr.c (expand_expr_real) <NOP_EXPR>: Return a new
- pseudo when converting from a sub-word source to a
- larger-than-word register which conflicts with the source.
+ * expr.c (convert_move): Copy the source to a new pseudo
+ when converting from a sub-word source to a larger-than-word
+ register which conflicts with the source.
2004-04-29 Jakub Jelinek <jakub@redhat.com>
!= CODE_FOR_nothing))
{
if (GET_CODE (to) == REG)
- emit_insn (gen_rtx_CLOBBER (VOIDmode, to));
+ {
+ if (reg_overlap_mentioned_p (to, from))
+ from = force_reg (from_mode, from);
+ emit_insn (gen_rtx_CLOBBER (VOIDmode, to));
+ }
convert_move (gen_lowpart (word_mode, to), from, unsignedp);
emit_unop_insn (code, to,
gen_lowpart (word_mode, to), equiv_code);
return
convert_to_mode (mode, op0,
TREE_UNSIGNED (TREE_TYPE (TREE_OPERAND (exp, 0))));
-
- /* Check if convert_move may do the conversion by using a low-part,
- after clobbering the whole target which is known to conflict with
- the source. In this case, play safe and make a new pseudo. */
- if (GET_CODE (target) == REG
- && GET_MODE_BITSIZE (GET_MODE (op0)) < BITS_PER_WORD
- && GET_MODE_BITSIZE (mode) > BITS_PER_WORD
- && ! safe_from_p (target, TREE_OPERAND (exp, 0), 1))
- target = gen_reg_rtx (mode);
-
- convert_move (target, op0,
- TREE_UNSIGNED (TREE_TYPE (TREE_OPERAND (exp, 0))));
+ else
+ convert_move (target, op0,
+ TREE_UNSIGNED (TREE_TYPE (TREE_OPERAND (exp, 0))));
return target;
case VIEW_CONVERT_EXPR: