1 ! RUN: %flang_fc1 -triple powerpc64le-unknown-unknown -target-cpu pwr10 -emit-llvm %s -o - | FileCheck --check-prefixes="CHECK" %s
2 ! REQUIRES: target=powerpc{{.*}}
4 !----------------------
6 !----------------------
8 subroutine mma_lxvp_test_i2(v1
, offset
, vp
)
11 vector(integer(2)) :: v1
13 vp
= mma_lxvp(offset
, v1
)
14 end subroutine mma_lxvp_test_i2
16 !CHECK-LABEL: @mma_lxvp_test_i2_
17 !CHECK: %[[offset:.*]] = load i16, ptr %1, align 2
18 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %0, i16 %[[offset]]
19 !CHECK: %[[call:.*]] = call <256 x i1> @llvm.ppc.vsx.lxvp(ptr %[[addr]])
20 !CHECK: store <256 x i1> %[[call]], ptr %2, align 32
22 subroutine test_cvspbf16()
24 vector(unsigned(1)) :: v1
, v2
26 end subroutine test_cvspbf16
28 !CHECK-LABEL: @test_cvspbf16_
29 !CHECK: %1 = alloca <16 x i8>, i64 1, align 16
30 !CHECK: %2 = alloca <16 x i8>, i64 1, align 16
31 !CHECK: %3 = load <16 x i8>, ptr %2, align 16
32 !CHECK: %4 = call <16 x i8> @llvm.ppc.vsx.xvcvspbf16(<16 x i8> %3)
33 !CHECK: store <16 x i8> %4, ptr %1, align 16
35 subroutine test_cvbf16spn()
37 vector(unsigned(1)) :: v1
, v2
38 v1
= vec_cvbf16spn(v2
)
39 end subroutine test_cvbf16spn
41 !CHECK-LABEL: @test_cvbf16spn_
42 !CHECK: %1 = alloca <16 x i8>, i64 1, align 16
43 !CHECK: %2 = alloca <16 x i8>, i64 1, align 16
44 !CHECK: %3 = load <16 x i8>, ptr %2, align 16
45 !CHECK: %4 = call <16 x i8> @llvm.ppc.vsx.xvcvbf16spn(<16 x i8> %3)
46 !CHECK: store <16 x i8> %4, ptr %1, align 16
48 !----------------------
50 !----------------------
52 subroutine vec_lxvp_test_i2(v1
, offset
, vp
)
54 vector(integer(2)) :: v1
56 vp
= vec_lxvp(offset
, v1
)
57 end subroutine vec_lxvp_test_i2
59 !CHECK-LABEL: @vec_lxvp_test_i2_
60 !CHECK: %[[offset:.*]] = load i16, ptr %1, align 2
61 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %0, i16 %[[offset]]
62 !CHECK: %[[call:.*]] = call <256 x i1> @llvm.ppc.vsx.lxvp(ptr %[[addr]])
63 !CHECK: store <256 x i1> %[[call]], ptr %2, align 32
65 subroutine vec_lxvp_test_i4(v1
, offset
, vp
)
67 vector(integer(4)) :: v1
69 vp
= vec_lxvp(offset
, v1
)
70 end subroutine vec_lxvp_test_i4
72 !CHECK-LABEL: @vec_lxvp_test_i4_
73 !CHECK: %[[offset:.*]] = load i16, ptr %1, align 2
74 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %0, i16 %[[offset]]
75 !CHECK: %[[call:.*]] = call <256 x i1> @llvm.ppc.vsx.lxvp(ptr %[[addr]])
76 !CHECK: store <256 x i1> %[[call]], ptr %2, align 32
78 subroutine vec_lxvp_test_u2(v1
, offset
, vp
)
80 vector(unsigned(2)) :: v1
82 vp
= vec_lxvp(offset
, v1
)
83 end subroutine vec_lxvp_test_u2
85 !CHECK-LABEL: @vec_lxvp_test_u2_
86 !CHECK: %[[offset:.*]] = load i16, ptr %1, align 2
87 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %0, i16 %[[offset]]
88 !CHECK: %[[call:.*]] = call <256 x i1> @llvm.ppc.vsx.lxvp(ptr %[[addr]])
89 !CHECK: store <256 x i1> %[[call]], ptr %2, align 32
91 subroutine vec_lxvp_test_u4(v1
, offset
, vp
)
93 vector(unsigned(4)) :: v1
95 vp
= vec_lxvp(offset
, v1
)
96 end subroutine vec_lxvp_test_u4
98 !CHECK-LABEL: @vec_lxvp_test_u4_
99 !CHECK: %[[offset:.*]] = load i16, ptr %1, align 2
100 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %0, i16 %[[offset]]
101 !CHECK: %[[call:.*]] = call <256 x i1> @llvm.ppc.vsx.lxvp(ptr %[[addr]])
102 !CHECK: store <256 x i1> %[[call]], ptr %2, align 32
104 subroutine vec_lxvp_test_r4(v1
, offset
, vp
)
106 vector(real(4)) :: v1
108 vp
= vec_lxvp(offset
, v1
)
109 end subroutine vec_lxvp_test_r4
111 !CHECK-LABEL: @vec_lxvp_test_r4_
112 !CHECK: %[[offset:.*]] = load i16, ptr %1, align 2
113 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %0, i16 %[[offset]]
114 !CHECK: %[[call:.*]] = call <256 x i1> @llvm.ppc.vsx.lxvp(ptr %[[addr]])
115 !CHECK: store <256 x i1> %[[call]], ptr %2, align 32
117 subroutine vec_lxvp_test_r8(v1
, offset
, vp
)
119 vector(real(8)) :: v1
121 vp
= vec_lxvp(offset
, v1
)
122 end subroutine vec_lxvp_test_r8
124 !CHECK-LABEL: @vec_lxvp_test_r8_
125 !CHECK: %[[offset:.*]] = load i16, ptr %1, align 2
126 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %0, i16 %[[offset]]
127 !CHECK: %[[call:.*]] = call <256 x i1> @llvm.ppc.vsx.lxvp(ptr %[[addr]])
128 !CHECK: store <256 x i1> %[[call]], ptr %2, align 32
130 subroutine vec_lxvp_test_vp(v1
, offset
, vp
)
134 vp
= vec_lxvp(offset
, v1
)
135 end subroutine vec_lxvp_test_vp
137 !CHECK-LABEL: @vec_lxvp_test_vp_
138 !CHECK: %[[offset:.*]] = load i16, ptr %1, align 2
139 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %0, i16 %[[offset]]
140 !CHECK: %[[call:.*]] = call <256 x i1> @llvm.ppc.vsx.lxvp(ptr %[[addr]])
141 !CHECK: store <256 x i1> %[[call]], ptr %2, align 32
143 subroutine vec_lxvp_test_i2_arr(v1
, offset
, vp
)
145 vector(integer(2)) :: v1(10)
147 vp
= vec_lxvp(offset
, v1
)
148 end subroutine vec_lxvp_test_i2_arr
150 !CHECK-LABEL: @vec_lxvp_test_i2_arr_
151 !CHECK: %[[offset:.*]] = load i32, ptr %1, align 4
152 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %0, i32 %[[offset]]
153 !CHECK: %[[call:.*]] = call <256 x i1> @llvm.ppc.vsx.lxvp(ptr %[[addr]])
154 !CHECK: store <256 x i1> %[[call]], ptr %2, align 32
156 subroutine vec_lxvp_test_i4_arr(v1
, offset
, vp
)
158 vector(integer(4)) :: v1(10)
160 vp
= vec_lxvp(offset
, v1
)
161 end subroutine vec_lxvp_test_i4_arr
163 !CHECK-LABEL: @vec_lxvp_test_i4_arr_
164 !CHECK: %[[offset:.*]] = load i32, ptr %1, align 4
165 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %0, i32 %[[offset]]
166 !CHECK: %[[call:.*]] = call <256 x i1> @llvm.ppc.vsx.lxvp(ptr %[[addr]])
167 !CHECK: store <256 x i1> %[[call]], ptr %2, align 32
169 subroutine vec_lxvp_test_u2_arr(v1
, offset
, vp
)
171 vector(unsigned(2)) :: v1(10)
173 vp
= vec_lxvp(offset
, v1
)
174 end subroutine vec_lxvp_test_u2_arr
176 !CHECK-LABEL: @vec_lxvp_test_u2_arr_
177 !CHECK: %[[offset:.*]] = load i32, ptr %1, align 4
178 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %0, i32 %[[offset]]
179 !CHECK: %[[call:.*]] = call <256 x i1> @llvm.ppc.vsx.lxvp(ptr %[[addr]])
180 !CHECK: store <256 x i1> %[[call]], ptr %2, align 32
182 subroutine vec_lxvp_test_u4_arr(v1
, offset
, vp
)
184 vector(unsigned(4)) :: v1(10)
186 vp
= vec_lxvp(offset
, v1
)
187 end subroutine vec_lxvp_test_u4_arr
189 !CHECK-LABEL: @vec_lxvp_test_u4_arr_
190 !CHECK: %[[offset:.*]] = load i32, ptr %1, align 4
191 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %0, i32 %[[offset]]
192 !CHECK: %[[call:.*]] = call <256 x i1> @llvm.ppc.vsx.lxvp(ptr %[[addr]])
193 !CHECK: store <256 x i1> %[[call]], ptr %2, align 32
195 subroutine vec_lxvp_test_r4_arr(v1
, offset
, vp
)
197 vector(real(4)) :: v1(10)
199 vp
= vec_lxvp(offset
, v1
)
200 end subroutine vec_lxvp_test_r4_arr
202 !CHECK-LABEL: @vec_lxvp_test_r4_arr_
203 !CHECK: %[[offset:.*]] = load i32, ptr %1, align 4
204 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %0, i32 %[[offset]]
205 !CHECK: %[[call:.*]] = call <256 x i1> @llvm.ppc.vsx.lxvp(ptr %[[addr]])
206 !CHECK: store <256 x i1> %[[call]], ptr %2, align 32
208 subroutine vec_lxvp_test_r8_arr(v1
, offset
, vp
)
210 vector(real(8)) :: v1(10)
212 vp
= vec_lxvp(offset
, v1
)
213 end subroutine vec_lxvp_test_r8_arr
215 !CHECK-LABEL: @vec_lxvp_test_r8_arr_
216 !CHECK: %[[offset:.*]] = load i32, ptr %1, align 4
217 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %0, i32 %[[offset]]
218 !CHECK: %[[call:.*]] = call <256 x i1> @llvm.ppc.vsx.lxvp(ptr %[[addr]])
219 !CHECK: store <256 x i1> %[[call]], ptr %2, align 32
221 subroutine vec_lxvp_test_vp_arr(v1
, offset
, vp
)
223 __vector_pair
:: v1(10)
225 vp
= vec_lxvp(offset
, v1
)
226 end subroutine vec_lxvp_test_vp_arr
228 !CHECK-LABEL: @vec_lxvp_test_vp_arr_
229 !CHECK: %[[offset:.*]] = load i64, ptr %1, align 8
230 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %0, i64 %[[offset]]
231 !CHECK: %[[call:.*]] = call <256 x i1> @llvm.ppc.vsx.lxvp(ptr %[[addr]])
232 !CHECK: store <256 x i1> %[[call]], ptr %2, align 32
234 !----------------------
236 !----------------------
238 subroutine vsx_lxvp_test_i4(v1
, offset
, vp
)
240 vector(integer(4)) :: v1
242 vp
= vsx_lxvp(offset
, v1
)
243 end subroutine vsx_lxvp_test_i4
245 !CHECK-LABEL: @vsx_lxvp_test_i4_
246 !CHECK: %[[offset:.*]] = load i16, ptr %1, align 2
247 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %0, i16 %[[offset]]
248 !CHECK: %[[call:.*]] = call <256 x i1> @llvm.ppc.vsx.lxvp(ptr %[[addr]])
249 !CHECK: store <256 x i1> %[[call]], ptr %2, align 32
251 subroutine vsx_lxvp_test_r8(v1
, offset
, vp
)
253 vector(real(8)) :: v1
255 vp
= vsx_lxvp(offset
, v1
)
256 end subroutine vsx_lxvp_test_r8
258 !CHECK-LABEL: @vsx_lxvp_test_r8_
259 !CHECK: %[[offset:.*]] = load i16, ptr %1, align 2
260 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %0, i16 %[[offset]]
261 !CHECK: %[[call:.*]] = call <256 x i1> @llvm.ppc.vsx.lxvp(ptr %[[addr]])
262 !CHECK: store <256 x i1> %[[call]], ptr %2, align 32
264 subroutine vsx_lxvp_test_i2_arr(v1
, offset
, vp
)
266 vector(integer(2)) :: v1(10)
268 vp
= vsx_lxvp(offset
, v1
)
269 end subroutine vsx_lxvp_test_i2_arr
271 !CHECK-LABEL: @vsx_lxvp_test_i2_arr_
272 !CHECK: %[[offset:.*]] = load i32, ptr %1, align 4
273 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %0, i32 %[[offset]]
274 !CHECK: %[[call:.*]] = call <256 x i1> @llvm.ppc.vsx.lxvp(ptr %[[addr]])
275 !CHECK: store <256 x i1> %[[call]], ptr %2, align 32
277 subroutine vsx_lxvp_test_vp_arr(v1
, offset
, vp
)
279 __vector_pair
:: v1(10)
281 vp
= vsx_lxvp(offset
, v1
)
282 end subroutine vsx_lxvp_test_vp_arr
284 !CHECK-LABEL: @vsx_lxvp_test_vp_arr_
285 !CHECK: %[[offset:.*]] = load i64, ptr %1, align 8
286 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %0, i64 %[[offset]]
287 !CHECK: %[[call:.*]] = call <256 x i1> @llvm.ppc.vsx.lxvp(ptr %[[addr]])
288 !CHECK: store <256 x i1> %[[call]], ptr %2, align 32
290 !----------------------
292 !----------------------
294 subroutine test_mma_stxvp_i1(vp
, offset
, v1
)
295 use, intrinsic :: mma
297 vector(integer(2)) :: v1
299 call mma_stxvp(vp
, offset
, v1
)
300 end subroutine test_mma_stxvp_i1
302 !CHECK-LABEL: @test_mma_stxvp_i1_
303 !CHECK: %[[vp:.*]] = load <256 x i1>, ptr %0, align 32
304 !CHECK: %[[offset:.*]] = load i8, ptr %1, align 1
305 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %2, i8 %[[offset]]
306 !CHECK: call void @llvm.ppc.vsx.stxvp(<256 x i1> %[[vp]], ptr %[[addr]])
308 !----------------------
310 !----------------------
312 subroutine test_vec_stxvp_i1(vp
, offset
, v1
)
314 vector(integer(2)) :: v1
316 call vec_stxvp(vp
, offset
, v1
)
317 end subroutine test_vec_stxvp_i1
319 !CHECK-LABEL: @test_vec_stxvp_i1_
320 !CHECK: %[[vp:.*]] = load <256 x i1>, ptr %0, align 32
321 !CHECK: %[[offset:.*]] = load i8, ptr %1, align 1
322 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %2, i8 %[[offset]]
323 !CHECK: call void @llvm.ppc.vsx.stxvp(<256 x i1> %[[vp]], ptr %[[addr]])
325 subroutine test_vec_stxvp_i8(vp
, offset
, v1
)
327 vector(integer(8)) :: v1
329 call vec_stxvp(vp
, offset
, v1
)
330 end subroutine test_vec_stxvp_i8
332 !CHECK-LABEL: @test_vec_stxvp_i8_
333 !CHECK: %[[vp:.*]] = load <256 x i1>, ptr %0, align 32
334 !CHECK: %[[offset:.*]] = load i64, ptr %1, align 8
335 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %2, i64 %[[offset]]
336 !CHECK: call void @llvm.ppc.vsx.stxvp(<256 x i1> %[[vp]], ptr %[[addr]])
338 subroutine test_vec_stxvp_vi2(vp
, offset
, v1
)
340 vector(integer(2)) :: v1
342 call vec_stxvp(vp
, offset
, v1
)
343 end subroutine test_vec_stxvp_vi2
345 !CHECK-LABEL: @test_vec_stxvp_vi2_
346 !CHECK: %[[vp:.*]] = load <256 x i1>, ptr %0, align 32
347 !CHECK: %[[offset:.*]] = load i16, ptr %1, align 2
348 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %2, i16 %[[offset]]
349 !CHECK: call void @llvm.ppc.vsx.stxvp(<256 x i1> %[[vp]], ptr %[[addr]])
351 subroutine test_vec_stxvp_vi4(vp
, offset
, v1
)
353 vector(integer(4)) :: v1
355 call vec_stxvp(vp
, offset
, v1
)
356 end subroutine test_vec_stxvp_vi4
358 !CHECK-LABEL: @test_vec_stxvp_vi4_
359 !CHECK: %[[vp:.*]] = load <256 x i1>, ptr %0, align 32
360 !CHECK: %[[offset:.*]] = load i16, ptr %1, align 2
361 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %2, i16 %[[offset]]
362 !CHECK: call void @llvm.ppc.vsx.stxvp(<256 x i1> %[[vp]], ptr %[[addr]])
364 subroutine test_vec_stxvp_vu2(vp
, offset
, v1
)
366 vector(unsigned(2)) :: v1
368 call vec_stxvp(vp
, offset
, v1
)
369 end subroutine test_vec_stxvp_vu2
371 !CHECK-LABEL: @test_vec_stxvp_vu2_
372 !CHECK: %[[vp:.*]] = load <256 x i1>, ptr %0, align 32
373 !CHECK: %[[offset:.*]] = load i16, ptr %1, align 2
374 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %2, i16 %[[offset]]
375 !CHECK: call void @llvm.ppc.vsx.stxvp(<256 x i1> %[[vp]], ptr %[[addr]])
377 subroutine test_vec_stxvp_vu4(vp
, offset
, v1
)
379 vector(unsigned(4)) :: v1
381 call vec_stxvp(vp
, offset
, v1
)
382 end subroutine test_vec_stxvp_vu4
384 !CHECK-LABEL: @test_vec_stxvp_vu4_
385 !CHECK: %[[vp:.*]] = load <256 x i1>, ptr %0, align 32
386 !CHECK: %[[offset:.*]] = load i16, ptr %1, align 2
387 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %2, i16 %[[offset]]
388 !CHECK: call void @llvm.ppc.vsx.stxvp(<256 x i1> %[[vp]], ptr %[[addr]])
390 subroutine test_vec_stxvp_vr4(vp
, offset
, v1
)
392 vector(real(4)) :: v1
394 call vec_stxvp(vp
, offset
, v1
)
395 end subroutine test_vec_stxvp_vr4
397 !CHECK-LABEL: @test_vec_stxvp_vr4_
398 !CHECK: %[[vp:.*]] = load <256 x i1>, ptr %0, align 32
399 !CHECK: %[[offset:.*]] = load i16, ptr %1, align 2
400 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %2, i16 %[[offset]]
401 !CHECK: call void @llvm.ppc.vsx.stxvp(<256 x i1> %[[vp]], ptr %[[addr]])
403 subroutine test_vec_stxvp_vr8(vp
, offset
, v1
)
405 vector(real(8)) :: v1
407 call vec_stxvp(vp
, offset
, v1
)
408 end subroutine test_vec_stxvp_vr8
410 !CHECK-LABEL: @test_vec_stxvp_vr8_
411 !CHECK: %[[vp:.*]] = load <256 x i1>, ptr %0, align 32
412 !CHECK: %[[offset:.*]] = load i16, ptr %1, align 2
413 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %2, i16 %[[offset]]
414 !CHECK: call void @llvm.ppc.vsx.stxvp(<256 x i1> %[[vp]], ptr %[[addr]])
416 subroutine test_vec_stxvp_vvp(vp
, offset
, v1
)
420 call vec_stxvp(vp
, offset
, v1
)
421 end subroutine test_vec_stxvp_vvp
423 !CHECK-LABEL: @test_vec_stxvp_vvp_
424 !CHECK: %[[vp:.*]] = load <256 x i1>, ptr %0, align 32
425 !CHECK: %[[offset:.*]] = load i16, ptr %1, align 2
426 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %2, i16 %[[offset]]
427 !CHECK: call void @llvm.ppc.vsx.stxvp(<256 x i1> %[[vp]], ptr %[[addr]])
429 subroutine test_vec_stxvp_vi2_arr(vp
, offset
, v1
)
431 vector(integer(2)) :: v1(10)
433 call vec_stxvp(vp
, offset
, v1
)
434 end subroutine test_vec_stxvp_vi2_arr
436 !CHECK-LABEL: @test_vec_stxvp_vi2_arr_
437 !CHECK: %[[vp:.*]] = load <256 x i1>, ptr %0, align 32
438 !CHECK: %[[offset:.*]] = load i32, ptr %1, align 4
439 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %2, i32 %[[offset]]
440 !CHECK: call void @llvm.ppc.vsx.stxvp(<256 x i1> %[[vp]], ptr %[[addr]])
442 subroutine test_vec_stxvp_vi4_arr(vp
, offset
, v1
)
444 vector(integer(4)) :: v1(10)
446 call vec_stxvp(vp
, offset
, v1
)
447 end subroutine test_vec_stxvp_vi4_arr
449 !CHECK-LABEL: @test_vec_stxvp_vi4_arr_
450 !CHECK: %[[vp:.*]] = load <256 x i1>, ptr %0, align 32
451 !CHECK: %[[offset:.*]] = load i32, ptr %1, align 4
452 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %2, i32 %[[offset]]
453 !CHECK: call void @llvm.ppc.vsx.stxvp(<256 x i1> %[[vp]], ptr %[[addr]])
455 subroutine test_vec_stxvp_vu2_arr(vp
, offset
, v1
)
457 vector(unsigned(2)) :: v1(11)
459 call vec_stxvp(vp
, offset
, v1
)
460 end subroutine test_vec_stxvp_vu2_arr
462 !CHECK-LABEL: @test_vec_stxvp_vu2_arr_
463 !CHECK: %[[vp:.*]] = load <256 x i1>, ptr %0, align 32
464 !CHECK: %[[offset:.*]] = load i32, ptr %1, align 4
465 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %2, i32 %[[offset]]
466 !CHECK: call void @llvm.ppc.vsx.stxvp(<256 x i1> %[[vp]], ptr %[[addr]])
468 subroutine test_vec_stxvp_vu4_arr(vp
, offset
, v1
)
470 vector(unsigned(4)) :: v1(11,3)
472 call vec_stxvp(vp
, offset
, v1
)
473 end subroutine test_vec_stxvp_vu4_arr
475 !CHECK-LABEL: @test_vec_stxvp_vu4_arr_
476 !CHECK: %[[vp:.*]] = load <256 x i1>, ptr %0, align 32
477 !CHECK: %[[offset:.*]] = load i64, ptr %1, align 8
478 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %2, i64 %[[offset]]
479 !CHECK: call void @llvm.ppc.vsx.stxvp(<256 x i1> %[[vp]], ptr %[[addr]])
481 subroutine test_vec_stxvp_vr4_arr(vp
, offset
, v1
)
483 vector(real(4)) :: v1(10)
485 call vec_stxvp(vp
, offset
, v1
)
486 end subroutine test_vec_stxvp_vr4_arr
488 !CHECK-LABEL: @test_vec_stxvp_vr4_arr_
489 !CHECK: %[[vp:.*]] = load <256 x i1>, ptr %0, align 32
490 !CHECK: %[[offset:.*]] = load i32, ptr %1, align 4
491 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %2, i32 %[[offset]]
492 !CHECK: call void @llvm.ppc.vsx.stxvp(<256 x i1> %[[vp]], ptr %[[addr]])
494 subroutine test_vec_stxvp_vr8_arr(vp
, offset
, v1
)
496 vector(real(8)) :: v1(10)
498 call vec_stxvp(vp
, offset
, v1
)
499 end subroutine test_vec_stxvp_vr8_arr
501 !CHECK-LABEL: @test_vec_stxvp_vr8_arr_
502 !CHECK: %[[vp:.*]] = load <256 x i1>, ptr %0, align 32
503 !CHECK: %[[offset:.*]] = load i32, ptr %1, align 4
504 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %2, i32 %[[offset]]
505 !CHECK: call void @llvm.ppc.vsx.stxvp(<256 x i1> %[[vp]], ptr %[[addr]])
507 subroutine test_vec_stxvp_vp_arr(vp
, offset
, v1
)
509 __vector_pair
:: v1(10)
511 call vec_stxvp(vp
, offset
, v1
)
512 end subroutine test_vec_stxvp_vp_arr
514 !CHECK-LABEL: @test_vec_stxvp_vp_arr_
515 !CHECK: %[[vp:.*]] = load <256 x i1>, ptr %0, align 32
516 !CHECK: %[[offset:.*]] = load i32, ptr %1, align 4
517 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %2, i32 %[[offset]]
518 !CHECK: call void @llvm.ppc.vsx.stxvp(<256 x i1> %[[vp]], ptr %[[addr]])
520 !----------------------
522 !----------------------
524 subroutine test_vsx_stxvp_i1(vp
, offset
, v1
)
526 vector(integer(2)) :: v1
528 call vsx_stxvp(vp
, offset
, v1
)
529 end subroutine test_vsx_stxvp_i1
531 !CHECK-LABEL: @test_vsx_stxvp_i1_
532 !CHECK: %[[vp:.*]] = load <256 x i1>, ptr %0, align 32
533 !CHECK: %[[offset:.*]] = load i8, ptr %1, align 1
534 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %2, i8 %[[offset]]
535 !CHECK: call void @llvm.ppc.vsx.stxvp(<256 x i1> %[[vp]], ptr %[[addr]])
537 subroutine test_vsx_stxvp_vi2(vp
, offset
, v1
)
539 vector(integer(2)) :: v1
541 call vsx_stxvp(vp
, offset
, v1
)
542 end subroutine test_vsx_stxvp_vi2
544 !CHECK-LABEL: @test_vsx_stxvp_vi2_
545 !CHECK: %[[vp:.*]] = load <256 x i1>, ptr %0, align 32
546 !CHECK: %[[offset:.*]] = load i16, ptr %1, align 2
547 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %2, i16 %[[offset]]
548 !CHECK: call void @llvm.ppc.vsx.stxvp(<256 x i1> %[[vp]], ptr %[[addr]])
550 subroutine test_vsx_stxvp_vr8_arr(vp
, offset
, v1
)
552 vector(real(8)) :: v1(10)
554 call vsx_stxvp(vp
, offset
, v1
)
555 end subroutine test_vsx_stxvp_vr8_arr
557 !CHECK-LABEL: @test_vsx_stxvp_vr8_arr_
558 !CHECK: %[[vp:.*]] = load <256 x i1>, ptr %0, align 32
559 !CHECK: %[[offset:.*]] = load i32, ptr %1, align 4
560 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %2, i32 %[[offset]]
561 !CHECK: call void @llvm.ppc.vsx.stxvp(<256 x i1> %[[vp]], ptr %[[addr]])
563 subroutine test_vsx_stxvp_vp_arr(vp
, offset
, v1
)
565 __vector_pair
:: v1(10)
567 call vsx_stxvp(vp
, offset
, v1
)
568 end subroutine test_vsx_stxvp_vp_arr
570 !CHECK-LABEL: @test_vsx_stxvp_vp_arr_
571 !CHECK: %[[vp:.*]] = load <256 x i1>, ptr %0, align 32
572 !CHECK: %[[offset:.*]] = load i32, ptr %1, align 4
573 !CHECK: %[[addr:.*]] = getelementptr i8, ptr %2, i32 %[[offset]]
574 !CHECK: call void @llvm.ppc.vsx.stxvp(<256 x i1> %[[vp]], ptr %[[addr]])