predicates.md (zero_operand, [...]): New predicates.
authorRichard Earnshaw <rearnsha@arm.com>
Tue, 20 Mar 2012 14:11:05 +0000 (14:11 +0000)
committerRichard Earnshaw <rearnsha@gcc.gnu.org>
Tue, 20 Mar 2012 14:11:05 +0000 (14:11 +0000)
* arm/predicates.md (zero_operand, reg_or_zero_operand): New predicates.
* arm/neon.md (neon_vceq<mode>, neon_vcge<mode>): Use
reg_or_zero_operand predicate.
(neon_vcle<mode>, neon_vclt<mode>): Use zero_operand predicate.

From-SVN: r185573

gcc/ChangeLog
gcc/config/arm/neon.md
gcc/config/arm/predicates.md

index d2dcbe51257e02b5eab0eca000378d6c0f2ef479..0269a511aa00ec26b60542dc5934aa75375173f8 100644 (file)
@@ -1,3 +1,10 @@
+2012-03-20  Richard Earnshaw  <rearnsha@arm.com>
+
+       * arm/predicates.md (zero_operand, reg_or_zero_operand): New predicates.
+       * arm/neon.md (neon_vceq<mode>, neon_vcge<mode>): Use
+       reg_or_zero_operand predicate.
+       (neon_vcle<mode>, neon_vclt<mode>): Use zero_operand predicate.
+
 2012-03-20  Jakub Jelinek  <jakub@redhat.com>
 
        * config/i386/i386.c (ix86_decompose_address) <case ZERO_EXTEND>:
index 078a8fd47eead762ceee2ebd8ffc1c48ffe79749..44dee53b08e6371d77946f69a37275f46a578234 100644 (file)
   [(set (match_operand:<V_cmp_result> 0 "s_register_operand" "=w,w")
         (unspec:<V_cmp_result>
          [(match_operand:VDQW 1 "s_register_operand" "w,w")
-          (match_operand:VDQW 2 "nonmemory_operand" "w,Dz")
+          (match_operand:VDQW 2 "reg_or_zero_operand" "w,Dz")
           (match_operand:SI 3 "immediate_operand" "i,i")]
           UNSPEC_VCEQ))]
   "TARGET_NEON"
   [(set (match_operand:<V_cmp_result> 0 "s_register_operand" "=w,w")
         (unspec:<V_cmp_result>
          [(match_operand:VDQW 1 "s_register_operand" "w,w")
-          (match_operand:VDQW 2 "nonmemory_operand" "w,Dz")
+          (match_operand:VDQW 2 "reg_or_zero_operand" "w,Dz")
           (match_operand:SI 3 "immediate_operand" "i,i")]
           UNSPEC_VCGE))]
   "TARGET_NEON"
   [(set (match_operand:<V_cmp_result> 0 "s_register_operand" "=w,w")
         (unspec:<V_cmp_result>
          [(match_operand:VDQW 1 "s_register_operand" "w,w")
-          (match_operand:VDQW 2 "nonmemory_operand" "w,Dz")
+          (match_operand:VDQW 2 "reg_or_zero_operand" "w,Dz")
            (match_operand:SI 3 "immediate_operand" "i,i")]
           UNSPEC_VCGT))]
   "TARGET_NEON"
   [(set (match_operand:<V_cmp_result> 0 "s_register_operand" "=w")
         (unspec:<V_cmp_result>
          [(match_operand:VDQW 1 "s_register_operand" "w")
-          (match_operand:VDQW 2 "nonmemory_operand" "Dz")
+          (match_operand:VDQW 2 "zero_operand" "Dz")
           (match_operand:SI 3 "immediate_operand" "i")]
           UNSPEC_VCLE))]
   "TARGET_NEON"
   [(set (match_operand:<V_cmp_result> 0 "s_register_operand" "=w")
         (unspec:<V_cmp_result>
          [(match_operand:VDQW 1 "s_register_operand" "w")
-          (match_operand:VDQW 2 "nonmemory_operand" "Dz")
+          (match_operand:VDQW 2 "zero_operand" "Dz")
           (match_operand:SI 3 "immediate_operand" "i")]
           UNSPEC_VCLT))]
   "TARGET_NEON"
index dea3a96368e29f9342fc771f0f22f4f84b6817e7..9171d7377fe1db35df58ca9b8b2b77970484a8b2 100644 (file)
                  && REGNO_REG_CLASS (REGNO (op)) == VFP_REGS)));
 })
 
+(define_predicate "zero_operand"
+  (and (match_code "const_int,const_double,const_vector")
+       (match_test "op == CONST0_RTX (mode)")))
+
+;; Match a register, or zero in the appropriate mode.
+(define_predicate "reg_or_zero_operand"
+  (ior (match_operand 0 "s_register_operand")
+       (match_operand 0 "zero_operand")))
+
 (define_special_predicate "subreg_lowpart_operator"
   (and (match_code "subreg")
        (match_test "subreg_lowpart_p (op)")))