(zero_extendqisi2+4,+5): Add new patterns for combining a SI->QI mode truncate...
authorJim Wilson <wilson@gcc.gnu.org>
Mon, 15 Mar 1993 19:40:34 +0000 (11:40 -0800)
committerJim Wilson <wilson@gcc.gnu.org>
Mon, 15 Mar 1993 19:40:34 +0000 (11:40 -0800)
(zero_extendqisi2+4,+5): Add new patterns for combining
a SI->QI mode truncate with an insn that sets the condition codes.

From-SVN: r3743

gcc/config/sparc/sparc.md

index 5f8afeb5eb3d65bd594df488695fd8f4e109308f..293893db69ec44d91f9f6c5f3c4314a58f00e8c9 100644 (file)
   ""
   "andcc %1,0xff,%0"
   [(set_attr "type" "unary")])
+
+;; Similarly, handle SI->QI mode truncation followed by a compare.
+
+(define_insn ""
+  [(set (reg:CC 0)
+       (compare:CC (subreg:QI (match_operand:SI 0 "register_operand" "r") 0)
+                   (const_int 0)))]
+  ""
+  "andcc %0,0xff,%%g0"
+  [(set_attr "type" "compare")])
+
+(define_insn ""
+  [(set (reg:CC 0)
+       (compare:CC (subreg:QI (match_operand:SI 1 "register_operand" "r") 0)
+                   (const_int 0)))
+   (set (match_operand:QI 0 "register_operand" "=r")
+       (match_dup 1))]
+  ""
+  "andcc %1,0xff,%0"
+  [(set_attr "type" "unary")])
 \f
 ;;- sign extension instructions