aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/i960/i960.md
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1994-06-28 10:41:52 -0700
committerJim Wilson <wilson@gcc.gnu.org>1994-06-28 10:41:52 -0700
commit3c9b21309942ec8b66c000356452f4d0f2e7a610 (patch)
tree3182a8cb20f637e1ba8c63f7b4be137d5412d941 /gcc/config/i960/i960.md
parent3bbbf89c84217eb443e20347c635a73c58ce99fc (diff)
downloadgcc-3c9b21309942ec8b66c000356452f4d0f2e7a610.zip
gcc-3c9b21309942ec8b66c000356452f4d0f2e7a610.tar.gz
gcc-3c9b21309942ec8b66c000356452f4d0f2e7a610.tar.bz2
(andsi3+6): Replace bad clrbit pattern with two working ones.
From-SVN: r7585
Diffstat (limited to 'gcc/config/i960/i960.md')
-rw-r--r--gcc/config/i960/i960.md15
1 files changed, 13 insertions, 2 deletions
diff --git a/gcc/config/i960/i960.md b/gcc/config/i960/i960.md
index dd52829..5a93cfe 100644
--- a/gcc/config/i960/i960.md
+++ b/gcc/config/i960/i960.md
@@ -1657,14 +1657,25 @@
return \"clrbit %2,%1,%0\";
}")
+;; (not (ashift 1 reg)) canonicalizes to (rotate -2 reg)
(define_insn ""
[(set (match_operand:SI 0 "register_operand" "=d")
- (and:SI (ashift:SI (const_int 1)
+ (and:SI (rotate:SI (const_int -2)
(match_operand:SI 1 "register_operand" "d"))
- (match_operand:SI 2 "arith_operand" "dI")))]
+ (match_operand:SI 2 "register_operand" "d")))]
""
"clrbit %1,%2,%0")
+;; The above pattern canonicalizes to this when both the input and output
+;; are the same pseudo-register.
+(define_insn ""
+ [(set (zero_extract:SI (match_operand:SI 0 "register_operand" "=d")
+ (const_int 1)
+ (match_operand:SI 1 "register_operand" "d"))
+ (const_int 0))]
+ ""
+ "clrbit %1,%0,%0")
+
(define_insn ""
[(set (match_operand:SI 0 "register_operand" "=d")
(xor:SI (match_operand:SI 1 "arith_operand" "dI")