1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -relocation-model=pic -mcpu=pwr9 -mtriple=powerpc64le-unknown-unknown \
3 ; RUN: -verify-machineinstrs -ppc-vsr-nums-as-vr -ppc-asm-full-reg-names < %s \
5 ; RUN: llc -relocation-model=pic -mcpu=pwr8 -mtriple=powerpc64le-unknown-unknown \
6 ; RUN: -verify-machineinstrs -ppc-vsr-nums-as-vr -ppc-asm-full-reg-names < %s \
7 ; RUN: | FileCheck %s -check-prefix=CHECK-P8
9 @f128Array = global [4 x fp128] [fp128 0xL00000000000000004004C00000000000,
10 fp128 0xLF000000000000000400808AB851EB851,
11 fp128 0xL5000000000000000400E0C26324C8366,
12 fp128 0xL8000000000000000400A24E2E147AE14],
15 ; Function Attrs: norecurse nounwind readonly
16 define i64 @qpConv2sdw(fp128* nocapture readonly %a) {
17 ; CHECK-LABEL: qpConv2sdw:
18 ; CHECK: # %bb.0: # %entry
19 ; CHECK-NEXT: lxv v2, 0(r3)
20 ; CHECK-NEXT: xscvqpsdz v2, v2
21 ; CHECK-NEXT: mfvsrd r3, v2
24 ; CHECK-P8-LABEL: qpConv2sdw:
25 ; CHECK-P8: # %bb.0: # %entry
26 ; CHECK-P8-NEXT: mflr r0
27 ; CHECK-P8-NEXT: std r0, 16(r1)
28 ; CHECK-P8-NEXT: stdu r1, -32(r1)
29 ; CHECK-P8-NEXT: .cfi_def_cfa_offset 32
30 ; CHECK-P8-NEXT: .cfi_offset lr, 16
31 ; CHECK-P8-NEXT: lvx v2, 0, r3
32 ; CHECK-P8-NEXT: bl __fixkfdi
34 ; CHECK-P8-NEXT: addi r1, r1, 32
35 ; CHECK-P8-NEXT: ld r0, 16(r1)
36 ; CHECK-P8-NEXT: mtlr r0
39 %0 = load fp128, fp128* %a, align 16
40 %conv = fptosi fp128 %0 to i64
45 ; Function Attrs: norecurse nounwind
46 define void @qpConv2sdw_02(i64* nocapture %res) local_unnamed_addr #1 {
47 ; CHECK-LABEL: qpConv2sdw_02:
48 ; CHECK: # %bb.0: # %entry
49 ; CHECK-NEXT: addis r4, r2, .LC0@toc@ha
50 ; CHECK-NEXT: ld r4, .LC0@toc@l(r4)
51 ; CHECK-NEXT: lxv v2, 32(r4)
52 ; CHECK-NEXT: xscvqpsdz v2, v2
53 ; CHECK-NEXT: stxsd v2, 0(r3)
56 ; CHECK-P8-LABEL: qpConv2sdw_02:
57 ; CHECK-P8: # %bb.0: # %entry
58 ; CHECK-P8-NEXT: mflr r0
59 ; CHECK-P8-NEXT: .cfi_def_cfa_offset 48
60 ; CHECK-P8-NEXT: .cfi_offset lr, 16
61 ; CHECK-P8-NEXT: .cfi_offset r30, -16
62 ; CHECK-P8-NEXT: std r30, -16(r1) # 8-byte Folded Spill
63 ; CHECK-P8-NEXT: std r0, 16(r1)
64 ; CHECK-P8-NEXT: stdu r1, -48(r1)
65 ; CHECK-P8-NEXT: addis r4, r2, .LC0@toc@ha
66 ; CHECK-P8-NEXT: mr r30, r3
67 ; CHECK-P8-NEXT: ld r4, .LC0@toc@l(r4)
68 ; CHECK-P8-NEXT: addi r4, r4, 32
69 ; CHECK-P8-NEXT: lvx v2, 0, r4
70 ; CHECK-P8-NEXT: bl __fixkfdi
72 ; CHECK-P8-NEXT: std r3, 0(r30)
73 ; CHECK-P8-NEXT: addi r1, r1, 48
74 ; CHECK-P8-NEXT: ld r0, 16(r1)
75 ; CHECK-P8-NEXT: ld r30, -16(r1) # 8-byte Folded Reload
76 ; CHECK-P8-NEXT: mtlr r0
79 %0 = load fp128, fp128* getelementptr inbounds
80 ([4 x fp128], [4 x fp128]* @f128Array, i64 0,
82 %conv = fptosi fp128 %0 to i64
83 store i64 %conv, i64* %res, align 8
88 ; Function Attrs: norecurse nounwind readonly
89 define i64 @qpConv2sdw_03(fp128* nocapture readonly %a) {
90 ; CHECK-LABEL: qpConv2sdw_03:
91 ; CHECK: # %bb.0: # %entry
92 ; CHECK-NEXT: lxv v2, 0(r3)
93 ; CHECK-NEXT: addis r3, r2, .LC0@toc@ha
94 ; CHECK-NEXT: ld r3, .LC0@toc@l(r3)
95 ; CHECK-NEXT: lxv v3, 16(r3)
96 ; CHECK-NEXT: xsaddqp v2, v2, v3
97 ; CHECK-NEXT: xscvqpsdz v2, v2
98 ; CHECK-NEXT: mfvsrd r3, v2
101 ; CHECK-P8-LABEL: qpConv2sdw_03:
102 ; CHECK-P8: # %bb.0: # %entry
103 ; CHECK-P8-NEXT: mflr r0
104 ; CHECK-P8-NEXT: std r0, 16(r1)
105 ; CHECK-P8-NEXT: stdu r1, -32(r1)
106 ; CHECK-P8-NEXT: .cfi_def_cfa_offset 32
107 ; CHECK-P8-NEXT: .cfi_offset lr, 16
108 ; CHECK-P8-NEXT: addis r4, r2, .LC0@toc@ha
109 ; CHECK-P8-NEXT: lvx v2, 0, r3
110 ; CHECK-P8-NEXT: ld r4, .LC0@toc@l(r4)
111 ; CHECK-P8-NEXT: addi r4, r4, 16
112 ; CHECK-P8-NEXT: lvx v3, 0, r4
113 ; CHECK-P8-NEXT: bl __addkf3
115 ; CHECK-P8-NEXT: bl __fixkfdi
117 ; CHECK-P8-NEXT: addi r1, r1, 32
118 ; CHECK-P8-NEXT: ld r0, 16(r1)
119 ; CHECK-P8-NEXT: mtlr r0
122 %0 = load fp128, fp128* %a, align 16
123 %1 = load fp128, fp128* getelementptr inbounds
124 ([4 x fp128], [4 x fp128]* @f128Array, i64 0,
126 %add = fadd fp128 %0, %1
127 %conv = fptosi fp128 %add to i64
132 ; Function Attrs: norecurse nounwind
133 define void @qpConv2sdw_04(fp128* nocapture readonly %a,
134 ; CHECK-LABEL: qpConv2sdw_04:
135 ; CHECK: # %bb.0: # %entry
136 ; CHECK-NEXT: lxv v2, 0(r3)
137 ; CHECK-NEXT: lxv v3, 0(r4)
138 ; CHECK-NEXT: xsaddqp v2, v2, v3
139 ; CHECK-NEXT: xscvqpsdz v2, v2
140 ; CHECK-NEXT: stxsd v2, 0(r5)
143 ; CHECK-P8-LABEL: qpConv2sdw_04:
144 ; CHECK-P8: # %bb.0: # %entry
145 ; CHECK-P8-NEXT: mflr r0
146 ; CHECK-P8-NEXT: .cfi_def_cfa_offset 48
147 ; CHECK-P8-NEXT: .cfi_offset lr, 16
148 ; CHECK-P8-NEXT: .cfi_offset r30, -16
149 ; CHECK-P8-NEXT: std r30, -16(r1) # 8-byte Folded Spill
150 ; CHECK-P8-NEXT: std r0, 16(r1)
151 ; CHECK-P8-NEXT: stdu r1, -48(r1)
152 ; CHECK-P8-NEXT: lvx v2, 0, r3
153 ; CHECK-P8-NEXT: lvx v3, 0, r4
154 ; CHECK-P8-NEXT: mr r30, r5
155 ; CHECK-P8-NEXT: bl __addkf3
157 ; CHECK-P8-NEXT: bl __fixkfdi
159 ; CHECK-P8-NEXT: std r3, 0(r30)
160 ; CHECK-P8-NEXT: addi r1, r1, 48
161 ; CHECK-P8-NEXT: ld r0, 16(r1)
162 ; CHECK-P8-NEXT: ld r30, -16(r1) # 8-byte Folded Reload
163 ; CHECK-P8-NEXT: mtlr r0
165 fp128* nocapture readonly %b, i64* nocapture %res) {
167 %0 = load fp128, fp128* %a, align 16
168 %1 = load fp128, fp128* %b, align 16
169 %add = fadd fp128 %0, %1
170 %conv = fptosi fp128 %add to i64
171 store i64 %conv, i64* %res, align 8
176 ; Function Attrs: norecurse nounwind
177 define void @qpConv2sdw_testXForm(i64* nocapture %res, i32 signext %idx) {
178 ; CHECK-LABEL: qpConv2sdw_testXForm:
179 ; CHECK: # %bb.0: # %entry
180 ; CHECK-NEXT: addis r5, r2, .LC0@toc@ha
181 ; CHECK-NEXT: sldi r4, r4, 3
182 ; CHECK-NEXT: ld r5, .LC0@toc@l(r5)
183 ; CHECK-NEXT: lxv v2, 32(r5)
184 ; CHECK-NEXT: xscvqpsdz v2, v2
185 ; CHECK-NEXT: stxsdx v2, r3, r4
188 ; CHECK-P8-LABEL: qpConv2sdw_testXForm:
189 ; CHECK-P8: # %bb.0: # %entry
190 ; CHECK-P8-NEXT: mflr r0
191 ; CHECK-P8-NEXT: .cfi_def_cfa_offset 64
192 ; CHECK-P8-NEXT: .cfi_offset lr, 16
193 ; CHECK-P8-NEXT: .cfi_offset r29, -24
194 ; CHECK-P8-NEXT: .cfi_offset r30, -16
195 ; CHECK-P8-NEXT: std r29, -24(r1) # 8-byte Folded Spill
196 ; CHECK-P8-NEXT: std r30, -16(r1) # 8-byte Folded Spill
197 ; CHECK-P8-NEXT: std r0, 16(r1)
198 ; CHECK-P8-NEXT: stdu r1, -64(r1)
199 ; CHECK-P8-NEXT: mr r30, r4
200 ; CHECK-P8-NEXT: addis r4, r2, .LC0@toc@ha
201 ; CHECK-P8-NEXT: mr r29, r3
202 ; CHECK-P8-NEXT: ld r4, .LC0@toc@l(r4)
203 ; CHECK-P8-NEXT: addi r4, r4, 32
204 ; CHECK-P8-NEXT: lvx v2, 0, r4
205 ; CHECK-P8-NEXT: bl __fixkfdi
207 ; CHECK-P8-NEXT: sldi r4, r30, 3
208 ; CHECK-P8-NEXT: stdx r3, r29, r4
209 ; CHECK-P8-NEXT: addi r1, r1, 64
210 ; CHECK-P8-NEXT: ld r0, 16(r1)
211 ; CHECK-P8-NEXT: ld r30, -16(r1) # 8-byte Folded Reload
212 ; CHECK-P8-NEXT: ld r29, -24(r1) # 8-byte Folded Reload
213 ; CHECK-P8-NEXT: mtlr r0
216 %0 = load fp128, fp128* getelementptr inbounds
217 ([4 x fp128], [4 x fp128]* @f128Array,
218 i64 0, i64 2), align 16
219 %conv = fptosi fp128 %0 to i64
220 %idxprom = sext i32 %idx to i64
221 %arrayidx = getelementptr inbounds i64, i64* %res, i64 %idxprom
222 store i64 %conv, i64* %arrayidx, align 8
227 ; Function Attrs: norecurse nounwind readonly
228 define i64 @qpConv2udw(fp128* nocapture readonly %a) {
229 ; CHECK-LABEL: qpConv2udw:
230 ; CHECK: # %bb.0: # %entry
231 ; CHECK-NEXT: lxv v2, 0(r3)
232 ; CHECK-NEXT: xscvqpudz v2, v2
233 ; CHECK-NEXT: mfvsrd r3, v2
236 ; CHECK-P8-LABEL: qpConv2udw:
237 ; CHECK-P8: # %bb.0: # %entry
238 ; CHECK-P8-NEXT: mflr r0
239 ; CHECK-P8-NEXT: std r0, 16(r1)
240 ; CHECK-P8-NEXT: stdu r1, -32(r1)
241 ; CHECK-P8-NEXT: .cfi_def_cfa_offset 32
242 ; CHECK-P8-NEXT: .cfi_offset lr, 16
243 ; CHECK-P8-NEXT: lvx v2, 0, r3
244 ; CHECK-P8-NEXT: bl __fixunskfdi
246 ; CHECK-P8-NEXT: addi r1, r1, 32
247 ; CHECK-P8-NEXT: ld r0, 16(r1)
248 ; CHECK-P8-NEXT: mtlr r0
251 %0 = load fp128, fp128* %a, align 16
252 %conv = fptoui fp128 %0 to i64
257 ; Function Attrs: norecurse nounwind
258 define void @qpConv2udw_02(i64* nocapture %res) {
259 ; CHECK-LABEL: qpConv2udw_02:
260 ; CHECK: # %bb.0: # %entry
261 ; CHECK-NEXT: addis r4, r2, .LC0@toc@ha
262 ; CHECK-NEXT: ld r4, .LC0@toc@l(r4)
263 ; CHECK-NEXT: lxv v2, 32(r4)
264 ; CHECK-NEXT: xscvqpudz v2, v2
265 ; CHECK-NEXT: stxsd v2, 0(r3)
268 ; CHECK-P8-LABEL: qpConv2udw_02:
269 ; CHECK-P8: # %bb.0: # %entry
270 ; CHECK-P8-NEXT: mflr r0
271 ; CHECK-P8-NEXT: .cfi_def_cfa_offset 48
272 ; CHECK-P8-NEXT: .cfi_offset lr, 16
273 ; CHECK-P8-NEXT: .cfi_offset r30, -16
274 ; CHECK-P8-NEXT: std r30, -16(r1) # 8-byte Folded Spill
275 ; CHECK-P8-NEXT: std r0, 16(r1)
276 ; CHECK-P8-NEXT: stdu r1, -48(r1)
277 ; CHECK-P8-NEXT: addis r4, r2, .LC0@toc@ha
278 ; CHECK-P8-NEXT: mr r30, r3
279 ; CHECK-P8-NEXT: ld r4, .LC0@toc@l(r4)
280 ; CHECK-P8-NEXT: addi r4, r4, 32
281 ; CHECK-P8-NEXT: lvx v2, 0, r4
282 ; CHECK-P8-NEXT: bl __fixunskfdi
284 ; CHECK-P8-NEXT: std r3, 0(r30)
285 ; CHECK-P8-NEXT: addi r1, r1, 48
286 ; CHECK-P8-NEXT: ld r0, 16(r1)
287 ; CHECK-P8-NEXT: ld r30, -16(r1) # 8-byte Folded Reload
288 ; CHECK-P8-NEXT: mtlr r0
291 %0 = load fp128, fp128* getelementptr inbounds
292 ([4 x fp128], [4 x fp128]* @f128Array, i64 0,
294 %conv = fptoui fp128 %0 to i64
295 store i64 %conv, i64* %res, align 8
300 ; Function Attrs: norecurse nounwind readonly
301 define i64 @qpConv2udw_03(fp128* nocapture readonly %a) {
302 ; CHECK-LABEL: qpConv2udw_03:
303 ; CHECK: # %bb.0: # %entry
304 ; CHECK-NEXT: lxv v2, 0(r3)
305 ; CHECK-NEXT: addis r3, r2, .LC0@toc@ha
306 ; CHECK-NEXT: ld r3, .LC0@toc@l(r3)
307 ; CHECK-NEXT: lxv v3, 16(r3)
308 ; CHECK-NEXT: xsaddqp v2, v2, v3
309 ; CHECK-NEXT: xscvqpudz v2, v2
310 ; CHECK-NEXT: mfvsrd r3, v2
313 ; CHECK-P8-LABEL: qpConv2udw_03:
314 ; CHECK-P8: # %bb.0: # %entry
315 ; CHECK-P8-NEXT: mflr r0
316 ; CHECK-P8-NEXT: std r0, 16(r1)
317 ; CHECK-P8-NEXT: stdu r1, -32(r1)
318 ; CHECK-P8-NEXT: .cfi_def_cfa_offset 32
319 ; CHECK-P8-NEXT: .cfi_offset lr, 16
320 ; CHECK-P8-NEXT: addis r4, r2, .LC0@toc@ha
321 ; CHECK-P8-NEXT: lvx v2, 0, r3
322 ; CHECK-P8-NEXT: ld r4, .LC0@toc@l(r4)
323 ; CHECK-P8-NEXT: addi r4, r4, 16
324 ; CHECK-P8-NEXT: lvx v3, 0, r4
325 ; CHECK-P8-NEXT: bl __addkf3
327 ; CHECK-P8-NEXT: bl __fixunskfdi
329 ; CHECK-P8-NEXT: addi r1, r1, 32
330 ; CHECK-P8-NEXT: ld r0, 16(r1)
331 ; CHECK-P8-NEXT: mtlr r0
334 %0 = load fp128, fp128* %a, align 16
335 %1 = load fp128, fp128* getelementptr inbounds
336 ([4 x fp128], [4 x fp128]* @f128Array, i64 0,
338 %add = fadd fp128 %0, %1
339 %conv = fptoui fp128 %add to i64
344 ; Function Attrs: norecurse nounwind
345 define void @qpConv2udw_04(fp128* nocapture readonly %a,
346 ; CHECK-LABEL: qpConv2udw_04:
347 ; CHECK: # %bb.0: # %entry
348 ; CHECK-NEXT: lxv v2, 0(r3)
349 ; CHECK-NEXT: lxv v3, 0(r4)
350 ; CHECK-NEXT: xsaddqp v2, v2, v3
351 ; CHECK-NEXT: xscvqpudz v2, v2
352 ; CHECK-NEXT: stxsd v2, 0(r5)
355 ; CHECK-P8-LABEL: qpConv2udw_04:
356 ; CHECK-P8: # %bb.0: # %entry
357 ; CHECK-P8-NEXT: mflr r0
358 ; CHECK-P8-NEXT: .cfi_def_cfa_offset 48
359 ; CHECK-P8-NEXT: .cfi_offset lr, 16
360 ; CHECK-P8-NEXT: .cfi_offset r30, -16
361 ; CHECK-P8-NEXT: std r30, -16(r1) # 8-byte Folded Spill
362 ; CHECK-P8-NEXT: std r0, 16(r1)
363 ; CHECK-P8-NEXT: stdu r1, -48(r1)
364 ; CHECK-P8-NEXT: lvx v2, 0, r3
365 ; CHECK-P8-NEXT: lvx v3, 0, r4
366 ; CHECK-P8-NEXT: mr r30, r5
367 ; CHECK-P8-NEXT: bl __addkf3
369 ; CHECK-P8-NEXT: bl __fixunskfdi
371 ; CHECK-P8-NEXT: std r3, 0(r30)
372 ; CHECK-P8-NEXT: addi r1, r1, 48
373 ; CHECK-P8-NEXT: ld r0, 16(r1)
374 ; CHECK-P8-NEXT: ld r30, -16(r1) # 8-byte Folded Reload
375 ; CHECK-P8-NEXT: mtlr r0
377 fp128* nocapture readonly %b, i64* nocapture %res) {
379 %0 = load fp128, fp128* %a, align 16
380 %1 = load fp128, fp128* %b, align 16
381 %add = fadd fp128 %0, %1
382 %conv = fptoui fp128 %add to i64
383 store i64 %conv, i64* %res, align 8
388 ; Function Attrs: norecurse nounwind
389 define void @qpConv2udw_testXForm(i64* nocapture %res, i32 signext %idx) {
390 ; CHECK-LABEL: qpConv2udw_testXForm:
391 ; CHECK: # %bb.0: # %entry
392 ; CHECK-NEXT: addis r5, r2, .LC0@toc@ha
393 ; CHECK-NEXT: sldi r4, r4, 3
394 ; CHECK-NEXT: ld r5, .LC0@toc@l(r5)
395 ; CHECK-NEXT: lxv v2, 0(r5)
396 ; CHECK-NEXT: xscvqpudz v2, v2
397 ; CHECK-NEXT: stxsdx v2, r3, r4
400 ; CHECK-P8-LABEL: qpConv2udw_testXForm:
401 ; CHECK-P8: # %bb.0: # %entry
402 ; CHECK-P8-NEXT: mflr r0
403 ; CHECK-P8-NEXT: .cfi_def_cfa_offset 64
404 ; CHECK-P8-NEXT: .cfi_offset lr, 16
405 ; CHECK-P8-NEXT: .cfi_offset r29, -24
406 ; CHECK-P8-NEXT: .cfi_offset r30, -16
407 ; CHECK-P8-NEXT: std r29, -24(r1) # 8-byte Folded Spill
408 ; CHECK-P8-NEXT: std r30, -16(r1) # 8-byte Folded Spill
409 ; CHECK-P8-NEXT: std r0, 16(r1)
410 ; CHECK-P8-NEXT: stdu r1, -64(r1)
411 ; CHECK-P8-NEXT: mr r30, r4
412 ; CHECK-P8-NEXT: addis r4, r2, .LC0@toc@ha
413 ; CHECK-P8-NEXT: mr r29, r3
414 ; CHECK-P8-NEXT: ld r4, .LC0@toc@l(r4)
415 ; CHECK-P8-NEXT: lvx v2, 0, r4
416 ; CHECK-P8-NEXT: bl __fixunskfdi
418 ; CHECK-P8-NEXT: sldi r4, r30, 3
419 ; CHECK-P8-NEXT: stdx r3, r29, r4
420 ; CHECK-P8-NEXT: addi r1, r1, 64
421 ; CHECK-P8-NEXT: ld r0, 16(r1)
422 ; CHECK-P8-NEXT: ld r30, -16(r1) # 8-byte Folded Reload
423 ; CHECK-P8-NEXT: ld r29, -24(r1) # 8-byte Folded Reload
424 ; CHECK-P8-NEXT: mtlr r0
427 %0 = load fp128, fp128* getelementptr inbounds
428 ([4 x fp128], [4 x fp128]* @f128Array,
429 i64 0, i64 0), align 16
430 %conv = fptoui fp128 %0 to i64
431 %idxprom = sext i32 %idx to i64
432 %arrayidx = getelementptr inbounds i64, i64* %res, i64 %idxprom
433 store i64 %conv, i64* %arrayidx, align 8
438 ; Function Attrs: norecurse nounwind readonly
439 define signext i32 @qpConv2sw(fp128* nocapture readonly %a) {
440 ; CHECK-LABEL: qpConv2sw:
441 ; CHECK: # %bb.0: # %entry
442 ; CHECK-NEXT: lxv v2, 0(r3)
443 ; CHECK-NEXT: xscvqpswz v2, v2
444 ; CHECK-NEXT: mfvsrwz r3, v2
445 ; CHECK-NEXT: extsw r3, r3
448 ; CHECK-P8-LABEL: qpConv2sw:
449 ; CHECK-P8: # %bb.0: # %entry
450 ; CHECK-P8-NEXT: mflr r0
451 ; CHECK-P8-NEXT: std r0, 16(r1)
452 ; CHECK-P8-NEXT: stdu r1, -32(r1)
453 ; CHECK-P8-NEXT: .cfi_def_cfa_offset 32
454 ; CHECK-P8-NEXT: .cfi_offset lr, 16
455 ; CHECK-P8-NEXT: lvx v2, 0, r3
456 ; CHECK-P8-NEXT: bl __fixkfsi
458 ; CHECK-P8-NEXT: extsw r3, r3
459 ; CHECK-P8-NEXT: addi r1, r1, 32
460 ; CHECK-P8-NEXT: ld r0, 16(r1)
461 ; CHECK-P8-NEXT: mtlr r0
464 %0 = load fp128, fp128* %a, align 16
465 %conv = fptosi fp128 %0 to i32
470 ; Function Attrs: norecurse nounwind
471 define void @qpConv2sw_02(i32* nocapture %res) {
472 ; CHECK-LABEL: qpConv2sw_02:
473 ; CHECK: # %bb.0: # %entry
474 ; CHECK-NEXT: addis r4, r2, .LC0@toc@ha
475 ; CHECK-NEXT: ld r4, .LC0@toc@l(r4)
476 ; CHECK-NEXT: lxv v2, 32(r4)
477 ; CHECK-NEXT: xscvqpswz v2, v2
478 ; CHECK-NEXT: stxsiwx v2, 0, r3
481 ; CHECK-P8-LABEL: qpConv2sw_02:
482 ; CHECK-P8: # %bb.0: # %entry
483 ; CHECK-P8-NEXT: mflr r0
484 ; CHECK-P8-NEXT: .cfi_def_cfa_offset 48
485 ; CHECK-P8-NEXT: .cfi_offset lr, 16
486 ; CHECK-P8-NEXT: .cfi_offset r30, -16
487 ; CHECK-P8-NEXT: std r30, -16(r1) # 8-byte Folded Spill
488 ; CHECK-P8-NEXT: std r0, 16(r1)
489 ; CHECK-P8-NEXT: stdu r1, -48(r1)
490 ; CHECK-P8-NEXT: addis r4, r2, .LC0@toc@ha
491 ; CHECK-P8-NEXT: mr r30, r3
492 ; CHECK-P8-NEXT: ld r4, .LC0@toc@l(r4)
493 ; CHECK-P8-NEXT: addi r4, r4, 32
494 ; CHECK-P8-NEXT: lvx v2, 0, r4
495 ; CHECK-P8-NEXT: bl __fixkfsi
497 ; CHECK-P8-NEXT: stw r3, 0(r30)
498 ; CHECK-P8-NEXT: addi r1, r1, 48
499 ; CHECK-P8-NEXT: ld r0, 16(r1)
500 ; CHECK-P8-NEXT: ld r30, -16(r1) # 8-byte Folded Reload
501 ; CHECK-P8-NEXT: mtlr r0
504 %0 = load fp128, fp128* getelementptr inbounds
505 ([4 x fp128], [4 x fp128]* @f128Array, i64 0,
507 %conv = fptosi fp128 %0 to i32
508 store i32 %conv, i32* %res, align 4
513 ; Function Attrs: norecurse nounwind readonly
514 define signext i32 @qpConv2sw_03(fp128* nocapture readonly %a) {
515 ; CHECK-LABEL: qpConv2sw_03:
516 ; CHECK: # %bb.0: # %entry
517 ; CHECK-NEXT: lxv v2, 0(r3)
518 ; CHECK-NEXT: addis r3, r2, .LC0@toc@ha
519 ; CHECK-NEXT: ld r3, .LC0@toc@l(r3)
520 ; CHECK-NEXT: lxv v3, 16(r3)
521 ; CHECK-NEXT: xsaddqp v2, v2, v3
522 ; CHECK-NEXT: xscvqpswz v2, v2
523 ; CHECK-NEXT: mfvsrwz r3, v2
524 ; CHECK-NEXT: extsw r3, r3
527 ; CHECK-P8-LABEL: qpConv2sw_03:
528 ; CHECK-P8: # %bb.0: # %entry
529 ; CHECK-P8-NEXT: mflr r0
530 ; CHECK-P8-NEXT: std r0, 16(r1)
531 ; CHECK-P8-NEXT: stdu r1, -32(r1)
532 ; CHECK-P8-NEXT: .cfi_def_cfa_offset 32
533 ; CHECK-P8-NEXT: .cfi_offset lr, 16
534 ; CHECK-P8-NEXT: addis r4, r2, .LC0@toc@ha
535 ; CHECK-P8-NEXT: lvx v2, 0, r3
536 ; CHECK-P8-NEXT: ld r4, .LC0@toc@l(r4)
537 ; CHECK-P8-NEXT: addi r4, r4, 16
538 ; CHECK-P8-NEXT: lvx v3, 0, r4
539 ; CHECK-P8-NEXT: bl __addkf3
541 ; CHECK-P8-NEXT: bl __fixkfsi
543 ; CHECK-P8-NEXT: extsw r3, r3
544 ; CHECK-P8-NEXT: addi r1, r1, 32
545 ; CHECK-P8-NEXT: ld r0, 16(r1)
546 ; CHECK-P8-NEXT: mtlr r0
549 %0 = load fp128, fp128* %a, align 16
550 %1 = load fp128, fp128* getelementptr inbounds
551 ([4 x fp128], [4 x fp128]* @f128Array, i64 0,
553 %add = fadd fp128 %0, %1
554 %conv = fptosi fp128 %add to i32
559 ; Function Attrs: norecurse nounwind
560 define void @qpConv2sw_04(fp128* nocapture readonly %a,
561 ; CHECK-LABEL: qpConv2sw_04:
562 ; CHECK: # %bb.0: # %entry
563 ; CHECK-NEXT: lxv v2, 0(r3)
564 ; CHECK-NEXT: lxv v3, 0(r4)
565 ; CHECK-NEXT: xsaddqp v2, v2, v3
566 ; CHECK-NEXT: xscvqpswz v2, v2
567 ; CHECK-NEXT: stxsiwx v2, 0, r5
570 ; CHECK-P8-LABEL: qpConv2sw_04:
571 ; CHECK-P8: # %bb.0: # %entry
572 ; CHECK-P8-NEXT: mflr r0
573 ; CHECK-P8-NEXT: .cfi_def_cfa_offset 48
574 ; CHECK-P8-NEXT: .cfi_offset lr, 16
575 ; CHECK-P8-NEXT: .cfi_offset r30, -16
576 ; CHECK-P8-NEXT: std r30, -16(r1) # 8-byte Folded Spill
577 ; CHECK-P8-NEXT: std r0, 16(r1)
578 ; CHECK-P8-NEXT: stdu r1, -48(r1)
579 ; CHECK-P8-NEXT: lvx v2, 0, r3
580 ; CHECK-P8-NEXT: lvx v3, 0, r4
581 ; CHECK-P8-NEXT: mr r30, r5
582 ; CHECK-P8-NEXT: bl __addkf3
584 ; CHECK-P8-NEXT: bl __fixkfsi
586 ; CHECK-P8-NEXT: stw r3, 0(r30)
587 ; CHECK-P8-NEXT: addi r1, r1, 48
588 ; CHECK-P8-NEXT: ld r0, 16(r1)
589 ; CHECK-P8-NEXT: ld r30, -16(r1) # 8-byte Folded Reload
590 ; CHECK-P8-NEXT: mtlr r0
592 fp128* nocapture readonly %b, i32* nocapture %res) {
594 %0 = load fp128, fp128* %a, align 16
595 %1 = load fp128, fp128* %b, align 16
596 %add = fadd fp128 %0, %1
597 %conv = fptosi fp128 %add to i32
598 store i32 %conv, i32* %res, align 4
603 ; Function Attrs: norecurse nounwind readonly
604 define zeroext i32 @qpConv2uw(fp128* nocapture readonly %a) {
605 ; CHECK-LABEL: qpConv2uw:
606 ; CHECK: # %bb.0: # %entry
607 ; CHECK-NEXT: lxv v2, 0(r3)
608 ; CHECK-NEXT: xscvqpuwz v2, v2
609 ; CHECK-NEXT: mfvsrwz r3, v2
610 ; CHECK-NEXT: clrldi r3, r3, 32
613 ; CHECK-P8-LABEL: qpConv2uw:
614 ; CHECK-P8: # %bb.0: # %entry
615 ; CHECK-P8-NEXT: mflr r0
616 ; CHECK-P8-NEXT: std r0, 16(r1)
617 ; CHECK-P8-NEXT: stdu r1, -32(r1)
618 ; CHECK-P8-NEXT: .cfi_def_cfa_offset 32
619 ; CHECK-P8-NEXT: .cfi_offset lr, 16
620 ; CHECK-P8-NEXT: lvx v2, 0, r3
621 ; CHECK-P8-NEXT: bl __fixunskfsi
623 ; CHECK-P8-NEXT: addi r1, r1, 32
624 ; CHECK-P8-NEXT: ld r0, 16(r1)
625 ; CHECK-P8-NEXT: mtlr r0
628 %0 = load fp128, fp128* %a, align 16
629 %conv = fptoui fp128 %0 to i32
634 ; Function Attrs: norecurse nounwind
635 define void @qpConv2uw_02(i32* nocapture %res) {
636 ; CHECK-LABEL: qpConv2uw_02:
637 ; CHECK: # %bb.0: # %entry
638 ; CHECK-NEXT: addis r4, r2, .LC0@toc@ha
639 ; CHECK-NEXT: ld r4, .LC0@toc@l(r4)
640 ; CHECK-NEXT: lxv v2, 32(r4)
641 ; CHECK-NEXT: xscvqpuwz v2, v2
642 ; CHECK-NEXT: stxsiwx v2, 0, r3
645 ; CHECK-P8-LABEL: qpConv2uw_02:
646 ; CHECK-P8: # %bb.0: # %entry
647 ; CHECK-P8-NEXT: mflr r0
648 ; CHECK-P8-NEXT: .cfi_def_cfa_offset 48
649 ; CHECK-P8-NEXT: .cfi_offset lr, 16
650 ; CHECK-P8-NEXT: .cfi_offset r30, -16
651 ; CHECK-P8-NEXT: std r30, -16(r1) # 8-byte Folded Spill
652 ; CHECK-P8-NEXT: std r0, 16(r1)
653 ; CHECK-P8-NEXT: stdu r1, -48(r1)
654 ; CHECK-P8-NEXT: addis r4, r2, .LC0@toc@ha
655 ; CHECK-P8-NEXT: mr r30, r3
656 ; CHECK-P8-NEXT: ld r4, .LC0@toc@l(r4)
657 ; CHECK-P8-NEXT: addi r4, r4, 32
658 ; CHECK-P8-NEXT: lvx v2, 0, r4
659 ; CHECK-P8-NEXT: bl __fixunskfsi
661 ; CHECK-P8-NEXT: stw r3, 0(r30)
662 ; CHECK-P8-NEXT: addi r1, r1, 48
663 ; CHECK-P8-NEXT: ld r0, 16(r1)
664 ; CHECK-P8-NEXT: ld r30, -16(r1) # 8-byte Folded Reload
665 ; CHECK-P8-NEXT: mtlr r0
668 %0 = load fp128, fp128* getelementptr inbounds
669 ([4 x fp128], [4 x fp128]* @f128Array, i64 0,
671 %conv = fptoui fp128 %0 to i32
672 store i32 %conv, i32* %res, align 4
677 ; Function Attrs: norecurse nounwind readonly
678 define zeroext i32 @qpConv2uw_03(fp128* nocapture readonly %a) {
679 ; CHECK-LABEL: qpConv2uw_03:
680 ; CHECK: # %bb.0: # %entry
681 ; CHECK-NEXT: lxv v2, 0(r3)
682 ; CHECK-NEXT: addis r3, r2, .LC0@toc@ha
683 ; CHECK-NEXT: ld r3, .LC0@toc@l(r3)
684 ; CHECK-NEXT: lxv v3, 16(r3)
685 ; CHECK-NEXT: xsaddqp v2, v2, v3
686 ; CHECK-NEXT: xscvqpuwz v2, v2
687 ; CHECK-NEXT: mfvsrwz r3, v2
688 ; CHECK-NEXT: clrldi r3, r3, 32
691 ; CHECK-P8-LABEL: qpConv2uw_03:
692 ; CHECK-P8: # %bb.0: # %entry
693 ; CHECK-P8-NEXT: mflr r0
694 ; CHECK-P8-NEXT: std r0, 16(r1)
695 ; CHECK-P8-NEXT: stdu r1, -32(r1)
696 ; CHECK-P8-NEXT: .cfi_def_cfa_offset 32
697 ; CHECK-P8-NEXT: .cfi_offset lr, 16
698 ; CHECK-P8-NEXT: addis r4, r2, .LC0@toc@ha
699 ; CHECK-P8-NEXT: lvx v2, 0, r3
700 ; CHECK-P8-NEXT: ld r4, .LC0@toc@l(r4)
701 ; CHECK-P8-NEXT: addi r4, r4, 16
702 ; CHECK-P8-NEXT: lvx v3, 0, r4
703 ; CHECK-P8-NEXT: bl __addkf3
705 ; CHECK-P8-NEXT: bl __fixunskfsi
707 ; CHECK-P8-NEXT: addi r1, r1, 32
708 ; CHECK-P8-NEXT: ld r0, 16(r1)
709 ; CHECK-P8-NEXT: mtlr r0
712 %0 = load fp128, fp128* %a, align 16
713 %1 = load fp128, fp128* getelementptr inbounds
714 ([4 x fp128], [4 x fp128]* @f128Array, i64 0,
716 %add = fadd fp128 %0, %1
717 %conv = fptoui fp128 %add to i32
722 ; Function Attrs: norecurse nounwind
723 define void @qpConv2uw_04(fp128* nocapture readonly %a,
724 ; CHECK-LABEL: qpConv2uw_04:
725 ; CHECK: # %bb.0: # %entry
726 ; CHECK-NEXT: lxv v2, 0(r3)
727 ; CHECK-NEXT: lxv v3, 0(r4)
728 ; CHECK-NEXT: xsaddqp v2, v2, v3
729 ; CHECK-NEXT: xscvqpuwz v2, v2
730 ; CHECK-NEXT: stxsiwx v2, 0, r5
733 ; CHECK-P8-LABEL: qpConv2uw_04:
734 ; CHECK-P8: # %bb.0: # %entry
735 ; CHECK-P8-NEXT: mflr r0
736 ; CHECK-P8-NEXT: .cfi_def_cfa_offset 48
737 ; CHECK-P8-NEXT: .cfi_offset lr, 16
738 ; CHECK-P8-NEXT: .cfi_offset r30, -16
739 ; CHECK-P8-NEXT: std r30, -16(r1) # 8-byte Folded Spill
740 ; CHECK-P8-NEXT: std r0, 16(r1)
741 ; CHECK-P8-NEXT: stdu r1, -48(r1)
742 ; CHECK-P8-NEXT: lvx v2, 0, r3
743 ; CHECK-P8-NEXT: lvx v3, 0, r4
744 ; CHECK-P8-NEXT: mr r30, r5
745 ; CHECK-P8-NEXT: bl __addkf3
747 ; CHECK-P8-NEXT: bl __fixunskfsi
749 ; CHECK-P8-NEXT: stw r3, 0(r30)
750 ; CHECK-P8-NEXT: addi r1, r1, 48
751 ; CHECK-P8-NEXT: ld r0, 16(r1)
752 ; CHECK-P8-NEXT: ld r30, -16(r1) # 8-byte Folded Reload
753 ; CHECK-P8-NEXT: mtlr r0
755 fp128* nocapture readonly %b, i32* nocapture %res) {
757 %0 = load fp128, fp128* %a, align 16
758 %1 = load fp128, fp128* %b, align 16
759 %add = fadd fp128 %0, %1
760 %conv = fptoui fp128 %add to i32
761 store i32 %conv, i32* %res, align 4
767 ; Function Attrs: norecurse nounwind readonly
768 define signext i16 @qpConv2shw(fp128* nocapture readonly %a) {
769 ; CHECK-LABEL: qpConv2shw:
770 ; CHECK: # %bb.0: # %entry
771 ; CHECK-NEXT: lxv v2, 0(r3)
772 ; CHECK-NEXT: xscvqpswz v2, v2
773 ; CHECK-NEXT: mfvsrwz r3, v2
774 ; CHECK-NEXT: extsw r3, r3
777 ; CHECK-P8-LABEL: qpConv2shw:
778 ; CHECK-P8: # %bb.0: # %entry
779 ; CHECK-P8-NEXT: mflr r0
780 ; CHECK-P8-NEXT: std r0, 16(r1)
781 ; CHECK-P8-NEXT: stdu r1, -32(r1)
782 ; CHECK-P8-NEXT: .cfi_def_cfa_offset 32
783 ; CHECK-P8-NEXT: .cfi_offset lr, 16
784 ; CHECK-P8-NEXT: lvx v2, 0, r3
785 ; CHECK-P8-NEXT: bl __fixkfsi
787 ; CHECK-P8-NEXT: extsw r3, r3
788 ; CHECK-P8-NEXT: addi r1, r1, 32
789 ; CHECK-P8-NEXT: ld r0, 16(r1)
790 ; CHECK-P8-NEXT: mtlr r0
793 %0 = load fp128, fp128* %a, align 16
794 %conv = fptosi fp128 %0 to i16
798 ; Function Attrs: norecurse nounwind
799 define void @qpConv2shw_02(i16* nocapture %res) {
800 ; CHECK-LABEL: qpConv2shw_02:
801 ; CHECK: # %bb.0: # %entry
802 ; CHECK-NEXT: addis r4, r2, .LC0@toc@ha
803 ; CHECK-NEXT: ld r4, .LC0@toc@l(r4)
804 ; CHECK-NEXT: lxv v2, 32(r4)
805 ; CHECK-NEXT: xscvqpswz v2, v2
806 ; CHECK-NEXT: stxsihx v2, 0, r3
809 ; CHECK-P8-LABEL: qpConv2shw_02:
810 ; CHECK-P8: # %bb.0: # %entry
811 ; CHECK-P8-NEXT: mflr r0
812 ; CHECK-P8-NEXT: .cfi_def_cfa_offset 48
813 ; CHECK-P8-NEXT: .cfi_offset lr, 16
814 ; CHECK-P8-NEXT: .cfi_offset r30, -16
815 ; CHECK-P8-NEXT: std r30, -16(r1) # 8-byte Folded Spill
816 ; CHECK-P8-NEXT: std r0, 16(r1)
817 ; CHECK-P8-NEXT: stdu r1, -48(r1)
818 ; CHECK-P8-NEXT: addis r4, r2, .LC0@toc@ha
819 ; CHECK-P8-NEXT: mr r30, r3
820 ; CHECK-P8-NEXT: ld r4, .LC0@toc@l(r4)
821 ; CHECK-P8-NEXT: addi r4, r4, 32
822 ; CHECK-P8-NEXT: lvx v2, 0, r4
823 ; CHECK-P8-NEXT: bl __fixkfsi
825 ; CHECK-P8-NEXT: sth r3, 0(r30)
826 ; CHECK-P8-NEXT: addi r1, r1, 48
827 ; CHECK-P8-NEXT: ld r0, 16(r1)
828 ; CHECK-P8-NEXT: ld r30, -16(r1) # 8-byte Folded Reload
829 ; CHECK-P8-NEXT: mtlr r0
832 %0 = load fp128, fp128* getelementptr inbounds
833 ([4 x fp128], [4 x fp128]* @f128Array,
834 i64 0, i64 2), align 16
835 %conv = fptosi fp128 %0 to i16
836 store i16 %conv, i16* %res, align 2
840 ; Function Attrs: norecurse nounwind readonly
841 define signext i16 @qpConv2shw_03(fp128* nocapture readonly %a) {
842 ; CHECK-LABEL: qpConv2shw_03:
843 ; CHECK: # %bb.0: # %entry
844 ; CHECK-NEXT: lxv v2, 0(r3)
845 ; CHECK-NEXT: addis r3, r2, .LC0@toc@ha
846 ; CHECK-NEXT: ld r3, .LC0@toc@l(r3)
847 ; CHECK-NEXT: lxv v3, 16(r3)
848 ; CHECK-NEXT: xsaddqp v2, v2, v3
849 ; CHECK-NEXT: xscvqpswz v2, v2
850 ; CHECK-NEXT: mfvsrwz r3, v2
851 ; CHECK-NEXT: extsw r3, r3
854 ; CHECK-P8-LABEL: qpConv2shw_03:
855 ; CHECK-P8: # %bb.0: # %entry
856 ; CHECK-P8-NEXT: mflr r0
857 ; CHECK-P8-NEXT: std r0, 16(r1)
858 ; CHECK-P8-NEXT: stdu r1, -32(r1)
859 ; CHECK-P8-NEXT: .cfi_def_cfa_offset 32
860 ; CHECK-P8-NEXT: .cfi_offset lr, 16
861 ; CHECK-P8-NEXT: addis r4, r2, .LC0@toc@ha
862 ; CHECK-P8-NEXT: lvx v2, 0, r3
863 ; CHECK-P8-NEXT: ld r4, .LC0@toc@l(r4)
864 ; CHECK-P8-NEXT: addi r4, r4, 16
865 ; CHECK-P8-NEXT: lvx v3, 0, r4
866 ; CHECK-P8-NEXT: bl __addkf3
868 ; CHECK-P8-NEXT: bl __fixkfsi
870 ; CHECK-P8-NEXT: extsw r3, r3
871 ; CHECK-P8-NEXT: addi r1, r1, 32
872 ; CHECK-P8-NEXT: ld r0, 16(r1)
873 ; CHECK-P8-NEXT: mtlr r0
876 %0 = load fp128, fp128* %a, align 16
877 %1 = load fp128, fp128* getelementptr inbounds
878 ([4 x fp128], [4 x fp128]* @f128Array,
879 i64 0, i64 1), align 16
880 %add = fadd fp128 %0, %1
881 %conv = fptosi fp128 %add to i16
885 ; Function Attrs: norecurse nounwind
886 define void @qpConv2shw_04(fp128* nocapture readonly %a,
887 ; CHECK-LABEL: qpConv2shw_04:
888 ; CHECK: # %bb.0: # %entry
889 ; CHECK-NEXT: lxv v2, 0(r3)
890 ; CHECK-NEXT: lxv v3, 0(r4)
891 ; CHECK-NEXT: xsaddqp v2, v2, v3
892 ; CHECK-NEXT: xscvqpswz v2, v2
893 ; CHECK-NEXT: stxsihx v2, 0, r5
896 ; CHECK-P8-LABEL: qpConv2shw_04:
897 ; CHECK-P8: # %bb.0: # %entry
898 ; CHECK-P8-NEXT: mflr r0
899 ; CHECK-P8-NEXT: .cfi_def_cfa_offset 48
900 ; CHECK-P8-NEXT: .cfi_offset lr, 16
901 ; CHECK-P8-NEXT: .cfi_offset r30, -16
902 ; CHECK-P8-NEXT: std r30, -16(r1) # 8-byte Folded Spill
903 ; CHECK-P8-NEXT: std r0, 16(r1)
904 ; CHECK-P8-NEXT: stdu r1, -48(r1)
905 ; CHECK-P8-NEXT: lvx v2, 0, r3
906 ; CHECK-P8-NEXT: lvx v3, 0, r4
907 ; CHECK-P8-NEXT: mr r30, r5
908 ; CHECK-P8-NEXT: bl __addkf3
910 ; CHECK-P8-NEXT: bl __fixkfsi
912 ; CHECK-P8-NEXT: sth r3, 0(r30)
913 ; CHECK-P8-NEXT: addi r1, r1, 48
914 ; CHECK-P8-NEXT: ld r0, 16(r1)
915 ; CHECK-P8-NEXT: ld r30, -16(r1) # 8-byte Folded Reload
916 ; CHECK-P8-NEXT: mtlr r0
918 fp128* nocapture readonly %b, i16* nocapture %res) {
920 %0 = load fp128, fp128* %a, align 16
921 %1 = load fp128, fp128* %b, align 16
922 %add = fadd fp128 %0, %1
923 %conv = fptosi fp128 %add to i16
924 store i16 %conv, i16* %res, align 2
928 ; Function Attrs: norecurse nounwind readonly
929 define zeroext i16 @qpConv2uhw(fp128* nocapture readonly %a) {
930 ; CHECK-LABEL: qpConv2uhw:
931 ; CHECK: # %bb.0: # %entry
932 ; CHECK-NEXT: lxv v2, 0(r3)
933 ; CHECK-NEXT: xscvqpswz v2, v2
934 ; CHECK-NEXT: mfvsrwz r3, v2
935 ; CHECK-NEXT: clrldi r3, r3, 32
938 ; CHECK-P8-LABEL: qpConv2uhw:
939 ; CHECK-P8: # %bb.0: # %entry
940 ; CHECK-P8-NEXT: mflr r0
941 ; CHECK-P8-NEXT: std r0, 16(r1)
942 ; CHECK-P8-NEXT: stdu r1, -32(r1)
943 ; CHECK-P8-NEXT: .cfi_def_cfa_offset 32
944 ; CHECK-P8-NEXT: .cfi_offset lr, 16
945 ; CHECK-P8-NEXT: lvx v2, 0, r3
946 ; CHECK-P8-NEXT: bl __fixkfsi
948 ; CHECK-P8-NEXT: addi r1, r1, 32
949 ; CHECK-P8-NEXT: ld r0, 16(r1)
950 ; CHECK-P8-NEXT: mtlr r0
953 %0 = load fp128, fp128* %a, align 16
954 %conv = fptoui fp128 %0 to i16
958 ; Function Attrs: norecurse nounwind
959 define void @qpConv2uhw_02(i16* nocapture %res) {
960 ; CHECK-LABEL: qpConv2uhw_02:
961 ; CHECK: # %bb.0: # %entry
962 ; CHECK-NEXT: addis r4, r2, .LC0@toc@ha
963 ; CHECK-NEXT: ld r4, .LC0@toc@l(r4)
964 ; CHECK-NEXT: lxv v2, 32(r4)
965 ; CHECK-NEXT: xscvqpuwz v2, v2
966 ; CHECK-NEXT: stxsihx v2, 0, r3
969 ; CHECK-P8-LABEL: qpConv2uhw_02:
970 ; CHECK-P8: # %bb.0: # %entry
971 ; CHECK-P8-NEXT: mflr r0
972 ; CHECK-P8-NEXT: .cfi_def_cfa_offset 48
973 ; CHECK-P8-NEXT: .cfi_offset lr, 16
974 ; CHECK-P8-NEXT: .cfi_offset r30, -16
975 ; CHECK-P8-NEXT: std r30, -16(r1) # 8-byte Folded Spill
976 ; CHECK-P8-NEXT: std r0, 16(r1)
977 ; CHECK-P8-NEXT: stdu r1, -48(r1)
978 ; CHECK-P8-NEXT: addis r4, r2, .LC0@toc@ha
979 ; CHECK-P8-NEXT: mr r30, r3
980 ; CHECK-P8-NEXT: ld r4, .LC0@toc@l(r4)
981 ; CHECK-P8-NEXT: addi r4, r4, 32
982 ; CHECK-P8-NEXT: lvx v2, 0, r4
983 ; CHECK-P8-NEXT: bl __fixkfsi
985 ; CHECK-P8-NEXT: sth r3, 0(r30)
986 ; CHECK-P8-NEXT: addi r1, r1, 48
987 ; CHECK-P8-NEXT: ld r0, 16(r1)
988 ; CHECK-P8-NEXT: ld r30, -16(r1) # 8-byte Folded Reload
989 ; CHECK-P8-NEXT: mtlr r0
992 %0 = load fp128, fp128* getelementptr inbounds
993 ([4 x fp128], [4 x fp128]* @f128Array,
994 i64 0, i64 2), align 16
995 %conv = fptoui fp128 %0 to i16
996 store i16 %conv, i16* %res, align 2
1000 ; Function Attrs: norecurse nounwind readonly
1001 define zeroext i16 @qpConv2uhw_03(fp128* nocapture readonly %a) {
1002 ; CHECK-LABEL: qpConv2uhw_03:
1003 ; CHECK: # %bb.0: # %entry
1004 ; CHECK-NEXT: lxv v2, 0(r3)
1005 ; CHECK-NEXT: addis r3, r2, .LC0@toc@ha
1006 ; CHECK-NEXT: ld r3, .LC0@toc@l(r3)
1007 ; CHECK-NEXT: lxv v3, 16(r3)
1008 ; CHECK-NEXT: xsaddqp v2, v2, v3
1009 ; CHECK-NEXT: xscvqpswz v2, v2
1010 ; CHECK-NEXT: mfvsrwz r3, v2
1011 ; CHECK-NEXT: clrldi r3, r3, 32
1014 ; CHECK-P8-LABEL: qpConv2uhw_03:
1015 ; CHECK-P8: # %bb.0: # %entry
1016 ; CHECK-P8-NEXT: mflr r0
1017 ; CHECK-P8-NEXT: std r0, 16(r1)
1018 ; CHECK-P8-NEXT: stdu r1, -32(r1)
1019 ; CHECK-P8-NEXT: .cfi_def_cfa_offset 32
1020 ; CHECK-P8-NEXT: .cfi_offset lr, 16
1021 ; CHECK-P8-NEXT: addis r4, r2, .LC0@toc@ha
1022 ; CHECK-P8-NEXT: lvx v2, 0, r3
1023 ; CHECK-P8-NEXT: ld r4, .LC0@toc@l(r4)
1024 ; CHECK-P8-NEXT: addi r4, r4, 16
1025 ; CHECK-P8-NEXT: lvx v3, 0, r4
1026 ; CHECK-P8-NEXT: bl __addkf3
1027 ; CHECK-P8-NEXT: nop
1028 ; CHECK-P8-NEXT: bl __fixkfsi
1029 ; CHECK-P8-NEXT: nop
1030 ; CHECK-P8-NEXT: addi r1, r1, 32
1031 ; CHECK-P8-NEXT: ld r0, 16(r1)
1032 ; CHECK-P8-NEXT: mtlr r0
1033 ; CHECK-P8-NEXT: blr
1035 %0 = load fp128, fp128* %a, align 16
1036 %1 = load fp128, fp128* getelementptr inbounds
1037 ([4 x fp128], [4 x fp128]* @f128Array,
1038 i64 0, i64 1), align 16
1039 %add = fadd fp128 %0, %1
1040 %conv = fptoui fp128 %add to i16
1044 ; Function Attrs: norecurse nounwind
1045 define void @qpConv2uhw_04(fp128* nocapture readonly %a,
1046 ; CHECK-LABEL: qpConv2uhw_04:
1047 ; CHECK: # %bb.0: # %entry
1048 ; CHECK-NEXT: lxv v2, 0(r3)
1049 ; CHECK-NEXT: lxv v3, 0(r4)
1050 ; CHECK-NEXT: xsaddqp v2, v2, v3
1051 ; CHECK-NEXT: xscvqpuwz v2, v2
1052 ; CHECK-NEXT: stxsihx v2, 0, r5
1055 ; CHECK-P8-LABEL: qpConv2uhw_04:
1056 ; CHECK-P8: # %bb.0: # %entry
1057 ; CHECK-P8-NEXT: mflr r0
1058 ; CHECK-P8-NEXT: .cfi_def_cfa_offset 48
1059 ; CHECK-P8-NEXT: .cfi_offset lr, 16
1060 ; CHECK-P8-NEXT: .cfi_offset r30, -16
1061 ; CHECK-P8-NEXT: std r30, -16(r1) # 8-byte Folded Spill
1062 ; CHECK-P8-NEXT: std r0, 16(r1)
1063 ; CHECK-P8-NEXT: stdu r1, -48(r1)
1064 ; CHECK-P8-NEXT: lvx v2, 0, r3
1065 ; CHECK-P8-NEXT: lvx v3, 0, r4
1066 ; CHECK-P8-NEXT: mr r30, r5
1067 ; CHECK-P8-NEXT: bl __addkf3
1068 ; CHECK-P8-NEXT: nop
1069 ; CHECK-P8-NEXT: bl __fixkfsi
1070 ; CHECK-P8-NEXT: nop
1071 ; CHECK-P8-NEXT: sth r3, 0(r30)
1072 ; CHECK-P8-NEXT: addi r1, r1, 48
1073 ; CHECK-P8-NEXT: ld r0, 16(r1)
1074 ; CHECK-P8-NEXT: ld r30, -16(r1) # 8-byte Folded Reload
1075 ; CHECK-P8-NEXT: mtlr r0
1076 ; CHECK-P8-NEXT: blr
1077 fp128* nocapture readonly %b, i16* nocapture %res) {
1079 %0 = load fp128, fp128* %a, align 16
1080 %1 = load fp128, fp128* %b, align 16
1081 %add = fadd fp128 %0, %1
1082 %conv = fptoui fp128 %add to i16
1083 store i16 %conv, i16* %res, align 2
1087 ; Function Attrs: norecurse nounwind readonly
1088 define signext i8 @qpConv2sb(fp128* nocapture readonly %a) {
1089 ; CHECK-LABEL: qpConv2sb:
1090 ; CHECK: # %bb.0: # %entry
1091 ; CHECK-NEXT: lxv v2, 0(r3)
1092 ; CHECK-NEXT: xscvqpswz v2, v2
1093 ; CHECK-NEXT: mfvsrwz r3, v2
1094 ; CHECK-NEXT: extsw r3, r3
1097 ; CHECK-P8-LABEL: qpConv2sb:
1098 ; CHECK-P8: # %bb.0: # %entry
1099 ; CHECK-P8-NEXT: mflr r0
1100 ; CHECK-P8-NEXT: std r0, 16(r1)
1101 ; CHECK-P8-NEXT: stdu r1, -32(r1)
1102 ; CHECK-P8-NEXT: .cfi_def_cfa_offset 32
1103 ; CHECK-P8-NEXT: .cfi_offset lr, 16
1104 ; CHECK-P8-NEXT: lvx v2, 0, r3
1105 ; CHECK-P8-NEXT: bl __fixkfsi
1106 ; CHECK-P8-NEXT: nop
1107 ; CHECK-P8-NEXT: extsw r3, r3
1108 ; CHECK-P8-NEXT: addi r1, r1, 32
1109 ; CHECK-P8-NEXT: ld r0, 16(r1)
1110 ; CHECK-P8-NEXT: mtlr r0
1111 ; CHECK-P8-NEXT: blr
1113 %0 = load fp128, fp128* %a, align 16
1114 %conv = fptosi fp128 %0 to i8
1118 ; Function Attrs: norecurse nounwind
1119 define void @qpConv2sb_02(i8* nocapture %res) {
1120 ; CHECK-LABEL: qpConv2sb_02:
1121 ; CHECK: # %bb.0: # %entry
1122 ; CHECK-NEXT: addis r4, r2, .LC0@toc@ha
1123 ; CHECK-NEXT: ld r4, .LC0@toc@l(r4)
1124 ; CHECK-NEXT: lxv v2, 32(r4)
1125 ; CHECK-NEXT: xscvqpswz v2, v2
1126 ; CHECK-NEXT: stxsibx v2, 0, r3
1129 ; CHECK-P8-LABEL: qpConv2sb_02:
1130 ; CHECK-P8: # %bb.0: # %entry
1131 ; CHECK-P8-NEXT: mflr r0
1132 ; CHECK-P8-NEXT: .cfi_def_cfa_offset 48
1133 ; CHECK-P8-NEXT: .cfi_offset lr, 16
1134 ; CHECK-P8-NEXT: .cfi_offset r30, -16
1135 ; CHECK-P8-NEXT: std r30, -16(r1) # 8-byte Folded Spill
1136 ; CHECK-P8-NEXT: std r0, 16(r1)
1137 ; CHECK-P8-NEXT: stdu r1, -48(r1)
1138 ; CHECK-P8-NEXT: addis r4, r2, .LC0@toc@ha
1139 ; CHECK-P8-NEXT: mr r30, r3
1140 ; CHECK-P8-NEXT: ld r4, .LC0@toc@l(r4)
1141 ; CHECK-P8-NEXT: addi r4, r4, 32
1142 ; CHECK-P8-NEXT: lvx v2, 0, r4
1143 ; CHECK-P8-NEXT: bl __fixkfsi
1144 ; CHECK-P8-NEXT: nop
1145 ; CHECK-P8-NEXT: stb r3, 0(r30)
1146 ; CHECK-P8-NEXT: addi r1, r1, 48
1147 ; CHECK-P8-NEXT: ld r0, 16(r1)
1148 ; CHECK-P8-NEXT: ld r30, -16(r1) # 8-byte Folded Reload
1149 ; CHECK-P8-NEXT: mtlr r0
1150 ; CHECK-P8-NEXT: blr
1152 %0 = load fp128, fp128* getelementptr inbounds
1153 ([4 x fp128], [4 x fp128]* @f128Array,
1154 i64 0, i64 2), align 16
1155 %conv = fptosi fp128 %0 to i8
1156 store i8 %conv, i8* %res, align 1
1160 ; Function Attrs: norecurse nounwind readonly
1161 define signext i8 @qpConv2sb_03(fp128* nocapture readonly %a) {
1162 ; CHECK-LABEL: qpConv2sb_03:
1163 ; CHECK: # %bb.0: # %entry
1164 ; CHECK-NEXT: lxv v2, 0(r3)
1165 ; CHECK-NEXT: addis r3, r2, .LC0@toc@ha
1166 ; CHECK-NEXT: ld r3, .LC0@toc@l(r3)
1167 ; CHECK-NEXT: lxv v3, 16(r3)
1168 ; CHECK-NEXT: xsaddqp v2, v2, v3
1169 ; CHECK-NEXT: xscvqpswz v2, v2
1170 ; CHECK-NEXT: mfvsrwz r3, v2
1171 ; CHECK-NEXT: extsw r3, r3
1174 ; CHECK-P8-LABEL: qpConv2sb_03:
1175 ; CHECK-P8: # %bb.0: # %entry
1176 ; CHECK-P8-NEXT: mflr r0
1177 ; CHECK-P8-NEXT: std r0, 16(r1)
1178 ; CHECK-P8-NEXT: stdu r1, -32(r1)
1179 ; CHECK-P8-NEXT: .cfi_def_cfa_offset 32
1180 ; CHECK-P8-NEXT: .cfi_offset lr, 16
1181 ; CHECK-P8-NEXT: addis r4, r2, .LC0@toc@ha
1182 ; CHECK-P8-NEXT: lvx v2, 0, r3
1183 ; CHECK-P8-NEXT: ld r4, .LC0@toc@l(r4)
1184 ; CHECK-P8-NEXT: addi r4, r4, 16
1185 ; CHECK-P8-NEXT: lvx v3, 0, r4
1186 ; CHECK-P8-NEXT: bl __addkf3
1187 ; CHECK-P8-NEXT: nop
1188 ; CHECK-P8-NEXT: bl __fixkfsi
1189 ; CHECK-P8-NEXT: nop
1190 ; CHECK-P8-NEXT: extsw r3, r3
1191 ; CHECK-P8-NEXT: addi r1, r1, 32
1192 ; CHECK-P8-NEXT: ld r0, 16(r1)
1193 ; CHECK-P8-NEXT: mtlr r0
1194 ; CHECK-P8-NEXT: blr
1196 %0 = load fp128, fp128* %a, align 16
1197 %1 = load fp128, fp128* getelementptr inbounds
1198 ([4 x fp128], [4 x fp128]* @f128Array,
1199 i64 0, i64 1), align 16
1200 %add = fadd fp128 %0, %1
1201 %conv = fptosi fp128 %add to i8
1205 ; Function Attrs: norecurse nounwind
1206 define void @qpConv2sb_04(fp128* nocapture readonly %a,
1207 ; CHECK-LABEL: qpConv2sb_04:
1208 ; CHECK: # %bb.0: # %entry
1209 ; CHECK-NEXT: lxv v2, 0(r3)
1210 ; CHECK-NEXT: lxv v3, 0(r4)
1211 ; CHECK-NEXT: xsaddqp v2, v2, v3
1212 ; CHECK-NEXT: xscvqpswz v2, v2
1213 ; CHECK-NEXT: stxsibx v2, 0, r5
1216 ; CHECK-P8-LABEL: qpConv2sb_04:
1217 ; CHECK-P8: # %bb.0: # %entry
1218 ; CHECK-P8-NEXT: mflr r0
1219 ; CHECK-P8-NEXT: .cfi_def_cfa_offset 48
1220 ; CHECK-P8-NEXT: .cfi_offset lr, 16
1221 ; CHECK-P8-NEXT: .cfi_offset r30, -16
1222 ; CHECK-P8-NEXT: std r30, -16(r1) # 8-byte Folded Spill
1223 ; CHECK-P8-NEXT: std r0, 16(r1)
1224 ; CHECK-P8-NEXT: stdu r1, -48(r1)
1225 ; CHECK-P8-NEXT: lvx v2, 0, r3
1226 ; CHECK-P8-NEXT: lvx v3, 0, r4
1227 ; CHECK-P8-NEXT: mr r30, r5
1228 ; CHECK-P8-NEXT: bl __addkf3
1229 ; CHECK-P8-NEXT: nop
1230 ; CHECK-P8-NEXT: bl __fixkfsi
1231 ; CHECK-P8-NEXT: nop
1232 ; CHECK-P8-NEXT: stb r3, 0(r30)
1233 ; CHECK-P8-NEXT: addi r1, r1, 48
1234 ; CHECK-P8-NEXT: ld r0, 16(r1)
1235 ; CHECK-P8-NEXT: ld r30, -16(r1) # 8-byte Folded Reload
1236 ; CHECK-P8-NEXT: mtlr r0
1237 ; CHECK-P8-NEXT: blr
1238 fp128* nocapture readonly %b, i8* nocapture %res) {
1240 %0 = load fp128, fp128* %a, align 16
1241 %1 = load fp128, fp128* %b, align 16
1242 %add = fadd fp128 %0, %1
1243 %conv = fptosi fp128 %add to i8
1244 store i8 %conv, i8* %res, align 1
1248 ; Function Attrs: norecurse nounwind readonly
1249 define zeroext i8 @qpConv2ub(fp128* nocapture readonly %a) {
1250 ; CHECK-LABEL: qpConv2ub:
1251 ; CHECK: # %bb.0: # %entry
1252 ; CHECK-NEXT: lxv v2, 0(r3)
1253 ; CHECK-NEXT: xscvqpswz v2, v2
1254 ; CHECK-NEXT: mfvsrwz r3, v2
1255 ; CHECK-NEXT: clrldi r3, r3, 32
1258 ; CHECK-P8-LABEL: qpConv2ub:
1259 ; CHECK-P8: # %bb.0: # %entry
1260 ; CHECK-P8-NEXT: mflr r0
1261 ; CHECK-P8-NEXT: std r0, 16(r1)
1262 ; CHECK-P8-NEXT: stdu r1, -32(r1)
1263 ; CHECK-P8-NEXT: .cfi_def_cfa_offset 32
1264 ; CHECK-P8-NEXT: .cfi_offset lr, 16
1265 ; CHECK-P8-NEXT: lvx v2, 0, r3
1266 ; CHECK-P8-NEXT: bl __fixkfsi
1267 ; CHECK-P8-NEXT: nop
1268 ; CHECK-P8-NEXT: addi r1, r1, 32
1269 ; CHECK-P8-NEXT: ld r0, 16(r1)
1270 ; CHECK-P8-NEXT: mtlr r0
1271 ; CHECK-P8-NEXT: blr
1273 %0 = load fp128, fp128* %a, align 16
1274 %conv = fptoui fp128 %0 to i8
1278 ; Function Attrs: norecurse nounwind
1279 define void @qpConv2ub_02(i8* nocapture %res) {
1280 ; CHECK-LABEL: qpConv2ub_02:
1281 ; CHECK: # %bb.0: # %entry
1282 ; CHECK-NEXT: addis r4, r2, .LC0@toc@ha
1283 ; CHECK-NEXT: ld r4, .LC0@toc@l(r4)
1284 ; CHECK-NEXT: lxv v2, 32(r4)
1285 ; CHECK-NEXT: xscvqpuwz v2, v2
1286 ; CHECK-NEXT: stxsibx v2, 0, r3
1289 ; CHECK-P8-LABEL: qpConv2ub_02:
1290 ; CHECK-P8: # %bb.0: # %entry
1291 ; CHECK-P8-NEXT: mflr r0
1292 ; CHECK-P8-NEXT: .cfi_def_cfa_offset 48
1293 ; CHECK-P8-NEXT: .cfi_offset lr, 16
1294 ; CHECK-P8-NEXT: .cfi_offset r30, -16
1295 ; CHECK-P8-NEXT: std r30, -16(r1) # 8-byte Folded Spill
1296 ; CHECK-P8-NEXT: std r0, 16(r1)
1297 ; CHECK-P8-NEXT: stdu r1, -48(r1)
1298 ; CHECK-P8-NEXT: addis r4, r2, .LC0@toc@ha
1299 ; CHECK-P8-NEXT: mr r30, r3
1300 ; CHECK-P8-NEXT: ld r4, .LC0@toc@l(r4)
1301 ; CHECK-P8-NEXT: addi r4, r4, 32
1302 ; CHECK-P8-NEXT: lvx v2, 0, r4
1303 ; CHECK-P8-NEXT: bl __fixkfsi
1304 ; CHECK-P8-NEXT: nop
1305 ; CHECK-P8-NEXT: stb r3, 0(r30)
1306 ; CHECK-P8-NEXT: addi r1, r1, 48
1307 ; CHECK-P8-NEXT: ld r0, 16(r1)
1308 ; CHECK-P8-NEXT: ld r30, -16(r1) # 8-byte Folded Reload
1309 ; CHECK-P8-NEXT: mtlr r0
1310 ; CHECK-P8-NEXT: blr
1312 %0 = load fp128, fp128* getelementptr inbounds
1313 ([4 x fp128], [4 x fp128]* @f128Array,
1314 i64 0, i64 2), align 16
1315 %conv = fptoui fp128 %0 to i8
1316 store i8 %conv, i8* %res, align 1
1320 ; Function Attrs: norecurse nounwind readonly
1321 define zeroext i8 @qpConv2ub_03(fp128* nocapture readonly %a) {
1322 ; CHECK-LABEL: qpConv2ub_03:
1323 ; CHECK: # %bb.0: # %entry
1324 ; CHECK-NEXT: lxv v2, 0(r3)
1325 ; CHECK-NEXT: addis r3, r2, .LC0@toc@ha
1326 ; CHECK-NEXT: ld r3, .LC0@toc@l(r3)
1327 ; CHECK-NEXT: lxv v3, 16(r3)
1328 ; CHECK-NEXT: xsaddqp v2, v2, v3
1329 ; CHECK-NEXT: xscvqpswz v2, v2
1330 ; CHECK-NEXT: mfvsrwz r3, v2
1331 ; CHECK-NEXT: clrldi r3, r3, 32
1334 ; CHECK-P8-LABEL: qpConv2ub_03:
1335 ; CHECK-P8: # %bb.0: # %entry
1336 ; CHECK-P8-NEXT: mflr r0
1337 ; CHECK-P8-NEXT: std r0, 16(r1)
1338 ; CHECK-P8-NEXT: stdu r1, -32(r1)
1339 ; CHECK-P8-NEXT: .cfi_def_cfa_offset 32
1340 ; CHECK-P8-NEXT: .cfi_offset lr, 16
1341 ; CHECK-P8-NEXT: addis r4, r2, .LC0@toc@ha
1342 ; CHECK-P8-NEXT: lvx v2, 0, r3
1343 ; CHECK-P8-NEXT: ld r4, .LC0@toc@l(r4)
1344 ; CHECK-P8-NEXT: addi r4, r4, 16
1345 ; CHECK-P8-NEXT: lvx v3, 0, r4
1346 ; CHECK-P8-NEXT: bl __addkf3
1347 ; CHECK-P8-NEXT: nop
1348 ; CHECK-P8-NEXT: bl __fixkfsi
1349 ; CHECK-P8-NEXT: nop
1350 ; CHECK-P8-NEXT: addi r1, r1, 32
1351 ; CHECK-P8-NEXT: ld r0, 16(r1)
1352 ; CHECK-P8-NEXT: mtlr r0
1353 ; CHECK-P8-NEXT: blr
1355 %0 = load fp128, fp128* %a, align 16
1356 %1 = load fp128, fp128* getelementptr inbounds
1357 ([4 x fp128], [4 x fp128]* @f128Array,
1358 i64 0, i64 1), align 16
1359 %add = fadd fp128 %0, %1
1360 %conv = fptoui fp128 %add to i8
1364 ; Function Attrs: norecurse nounwind
1365 define void @qpConv2ub_04(fp128* nocapture readonly %a,
1366 ; CHECK-LABEL: qpConv2ub_04:
1367 ; CHECK: # %bb.0: # %entry
1368 ; CHECK-NEXT: lxv v2, 0(r3)
1369 ; CHECK-NEXT: lxv v3, 0(r4)
1370 ; CHECK-NEXT: xsaddqp v2, v2, v3
1371 ; CHECK-NEXT: xscvqpuwz v2, v2
1372 ; CHECK-NEXT: stxsibx v2, 0, r5
1375 ; CHECK-P8-LABEL: qpConv2ub_04:
1376 ; CHECK-P8: # %bb.0: # %entry
1377 ; CHECK-P8-NEXT: mflr r0
1378 ; CHECK-P8-NEXT: .cfi_def_cfa_offset 48
1379 ; CHECK-P8-NEXT: .cfi_offset lr, 16
1380 ; CHECK-P8-NEXT: .cfi_offset r30, -16
1381 ; CHECK-P8-NEXT: std r30, -16(r1) # 8-byte Folded Spill
1382 ; CHECK-P8-NEXT: std r0, 16(r1)
1383 ; CHECK-P8-NEXT: stdu r1, -48(r1)
1384 ; CHECK-P8-NEXT: lvx v2, 0, r3
1385 ; CHECK-P8-NEXT: lvx v3, 0, r4
1386 ; CHECK-P8-NEXT: mr r30, r5
1387 ; CHECK-P8-NEXT: bl __addkf3
1388 ; CHECK-P8-NEXT: nop
1389 ; CHECK-P8-NEXT: bl __fixkfsi
1390 ; CHECK-P8-NEXT: nop
1391 ; CHECK-P8-NEXT: stb r3, 0(r30)
1392 ; CHECK-P8-NEXT: addi r1, r1, 48
1393 ; CHECK-P8-NEXT: ld r0, 16(r1)
1394 ; CHECK-P8-NEXT: ld r30, -16(r1) # 8-byte Folded Reload
1395 ; CHECK-P8-NEXT: mtlr r0
1396 ; CHECK-P8-NEXT: blr
1397 fp128* nocapture readonly %b, i8* nocapture %res) {
1399 %0 = load fp128, fp128* %a, align 16
1400 %1 = load fp128, fp128* %b, align 16
1401 %add = fadd fp128 %0, %1
1402 %conv = fptoui fp128 %add to i8
1403 store i8 %conv, i8* %res, align 1