diff options
author | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-29 18:56:42 +0000 |
---|---|---|
committer | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-29 18:56:42 +0000 |
commit | 2b9a6d9913ae17b4a48134a5b46490ee03c465b7 (patch) | |
tree | ede8c51afa2191a92daaf65e1c9b4fbb403a971e /gcc | |
parent | 39d9b1ba81ed017afbc5f2728c49c5dd02f1eaf0 (diff) | |
download | gcc-2b9a6d9913ae17b4a48134a5b46490ee03c465b7.tar.gz |
* ifcvt.c (noce_emit_move_insn): Construct a SET pattern directly
if the RHS isn't suitable for calling emit_move_insn.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100329 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/ifcvt.c | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bb4a382cf5a..33df7c513db 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 9575e62b2f1..5c822b64d95 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(); |