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 -emit-llvm -o - -x c++ %s | FileCheck %s
4 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -S -O1 -Werror -Wall -o - %s >/dev/null
5 #include <arm_sve.h>
6
test_svptest_any(svbool_t pg,svbool_t op)7 bool test_svptest_any(svbool_t pg, svbool_t op)
8 {
9 // CHECK-LABEL: test_svptest_any
10 // CHECK: %[[INTRINSIC:.*]] = call i1 @llvm.aarch64.sve.ptest.any{{(.nxv16i1)?}}(<vscale x 16 x i1> %pg, <vscale x 16 x i1> %op)
11 // CHECK: ret i1 %[[INTRINSIC]]
12 return svptest_any(pg, op);
13 }
14
test_svptest_first(svbool_t pg,svbool_t op)15 bool test_svptest_first(svbool_t pg, svbool_t op)
16 {
17 // CHECK-LABEL: test_svptest_first
18 // CHECK: %[[INTRINSIC:.*]] = call i1 @llvm.aarch64.sve.ptest.first{{(.nxv16i1)?}}(<vscale x 16 x i1> %pg, <vscale x 16 x i1> %op)
19 // CHECK: ret i1 %[[INTRINSIC]]
20 return svptest_first(pg, op);
21 }
22
test_svptest_last(svbool_t pg,svbool_t op)23 bool test_svptest_last(svbool_t pg, svbool_t op)
24 {
25 // CHECK-LABEL: test_svptest_last
26 // CHECK: %[[INTRINSIC:.*]] = call i1 @llvm.aarch64.sve.ptest.last{{(.nxv16i1)?}}(<vscale x 16 x i1> %pg, <vscale x 16 x i1> %op)
27 // CHECK: ret i1 %[[INTRINSIC]]
28 return svptest_last(pg, op);
29 }
30