1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
2 // REQUIRES: aarch64-registered-target
3 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s
4 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
5 // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s
6 // RUN: %clang_cc1 -DSVE_OVERLOADED_FORMS -triple aarch64-none-linux-gnu -target-feature +sve -S -disable-O0-optnone -Werror -Wall -emit-llvm -o - -x c++ %s | opt -S -passes=mem2reg,tailcallelim | FileCheck %s -check-prefix=CPP-CHECK
7 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -S -disable-O0-optnone -Werror -Wall -o /dev/null %s
10 #ifdef SVE_OVERLOADED_FORMS
11 // A simple used,unused... macro, long enough to represent any SVE builtin.
12 #define SVE_ACLE_FUNC(A1,A2_UNUSED,A3,A4_UNUSED) A1##A3
14 #define SVE_ACLE_FUNC(A1,A2,A3,A4) A1##A2##A3##A4
17 // CHECK-LABEL: @test_svprfw(
19 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
20 // CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]], i32 0)
21 // CHECK-NEXT: ret void
23 // CPP-CHECK-LABEL: @_Z11test_svprfwu10__SVBool_tPKv(
24 // CPP-CHECK-NEXT: entry:
25 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
26 // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]], i32 0)
27 // CPP-CHECK-NEXT: ret void
29 void test_svprfw(svbool_t pg
, const void *base
)
31 return svprfw(pg
, base
, SV_PLDL1KEEP
);
34 // CHECK-LABEL: @test_svprfw_1(
36 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
37 // CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]], i32 1)
38 // CHECK-NEXT: ret void
40 // CPP-CHECK-LABEL: @_Z13test_svprfw_1u10__SVBool_tPKv(
41 // CPP-CHECK-NEXT: entry:
42 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
43 // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]], i32 1)
44 // CPP-CHECK-NEXT: ret void
46 void test_svprfw_1(svbool_t pg
, const void *base
)
48 return svprfw(pg
, base
, SV_PLDL1STRM
);
51 // CHECK-LABEL: @test_svprfw_2(
53 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
54 // CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]], i32 2)
55 // CHECK-NEXT: ret void
57 // CPP-CHECK-LABEL: @_Z13test_svprfw_2u10__SVBool_tPKv(
58 // CPP-CHECK-NEXT: entry:
59 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
60 // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]], i32 2)
61 // CPP-CHECK-NEXT: ret void
63 void test_svprfw_2(svbool_t pg
, const void *base
)
65 return svprfw(pg
, base
, SV_PLDL2KEEP
);
68 // CHECK-LABEL: @test_svprfw_3(
70 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
71 // CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]], i32 3)
72 // CHECK-NEXT: ret void
74 // CPP-CHECK-LABEL: @_Z13test_svprfw_3u10__SVBool_tPKv(
75 // CPP-CHECK-NEXT: entry:
76 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
77 // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]], i32 3)
78 // CPP-CHECK-NEXT: ret void
80 void test_svprfw_3(svbool_t pg
, const void *base
)
82 return svprfw(pg
, base
, SV_PLDL2STRM
);
85 // CHECK-LABEL: @test_svprfw_4(
87 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
88 // CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]], i32 4)
89 // CHECK-NEXT: ret void
91 // CPP-CHECK-LABEL: @_Z13test_svprfw_4u10__SVBool_tPKv(
92 // CPP-CHECK-NEXT: entry:
93 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
94 // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]], i32 4)
95 // CPP-CHECK-NEXT: ret void
97 void test_svprfw_4(svbool_t pg
, const void *base
)
99 return svprfw(pg
, base
, SV_PLDL3KEEP
);
102 // CHECK-LABEL: @test_svprfw_5(
103 // CHECK-NEXT: entry:
104 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
105 // CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]], i32 5)
106 // CHECK-NEXT: ret void
108 // CPP-CHECK-LABEL: @_Z13test_svprfw_5u10__SVBool_tPKv(
109 // CPP-CHECK-NEXT: entry:
110 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
111 // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]], i32 5)
112 // CPP-CHECK-NEXT: ret void
114 void test_svprfw_5(svbool_t pg
, const void *base
)
116 return svprfw(pg
, base
, SV_PLDL3STRM
);
119 // CHECK-LABEL: @test_svprfw_6(
120 // CHECK-NEXT: entry:
121 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
122 // CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]], i32 8)
123 // CHECK-NEXT: ret void
125 // CPP-CHECK-LABEL: @_Z13test_svprfw_6u10__SVBool_tPKv(
126 // CPP-CHECK-NEXT: entry:
127 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
128 // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]], i32 8)
129 // CPP-CHECK-NEXT: ret void
131 void test_svprfw_6(svbool_t pg
, const void *base
)
133 return svprfw(pg
, base
, SV_PSTL1KEEP
);
136 // CHECK-LABEL: @test_svprfw_7(
137 // CHECK-NEXT: entry:
138 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
139 // CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]], i32 9)
140 // CHECK-NEXT: ret void
142 // CPP-CHECK-LABEL: @_Z13test_svprfw_7u10__SVBool_tPKv(
143 // CPP-CHECK-NEXT: entry:
144 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
145 // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]], i32 9)
146 // CPP-CHECK-NEXT: ret void
148 void test_svprfw_7(svbool_t pg
, const void *base
)
150 return svprfw(pg
, base
, SV_PSTL1STRM
);
153 // CHECK-LABEL: @test_svprfw_8(
154 // CHECK-NEXT: entry:
155 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
156 // CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]], i32 10)
157 // CHECK-NEXT: ret void
159 // CPP-CHECK-LABEL: @_Z13test_svprfw_8u10__SVBool_tPKv(
160 // CPP-CHECK-NEXT: entry:
161 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
162 // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]], i32 10)
163 // CPP-CHECK-NEXT: ret void
165 void test_svprfw_8(svbool_t pg
, const void *base
)
167 return svprfw(pg
, base
, SV_PSTL2KEEP
);
170 // CHECK-LABEL: @test_svprfw_9(
171 // CHECK-NEXT: entry:
172 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
173 // CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]], i32 11)
174 // CHECK-NEXT: ret void
176 // CPP-CHECK-LABEL: @_Z13test_svprfw_9u10__SVBool_tPKv(
177 // CPP-CHECK-NEXT: entry:
178 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
179 // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]], i32 11)
180 // CPP-CHECK-NEXT: ret void
182 void test_svprfw_9(svbool_t pg
, const void *base
)
184 return svprfw(pg
, base
, SV_PSTL2STRM
);
187 // CHECK-LABEL: @test_svprfw_10(
188 // CHECK-NEXT: entry:
189 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
190 // CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]], i32 12)
191 // CHECK-NEXT: ret void
193 // CPP-CHECK-LABEL: @_Z14test_svprfw_10u10__SVBool_tPKv(
194 // CPP-CHECK-NEXT: entry:
195 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
196 // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]], i32 12)
197 // CPP-CHECK-NEXT: ret void
199 void test_svprfw_10(svbool_t pg
, const void *base
)
201 return svprfw(pg
, base
, SV_PSTL3KEEP
);
204 // CHECK-LABEL: @test_svprfw_11(
205 // CHECK-NEXT: entry:
206 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
207 // CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]], i32 13)
208 // CHECK-NEXT: ret void
210 // CPP-CHECK-LABEL: @_Z14test_svprfw_11u10__SVBool_tPKv(
211 // CPP-CHECK-NEXT: entry:
212 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
213 // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]], i32 13)
214 // CPP-CHECK-NEXT: ret void
216 void test_svprfw_11(svbool_t pg
, const void *base
)
218 return svprfw(pg
, base
, SV_PSTL3STRM
);
221 // CHECK-LABEL: @test_svprfw_vnum(
222 // CHECK-NEXT: entry:
223 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
224 // CHECK-NEXT: [[TMP1:%.*]] = getelementptr <vscale x 4 x i32>, ptr [[BASE:%.*]], i64 [[VNUM:%.*]]
225 // CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1(<vscale x 4 x i1> [[TMP0]], ptr [[TMP1]], i32 0)
226 // CHECK-NEXT: ret void
228 // CPP-CHECK-LABEL: @_Z16test_svprfw_vnumu10__SVBool_tPKvl(
229 // CPP-CHECK-NEXT: entry:
230 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
231 // CPP-CHECK-NEXT: [[TMP1:%.*]] = getelementptr <vscale x 4 x i32>, ptr [[BASE:%.*]], i64 [[VNUM:%.*]]
232 // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prf.nxv4i1(<vscale x 4 x i1> [[TMP0]], ptr [[TMP1]], i32 0)
233 // CPP-CHECK-NEXT: ret void
235 void test_svprfw_vnum(svbool_t pg
, const void *base
, int64_t vnum
)
237 return svprfw_vnum(pg
, base
, vnum
, SV_PLDL1KEEP
);
240 // CHECK-LABEL: @test_svprfw_gather_u32base(
241 // CHECK-NEXT: entry:
242 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
243 // CHECK-NEXT: tail call void @llvm.aarch64.sve.prfw.gather.scalar.offset.nxv4i32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[BASES:%.*]], i64 0, i32 0)
244 // CHECK-NEXT: ret void
246 // CPP-CHECK-LABEL: @_Z26test_svprfw_gather_u32baseu10__SVBool_tu12__SVUint32_t(
247 // CPP-CHECK-NEXT: entry:
248 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
249 // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prfw.gather.scalar.offset.nxv4i32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[BASES:%.*]], i64 0, i32 0)
250 // CPP-CHECK-NEXT: ret void
252 void test_svprfw_gather_u32base(svbool_t pg
, svuint32_t bases
)
254 return SVE_ACLE_FUNC(svprfw_gather
,_u32base
,,)(pg
, bases
, SV_PLDL1KEEP
);
257 // CHECK-LABEL: @test_svprfw_gather_u64base(
258 // CHECK-NEXT: entry:
259 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]])
260 // CHECK-NEXT: tail call void @llvm.aarch64.sve.prfw.gather.scalar.offset.nxv2i64(<vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[BASES:%.*]], i64 0, i32 0)
261 // CHECK-NEXT: ret void
263 // CPP-CHECK-LABEL: @_Z26test_svprfw_gather_u64baseu10__SVBool_tu12__SVUint64_t(
264 // CPP-CHECK-NEXT: entry:
265 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]])
266 // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prfw.gather.scalar.offset.nxv2i64(<vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[BASES:%.*]], i64 0, i32 0)
267 // CPP-CHECK-NEXT: ret void
269 void test_svprfw_gather_u64base(svbool_t pg
, svuint64_t bases
)
271 return SVE_ACLE_FUNC(svprfw_gather
,_u64base
,,)(pg
, bases
, SV_PLDL1KEEP
);
274 // CHECK-LABEL: @test_svprfw_gather_s32index(
275 // CHECK-NEXT: entry:
276 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
277 // CHECK-NEXT: tail call void @llvm.aarch64.sve.prfw.gather.sxtw.index.nxv4i32(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]], <vscale x 4 x i32> [[INDICES:%.*]], i32 0)
278 // CHECK-NEXT: ret void
280 // CPP-CHECK-LABEL: @_Z27test_svprfw_gather_s32indexu10__SVBool_tPKvu11__SVInt32_t(
281 // CPP-CHECK-NEXT: entry:
282 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
283 // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prfw.gather.sxtw.index.nxv4i32(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]], <vscale x 4 x i32> [[INDICES:%.*]], i32 0)
284 // CPP-CHECK-NEXT: ret void
286 void test_svprfw_gather_s32index(svbool_t pg
, const void *base
, svint32_t indices
)
288 return SVE_ACLE_FUNC(svprfw_gather_
,s32
,index
,)(pg
, base
, indices
, SV_PLDL1KEEP
);
291 // CHECK-LABEL: @test_svprfw_gather_s64index(
292 // CHECK-NEXT: entry:
293 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]])
294 // CHECK-NEXT: tail call void @llvm.aarch64.sve.prfw.gather.index.nxv2i64(<vscale x 2 x i1> [[TMP0]], ptr [[BASE:%.*]], <vscale x 2 x i64> [[INDICES:%.*]], i32 0)
295 // CHECK-NEXT: ret void
297 // CPP-CHECK-LABEL: @_Z27test_svprfw_gather_s64indexu10__SVBool_tPKvu11__SVInt64_t(
298 // CPP-CHECK-NEXT: entry:
299 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]])
300 // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prfw.gather.index.nxv2i64(<vscale x 2 x i1> [[TMP0]], ptr [[BASE:%.*]], <vscale x 2 x i64> [[INDICES:%.*]], i32 0)
301 // CPP-CHECK-NEXT: ret void
303 void test_svprfw_gather_s64index(svbool_t pg
, const void *base
, svint64_t indices
)
305 return SVE_ACLE_FUNC(svprfw_gather_
,s64
,index
,)(pg
, base
, indices
, SV_PLDL1KEEP
);
308 // CHECK-LABEL: @test_svprfw_gather_u32index(
309 // CHECK-NEXT: entry:
310 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
311 // CHECK-NEXT: tail call void @llvm.aarch64.sve.prfw.gather.uxtw.index.nxv4i32(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]], <vscale x 4 x i32> [[INDICES:%.*]], i32 0)
312 // CHECK-NEXT: ret void
314 // CPP-CHECK-LABEL: @_Z27test_svprfw_gather_u32indexu10__SVBool_tPKvu12__SVUint32_t(
315 // CPP-CHECK-NEXT: entry:
316 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
317 // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prfw.gather.uxtw.index.nxv4i32(<vscale x 4 x i1> [[TMP0]], ptr [[BASE:%.*]], <vscale x 4 x i32> [[INDICES:%.*]], i32 0)
318 // CPP-CHECK-NEXT: ret void
320 void test_svprfw_gather_u32index(svbool_t pg
, const void *base
, svuint32_t indices
)
322 return SVE_ACLE_FUNC(svprfw_gather_
,u32
,index
,)(pg
, base
, indices
, SV_PLDL1KEEP
);
325 // CHECK-LABEL: @test_svprfw_gather_u64index(
326 // CHECK-NEXT: entry:
327 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]])
328 // CHECK-NEXT: tail call void @llvm.aarch64.sve.prfw.gather.index.nxv2i64(<vscale x 2 x i1> [[TMP0]], ptr [[BASE:%.*]], <vscale x 2 x i64> [[INDICES:%.*]], i32 0)
329 // CHECK-NEXT: ret void
331 // CPP-CHECK-LABEL: @_Z27test_svprfw_gather_u64indexu10__SVBool_tPKvu12__SVUint64_t(
332 // CPP-CHECK-NEXT: entry:
333 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]])
334 // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prfw.gather.index.nxv2i64(<vscale x 2 x i1> [[TMP0]], ptr [[BASE:%.*]], <vscale x 2 x i64> [[INDICES:%.*]], i32 0)
335 // CPP-CHECK-NEXT: ret void
337 void test_svprfw_gather_u64index(svbool_t pg
, const void *base
, svuint64_t indices
)
339 return SVE_ACLE_FUNC(svprfw_gather_
,u64
,index
,)(pg
, base
, indices
, SV_PLDL1KEEP
);
342 // CHECK-LABEL: @test_svprfw_gather_u32base_index(
343 // CHECK-NEXT: entry:
344 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
345 // CHECK-NEXT: [[TMP1:%.*]] = shl i64 [[INDEX:%.*]], 2
346 // CHECK-NEXT: tail call void @llvm.aarch64.sve.prfw.gather.scalar.offset.nxv4i32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[BASES:%.*]], i64 [[TMP1]], i32 0)
347 // CHECK-NEXT: ret void
349 // CPP-CHECK-LABEL: @_Z32test_svprfw_gather_u32base_indexu10__SVBool_tu12__SVUint32_tl(
350 // CPP-CHECK-NEXT: entry:
351 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> [[PG:%.*]])
352 // CPP-CHECK-NEXT: [[TMP1:%.*]] = shl i64 [[INDEX:%.*]], 2
353 // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prfw.gather.scalar.offset.nxv4i32(<vscale x 4 x i1> [[TMP0]], <vscale x 4 x i32> [[BASES:%.*]], i64 [[TMP1]], i32 0)
354 // CPP-CHECK-NEXT: ret void
356 void test_svprfw_gather_u32base_index(svbool_t pg
, svuint32_t bases
, int64_t index
)
358 return SVE_ACLE_FUNC(svprfw_gather
,_u32base
,_index
,)(pg
, bases
, index
, SV_PLDL1KEEP
);
361 // CHECK-LABEL: @test_svprfw_gather_u64base_index(
362 // CHECK-NEXT: entry:
363 // CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]])
364 // CHECK-NEXT: [[TMP1:%.*]] = shl i64 [[INDEX:%.*]], 2
365 // CHECK-NEXT: tail call void @llvm.aarch64.sve.prfw.gather.scalar.offset.nxv2i64(<vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[BASES:%.*]], i64 [[TMP1]], i32 0)
366 // CHECK-NEXT: ret void
368 // CPP-CHECK-LABEL: @_Z32test_svprfw_gather_u64base_indexu10__SVBool_tu12__SVUint64_tl(
369 // CPP-CHECK-NEXT: entry:
370 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> [[PG:%.*]])
371 // CPP-CHECK-NEXT: [[TMP1:%.*]] = shl i64 [[INDEX:%.*]], 2
372 // CPP-CHECK-NEXT: tail call void @llvm.aarch64.sve.prfw.gather.scalar.offset.nxv2i64(<vscale x 2 x i1> [[TMP0]], <vscale x 2 x i64> [[BASES:%.*]], i64 [[TMP1]], i32 0)
373 // CPP-CHECK-NEXT: ret void
375 void test_svprfw_gather_u64base_index(svbool_t pg
, svuint64_t bases
, int64_t index
)
377 return SVE_ACLE_FUNC(svprfw_gather
,_u64base
,_index
,)(pg
, bases
, index
, SV_PLDL1KEEP
);