diff options
author | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-03-30 23:07:27 +0000 |
---|---|---|
committer | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-03-30 23:07:27 +0000 |
commit | 6cd6518b9d7be041560b1fb5c168e2d8c2a9beeb (patch) | |
tree | dbb11f2059db5f960133c611cbd811745b901d63 /gcc/dojump.c | |
parent | 13c8708f8c51a5a7e051b3d14d1e9b52fe4e7b9e (diff) | |
download | gcc-6cd6518b9d7be041560b1fb5c168e2d8c2a9beeb.tar.gz |
* dojump.c (do_jump): Copy SUBREGs into a pseudo for comparison.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65060 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dojump.c')
-rw-r--r-- | gcc/dojump.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/dojump.c b/gcc/dojump.c index 14fed968f32..6921d2b72be 100644 --- a/gcc/dojump.c +++ b/gcc/dojump.c @@ -588,10 +588,15 @@ do_jump (exp, if_false_label, if_true_label) /* Note swapping the labels gives us not-equal. */ do_jump_by_parts_equality_rtx (temp, if_true_label, if_false_label); else if (GET_MODE (temp) != VOIDmode) - do_compare_rtx_and_jump (temp, CONST0_RTX (GET_MODE (temp)), - NE, TREE_UNSIGNED (TREE_TYPE (exp)), - GET_MODE (temp), NULL_RTX, - if_false_label, if_true_label); + { + /* The RTL optimizers prefer comparisons against pseudos. */ + if (GET_CODE (temp) == SUBREG) + temp = copy_to_reg (temp); + do_compare_rtx_and_jump (temp, CONST0_RTX (GET_MODE (temp)), + NE, TREE_UNSIGNED (TREE_TYPE (exp)), + GET_MODE (temp), NULL_RTX, + if_false_label, if_true_label); + } else abort (); } |