Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / AArch64 / sve2p1-intrinsics / acle_sve2p1_while_pn.c
blobd02b8069d2a29295ea57e2a8c9637434047b3315
1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
2 // RUN: %clang_cc1 -triple aarch64 -target-feature +bf16 -target-feature +sme -target-feature +sme2 -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s
3 // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +sve2 -target-feature +sve2p1 -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK
4 // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +sve2 -target-feature +sve2p1 -O1 -Werror -Wall -emit-llvm -o - %s | FileCheck %s
5 // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64 -target-feature +sve -target-feature +sve2 -target-feature +sve2p1 -O1 -Werror -Wall -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK
6 // RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +sve2 -target-feature +sve2p1 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
7 // RUN: %clang_cc1 -triple aarch64 -target-feature +bf16 -target-feature +sme -target-feature +sme2 -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
9 // REQUIRES: aarch64-registered-target
11 #include <arm_sve.h>
13 #ifdef SVE_OVERLOADED_FORMS
14 #define SVE_ACLE_FUNC(A1, A2_UNUSED) A1
15 #else
16 #define SVE_ACLE_FUNC(A1, A2) A1##A2
17 #endif
19 #ifdef __ARM_FEATURE_SME
20 #define ATTR __arm_streaming
21 #else
22 #define ATTR
23 #endif
25 // WHILEGE
27 // CHECK-LABEL: @test_svwhilege_c8_vl2(
28 // CHECK-NEXT: entry:
29 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilege.c8(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
30 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
32 // CPP-CHECK-LABEL: @_Z21test_svwhilege_c8_vl2ll(
33 // CPP-CHECK-NEXT: entry:
34 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilege.c8(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
35 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
37 svcount_t test_svwhilege_c8_vl2(int64_t op1, int64_t op2) ATTR
39 return SVE_ACLE_FUNC(svwhilege_c8,_s64)(op1, op2, 2);
42 // CHECK-LABEL: @test_svwhilege_c8_vl4(
43 // CHECK-NEXT: entry:
44 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilege.c8(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
45 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
47 // CPP-CHECK-LABEL: @_Z21test_svwhilege_c8_vl4ll(
48 // CPP-CHECK-NEXT: entry:
49 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilege.c8(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
50 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
52 svcount_t test_svwhilege_c8_vl4(int64_t op1, int64_t op2) ATTR
54 return SVE_ACLE_FUNC(svwhilege_c8,_s64)(op1, op2, 4);
57 // CHECK-LABEL: @test_svwhilege_c16_vl2(
58 // CHECK-NEXT: entry:
59 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilege.c16(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
60 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
62 // CPP-CHECK-LABEL: @_Z22test_svwhilege_c16_vl2ll(
63 // CPP-CHECK-NEXT: entry:
64 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilege.c16(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
65 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
67 svcount_t test_svwhilege_c16_vl2(int64_t op1, int64_t op2) ATTR
69 return SVE_ACLE_FUNC(svwhilege_c16,_s64)(op1, op2, 2);
72 // CHECK-LABEL: @test_svwhilege_c16_vl4(
73 // CHECK-NEXT: entry:
74 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilege.c16(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
75 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
77 // CPP-CHECK-LABEL: @_Z22test_svwhilege_c16_vl4ll(
78 // CPP-CHECK-NEXT: entry:
79 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilege.c16(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
80 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
82 svcount_t test_svwhilege_c16_vl4(int64_t op1, int64_t op2) ATTR
84 return SVE_ACLE_FUNC(svwhilege_c16,_s64)(op1, op2, 4);
87 // CHECK-LABEL: @test_svwhilege_c32_vl2(
88 // CHECK-NEXT: entry:
89 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilege.c32(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
90 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
92 // CPP-CHECK-LABEL: @_Z22test_svwhilege_c32_vl2ll(
93 // CPP-CHECK-NEXT: entry:
94 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilege.c32(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
95 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
97 svcount_t test_svwhilege_c32_vl2(int64_t op1, int64_t op2) ATTR
99 return SVE_ACLE_FUNC(svwhilege_c32,_s64)(op1, op2, 2);
102 // CHECK-LABEL: @test_svwhilege_c32_vl4(
103 // CHECK-NEXT: entry:
104 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilege.c32(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
105 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
107 // CPP-CHECK-LABEL: @_Z22test_svwhilege_c32_vl4ll(
108 // CPP-CHECK-NEXT: entry:
109 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilege.c32(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
110 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
112 svcount_t test_svwhilege_c32_vl4(int64_t op1, int64_t op2) ATTR
114 return SVE_ACLE_FUNC(svwhilege_c32,_s64)(op1, op2, 4);
117 // CHECK-LABEL: @test_svwhilege_c64_vl2(
118 // CHECK-NEXT: entry:
119 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilege.c64(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
120 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
122 // CPP-CHECK-LABEL: @_Z22test_svwhilege_c64_vl2ll(
123 // CPP-CHECK-NEXT: entry:
124 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilege.c64(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
125 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
127 svcount_t test_svwhilege_c64_vl2(int64_t op1, int64_t op2) ATTR
129 return SVE_ACLE_FUNC(svwhilege_c64,_s64)(op1, op2, 2);
132 // CHECK-LABEL: @test_svwhilege_c64_vl4(
133 // CHECK-NEXT: entry:
134 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilege.c64(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
135 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
137 // CPP-CHECK-LABEL: @_Z22test_svwhilege_c64_vl4ll(
138 // CPP-CHECK-NEXT: entry:
139 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilege.c64(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
140 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
142 svcount_t test_svwhilege_c64_vl4(int64_t op1, int64_t op2) ATTR
144 return SVE_ACLE_FUNC(svwhilege_c64,_s64)(op1, op2, 4);
147 // WHILEGT
150 // CHECK-LABEL: @test_svwhilegt_c8_vl2(
151 // CHECK-NEXT: entry:
152 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilegt.c8(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
153 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
155 // CPP-CHECK-LABEL: @_Z21test_svwhilegt_c8_vl2ll(
156 // CPP-CHECK-NEXT: entry:
157 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilegt.c8(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
158 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
160 svcount_t test_svwhilegt_c8_vl2(int64_t op1, int64_t op2) ATTR
162 return SVE_ACLE_FUNC(svwhilegt_c8,_s64)(op1, op2, 2);
165 // CHECK-LABEL: @test_svwhilegt_c8_vl4(
166 // CHECK-NEXT: entry:
167 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilegt.c8(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
168 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
170 // CPP-CHECK-LABEL: @_Z21test_svwhilegt_c8_vl4ll(
171 // CPP-CHECK-NEXT: entry:
172 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilegt.c8(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
173 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
175 svcount_t test_svwhilegt_c8_vl4(int64_t op1, int64_t op2) ATTR
177 return SVE_ACLE_FUNC(svwhilegt_c8,_s64)(op1, op2, 4);
180 // CHECK-LABEL: @test_svwhilegt_c16_vl2(
181 // CHECK-NEXT: entry:
182 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilegt.c16(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
183 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
185 // CPP-CHECK-LABEL: @_Z22test_svwhilegt_c16_vl2ll(
186 // CPP-CHECK-NEXT: entry:
187 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilegt.c16(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
188 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
190 svcount_t test_svwhilegt_c16_vl2(int64_t op1, int64_t op2) ATTR
192 return SVE_ACLE_FUNC(svwhilegt_c16,_s64)(op1, op2, 2);
195 // CHECK-LABEL: @test_svwhilegt_c16_vl4(
196 // CHECK-NEXT: entry:
197 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilegt.c16(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
198 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
200 // CPP-CHECK-LABEL: @_Z22test_svwhilegt_c16_vl4ll(
201 // CPP-CHECK-NEXT: entry:
202 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilegt.c16(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
203 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
205 svcount_t test_svwhilegt_c16_vl4(int64_t op1, int64_t op2) ATTR
207 return SVE_ACLE_FUNC(svwhilegt_c16,_s64)(op1, op2, 4);
210 // CHECK-LABEL: @test_svwhilegt_c32_vl2(
211 // CHECK-NEXT: entry:
212 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilegt.c32(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
213 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
215 // CPP-CHECK-LABEL: @_Z22test_svwhilegt_c32_vl2ll(
216 // CPP-CHECK-NEXT: entry:
217 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilegt.c32(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
218 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
220 svcount_t test_svwhilegt_c32_vl2(int64_t op1, int64_t op2) ATTR
222 return SVE_ACLE_FUNC(svwhilegt_c32,_s64)(op1, op2, 2);
225 // CHECK-LABEL: @test_svwhilegt_c32_vl4(
226 // CHECK-NEXT: entry:
227 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilegt.c32(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
228 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
230 // CPP-CHECK-LABEL: @_Z22test_svwhilegt_c32_vl4ll(
231 // CPP-CHECK-NEXT: entry:
232 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilegt.c32(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
233 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
235 svcount_t test_svwhilegt_c32_vl4(int64_t op1, int64_t op2) ATTR
237 return SVE_ACLE_FUNC(svwhilegt_c32,_s64)(op1, op2, 4);
240 // CHECK-LABEL: @test_svwhilegt_c64_vl2(
241 // CHECK-NEXT: entry:
242 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilegt.c64(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
243 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
245 // CPP-CHECK-LABEL: @_Z22test_svwhilegt_c64_vl2ll(
246 // CPP-CHECK-NEXT: entry:
247 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilegt.c64(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
248 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
250 svcount_t test_svwhilegt_c64_vl2(int64_t op1, int64_t op2) ATTR
252 return SVE_ACLE_FUNC(svwhilegt_c64,_s64)(op1, op2, 2);
255 // CHECK-LABEL: @test_svwhilegt_c64_vl4(
256 // CHECK-NEXT: entry:
257 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilegt.c64(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
258 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
260 // CPP-CHECK-LABEL: @_Z22test_svwhilegt_c64_vl4ll(
261 // CPP-CHECK-NEXT: entry:
262 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilegt.c64(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
263 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
265 svcount_t test_svwhilegt_c64_vl4(int64_t op1, int64_t op2) ATTR
267 return SVE_ACLE_FUNC(svwhilegt_c64,_s64)(op1, op2, 4);
271 // WHILEHI
273 // CHECK-LABEL: @test_svwhilehi_c8_vl2(
274 // CHECK-NEXT: entry:
275 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilehi.c8(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
276 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
278 // CPP-CHECK-LABEL: @_Z21test_svwhilehi_c8_vl2mm(
279 // CPP-CHECK-NEXT: entry:
280 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilehi.c8(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
281 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
283 svcount_t test_svwhilehi_c8_vl2(uint64_t op1, uint64_t op2) ATTR
285 return SVE_ACLE_FUNC(svwhilegt_c8,_u64)(op1, op2, 2);
288 // CHECK-LABEL: @test_svwhilehi_c8_vl4(
289 // CHECK-NEXT: entry:
290 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilehi.c8(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
291 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
293 // CPP-CHECK-LABEL: @_Z21test_svwhilehi_c8_vl4mm(
294 // CPP-CHECK-NEXT: entry:
295 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilehi.c8(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
296 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
298 svcount_t test_svwhilehi_c8_vl4(uint64_t op1, uint64_t op2) ATTR
300 return SVE_ACLE_FUNC(svwhilegt_c8,_u64)(op1, op2, 4);
303 // CHECK-LABEL: @test_svwhilehi_c16_vl2(
304 // CHECK-NEXT: entry:
305 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilehi.c16(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
306 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
308 // CPP-CHECK-LABEL: @_Z22test_svwhilehi_c16_vl2mm(
309 // CPP-CHECK-NEXT: entry:
310 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilehi.c16(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
311 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
313 svcount_t test_svwhilehi_c16_vl2(uint64_t op1, uint64_t op2) ATTR
315 return SVE_ACLE_FUNC(svwhilegt_c16,_u64)(op1, op2, 2);
318 // CHECK-LABEL: @test_svwhilehi_c16_vl4(
319 // CHECK-NEXT: entry:
320 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilehi.c16(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
321 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
323 // CPP-CHECK-LABEL: @_Z22test_svwhilehi_c16_vl4mm(
324 // CPP-CHECK-NEXT: entry:
325 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilehi.c16(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
326 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
328 svcount_t test_svwhilehi_c16_vl4(uint64_t op1, uint64_t op2) ATTR
330 return SVE_ACLE_FUNC(svwhilegt_c16,_u64)(op1, op2, 4);
333 // CHECK-LABEL: @test_svwhilehi_c32_vl2(
334 // CHECK-NEXT: entry:
335 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilehi.c32(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
336 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
338 // CPP-CHECK-LABEL: @_Z22test_svwhilehi_c32_vl2mm(
339 // CPP-CHECK-NEXT: entry:
340 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilehi.c32(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
341 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
343 svcount_t test_svwhilehi_c32_vl2(uint64_t op1, uint64_t op2) ATTR
345 return SVE_ACLE_FUNC(svwhilegt_c32,_u64)(op1, op2, 2);
348 // CHECK-LABEL: @test_svwhilehi_c32_vl4(
349 // CHECK-NEXT: entry:
350 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilehi.c32(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
351 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
353 // CPP-CHECK-LABEL: @_Z22test_svwhilehi_c32_vl4mm(
354 // CPP-CHECK-NEXT: entry:
355 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilehi.c32(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
356 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
358 svcount_t test_svwhilehi_c32_vl4(uint64_t op1, uint64_t op2) ATTR
360 return SVE_ACLE_FUNC(svwhilegt_c32,_u64)(op1, op2, 4);
363 // CHECK-LABEL: @test_svwhilehi_c64_vl2(
364 // CHECK-NEXT: entry:
365 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilehi.c64(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
366 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
368 // CPP-CHECK-LABEL: @_Z22test_svwhilehi_c64_vl2mm(
369 // CPP-CHECK-NEXT: entry:
370 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilehi.c64(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
371 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
373 svcount_t test_svwhilehi_c64_vl2(uint64_t op1, uint64_t op2) ATTR
375 return SVE_ACLE_FUNC(svwhilegt_c64,_u64)(op1, op2, 2);
378 // CHECK-LABEL: @test_svwhilehi_c64_vl4(
379 // CHECK-NEXT: entry:
380 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilehi.c64(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
381 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
383 // CPP-CHECK-LABEL: @_Z22test_svwhilehi_c64_vl4mm(
384 // CPP-CHECK-NEXT: entry:
385 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilehi.c64(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
386 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
388 svcount_t test_svwhilehi_c64_vl4(uint64_t op1, uint64_t op2) ATTR
390 return SVE_ACLE_FUNC(svwhilegt_c64,_u64)(op1, op2, 4);
394 // WHILEHS
396 // CHECK-LABEL: @test_svwhilehs_c8_vl2(
397 // CHECK-NEXT: entry:
398 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilehs.c8(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
399 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
401 // CPP-CHECK-LABEL: @_Z21test_svwhilehs_c8_vl2mm(
402 // CPP-CHECK-NEXT: entry:
403 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilehs.c8(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
404 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
406 svcount_t test_svwhilehs_c8_vl2(uint64_t op1, uint64_t op2) ATTR
408 return SVE_ACLE_FUNC(svwhilege_c8,_u64)(op1, op2, 2);
411 // CHECK-LABEL: @test_svwhilehs_c8_vl4(
412 // CHECK-NEXT: entry:
413 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilehs.c8(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
414 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
416 // CPP-CHECK-LABEL: @_Z21test_svwhilehs_c8_vl4mm(
417 // CPP-CHECK-NEXT: entry:
418 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilehs.c8(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
419 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
421 svcount_t test_svwhilehs_c8_vl4(uint64_t op1, uint64_t op2) ATTR
423 return SVE_ACLE_FUNC(svwhilege_c8,_u64)(op1, op2, 4);
426 // CHECK-LABEL: @test_svwhilehs_c16_vl2(
427 // CHECK-NEXT: entry:
428 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilehs.c16(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
429 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
431 // CPP-CHECK-LABEL: @_Z22test_svwhilehs_c16_vl2mm(
432 // CPP-CHECK-NEXT: entry:
433 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilehs.c16(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
434 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
436 svcount_t test_svwhilehs_c16_vl2(uint64_t op1, uint64_t op2) ATTR
438 return SVE_ACLE_FUNC(svwhilege_c16,_u64)(op1, op2, 2);
441 // CHECK-LABEL: @test_svwhilehs_c16_vl4(
442 // CHECK-NEXT: entry:
443 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilehs.c16(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
444 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
446 // CPP-CHECK-LABEL: @_Z22test_svwhilehs_c16_vl4mm(
447 // CPP-CHECK-NEXT: entry:
448 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilehs.c16(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
449 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
451 svcount_t test_svwhilehs_c16_vl4(uint64_t op1, uint64_t op2) ATTR
453 return SVE_ACLE_FUNC(svwhilege_c16,_u64)(op1, op2, 4);
456 // CHECK-LABEL: @test_svwhilehs_c32_vl2(
457 // CHECK-NEXT: entry:
458 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilehs.c32(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
459 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
461 // CPP-CHECK-LABEL: @_Z22test_svwhilehs_c32_vl2mm(
462 // CPP-CHECK-NEXT: entry:
463 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilehs.c32(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
464 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
466 svcount_t test_svwhilehs_c32_vl2(uint64_t op1, uint64_t op2) ATTR
468 return SVE_ACLE_FUNC(svwhilege_c32,_u64)(op1, op2, 2);
471 // CHECK-LABEL: @test_svwhilehs_c32_vl4(
472 // CHECK-NEXT: entry:
473 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilehs.c32(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
474 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
476 // CPP-CHECK-LABEL: @_Z22test_svwhilehs_c32_vl4mm(
477 // CPP-CHECK-NEXT: entry:
478 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilehs.c32(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
479 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
481 svcount_t test_svwhilehs_c32_vl4(uint64_t op1, uint64_t op2) ATTR
483 return SVE_ACLE_FUNC(svwhilege_c32,_u64)(op1, op2, 4);
486 // CHECK-LABEL: @test_svwhilehs_c64_vl2(
487 // CHECK-NEXT: entry:
488 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilehs.c64(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
489 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
491 // CPP-CHECK-LABEL: @_Z22test_svwhilehs_c64_vl2mm(
492 // CPP-CHECK-NEXT: entry:
493 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilehs.c64(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
494 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
496 svcount_t test_svwhilehs_c64_vl2(uint64_t op1, uint64_t op2) ATTR
498 return SVE_ACLE_FUNC(svwhilege_c64,_u64)(op1, op2, 2);
501 // CHECK-LABEL: @test_svwhilehs_c64_vl4(
502 // CHECK-NEXT: entry:
503 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilehs.c64(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
504 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
506 // CPP-CHECK-LABEL: @_Z22test_svwhilehs_c64_vl4mm(
507 // CPP-CHECK-NEXT: entry:
508 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilehs.c64(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
509 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
511 svcount_t test_svwhilehs_c64_vl4(uint64_t op1, uint64_t op2) ATTR
513 return SVE_ACLE_FUNC(svwhilege_c64,_u64)(op1, op2, 4);
517 // WHILELE
519 // CHECK-LABEL: @test_svwhilele_c8_vl2(
520 // CHECK-NEXT: entry:
521 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilele.c8(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
522 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
524 // CPP-CHECK-LABEL: @_Z21test_svwhilele_c8_vl2ll(
525 // CPP-CHECK-NEXT: entry:
526 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilele.c8(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
527 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
529 svcount_t test_svwhilele_c8_vl2(int64_t op1, int64_t op2) ATTR
531 return SVE_ACLE_FUNC(svwhilele_c8,_s64)(op1, op2, 2);
534 // CHECK-LABEL: @test_svwhilele_c8_vl4(
535 // CHECK-NEXT: entry:
536 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilele.c8(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
537 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
539 // CPP-CHECK-LABEL: @_Z21test_svwhilele_c8_vl4ll(
540 // CPP-CHECK-NEXT: entry:
541 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilele.c8(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
542 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
544 svcount_t test_svwhilele_c8_vl4(int64_t op1, int64_t op2) ATTR
546 return SVE_ACLE_FUNC(svwhilele_c8,_s64)(op1, op2, 4);
549 // CHECK-LABEL: @test_svwhilele_c16_vl2(
550 // CHECK-NEXT: entry:
551 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilele.c16(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
552 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
554 // CPP-CHECK-LABEL: @_Z22test_svwhilele_c16_vl2ll(
555 // CPP-CHECK-NEXT: entry:
556 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilele.c16(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
557 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
559 svcount_t test_svwhilele_c16_vl2(int64_t op1, int64_t op2) ATTR
561 return SVE_ACLE_FUNC(svwhilele_c16,_s64)(op1, op2, 2);
564 // CHECK-LABEL: @test_svwhilele_c16_vl4(
565 // CHECK-NEXT: entry:
566 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilele.c16(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
567 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
569 // CPP-CHECK-LABEL: @_Z22test_svwhilele_c16_vl4ll(
570 // CPP-CHECK-NEXT: entry:
571 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilele.c16(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
572 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
574 svcount_t test_svwhilele_c16_vl4(int64_t op1, int64_t op2) ATTR
576 return SVE_ACLE_FUNC(svwhilele_c16,_s64)(op1, op2, 4);
579 // CHECK-LABEL: @test_svwhilele_c32_vl2(
580 // CHECK-NEXT: entry:
581 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilele.c32(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
582 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
584 // CPP-CHECK-LABEL: @_Z22test_svwhilele_c32_vl2ll(
585 // CPP-CHECK-NEXT: entry:
586 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilele.c32(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
587 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
589 svcount_t test_svwhilele_c32_vl2(int64_t op1, int64_t op2) ATTR
591 return SVE_ACLE_FUNC(svwhilele_c32,_s64)(op1, op2, 2);
594 // CHECK-LABEL: @test_svwhilele_c32_vl4(
595 // CHECK-NEXT: entry:
596 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilele.c32(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
597 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
599 // CPP-CHECK-LABEL: @_Z22test_svwhilele_c32_vl4ll(
600 // CPP-CHECK-NEXT: entry:
601 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilele.c32(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
602 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
604 svcount_t test_svwhilele_c32_vl4(int64_t op1, int64_t op2) ATTR
606 return SVE_ACLE_FUNC(svwhilele_c32,_s64)(op1, op2, 4);
609 // CHECK-LABEL: @test_svwhilele_c64_vl2(
610 // CHECK-NEXT: entry:
611 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilele.c64(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
612 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
614 // CPP-CHECK-LABEL: @_Z22test_svwhilele_c64_vl2ll(
615 // CPP-CHECK-NEXT: entry:
616 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilele.c64(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
617 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
619 svcount_t test_svwhilele_c64_vl2(int64_t op1, int64_t op2) ATTR
621 return SVE_ACLE_FUNC(svwhilele_c64,_s64)(op1, op2, 2);
624 // CHECK-LABEL: @test_svwhilele_c64_vl4(
625 // CHECK-NEXT: entry:
626 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilele.c64(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
627 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
629 // CPP-CHECK-LABEL: @_Z22test_svwhilele_c64_vl4ll(
630 // CPP-CHECK-NEXT: entry:
631 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilele.c64(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
632 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
634 svcount_t test_svwhilele_c64_vl4(int64_t op1, int64_t op2) ATTR
636 return SVE_ACLE_FUNC(svwhilele_c64,_s64)(op1, op2, 4);
640 // WHILELO
642 // CHECK-LABEL: @test_svwhilelo_c8_vl2(
643 // CHECK-NEXT: entry:
644 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilelo.c8(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
645 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
647 // CPP-CHECK-LABEL: @_Z21test_svwhilelo_c8_vl2mm(
648 // CPP-CHECK-NEXT: entry:
649 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilelo.c8(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
650 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
652 svcount_t test_svwhilelo_c8_vl2(uint64_t op1, uint64_t op2) ATTR
654 return SVE_ACLE_FUNC(svwhilelt_c8,_u64)(op1, op2, 2);
657 // CHECK-LABEL: @test_svwhilelo_c8_vl4(
658 // CHECK-NEXT: entry:
659 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilelo.c8(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
660 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
662 // CPP-CHECK-LABEL: @_Z21test_svwhilelo_c8_vl4mm(
663 // CPP-CHECK-NEXT: entry:
664 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilelo.c8(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
665 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
667 svcount_t test_svwhilelo_c8_vl4(uint64_t op1, uint64_t op2) ATTR
669 return SVE_ACLE_FUNC(svwhilelt_c8,_u64)(op1, op2, 4);
672 // CHECK-LABEL: @test_svwhilelo_c16_vl2(
673 // CHECK-NEXT: entry:
674 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilelo.c16(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
675 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
677 // CPP-CHECK-LABEL: @_Z22test_svwhilelo_c16_vl2mm(
678 // CPP-CHECK-NEXT: entry:
679 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilelo.c16(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
680 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
682 svcount_t test_svwhilelo_c16_vl2(uint64_t op1, uint64_t op2) ATTR
684 return SVE_ACLE_FUNC(svwhilelt_c16,_u64)(op1, op2, 2);
687 // CHECK-LABEL: @test_svwhilelo_c16_vl4(
688 // CHECK-NEXT: entry:
689 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilelo.c16(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
690 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
692 // CPP-CHECK-LABEL: @_Z22test_svwhilelo_c16_vl4mm(
693 // CPP-CHECK-NEXT: entry:
694 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilelo.c16(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
695 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
697 svcount_t test_svwhilelo_c16_vl4(uint64_t op1, uint64_t op2) ATTR
699 return SVE_ACLE_FUNC(svwhilelt_c16,_u64)(op1, op2, 4);
702 // CHECK-LABEL: @test_svwhilelo_c32_vl2(
703 // CHECK-NEXT: entry:
704 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilelo.c32(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
705 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
707 // CPP-CHECK-LABEL: @_Z22test_svwhilelo_c32_vl2mm(
708 // CPP-CHECK-NEXT: entry:
709 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilelo.c32(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
710 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
712 svcount_t test_svwhilelo_c32_vl2(uint64_t op1, uint64_t op2) ATTR
714 return SVE_ACLE_FUNC(svwhilelt_c32,_u64)(op1, op2, 2);
717 // CHECK-LABEL: @test_svwhilelo_c32_vl4(
718 // CHECK-NEXT: entry:
719 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilelo.c32(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
720 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
722 // CPP-CHECK-LABEL: @_Z22test_svwhilelo_c32_vl4mm(
723 // CPP-CHECK-NEXT: entry:
724 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilelo.c32(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
725 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
727 svcount_t test_svwhilelo_c32_vl4(uint64_t op1, uint64_t op2) ATTR
729 return SVE_ACLE_FUNC(svwhilelt_c32,_u64)(op1, op2, 4);
732 // CHECK-LABEL: @test_svwhilelo_c64_vl2(
733 // CHECK-NEXT: entry:
734 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilelo.c64(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
735 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
737 // CPP-CHECK-LABEL: @_Z22test_svwhilelo_c64_vl2mm(
738 // CPP-CHECK-NEXT: entry:
739 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilelo.c64(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
740 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
742 svcount_t test_svwhilelo_c64_vl2(uint64_t op1, uint64_t op2) ATTR
744 return SVE_ACLE_FUNC(svwhilelt_c64,_u64)(op1, op2, 2);
747 // CHECK-LABEL: @test_svwhilelo_c64_vl4(
748 // CHECK-NEXT: entry:
749 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilelo.c64(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
750 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
752 // CPP-CHECK-LABEL: @_Z22test_svwhilelo_c64_vl4mm(
753 // CPP-CHECK-NEXT: entry:
754 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilelo.c64(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
755 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
757 svcount_t test_svwhilelo_c64_vl4(uint64_t op1, uint64_t op2) ATTR
759 return SVE_ACLE_FUNC(svwhilelt_c64,_u64)(op1, op2, 4);
763 // WHILELS
765 // CHECK-LABEL: @test_svwhilels_c8_vl2(
766 // CHECK-NEXT: entry:
767 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilels.c8(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
768 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
770 // CPP-CHECK-LABEL: @_Z21test_svwhilels_c8_vl2mm(
771 // CPP-CHECK-NEXT: entry:
772 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilels.c8(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
773 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
775 svcount_t test_svwhilels_c8_vl2(uint64_t op1, uint64_t op2) ATTR
777 return SVE_ACLE_FUNC(svwhilele_c8,_u64)(op1, op2, 2);
780 // CHECK-LABEL: @test_svwhilels_c8_vl4(
781 // CHECK-NEXT: entry:
782 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilels.c8(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
783 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
785 // CPP-CHECK-LABEL: @_Z21test_svwhilels_c8_vl4mm(
786 // CPP-CHECK-NEXT: entry:
787 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilels.c8(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
788 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
790 svcount_t test_svwhilels_c8_vl4(uint64_t op1, uint64_t op2) ATTR
792 return SVE_ACLE_FUNC(svwhilele_c8,_u64)(op1, op2, 4);
795 // CHECK-LABEL: @test_svwhilels_c16_vl2(
796 // CHECK-NEXT: entry:
797 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilels.c16(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
798 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
800 // CPP-CHECK-LABEL: @_Z22test_svwhilels_c16_vl2mm(
801 // CPP-CHECK-NEXT: entry:
802 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilels.c16(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
803 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
805 svcount_t test_svwhilels_c16_vl2(uint64_t op1, uint64_t op2) ATTR
807 return SVE_ACLE_FUNC(svwhilele_c16,_u64)(op1, op2, 2);
810 // CHECK-LABEL: @test_svwhilels_c16_vl4(
811 // CHECK-NEXT: entry:
812 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilels.c16(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
813 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
815 // CPP-CHECK-LABEL: @_Z22test_svwhilels_c16_vl4mm(
816 // CPP-CHECK-NEXT: entry:
817 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilels.c16(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
818 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
820 svcount_t test_svwhilels_c16_vl4(uint64_t op1, uint64_t op2) ATTR
822 return SVE_ACLE_FUNC(svwhilele_c16,_u64)(op1, op2, 4);
825 // CHECK-LABEL: @test_svwhilels_c32_vl2(
826 // CHECK-NEXT: entry:
827 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilels.c32(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
828 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
830 // CPP-CHECK-LABEL: @_Z22test_svwhilels_c32_vl2mm(
831 // CPP-CHECK-NEXT: entry:
832 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilels.c32(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
833 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
835 svcount_t test_svwhilels_c32_vl2(uint64_t op1, uint64_t op2) ATTR
837 return SVE_ACLE_FUNC(svwhilele_c32,_u64)(op1, op2, 2);
840 // CHECK-LABEL: @test_svwhilels_c32_vl4(
841 // CHECK-NEXT: entry:
842 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilels.c32(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
843 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
845 // CPP-CHECK-LABEL: @_Z22test_svwhilels_c32_vl4mm(
846 // CPP-CHECK-NEXT: entry:
847 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilels.c32(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
848 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
850 svcount_t test_svwhilels_c32_vl4(uint64_t op1, uint64_t op2) ATTR
852 return SVE_ACLE_FUNC(svwhilele_c32,_u64)(op1, op2, 4);
855 // CHECK-LABEL: @test_svwhilels_c64_vl2(
856 // CHECK-NEXT: entry:
857 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilels.c64(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
858 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
860 // CPP-CHECK-LABEL: @_Z22test_svwhilels_c64_vl2mm(
861 // CPP-CHECK-NEXT: entry:
862 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilels.c64(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
863 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
865 svcount_t test_svwhilels_c64_vl2(uint64_t op1, uint64_t op2) ATTR
867 return SVE_ACLE_FUNC(svwhilele_c64,_u64)(op1, op2, 2);
870 // CHECK-LABEL: @test_svwhilels_c64_vl4(
871 // CHECK-NEXT: entry:
872 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilels.c64(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
873 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
875 // CPP-CHECK-LABEL: @_Z22test_svwhilels_c64_vl4mm(
876 // CPP-CHECK-NEXT: entry:
877 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilels.c64(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
878 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
880 svcount_t test_svwhilels_c64_vl4(uint64_t op1, uint64_t op2) ATTR
882 return SVE_ACLE_FUNC(svwhilele_c64,_u64)(op1, op2, 4);
886 // WHILELT
888 // CHECK-LABEL: @test_svwhilelt_c8_vl2(
889 // CHECK-NEXT: entry:
890 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilelt.c8(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
891 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
893 // CPP-CHECK-LABEL: @_Z21test_svwhilelt_c8_vl2ll(
894 // CPP-CHECK-NEXT: entry:
895 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilelt.c8(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
896 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
898 svcount_t test_svwhilelt_c8_vl2(int64_t op1, int64_t op2) ATTR
900 return SVE_ACLE_FUNC(svwhilelt_c8,_s64)(op1, op2, 2);
903 // CHECK-LABEL: @test_svwhilelt_c8_vl4(
904 // CHECK-NEXT: entry:
905 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilelt.c8(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
906 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
908 // CPP-CHECK-LABEL: @_Z21test_svwhilelt_c8_vl4ll(
909 // CPP-CHECK-NEXT: entry:
910 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilelt.c8(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
911 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
913 svcount_t test_svwhilelt_c8_vl4(int64_t op1, int64_t op2) ATTR
915 return SVE_ACLE_FUNC(svwhilelt_c8,_s64)(op1, op2, 4);
918 // CHECK-LABEL: @test_svwhilelt_c16_vl2(
919 // CHECK-NEXT: entry:
920 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilelt.c16(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
921 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
923 // CPP-CHECK-LABEL: @_Z22test_svwhilelt_c16_vl2ll(
924 // CPP-CHECK-NEXT: entry:
925 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilelt.c16(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
926 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
928 svcount_t test_svwhilelt_c16_vl2(int64_t op1, int64_t op2) ATTR
930 return SVE_ACLE_FUNC(svwhilelt_c16,_s64)(op1, op2, 2);
933 // CHECK-LABEL: @test_svwhilelt_c16_vl4(
934 // CHECK-NEXT: entry:
935 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilelt.c16(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
936 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
938 // CPP-CHECK-LABEL: @_Z22test_svwhilelt_c16_vl4ll(
939 // CPP-CHECK-NEXT: entry:
940 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilelt.c16(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
941 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
943 svcount_t test_svwhilelt_c16_vl4(int64_t op1, int64_t op2) ATTR
945 return SVE_ACLE_FUNC(svwhilelt_c16,_s64)(op1, op2, 4);
948 // CHECK-LABEL: @test_svwhilelt_c32_vl2(
949 // CHECK-NEXT: entry:
950 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilelt.c32(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
951 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
953 // CPP-CHECK-LABEL: @_Z22test_svwhilelt_c32_vl2ll(
954 // CPP-CHECK-NEXT: entry:
955 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilelt.c32(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
956 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
958 svcount_t test_svwhilelt_c32_vl2(int64_t op1, int64_t op2) ATTR
960 return SVE_ACLE_FUNC(svwhilelt_c32,_s64)(op1, op2, 2);
963 // CHECK-LABEL: @test_svwhilelt_c32_vl4(
964 // CHECK-NEXT: entry:
965 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilelt.c32(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
966 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
968 // CPP-CHECK-LABEL: @_Z22test_svwhilelt_c32_vl4ll(
969 // CPP-CHECK-NEXT: entry:
970 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilelt.c32(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
971 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
973 svcount_t test_svwhilelt_c32_vl4(int64_t op1, int64_t op2) ATTR
975 return SVE_ACLE_FUNC(svwhilelt_c32,_s64)(op1, op2, 4);
978 // CHECK-LABEL: @test_svwhilelt_c64_vl2(
979 // CHECK-NEXT: entry:
980 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilelt.c64(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
981 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
983 // CPP-CHECK-LABEL: @_Z22test_svwhilelt_c64_vl2ll(
984 // CPP-CHECK-NEXT: entry:
985 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilelt.c64(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 2)
986 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
988 svcount_t test_svwhilelt_c64_vl2(int64_t op1, int64_t op2) ATTR
990 return SVE_ACLE_FUNC(svwhilelt_c64,_s64)(op1, op2, 2);
993 // CHECK-LABEL: @test_svwhilelt_c64_vl4(
994 // CHECK-NEXT: entry:
995 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilelt.c64(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
996 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
998 // CPP-CHECK-LABEL: @_Z22test_svwhilelt_c64_vl4ll(
999 // CPP-CHECK-NEXT: entry:
1000 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.whilelt.c64(i64 [[OP1:%.*]], i64 [[OP2:%.*]], i32 4)
1001 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
1003 svcount_t test_svwhilelt_c64_vl4(int64_t op1, int64_t op2) ATTR
1005 return SVE_ACLE_FUNC(svwhilelt_c64,_s64)(op1, op2, 4);