diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2000-08-30 21:49:07 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2000-08-30 21:49:07 +0000 |
commit | b23ca15651eeb3c463e6789541d19955ed7daa5b (patch) | |
tree | 301fecc37627cd6acfab9f9f57679d6556d4dd38 /gcc | |
parent | 8c81504d8da44a87da614eeb5a34e05f168fe692 (diff) | |
download | gcc-b23ca15651eeb3c463e6789541d19955ed7daa5b.zip gcc-b23ca15651eeb3c463e6789541d19955ed7daa5b.tar.gz gcc-b23ca15651eeb3c463e6789541d19955ed7daa5b.tar.bz2 |
sh.md (cmpeqsi_ior_t, [...]): New insns.
* config/sh/sh.md (cmpeqsi_ior_t, cmpeqsi_and_t): New insns.
(cmpeqdi_t splitter): Use cmpeqsi_and_t instead of emitting jumps
and labels.
From-SVN: r36072
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/sh/sh.md | 33 |
2 files changed, 33 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0413714..2fff758 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2000-08-30 Alexandre Oliva <aoliva@redhat.com> + + * config/sh/sh.md (cmpeqsi_ior_t, cmpeqsi_and_t): New insns. + (cmpeqdi_t splitter): Use cmpeqsi_and_t instead of emitting jumps + and labels. + 2000-08-30 J. David Anglin <dave@hiauly1.hia.nrc.ca> * fixinc/gnu-regex.c: Don't define `const'. diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md index 051acb8..fc30684 100644 --- a/gcc/config/sh/sh.md +++ b/gcc/config/sh/sh.md @@ -558,6 +558,30 @@ cmp/eq %1,%0 cmp/eq %1,%0") +(define_insn "cmpeqsi_ior_t" + [(set (reg:SI 18) + (ior:SI (reg:SI 18) + (eq:SI (match_operand:SI 0 "arith_reg_operand" "r,z,r") + (match_operand:SI 1 "arith_operand" "N,rI,r"))))] + "" + "@ + bt .+4\;tst %0,%0 + bt .+4\;cmp/eq %1,%0 + bt .+4\;cmp/eq %1,%0" + [(set_attr "length" "4")]) + +(define_insn "cmpeqsi_and_t" + [(set (reg:SI 18) + (and:SI (reg:SI 18) + (eq:SI (match_operand:SI 0 "arith_reg_operand" "r,z,r") + (match_operand:SI 1 "arith_operand" "N,rI,r"))))] + "" + "@ + bf .+4\;tst %0,%0 + bf .+4\;cmp/eq %1,%0 + bf .+4\;cmp/eq %1,%0" + [(set_attr "length" "4")]) + (define_insn "cmpgtsi_t" [(set (reg:SI 18) (gt:SI (match_operand:SI 0 "arith_reg_operand" "r,r") (match_operand:SI 1 "arith_reg_or_0_operand" "r,N")))] @@ -636,11 +660,9 @@ (match_operand:DI 1 "arith_reg_or_0_operand" "N,r")))] "reload_completed" [(set (reg:SI 18) (eq:SI (match_dup 2) (match_dup 3))) - (set (pc) (if_then_else (eq (reg:SI 18) (const_int 0)) - (label_ref (match_dup 6)) - (pc))) - (set (reg:SI 18) (eq:SI (match_dup 4) (match_dup 5))) - (match_dup 6)] + (set (reg:SI 18) + (and:SI (reg:SI 18) + (eq:SI (match_dup 4) (match_dup 5))))] " { operands[2] @@ -654,7 +676,6 @@ + (TARGET_LITTLE_ENDIAN ? 1 : 0))); operands[4] = gen_lowpart (SImode, operands[0]); operands[5] = gen_lowpart (SImode, operands[1]); - operands[6] = gen_label_rtx (); }") (define_insn "cmpgtdi_t" |