Debian Codegraph @

clang/test/CodeGen/AArch64/sve2p1-intrinsics/acle_sve2p1_set2_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 +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 -triple aarch64 -target-feature +sve -target-feature +sme -target-feature +sme2 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s \
11 // RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s
12 // RUN: %clang_cc1 -triple aarch64 -target-feature +sme -target-feature +sve -target-feature +sve2 -target-feature +sve2p1 -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s \
13 // RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s
14 // 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\
15 // RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
16 // RUN: %clang_cc1 -triple aarch64 -target-feature +sme -target-feature +sme2 -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s \
17 // RUN: | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
18 // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +sve2 -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
19 // RUN: %clang_cc1 -triple aarch64 -target-feature +sme -target-feature +sme2 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
20
21 // REQUIRES: aarch64-registered-target
22
23 #include <arm_sve.h>
24
25 #ifdef SVE_OVERLOADED_FORMS
26 // A simple used,unused... macro, long enough to represent any SVE builtin.
27 #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3
28 #else
29 #define SVE_ACLE_FUNC(A1,A2,A3,A4) A1##A2##A3##A4
30 #endif
31
32 #if defined(__ARM_FEATURE_SME) && defined(__ARM_FEATURE_SVE)
33 #define ATTR __arm_streaming_compatible
34 #elif defined(__ARM_FEATURE_SME)
35 #define ATTR __arm_streaming
36 #else
37 #define ATTR
38 #endif
39
40 // CHECK-LABEL: @test_svset2_b_0(
41 // CHECK-NEXT: entry:
42 // CHECK-NEXT: [[TMP0:%.*]] = insertvalue { <vscale x 16 x i1>, <vscale x 16 x i1> } poison, <vscale x 16 x i1> [[TUPLE_COERCE0:%.*]], 0
43 // CHECK-NEXT: [[TMP1:%.*]] = insertvalue { <vscale x 16 x i1>, <vscale x 16 x i1> } [[TMP0]], <vscale x 16 x i1> [[TUPLE_COERCE1:%.*]], 1
44 // CHECK-NEXT: [[TMP2:%.*]] = insertvalue { <vscale x 16 x i1>, <vscale x 16 x i1> } [[TMP1]], <vscale x 16 x i1> [[X:%.*]], 0
45 // CHECK-NEXT: ret { <vscale x 16 x i1>, <vscale x 16 x i1> } [[TMP2]]
46 //
47 // CPP-CHECK-LABEL: @_Z15test_svset2_b_010svboolx2_tu10__SVBool_t(
48 // CPP-CHECK-NEXT: entry:
49 // CPP-CHECK-NEXT: [[TMP0:%.*]] = insertvalue { <vscale x 16 x i1>, <vscale x 16 x i1> } poison, <vscale x 16 x i1> [[TUPLE_COERCE0:%.*]], 0
50 // CPP-CHECK-NEXT: [[TMP1:%.*]] = insertvalue { <vscale x 16 x i1>, <vscale x 16 x i1> } [[TMP0]], <vscale x 16 x i1> [[TUPLE_COERCE1:%.*]], 1
51 // CPP-CHECK-NEXT: [[TMP2:%.*]] = insertvalue { <vscale x 16 x i1>, <vscale x 16 x i1> } [[TMP1]], <vscale x 16 x i1> [[X:%.*]], 0
52 // CPP-CHECK-NEXT: ret { <vscale x 16 x i1>, <vscale x 16 x i1> } [[TMP2]]
53 //
54 svboolx2_t test_svset2_b_0(svboolx2_t tuple, svbool_t x) ATTR
55 {
56 return SVE_ACLE_FUNC(svset2,_b,,)(tuple, 0, x);
57 }
58
59 // CHECK-LABEL: @test_svset2_b_1(
60 // CHECK-NEXT: entry:
61 // CHECK-NEXT: [[TMP0:%.*]] = insertvalue { <vscale x 16 x i1>, <vscale x 16 x i1> } poison, <vscale x 16 x i1> [[TUPLE_COERCE0:%.*]], 0
62 // CHECK-NEXT: [[TMP1:%.*]] = insertvalue { <vscale x 16 x i1>, <vscale x 16 x i1> } [[TMP0]], <vscale x 16 x i1> [[TUPLE_COERCE1:%.*]], 1
63 // CHECK-NEXT: [[TMP2:%.*]] = insertvalue { <vscale x 16 x i1>, <vscale x 16 x i1> } [[TMP1]], <vscale x 16 x i1> [[X:%.*]], 1
64 // CHECK-NEXT: ret { <vscale x 16 x i1>, <vscale x 16 x i1> } [[TMP2]]
65 //
66 // CPP-CHECK-LABEL: @_Z15test_svset2_b_110svboolx2_tu10__SVBool_t(
67 // CPP-CHECK-NEXT: entry:
68 // CPP-CHECK-NEXT: [[TMP0:%.*]] = insertvalue { <vscale x 16 x i1>, <vscale x 16 x i1> } poison, <vscale x 16 x i1> [[TUPLE_COERCE0:%.*]], 0
69 // CPP-CHECK-NEXT: [[TMP1:%.*]] = insertvalue { <vscale x 16 x i1>, <vscale x 16 x i1> } [[TMP0]], <vscale x 16 x i1> [[TUPLE_COERCE1:%.*]], 1
70 // CPP-CHECK-NEXT: [[TMP2:%.*]] = insertvalue { <vscale x 16 x i1>, <vscale x 16 x i1> } [[TMP1]], <vscale x 16 x i1> [[X:%.*]], 1
71 // CPP-CHECK-NEXT: ret { <vscale x 16 x i1>, <vscale x 16 x i1> } [[TMP2]]
72 //
73 svboolx2_t test_svset2_b_1(svboolx2_t tuple, svbool_t x) ATTR
74 {
75 return SVE_ACLE_FUNC(svset2,_b,,)(tuple, 1, x);
76 }
77