aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-07-05 19:12:04 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1994-07-05 19:12:04 -0400
commitcd5e8f1fc2a2a1934591a15b27005821886db768 (patch)
tree83e352d12562276891e4db0bdba05b61133fdd56
parent325877e17758607740ed3d112050a19c6ee9b38a (diff)
downloadgcc-cd5e8f1fc2a2a1934591a15b27005821886db768.zip
gcc-cd5e8f1fc2a2a1934591a15b27005821886db768.tar.gz
gcc-cd5e8f1fc2a2a1934591a15b27005821886db768.tar.bz2
(can_combine_p): Don't check for replacing arg of function here.
(can_combine_p): Do it here. From-SVN: r7657
-rw-r--r--gcc/combine.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index 0cd1ee8..9e929ed 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -878,6 +878,8 @@ can_combine_p (insn, i3, pred, succ, pdest, psrc)
|| (rtx_equal_p (src, dest) && find_reg_note (insn, REG_EQUAL, NULL_RTX))
/* Can't merge a function call. */
|| GET_CODE (src) == CALL
+ /* Don't eliminate a function call argument. */
+ || (GET_CODE (i3) == CALL_INSN && find_reg_fusage (i3, USE, dest))
/* Don't substitute into an incremented register. */
|| FIND_REG_INC_NOTE (i3, dest)
|| (succ && FIND_REG_INC_NOTE (succ, dest))
@@ -1218,17 +1220,6 @@ try_combine (i3, i2, i1)
|| 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;