1 // REQUIRES: aarch64-registered-target
2 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s
3 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -o - %s >/dev/null 2>%t
4 // RUN: FileCheck --check-prefix=ASM --allow-empty %s <%t
5 
6 // If this check fails please read test/CodeGen/aarch64-sve-intrinsics/README for instructions on how to resolve it.
7 // ASM-NOT: warning
8 #include <arm_sve.h>
9 
test_svptest_any(svbool_t pg,svbool_t op)10 bool test_svptest_any(svbool_t pg, svbool_t op)
11 {
12   // CHECK-LABEL: test_svptest_any
13   // CHECK: %[[INTRINSIC:.*]] = call i1 @llvm.aarch64.sve.ptest.any{{(.nxv16i1)?}}(<vscale x 16 x i1> %pg, <vscale x 16 x i1> %op)
14   // CHECK: ret i1 %[[INTRINSIC]]
15   return svptest_any(pg, op);
16 }
17 
test_svptest_first(svbool_t pg,svbool_t op)18 bool test_svptest_first(svbool_t pg, svbool_t op)
19 {
20   // CHECK-LABEL: test_svptest_first
21   // CHECK: %[[INTRINSIC:.*]] = call i1 @llvm.aarch64.sve.ptest.first{{(.nxv16i1)?}}(<vscale x 16 x i1> %pg, <vscale x 16 x i1> %op)
22   // CHECK: ret i1 %[[INTRINSIC]]
23   return svptest_first(pg, op);
24 }
25 
test_svptest_last(svbool_t pg,svbool_t op)26 bool test_svptest_last(svbool_t pg, svbool_t op)
27 {
28   // CHECK-LABEL: test_svptest_last
29   // CHECK: %[[INTRINSIC:.*]] = call i1 @llvm.aarch64.sve.ptest.last{{(.nxv16i1)?}}(<vscale x 16 x i1> %pg, <vscale x 16 x i1> %op)
30   // CHECK: ret i1 %[[INTRINSIC]]
31   return svptest_last(pg, op);
32 }
33