r190925 - Add support for poly16 vtst and vtstq

Amaury de la Vieuville amaury.dlv at gmail.com
Wed Sep 18 01:33:53 PDT 2013


Author: amaury.dlv
Date: Wed Sep 18 03:33:53 2013
New Revision: 190925

URL: http://llvm.org/viewvc/llvm-project?rev=190925&view=rev
Log:
Add support for poly16 vtst and vtstq

vtst and vtstq currently support poly8 types, but they should also work on
poly16.

Modified:
    cfe/trunk/include/clang/Basic/arm_neon.td
    cfe/trunk/test/CodeGen/aarch64-neon-intrinsics.c
    cfe/trunk/test/CodeGen/arm_neon_intrinsics.c

Modified: cfe/trunk/include/clang/Basic/arm_neon.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/arm_neon.td?rev=190925&r1=190924&r2=190925&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/arm_neon.td (original)
+++ cfe/trunk/include/clang/Basic/arm_neon.td Wed Sep 18 03:33:53 2013
@@ -232,7 +232,7 @@ let InstName = "vacgt" in {
 def VCAGT : IInst<"vcagt", "udd", "fQf">;
 def VCALT : IInst<"vcalt", "udd", "fQf">;
 }
-def VTST  : WInst<"vtst", "udd", "csiUcUsUiPcQcQsQiQUcQUsQUiQPc">;
+def VTST  : WInst<"vtst", "udd", "csiUcUsUiPcPsQcQsQiQUcQUsQUiQPcQPs">;
 
 ////////////////////////////////////////////////////////////////////////////////
 // E.3.5 Absolute Difference
@@ -539,7 +539,7 @@ def FCAGT : IInst<"vcagt", "udd", "fQfQd
 def FCALE : IInst<"vcale", "udd", "fQfQd">;
 def FCALT : IInst<"vcalt", "udd", "fQfQd">;
 // With additional Ql, QUl, Qd types.
-def CMTST  : WInst<"vtst", "udd", "csiUcUsUiPcQcQsQiQlQUcQUsQUiQUlQPc">;
+def CMTST  : WInst<"vtst", "udd", "csiUcUsUiPcPsQcQsQiQlQUcQUsQUiQUlQPcQPs">;
 def CFMEQ  : SOpInst<"vceq", "udd",
                   "csifUcUsUiPcQcQsQiQlQfQUcQUsQUiQUlQPcQd", OP_EQ>;
 def CFMGE  : SOpInst<"vcge", "udd", "csifUcUsUiQcQsQiQlQfQUcQUsQUiQUlQd", OP_GE>;

Modified: cfe/trunk/test/CodeGen/aarch64-neon-intrinsics.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/aarch64-neon-intrinsics.c?rev=190925&r1=190924&r2=190925&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/aarch64-neon-intrinsics.c (original)
+++ cfe/trunk/test/CodeGen/aarch64-neon-intrinsics.c Wed Sep 18 03:33:53 2013
@@ -1095,12 +1095,24 @@ uint8x8_t test_vtst_p8(poly8x8_t v1, pol
   // CHECK: cmtst {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
 }
 
+uint16x4_t test_vtst_p16(poly16x4_t v1, poly16x4_t v2) {
+   // CHECK: test_vtst_p16
+  return vtst_p16(v1, v2);
+  // CHECK: cmtst {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
+}
+
 uint8x16_t test_vtstq_p8(poly8x16_t v1, poly8x16_t v2) {
    // CHECK: test_vtstq_p8
   return vtstq_p8(v1, v2);
   // CHECK: cmtst {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
 }
 
+uint16x8_t test_vtstq_p16(poly16x8_t v1, poly16x8_t v2) {
+   // CHECK: test_vtstq_p16
+  return vtstq_p16(v1, v2);
+  // CHECK: cmtst {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
+}
+
 
 uint8x8_t test_vceq_s8(int8x8_t v1, int8x8_t v2) {
   // CHECK: test_vceq_s8

Modified: cfe/trunk/test/CodeGen/arm_neon_intrinsics.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/arm_neon_intrinsics.c?rev=190925&r1=190924&r2=190925&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/arm_neon_intrinsics.c (original)
+++ cfe/trunk/test/CodeGen/arm_neon_intrinsics.c Wed Sep 18 03:33:53 2013
@@ -11361,6 +11361,12 @@ uint8x8_t test_vtst_p8(poly8x8_t a, poly
   return vtst_p8(a, b);
 }
 
+// CHECK: test_vtst_p16
+// CHECK: vtst.16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
+uint16x4_t test_vtst_p16(poly16x4_t a, poly16x4_t b) {
+  return vtst_p16(a, b);
+}
+
 // CHECK: test_vtstq_s8
 // CHECK: vtst.8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
 uint8x16_t test_vtstq_s8(int8x16_t a, int8x16_t b) {
@@ -11403,6 +11409,12 @@ uint8x16_t test_vtstq_p8(poly8x16_t a, p
   return vtstq_p8(a, b);
 }
 
+// CHECK: test_vtstq_p16
+// CHECK: vtst.16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
+uint16x8_t test_vtstq_p16(poly16x8_t a, poly16x8_t b) {
+  return vtstq_p16(a, b);
+}
+
 
 // CHECK: test_vuzp_s8
 // CHECK: vuzp.8 d{{[0-9]+}}, d{{[0-9]+}}





More information about the cfe-commits mailing list