Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGen / aarch64-sve-intrinsics / acle_sve_ptest.c
blob7045bd0fd34b6d55a327469a3e2f2023ab9c6bc1
1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
2 // REQUIRES: aarch64-registered-target
3 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s
4 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
5 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
6 #include <arm_sve.h>
8 // CHECK-LABEL: @test_svptest_any(
9 // CHECK-NEXT: entry:
10 // CHECK-NEXT: [[TMP0:%.*]] = tail call i1 @llvm.aarch64.sve.ptest.any.nxv16i1(<vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i1> [[OP:%.*]])
11 // CHECK-NEXT: ret i1 [[TMP0]]
13 // CPP-CHECK-LABEL: @_Z16test_svptest_anyu10__SVBool_tS_(
14 // CPP-CHECK-NEXT: entry:
15 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i1 @llvm.aarch64.sve.ptest.any.nxv16i1(<vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i1> [[OP:%.*]])
16 // CPP-CHECK-NEXT: ret i1 [[TMP0]]
18 bool test_svptest_any(svbool_t pg, svbool_t op)
20 return svptest_any(pg, op);
23 // CHECK-LABEL: @test_svptest_first(
24 // CHECK-NEXT: entry:
25 // CHECK-NEXT: [[TMP0:%.*]] = tail call i1 @llvm.aarch64.sve.ptest.first.nxv16i1(<vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i1> [[OP:%.*]])
26 // CHECK-NEXT: ret i1 [[TMP0]]
28 // CPP-CHECK-LABEL: @_Z18test_svptest_firstu10__SVBool_tS_(
29 // CPP-CHECK-NEXT: entry:
30 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i1 @llvm.aarch64.sve.ptest.first.nxv16i1(<vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i1> [[OP:%.*]])
31 // CPP-CHECK-NEXT: ret i1 [[TMP0]]
33 bool test_svptest_first(svbool_t pg, svbool_t op)
35 return svptest_first(pg, op);
38 // CHECK-LABEL: @test_svptest_last(
39 // CHECK-NEXT: entry:
40 // CHECK-NEXT: [[TMP0:%.*]] = tail call i1 @llvm.aarch64.sve.ptest.last.nxv16i1(<vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i1> [[OP:%.*]])
41 // CHECK-NEXT: ret i1 [[TMP0]]
43 // CPP-CHECK-LABEL: @_Z17test_svptest_lastu10__SVBool_tS_(
44 // CPP-CHECK-NEXT: entry:
45 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call i1 @llvm.aarch64.sve.ptest.last.nxv16i1(<vscale x 16 x i1> [[PG:%.*]], <vscale x 16 x i1> [[OP:%.*]])
46 // CPP-CHECK-NEXT: ret i1 [[TMP0]]
48 bool test_svptest_last(svbool_t pg, svbool_t op)
50 return svptest_last(pg, op);