aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2005-05-29 18:56:42 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2005-05-29 18:56:42 +0000
commitcb275d32f7a80e46acd02ff1b1be6678e42dd292 (patch)
treeede8c51afa2191a92daaf65e1c9b4fbb403a971e /gcc
parent1451cecfe25c7e92a7c6538e00b9a8314b1c4c85 (diff)
downloadgcc-cb275d32f7a80e46acd02ff1b1be6678e42dd292.zip
gcc-cb275d32f7a80e46acd02ff1b1be6678e42dd292.tar.gz
gcc-cb275d32f7a80e46acd02ff1b1be6678e42dd292.tar.bz2
ifcvt.c (noce_emit_move_insn): Construct a SET pattern directly if the RHS isn't suitable for calling...
* ifcvt.c (noce_emit_move_insn): Construct a SET pattern directly if the RHS isn't suitable for calling emit_move_insn. Co-Authored-By: Richard Henderson <rth@redhat.com> From-SVN: r100329
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/ifcvt.c6
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index bb4a382..33df7c5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2005-05-29 Roger Sayle <roger@eyesopen.com>
+ Richard Henderson <rth@redhat.com>
+
+ * ifcvt.c (noce_emit_move_insn): Construct a SET pattern directly
+ if the RHS isn't suitable for calling emit_move_insn.
+
2005-05-29 Kazu Hirata <kazu@cs.umass.edu>
* tree-ssa-ccp.c (ccp_fold): Return immediately after calling
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index 9575e62..5c822b6 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -691,7 +691,11 @@ noce_emit_move_insn (rtx x, rtx y)
optab ot;
start_sequence ();
- insn = emit_move_insn (x, y);
+ /* Check that the SET_SRC is reasonable before calling emit_move_insn,
+ otherwise construct a suitable SET pattern ourselves. */
+ insn = (OBJECT_P (y) || CONSTANT_P (y) || GET_CODE (y) == SUBREG)
+ ? emit_move_insn (x, y)
+ : emit_insn (gen_rtx_SET (VOIDmode, x, y));
seq = get_insns ();
end_sequence();