1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -verify-machineinstrs -ppc-asm-full-reg-names -mcpu=pwr10 \
3 ; RUN: -ppc-vsr-nums-as-vr -mtriple=powerpc64le-unknown-unknown < %s | FileCheck %s
5 ; RUN: llc -verify-machineinstrs -ppc-asm-full-reg-names -mcpu=pwr10 \
6 ; RUN: -ppc-vsr-nums-as-vr -mtriple=powerpc64-unknown-unknown < %s | FileCheck %s
8 define <16 x i8> @testVSLDBI(<16 x i8> %a, <16 x i8> %b) {
9 ; CHECK-LABEL: testVSLDBI:
10 ; CHECK: # %bb.0: # %entry
11 ; CHECK-NEXT: vsldbi v2, v2, v3, 1
14 %0 = tail call <16 x i8> @llvm.ppc.altivec.vsldbi(<16 x i8> %a, <16 x i8> %b, i32 1)
17 declare <16 x i8> @llvm.ppc.altivec.vsldbi(<16 x i8>, <16 x i8>, i32 immarg)
19 define <16 x i8> @testVSRDBI(<16 x i8> %a, <16 x i8> %b) {
20 ; CHECK-LABEL: testVSRDBI:
21 ; CHECK: # %bb.0: # %entry
22 ; CHECK-NEXT: vsrdbi v2, v2, v3, 1
25 %0 = tail call <16 x i8> @llvm.ppc.altivec.vsrdbi(<16 x i8> %a, <16 x i8> %b, i32 1)
28 declare <16 x i8> @llvm.ppc.altivec.vsrdbi(<16 x i8>, <16 x i8>, i32 immarg)
30 define <16 x i8> @testXXPERMX(<16 x i8> %a, <16 x i8> %b, <16 x i8> %c) {
31 ; CHECK-LABEL: testXXPERMX:
32 ; CHECK: # %bb.0: # %entry
33 ; CHECK-NEXT: xxpermx v2, v2, v3, v4, 1
36 %0 = tail call <16 x i8> @llvm.ppc.vsx.xxpermx(<16 x i8> %a, <16 x i8> %b, <16 x i8> %c, i32 1)
39 declare <16 x i8> @llvm.ppc.vsx.xxpermx(<16 x i8>, <16 x i8>, <16 x i8>, i32 immarg)
41 define <16 x i8> @testXXBLENDVB(<16 x i8> %a, <16 x i8> %b, <16 x i8> %c) {
42 ; CHECK-LABEL: testXXBLENDVB:
43 ; CHECK: # %bb.0: # %entry
44 ; CHECK-NEXT: xxblendvb v2, v2, v3, v4
47 %0 = tail call <16 x i8> @llvm.ppc.vsx.xxblendvb(<16 x i8> %a, <16 x i8> %b, <16 x i8> %c)
50 declare <16 x i8> @llvm.ppc.vsx.xxblendvb(<16 x i8>, <16 x i8>, <16 x i8>)
52 define <8 x i16> @testXXBLENDVH(<8 x i16> %a, <8 x i16> %b, <8 x i16> %c) {
53 ; CHECK-LABEL: testXXBLENDVH:
54 ; CHECK: # %bb.0: # %entry
55 ; CHECK-NEXT: xxblendvh v2, v2, v3, v4
58 %0 = tail call <8 x i16> @llvm.ppc.vsx.xxblendvh(<8 x i16> %a, <8 x i16> %b, <8 x i16> %c)
61 declare <8 x i16> @llvm.ppc.vsx.xxblendvh(<8 x i16>, <8 x i16>, <8 x i16>)
63 define <4 x i32> @testXXBLENDVW(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c) {
64 ; CHECK-LABEL: testXXBLENDVW:
65 ; CHECK: # %bb.0: # %entry
66 ; CHECK-NEXT: xxblendvw v2, v2, v3, v4
69 %0 = tail call <4 x i32> @llvm.ppc.vsx.xxblendvw(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c)
72 declare <4 x i32> @llvm.ppc.vsx.xxblendvw(<4 x i32>, <4 x i32>, <4 x i32>)
74 define <2 x i64> @testXXBLENDVD(<2 x i64> %a, <2 x i64> %b, <2 x i64> %c) {
75 ; CHECK-LABEL: testXXBLENDVD:
76 ; CHECK: # %bb.0: # %entry
77 ; CHECK-NEXT: xxblendvd v2, v2, v3, v4
80 %0 = tail call <2 x i64> @llvm.ppc.vsx.xxblendvd(<2 x i64> %a, <2 x i64> %b, <2 x i64> %c)
83 declare <2 x i64> @llvm.ppc.vsx.xxblendvd(<2 x i64>, <2 x i64>, <2 x i64>)
85 define <16 x i8> @testVINSBLX(<16 x i8> %a, i32 %b, i32 %c) {
86 ; CHECK-LABEL: testVINSBLX:
87 ; CHECK: # %bb.0: # %entry
88 ; CHECK-NEXT: vinsblx v2, r5, r6
91 %0 = tail call <16 x i8> @llvm.ppc.altivec.vinsblx(<16 x i8> %a, i32 %b, i32 %c)
94 declare <16 x i8> @llvm.ppc.altivec.vinsblx(<16 x i8>, i32, i32)
96 define <16 x i8> @testVINSBRX(<16 x i8> %a, i32 %b, i32 %c) {
97 ; CHECK-LABEL: testVINSBRX:
98 ; CHECK: # %bb.0: # %entry
99 ; CHECK-NEXT: vinsbrx v2, r5, r6
102 %0 = tail call <16 x i8> @llvm.ppc.altivec.vinsbrx(<16 x i8> %a, i32 %b, i32 %c)
105 declare <16 x i8> @llvm.ppc.altivec.vinsbrx(<16 x i8>, i32, i32)
107 define <8 x i16> @testVINSHLX(<8 x i16> %a, i32 %b, i32 %c) {
108 ; CHECK-LABEL: testVINSHLX:
109 ; CHECK: # %bb.0: # %entry
110 ; CHECK-NEXT: vinshlx v2, r5, r6
113 %0 = tail call <8 x i16> @llvm.ppc.altivec.vinshlx(<8 x i16> %a, i32 %b, i32 %c)
116 declare <8 x i16> @llvm.ppc.altivec.vinshlx(<8 x i16>, i32, i32)
118 define <8 x i16> @testVINSHRX(<8 x i16> %a, i32 %b, i32 %c) {
119 ; CHECK-LABEL: testVINSHRX:
120 ; CHECK: # %bb.0: # %entry
121 ; CHECK-NEXT: vinshrx v2, r5, r6
124 %0 = tail call <8 x i16> @llvm.ppc.altivec.vinshrx(<8 x i16> %a, i32 %b, i32 %c)
127 declare <8 x i16> @llvm.ppc.altivec.vinshrx(<8 x i16>, i32, i32)
129 define <4 x i32> @testVINSWLX(<4 x i32> %a, i32 %b, i32 %c) {
130 ; CHECK-LABEL: testVINSWLX:
131 ; CHECK: # %bb.0: # %entry
132 ; CHECK-NEXT: vinswlx v2, r5, r6
135 %0 = tail call <4 x i32> @llvm.ppc.altivec.vinswlx(<4 x i32> %a, i32 %b, i32 %c)
138 declare <4 x i32> @llvm.ppc.altivec.vinswlx(<4 x i32>, i32, i32)
140 define <4 x i32> @testVINSWRX(<4 x i32> %a, i32 %b, i32 %c) {
141 ; CHECK-LABEL: testVINSWRX:
142 ; CHECK: # %bb.0: # %entry
143 ; CHECK-NEXT: vinswrx v2, r5, r6
146 %0 = tail call <4 x i32> @llvm.ppc.altivec.vinswrx(<4 x i32> %a, i32 %b, i32 %c)
149 declare <4 x i32> @llvm.ppc.altivec.vinswrx(<4 x i32>, i32, i32)
151 define <2 x i64> @testVINSDLX(<2 x i64> %a, i64 %b, i64 %c) {
152 ; CHECK-LABEL: testVINSDLX:
153 ; CHECK: # %bb.0: # %entry
154 ; CHECK-NEXT: vinsdlx v2, r5, r6
157 %0 = tail call <2 x i64> @llvm.ppc.altivec.vinsdlx(<2 x i64> %a, i64 %b, i64 %c)
160 declare <2 x i64> @llvm.ppc.altivec.vinsdlx(<2 x i64>, i64, i64)
162 define <2 x i64> @testVINSDRX(<2 x i64> %a, i64 %b, i64 %c) {
163 ; CHECK-LABEL: testVINSDRX:
164 ; CHECK: # %bb.0: # %entry
165 ; CHECK-NEXT: vinsdrx v2, r5, r6
168 %0 = tail call <2 x i64> @llvm.ppc.altivec.vinsdrx(<2 x i64> %a, i64 %b, i64 %c)
171 declare <2 x i64> @llvm.ppc.altivec.vinsdrx(<2 x i64>, i64, i64)
173 define <16 x i8> @testVINSBVLX(<16 x i8> %a, i32 %b, <16 x i8> %c) {
174 ; CHECK-LABEL: testVINSBVLX:
175 ; CHECK: # %bb.0: # %entry
176 ; CHECK-NEXT: vinsbvlx v2, r5, v3
179 %0 = tail call <16 x i8> @llvm.ppc.altivec.vinsbvlx(<16 x i8> %a, i32 %b, <16 x i8> %c)
182 declare <16 x i8> @llvm.ppc.altivec.vinsbvlx(<16 x i8>, i32, <16 x i8>)
184 define <16 x i8> @testVINSBVRX(<16 x i8> %a, i32 %b, <16 x i8> %c) {
185 ; CHECK-LABEL: testVINSBVRX:
186 ; CHECK: # %bb.0: # %entry
187 ; CHECK-NEXT: vinsbvrx v2, r5, v3
190 %0 = tail call <16 x i8> @llvm.ppc.altivec.vinsbvrx(<16 x i8> %a, i32 %b, <16 x i8> %c)
193 declare <16 x i8> @llvm.ppc.altivec.vinsbvrx(<16 x i8>, i32, <16 x i8>)
195 define <8 x i16> @testVINSHVLX(<8 x i16> %a, i32 %b, <8 x i16> %c) {
196 ; CHECK-LABEL: testVINSHVLX:
197 ; CHECK: # %bb.0: # %entry
198 ; CHECK-NEXT: vinshvlx v2, r5, v3
201 %0 = tail call <8 x i16> @llvm.ppc.altivec.vinshvlx(<8 x i16> %a, i32 %b, <8 x i16> %c)
204 declare <8 x i16> @llvm.ppc.altivec.vinshvlx(<8 x i16>, i32, <8 x i16>)
206 define <8 x i16> @testVINSHVRX(<8 x i16> %a, i32 %b, <8 x i16> %c) {
208 %0 = tail call <8 x i16> @llvm.ppc.altivec.vinshvrx(<8 x i16> %a, i32 %b, <8 x i16> %c)
211 declare <8 x i16> @llvm.ppc.altivec.vinshvrx(<8 x i16>, i32, <8 x i16>)
213 define <4 x i32> @testVINSWVLX(<4 x i32> %a, i32 %b, <4 x i32> %c) {
214 ; CHECK-LABEL: testVINSWVLX:
215 ; CHECK: # %bb.0: # %entry
216 ; CHECK-NEXT: vinswvlx v2, r5, v3
219 %0 = tail call <4 x i32> @llvm.ppc.altivec.vinswvlx(<4 x i32> %a, i32 %b, <4 x i32> %c)
222 declare <4 x i32> @llvm.ppc.altivec.vinswvlx(<4 x i32>, i32, <4 x i32>)
224 define <4 x i32> @testVINSWVRX(<4 x i32> %a, i32 %b, <4 x i32> %c) {
225 ; CHECK-LABEL: testVINSWVRX:
226 ; CHECK: # %bb.0: # %entry
227 ; CHECK-NEXT: vinswvrx v2, r5, v3
230 %0 = tail call <4 x i32> @llvm.ppc.altivec.vinswvrx(<4 x i32> %a, i32 %b, <4 x i32> %c)
233 declare <4 x i32> @llvm.ppc.altivec.vinswvrx(<4 x i32>, i32, <4 x i32>)
235 define <4 x i32> @testVINSW(<4 x i32> %a, i32 %b) {
236 ; CHECK-LABEL: testVINSW:
237 ; CHECK: # %bb.0: # %entry
238 ; CHECK-NEXT: vinsw v2, r5, 1
241 %0 = tail call <4 x i32> @llvm.ppc.altivec.vinsw(<4 x i32> %a, i32 %b, i32 1)
244 declare <4 x i32> @llvm.ppc.altivec.vinsw(<4 x i32>, i32, i32 immarg)
246 define <2 x i64> @testVINSD(<2 x i64> %a, i64 %b) {
247 ; CHECK-LABEL: testVINSD:
248 ; CHECK: # %bb.0: # %entry
249 ; CHECK-NEXT: vinsd v2, r5, 1
252 %0 = tail call <2 x i64> @llvm.ppc.altivec.vinsd(<2 x i64> %a, i64 %b, i32 1)
255 declare <2 x i64> @llvm.ppc.altivec.vinsd(<2 x i64>, i64, i32 immarg)
257 define <2 x i64> @testVEXTDUBVLX(<16 x i8> %a, <16 x i8> %b, i32 %c) {
258 ; CHECK-LABEL: testVEXTDUBVLX:
259 ; CHECK: # %bb.0: # %entry
260 ; CHECK-NEXT: vextdubvlx v2, v2, v3, r7
263 %0 = tail call <2 x i64> @llvm.ppc.altivec.vextdubvlx(<16 x i8> %a, <16 x i8> %b, i32 %c)
266 declare <2 x i64> @llvm.ppc.altivec.vextdubvlx(<16 x i8>, <16 x i8>, i32)
268 define <2 x i64> @testVEXTDUBVRX(<16 x i8> %a, <16 x i8> %b, i32 %c) {
269 ; CHECK-LABEL: testVEXTDUBVRX:
270 ; CHECK: # %bb.0: # %entry
271 ; CHECK-NEXT: vextdubvrx v2, v2, v3, r7
274 %0 = tail call <2 x i64> @llvm.ppc.altivec.vextdubvrx(<16 x i8> %a, <16 x i8> %b, i32 %c)
277 declare <2 x i64> @llvm.ppc.altivec.vextdubvrx(<16 x i8>, <16 x i8>, i32)
279 define <2 x i64> @testVEXTDUHVLX(<8 x i16> %a, <8 x i16> %b, i32 %c) {
280 ; CHECK-LABEL: testVEXTDUHVLX:
281 ; CHECK: # %bb.0: # %entry
282 ; CHECK-NEXT: vextduhvlx v2, v2, v3, r7
285 %0 = tail call <2 x i64> @llvm.ppc.altivec.vextduhvlx(<8 x i16> %a, <8 x i16> %b, i32 %c)
288 declare <2 x i64> @llvm.ppc.altivec.vextduhvlx(<8 x i16>, <8 x i16>, i32)
290 define <2 x i64> @testVEXTDUHVRX(<8 x i16> %a, <8 x i16> %b, i32 %c) {
291 ; CHECK-LABEL: testVEXTDUHVRX:
292 ; CHECK: # %bb.0: # %entry
293 ; CHECK-NEXT: vextduhvrx v2, v2, v3, r7
296 %0 = tail call <2 x i64> @llvm.ppc.altivec.vextduhvrx(<8 x i16> %a, <8 x i16> %b, i32 %c)
299 declare <2 x i64> @llvm.ppc.altivec.vextduhvrx(<8 x i16>, <8 x i16>, i32)
301 define <2 x i64> @testVEXTDUWVLX(<4 x i32> %a, <4 x i32> %b, i32 %c) {
302 ; CHECK-LABEL: testVEXTDUWVLX:
303 ; CHECK: # %bb.0: # %entry
304 ; CHECK-NEXT: vextduwvlx v2, v2, v3, r7
307 %0 = tail call <2 x i64> @llvm.ppc.altivec.vextduwvlx(<4 x i32> %a, <4 x i32> %b, i32 %c)
310 declare <2 x i64> @llvm.ppc.altivec.vextduwvlx(<4 x i32>, <4 x i32>, i32)
312 define <2 x i64> @testVEXTDUWVRX(<4 x i32> %a, <4 x i32> %b, i32 %c) {
313 ; CHECK-LABEL: testVEXTDUWVRX:
314 ; CHECK: # %bb.0: # %entry
315 ; CHECK-NEXT: vextduwvrx v2, v2, v3, r7
318 %0 = tail call <2 x i64> @llvm.ppc.altivec.vextduwvrx(<4 x i32> %a, <4 x i32> %b, i32 %c)
321 declare <2 x i64> @llvm.ppc.altivec.vextduwvrx(<4 x i32>, <4 x i32>, i32)
323 define <2 x i64> @testVEXTDDVLX(<2 x i64> %a, <2 x i64> %b, i32 %c) {
324 ; CHECK-LABEL: testVEXTDDVLX:
325 ; CHECK: # %bb.0: # %entry
326 ; CHECK-NEXT: vextddvlx v2, v2, v3, r7
329 %0 = tail call <2 x i64> @llvm.ppc.altivec.vextddvlx(<2 x i64> %a, <2 x i64> %b, i32 %c)
332 declare <2 x i64> @llvm.ppc.altivec.vextddvlx(<2 x i64>, <2 x i64>, i32)
334 define <2 x i64> @testVEXTDDVRX(<2 x i64> %a, <2 x i64> %b, i32 %c) {
335 ; CHECK-LABEL: testVEXTDDVRX:
336 ; CHECK: # %bb.0: # %entry
337 ; CHECK-NEXT: vextddvrx v2, v2, v3, r7
340 %0 = tail call <2 x i64> @llvm.ppc.altivec.vextddvrx(<2 x i64> %a, <2 x i64> %b, i32 %c)
343 declare <2 x i64> @llvm.ppc.altivec.vextddvrx(<2 x i64>, <2 x i64>, i32)