}
src_class = reg_preferred_class (REGNO (src));
dst_class = reg_preferred_class (REGNO (dst));
- if (! regclass_compatible_p (src_class, dst_class))
+
+ if (! (src_note = find_reg_note (insn, REG_DEAD, src)))
{
- if (!copy_src)
- {
- copy_src = src;
- copy_dst = dst;
- }
+ /* We used to force the copy here like in other cases, but
+ it produces worse code, as it eliminates no copy
+ instructions and the copy emitted will be produced by
+ reload anyway. On patterns with multiple alternatives,
+ there may be better sollution availble.
+
+ In particular this change produced slower code for numeric
+ i387 programs. */
+
continue;
}
- /* Can not modify an earlier insn to set dst if this insn
- uses an old value in the source. */
- if (reg_overlap_mentioned_p (dst, SET_SRC (set)))
+ if (! regclass_compatible_p (src_class, dst_class))
{
if (!copy_src)
{
continue;
}
- if (! (src_note = find_reg_note (insn, REG_DEAD, src)))
+ /* Can not modify an earlier insn to set dst if this insn
+ uses an old value in the source. */
+ if (reg_overlap_mentioned_p (dst, SET_SRC (set)))
{
if (!copy_src)
{
continue;
}
-
/* If src is set once in a different basic block,
and is set equal to a constant, then do not use
it for this optimization, as this would make it