11
11
// RUN: -target-feature +sve2p1 -S -O1 -Werror -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK
12
12
// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
13
13
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu \
14
- // RUN: -target-feature +sme2 -S -O1 -Werror -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK
15
- // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme2 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
14
+ // RUN: -target-feature +sme2 -S -DTEST_SME2 - O1 -Werror -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK
15
+ // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme2 -S -DTEST_SME2 - disable-O0-optnone -Werror -Wall -o /dev/null %s
16
16
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
17
17
18
18
#include <arm_sve.h>
19
19
20
+ #ifndef TEST_SME2
21
+ #define ATTR
22
+ #else
23
+ #define ATTR __arm_streaming_compatible
24
+ #endif
25
+
20
26
// CHECK-LABEL: @test_svpsel_lane_b8(
21
27
// CHECK-NEXT: entry:
22
28
// CHECK-NEXT: [[ADD:%.*]] = add i32 [[IDX:%.*]], 15
29
35
// CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.psel.nxv16i1(<vscale x 16 x i1> [[P1:%.*]], <vscale x 16 x i1> [[P2:%.*]], i32 [[ADD]])
30
36
// CPP-CHECK-NEXT: ret <vscale x 16 x i1> [[TMP0]]
31
37
//
32
- svbool_t test_svpsel_lane_b8 (svbool_t p1 , svbool_t p2 , uint32_t idx ) __arm_streaming_compatible {
38
+ svbool_t test_svpsel_lane_b8 (svbool_t p1 , svbool_t p2 , uint32_t idx ) ATTR {
33
39
return svpsel_lane_b8 (p1 , p2 , idx + 15 );
34
40
}
35
41
@@ -47,7 +53,7 @@ svbool_t test_svpsel_lane_b8(svbool_t p1, svbool_t p2, uint32_t idx) __arm_strea
47
53
// CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.psel.nxv8i1(<vscale x 16 x i1> [[P1:%.*]], <vscale x 8 x i1> [[TMP0]], i32 [[ADD]])
48
54
// CPP-CHECK-NEXT: ret <vscale x 16 x i1> [[TMP1]]
49
55
//
50
- svbool_t test_svpsel_lane_b16 (svbool_t p1 , svbool_t p2 , uint32_t idx ) __arm_streaming_compatible {
56
+ svbool_t test_svpsel_lane_b16 (svbool_t p1 , svbool_t p2 , uint32_t idx ) ATTR {
51
57
return svpsel_lane_b16 (p1 , p2 , idx + 7 );
52
58
}
53
59
@@ -65,7 +71,7 @@ svbool_t test_svpsel_lane_b16(svbool_t p1, svbool_t p2, uint32_t idx) __arm_stre
65
71
// CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.psel.nxv4i1(<vscale x 16 x i1> [[P1:%.*]], <vscale x 4 x i1> [[TMP0]], i32 [[ADD]])
66
72
// CPP-CHECK-NEXT: ret <vscale x 16 x i1> [[TMP1]]
67
73
//
68
- svbool_t test_svpsel_lane_b32 (svbool_t p1 , svbool_t p2 , uint32_t idx ) __arm_streaming_compatible {
74
+ svbool_t test_svpsel_lane_b32 (svbool_t p1 , svbool_t p2 , uint32_t idx ) ATTR {
69
75
return svpsel_lane_b32 (p1 , p2 , idx + 3 );
70
76
}
71
77
@@ -83,7 +89,7 @@ svbool_t test_svpsel_lane_b32(svbool_t p1, svbool_t p2, uint32_t idx) __arm_stre
83
89
// CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.psel.nxv2i1(<vscale x 16 x i1> [[P1:%.*]], <vscale x 2 x i1> [[TMP0]], i32 [[ADD]])
84
90
// CPP-CHECK-NEXT: ret <vscale x 16 x i1> [[TMP1]]
85
91
//
86
- svbool_t test_svpsel_lane_b64 (svbool_t p1 , svbool_t p2 , uint32_t idx ) __arm_streaming_compatible {
92
+ svbool_t test_svpsel_lane_b64 (svbool_t p1 , svbool_t p2 , uint32_t idx ) ATTR {
87
93
return svpsel_lane_b64 (p1 , p2 , idx + 1 );
88
94
}
89
95
@@ -103,7 +109,7 @@ svbool_t test_svpsel_lane_b64(svbool_t p1, svbool_t p2, uint32_t idx) __arm_stre
103
109
// CPP-CHECK-NEXT: [[TMP2:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.convert.from.svbool.taarch64.svcountt(<vscale x 16 x i1> [[TMP1]])
104
110
// CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP2]]
105
111
//
106
- svcount_t test_svpsel_lane_c8 (svcount_t p1 , svbool_t p2 , uint32_t idx ) __arm_streaming_compatible {
112
+ svcount_t test_svpsel_lane_c8 (svcount_t p1 , svbool_t p2 , uint32_t idx ) ATTR {
107
113
return svpsel_lane_c8 (p1 , p2 , idx + 15 );
108
114
}
109
115
@@ -125,7 +131,7 @@ svcount_t test_svpsel_lane_c8(svcount_t p1, svbool_t p2, uint32_t idx) __arm_str
125
131
// CPP-CHECK-NEXT: [[TMP3:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.convert.from.svbool.taarch64.svcountt(<vscale x 16 x i1> [[TMP2]])
126
132
// CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP3]]
127
133
//
128
- svcount_t test_svpsel_lane_c16 (svcount_t p1 , svbool_t p2 , uint32_t idx ) __arm_streaming_compatible {
134
+ svcount_t test_svpsel_lane_c16 (svcount_t p1 , svbool_t p2 , uint32_t idx ) ATTR {
129
135
return svpsel_lane_c16 (p1 , p2 , idx + 7 );
130
136
}
131
137
@@ -147,7 +153,7 @@ svcount_t test_svpsel_lane_c16(svcount_t p1, svbool_t p2, uint32_t idx) __arm_st
147
153
// CPP-CHECK-NEXT: [[TMP3:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.convert.from.svbool.taarch64.svcountt(<vscale x 16 x i1> [[TMP2]])
148
154
// CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP3]]
149
155
//
150
- svcount_t test_svpsel_lane_c32 (svcount_t p1 , svbool_t p2 , uint32_t idx ) __arm_streaming_compatible {
156
+ svcount_t test_svpsel_lane_c32 (svcount_t p1 , svbool_t p2 , uint32_t idx ) ATTR {
151
157
return svpsel_lane_c32 (p1 , p2 , idx + 3 );
152
158
}
153
159
@@ -169,6 +175,6 @@ svcount_t test_svpsel_lane_c32(svcount_t p1, svbool_t p2, uint32_t idx) __arm_st
169
175
// CPP-CHECK-NEXT: [[TMP3:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.convert.from.svbool.taarch64.svcountt(<vscale x 16 x i1> [[TMP2]])
170
176
// CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP3]]
171
177
//
172
- svcount_t test_svpsel_lane_c64 (svcount_t p1 , svbool_t p2 , uint32_t idx ) __arm_streaming_compatible {
178
+ svcount_t test_svpsel_lane_c64 (svcount_t p1 , svbool_t p2 , uint32_t idx ) ATTR {
173
179
return svpsel_lane_c64 (p1 , p2 , idx + 1 );
174
180
}
0 commit comments