Skip to content

Commit 3f13dd2

Browse files
Dinar TemirbulatovDinar Temirbulatov
authored andcommitted
Added __arm_streaming attribute in acle_sve2p1_pext.c test for sve2p1 target.
1 parent 34f1c31 commit 3f13dd2

File tree

1 file changed

+26
-20
lines changed

1 file changed

+26
-20
lines changed

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

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
22
// REQUIRES: aarch64-registered-target
3-
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +sme2 -S -O1 -Werror -emit-llvm -o - %s | FileCheck %s
4-
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme -target-feature +sve2p1 -S -O1 -Werror -emit-llvm -o - %s | FileCheck %s
5-
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +sme2 -S -O1 -Werror -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK
6-
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +sme2 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
3+
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -DTEST_SME2 -target-feature +sve -target-feature +sme2 -S -O1 -Werror -emit-llvm -o - %s | FileCheck %s
4+
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -O1 -Werror -emit-llvm -o - %s | FileCheck %s
5+
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -DTEST_SME2 -target-feature +sve -target-feature +sme2 -S -O1 -Werror -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK
6+
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -DTEST_SME2 -target-feature +sve -target-feature +sme2 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
77
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
88

99
#include <arm_sve.h>
1010

11+
#ifndef TEST_SME2
12+
#define ATTR
13+
#else
14+
#define ATTR __arm_streaming
15+
#endif
16+
1117
// CHECK-LABEL: @test_svpext_lane_c8_0(
1218
// CHECK-NEXT: entry:
1319
// CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.pext.nxv16i1(target("aarch64.svcount") [[C:%.*]], i32 0)
@@ -18,7 +24,7 @@
1824
// CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.pext.nxv16i1(target("aarch64.svcount") [[C:%.*]], i32 0)
1925
// CPP-CHECK-NEXT: ret <vscale x 16 x i1> [[TMP0]]
2026
//
21-
svbool_t test_svpext_lane_c8_0(svcount_t c) {
27+
svbool_t test_svpext_lane_c8_0(svcount_t c) ATTR {
2228
return svpext_lane_c8(c, 0);
2329
}
2430

@@ -32,7 +38,7 @@ svbool_t test_svpext_lane_c8_0(svcount_t c) {
3238
// CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.pext.nxv16i1(target("aarch64.svcount") [[C:%.*]], i32 3)
3339
// CPP-CHECK-NEXT: ret <vscale x 16 x i1> [[TMP0]]
3440
//
35-
svbool_t test_svpext_lane_c8_3(svcount_t c) {
41+
svbool_t test_svpext_lane_c8_3(svcount_t c) ATTR {
3642
return svpext_lane_c8(c, 3);
3743
}
3844

@@ -48,7 +54,7 @@ svbool_t test_svpext_lane_c8_3(svcount_t c) {
4854
// CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv8i1(<vscale x 8 x i1> [[TMP0]])
4955
// CPP-CHECK-NEXT: ret <vscale x 16 x i1> [[TMP1]]
5056
//
51-
svbool_t test_svpext_lane_c16_0(svcount_t c) {
57+
svbool_t test_svpext_lane_c16_0(svcount_t c) ATTR {
5258
return svpext_lane_c16(c, 0);
5359
}
5460

@@ -64,7 +70,7 @@ svbool_t test_svpext_lane_c16_0(svcount_t c) {
6470
// CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv8i1(<vscale x 8 x i1> [[TMP0]])
6571
// CPP-CHECK-NEXT: ret <vscale x 16 x i1> [[TMP1]]
6672
//
67-
svbool_t test_svpext_lane_c16_3(svcount_t c) {
73+
svbool_t test_svpext_lane_c16_3(svcount_t c) ATTR {
6874
return svpext_lane_c16(c, 3);
6975
}
7076

@@ -80,7 +86,7 @@ svbool_t test_svpext_lane_c16_3(svcount_t c) {
8086
// CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv4i1(<vscale x 4 x i1> [[TMP0]])
8187
// CPP-CHECK-NEXT: ret <vscale x 16 x i1> [[TMP1]]
8288
//
83-
svbool_t test_svpext_lane_c32_0(svcount_t c) {
89+
svbool_t test_svpext_lane_c32_0(svcount_t c) ATTR {
8490
return svpext_lane_c32(c, 0);
8591
}
8692

@@ -96,7 +102,7 @@ svbool_t test_svpext_lane_c32_0(svcount_t c) {
96102
// CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv4i1(<vscale x 4 x i1> [[TMP0]])
97103
// CPP-CHECK-NEXT: ret <vscale x 16 x i1> [[TMP1]]
98104
//
99-
svbool_t test_svpext_lane_c32_3(svcount_t c) {
105+
svbool_t test_svpext_lane_c32_3(svcount_t c) ATTR {
100106
return svpext_lane_c32(c, 3);
101107
}
102108

@@ -112,7 +118,7 @@ svbool_t test_svpext_lane_c32_3(svcount_t c) {
112118
// CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv2i1(<vscale x 2 x i1> [[TMP0]])
113119
// CPP-CHECK-NEXT: ret <vscale x 16 x i1> [[TMP1]]
114120
//
115-
svbool_t test_svpext_lane_c64_0(svcount_t c) {
121+
svbool_t test_svpext_lane_c64_0(svcount_t c) ATTR {
116122
return svpext_lane_c64(c, 0);
117123
}
118124

@@ -128,7 +134,7 @@ svbool_t test_svpext_lane_c64_0(svcount_t c) {
128134
// CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv2i1(<vscale x 2 x i1> [[TMP0]])
129135
// CPP-CHECK-NEXT: ret <vscale x 16 x i1> [[TMP1]]
130136
//
131-
svbool_t test_svpext_lane_c64_3(svcount_t c) {
137+
svbool_t test_svpext_lane_c64_3(svcount_t c) ATTR {
132138
return svpext_lane_c64(c, 3);
133139
}
134140

@@ -150,7 +156,7 @@ svbool_t test_svpext_lane_c64_3(svcount_t c) {
150156
// CPP-CHECK-NEXT: [[TMP4:%.*]] = tail call <vscale x 32 x i1> @llvm.vector.insert.nxv32i1.nxv16i1(<vscale x 32 x i1> [[TMP2]], <vscale x 16 x i1> [[TMP3]], i64 16)
151157
// CPP-CHECK-NEXT: ret <vscale x 32 x i1> [[TMP4]]
152158
//
153-
svboolx2_t test_svpext_lane_c8_x2_0(svcount_t c) {
159+
svboolx2_t test_svpext_lane_c8_x2_0(svcount_t c) ATTR {
154160
return svpext_lane_c8_x2(c, 0);
155161
}
156162

@@ -172,7 +178,7 @@ svboolx2_t test_svpext_lane_c8_x2_0(svcount_t c) {
172178
// CPP-CHECK-NEXT: [[TMP4:%.*]] = tail call <vscale x 32 x i1> @llvm.vector.insert.nxv32i1.nxv16i1(<vscale x 32 x i1> [[TMP2]], <vscale x 16 x i1> [[TMP3]], i64 16)
173179
// CPP-CHECK-NEXT: ret <vscale x 32 x i1> [[TMP4]]
174180
//
175-
svboolx2_t test_svpext_lane_c8_x2_1(svcount_t c) {
181+
svboolx2_t test_svpext_lane_c8_x2_1(svcount_t c) ATTR {
176182
return svpext_lane_c8_x2(c, 1);
177183
}
178184

@@ -198,7 +204,7 @@ svboolx2_t test_svpext_lane_c8_x2_1(svcount_t c) {
198204
// CPP-CHECK-NEXT: [[TMP6:%.*]] = tail call <vscale x 32 x i1> @llvm.vector.insert.nxv32i1.nxv16i1(<vscale x 32 x i1> [[TMP3]], <vscale x 16 x i1> [[TMP5]], i64 16)
199205
// CPP-CHECK-NEXT: ret <vscale x 32 x i1> [[TMP6]]
200206
//
201-
svboolx2_t test_svpext_lane_c16_x2_0(svcount_t c) {
207+
svboolx2_t test_svpext_lane_c16_x2_0(svcount_t c) ATTR {
202208
return svpext_lane_c16_x2(c, 0);
203209
}
204210

@@ -224,7 +230,7 @@ svboolx2_t test_svpext_lane_c16_x2_0(svcount_t c) {
224230
// CPP-CHECK-NEXT: [[TMP6:%.*]] = tail call <vscale x 32 x i1> @llvm.vector.insert.nxv32i1.nxv16i1(<vscale x 32 x i1> [[TMP3]], <vscale x 16 x i1> [[TMP5]], i64 16)
225231
// CPP-CHECK-NEXT: ret <vscale x 32 x i1> [[TMP6]]
226232
//
227-
svboolx2_t test_svpext_lane_c16_x2_1(svcount_t c) {
233+
svboolx2_t test_svpext_lane_c16_x2_1(svcount_t c) ATTR {
228234
return svpext_lane_c16_x2(c, 1);
229235
}
230236

@@ -250,7 +256,7 @@ svboolx2_t test_svpext_lane_c16_x2_1(svcount_t c) {
250256
// CPP-CHECK-NEXT: [[TMP6:%.*]] = tail call <vscale x 32 x i1> @llvm.vector.insert.nxv32i1.nxv16i1(<vscale x 32 x i1> [[TMP3]], <vscale x 16 x i1> [[TMP5]], i64 16)
251257
// CPP-CHECK-NEXT: ret <vscale x 32 x i1> [[TMP6]]
252258
//
253-
svboolx2_t test_svpext_lane_c32_x2_0(svcount_t c) {
259+
svboolx2_t test_svpext_lane_c32_x2_0(svcount_t c) ATTR {
254260
return svpext_lane_c32_x2(c, 0);
255261
}
256262

@@ -276,7 +282,7 @@ svboolx2_t test_svpext_lane_c32_x2_0(svcount_t c) {
276282
// CPP-CHECK-NEXT: [[TMP6:%.*]] = tail call <vscale x 32 x i1> @llvm.vector.insert.nxv32i1.nxv16i1(<vscale x 32 x i1> [[TMP3]], <vscale x 16 x i1> [[TMP5]], i64 16)
277283
// CPP-CHECK-NEXT: ret <vscale x 32 x i1> [[TMP6]]
278284
//
279-
svboolx2_t test_svpext_lane_c32_x2_1(svcount_t c) {
285+
svboolx2_t test_svpext_lane_c32_x2_1(svcount_t c) ATTR {
280286
return svpext_lane_c32_x2(c, 1);
281287
}
282288

@@ -302,7 +308,7 @@ svboolx2_t test_svpext_lane_c32_x2_1(svcount_t c) {
302308
// CPP-CHECK-NEXT: [[TMP6:%.*]] = tail call <vscale x 32 x i1> @llvm.vector.insert.nxv32i1.nxv16i1(<vscale x 32 x i1> [[TMP3]], <vscale x 16 x i1> [[TMP5]], i64 16)
303309
// CPP-CHECK-NEXT: ret <vscale x 32 x i1> [[TMP6]]
304310
//
305-
svboolx2_t test_svpext_lane_c64_x2_0(svcount_t c) {
311+
svboolx2_t test_svpext_lane_c64_x2_0(svcount_t c) ATTR {
306312
return svpext_lane_c64_x2(c, 0);
307313
}
308314

@@ -328,6 +334,6 @@ svboolx2_t test_svpext_lane_c64_x2_0(svcount_t c) {
328334
// CPP-CHECK-NEXT: [[TMP6:%.*]] = tail call <vscale x 32 x i1> @llvm.vector.insert.nxv32i1.nxv16i1(<vscale x 32 x i1> [[TMP3]], <vscale x 16 x i1> [[TMP5]], i64 16)
329335
// CPP-CHECK-NEXT: ret <vscale x 32 x i1> [[TMP6]]
330336
//
331-
svboolx2_t test_svpext_lane_c64_x2_1(svcount_t c) {
337+
svboolx2_t test_svpext_lane_c64_x2_1(svcount_t c) ATTR {
332338
return svpext_lane_c64_x2(c, 1);
333339
}

0 commit comments

Comments
 (0)