diff options
author | dj <dj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-11-12 16:35:03 +0000 |
---|---|---|
committer | dj <dj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-11-12 16:35:03 +0000 |
commit | ad89a1f0d3a8d9d34fdf22e4272e74c1777ed19d (patch) | |
tree | ece9aebff8260ed974540a05a22b91fa32dc6079 /gcc/config/m32c | |
parent | 62e8616aedbc5704f1d33a4be1afe41b67a64a84 (diff) | |
download | gcc-ad89a1f0d3a8d9d34fdf22e4272e74c1777ed19d.tar.gz |
* config/m32c/cond.md (cond_to_int peephole2): Don't eliminate the
insns if the intermediate value will be used later.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@141788 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/m32c')
-rw-r--r-- | gcc/config/m32c/cond.md | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/config/m32c/cond.md b/gcc/config/m32c/cond.md index a01efe9efa9..a64d3cafcc6 100644 --- a/gcc/config/m32c/cond.md +++ b/gcc/config/m32c/cond.md @@ -300,7 +300,9 @@ [(set_attr "flags" "x")] ) -;; A cond_to_int followed by a compare against zero is essentially a no-op. +;; A cond_to_int followed by a compare against zero is essentially a +;; no-op. However, the result of the cond_to_int may be used by later +;; insns, so make sure it's dead before deleting its set. (define_peephole2 [(set (match_operand:HI 0 "mra_qi_operand" "") @@ -313,6 +315,7 @@ (compare (match_operand:HI 1 "mra_qi_operand" "") (const_int 0))) ] - "rtx_equal_p(operands[0], operands[1])" + "rtx_equal_p (operands[0], operands[1]) + && dead_or_set_p (peep2_next_insn (1), operands[0])" [(const_int 1)] "") |