Add three special-cases of CMP insns against zero.
authorRichard Kenner <kenner@gcc.gnu.org>
Mon, 1 Mar 1993 12:29:39 +0000 (07:29 -0500)
committerRichard Kenner <kenner@gcc.gnu.org>
Mon, 1 Mar 1993 12:29:39 +0000 (07:29 -0500)
From-SVN: r3573

gcc/config/alpha/alpha.md

index 849f4042ad8425dbf6ba90afdb32e6e93a9f8968..a9c25865f9567e21411bc982918b157993369203 100644 (file)
   "cmp%C1 %r2,%3,%0"
   [(set_attr "type" "icmp")])
 
+;; There are three important special-case that don't fit the above pattern
+;; but which we want to handle here.
+
+(define_insn ""
+  [(set (match_operand:DI 0 "register_operand" "=r")
+       (ne:DI (match_operand:DI 1 "register_operand" "r")
+              (const_int 0)))]
+  ""
+  "cmpult $31,%1,%0"
+  [(set_attr "type" "icmp")])
+
+(define_insn ""
+  [(set (match_operand:DI 0 "register_operand" "=r")
+       (gt:DI (match_operand:DI 1 "register_operand" "r")
+              (const_int 0)))]
+  ""
+  "cmplt $31,%1,%0"
+  [(set_attr "type" "icmp")])
+
+(define_insn ""
+  [(set (match_operand:DI 0 "register_operand" "=r")
+       (ge:DI (match_operand:DI 1 "register_operand" "r")
+              (const_int 0)))]
+  ""
+  "cmple $31,%1,%0"
+  [(set_attr "type" "icmp")])
+
 (define_insn ""
   [(set (match_operand:DI 0 "register_operand" "=r,r")
        (if_then_else:DI