|| find_reg_note (i3, REG_LIBCALL, NULL_RTX))
return 0;
+ /* If I1 or I2 is an argument set insn, and I3 is the actual
+ CALL_INSN using it as argument, never combine the two.
+ This to prevent the elimination of insns that setup a
+ parameter register for a CALL_INSN. */
+ if (GET_CODE (i3) == CALL_INSN
+ && (((temp = single_set (i2))
+ && find_reg_fusage (i3, USE, SET_DEST (temp)))
+ || (i1 && (temp = single_set (i1))
+ && find_reg_fusage (i3, USE, SET_DEST (temp)))))
+ return 0;
+
combine_attempts++;
undobuf.num_undo = previous_num_undos = 0;
In both cases, we must search to see if we can find a previous
use of A and put the death note there. */
- if (reg_referenced_p (XEXP (note, 0), PATTERN (i3)))
+ if (from_insn
+ && GET_CODE (from_insn) == CALL_INSN
+ && find_reg_fusage (from_insn, USE, XEXP (note, 0)))
+ place = from_insn;
+ else if (reg_referenced_p (XEXP (note, 0), PATTERN (i3)))
place = i3;
else if (i2 != 0 && next_nonnote_insn (i2) == i3
&& reg_referenced_p (XEXP (note, 0), PATTERN (i2)))
place = insn;
break;
}
+ else if (GET_CODE (insn) == CALL_INSN
+ && find_reg_fusage (insn, USE, reg))
+ {
+ place = insn;
+ break;
+ }
/* If we found a place to put the link, place it there unless there
is already a link to the same insn as LINK at that point. */