Debian Codegraph @

clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_set4_bool.c

raw
1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
2 // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +sve2 -target-feature +sve2p1 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s \
3 // RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s
4 // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +sve2 -target-feature +sve2p1 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s \
5 // RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
6 // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +sve2 -target-feature +sve2p1 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s \
7 // RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s
8 // RUN: %clang_cc1 -triple aarch64 -target-feature +bf16 -target-feature +sme -target-feature +sme2 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s \
9 // RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s
10 // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +sve2 -target-feature +sve2p1 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s\
11 // RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
12 // RUN: %clang_cc1 -triple aarch64 -target-feature +bf16 -target-feature +sme -target-feature +sme2 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s \
13 // RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
14 // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +sve2 -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
15 // RUN: %clang_cc1 -triple aarch64 -target-feature +bf16 -target-feature +sme -target-feature +sme2 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
16 // REQUIRES: aarch64-registered-target
17
18 #include <arm_sve.h>
19
20 #ifdef SVE_OVERLOADED_FORMS
21 // A simple used,unused... macro, long enough to represent any SVE builtin.
22 #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3
23 #else
24 #define SVE_ACLE_FUNC(A1,A2,A3,A4) A1##A2##A3##A4
25 #endif
26
27 #ifdef __ARM_FEATURE_SME
28 #define ATTR __arm_streaming
29 #else
30 #define ATTR
31 #endif
32
33 // CHECK-LABEL: @test_svset4_b_0(
34 // CHECK-NEXT: entry:
35 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 64 x i1> @llvm.vector.insert.nxv64i1.nxv16i1(<vscale x 64 x i1> [[TUPLE:%.*]], <vscale x 16 x i1> [[X:%.*]], i64 0)
36 // CHECK-NEXT: ret <vscale x 64 x i1> [[TMP0]]
37 //
38 // CPP-CHECK-LABEL: @_Z15test_svset4_b_010svboolx4_tu10__SVBool_t(
39 // CPP-CHECK-NEXT: entry:
40 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 64 x i1> @llvm.vector.insert.nxv64i1.nxv16i1(<vscale x 64 x i1> [[TUPLE:%.*]], <vscale x 16 x i1> [[X:%.*]], i64 0)
41 // CPP-CHECK-NEXT: ret <vscale x 64 x i1> [[TMP0]]
42 //
43 svboolx4_t test_svset4_b_0(svboolx4_t tuple, svbool_t x) ATTR
44 {
45 return SVE_ACLE_FUNC(svset4,_b,,)(tuple, 0, x);
46 }
47
48 // CHECK-LABEL: @test_svset4_b_1(
49 // CHECK-NEXT: entry:
50 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 64 x i1> @llvm.vector.insert.nxv64i1.nxv16i1(<vscale x 64 x i1> [[TUPLE:%.*]], <vscale x 16 x i1> [[X:%.*]], i64 16)
51 // CHECK-NEXT: ret <vscale x 64 x i1> [[TMP0]]
52 //
53 // CPP-CHECK-LABEL: @_Z15test_svset4_b_110svboolx4_tu10__SVBool_t(
54 // CPP-CHECK-NEXT: entry:
55 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 64 x i1> @llvm.vector.insert.nxv64i1.nxv16i1(<vscale x 64 x i1> [[TUPLE:%.*]], <vscale x 16 x i1> [[X:%.*]], i64 16)
56 // CPP-CHECK-NEXT: ret <vscale x 64 x i1> [[TMP0]]
57 //
58 svboolx4_t test_svset4_b_1(svboolx4_t tuple, svbool_t x) ATTR
59 {
60 return SVE_ACLE_FUNC(svset4,_b,,)(tuple, 1, x);
61 }
62
63 // CHECK-LABEL: @test_svset4_b_3(
64 // CHECK-NEXT: entry:
65 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 64 x i1> @llvm.vector.insert.nxv64i1.nxv16i1(<vscale x 64 x i1> [[TUPLE:%.*]], <vscale x 16 x i1> [[X:%.*]], i64 48)
66 // CHECK-NEXT: ret <vscale x 64 x i1> [[TMP0]]
67 //
68 // CPP-CHECK-LABEL: @_Z15test_svset4_b_310svboolx4_tu10__SVBool_t(
69 // CPP-CHECK-NEXT: entry:
70 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 64 x i1> @llvm.vector.insert.nxv64i1.nxv16i1(<vscale x 64 x i1> [[TUPLE:%.*]], <vscale x 16 x i1> [[X:%.*]], i64 48)
71 // CPP-CHECK-NEXT: ret <vscale x 64 x i1> [[TMP0]]
72 //
73 svboolx4_t test_svset4_b_3(svboolx4_t tuple, svbool_t x) ATTR
74 {
75 return SVE_ACLE_FUNC(svset4,_b,,)(tuple, 3, x);
76 }