diff options
author | Kazu Hirata <kazu@cs.umass.edu> | 2003-07-10 06:18:30 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2003-07-10 06:18:30 +0000 |
commit | ae12c66624e663d6a142882adc32fdb630dfd3fb (patch) | |
tree | 4e5459327ecb7d80abeb2609db2f76599557ecc9 | |
parent | f9d232c3cb51b6a4206ab161cbd194d34fbd0daf (diff) | |
download | gcc-ae12c66624e663d6a142882adc32fdb630dfd3fb.zip gcc-ae12c66624e663d6a142882adc32fdb630dfd3fb.tar.gz gcc-ae12c66624e663d6a142882adc32fdb630dfd3fb.tar.bz2 |
* config/h8300/h8300.md (a peephole2): New.
From-SVN: r69176
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/config/h8300/h8300.md | 30 |
2 files changed, 34 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8080d88..87db20a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2003-07-10 Kazu Hirata <kazu@cs.umass.edu> + + * config/h8300/h8300.md (a peephole2): New. + 2003-07-10 Alexandre Oliva <aoliva@redhat.com> 2001-12-13 Alexandre Oliva <aoliva@redhat.com> diff --git a/gcc/config/h8300/h8300.md b/gcc/config/h8300/h8300.md index 4ae445c..8fe7450 100644 --- a/gcc/config/h8300/h8300.md +++ b/gcc/config/h8300/h8300.md @@ -4120,6 +4120,8 @@ ;; ;; dead 0xffffff?? except -1 and -2 eq/ne xor.b and not.l ;; dead 0xffff??ff eq/ne xor.b and not.l +;; dead 0x40000000 (H8S) eq/ne rotl.l and dec.l +;; dead 0x80000000 eq/ne rotl.l and dec.l ;; ;; live 1 geu/ltu copy and shar.l ;; live 3 (H8S) geu/ltu copy and shar.l @@ -4248,6 +4250,34 @@ (pc)))] "operands[4] = GEN_INT (INTVAL (operands[1]) ^ -1);") +(define_peephole2 + [(set (cc0) + (compare (match_operand:SI 0 "register_operand" "") + (match_operand:SI 1 "const_int_operand" ""))) + (set (pc) + (if_then_else (match_operator 3 "eqne_operator" + [(cc0) (const_int 0)]) + (label_ref (match_operand 2 "" "")) + (pc)))] + "(TARGET_H8300H || TARGET_H8300S) + && peep2_reg_dead_p (1, operands[0]) + && (INTVAL (operands[1]) == -2147483648 + || (TARGET_H8300S && INTVAL (operands[1]) == 1073741824))" + [(set (match_dup 0) + (rotate:SI (match_dup 0) + (match_dup 4))) + (set (match_dup 0) + (unspec:SI [(match_dup 0) + (const_int -1)] + UNSPEC_INCDEC)) + (set (cc0) + (match_dup 0)) + (set (pc) + (if_then_else (match_op_dup 3 [(cc0) (const_int 0)]) + (label_ref (match_dup 2)) + (pc)))] + "operands[4] = GEN_INT (INTVAL (operands[1]) == -2147483648 ? 1 : 2);") + ;; Transform ;; ;; cmp.l #1,er0 |