]> granicus.if.org Git - clang/commitdiff
Add support for poly16 vtst and vtstq
authorAmaury de la Vieuville <amaury.dlv@gmail.com>
Wed, 18 Sep 2013 08:33:53 +0000 (08:33 +0000)
committerAmaury de la Vieuville <amaury.dlv@gmail.com>
Wed, 18 Sep 2013 08:33:53 +0000 (08:33 +0000)
vtst and vtstq currently support poly8 types, but they should also work on
poly16.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190925 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/arm_neon.td
test/CodeGen/aarch64-neon-intrinsics.c
test/CodeGen/arm_neon_intrinsics.c

index ad10abb1c2ba81773dcce01c28903c9cef8ae4b3..088516655e9bbf7290d2806f26329009bf81a32f 100644 (file)
@@ -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>;
index 53ec130184c8befc75e1fe66f47a4f5db35ea302..041f6d7bf67d4ce6d9adbec6f3d713ff313939fe 100644 (file)
@@ -1095,12 +1095,24 @@ uint8x8_t test_vtst_p8(poly8x8_t v1, poly8x8_t v2) {
   // 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
index 0a82a163bacfa0f744dc9f37c9539176cf87c0d1..1d76e8a57546c86d23e1d45c63c038f55cbc9658 100644 (file)
@@ -11361,6 +11361,12 @@ uint8x8_t test_vtst_p8(poly8x8_t a, poly8x8_t b) {
   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, poly8x16_t b) {
   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]+}}