1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
3 ; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
4 ; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-POSTP8,CHECK-P10
5 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
6 ; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
7 ; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-POSTP8,CHECK-P10
8 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
9 ; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
10 ; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-POSTP8,CHECK-PREP10,CHECK-P9
11 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
12 ; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
13 ; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-POSTP8,CHECK-PREP10,CHECK-P9
14 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
15 ; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
16 ; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P8
17 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
18 ; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
19 ; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P8
21 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
22 define dso_local double @ld_0_double_uint8_t(i64 %ptr) {
23 ; CHECK-POSTP8-LABEL: ld_0_double_uint8_t:
24 ; CHECK-POSTP8: # %bb.0: # %entry
25 ; CHECK-POSTP8-NEXT: lxsibzx f0, 0, r3
26 ; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
27 ; CHECK-POSTP8-NEXT: blr
29 ; CHECK-P8-LABEL: ld_0_double_uint8_t:
30 ; CHECK-P8: # %bb.0: # %entry
31 ; CHECK-P8-NEXT: lbz r3, 0(r3)
32 ; CHECK-P8-NEXT: mtfprwz f0, r3
33 ; CHECK-P8-NEXT: xscvuxddp f1, f0
36 %0 = inttoptr i64 %ptr to ptr
37 %1 = load i8, ptr %0, align 1
38 %conv = uitofp i8 %1 to double
42 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
43 define dso_local double @ld_align16_double_uint8_t(ptr nocapture readonly %ptr) {
44 ; CHECK-POSTP8-LABEL: ld_align16_double_uint8_t:
45 ; CHECK-POSTP8: # %bb.0: # %entry
46 ; CHECK-POSTP8-NEXT: addi r3, r3, 8
47 ; CHECK-POSTP8-NEXT: lxsibzx f0, 0, r3
48 ; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
49 ; CHECK-POSTP8-NEXT: blr
51 ; CHECK-P8-LABEL: ld_align16_double_uint8_t:
52 ; CHECK-P8: # %bb.0: # %entry
53 ; CHECK-P8-NEXT: lbz r3, 8(r3)
54 ; CHECK-P8-NEXT: mtfprwz f0, r3
55 ; CHECK-P8-NEXT: xscvuxddp f1, f0
58 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
59 %0 = load i8, ptr %add.ptr, align 1
60 %conv = uitofp i8 %0 to double
64 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
65 define dso_local double @ld_align32_double_uint8_t(ptr nocapture readonly %ptr) {
66 ; CHECK-P10-LABEL: ld_align32_double_uint8_t:
67 ; CHECK-P10: # %bb.0: # %entry
68 ; CHECK-P10-NEXT: pli r4, 99999000
69 ; CHECK-P10-NEXT: lxsibzx f0, r3, r4
70 ; CHECK-P10-NEXT: xscvuxddp f1, f0
73 ; CHECK-P9-LABEL: ld_align32_double_uint8_t:
74 ; CHECK-P9: # %bb.0: # %entry
75 ; CHECK-P9-NEXT: lis r4, 1525
76 ; CHECK-P9-NEXT: ori r4, r4, 56600
77 ; CHECK-P9-NEXT: lxsibzx f0, r3, r4
78 ; CHECK-P9-NEXT: xscvuxddp f1, f0
81 ; CHECK-P8-LABEL: ld_align32_double_uint8_t:
82 ; CHECK-P8: # %bb.0: # %entry
83 ; CHECK-P8-NEXT: lis r4, 1525
84 ; CHECK-P8-NEXT: ori r4, r4, 56600
85 ; CHECK-P8-NEXT: lbzx r3, r3, r4
86 ; CHECK-P8-NEXT: mtfprwz f0, r3
87 ; CHECK-P8-NEXT: xscvuxddp f1, f0
90 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
91 %0 = load i8, ptr %add.ptr, align 1
92 %conv = uitofp i8 %0 to double
96 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
97 define dso_local double @ld_align64_double_uint8_t(ptr nocapture readonly %ptr) {
98 ; CHECK-P10-LABEL: ld_align64_double_uint8_t:
99 ; CHECK-P10: # %bb.0: # %entry
100 ; CHECK-P10-NEXT: pli r4, 244140625
101 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
102 ; CHECK-P10-NEXT: lxsibzx f0, r3, r4
103 ; CHECK-P10-NEXT: xscvuxddp f1, f0
104 ; CHECK-P10-NEXT: blr
106 ; CHECK-P9-LABEL: ld_align64_double_uint8_t:
107 ; CHECK-P9: # %bb.0: # %entry
108 ; CHECK-P9-NEXT: lis r4, 3725
109 ; CHECK-P9-NEXT: ori r4, r4, 19025
110 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
111 ; CHECK-P9-NEXT: lxsibzx f0, r3, r4
112 ; CHECK-P9-NEXT: xscvuxddp f1, f0
115 ; CHECK-P8-LABEL: ld_align64_double_uint8_t:
116 ; CHECK-P8: # %bb.0: # %entry
117 ; CHECK-P8-NEXT: lis r4, 3725
118 ; CHECK-P8-NEXT: ori r4, r4, 19025
119 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
120 ; CHECK-P8-NEXT: lbzx r3, r3, r4
121 ; CHECK-P8-NEXT: mtfprwz f0, r3
122 ; CHECK-P8-NEXT: xscvuxddp f1, f0
125 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
126 %0 = load i8, ptr %add.ptr, align 1
127 %conv = uitofp i8 %0 to double
131 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
132 define dso_local double @ld_reg_double_uint8_t(ptr nocapture readonly %ptr, i64 %off) {
133 ; CHECK-POSTP8-LABEL: ld_reg_double_uint8_t:
134 ; CHECK-POSTP8: # %bb.0: # %entry
135 ; CHECK-POSTP8-NEXT: lxsibzx f0, r3, r4
136 ; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
137 ; CHECK-POSTP8-NEXT: blr
139 ; CHECK-P8-LABEL: ld_reg_double_uint8_t:
140 ; CHECK-P8: # %bb.0: # %entry
141 ; CHECK-P8-NEXT: lbzx r3, r3, r4
142 ; CHECK-P8-NEXT: mtfprwz f0, r3
143 ; CHECK-P8-NEXT: xscvuxddp f1, f0
146 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
147 %0 = load i8, ptr %add.ptr, align 1
148 %conv = uitofp i8 %0 to double
152 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
153 define dso_local double @ld_or_double_uint8_t(i64 %ptr, i8 zeroext %off) {
154 ; CHECK-POSTP8-LABEL: ld_or_double_uint8_t:
155 ; CHECK-POSTP8: # %bb.0: # %entry
156 ; CHECK-POSTP8-NEXT: or r3, r4, r3
157 ; CHECK-POSTP8-NEXT: lxsibzx f0, 0, r3
158 ; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
159 ; CHECK-POSTP8-NEXT: blr
161 ; CHECK-P8-LABEL: ld_or_double_uint8_t:
162 ; CHECK-P8: # %bb.0: # %entry
163 ; CHECK-P8-NEXT: or r3, r4, r3
164 ; CHECK-P8-NEXT: lbz r3, 0(r3)
165 ; CHECK-P8-NEXT: mtfprwz f0, r3
166 ; CHECK-P8-NEXT: xscvuxddp f1, f0
169 %conv = zext i8 %off to i64
170 %or = or i64 %conv, %ptr
171 %0 = inttoptr i64 %or to ptr
172 %1 = load i8, ptr %0, align 1
173 %conv1 = uitofp i8 %1 to double
177 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
178 define dso_local double @ld_not_disjoint16_double_uint8_t(i64 %ptr) {
179 ; CHECK-POSTP8-LABEL: ld_not_disjoint16_double_uint8_t:
180 ; CHECK-POSTP8: # %bb.0: # %entry
181 ; CHECK-POSTP8-NEXT: ori r3, r3, 6
182 ; CHECK-POSTP8-NEXT: lxsibzx f0, 0, r3
183 ; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
184 ; CHECK-POSTP8-NEXT: blr
186 ; CHECK-P8-LABEL: ld_not_disjoint16_double_uint8_t:
187 ; CHECK-P8: # %bb.0: # %entry
188 ; CHECK-P8-NEXT: ori r3, r3, 6
189 ; CHECK-P8-NEXT: lbz r3, 0(r3)
190 ; CHECK-P8-NEXT: mtfprwz f0, r3
191 ; CHECK-P8-NEXT: xscvuxddp f1, f0
195 %0 = inttoptr i64 %or to ptr
196 %1 = load i8, ptr %0, align 1
197 %conv = uitofp i8 %1 to double
201 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
202 define dso_local double @ld_disjoint_align16_double_uint8_t(i64 %ptr) {
203 ; CHECK-POSTP8-LABEL: ld_disjoint_align16_double_uint8_t:
204 ; CHECK-POSTP8: # %bb.0: # %entry
205 ; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
206 ; CHECK-POSTP8-NEXT: ori r3, r3, 24
207 ; CHECK-POSTP8-NEXT: lxsibzx f0, 0, r3
208 ; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
209 ; CHECK-POSTP8-NEXT: blr
211 ; CHECK-P8-LABEL: ld_disjoint_align16_double_uint8_t:
212 ; CHECK-P8: # %bb.0: # %entry
213 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
214 ; CHECK-P8-NEXT: lbz r3, 24(r3)
215 ; CHECK-P8-NEXT: mtfprwz f0, r3
216 ; CHECK-P8-NEXT: xscvuxddp f1, f0
219 %and = and i64 %ptr, -4096
220 %or = or i64 %and, 24
221 %0 = inttoptr i64 %or to ptr
222 %1 = load i8, ptr %0, align 8
223 %conv = uitofp i8 %1 to double
227 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
228 define dso_local double @ld_not_disjoint32_double_uint8_t(i64 %ptr) {
229 ; CHECK-POSTP8-LABEL: ld_not_disjoint32_double_uint8_t:
230 ; CHECK-POSTP8: # %bb.0: # %entry
231 ; CHECK-POSTP8-NEXT: ori r3, r3, 34463
232 ; CHECK-POSTP8-NEXT: oris r3, r3, 1
233 ; CHECK-POSTP8-NEXT: lxsibzx f0, 0, r3
234 ; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
235 ; CHECK-POSTP8-NEXT: blr
237 ; CHECK-P8-LABEL: ld_not_disjoint32_double_uint8_t:
238 ; CHECK-P8: # %bb.0: # %entry
239 ; CHECK-P8-NEXT: ori r3, r3, 34463
240 ; CHECK-P8-NEXT: oris r3, r3, 1
241 ; CHECK-P8-NEXT: lbz r3, 0(r3)
242 ; CHECK-P8-NEXT: mtfprwz f0, r3
243 ; CHECK-P8-NEXT: xscvuxddp f1, f0
246 %or = or i64 %ptr, 99999
247 %0 = inttoptr i64 %or to ptr
248 %1 = load i8, ptr %0, align 1
249 %conv = uitofp i8 %1 to double
253 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
254 define dso_local double @ld_disjoint_align32_double_uint8_t(i64 %ptr) {
255 ; CHECK-P10-LABEL: ld_disjoint_align32_double_uint8_t:
256 ; CHECK-P10: # %bb.0: # %entry
257 ; CHECK-P10-NEXT: lis r4, -15264
258 ; CHECK-P10-NEXT: and r3, r3, r4
259 ; CHECK-P10-NEXT: pli r4, 999990000
260 ; CHECK-P10-NEXT: lxsibzx f0, r3, r4
261 ; CHECK-P10-NEXT: xscvuxddp f1, f0
262 ; CHECK-P10-NEXT: blr
264 ; CHECK-P9-LABEL: ld_disjoint_align32_double_uint8_t:
265 ; CHECK-P9: # %bb.0: # %entry
266 ; CHECK-P9-NEXT: lis r4, -15264
267 ; CHECK-P9-NEXT: and r3, r3, r4
268 ; CHECK-P9-NEXT: lis r4, 15258
269 ; CHECK-P9-NEXT: ori r4, r4, 41712
270 ; CHECK-P9-NEXT: lxsibzx f0, r3, r4
271 ; CHECK-P9-NEXT: xscvuxddp f1, f0
274 ; CHECK-P8-LABEL: ld_disjoint_align32_double_uint8_t:
275 ; CHECK-P8: # %bb.0: # %entry
276 ; CHECK-P8-NEXT: lis r4, -15264
277 ; CHECK-P8-NEXT: and r3, r3, r4
278 ; CHECK-P8-NEXT: lis r4, 15258
279 ; CHECK-P8-NEXT: ori r4, r4, 41712
280 ; CHECK-P8-NEXT: lbzx r3, r3, r4
281 ; CHECK-P8-NEXT: mtfprwz f0, r3
282 ; CHECK-P8-NEXT: xscvuxddp f1, f0
285 %and = and i64 %ptr, -1000341504
286 %or = or i64 %and, 999990000
287 %0 = inttoptr i64 %or to ptr
288 %1 = load i8, ptr %0, align 16
289 %conv = uitofp i8 %1 to double
293 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
294 define dso_local double @ld_not_disjoint64_double_uint8_t(i64 %ptr) {
295 ; CHECK-P10-LABEL: ld_not_disjoint64_double_uint8_t:
296 ; CHECK-P10: # %bb.0: # %entry
297 ; CHECK-P10-NEXT: pli r4, 232
298 ; CHECK-P10-NEXT: pli r5, 3567587329
299 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
300 ; CHECK-P10-NEXT: or r3, r3, r5
301 ; CHECK-P10-NEXT: lxsibzx f0, 0, r3
302 ; CHECK-P10-NEXT: xscvuxddp f1, f0
303 ; CHECK-P10-NEXT: blr
305 ; CHECK-P9-LABEL: ld_not_disjoint64_double_uint8_t:
306 ; CHECK-P9: # %bb.0: # %entry
307 ; CHECK-P9-NEXT: li r4, 29
308 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
309 ; CHECK-P9-NEXT: oris r4, r4, 54437
310 ; CHECK-P9-NEXT: ori r4, r4, 4097
311 ; CHECK-P9-NEXT: or r3, r3, r4
312 ; CHECK-P9-NEXT: lxsibzx f0, 0, r3
313 ; CHECK-P9-NEXT: xscvuxddp f1, f0
316 ; CHECK-P8-LABEL: ld_not_disjoint64_double_uint8_t:
317 ; CHECK-P8: # %bb.0: # %entry
318 ; CHECK-P8-NEXT: li r4, 29
319 ; CHECK-P8-NEXT: rldic r4, r4, 35, 24
320 ; CHECK-P8-NEXT: oris r4, r4, 54437
321 ; CHECK-P8-NEXT: ori r4, r4, 4097
322 ; CHECK-P8-NEXT: or r3, r3, r4
323 ; CHECK-P8-NEXT: lbz r3, 0(r3)
324 ; CHECK-P8-NEXT: mtfprwz f0, r3
325 ; CHECK-P8-NEXT: xscvuxddp f1, f0
328 %or = or i64 %ptr, 1000000000001
329 %0 = inttoptr i64 %or to ptr
330 %1 = load i8, ptr %0, align 1
331 %conv = uitofp i8 %1 to double
335 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
336 define dso_local double @ld_disjoint_align64_double_uint8_t(i64 %ptr) {
337 ; CHECK-P10-LABEL: ld_disjoint_align64_double_uint8_t:
338 ; CHECK-P10: # %bb.0: # %entry
339 ; CHECK-P10-NEXT: pli r4, 244140625
340 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
341 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
342 ; CHECK-P10-NEXT: lxsibzx f0, r3, r4
343 ; CHECK-P10-NEXT: xscvuxddp f1, f0
344 ; CHECK-P10-NEXT: blr
346 ; CHECK-P9-LABEL: ld_disjoint_align64_double_uint8_t:
347 ; CHECK-P9: # %bb.0: # %entry
348 ; CHECK-P9-NEXT: lis r4, 3725
349 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
350 ; CHECK-P9-NEXT: ori r4, r4, 19025
351 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
352 ; CHECK-P9-NEXT: lxsibzx f0, r3, r4
353 ; CHECK-P9-NEXT: xscvuxddp f1, f0
356 ; CHECK-P8-LABEL: ld_disjoint_align64_double_uint8_t:
357 ; CHECK-P8: # %bb.0: # %entry
358 ; CHECK-P8-NEXT: lis r4, 3725
359 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
360 ; CHECK-P8-NEXT: ori r4, r4, 19025
361 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
362 ; CHECK-P8-NEXT: lbzx r3, r3, r4
363 ; CHECK-P8-NEXT: mtfprwz f0, r3
364 ; CHECK-P8-NEXT: xscvuxddp f1, f0
367 %and = and i64 %ptr, -1099511627776
368 %or = or i64 %and, 1000000000000
369 %0 = inttoptr i64 %or to ptr
370 %1 = load i8, ptr %0, align 4096
371 %conv = uitofp i8 %1 to double
375 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
376 define dso_local double @ld_cst_align16_double_uint8_t() {
377 ; CHECK-POSTP8-LABEL: ld_cst_align16_double_uint8_t:
378 ; CHECK-POSTP8: # %bb.0: # %entry
379 ; CHECK-POSTP8-NEXT: li r3, 4080
380 ; CHECK-POSTP8-NEXT: lxsibzx f0, 0, r3
381 ; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
382 ; CHECK-POSTP8-NEXT: blr
384 ; CHECK-P8-LABEL: ld_cst_align16_double_uint8_t:
385 ; CHECK-P8: # %bb.0: # %entry
386 ; CHECK-P8-NEXT: lbz r3, 4080(0)
387 ; CHECK-P8-NEXT: mtfprwz f0, r3
388 ; CHECK-P8-NEXT: xscvuxddp f1, f0
391 %0 = load i8, ptr inttoptr (i64 4080 to ptr), align 16
392 %conv = uitofp i8 %0 to double
396 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
397 define dso_local double @ld_cst_align32_double_uint8_t() {
398 ; CHECK-P10-LABEL: ld_cst_align32_double_uint8_t:
399 ; CHECK-P10: # %bb.0: # %entry
400 ; CHECK-P10-NEXT: pli r3, 9999900
401 ; CHECK-P10-NEXT: lxsibzx f0, 0, r3
402 ; CHECK-P10-NEXT: xscvuxddp f1, f0
403 ; CHECK-P10-NEXT: blr
405 ; CHECK-P9-LABEL: ld_cst_align32_double_uint8_t:
406 ; CHECK-P9: # %bb.0: # %entry
407 ; CHECK-P9-NEXT: lis r3, 152
408 ; CHECK-P9-NEXT: ori r3, r3, 38428
409 ; CHECK-P9-NEXT: lxsibzx f0, 0, r3
410 ; CHECK-P9-NEXT: xscvuxddp f1, f0
413 ; CHECK-P8-LABEL: ld_cst_align32_double_uint8_t:
414 ; CHECK-P8: # %bb.0: # %entry
415 ; CHECK-P8-NEXT: lis r3, 153
416 ; CHECK-P8-NEXT: lbz r3, -27108(r3)
417 ; CHECK-P8-NEXT: mtfprwz f0, r3
418 ; CHECK-P8-NEXT: xscvuxddp f1, f0
421 %0 = load i8, ptr inttoptr (i64 9999900 to ptr), align 4
422 %conv = uitofp i8 %0 to double
426 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
427 define dso_local double @ld_cst_align64_double_uint8_t() {
428 ; CHECK-P10-LABEL: ld_cst_align64_double_uint8_t:
429 ; CHECK-P10: # %bb.0: # %entry
430 ; CHECK-P10-NEXT: pli r3, 244140625
431 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
432 ; CHECK-P10-NEXT: lxsibzx f0, 0, r3
433 ; CHECK-P10-NEXT: xscvuxddp f1, f0
434 ; CHECK-P10-NEXT: blr
436 ; CHECK-P9-LABEL: ld_cst_align64_double_uint8_t:
437 ; CHECK-P9: # %bb.0: # %entry
438 ; CHECK-P9-NEXT: lis r3, 3725
439 ; CHECK-P9-NEXT: ori r3, r3, 19025
440 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
441 ; CHECK-P9-NEXT: lxsibzx f0, 0, r3
442 ; CHECK-P9-NEXT: xscvuxddp f1, f0
445 ; CHECK-P8-LABEL: ld_cst_align64_double_uint8_t:
446 ; CHECK-P8: # %bb.0: # %entry
447 ; CHECK-P8-NEXT: lis r3, 3725
448 ; CHECK-P8-NEXT: ori r3, r3, 19025
449 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
450 ; CHECK-P8-NEXT: lbz r3, 0(r3)
451 ; CHECK-P8-NEXT: mtfprwz f0, r3
452 ; CHECK-P8-NEXT: xscvuxddp f1, f0
455 %0 = load i8, ptr inttoptr (i64 1000000000000 to ptr), align 4096
456 %conv = uitofp i8 %0 to double
460 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
461 define dso_local double @ld_0_double_int8_t(i64 %ptr) {
462 ; CHECK-POSTP8-LABEL: ld_0_double_int8_t:
463 ; CHECK-POSTP8: # %bb.0: # %entry
464 ; CHECK-POSTP8-NEXT: lxsibzx v2, 0, r3
465 ; CHECK-POSTP8-NEXT: vextsb2d v2, v2
466 ; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
467 ; CHECK-POSTP8-NEXT: blr
469 ; CHECK-P8-LABEL: ld_0_double_int8_t:
470 ; CHECK-P8: # %bb.0: # %entry
471 ; CHECK-P8-NEXT: lbz r3, 0(r3)
472 ; CHECK-P8-NEXT: extsb r3, r3
473 ; CHECK-P8-NEXT: mtfprwa f0, r3
474 ; CHECK-P8-NEXT: xscvsxddp f1, f0
477 %0 = inttoptr i64 %ptr to ptr
478 %1 = load i8, ptr %0, align 1
479 %conv = sitofp i8 %1 to double
483 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
484 define dso_local double @ld_align16_double_int8_t(ptr nocapture readonly %ptr) {
485 ; CHECK-POSTP8-LABEL: ld_align16_double_int8_t:
486 ; CHECK-POSTP8: # %bb.0: # %entry
487 ; CHECK-POSTP8-NEXT: addi r3, r3, 8
488 ; CHECK-POSTP8-NEXT: lxsibzx v2, 0, r3
489 ; CHECK-POSTP8-NEXT: vextsb2d v2, v2
490 ; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
491 ; CHECK-POSTP8-NEXT: blr
493 ; CHECK-P8-LABEL: ld_align16_double_int8_t:
494 ; CHECK-P8: # %bb.0: # %entry
495 ; CHECK-P8-NEXT: lbz r3, 8(r3)
496 ; CHECK-P8-NEXT: extsb r3, r3
497 ; CHECK-P8-NEXT: mtfprwa f0, r3
498 ; CHECK-P8-NEXT: xscvsxddp f1, f0
501 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
502 %0 = load i8, ptr %add.ptr, align 1
503 %conv = sitofp i8 %0 to double
507 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
508 define dso_local double @ld_align32_double_int8_t(ptr nocapture readonly %ptr) {
509 ; CHECK-P10-LABEL: ld_align32_double_int8_t:
510 ; CHECK-P10: # %bb.0: # %entry
511 ; CHECK-P10-NEXT: pli r4, 99999000
512 ; CHECK-P10-NEXT: lxsibzx v2, r3, r4
513 ; CHECK-P10-NEXT: vextsb2d v2, v2
514 ; CHECK-P10-NEXT: xscvsxddp f1, v2
515 ; CHECK-P10-NEXT: blr
517 ; CHECK-P9-LABEL: ld_align32_double_int8_t:
518 ; CHECK-P9: # %bb.0: # %entry
519 ; CHECK-P9-NEXT: lis r4, 1525
520 ; CHECK-P9-NEXT: ori r4, r4, 56600
521 ; CHECK-P9-NEXT: lxsibzx v2, r3, r4
522 ; CHECK-P9-NEXT: vextsb2d v2, v2
523 ; CHECK-P9-NEXT: xscvsxddp f1, v2
526 ; CHECK-P8-LABEL: ld_align32_double_int8_t:
527 ; CHECK-P8: # %bb.0: # %entry
528 ; CHECK-P8-NEXT: lis r4, 1525
529 ; CHECK-P8-NEXT: ori r4, r4, 56600
530 ; CHECK-P8-NEXT: lbzx r3, r3, r4
531 ; CHECK-P8-NEXT: extsb r3, r3
532 ; CHECK-P8-NEXT: mtfprwa f0, r3
533 ; CHECK-P8-NEXT: xscvsxddp f1, f0
536 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
537 %0 = load i8, ptr %add.ptr, align 1
538 %conv = sitofp i8 %0 to double
542 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
543 define dso_local double @ld_align64_double_int8_t(ptr nocapture readonly %ptr) {
544 ; CHECK-P10-LABEL: ld_align64_double_int8_t:
545 ; CHECK-P10: # %bb.0: # %entry
546 ; CHECK-P10-NEXT: pli r4, 244140625
547 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
548 ; CHECK-P10-NEXT: lxsibzx v2, r3, r4
549 ; CHECK-P10-NEXT: vextsb2d v2, v2
550 ; CHECK-P10-NEXT: xscvsxddp f1, v2
551 ; CHECK-P10-NEXT: blr
553 ; CHECK-P9-LABEL: ld_align64_double_int8_t:
554 ; CHECK-P9: # %bb.0: # %entry
555 ; CHECK-P9-NEXT: lis r4, 3725
556 ; CHECK-P9-NEXT: ori r4, r4, 19025
557 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
558 ; CHECK-P9-NEXT: lxsibzx v2, r3, r4
559 ; CHECK-P9-NEXT: vextsb2d v2, v2
560 ; CHECK-P9-NEXT: xscvsxddp f1, v2
563 ; CHECK-P8-LABEL: ld_align64_double_int8_t:
564 ; CHECK-P8: # %bb.0: # %entry
565 ; CHECK-P8-NEXT: lis r4, 3725
566 ; CHECK-P8-NEXT: ori r4, r4, 19025
567 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
568 ; CHECK-P8-NEXT: lbzx r3, r3, r4
569 ; CHECK-P8-NEXT: extsb r3, r3
570 ; CHECK-P8-NEXT: mtfprwa f0, r3
571 ; CHECK-P8-NEXT: xscvsxddp f1, f0
574 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
575 %0 = load i8, ptr %add.ptr, align 1
576 %conv = sitofp i8 %0 to double
580 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
581 define dso_local double @ld_reg_double_int8_t(ptr nocapture readonly %ptr, i64 %off) {
582 ; CHECK-POSTP8-LABEL: ld_reg_double_int8_t:
583 ; CHECK-POSTP8: # %bb.0: # %entry
584 ; CHECK-POSTP8-NEXT: lxsibzx v2, r3, r4
585 ; CHECK-POSTP8-NEXT: vextsb2d v2, v2
586 ; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
587 ; CHECK-POSTP8-NEXT: blr
589 ; CHECK-P8-LABEL: ld_reg_double_int8_t:
590 ; CHECK-P8: # %bb.0: # %entry
591 ; CHECK-P8-NEXT: lbzx r3, r3, r4
592 ; CHECK-P8-NEXT: extsb r3, r3
593 ; CHECK-P8-NEXT: mtfprwa f0, r3
594 ; CHECK-P8-NEXT: xscvsxddp f1, f0
597 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
598 %0 = load i8, ptr %add.ptr, align 1
599 %conv = sitofp i8 %0 to double
603 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
604 define dso_local double @ld_or_double_int8_t(i64 %ptr, i8 zeroext %off) {
605 ; CHECK-POSTP8-LABEL: ld_or_double_int8_t:
606 ; CHECK-POSTP8: # %bb.0: # %entry
607 ; CHECK-POSTP8-NEXT: or r3, r4, r3
608 ; CHECK-POSTP8-NEXT: lxsibzx v2, 0, r3
609 ; CHECK-POSTP8-NEXT: vextsb2d v2, v2
610 ; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
611 ; CHECK-POSTP8-NEXT: blr
613 ; CHECK-P8-LABEL: ld_or_double_int8_t:
614 ; CHECK-P8: # %bb.0: # %entry
615 ; CHECK-P8-NEXT: or r3, r4, r3
616 ; CHECK-P8-NEXT: lbz r3, 0(r3)
617 ; CHECK-P8-NEXT: extsb r3, r3
618 ; CHECK-P8-NEXT: mtfprwa f0, r3
619 ; CHECK-P8-NEXT: xscvsxddp f1, f0
622 %conv = zext i8 %off to i64
623 %or = or i64 %conv, %ptr
624 %0 = inttoptr i64 %or to ptr
625 %1 = load i8, ptr %0, align 1
626 %conv1 = sitofp i8 %1 to double
630 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
631 define dso_local double @ld_not_disjoint16_double_int8_t(i64 %ptr) {
632 ; CHECK-POSTP8-LABEL: ld_not_disjoint16_double_int8_t:
633 ; CHECK-POSTP8: # %bb.0: # %entry
634 ; CHECK-POSTP8-NEXT: ori r3, r3, 6
635 ; CHECK-POSTP8-NEXT: lxsibzx v2, 0, r3
636 ; CHECK-POSTP8-NEXT: vextsb2d v2, v2
637 ; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
638 ; CHECK-POSTP8-NEXT: blr
640 ; CHECK-P8-LABEL: ld_not_disjoint16_double_int8_t:
641 ; CHECK-P8: # %bb.0: # %entry
642 ; CHECK-P8-NEXT: ori r3, r3, 6
643 ; CHECK-P8-NEXT: lbz r3, 0(r3)
644 ; CHECK-P8-NEXT: extsb r3, r3
645 ; CHECK-P8-NEXT: mtfprwa f0, r3
646 ; CHECK-P8-NEXT: xscvsxddp f1, f0
650 %0 = inttoptr i64 %or to ptr
651 %1 = load i8, ptr %0, align 1
652 %conv = sitofp i8 %1 to double
656 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
657 define dso_local double @ld_disjoint_align16_double_int8_t(i64 %ptr) {
658 ; CHECK-POSTP8-LABEL: ld_disjoint_align16_double_int8_t:
659 ; CHECK-POSTP8: # %bb.0: # %entry
660 ; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
661 ; CHECK-POSTP8-NEXT: ori r3, r3, 24
662 ; CHECK-POSTP8-NEXT: lxsibzx v2, 0, r3
663 ; CHECK-POSTP8-NEXT: vextsb2d v2, v2
664 ; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
665 ; CHECK-POSTP8-NEXT: blr
667 ; CHECK-P8-LABEL: ld_disjoint_align16_double_int8_t:
668 ; CHECK-P8: # %bb.0: # %entry
669 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
670 ; CHECK-P8-NEXT: lbz r3, 24(r3)
671 ; CHECK-P8-NEXT: extsb r3, r3
672 ; CHECK-P8-NEXT: mtfprwa f0, r3
673 ; CHECK-P8-NEXT: xscvsxddp f1, f0
676 %and = and i64 %ptr, -4096
677 %or = or i64 %and, 24
678 %0 = inttoptr i64 %or to ptr
679 %1 = load i8, ptr %0, align 8
680 %conv = sitofp i8 %1 to double
684 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
685 define dso_local double @ld_not_disjoint32_double_int8_t(i64 %ptr) {
686 ; CHECK-POSTP8-LABEL: ld_not_disjoint32_double_int8_t:
687 ; CHECK-POSTP8: # %bb.0: # %entry
688 ; CHECK-POSTP8-NEXT: ori r3, r3, 34463
689 ; CHECK-POSTP8-NEXT: oris r3, r3, 1
690 ; CHECK-POSTP8-NEXT: lxsibzx v2, 0, r3
691 ; CHECK-POSTP8-NEXT: vextsb2d v2, v2
692 ; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
693 ; CHECK-POSTP8-NEXT: blr
695 ; CHECK-P8-LABEL: ld_not_disjoint32_double_int8_t:
696 ; CHECK-P8: # %bb.0: # %entry
697 ; CHECK-P8-NEXT: ori r3, r3, 34463
698 ; CHECK-P8-NEXT: oris r3, r3, 1
699 ; CHECK-P8-NEXT: lbz r3, 0(r3)
700 ; CHECK-P8-NEXT: extsb r3, r3
701 ; CHECK-P8-NEXT: mtfprwa f0, r3
702 ; CHECK-P8-NEXT: xscvsxddp f1, f0
705 %or = or i64 %ptr, 99999
706 %0 = inttoptr i64 %or to ptr
707 %1 = load i8, ptr %0, align 1
708 %conv = sitofp i8 %1 to double
712 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
713 define dso_local double @ld_disjoint_align32_double_int8_t(i64 %ptr) {
714 ; CHECK-P10-LABEL: ld_disjoint_align32_double_int8_t:
715 ; CHECK-P10: # %bb.0: # %entry
716 ; CHECK-P10-NEXT: lis r4, -15264
717 ; CHECK-P10-NEXT: and r3, r3, r4
718 ; CHECK-P10-NEXT: pli r4, 999990000
719 ; CHECK-P10-NEXT: lxsibzx v2, r3, r4
720 ; CHECK-P10-NEXT: vextsb2d v2, v2
721 ; CHECK-P10-NEXT: xscvsxddp f1, v2
722 ; CHECK-P10-NEXT: blr
724 ; CHECK-P9-LABEL: ld_disjoint_align32_double_int8_t:
725 ; CHECK-P9: # %bb.0: # %entry
726 ; CHECK-P9-NEXT: lis r4, -15264
727 ; CHECK-P9-NEXT: and r3, r3, r4
728 ; CHECK-P9-NEXT: lis r4, 15258
729 ; CHECK-P9-NEXT: ori r4, r4, 41712
730 ; CHECK-P9-NEXT: lxsibzx v2, r3, r4
731 ; CHECK-P9-NEXT: vextsb2d v2, v2
732 ; CHECK-P9-NEXT: xscvsxddp f1, v2
735 ; CHECK-P8-LABEL: ld_disjoint_align32_double_int8_t:
736 ; CHECK-P8: # %bb.0: # %entry
737 ; CHECK-P8-NEXT: lis r4, -15264
738 ; CHECK-P8-NEXT: and r3, r3, r4
739 ; CHECK-P8-NEXT: lis r4, 15258
740 ; CHECK-P8-NEXT: ori r4, r4, 41712
741 ; CHECK-P8-NEXT: lbzx r3, r3, r4
742 ; CHECK-P8-NEXT: extsb r3, r3
743 ; CHECK-P8-NEXT: mtfprwa f0, r3
744 ; CHECK-P8-NEXT: xscvsxddp f1, f0
747 %and = and i64 %ptr, -1000341504
748 %or = or i64 %and, 999990000
749 %0 = inttoptr i64 %or to ptr
750 %1 = load i8, ptr %0, align 16
751 %conv = sitofp i8 %1 to double
755 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
756 define dso_local double @ld_not_disjoint64_double_int8_t(i64 %ptr) {
757 ; CHECK-P10-LABEL: ld_not_disjoint64_double_int8_t:
758 ; CHECK-P10: # %bb.0: # %entry
759 ; CHECK-P10-NEXT: pli r4, 232
760 ; CHECK-P10-NEXT: pli r5, 3567587329
761 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
762 ; CHECK-P10-NEXT: or r3, r3, r5
763 ; CHECK-P10-NEXT: lxsibzx v2, 0, r3
764 ; CHECK-P10-NEXT: vextsb2d v2, v2
765 ; CHECK-P10-NEXT: xscvsxddp f1, v2
766 ; CHECK-P10-NEXT: blr
768 ; CHECK-P9-LABEL: ld_not_disjoint64_double_int8_t:
769 ; CHECK-P9: # %bb.0: # %entry
770 ; CHECK-P9-NEXT: li r4, 29
771 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
772 ; CHECK-P9-NEXT: oris r4, r4, 54437
773 ; CHECK-P9-NEXT: ori r4, r4, 4097
774 ; CHECK-P9-NEXT: or r3, r3, r4
775 ; CHECK-P9-NEXT: lxsibzx v2, 0, r3
776 ; CHECK-P9-NEXT: vextsb2d v2, v2
777 ; CHECK-P9-NEXT: xscvsxddp f1, v2
780 ; CHECK-P8-LABEL: ld_not_disjoint64_double_int8_t:
781 ; CHECK-P8: # %bb.0: # %entry
782 ; CHECK-P8-NEXT: li r4, 29
783 ; CHECK-P8-NEXT: rldic r4, r4, 35, 24
784 ; CHECK-P8-NEXT: oris r4, r4, 54437
785 ; CHECK-P8-NEXT: ori r4, r4, 4097
786 ; CHECK-P8-NEXT: or r3, r3, r4
787 ; CHECK-P8-NEXT: lbz r3, 0(r3)
788 ; CHECK-P8-NEXT: extsb r3, r3
789 ; CHECK-P8-NEXT: mtfprwa f0, r3
790 ; CHECK-P8-NEXT: xscvsxddp f1, f0
793 %or = or i64 %ptr, 1000000000001
794 %0 = inttoptr i64 %or to ptr
795 %1 = load i8, ptr %0, align 1
796 %conv = sitofp i8 %1 to double
800 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
801 define dso_local double @ld_disjoint_align64_double_int8_t(i64 %ptr) {
802 ; CHECK-P10-LABEL: ld_disjoint_align64_double_int8_t:
803 ; CHECK-P10: # %bb.0: # %entry
804 ; CHECK-P10-NEXT: pli r4, 244140625
805 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
806 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
807 ; CHECK-P10-NEXT: lxsibzx v2, r3, r4
808 ; CHECK-P10-NEXT: vextsb2d v2, v2
809 ; CHECK-P10-NEXT: xscvsxddp f1, v2
810 ; CHECK-P10-NEXT: blr
812 ; CHECK-P9-LABEL: ld_disjoint_align64_double_int8_t:
813 ; CHECK-P9: # %bb.0: # %entry
814 ; CHECK-P9-NEXT: lis r4, 3725
815 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
816 ; CHECK-P9-NEXT: ori r4, r4, 19025
817 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
818 ; CHECK-P9-NEXT: lxsibzx v2, r3, r4
819 ; CHECK-P9-NEXT: vextsb2d v2, v2
820 ; CHECK-P9-NEXT: xscvsxddp f1, v2
823 ; CHECK-P8-LABEL: ld_disjoint_align64_double_int8_t:
824 ; CHECK-P8: # %bb.0: # %entry
825 ; CHECK-P8-NEXT: lis r4, 3725
826 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
827 ; CHECK-P8-NEXT: ori r4, r4, 19025
828 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
829 ; CHECK-P8-NEXT: lbzx r3, r3, r4
830 ; CHECK-P8-NEXT: extsb r3, r3
831 ; CHECK-P8-NEXT: mtfprwa f0, r3
832 ; CHECK-P8-NEXT: xscvsxddp f1, f0
835 %and = and i64 %ptr, -1099511627776
836 %or = or i64 %and, 1000000000000
837 %0 = inttoptr i64 %or to ptr
838 %1 = load i8, ptr %0, align 4096
839 %conv = sitofp i8 %1 to double
843 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
844 define dso_local double @ld_cst_align16_double_int8_t() {
845 ; CHECK-POSTP8-LABEL: ld_cst_align16_double_int8_t:
846 ; CHECK-POSTP8: # %bb.0: # %entry
847 ; CHECK-POSTP8-NEXT: li r3, 4080
848 ; CHECK-POSTP8-NEXT: lxsibzx v2, 0, r3
849 ; CHECK-POSTP8-NEXT: vextsb2d v2, v2
850 ; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
851 ; CHECK-POSTP8-NEXT: blr
853 ; CHECK-P8-LABEL: ld_cst_align16_double_int8_t:
854 ; CHECK-P8: # %bb.0: # %entry
855 ; CHECK-P8-NEXT: lbz r3, 4080(0)
856 ; CHECK-P8-NEXT: extsb r3, r3
857 ; CHECK-P8-NEXT: mtfprwa f0, r3
858 ; CHECK-P8-NEXT: xscvsxddp f1, f0
861 %0 = load i8, ptr inttoptr (i64 4080 to ptr), align 16
862 %conv = sitofp i8 %0 to double
866 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
867 define dso_local double @ld_cst_align32_double_int8_t() {
868 ; CHECK-P10-LABEL: ld_cst_align32_double_int8_t:
869 ; CHECK-P10: # %bb.0: # %entry
870 ; CHECK-P10-NEXT: pli r3, 9999900
871 ; CHECK-P10-NEXT: lxsibzx v2, 0, r3
872 ; CHECK-P10-NEXT: vextsb2d v2, v2
873 ; CHECK-P10-NEXT: xscvsxddp f1, v2
874 ; CHECK-P10-NEXT: blr
876 ; CHECK-P9-LABEL: ld_cst_align32_double_int8_t:
877 ; CHECK-P9: # %bb.0: # %entry
878 ; CHECK-P9-NEXT: lis r3, 152
879 ; CHECK-P9-NEXT: ori r3, r3, 38428
880 ; CHECK-P9-NEXT: lxsibzx v2, 0, r3
881 ; CHECK-P9-NEXT: vextsb2d v2, v2
882 ; CHECK-P9-NEXT: xscvsxddp f1, v2
885 ; CHECK-P8-LABEL: ld_cst_align32_double_int8_t:
886 ; CHECK-P8: # %bb.0: # %entry
887 ; CHECK-P8-NEXT: lis r3, 153
888 ; CHECK-P8-NEXT: lbz r3, -27108(r3)
889 ; CHECK-P8-NEXT: extsb r3, r3
890 ; CHECK-P8-NEXT: mtfprwa f0, r3
891 ; CHECK-P8-NEXT: xscvsxddp f1, f0
894 %0 = load i8, ptr inttoptr (i64 9999900 to ptr), align 4
895 %conv = sitofp i8 %0 to double
899 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
900 define dso_local double @ld_cst_align64_double_int8_t() {
901 ; CHECK-P10-LABEL: ld_cst_align64_double_int8_t:
902 ; CHECK-P10: # %bb.0: # %entry
903 ; CHECK-P10-NEXT: pli r3, 244140625
904 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
905 ; CHECK-P10-NEXT: lxsibzx v2, 0, r3
906 ; CHECK-P10-NEXT: vextsb2d v2, v2
907 ; CHECK-P10-NEXT: xscvsxddp f1, v2
908 ; CHECK-P10-NEXT: blr
910 ; CHECK-P9-LABEL: ld_cst_align64_double_int8_t:
911 ; CHECK-P9: # %bb.0: # %entry
912 ; CHECK-P9-NEXT: lis r3, 3725
913 ; CHECK-P9-NEXT: ori r3, r3, 19025
914 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
915 ; CHECK-P9-NEXT: lxsibzx v2, 0, r3
916 ; CHECK-P9-NEXT: vextsb2d v2, v2
917 ; CHECK-P9-NEXT: xscvsxddp f1, v2
920 ; CHECK-P8-LABEL: ld_cst_align64_double_int8_t:
921 ; CHECK-P8: # %bb.0: # %entry
922 ; CHECK-P8-NEXT: lis r3, 3725
923 ; CHECK-P8-NEXT: ori r3, r3, 19025
924 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
925 ; CHECK-P8-NEXT: lbz r3, 0(r3)
926 ; CHECK-P8-NEXT: extsb r3, r3
927 ; CHECK-P8-NEXT: mtfprwa f0, r3
928 ; CHECK-P8-NEXT: xscvsxddp f1, f0
931 %0 = load i8, ptr inttoptr (i64 1000000000000 to ptr), align 4096
932 %conv = sitofp i8 %0 to double
936 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
937 define dso_local double @ld_0_double_uint16_t(i64 %ptr) {
938 ; CHECK-POSTP8-LABEL: ld_0_double_uint16_t:
939 ; CHECK-POSTP8: # %bb.0: # %entry
940 ; CHECK-POSTP8-NEXT: lxsihzx f0, 0, r3
941 ; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
942 ; CHECK-POSTP8-NEXT: blr
944 ; CHECK-P8-LABEL: ld_0_double_uint16_t:
945 ; CHECK-P8: # %bb.0: # %entry
946 ; CHECK-P8-NEXT: lhz r3, 0(r3)
947 ; CHECK-P8-NEXT: mtfprwz f0, r3
948 ; CHECK-P8-NEXT: xscvuxddp f1, f0
951 %0 = inttoptr i64 %ptr to ptr
952 %1 = load i16, ptr %0, align 2
953 %conv = uitofp i16 %1 to double
957 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
958 define dso_local double @ld_align16_double_uint16_t(ptr nocapture readonly %ptr) {
959 ; CHECK-POSTP8-LABEL: ld_align16_double_uint16_t:
960 ; CHECK-POSTP8: # %bb.0: # %entry
961 ; CHECK-POSTP8-NEXT: addi r3, r3, 8
962 ; CHECK-POSTP8-NEXT: lxsihzx f0, 0, r3
963 ; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
964 ; CHECK-POSTP8-NEXT: blr
966 ; CHECK-P8-LABEL: ld_align16_double_uint16_t:
967 ; CHECK-P8: # %bb.0: # %entry
968 ; CHECK-P8-NEXT: lhz r3, 8(r3)
969 ; CHECK-P8-NEXT: mtfprwz f0, r3
970 ; CHECK-P8-NEXT: xscvuxddp f1, f0
973 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
974 %0 = load i16, ptr %add.ptr, align 2
975 %conv = uitofp i16 %0 to double
979 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
980 define dso_local double @ld_align32_double_uint16_t(ptr nocapture readonly %ptr) {
981 ; CHECK-P10-LABEL: ld_align32_double_uint16_t:
982 ; CHECK-P10: # %bb.0: # %entry
983 ; CHECK-P10-NEXT: pli r4, 99999000
984 ; CHECK-P10-NEXT: lxsihzx f0, r3, r4
985 ; CHECK-P10-NEXT: xscvuxddp f1, f0
986 ; CHECK-P10-NEXT: blr
988 ; CHECK-P9-LABEL: ld_align32_double_uint16_t:
989 ; CHECK-P9: # %bb.0: # %entry
990 ; CHECK-P9-NEXT: lis r4, 1525
991 ; CHECK-P9-NEXT: ori r4, r4, 56600
992 ; CHECK-P9-NEXT: lxsihzx f0, r3, r4
993 ; CHECK-P9-NEXT: xscvuxddp f1, f0
996 ; CHECK-P8-LABEL: ld_align32_double_uint16_t:
997 ; CHECK-P8: # %bb.0: # %entry
998 ; CHECK-P8-NEXT: lis r4, 1525
999 ; CHECK-P8-NEXT: ori r4, r4, 56600
1000 ; CHECK-P8-NEXT: lhzx r3, r3, r4
1001 ; CHECK-P8-NEXT: mtfprwz f0, r3
1002 ; CHECK-P8-NEXT: xscvuxddp f1, f0
1003 ; CHECK-P8-NEXT: blr
1005 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
1006 %0 = load i16, ptr %add.ptr, align 2
1007 %conv = uitofp i16 %0 to double
1011 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1012 define dso_local double @ld_align64_double_uint16_t(ptr nocapture readonly %ptr) {
1013 ; CHECK-P10-LABEL: ld_align64_double_uint16_t:
1014 ; CHECK-P10: # %bb.0: # %entry
1015 ; CHECK-P10-NEXT: pli r4, 244140625
1016 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
1017 ; CHECK-P10-NEXT: lxsihzx f0, r3, r4
1018 ; CHECK-P10-NEXT: xscvuxddp f1, f0
1019 ; CHECK-P10-NEXT: blr
1021 ; CHECK-P9-LABEL: ld_align64_double_uint16_t:
1022 ; CHECK-P9: # %bb.0: # %entry
1023 ; CHECK-P9-NEXT: lis r4, 3725
1024 ; CHECK-P9-NEXT: ori r4, r4, 19025
1025 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
1026 ; CHECK-P9-NEXT: lxsihzx f0, r3, r4
1027 ; CHECK-P9-NEXT: xscvuxddp f1, f0
1028 ; CHECK-P9-NEXT: blr
1030 ; CHECK-P8-LABEL: ld_align64_double_uint16_t:
1031 ; CHECK-P8: # %bb.0: # %entry
1032 ; CHECK-P8-NEXT: lis r4, 3725
1033 ; CHECK-P8-NEXT: ori r4, r4, 19025
1034 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
1035 ; CHECK-P8-NEXT: lhzx r3, r3, r4
1036 ; CHECK-P8-NEXT: mtfprwz f0, r3
1037 ; CHECK-P8-NEXT: xscvuxddp f1, f0
1038 ; CHECK-P8-NEXT: blr
1040 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
1041 %0 = load i16, ptr %add.ptr, align 2
1042 %conv = uitofp i16 %0 to double
1046 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1047 define dso_local double @ld_reg_double_uint16_t(ptr nocapture readonly %ptr, i64 %off) {
1048 ; CHECK-POSTP8-LABEL: ld_reg_double_uint16_t:
1049 ; CHECK-POSTP8: # %bb.0: # %entry
1050 ; CHECK-POSTP8-NEXT: lxsihzx f0, r3, r4
1051 ; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
1052 ; CHECK-POSTP8-NEXT: blr
1054 ; CHECK-P8-LABEL: ld_reg_double_uint16_t:
1055 ; CHECK-P8: # %bb.0: # %entry
1056 ; CHECK-P8-NEXT: lhzx r3, r3, r4
1057 ; CHECK-P8-NEXT: mtfprwz f0, r3
1058 ; CHECK-P8-NEXT: xscvuxddp f1, f0
1059 ; CHECK-P8-NEXT: blr
1061 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
1062 %0 = load i16, ptr %add.ptr, align 2
1063 %conv = uitofp i16 %0 to double
1067 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1068 define dso_local double @ld_or_double_uint16_t(i64 %ptr, i8 zeroext %off) {
1069 ; CHECK-POSTP8-LABEL: ld_or_double_uint16_t:
1070 ; CHECK-POSTP8: # %bb.0: # %entry
1071 ; CHECK-POSTP8-NEXT: or r3, r4, r3
1072 ; CHECK-POSTP8-NEXT: lxsihzx f0, 0, r3
1073 ; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
1074 ; CHECK-POSTP8-NEXT: blr
1076 ; CHECK-P8-LABEL: ld_or_double_uint16_t:
1077 ; CHECK-P8: # %bb.0: # %entry
1078 ; CHECK-P8-NEXT: or r3, r4, r3
1079 ; CHECK-P8-NEXT: lhz r3, 0(r3)
1080 ; CHECK-P8-NEXT: mtfprwz f0, r3
1081 ; CHECK-P8-NEXT: xscvuxddp f1, f0
1082 ; CHECK-P8-NEXT: blr
1084 %conv = zext i8 %off to i64
1085 %or = or i64 %conv, %ptr
1086 %0 = inttoptr i64 %or to ptr
1087 %1 = load i16, ptr %0, align 2
1088 %conv1 = uitofp i16 %1 to double
1092 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1093 define dso_local double @ld_not_disjoint16_double_uint16_t(i64 %ptr) {
1094 ; CHECK-POSTP8-LABEL: ld_not_disjoint16_double_uint16_t:
1095 ; CHECK-POSTP8: # %bb.0: # %entry
1096 ; CHECK-POSTP8-NEXT: ori r3, r3, 6
1097 ; CHECK-POSTP8-NEXT: lxsihzx f0, 0, r3
1098 ; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
1099 ; CHECK-POSTP8-NEXT: blr
1101 ; CHECK-P8-LABEL: ld_not_disjoint16_double_uint16_t:
1102 ; CHECK-P8: # %bb.0: # %entry
1103 ; CHECK-P8-NEXT: ori r3, r3, 6
1104 ; CHECK-P8-NEXT: lhz r3, 0(r3)
1105 ; CHECK-P8-NEXT: mtfprwz f0, r3
1106 ; CHECK-P8-NEXT: xscvuxddp f1, f0
1107 ; CHECK-P8-NEXT: blr
1109 %or = or i64 %ptr, 6
1110 %0 = inttoptr i64 %or to ptr
1111 %1 = load i16, ptr %0, align 2
1112 %conv = uitofp i16 %1 to double
1116 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1117 define dso_local double @ld_disjoint_align16_double_uint16_t(i64 %ptr) {
1118 ; CHECK-POSTP8-LABEL: ld_disjoint_align16_double_uint16_t:
1119 ; CHECK-POSTP8: # %bb.0: # %entry
1120 ; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
1121 ; CHECK-POSTP8-NEXT: ori r3, r3, 24
1122 ; CHECK-POSTP8-NEXT: lxsihzx f0, 0, r3
1123 ; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
1124 ; CHECK-POSTP8-NEXT: blr
1126 ; CHECK-P8-LABEL: ld_disjoint_align16_double_uint16_t:
1127 ; CHECK-P8: # %bb.0: # %entry
1128 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
1129 ; CHECK-P8-NEXT: lhz r3, 24(r3)
1130 ; CHECK-P8-NEXT: mtfprwz f0, r3
1131 ; CHECK-P8-NEXT: xscvuxddp f1, f0
1132 ; CHECK-P8-NEXT: blr
1134 %and = and i64 %ptr, -4096
1135 %or = or i64 %and, 24
1136 %0 = inttoptr i64 %or to ptr
1137 %1 = load i16, ptr %0, align 8
1138 %conv = uitofp i16 %1 to double
1142 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1143 define dso_local double @ld_not_disjoint32_double_uint16_t(i64 %ptr) {
1144 ; CHECK-POSTP8-LABEL: ld_not_disjoint32_double_uint16_t:
1145 ; CHECK-POSTP8: # %bb.0: # %entry
1146 ; CHECK-POSTP8-NEXT: ori r3, r3, 34463
1147 ; CHECK-POSTP8-NEXT: oris r3, r3, 1
1148 ; CHECK-POSTP8-NEXT: lxsihzx f0, 0, r3
1149 ; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
1150 ; CHECK-POSTP8-NEXT: blr
1152 ; CHECK-P8-LABEL: ld_not_disjoint32_double_uint16_t:
1153 ; CHECK-P8: # %bb.0: # %entry
1154 ; CHECK-P8-NEXT: ori r3, r3, 34463
1155 ; CHECK-P8-NEXT: oris r3, r3, 1
1156 ; CHECK-P8-NEXT: lhz r3, 0(r3)
1157 ; CHECK-P8-NEXT: mtfprwz f0, r3
1158 ; CHECK-P8-NEXT: xscvuxddp f1, f0
1159 ; CHECK-P8-NEXT: blr
1161 %or = or i64 %ptr, 99999
1162 %0 = inttoptr i64 %or to ptr
1163 %1 = load i16, ptr %0, align 2
1164 %conv = uitofp i16 %1 to double
1168 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1169 define dso_local double @ld_disjoint_align32_double_uint16_t(i64 %ptr) {
1170 ; CHECK-P10-LABEL: ld_disjoint_align32_double_uint16_t:
1171 ; CHECK-P10: # %bb.0: # %entry
1172 ; CHECK-P10-NEXT: lis r4, -15264
1173 ; CHECK-P10-NEXT: and r3, r3, r4
1174 ; CHECK-P10-NEXT: pli r4, 999990000
1175 ; CHECK-P10-NEXT: lxsihzx f0, r3, r4
1176 ; CHECK-P10-NEXT: xscvuxddp f1, f0
1177 ; CHECK-P10-NEXT: blr
1179 ; CHECK-P9-LABEL: ld_disjoint_align32_double_uint16_t:
1180 ; CHECK-P9: # %bb.0: # %entry
1181 ; CHECK-P9-NEXT: lis r4, -15264
1182 ; CHECK-P9-NEXT: and r3, r3, r4
1183 ; CHECK-P9-NEXT: lis r4, 15258
1184 ; CHECK-P9-NEXT: ori r4, r4, 41712
1185 ; CHECK-P9-NEXT: lxsihzx f0, r3, r4
1186 ; CHECK-P9-NEXT: xscvuxddp f1, f0
1187 ; CHECK-P9-NEXT: blr
1189 ; CHECK-P8-LABEL: ld_disjoint_align32_double_uint16_t:
1190 ; CHECK-P8: # %bb.0: # %entry
1191 ; CHECK-P8-NEXT: lis r4, -15264
1192 ; CHECK-P8-NEXT: and r3, r3, r4
1193 ; CHECK-P8-NEXT: lis r4, 15258
1194 ; CHECK-P8-NEXT: ori r4, r4, 41712
1195 ; CHECK-P8-NEXT: lhzx r3, r3, r4
1196 ; CHECK-P8-NEXT: mtfprwz f0, r3
1197 ; CHECK-P8-NEXT: xscvuxddp f1, f0
1198 ; CHECK-P8-NEXT: blr
1200 %and = and i64 %ptr, -1000341504
1201 %or = or i64 %and, 999990000
1202 %0 = inttoptr i64 %or to ptr
1203 %1 = load i16, ptr %0, align 16
1204 %conv = uitofp i16 %1 to double
1208 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1209 define dso_local double @ld_not_disjoint64_double_uint16_t(i64 %ptr) {
1210 ; CHECK-P10-LABEL: ld_not_disjoint64_double_uint16_t:
1211 ; CHECK-P10: # %bb.0: # %entry
1212 ; CHECK-P10-NEXT: pli r4, 232
1213 ; CHECK-P10-NEXT: pli r5, 3567587329
1214 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
1215 ; CHECK-P10-NEXT: or r3, r3, r5
1216 ; CHECK-P10-NEXT: lxsihzx f0, 0, r3
1217 ; CHECK-P10-NEXT: xscvuxddp f1, f0
1218 ; CHECK-P10-NEXT: blr
1220 ; CHECK-P9-LABEL: ld_not_disjoint64_double_uint16_t:
1221 ; CHECK-P9: # %bb.0: # %entry
1222 ; CHECK-P9-NEXT: li r4, 29
1223 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
1224 ; CHECK-P9-NEXT: oris r4, r4, 54437
1225 ; CHECK-P9-NEXT: ori r4, r4, 4097
1226 ; CHECK-P9-NEXT: or r3, r3, r4
1227 ; CHECK-P9-NEXT: lxsihzx f0, 0, r3
1228 ; CHECK-P9-NEXT: xscvuxddp f1, f0
1229 ; CHECK-P9-NEXT: blr
1231 ; CHECK-P8-LABEL: ld_not_disjoint64_double_uint16_t:
1232 ; CHECK-P8: # %bb.0: # %entry
1233 ; CHECK-P8-NEXT: li r4, 29
1234 ; CHECK-P8-NEXT: rldic r4, r4, 35, 24
1235 ; CHECK-P8-NEXT: oris r4, r4, 54437
1236 ; CHECK-P8-NEXT: ori r4, r4, 4097
1237 ; CHECK-P8-NEXT: or r3, r3, r4
1238 ; CHECK-P8-NEXT: lhz r3, 0(r3)
1239 ; CHECK-P8-NEXT: mtfprwz f0, r3
1240 ; CHECK-P8-NEXT: xscvuxddp f1, f0
1241 ; CHECK-P8-NEXT: blr
1243 %or = or i64 %ptr, 1000000000001
1244 %0 = inttoptr i64 %or to ptr
1245 %1 = load i16, ptr %0, align 2
1246 %conv = uitofp i16 %1 to double
1250 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1251 define dso_local double @ld_disjoint_align64_double_uint16_t(i64 %ptr) {
1252 ; CHECK-P10-LABEL: ld_disjoint_align64_double_uint16_t:
1253 ; CHECK-P10: # %bb.0: # %entry
1254 ; CHECK-P10-NEXT: pli r4, 244140625
1255 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
1256 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
1257 ; CHECK-P10-NEXT: lxsihzx f0, r3, r4
1258 ; CHECK-P10-NEXT: xscvuxddp f1, f0
1259 ; CHECK-P10-NEXT: blr
1261 ; CHECK-P9-LABEL: ld_disjoint_align64_double_uint16_t:
1262 ; CHECK-P9: # %bb.0: # %entry
1263 ; CHECK-P9-NEXT: lis r4, 3725
1264 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
1265 ; CHECK-P9-NEXT: ori r4, r4, 19025
1266 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
1267 ; CHECK-P9-NEXT: lxsihzx f0, r3, r4
1268 ; CHECK-P9-NEXT: xscvuxddp f1, f0
1269 ; CHECK-P9-NEXT: blr
1271 ; CHECK-P8-LABEL: ld_disjoint_align64_double_uint16_t:
1272 ; CHECK-P8: # %bb.0: # %entry
1273 ; CHECK-P8-NEXT: lis r4, 3725
1274 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
1275 ; CHECK-P8-NEXT: ori r4, r4, 19025
1276 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
1277 ; CHECK-P8-NEXT: lhzx r3, r3, r4
1278 ; CHECK-P8-NEXT: mtfprwz f0, r3
1279 ; CHECK-P8-NEXT: xscvuxddp f1, f0
1280 ; CHECK-P8-NEXT: blr
1282 %and = and i64 %ptr, -1099511627776
1283 %or = or i64 %and, 1000000000000
1284 %0 = inttoptr i64 %or to ptr
1285 %1 = load i16, ptr %0, align 4096
1286 %conv = uitofp i16 %1 to double
1290 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1291 define dso_local double @ld_cst_align16_double_uint16_t() {
1292 ; CHECK-POSTP8-LABEL: ld_cst_align16_double_uint16_t:
1293 ; CHECK-POSTP8: # %bb.0: # %entry
1294 ; CHECK-POSTP8-NEXT: li r3, 4080
1295 ; CHECK-POSTP8-NEXT: lxsihzx f0, 0, r3
1296 ; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
1297 ; CHECK-POSTP8-NEXT: blr
1299 ; CHECK-P8-LABEL: ld_cst_align16_double_uint16_t:
1300 ; CHECK-P8: # %bb.0: # %entry
1301 ; CHECK-P8-NEXT: lhz r3, 4080(0)
1302 ; CHECK-P8-NEXT: mtfprwz f0, r3
1303 ; CHECK-P8-NEXT: xscvuxddp f1, f0
1304 ; CHECK-P8-NEXT: blr
1306 %0 = load i16, ptr inttoptr (i64 4080 to ptr), align 16
1307 %conv = uitofp i16 %0 to double
1311 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1312 define dso_local double @ld_cst_align32_double_uint16_t() {
1313 ; CHECK-P10-LABEL: ld_cst_align32_double_uint16_t:
1314 ; CHECK-P10: # %bb.0: # %entry
1315 ; CHECK-P10-NEXT: pli r3, 9999900
1316 ; CHECK-P10-NEXT: lxsihzx f0, 0, r3
1317 ; CHECK-P10-NEXT: xscvuxddp f1, f0
1318 ; CHECK-P10-NEXT: blr
1320 ; CHECK-P9-LABEL: ld_cst_align32_double_uint16_t:
1321 ; CHECK-P9: # %bb.0: # %entry
1322 ; CHECK-P9-NEXT: lis r3, 152
1323 ; CHECK-P9-NEXT: ori r3, r3, 38428
1324 ; CHECK-P9-NEXT: lxsihzx f0, 0, r3
1325 ; CHECK-P9-NEXT: xscvuxddp f1, f0
1326 ; CHECK-P9-NEXT: blr
1328 ; CHECK-P8-LABEL: ld_cst_align32_double_uint16_t:
1329 ; CHECK-P8: # %bb.0: # %entry
1330 ; CHECK-P8-NEXT: lis r3, 153
1331 ; CHECK-P8-NEXT: lhz r3, -27108(r3)
1332 ; CHECK-P8-NEXT: mtfprwz f0, r3
1333 ; CHECK-P8-NEXT: xscvuxddp f1, f0
1334 ; CHECK-P8-NEXT: blr
1336 %0 = load i16, ptr inttoptr (i64 9999900 to ptr), align 4
1337 %conv = uitofp i16 %0 to double
1341 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1342 define dso_local double @ld_cst_align64_double_uint16_t() {
1343 ; CHECK-P10-LABEL: ld_cst_align64_double_uint16_t:
1344 ; CHECK-P10: # %bb.0: # %entry
1345 ; CHECK-P10-NEXT: pli r3, 244140625
1346 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
1347 ; CHECK-P10-NEXT: lxsihzx f0, 0, r3
1348 ; CHECK-P10-NEXT: xscvuxddp f1, f0
1349 ; CHECK-P10-NEXT: blr
1351 ; CHECK-P9-LABEL: ld_cst_align64_double_uint16_t:
1352 ; CHECK-P9: # %bb.0: # %entry
1353 ; CHECK-P9-NEXT: lis r3, 3725
1354 ; CHECK-P9-NEXT: ori r3, r3, 19025
1355 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
1356 ; CHECK-P9-NEXT: lxsihzx f0, 0, r3
1357 ; CHECK-P9-NEXT: xscvuxddp f1, f0
1358 ; CHECK-P9-NEXT: blr
1360 ; CHECK-P8-LABEL: ld_cst_align64_double_uint16_t:
1361 ; CHECK-P8: # %bb.0: # %entry
1362 ; CHECK-P8-NEXT: lis r3, 3725
1363 ; CHECK-P8-NEXT: ori r3, r3, 19025
1364 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
1365 ; CHECK-P8-NEXT: lhz r3, 0(r3)
1366 ; CHECK-P8-NEXT: mtfprwz f0, r3
1367 ; CHECK-P8-NEXT: xscvuxddp f1, f0
1368 ; CHECK-P8-NEXT: blr
1370 %0 = load i16, ptr inttoptr (i64 1000000000000 to ptr), align 4096
1371 %conv = uitofp i16 %0 to double
1375 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1376 define dso_local double @ld_0_double_int16_t(i64 %ptr) {
1377 ; CHECK-POSTP8-LABEL: ld_0_double_int16_t:
1378 ; CHECK-POSTP8: # %bb.0: # %entry
1379 ; CHECK-POSTP8-NEXT: lxsihzx v2, 0, r3
1380 ; CHECK-POSTP8-NEXT: vextsh2d v2, v2
1381 ; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
1382 ; CHECK-POSTP8-NEXT: blr
1384 ; CHECK-P8-LABEL: ld_0_double_int16_t:
1385 ; CHECK-P8: # %bb.0: # %entry
1386 ; CHECK-P8-NEXT: lha r3, 0(r3)
1387 ; CHECK-P8-NEXT: mtfprwa f0, r3
1388 ; CHECK-P8-NEXT: xscvsxddp f1, f0
1389 ; CHECK-P8-NEXT: blr
1391 %0 = inttoptr i64 %ptr to ptr
1392 %1 = load i16, ptr %0, align 2
1393 %conv = sitofp i16 %1 to double
1397 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1398 define dso_local double @ld_align16_double_int16_t(ptr nocapture readonly %ptr) {
1399 ; CHECK-POSTP8-LABEL: ld_align16_double_int16_t:
1400 ; CHECK-POSTP8: # %bb.0: # %entry
1401 ; CHECK-POSTP8-NEXT: addi r3, r3, 8
1402 ; CHECK-POSTP8-NEXT: lxsihzx v2, 0, r3
1403 ; CHECK-POSTP8-NEXT: vextsh2d v2, v2
1404 ; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
1405 ; CHECK-POSTP8-NEXT: blr
1407 ; CHECK-P8-LABEL: ld_align16_double_int16_t:
1408 ; CHECK-P8: # %bb.0: # %entry
1409 ; CHECK-P8-NEXT: lha r3, 8(r3)
1410 ; CHECK-P8-NEXT: mtfprwa f0, r3
1411 ; CHECK-P8-NEXT: xscvsxddp f1, f0
1412 ; CHECK-P8-NEXT: blr
1414 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
1415 %0 = load i16, ptr %add.ptr, align 2
1416 %conv = sitofp i16 %0 to double
1420 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1421 define dso_local double @ld_align32_double_int16_t(ptr nocapture readonly %ptr) {
1422 ; CHECK-P10-LABEL: ld_align32_double_int16_t:
1423 ; CHECK-P10: # %bb.0: # %entry
1424 ; CHECK-P10-NEXT: pli r4, 99999000
1425 ; CHECK-P10-NEXT: lxsihzx v2, r3, r4
1426 ; CHECK-P10-NEXT: vextsh2d v2, v2
1427 ; CHECK-P10-NEXT: xscvsxddp f1, v2
1428 ; CHECK-P10-NEXT: blr
1430 ; CHECK-P9-LABEL: ld_align32_double_int16_t:
1431 ; CHECK-P9: # %bb.0: # %entry
1432 ; CHECK-P9-NEXT: lis r4, 1525
1433 ; CHECK-P9-NEXT: ori r4, r4, 56600
1434 ; CHECK-P9-NEXT: lxsihzx v2, r3, r4
1435 ; CHECK-P9-NEXT: vextsh2d v2, v2
1436 ; CHECK-P9-NEXT: xscvsxddp f1, v2
1437 ; CHECK-P9-NEXT: blr
1439 ; CHECK-P8-LABEL: ld_align32_double_int16_t:
1440 ; CHECK-P8: # %bb.0: # %entry
1441 ; CHECK-P8-NEXT: lis r4, 1525
1442 ; CHECK-P8-NEXT: ori r4, r4, 56600
1443 ; CHECK-P8-NEXT: lhax r3, r3, r4
1444 ; CHECK-P8-NEXT: mtfprwa f0, r3
1445 ; CHECK-P8-NEXT: xscvsxddp f1, f0
1446 ; CHECK-P8-NEXT: blr
1448 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
1449 %0 = load i16, ptr %add.ptr, align 2
1450 %conv = sitofp i16 %0 to double
1454 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1455 define dso_local double @ld_align64_double_int16_t(ptr nocapture readonly %ptr) {
1456 ; CHECK-P10-LABEL: ld_align64_double_int16_t:
1457 ; CHECK-P10: # %bb.0: # %entry
1458 ; CHECK-P10-NEXT: pli r4, 244140625
1459 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
1460 ; CHECK-P10-NEXT: lxsihzx v2, r3, r4
1461 ; CHECK-P10-NEXT: vextsh2d v2, v2
1462 ; CHECK-P10-NEXT: xscvsxddp f1, v2
1463 ; CHECK-P10-NEXT: blr
1465 ; CHECK-P9-LABEL: ld_align64_double_int16_t:
1466 ; CHECK-P9: # %bb.0: # %entry
1467 ; CHECK-P9-NEXT: lis r4, 3725
1468 ; CHECK-P9-NEXT: ori r4, r4, 19025
1469 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
1470 ; CHECK-P9-NEXT: lxsihzx v2, r3, r4
1471 ; CHECK-P9-NEXT: vextsh2d v2, v2
1472 ; CHECK-P9-NEXT: xscvsxddp f1, v2
1473 ; CHECK-P9-NEXT: blr
1475 ; CHECK-P8-LABEL: ld_align64_double_int16_t:
1476 ; CHECK-P8: # %bb.0: # %entry
1477 ; CHECK-P8-NEXT: lis r4, 3725
1478 ; CHECK-P8-NEXT: ori r4, r4, 19025
1479 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
1480 ; CHECK-P8-NEXT: lhax r3, r3, r4
1481 ; CHECK-P8-NEXT: mtfprwa f0, r3
1482 ; CHECK-P8-NEXT: xscvsxddp f1, f0
1483 ; CHECK-P8-NEXT: blr
1485 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
1486 %0 = load i16, ptr %add.ptr, align 2
1487 %conv = sitofp i16 %0 to double
1491 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1492 define dso_local double @ld_reg_double_int16_t(ptr nocapture readonly %ptr, i64 %off) {
1493 ; CHECK-POSTP8-LABEL: ld_reg_double_int16_t:
1494 ; CHECK-POSTP8: # %bb.0: # %entry
1495 ; CHECK-POSTP8-NEXT: lxsihzx v2, r3, r4
1496 ; CHECK-POSTP8-NEXT: vextsh2d v2, v2
1497 ; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
1498 ; CHECK-POSTP8-NEXT: blr
1500 ; CHECK-P8-LABEL: ld_reg_double_int16_t:
1501 ; CHECK-P8: # %bb.0: # %entry
1502 ; CHECK-P8-NEXT: lhax r3, r3, r4
1503 ; CHECK-P8-NEXT: mtfprwa f0, r3
1504 ; CHECK-P8-NEXT: xscvsxddp f1, f0
1505 ; CHECK-P8-NEXT: blr
1507 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
1508 %0 = load i16, ptr %add.ptr, align 2
1509 %conv = sitofp i16 %0 to double
1513 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1514 define dso_local double @ld_or_double_int16_t(i64 %ptr, i8 zeroext %off) {
1515 ; CHECK-POSTP8-LABEL: ld_or_double_int16_t:
1516 ; CHECK-POSTP8: # %bb.0: # %entry
1517 ; CHECK-POSTP8-NEXT: or r3, r4, r3
1518 ; CHECK-POSTP8-NEXT: lxsihzx v2, 0, r3
1519 ; CHECK-POSTP8-NEXT: vextsh2d v2, v2
1520 ; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
1521 ; CHECK-POSTP8-NEXT: blr
1523 ; CHECK-P8-LABEL: ld_or_double_int16_t:
1524 ; CHECK-P8: # %bb.0: # %entry
1525 ; CHECK-P8-NEXT: or r3, r4, r3
1526 ; CHECK-P8-NEXT: lha r3, 0(r3)
1527 ; CHECK-P8-NEXT: mtfprwa f0, r3
1528 ; CHECK-P8-NEXT: xscvsxddp f1, f0
1529 ; CHECK-P8-NEXT: blr
1531 %conv = zext i8 %off to i64
1532 %or = or i64 %conv, %ptr
1533 %0 = inttoptr i64 %or to ptr
1534 %1 = load i16, ptr %0, align 2
1535 %conv1 = sitofp i16 %1 to double
1539 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1540 define dso_local double @ld_not_disjoint16_double_int16_t(i64 %ptr) {
1541 ; CHECK-POSTP8-LABEL: ld_not_disjoint16_double_int16_t:
1542 ; CHECK-POSTP8: # %bb.0: # %entry
1543 ; CHECK-POSTP8-NEXT: ori r3, r3, 6
1544 ; CHECK-POSTP8-NEXT: lxsihzx v2, 0, r3
1545 ; CHECK-POSTP8-NEXT: vextsh2d v2, v2
1546 ; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
1547 ; CHECK-POSTP8-NEXT: blr
1549 ; CHECK-P8-LABEL: ld_not_disjoint16_double_int16_t:
1550 ; CHECK-P8: # %bb.0: # %entry
1551 ; CHECK-P8-NEXT: ori r3, r3, 6
1552 ; CHECK-P8-NEXT: lha r3, 0(r3)
1553 ; CHECK-P8-NEXT: mtfprwa f0, r3
1554 ; CHECK-P8-NEXT: xscvsxddp f1, f0
1555 ; CHECK-P8-NEXT: blr
1557 %or = or i64 %ptr, 6
1558 %0 = inttoptr i64 %or to ptr
1559 %1 = load i16, ptr %0, align 2
1560 %conv = sitofp i16 %1 to double
1564 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1565 define dso_local double @ld_disjoint_align16_double_int16_t(i64 %ptr) {
1566 ; CHECK-POSTP8-LABEL: ld_disjoint_align16_double_int16_t:
1567 ; CHECK-POSTP8: # %bb.0: # %entry
1568 ; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
1569 ; CHECK-POSTP8-NEXT: ori r3, r3, 24
1570 ; CHECK-POSTP8-NEXT: lxsihzx v2, 0, r3
1571 ; CHECK-POSTP8-NEXT: vextsh2d v2, v2
1572 ; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
1573 ; CHECK-POSTP8-NEXT: blr
1575 ; CHECK-P8-LABEL: ld_disjoint_align16_double_int16_t:
1576 ; CHECK-P8: # %bb.0: # %entry
1577 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
1578 ; CHECK-P8-NEXT: lha r3, 24(r3)
1579 ; CHECK-P8-NEXT: mtfprwa f0, r3
1580 ; CHECK-P8-NEXT: xscvsxddp f1, f0
1581 ; CHECK-P8-NEXT: blr
1583 %and = and i64 %ptr, -4096
1584 %or = or i64 %and, 24
1585 %0 = inttoptr i64 %or to ptr
1586 %1 = load i16, ptr %0, align 8
1587 %conv = sitofp i16 %1 to double
1591 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1592 define dso_local double @ld_not_disjoint32_double_int16_t(i64 %ptr) {
1593 ; CHECK-POSTP8-LABEL: ld_not_disjoint32_double_int16_t:
1594 ; CHECK-POSTP8: # %bb.0: # %entry
1595 ; CHECK-POSTP8-NEXT: ori r3, r3, 34463
1596 ; CHECK-POSTP8-NEXT: oris r3, r3, 1
1597 ; CHECK-POSTP8-NEXT: lxsihzx v2, 0, r3
1598 ; CHECK-POSTP8-NEXT: vextsh2d v2, v2
1599 ; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
1600 ; CHECK-POSTP8-NEXT: blr
1602 ; CHECK-P8-LABEL: ld_not_disjoint32_double_int16_t:
1603 ; CHECK-P8: # %bb.0: # %entry
1604 ; CHECK-P8-NEXT: ori r3, r3, 34463
1605 ; CHECK-P8-NEXT: oris r3, r3, 1
1606 ; CHECK-P8-NEXT: lha r3, 0(r3)
1607 ; CHECK-P8-NEXT: mtfprwa f0, r3
1608 ; CHECK-P8-NEXT: xscvsxddp f1, f0
1609 ; CHECK-P8-NEXT: blr
1611 %or = or i64 %ptr, 99999
1612 %0 = inttoptr i64 %or to ptr
1613 %1 = load i16, ptr %0, align 2
1614 %conv = sitofp i16 %1 to double
1618 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1619 define dso_local double @ld_disjoint_align32_double_int16_t(i64 %ptr) {
1620 ; CHECK-P10-LABEL: ld_disjoint_align32_double_int16_t:
1621 ; CHECK-P10: # %bb.0: # %entry
1622 ; CHECK-P10-NEXT: lis r4, -15264
1623 ; CHECK-P10-NEXT: and r3, r3, r4
1624 ; CHECK-P10-NEXT: pli r4, 999990000
1625 ; CHECK-P10-NEXT: lxsihzx v2, r3, r4
1626 ; CHECK-P10-NEXT: vextsh2d v2, v2
1627 ; CHECK-P10-NEXT: xscvsxddp f1, v2
1628 ; CHECK-P10-NEXT: blr
1630 ; CHECK-P9-LABEL: ld_disjoint_align32_double_int16_t:
1631 ; CHECK-P9: # %bb.0: # %entry
1632 ; CHECK-P9-NEXT: lis r4, -15264
1633 ; CHECK-P9-NEXT: and r3, r3, r4
1634 ; CHECK-P9-NEXT: lis r4, 15258
1635 ; CHECK-P9-NEXT: ori r4, r4, 41712
1636 ; CHECK-P9-NEXT: lxsihzx v2, r3, r4
1637 ; CHECK-P9-NEXT: vextsh2d v2, v2
1638 ; CHECK-P9-NEXT: xscvsxddp f1, v2
1639 ; CHECK-P9-NEXT: blr
1641 ; CHECK-P8-LABEL: ld_disjoint_align32_double_int16_t:
1642 ; CHECK-P8: # %bb.0: # %entry
1643 ; CHECK-P8-NEXT: lis r4, -15264
1644 ; CHECK-P8-NEXT: and r3, r3, r4
1645 ; CHECK-P8-NEXT: lis r4, 15258
1646 ; CHECK-P8-NEXT: ori r4, r4, 41712
1647 ; CHECK-P8-NEXT: lhax r3, r3, r4
1648 ; CHECK-P8-NEXT: mtfprwa f0, r3
1649 ; CHECK-P8-NEXT: xscvsxddp f1, f0
1650 ; CHECK-P8-NEXT: blr
1652 %and = and i64 %ptr, -1000341504
1653 %or = or i64 %and, 999990000
1654 %0 = inttoptr i64 %or to ptr
1655 %1 = load i16, ptr %0, align 16
1656 %conv = sitofp i16 %1 to double
1660 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1661 define dso_local double @ld_not_disjoint64_double_int16_t(i64 %ptr) {
1662 ; CHECK-P10-LABEL: ld_not_disjoint64_double_int16_t:
1663 ; CHECK-P10: # %bb.0: # %entry
1664 ; CHECK-P10-NEXT: pli r4, 232
1665 ; CHECK-P10-NEXT: pli r5, 3567587329
1666 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
1667 ; CHECK-P10-NEXT: or r3, r3, r5
1668 ; CHECK-P10-NEXT: lxsihzx v2, 0, r3
1669 ; CHECK-P10-NEXT: vextsh2d v2, v2
1670 ; CHECK-P10-NEXT: xscvsxddp f1, v2
1671 ; CHECK-P10-NEXT: blr
1673 ; CHECK-P9-LABEL: ld_not_disjoint64_double_int16_t:
1674 ; CHECK-P9: # %bb.0: # %entry
1675 ; CHECK-P9-NEXT: li r4, 29
1676 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
1677 ; CHECK-P9-NEXT: oris r4, r4, 54437
1678 ; CHECK-P9-NEXT: ori r4, r4, 4097
1679 ; CHECK-P9-NEXT: or r3, r3, r4
1680 ; CHECK-P9-NEXT: lxsihzx v2, 0, r3
1681 ; CHECK-P9-NEXT: vextsh2d v2, v2
1682 ; CHECK-P9-NEXT: xscvsxddp f1, v2
1683 ; CHECK-P9-NEXT: blr
1685 ; CHECK-P8-LABEL: ld_not_disjoint64_double_int16_t:
1686 ; CHECK-P8: # %bb.0: # %entry
1687 ; CHECK-P8-NEXT: li r4, 29
1688 ; CHECK-P8-NEXT: rldic r4, r4, 35, 24
1689 ; CHECK-P8-NEXT: oris r4, r4, 54437
1690 ; CHECK-P8-NEXT: ori r4, r4, 4097
1691 ; CHECK-P8-NEXT: or r3, r3, r4
1692 ; CHECK-P8-NEXT: lha r3, 0(r3)
1693 ; CHECK-P8-NEXT: mtfprwa f0, r3
1694 ; CHECK-P8-NEXT: xscvsxddp f1, f0
1695 ; CHECK-P8-NEXT: blr
1697 %or = or i64 %ptr, 1000000000001
1698 %0 = inttoptr i64 %or to ptr
1699 %1 = load i16, ptr %0, align 2
1700 %conv = sitofp i16 %1 to double
1704 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1705 define dso_local double @ld_disjoint_align64_double_int16_t(i64 %ptr) {
1706 ; CHECK-P10-LABEL: ld_disjoint_align64_double_int16_t:
1707 ; CHECK-P10: # %bb.0: # %entry
1708 ; CHECK-P10-NEXT: pli r4, 244140625
1709 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
1710 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
1711 ; CHECK-P10-NEXT: lxsihzx v2, r3, r4
1712 ; CHECK-P10-NEXT: vextsh2d v2, v2
1713 ; CHECK-P10-NEXT: xscvsxddp f1, v2
1714 ; CHECK-P10-NEXT: blr
1716 ; CHECK-P9-LABEL: ld_disjoint_align64_double_int16_t:
1717 ; CHECK-P9: # %bb.0: # %entry
1718 ; CHECK-P9-NEXT: lis r4, 3725
1719 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
1720 ; CHECK-P9-NEXT: ori r4, r4, 19025
1721 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
1722 ; CHECK-P9-NEXT: lxsihzx v2, r3, r4
1723 ; CHECK-P9-NEXT: vextsh2d v2, v2
1724 ; CHECK-P9-NEXT: xscvsxddp f1, v2
1725 ; CHECK-P9-NEXT: blr
1727 ; CHECK-P8-LABEL: ld_disjoint_align64_double_int16_t:
1728 ; CHECK-P8: # %bb.0: # %entry
1729 ; CHECK-P8-NEXT: lis r4, 3725
1730 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
1731 ; CHECK-P8-NEXT: ori r4, r4, 19025
1732 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
1733 ; CHECK-P8-NEXT: lhax r3, r3, r4
1734 ; CHECK-P8-NEXT: mtfprwa f0, r3
1735 ; CHECK-P8-NEXT: xscvsxddp f1, f0
1736 ; CHECK-P8-NEXT: blr
1738 %and = and i64 %ptr, -1099511627776
1739 %or = or i64 %and, 1000000000000
1740 %0 = inttoptr i64 %or to ptr
1741 %1 = load i16, ptr %0, align 4096
1742 %conv = sitofp i16 %1 to double
1746 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1747 define dso_local double @ld_cst_align16_double_int16_t() {
1748 ; CHECK-POSTP8-LABEL: ld_cst_align16_double_int16_t:
1749 ; CHECK-POSTP8: # %bb.0: # %entry
1750 ; CHECK-POSTP8-NEXT: li r3, 4080
1751 ; CHECK-POSTP8-NEXT: lxsihzx v2, 0, r3
1752 ; CHECK-POSTP8-NEXT: vextsh2d v2, v2
1753 ; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
1754 ; CHECK-POSTP8-NEXT: blr
1756 ; CHECK-P8-LABEL: ld_cst_align16_double_int16_t:
1757 ; CHECK-P8: # %bb.0: # %entry
1758 ; CHECK-P8-NEXT: lha r3, 4080(0)
1759 ; CHECK-P8-NEXT: mtfprwa f0, r3
1760 ; CHECK-P8-NEXT: xscvsxddp f1, f0
1761 ; CHECK-P8-NEXT: blr
1763 %0 = load i16, ptr inttoptr (i64 4080 to ptr), align 16
1764 %conv = sitofp i16 %0 to double
1768 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1769 define dso_local double @ld_cst_align32_double_int16_t() {
1770 ; CHECK-P10-LABEL: ld_cst_align32_double_int16_t:
1771 ; CHECK-P10: # %bb.0: # %entry
1772 ; CHECK-P10-NEXT: pli r3, 9999900
1773 ; CHECK-P10-NEXT: lxsihzx v2, 0, r3
1774 ; CHECK-P10-NEXT: vextsh2d v2, v2
1775 ; CHECK-P10-NEXT: xscvsxddp f1, v2
1776 ; CHECK-P10-NEXT: blr
1778 ; CHECK-P9-LABEL: ld_cst_align32_double_int16_t:
1779 ; CHECK-P9: # %bb.0: # %entry
1780 ; CHECK-P9-NEXT: lis r3, 152
1781 ; CHECK-P9-NEXT: ori r3, r3, 38428
1782 ; CHECK-P9-NEXT: lxsihzx v2, 0, r3
1783 ; CHECK-P9-NEXT: vextsh2d v2, v2
1784 ; CHECK-P9-NEXT: xscvsxddp f1, v2
1785 ; CHECK-P9-NEXT: blr
1787 ; CHECK-P8-LABEL: ld_cst_align32_double_int16_t:
1788 ; CHECK-P8: # %bb.0: # %entry
1789 ; CHECK-P8-NEXT: lis r3, 153
1790 ; CHECK-P8-NEXT: lha r3, -27108(r3)
1791 ; CHECK-P8-NEXT: mtfprwa f0, r3
1792 ; CHECK-P8-NEXT: xscvsxddp f1, f0
1793 ; CHECK-P8-NEXT: blr
1795 %0 = load i16, ptr inttoptr (i64 9999900 to ptr), align 4
1796 %conv = sitofp i16 %0 to double
1800 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1801 define dso_local double @ld_cst_align64_double_int16_t() {
1802 ; CHECK-P10-LABEL: ld_cst_align64_double_int16_t:
1803 ; CHECK-P10: # %bb.0: # %entry
1804 ; CHECK-P10-NEXT: pli r3, 244140625
1805 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
1806 ; CHECK-P10-NEXT: lxsihzx v2, 0, r3
1807 ; CHECK-P10-NEXT: vextsh2d v2, v2
1808 ; CHECK-P10-NEXT: xscvsxddp f1, v2
1809 ; CHECK-P10-NEXT: blr
1811 ; CHECK-P9-LABEL: ld_cst_align64_double_int16_t:
1812 ; CHECK-P9: # %bb.0: # %entry
1813 ; CHECK-P9-NEXT: lis r3, 3725
1814 ; CHECK-P9-NEXT: ori r3, r3, 19025
1815 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
1816 ; CHECK-P9-NEXT: lxsihzx v2, 0, r3
1817 ; CHECK-P9-NEXT: vextsh2d v2, v2
1818 ; CHECK-P9-NEXT: xscvsxddp f1, v2
1819 ; CHECK-P9-NEXT: blr
1821 ; CHECK-P8-LABEL: ld_cst_align64_double_int16_t:
1822 ; CHECK-P8: # %bb.0: # %entry
1823 ; CHECK-P8-NEXT: lis r3, 3725
1824 ; CHECK-P8-NEXT: ori r3, r3, 19025
1825 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
1826 ; CHECK-P8-NEXT: lha r3, 0(r3)
1827 ; CHECK-P8-NEXT: mtfprwa f0, r3
1828 ; CHECK-P8-NEXT: xscvsxddp f1, f0
1829 ; CHECK-P8-NEXT: blr
1831 %0 = load i16, ptr inttoptr (i64 1000000000000 to ptr), align 4096
1832 %conv = sitofp i16 %0 to double
1836 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1837 define dso_local double @ld_0_double_uint32_t(i64 %ptr) {
1838 ; CHECK-LABEL: ld_0_double_uint32_t:
1839 ; CHECK: # %bb.0: # %entry
1840 ; CHECK-NEXT: lfiwzx f0, 0, r3
1841 ; CHECK-NEXT: xscvuxddp f1, f0
1844 %0 = inttoptr i64 %ptr to ptr
1845 %1 = load i32, ptr %0, align 4
1846 %conv = uitofp i32 %1 to double
1850 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1851 define dso_local double @ld_align16_double_uint32_t(ptr nocapture readonly %ptr) {
1852 ; CHECK-LABEL: ld_align16_double_uint32_t:
1853 ; CHECK: # %bb.0: # %entry
1854 ; CHECK-NEXT: addi r3, r3, 8
1855 ; CHECK-NEXT: lfiwzx f0, 0, r3
1856 ; CHECK-NEXT: xscvuxddp f1, f0
1859 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
1860 %0 = load i32, ptr %add.ptr, align 4
1861 %conv = uitofp i32 %0 to double
1865 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1866 define dso_local double @ld_align32_double_uint32_t(ptr nocapture readonly %ptr) {
1867 ; CHECK-P10-LABEL: ld_align32_double_uint32_t:
1868 ; CHECK-P10: # %bb.0: # %entry
1869 ; CHECK-P10-NEXT: pli r4, 99999000
1870 ; CHECK-P10-NEXT: lfiwzx f0, r3, r4
1871 ; CHECK-P10-NEXT: xscvuxddp f1, f0
1872 ; CHECK-P10-NEXT: blr
1874 ; CHECK-PREP10-LABEL: ld_align32_double_uint32_t:
1875 ; CHECK-PREP10: # %bb.0: # %entry
1876 ; CHECK-PREP10-NEXT: lis r4, 1525
1877 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
1878 ; CHECK-PREP10-NEXT: lfiwzx f0, r3, r4
1879 ; CHECK-PREP10-NEXT: xscvuxddp f1, f0
1880 ; CHECK-PREP10-NEXT: blr
1882 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
1883 %0 = load i32, ptr %add.ptr, align 4
1884 %conv = uitofp i32 %0 to double
1888 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1889 define dso_local double @ld_align64_double_uint32_t(ptr nocapture readonly %ptr) {
1890 ; CHECK-P10-LABEL: ld_align64_double_uint32_t:
1891 ; CHECK-P10: # %bb.0: # %entry
1892 ; CHECK-P10-NEXT: pli r4, 244140625
1893 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
1894 ; CHECK-P10-NEXT: lfiwzx f0, r3, r4
1895 ; CHECK-P10-NEXT: xscvuxddp f1, f0
1896 ; CHECK-P10-NEXT: blr
1898 ; CHECK-PREP10-LABEL: ld_align64_double_uint32_t:
1899 ; CHECK-PREP10: # %bb.0: # %entry
1900 ; CHECK-PREP10-NEXT: lis r4, 3725
1901 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
1902 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
1903 ; CHECK-PREP10-NEXT: lfiwzx f0, r3, r4
1904 ; CHECK-PREP10-NEXT: xscvuxddp f1, f0
1905 ; CHECK-PREP10-NEXT: blr
1907 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
1908 %0 = load i32, ptr %add.ptr, align 4
1909 %conv = uitofp i32 %0 to double
1913 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1914 define dso_local double @ld_reg_double_uint32_t(ptr nocapture readonly %ptr, i64 %off) {
1915 ; CHECK-LABEL: ld_reg_double_uint32_t:
1916 ; CHECK: # %bb.0: # %entry
1917 ; CHECK-NEXT: lfiwzx f0, r3, r4
1918 ; CHECK-NEXT: xscvuxddp f1, f0
1921 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
1922 %0 = load i32, ptr %add.ptr, align 4
1923 %conv = uitofp i32 %0 to double
1927 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1928 define dso_local double @ld_or_double_uint32_t(i64 %ptr, i8 zeroext %off) {
1929 ; CHECK-LABEL: ld_or_double_uint32_t:
1930 ; CHECK: # %bb.0: # %entry
1931 ; CHECK-NEXT: or r3, r4, r3
1932 ; CHECK-NEXT: lfiwzx f0, 0, r3
1933 ; CHECK-NEXT: xscvuxddp f1, f0
1936 %conv = zext i8 %off to i64
1937 %or = or i64 %conv, %ptr
1938 %0 = inttoptr i64 %or to ptr
1939 %1 = load i32, ptr %0, align 4
1940 %conv1 = uitofp i32 %1 to double
1944 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1945 define dso_local double @ld_not_disjoint16_double_uint32_t(i64 %ptr) {
1946 ; CHECK-LABEL: ld_not_disjoint16_double_uint32_t:
1947 ; CHECK: # %bb.0: # %entry
1948 ; CHECK-NEXT: ori r3, r3, 6
1949 ; CHECK-NEXT: lfiwzx f0, 0, r3
1950 ; CHECK-NEXT: xscvuxddp f1, f0
1953 %or = or i64 %ptr, 6
1954 %0 = inttoptr i64 %or to ptr
1955 %1 = load i32, ptr %0, align 4
1956 %conv = uitofp i32 %1 to double
1960 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1961 define dso_local double @ld_disjoint_align16_double_uint32_t(i64 %ptr) {
1962 ; CHECK-LABEL: ld_disjoint_align16_double_uint32_t:
1963 ; CHECK: # %bb.0: # %entry
1964 ; CHECK-NEXT: rldicr r3, r3, 0, 51
1965 ; CHECK-NEXT: ori r3, r3, 24
1966 ; CHECK-NEXT: lfiwzx f0, 0, r3
1967 ; CHECK-NEXT: xscvuxddp f1, f0
1970 %and = and i64 %ptr, -4096
1971 %or = or i64 %and, 24
1972 %0 = inttoptr i64 %or to ptr
1973 %1 = load i32, ptr %0, align 8
1974 %conv = uitofp i32 %1 to double
1978 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1979 define dso_local double @ld_not_disjoint32_double_uint32_t(i64 %ptr) {
1980 ; CHECK-LABEL: ld_not_disjoint32_double_uint32_t:
1981 ; CHECK: # %bb.0: # %entry
1982 ; CHECK-NEXT: ori r3, r3, 34463
1983 ; CHECK-NEXT: oris r3, r3, 1
1984 ; CHECK-NEXT: lfiwzx f0, 0, r3
1985 ; CHECK-NEXT: xscvuxddp f1, f0
1988 %or = or i64 %ptr, 99999
1989 %0 = inttoptr i64 %or to ptr
1990 %1 = load i32, ptr %0, align 4
1991 %conv = uitofp i32 %1 to double
1995 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1996 define dso_local double @ld_disjoint_align32_double_uint32_t(i64 %ptr) {
1997 ; CHECK-P10-LABEL: ld_disjoint_align32_double_uint32_t:
1998 ; CHECK-P10: # %bb.0: # %entry
1999 ; CHECK-P10-NEXT: lis r4, -15264
2000 ; CHECK-P10-NEXT: and r3, r3, r4
2001 ; CHECK-P10-NEXT: pli r4, 999990000
2002 ; CHECK-P10-NEXT: lfiwzx f0, r3, r4
2003 ; CHECK-P10-NEXT: xscvuxddp f1, f0
2004 ; CHECK-P10-NEXT: blr
2006 ; CHECK-PREP10-LABEL: ld_disjoint_align32_double_uint32_t:
2007 ; CHECK-PREP10: # %bb.0: # %entry
2008 ; CHECK-PREP10-NEXT: lis r4, -15264
2009 ; CHECK-PREP10-NEXT: and r3, r3, r4
2010 ; CHECK-PREP10-NEXT: lis r4, 15258
2011 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
2012 ; CHECK-PREP10-NEXT: lfiwzx f0, r3, r4
2013 ; CHECK-PREP10-NEXT: xscvuxddp f1, f0
2014 ; CHECK-PREP10-NEXT: blr
2016 %and = and i64 %ptr, -1000341504
2017 %or = or i64 %and, 999990000
2018 %0 = inttoptr i64 %or to ptr
2019 %1 = load i32, ptr %0, align 16
2020 %conv = uitofp i32 %1 to double
2024 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2025 define dso_local double @ld_not_disjoint64_double_uint32_t(i64 %ptr) {
2026 ; CHECK-P10-LABEL: ld_not_disjoint64_double_uint32_t:
2027 ; CHECK-P10: # %bb.0: # %entry
2028 ; CHECK-P10-NEXT: pli r4, 232
2029 ; CHECK-P10-NEXT: pli r5, 3567587329
2030 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2031 ; CHECK-P10-NEXT: or r3, r3, r5
2032 ; CHECK-P10-NEXT: lfiwzx f0, 0, r3
2033 ; CHECK-P10-NEXT: xscvuxddp f1, f0
2034 ; CHECK-P10-NEXT: blr
2036 ; CHECK-PREP10-LABEL: ld_not_disjoint64_double_uint32_t:
2037 ; CHECK-PREP10: # %bb.0: # %entry
2038 ; CHECK-PREP10-NEXT: li r4, 29
2039 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2040 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2041 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2042 ; CHECK-PREP10-NEXT: or r3, r3, r4
2043 ; CHECK-PREP10-NEXT: lfiwzx f0, 0, r3
2044 ; CHECK-PREP10-NEXT: xscvuxddp f1, f0
2045 ; CHECK-PREP10-NEXT: blr
2047 %or = or i64 %ptr, 1000000000001
2048 %0 = inttoptr i64 %or to ptr
2049 %1 = load i32, ptr %0, align 4
2050 %conv = uitofp i32 %1 to double
2054 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2055 define dso_local double @ld_disjoint_align64_double_uint32_t(i64 %ptr) {
2056 ; CHECK-P10-LABEL: ld_disjoint_align64_double_uint32_t:
2057 ; CHECK-P10: # %bb.0: # %entry
2058 ; CHECK-P10-NEXT: pli r4, 244140625
2059 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
2060 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2061 ; CHECK-P10-NEXT: lfiwzx f0, r3, r4
2062 ; CHECK-P10-NEXT: xscvuxddp f1, f0
2063 ; CHECK-P10-NEXT: blr
2065 ; CHECK-PREP10-LABEL: ld_disjoint_align64_double_uint32_t:
2066 ; CHECK-PREP10: # %bb.0: # %entry
2067 ; CHECK-PREP10-NEXT: lis r4, 3725
2068 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
2069 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2070 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2071 ; CHECK-PREP10-NEXT: lfiwzx f0, r3, r4
2072 ; CHECK-PREP10-NEXT: xscvuxddp f1, f0
2073 ; CHECK-PREP10-NEXT: blr
2075 %and = and i64 %ptr, -1099511627776
2076 %or = or i64 %and, 1000000000000
2077 %0 = inttoptr i64 %or to ptr
2078 %1 = load i32, ptr %0, align 4096
2079 %conv = uitofp i32 %1 to double
2083 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2084 define dso_local double @ld_cst_align16_double_uint32_t() {
2085 ; CHECK-LABEL: ld_cst_align16_double_uint32_t:
2086 ; CHECK: # %bb.0: # %entry
2087 ; CHECK-NEXT: li r3, 4080
2088 ; CHECK-NEXT: lfiwzx f0, 0, r3
2089 ; CHECK-NEXT: xscvuxddp f1, f0
2092 %0 = load i32, ptr inttoptr (i64 4080 to ptr), align 16
2093 %conv = uitofp i32 %0 to double
2097 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2098 define dso_local double @ld_cst_align32_double_uint32_t() {
2099 ; CHECK-P10-LABEL: ld_cst_align32_double_uint32_t:
2100 ; CHECK-P10: # %bb.0: # %entry
2101 ; CHECK-P10-NEXT: pli r3, 9999900
2102 ; CHECK-P10-NEXT: lfiwzx f0, 0, r3
2103 ; CHECK-P10-NEXT: xscvuxddp f1, f0
2104 ; CHECK-P10-NEXT: blr
2106 ; CHECK-PREP10-LABEL: ld_cst_align32_double_uint32_t:
2107 ; CHECK-PREP10: # %bb.0: # %entry
2108 ; CHECK-PREP10-NEXT: lis r3, 152
2109 ; CHECK-PREP10-NEXT: ori r3, r3, 38428
2110 ; CHECK-PREP10-NEXT: lfiwzx f0, 0, r3
2111 ; CHECK-PREP10-NEXT: xscvuxddp f1, f0
2112 ; CHECK-PREP10-NEXT: blr
2114 %0 = load i32, ptr inttoptr (i64 9999900 to ptr), align 4
2115 %conv = uitofp i32 %0 to double
2119 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2120 define dso_local double @ld_cst_align64_double_uint32_t() {
2121 ; CHECK-P10-LABEL: ld_cst_align64_double_uint32_t:
2122 ; CHECK-P10: # %bb.0: # %entry
2123 ; CHECK-P10-NEXT: pli r3, 244140625
2124 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
2125 ; CHECK-P10-NEXT: lfiwzx f0, 0, r3
2126 ; CHECK-P10-NEXT: xscvuxddp f1, f0
2127 ; CHECK-P10-NEXT: blr
2129 ; CHECK-PREP10-LABEL: ld_cst_align64_double_uint32_t:
2130 ; CHECK-PREP10: # %bb.0: # %entry
2131 ; CHECK-PREP10-NEXT: lis r3, 3725
2132 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
2133 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
2134 ; CHECK-PREP10-NEXT: lfiwzx f0, 0, r3
2135 ; CHECK-PREP10-NEXT: xscvuxddp f1, f0
2136 ; CHECK-PREP10-NEXT: blr
2138 %0 = load i32, ptr inttoptr (i64 1000000000000 to ptr), align 4096
2139 %conv = uitofp i32 %0 to double
2143 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2144 define dso_local double @ld_0_double_int32_t(i64 %ptr) {
2145 ; CHECK-LABEL: ld_0_double_int32_t:
2146 ; CHECK: # %bb.0: # %entry
2147 ; CHECK-NEXT: lfiwax f0, 0, r3
2148 ; CHECK-NEXT: xscvsxddp f1, f0
2151 %0 = inttoptr i64 %ptr to ptr
2152 %1 = load i32, ptr %0, align 4
2153 %conv = sitofp i32 %1 to double
2157 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2158 define dso_local double @ld_align16_double_int32_t(ptr nocapture readonly %ptr) {
2159 ; CHECK-LABEL: ld_align16_double_int32_t:
2160 ; CHECK: # %bb.0: # %entry
2161 ; CHECK-NEXT: addi r3, r3, 8
2162 ; CHECK-NEXT: lfiwax f0, 0, r3
2163 ; CHECK-NEXT: xscvsxddp f1, f0
2166 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
2167 %0 = load i32, ptr %add.ptr, align 4
2168 %conv = sitofp i32 %0 to double
2172 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2173 define dso_local double @ld_align32_double_int32_t(ptr nocapture readonly %ptr) {
2174 ; CHECK-P10-LABEL: ld_align32_double_int32_t:
2175 ; CHECK-P10: # %bb.0: # %entry
2176 ; CHECK-P10-NEXT: pli r4, 99999000
2177 ; CHECK-P10-NEXT: lfiwax f0, r3, r4
2178 ; CHECK-P10-NEXT: xscvsxddp f1, f0
2179 ; CHECK-P10-NEXT: blr
2181 ; CHECK-PREP10-LABEL: ld_align32_double_int32_t:
2182 ; CHECK-PREP10: # %bb.0: # %entry
2183 ; CHECK-PREP10-NEXT: lis r4, 1525
2184 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
2185 ; CHECK-PREP10-NEXT: lfiwax f0, r3, r4
2186 ; CHECK-PREP10-NEXT: xscvsxddp f1, f0
2187 ; CHECK-PREP10-NEXT: blr
2189 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
2190 %0 = load i32, ptr %add.ptr, align 4
2191 %conv = sitofp i32 %0 to double
2195 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2196 define dso_local double @ld_align64_double_int32_t(ptr nocapture readonly %ptr) {
2197 ; CHECK-P10-LABEL: ld_align64_double_int32_t:
2198 ; CHECK-P10: # %bb.0: # %entry
2199 ; CHECK-P10-NEXT: pli r4, 244140625
2200 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2201 ; CHECK-P10-NEXT: lfiwax f0, r3, r4
2202 ; CHECK-P10-NEXT: xscvsxddp f1, f0
2203 ; CHECK-P10-NEXT: blr
2205 ; CHECK-PREP10-LABEL: ld_align64_double_int32_t:
2206 ; CHECK-PREP10: # %bb.0: # %entry
2207 ; CHECK-PREP10-NEXT: lis r4, 3725
2208 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2209 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2210 ; CHECK-PREP10-NEXT: lfiwax f0, r3, r4
2211 ; CHECK-PREP10-NEXT: xscvsxddp f1, f0
2212 ; CHECK-PREP10-NEXT: blr
2214 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
2215 %0 = load i32, ptr %add.ptr, align 4
2216 %conv = sitofp i32 %0 to double
2220 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2221 define dso_local double @ld_reg_double_int32_t(ptr nocapture readonly %ptr, i64 %off) {
2222 ; CHECK-LABEL: ld_reg_double_int32_t:
2223 ; CHECK: # %bb.0: # %entry
2224 ; CHECK-NEXT: lfiwax f0, r3, r4
2225 ; CHECK-NEXT: xscvsxddp f1, f0
2228 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
2229 %0 = load i32, ptr %add.ptr, align 4
2230 %conv = sitofp i32 %0 to double
2234 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2235 define dso_local double @ld_or_double_int32_t(i64 %ptr, i8 zeroext %off) {
2236 ; CHECK-LABEL: ld_or_double_int32_t:
2237 ; CHECK: # %bb.0: # %entry
2238 ; CHECK-NEXT: or r3, r4, r3
2239 ; CHECK-NEXT: lfiwax f0, 0, r3
2240 ; CHECK-NEXT: xscvsxddp f1, f0
2243 %conv = zext i8 %off to i64
2244 %or = or i64 %conv, %ptr
2245 %0 = inttoptr i64 %or to ptr
2246 %1 = load i32, ptr %0, align 4
2247 %conv1 = sitofp i32 %1 to double
2251 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2252 define dso_local double @ld_not_disjoint16_double_int32_t(i64 %ptr) {
2253 ; CHECK-LABEL: ld_not_disjoint16_double_int32_t:
2254 ; CHECK: # %bb.0: # %entry
2255 ; CHECK-NEXT: ori r3, r3, 6
2256 ; CHECK-NEXT: lfiwax f0, 0, r3
2257 ; CHECK-NEXT: xscvsxddp f1, f0
2260 %or = or i64 %ptr, 6
2261 %0 = inttoptr i64 %or to ptr
2262 %1 = load i32, ptr %0, align 4
2263 %conv = sitofp i32 %1 to double
2267 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2268 define dso_local double @ld_disjoint_align16_double_int32_t(i64 %ptr) {
2269 ; CHECK-LABEL: ld_disjoint_align16_double_int32_t:
2270 ; CHECK: # %bb.0: # %entry
2271 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2272 ; CHECK-NEXT: ori r3, r3, 24
2273 ; CHECK-NEXT: lfiwax f0, 0, r3
2274 ; CHECK-NEXT: xscvsxddp f1, f0
2277 %and = and i64 %ptr, -4096
2278 %or = or i64 %and, 24
2279 %0 = inttoptr i64 %or to ptr
2280 %1 = load i32, ptr %0, align 8
2281 %conv = sitofp i32 %1 to double
2285 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2286 define dso_local double @ld_not_disjoint32_double_int32_t(i64 %ptr) {
2287 ; CHECK-LABEL: ld_not_disjoint32_double_int32_t:
2288 ; CHECK: # %bb.0: # %entry
2289 ; CHECK-NEXT: ori r3, r3, 34463
2290 ; CHECK-NEXT: oris r3, r3, 1
2291 ; CHECK-NEXT: lfiwax f0, 0, r3
2292 ; CHECK-NEXT: xscvsxddp f1, f0
2295 %or = or i64 %ptr, 99999
2296 %0 = inttoptr i64 %or to ptr
2297 %1 = load i32, ptr %0, align 4
2298 %conv = sitofp i32 %1 to double
2302 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2303 define dso_local double @ld_disjoint_align32_double_int32_t(i64 %ptr) {
2304 ; CHECK-P10-LABEL: ld_disjoint_align32_double_int32_t:
2305 ; CHECK-P10: # %bb.0: # %entry
2306 ; CHECK-P10-NEXT: lis r4, -15264
2307 ; CHECK-P10-NEXT: and r3, r3, r4
2308 ; CHECK-P10-NEXT: pli r4, 999990000
2309 ; CHECK-P10-NEXT: lfiwax f0, r3, r4
2310 ; CHECK-P10-NEXT: xscvsxddp f1, f0
2311 ; CHECK-P10-NEXT: blr
2313 ; CHECK-PREP10-LABEL: ld_disjoint_align32_double_int32_t:
2314 ; CHECK-PREP10: # %bb.0: # %entry
2315 ; CHECK-PREP10-NEXT: lis r4, -15264
2316 ; CHECK-PREP10-NEXT: and r3, r3, r4
2317 ; CHECK-PREP10-NEXT: lis r4, 15258
2318 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
2319 ; CHECK-PREP10-NEXT: lfiwax f0, r3, r4
2320 ; CHECK-PREP10-NEXT: xscvsxddp f1, f0
2321 ; CHECK-PREP10-NEXT: blr
2323 %and = and i64 %ptr, -1000341504
2324 %or = or i64 %and, 999990000
2325 %0 = inttoptr i64 %or to ptr
2326 %1 = load i32, ptr %0, align 16
2327 %conv = sitofp i32 %1 to double
2331 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2332 define dso_local double @ld_not_disjoint64_double_int32_t(i64 %ptr) {
2333 ; CHECK-P10-LABEL: ld_not_disjoint64_double_int32_t:
2334 ; CHECK-P10: # %bb.0: # %entry
2335 ; CHECK-P10-NEXT: pli r4, 232
2336 ; CHECK-P10-NEXT: pli r5, 3567587329
2337 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2338 ; CHECK-P10-NEXT: or r3, r3, r5
2339 ; CHECK-P10-NEXT: lfiwax f0, 0, r3
2340 ; CHECK-P10-NEXT: xscvsxddp f1, f0
2341 ; CHECK-P10-NEXT: blr
2343 ; CHECK-PREP10-LABEL: ld_not_disjoint64_double_int32_t:
2344 ; CHECK-PREP10: # %bb.0: # %entry
2345 ; CHECK-PREP10-NEXT: li r4, 29
2346 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2347 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2348 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2349 ; CHECK-PREP10-NEXT: or r3, r3, r4
2350 ; CHECK-PREP10-NEXT: lfiwax f0, 0, r3
2351 ; CHECK-PREP10-NEXT: xscvsxddp f1, f0
2352 ; CHECK-PREP10-NEXT: blr
2354 %or = or i64 %ptr, 1000000000001
2355 %0 = inttoptr i64 %or to ptr
2356 %1 = load i32, ptr %0, align 4
2357 %conv = sitofp i32 %1 to double
2361 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2362 define dso_local double @ld_disjoint_align64_double_int32_t(i64 %ptr) {
2363 ; CHECK-P10-LABEL: ld_disjoint_align64_double_int32_t:
2364 ; CHECK-P10: # %bb.0: # %entry
2365 ; CHECK-P10-NEXT: pli r4, 244140625
2366 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
2367 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2368 ; CHECK-P10-NEXT: lfiwax f0, r3, r4
2369 ; CHECK-P10-NEXT: xscvsxddp f1, f0
2370 ; CHECK-P10-NEXT: blr
2372 ; CHECK-PREP10-LABEL: ld_disjoint_align64_double_int32_t:
2373 ; CHECK-PREP10: # %bb.0: # %entry
2374 ; CHECK-PREP10-NEXT: lis r4, 3725
2375 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
2376 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2377 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2378 ; CHECK-PREP10-NEXT: lfiwax f0, r3, r4
2379 ; CHECK-PREP10-NEXT: xscvsxddp f1, f0
2380 ; CHECK-PREP10-NEXT: blr
2382 %and = and i64 %ptr, -1099511627776
2383 %or = or i64 %and, 1000000000000
2384 %0 = inttoptr i64 %or to ptr
2385 %1 = load i32, ptr %0, align 4096
2386 %conv = sitofp i32 %1 to double
2390 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2391 define dso_local double @ld_cst_align16_double_int32_t() {
2392 ; CHECK-LABEL: ld_cst_align16_double_int32_t:
2393 ; CHECK: # %bb.0: # %entry
2394 ; CHECK-NEXT: li r3, 4080
2395 ; CHECK-NEXT: lfiwax f0, 0, r3
2396 ; CHECK-NEXT: xscvsxddp f1, f0
2399 %0 = load i32, ptr inttoptr (i64 4080 to ptr), align 16
2400 %conv = sitofp i32 %0 to double
2404 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2405 define dso_local double @ld_cst_align32_double_int32_t() {
2406 ; CHECK-P10-LABEL: ld_cst_align32_double_int32_t:
2407 ; CHECK-P10: # %bb.0: # %entry
2408 ; CHECK-P10-NEXT: pli r3, 9999900
2409 ; CHECK-P10-NEXT: lfiwax f0, 0, r3
2410 ; CHECK-P10-NEXT: xscvsxddp f1, f0
2411 ; CHECK-P10-NEXT: blr
2413 ; CHECK-PREP10-LABEL: ld_cst_align32_double_int32_t:
2414 ; CHECK-PREP10: # %bb.0: # %entry
2415 ; CHECK-PREP10-NEXT: lis r3, 152
2416 ; CHECK-PREP10-NEXT: ori r3, r3, 38428
2417 ; CHECK-PREP10-NEXT: lfiwax f0, 0, r3
2418 ; CHECK-PREP10-NEXT: xscvsxddp f1, f0
2419 ; CHECK-PREP10-NEXT: blr
2421 %0 = load i32, ptr inttoptr (i64 9999900 to ptr), align 4
2422 %conv = sitofp i32 %0 to double
2426 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2427 define dso_local double @ld_cst_align64_double_int32_t() {
2428 ; CHECK-P10-LABEL: ld_cst_align64_double_int32_t:
2429 ; CHECK-P10: # %bb.0: # %entry
2430 ; CHECK-P10-NEXT: pli r3, 244140625
2431 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
2432 ; CHECK-P10-NEXT: lfiwax f0, 0, r3
2433 ; CHECK-P10-NEXT: xscvsxddp f1, f0
2434 ; CHECK-P10-NEXT: blr
2436 ; CHECK-PREP10-LABEL: ld_cst_align64_double_int32_t:
2437 ; CHECK-PREP10: # %bb.0: # %entry
2438 ; CHECK-PREP10-NEXT: lis r3, 3725
2439 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
2440 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
2441 ; CHECK-PREP10-NEXT: lfiwax f0, 0, r3
2442 ; CHECK-PREP10-NEXT: xscvsxddp f1, f0
2443 ; CHECK-PREP10-NEXT: blr
2445 %0 = load i32, ptr inttoptr (i64 1000000000000 to ptr), align 4096
2446 %conv = sitofp i32 %0 to double
2450 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2451 define dso_local double @ld_0_double_uint64_t(i64 %ptr) {
2452 ; CHECK-LABEL: ld_0_double_uint64_t:
2453 ; CHECK: # %bb.0: # %entry
2454 ; CHECK-NEXT: lfd f0, 0(r3)
2455 ; CHECK-NEXT: xscvuxddp f1, f0
2458 %0 = inttoptr i64 %ptr to ptr
2459 %1 = load i64, ptr %0, align 8
2460 %conv = uitofp i64 %1 to double
2464 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2465 define dso_local double @ld_align16_double_uint64_t(ptr nocapture readonly %ptr) {
2466 ; CHECK-LABEL: ld_align16_double_uint64_t:
2467 ; CHECK: # %bb.0: # %entry
2468 ; CHECK-NEXT: lfd f0, 8(r3)
2469 ; CHECK-NEXT: xscvuxddp f1, f0
2472 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
2473 %0 = load i64, ptr %add.ptr, align 8
2474 %conv = uitofp i64 %0 to double
2478 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2479 define dso_local double @ld_align32_double_uint64_t(ptr nocapture readonly %ptr) {
2480 ; CHECK-P10-LABEL: ld_align32_double_uint64_t:
2481 ; CHECK-P10: # %bb.0: # %entry
2482 ; CHECK-P10-NEXT: plfd f0, 99999000(r3), 0
2483 ; CHECK-P10-NEXT: xscvuxddp f1, f0
2484 ; CHECK-P10-NEXT: blr
2486 ; CHECK-PREP10-LABEL: ld_align32_double_uint64_t:
2487 ; CHECK-PREP10: # %bb.0: # %entry
2488 ; CHECK-PREP10-NEXT: lis r4, 1525
2489 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
2490 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
2491 ; CHECK-PREP10-NEXT: xscvuxddp f1, f0
2492 ; CHECK-PREP10-NEXT: blr
2494 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
2495 %0 = load i64, ptr %add.ptr, align 8
2496 %conv = uitofp i64 %0 to double
2500 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2501 define dso_local double @ld_align64_double_uint64_t(ptr nocapture readonly %ptr) {
2502 ; CHECK-P10-LABEL: ld_align64_double_uint64_t:
2503 ; CHECK-P10: # %bb.0: # %entry
2504 ; CHECK-P10-NEXT: pli r4, 244140625
2505 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2506 ; CHECK-P10-NEXT: lfdx f0, r3, r4
2507 ; CHECK-P10-NEXT: xscvuxddp f1, f0
2508 ; CHECK-P10-NEXT: blr
2510 ; CHECK-PREP10-LABEL: ld_align64_double_uint64_t:
2511 ; CHECK-PREP10: # %bb.0: # %entry
2512 ; CHECK-PREP10-NEXT: lis r4, 3725
2513 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2514 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2515 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
2516 ; CHECK-PREP10-NEXT: xscvuxddp f1, f0
2517 ; CHECK-PREP10-NEXT: blr
2519 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
2520 %0 = load i64, ptr %add.ptr, align 8
2521 %conv = uitofp i64 %0 to double
2525 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2526 define dso_local double @ld_reg_double_uint64_t(ptr nocapture readonly %ptr, i64 %off) {
2527 ; CHECK-LABEL: ld_reg_double_uint64_t:
2528 ; CHECK: # %bb.0: # %entry
2529 ; CHECK-NEXT: lfdx f0, r3, r4
2530 ; CHECK-NEXT: xscvuxddp f1, f0
2533 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
2534 %0 = load i64, ptr %add.ptr, align 8
2535 %conv = uitofp i64 %0 to double
2539 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2540 define dso_local double @ld_or_double_uint64_t(i64 %ptr, i8 zeroext %off) {
2541 ; CHECK-LABEL: ld_or_double_uint64_t:
2542 ; CHECK: # %bb.0: # %entry
2543 ; CHECK-NEXT: or r3, r4, r3
2544 ; CHECK-NEXT: lfd f0, 0(r3)
2545 ; CHECK-NEXT: xscvuxddp f1, f0
2548 %conv = zext i8 %off to i64
2549 %or = or i64 %conv, %ptr
2550 %0 = inttoptr i64 %or to ptr
2551 %1 = load i64, ptr %0, align 8
2552 %conv1 = uitofp i64 %1 to double
2556 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2557 define dso_local double @ld_not_disjoint16_double_uint64_t(i64 %ptr) {
2558 ; CHECK-LABEL: ld_not_disjoint16_double_uint64_t:
2559 ; CHECK: # %bb.0: # %entry
2560 ; CHECK-NEXT: ori r3, r3, 6
2561 ; CHECK-NEXT: lfd f0, 0(r3)
2562 ; CHECK-NEXT: xscvuxddp f1, f0
2565 %or = or i64 %ptr, 6
2566 %0 = inttoptr i64 %or to ptr
2567 %1 = load i64, ptr %0, align 8
2568 %conv = uitofp i64 %1 to double
2572 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2573 define dso_local double @ld_disjoint_align16_double_uint64_t(i64 %ptr) {
2574 ; CHECK-LABEL: ld_disjoint_align16_double_uint64_t:
2575 ; CHECK: # %bb.0: # %entry
2576 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2577 ; CHECK-NEXT: lfd f0, 24(r3)
2578 ; CHECK-NEXT: xscvuxddp f1, f0
2581 %and = and i64 %ptr, -4096
2582 %or = or i64 %and, 24
2583 %0 = inttoptr i64 %or to ptr
2584 %1 = load i64, ptr %0, align 8
2585 %conv = uitofp i64 %1 to double
2589 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2590 define dso_local double @ld_not_disjoint32_double_uint64_t(i64 %ptr) {
2591 ; CHECK-LABEL: ld_not_disjoint32_double_uint64_t:
2592 ; CHECK: # %bb.0: # %entry
2593 ; CHECK-NEXT: ori r3, r3, 34463
2594 ; CHECK-NEXT: oris r3, r3, 1
2595 ; CHECK-NEXT: lfd f0, 0(r3)
2596 ; CHECK-NEXT: xscvuxddp f1, f0
2599 %or = or i64 %ptr, 99999
2600 %0 = inttoptr i64 %or to ptr
2601 %1 = load i64, ptr %0, align 8
2602 %conv = uitofp i64 %1 to double
2606 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2607 define dso_local double @ld_disjoint_align32_double_uint64_t(i64 %ptr) {
2608 ; CHECK-P10-LABEL: ld_disjoint_align32_double_uint64_t:
2609 ; CHECK-P10: # %bb.0: # %entry
2610 ; CHECK-P10-NEXT: lis r4, -15264
2611 ; CHECK-P10-NEXT: and r3, r3, r4
2612 ; CHECK-P10-NEXT: plfd f0, 999990000(r3), 0
2613 ; CHECK-P10-NEXT: xscvuxddp f1, f0
2614 ; CHECK-P10-NEXT: blr
2616 ; CHECK-PREP10-LABEL: ld_disjoint_align32_double_uint64_t:
2617 ; CHECK-PREP10: # %bb.0: # %entry
2618 ; CHECK-PREP10-NEXT: lis r4, -15264
2619 ; CHECK-PREP10-NEXT: and r3, r3, r4
2620 ; CHECK-PREP10-NEXT: lis r4, 15258
2621 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
2622 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
2623 ; CHECK-PREP10-NEXT: xscvuxddp f1, f0
2624 ; CHECK-PREP10-NEXT: blr
2626 %and = and i64 %ptr, -1000341504
2627 %or = or i64 %and, 999990000
2628 %0 = inttoptr i64 %or to ptr
2629 %1 = load i64, ptr %0, align 16
2630 %conv = uitofp i64 %1 to double
2634 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2635 define dso_local double @ld_not_disjoint64_double_uint64_t(i64 %ptr) {
2636 ; CHECK-P10-LABEL: ld_not_disjoint64_double_uint64_t:
2637 ; CHECK-P10: # %bb.0: # %entry
2638 ; CHECK-P10-NEXT: pli r4, 232
2639 ; CHECK-P10-NEXT: pli r5, 3567587329
2640 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2641 ; CHECK-P10-NEXT: or r3, r3, r5
2642 ; CHECK-P10-NEXT: lfd f0, 0(r3)
2643 ; CHECK-P10-NEXT: xscvuxddp f1, f0
2644 ; CHECK-P10-NEXT: blr
2646 ; CHECK-PREP10-LABEL: ld_not_disjoint64_double_uint64_t:
2647 ; CHECK-PREP10: # %bb.0: # %entry
2648 ; CHECK-PREP10-NEXT: li r4, 29
2649 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2650 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2651 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2652 ; CHECK-PREP10-NEXT: or r3, r3, r4
2653 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
2654 ; CHECK-PREP10-NEXT: xscvuxddp f1, f0
2655 ; CHECK-PREP10-NEXT: blr
2657 %or = or i64 %ptr, 1000000000001
2658 %0 = inttoptr i64 %or to ptr
2659 %1 = load i64, ptr %0, align 8
2660 %conv = uitofp i64 %1 to double
2664 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2665 define dso_local double @ld_disjoint_align64_double_uint64_t(i64 %ptr) {
2666 ; CHECK-P10-LABEL: ld_disjoint_align64_double_uint64_t:
2667 ; CHECK-P10: # %bb.0: # %entry
2668 ; CHECK-P10-NEXT: pli r4, 244140625
2669 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
2670 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2671 ; CHECK-P10-NEXT: lfdx f0, r3, r4
2672 ; CHECK-P10-NEXT: xscvuxddp f1, f0
2673 ; CHECK-P10-NEXT: blr
2675 ; CHECK-PREP10-LABEL: ld_disjoint_align64_double_uint64_t:
2676 ; CHECK-PREP10: # %bb.0: # %entry
2677 ; CHECK-PREP10-NEXT: lis r4, 3725
2678 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
2679 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2680 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2681 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
2682 ; CHECK-PREP10-NEXT: xscvuxddp f1, f0
2683 ; CHECK-PREP10-NEXT: blr
2685 %and = and i64 %ptr, -1099511627776
2686 %or = or i64 %and, 1000000000000
2687 %0 = inttoptr i64 %or to ptr
2688 %1 = load i64, ptr %0, align 4096
2689 %conv = uitofp i64 %1 to double
2693 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2694 define dso_local double @ld_cst_align16_double_uint64_t() {
2695 ; CHECK-LABEL: ld_cst_align16_double_uint64_t:
2696 ; CHECK: # %bb.0: # %entry
2697 ; CHECK-NEXT: lfd f0, 4080(0)
2698 ; CHECK-NEXT: xscvuxddp f1, f0
2701 %0 = load i64, ptr inttoptr (i64 4080 to ptr), align 16
2702 %conv = uitofp i64 %0 to double
2706 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2707 define dso_local double @ld_cst_align32_double_uint64_t() {
2708 ; CHECK-LABEL: ld_cst_align32_double_uint64_t:
2709 ; CHECK: # %bb.0: # %entry
2710 ; CHECK-NEXT: lis r3, 153
2711 ; CHECK-NEXT: lfd f0, -27108(r3)
2712 ; CHECK-NEXT: xscvuxddp f1, f0
2715 %0 = load i64, ptr inttoptr (i64 9999900 to ptr), align 8
2716 %conv = uitofp i64 %0 to double
2720 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2721 define dso_local double @ld_cst_align64_double_uint64_t() {
2722 ; CHECK-P10-LABEL: ld_cst_align64_double_uint64_t:
2723 ; CHECK-P10: # %bb.0: # %entry
2724 ; CHECK-P10-NEXT: pli r3, 244140625
2725 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
2726 ; CHECK-P10-NEXT: lfd f0, 0(r3)
2727 ; CHECK-P10-NEXT: xscvuxddp f1, f0
2728 ; CHECK-P10-NEXT: blr
2730 ; CHECK-PREP10-LABEL: ld_cst_align64_double_uint64_t:
2731 ; CHECK-PREP10: # %bb.0: # %entry
2732 ; CHECK-PREP10-NEXT: lis r3, 3725
2733 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
2734 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
2735 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
2736 ; CHECK-PREP10-NEXT: xscvuxddp f1, f0
2737 ; CHECK-PREP10-NEXT: blr
2739 %0 = load i64, ptr inttoptr (i64 1000000000000 to ptr), align 4096
2740 %conv = uitofp i64 %0 to double
2744 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2745 define dso_local double @ld_0_double_int64_t(i64 %ptr) {
2746 ; CHECK-LABEL: ld_0_double_int64_t:
2747 ; CHECK: # %bb.0: # %entry
2748 ; CHECK-NEXT: lfd f0, 0(r3)
2749 ; CHECK-NEXT: xscvsxddp f1, f0
2752 %0 = inttoptr i64 %ptr to ptr
2753 %1 = load i64, ptr %0, align 8
2754 %conv = sitofp i64 %1 to double
2758 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2759 define dso_local double @ld_align16_double_int64_t(ptr nocapture readonly %ptr) {
2760 ; CHECK-LABEL: ld_align16_double_int64_t:
2761 ; CHECK: # %bb.0: # %entry
2762 ; CHECK-NEXT: lfd f0, 8(r3)
2763 ; CHECK-NEXT: xscvsxddp f1, f0
2766 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
2767 %0 = load i64, ptr %add.ptr, align 8
2768 %conv = sitofp i64 %0 to double
2772 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2773 define dso_local double @ld_align32_double_int64_t(ptr nocapture readonly %ptr) {
2774 ; CHECK-P10-LABEL: ld_align32_double_int64_t:
2775 ; CHECK-P10: # %bb.0: # %entry
2776 ; CHECK-P10-NEXT: plfd f0, 99999000(r3), 0
2777 ; CHECK-P10-NEXT: xscvsxddp f1, f0
2778 ; CHECK-P10-NEXT: blr
2780 ; CHECK-PREP10-LABEL: ld_align32_double_int64_t:
2781 ; CHECK-PREP10: # %bb.0: # %entry
2782 ; CHECK-PREP10-NEXT: lis r4, 1525
2783 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
2784 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
2785 ; CHECK-PREP10-NEXT: xscvsxddp f1, f0
2786 ; CHECK-PREP10-NEXT: blr
2788 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
2789 %0 = load i64, ptr %add.ptr, align 8
2790 %conv = sitofp i64 %0 to double
2794 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2795 define dso_local double @ld_align64_double_int64_t(ptr nocapture readonly %ptr) {
2796 ; CHECK-P10-LABEL: ld_align64_double_int64_t:
2797 ; CHECK-P10: # %bb.0: # %entry
2798 ; CHECK-P10-NEXT: pli r4, 244140625
2799 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2800 ; CHECK-P10-NEXT: lfdx f0, r3, r4
2801 ; CHECK-P10-NEXT: xscvsxddp f1, f0
2802 ; CHECK-P10-NEXT: blr
2804 ; CHECK-PREP10-LABEL: ld_align64_double_int64_t:
2805 ; CHECK-PREP10: # %bb.0: # %entry
2806 ; CHECK-PREP10-NEXT: lis r4, 3725
2807 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2808 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2809 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
2810 ; CHECK-PREP10-NEXT: xscvsxddp f1, f0
2811 ; CHECK-PREP10-NEXT: blr
2813 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
2814 %0 = load i64, ptr %add.ptr, align 8
2815 %conv = sitofp i64 %0 to double
2819 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2820 define dso_local double @ld_reg_double_int64_t(ptr nocapture readonly %ptr, i64 %off) {
2821 ; CHECK-LABEL: ld_reg_double_int64_t:
2822 ; CHECK: # %bb.0: # %entry
2823 ; CHECK-NEXT: lfdx f0, r3, r4
2824 ; CHECK-NEXT: xscvsxddp f1, f0
2827 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
2828 %0 = load i64, ptr %add.ptr, align 8
2829 %conv = sitofp i64 %0 to double
2833 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2834 define dso_local double @ld_or_double_int64_t(i64 %ptr, i8 zeroext %off) {
2835 ; CHECK-LABEL: ld_or_double_int64_t:
2836 ; CHECK: # %bb.0: # %entry
2837 ; CHECK-NEXT: or r3, r4, r3
2838 ; CHECK-NEXT: lfd f0, 0(r3)
2839 ; CHECK-NEXT: xscvsxddp f1, f0
2842 %conv = zext i8 %off to i64
2843 %or = or i64 %conv, %ptr
2844 %0 = inttoptr i64 %or to ptr
2845 %1 = load i64, ptr %0, align 8
2846 %conv1 = sitofp i64 %1 to double
2850 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2851 define dso_local double @ld_not_disjoint16_double_int64_t(i64 %ptr) {
2852 ; CHECK-LABEL: ld_not_disjoint16_double_int64_t:
2853 ; CHECK: # %bb.0: # %entry
2854 ; CHECK-NEXT: ori r3, r3, 6
2855 ; CHECK-NEXT: lfd f0, 0(r3)
2856 ; CHECK-NEXT: xscvsxddp f1, f0
2859 %or = or i64 %ptr, 6
2860 %0 = inttoptr i64 %or to ptr
2861 %1 = load i64, ptr %0, align 8
2862 %conv = sitofp i64 %1 to double
2866 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2867 define dso_local double @ld_disjoint_align16_double_int64_t(i64 %ptr) {
2868 ; CHECK-LABEL: ld_disjoint_align16_double_int64_t:
2869 ; CHECK: # %bb.0: # %entry
2870 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2871 ; CHECK-NEXT: lfd f0, 24(r3)
2872 ; CHECK-NEXT: xscvsxddp f1, f0
2875 %and = and i64 %ptr, -4096
2876 %or = or i64 %and, 24
2877 %0 = inttoptr i64 %or to ptr
2878 %1 = load i64, ptr %0, align 8
2879 %conv = sitofp i64 %1 to double
2883 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2884 define dso_local double @ld_not_disjoint32_double_int64_t(i64 %ptr) {
2885 ; CHECK-LABEL: ld_not_disjoint32_double_int64_t:
2886 ; CHECK: # %bb.0: # %entry
2887 ; CHECK-NEXT: ori r3, r3, 34463
2888 ; CHECK-NEXT: oris r3, r3, 1
2889 ; CHECK-NEXT: lfd f0, 0(r3)
2890 ; CHECK-NEXT: xscvsxddp f1, f0
2893 %or = or i64 %ptr, 99999
2894 %0 = inttoptr i64 %or to ptr
2895 %1 = load i64, ptr %0, align 8
2896 %conv = sitofp i64 %1 to double
2900 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2901 define dso_local double @ld_disjoint_align32_double_int64_t(i64 %ptr) {
2902 ; CHECK-P10-LABEL: ld_disjoint_align32_double_int64_t:
2903 ; CHECK-P10: # %bb.0: # %entry
2904 ; CHECK-P10-NEXT: lis r4, -15264
2905 ; CHECK-P10-NEXT: and r3, r3, r4
2906 ; CHECK-P10-NEXT: plfd f0, 999990000(r3), 0
2907 ; CHECK-P10-NEXT: xscvsxddp f1, f0
2908 ; CHECK-P10-NEXT: blr
2910 ; CHECK-PREP10-LABEL: ld_disjoint_align32_double_int64_t:
2911 ; CHECK-PREP10: # %bb.0: # %entry
2912 ; CHECK-PREP10-NEXT: lis r4, -15264
2913 ; CHECK-PREP10-NEXT: and r3, r3, r4
2914 ; CHECK-PREP10-NEXT: lis r4, 15258
2915 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
2916 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
2917 ; CHECK-PREP10-NEXT: xscvsxddp f1, f0
2918 ; CHECK-PREP10-NEXT: blr
2920 %and = and i64 %ptr, -1000341504
2921 %or = or i64 %and, 999990000
2922 %0 = inttoptr i64 %or to ptr
2923 %1 = load i64, ptr %0, align 16
2924 %conv = sitofp i64 %1 to double
2928 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2929 define dso_local double @ld_not_disjoint64_double_int64_t(i64 %ptr) {
2930 ; CHECK-P10-LABEL: ld_not_disjoint64_double_int64_t:
2931 ; CHECK-P10: # %bb.0: # %entry
2932 ; CHECK-P10-NEXT: pli r4, 232
2933 ; CHECK-P10-NEXT: pli r5, 3567587329
2934 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2935 ; CHECK-P10-NEXT: or r3, r3, r5
2936 ; CHECK-P10-NEXT: lfd f0, 0(r3)
2937 ; CHECK-P10-NEXT: xscvsxddp f1, f0
2938 ; CHECK-P10-NEXT: blr
2940 ; CHECK-PREP10-LABEL: ld_not_disjoint64_double_int64_t:
2941 ; CHECK-PREP10: # %bb.0: # %entry
2942 ; CHECK-PREP10-NEXT: li r4, 29
2943 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2944 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2945 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2946 ; CHECK-PREP10-NEXT: or r3, r3, r4
2947 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
2948 ; CHECK-PREP10-NEXT: xscvsxddp f1, f0
2949 ; CHECK-PREP10-NEXT: blr
2951 %or = or i64 %ptr, 1000000000001
2952 %0 = inttoptr i64 %or to ptr
2953 %1 = load i64, ptr %0, align 8
2954 %conv = sitofp i64 %1 to double
2958 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2959 define dso_local double @ld_disjoint_align64_double_int64_t(i64 %ptr) {
2960 ; CHECK-P10-LABEL: ld_disjoint_align64_double_int64_t:
2961 ; CHECK-P10: # %bb.0: # %entry
2962 ; CHECK-P10-NEXT: pli r4, 244140625
2963 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
2964 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2965 ; CHECK-P10-NEXT: lfdx f0, r3, r4
2966 ; CHECK-P10-NEXT: xscvsxddp f1, f0
2967 ; CHECK-P10-NEXT: blr
2969 ; CHECK-PREP10-LABEL: ld_disjoint_align64_double_int64_t:
2970 ; CHECK-PREP10: # %bb.0: # %entry
2971 ; CHECK-PREP10-NEXT: lis r4, 3725
2972 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
2973 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2974 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2975 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
2976 ; CHECK-PREP10-NEXT: xscvsxddp f1, f0
2977 ; CHECK-PREP10-NEXT: blr
2979 %and = and i64 %ptr, -1099511627776
2980 %or = or i64 %and, 1000000000000
2981 %0 = inttoptr i64 %or to ptr
2982 %1 = load i64, ptr %0, align 4096
2983 %conv = sitofp i64 %1 to double
2987 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2988 define dso_local double @ld_cst_align16_double_int64_t() {
2989 ; CHECK-LABEL: ld_cst_align16_double_int64_t:
2990 ; CHECK: # %bb.0: # %entry
2991 ; CHECK-NEXT: lfd f0, 4080(0)
2992 ; CHECK-NEXT: xscvsxddp f1, f0
2995 %0 = load i64, ptr inttoptr (i64 4080 to ptr), align 16
2996 %conv = sitofp i64 %0 to double
3000 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3001 define dso_local double @ld_cst_align32_double_int64_t() {
3002 ; CHECK-LABEL: ld_cst_align32_double_int64_t:
3003 ; CHECK: # %bb.0: # %entry
3004 ; CHECK-NEXT: lis r3, 153
3005 ; CHECK-NEXT: lfd f0, -27108(r3)
3006 ; CHECK-NEXT: xscvsxddp f1, f0
3009 %0 = load i64, ptr inttoptr (i64 9999900 to ptr), align 8
3010 %conv = sitofp i64 %0 to double
3014 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3015 define dso_local double @ld_cst_align64_double_int64_t() {
3016 ; CHECK-P10-LABEL: ld_cst_align64_double_int64_t:
3017 ; CHECK-P10: # %bb.0: # %entry
3018 ; CHECK-P10-NEXT: pli r3, 244140625
3019 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
3020 ; CHECK-P10-NEXT: lfd f0, 0(r3)
3021 ; CHECK-P10-NEXT: xscvsxddp f1, f0
3022 ; CHECK-P10-NEXT: blr
3024 ; CHECK-PREP10-LABEL: ld_cst_align64_double_int64_t:
3025 ; CHECK-PREP10: # %bb.0: # %entry
3026 ; CHECK-PREP10-NEXT: lis r3, 3725
3027 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
3028 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
3029 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
3030 ; CHECK-PREP10-NEXT: xscvsxddp f1, f0
3031 ; CHECK-PREP10-NEXT: blr
3033 %0 = load i64, ptr inttoptr (i64 1000000000000 to ptr), align 4096
3034 %conv = sitofp i64 %0 to double
3038 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3039 define dso_local double @ld_0_double_float(i64 %ptr) {
3040 ; CHECK-LABEL: ld_0_double_float:
3041 ; CHECK: # %bb.0: # %entry
3042 ; CHECK-NEXT: lfs f1, 0(r3)
3045 %0 = inttoptr i64 %ptr to ptr
3046 %1 = load float, ptr %0, align 4
3047 %conv = fpext float %1 to double
3051 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3052 define dso_local double @ld_align16_double_float(ptr nocapture readonly %ptr) {
3053 ; CHECK-LABEL: ld_align16_double_float:
3054 ; CHECK: # %bb.0: # %entry
3055 ; CHECK-NEXT: lfs f1, 8(r3)
3058 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
3059 %0 = load float, ptr %add.ptr, align 4
3060 %conv = fpext float %0 to double
3064 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3065 define dso_local double @ld_align32_double_float(ptr nocapture readonly %ptr) {
3066 ; CHECK-P10-LABEL: ld_align32_double_float:
3067 ; CHECK-P10: # %bb.0: # %entry
3068 ; CHECK-P10-NEXT: plfs f1, 99999000(r3), 0
3069 ; CHECK-P10-NEXT: blr
3071 ; CHECK-PREP10-LABEL: ld_align32_double_float:
3072 ; CHECK-PREP10: # %bb.0: # %entry
3073 ; CHECK-PREP10-NEXT: lis r4, 1525
3074 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
3075 ; CHECK-PREP10-NEXT: lfsx f1, r3, r4
3076 ; CHECK-PREP10-NEXT: blr
3078 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
3079 %0 = load float, ptr %add.ptr, align 4
3080 %conv = fpext float %0 to double
3084 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3085 define dso_local double @ld_align64_double_float(ptr nocapture readonly %ptr) {
3086 ; CHECK-P10-LABEL: ld_align64_double_float:
3087 ; CHECK-P10: # %bb.0: # %entry
3088 ; CHECK-P10-NEXT: pli r4, 244140625
3089 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
3090 ; CHECK-P10-NEXT: lfsx f1, r3, r4
3091 ; CHECK-P10-NEXT: blr
3093 ; CHECK-PREP10-LABEL: ld_align64_double_float:
3094 ; CHECK-PREP10: # %bb.0: # %entry
3095 ; CHECK-PREP10-NEXT: lis r4, 3725
3096 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
3097 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
3098 ; CHECK-PREP10-NEXT: lfsx f1, r3, r4
3099 ; CHECK-PREP10-NEXT: blr
3101 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
3102 %0 = load float, ptr %add.ptr, align 4
3103 %conv = fpext float %0 to double
3107 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3108 define dso_local double @ld_reg_double_float(ptr nocapture readonly %ptr, i64 %off) {
3109 ; CHECK-LABEL: ld_reg_double_float:
3110 ; CHECK: # %bb.0: # %entry
3111 ; CHECK-NEXT: lfsx f1, r3, r4
3114 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
3115 %0 = load float, ptr %add.ptr, align 4
3116 %conv = fpext float %0 to double
3120 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3121 define dso_local double @ld_or_double_float(i64 %ptr, i8 zeroext %off) {
3122 ; CHECK-LABEL: ld_or_double_float:
3123 ; CHECK: # %bb.0: # %entry
3124 ; CHECK-NEXT: or r3, r4, r3
3125 ; CHECK-NEXT: lfs f1, 0(r3)
3128 %conv = zext i8 %off to i64
3129 %or = or i64 %conv, %ptr
3130 %0 = inttoptr i64 %or to ptr
3131 %1 = load float, ptr %0, align 4
3132 %conv1 = fpext float %1 to double
3136 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3137 define dso_local double @ld_not_disjoint16_double_float(i64 %ptr) {
3138 ; CHECK-LABEL: ld_not_disjoint16_double_float:
3139 ; CHECK: # %bb.0: # %entry
3140 ; CHECK-NEXT: ori r3, r3, 6
3141 ; CHECK-NEXT: lfs f1, 0(r3)
3144 %or = or i64 %ptr, 6
3145 %0 = inttoptr i64 %or to ptr
3146 %1 = load float, ptr %0, align 4
3147 %conv = fpext float %1 to double
3151 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3152 define dso_local double @ld_disjoint_align16_double_float(i64 %ptr) {
3153 ; CHECK-LABEL: ld_disjoint_align16_double_float:
3154 ; CHECK: # %bb.0: # %entry
3155 ; CHECK-NEXT: rldicr r3, r3, 0, 51
3156 ; CHECK-NEXT: lfs f1, 24(r3)
3159 %and = and i64 %ptr, -4096
3160 %or = or i64 %and, 24
3161 %0 = inttoptr i64 %or to ptr
3162 %1 = load float, ptr %0, align 8
3163 %conv = fpext float %1 to double
3167 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3168 define dso_local double @ld_not_disjoint32_double_float(i64 %ptr) {
3169 ; CHECK-LABEL: ld_not_disjoint32_double_float:
3170 ; CHECK: # %bb.0: # %entry
3171 ; CHECK-NEXT: ori r3, r3, 34463
3172 ; CHECK-NEXT: oris r3, r3, 1
3173 ; CHECK-NEXT: lfs f1, 0(r3)
3176 %or = or i64 %ptr, 99999
3177 %0 = inttoptr i64 %or to ptr
3178 %1 = load float, ptr %0, align 4
3179 %conv = fpext float %1 to double
3183 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3184 define dso_local double @ld_disjoint_align32_double_float(i64 %ptr) {
3185 ; CHECK-P10-LABEL: ld_disjoint_align32_double_float:
3186 ; CHECK-P10: # %bb.0: # %entry
3187 ; CHECK-P10-NEXT: lis r4, -15264
3188 ; CHECK-P10-NEXT: and r3, r3, r4
3189 ; CHECK-P10-NEXT: plfs f1, 999990000(r3), 0
3190 ; CHECK-P10-NEXT: blr
3192 ; CHECK-PREP10-LABEL: ld_disjoint_align32_double_float:
3193 ; CHECK-PREP10: # %bb.0: # %entry
3194 ; CHECK-PREP10-NEXT: lis r4, -15264
3195 ; CHECK-PREP10-NEXT: and r3, r3, r4
3196 ; CHECK-PREP10-NEXT: lis r4, 15258
3197 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
3198 ; CHECK-PREP10-NEXT: lfsx f1, r3, r4
3199 ; CHECK-PREP10-NEXT: blr
3201 %and = and i64 %ptr, -1000341504
3202 %or = or i64 %and, 999990000
3203 %0 = inttoptr i64 %or to ptr
3204 %1 = load float, ptr %0, align 16
3205 %conv = fpext float %1 to double
3209 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3210 define dso_local double @ld_not_disjoint64_double_float(i64 %ptr) {
3211 ; CHECK-P10-LABEL: ld_not_disjoint64_double_float:
3212 ; CHECK-P10: # %bb.0: # %entry
3213 ; CHECK-P10-NEXT: pli r4, 232
3214 ; CHECK-P10-NEXT: pli r5, 3567587329
3215 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
3216 ; CHECK-P10-NEXT: or r3, r3, r5
3217 ; CHECK-P10-NEXT: lfs f1, 0(r3)
3218 ; CHECK-P10-NEXT: blr
3220 ; CHECK-PREP10-LABEL: ld_not_disjoint64_double_float:
3221 ; CHECK-PREP10: # %bb.0: # %entry
3222 ; CHECK-PREP10-NEXT: li r4, 29
3223 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
3224 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
3225 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
3226 ; CHECK-PREP10-NEXT: or r3, r3, r4
3227 ; CHECK-PREP10-NEXT: lfs f1, 0(r3)
3228 ; CHECK-PREP10-NEXT: blr
3230 %or = or i64 %ptr, 1000000000001
3231 %0 = inttoptr i64 %or to ptr
3232 %1 = load float, ptr %0, align 4
3233 %conv = fpext float %1 to double
3237 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3238 define dso_local double @ld_disjoint_align64_double_float(i64 %ptr) {
3239 ; CHECK-P10-LABEL: ld_disjoint_align64_double_float:
3240 ; CHECK-P10: # %bb.0: # %entry
3241 ; CHECK-P10-NEXT: pli r4, 244140625
3242 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
3243 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
3244 ; CHECK-P10-NEXT: lfsx f1, r3, r4
3245 ; CHECK-P10-NEXT: blr
3247 ; CHECK-PREP10-LABEL: ld_disjoint_align64_double_float:
3248 ; CHECK-PREP10: # %bb.0: # %entry
3249 ; CHECK-PREP10-NEXT: lis r4, 3725
3250 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
3251 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
3252 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
3253 ; CHECK-PREP10-NEXT: lfsx f1, r3, r4
3254 ; CHECK-PREP10-NEXT: blr
3256 %and = and i64 %ptr, -1099511627776
3257 %or = or i64 %and, 1000000000000
3258 %0 = inttoptr i64 %or to ptr
3259 %1 = load float, ptr %0, align 4096
3260 %conv = fpext float %1 to double
3264 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3265 define dso_local double @ld_cst_align16_double_float() {
3266 ; CHECK-LABEL: ld_cst_align16_double_float:
3267 ; CHECK: # %bb.0: # %entry
3268 ; CHECK-NEXT: lfs f1, 4080(0)
3271 %0 = load float, ptr inttoptr (i64 4080 to ptr), align 16
3272 %conv = fpext float %0 to double
3276 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3277 define dso_local double @ld_cst_align32_double_float() {
3278 ; CHECK-LABEL: ld_cst_align32_double_float:
3279 ; CHECK: # %bb.0: # %entry
3280 ; CHECK-NEXT: lis r3, 153
3281 ; CHECK-NEXT: lfs f1, -27108(r3)
3284 %0 = load float, ptr inttoptr (i64 9999900 to ptr), align 4
3285 %conv = fpext float %0 to double
3289 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3290 define dso_local double @ld_cst_align64_double_float() {
3291 ; CHECK-P10-LABEL: ld_cst_align64_double_float:
3292 ; CHECK-P10: # %bb.0: # %entry
3293 ; CHECK-P10-NEXT: pli r3, 244140625
3294 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
3295 ; CHECK-P10-NEXT: lfs f1, 0(r3)
3296 ; CHECK-P10-NEXT: blr
3298 ; CHECK-PREP10-LABEL: ld_cst_align64_double_float:
3299 ; CHECK-PREP10: # %bb.0: # %entry
3300 ; CHECK-PREP10-NEXT: lis r3, 3725
3301 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
3302 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
3303 ; CHECK-PREP10-NEXT: lfs f1, 0(r3)
3304 ; CHECK-PREP10-NEXT: blr
3306 %0 = load float, ptr inttoptr (i64 1000000000000 to ptr), align 4096
3307 %conv = fpext float %0 to double
3311 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3312 define dso_local double @ld_0_double_double(i64 %ptr) {
3313 ; CHECK-LABEL: ld_0_double_double:
3314 ; CHECK: # %bb.0: # %entry
3315 ; CHECK-NEXT: lfd f1, 0(r3)
3318 %0 = inttoptr i64 %ptr to ptr
3319 %1 = load double, ptr %0, align 8
3323 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3324 define dso_local double @ld_align16_double_double(ptr nocapture readonly %ptr) {
3325 ; CHECK-LABEL: ld_align16_double_double:
3326 ; CHECK: # %bb.0: # %entry
3327 ; CHECK-NEXT: lfd f1, 8(r3)
3330 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
3331 %0 = load double, ptr %add.ptr, align 8
3335 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3336 define dso_local double @ld_align32_double_double(ptr nocapture readonly %ptr) {
3337 ; CHECK-P10-LABEL: ld_align32_double_double:
3338 ; CHECK-P10: # %bb.0: # %entry
3339 ; CHECK-P10-NEXT: plfd f1, 99999000(r3), 0
3340 ; CHECK-P10-NEXT: blr
3342 ; CHECK-PREP10-LABEL: ld_align32_double_double:
3343 ; CHECK-PREP10: # %bb.0: # %entry
3344 ; CHECK-PREP10-NEXT: lis r4, 1525
3345 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
3346 ; CHECK-PREP10-NEXT: lfdx f1, r3, r4
3347 ; CHECK-PREP10-NEXT: blr
3349 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
3350 %0 = load double, ptr %add.ptr, align 8
3354 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3355 define dso_local double @ld_align64_double_double(ptr nocapture readonly %ptr) {
3356 ; CHECK-P10-LABEL: ld_align64_double_double:
3357 ; CHECK-P10: # %bb.0: # %entry
3358 ; CHECK-P10-NEXT: pli r4, 244140625
3359 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
3360 ; CHECK-P10-NEXT: lfdx f1, r3, r4
3361 ; CHECK-P10-NEXT: blr
3363 ; CHECK-PREP10-LABEL: ld_align64_double_double:
3364 ; CHECK-PREP10: # %bb.0: # %entry
3365 ; CHECK-PREP10-NEXT: lis r4, 3725
3366 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
3367 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
3368 ; CHECK-PREP10-NEXT: lfdx f1, r3, r4
3369 ; CHECK-PREP10-NEXT: blr
3371 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
3372 %0 = load double, ptr %add.ptr, align 8
3376 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3377 define dso_local double @ld_reg_double_double(ptr nocapture readonly %ptr, i64 %off) {
3378 ; CHECK-LABEL: ld_reg_double_double:
3379 ; CHECK: # %bb.0: # %entry
3380 ; CHECK-NEXT: lfdx f1, r3, r4
3383 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
3384 %0 = load double, ptr %add.ptr, align 8
3388 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3389 define dso_local double @ld_or_double_double(i64 %ptr, i8 zeroext %off) {
3390 ; CHECK-LABEL: ld_or_double_double:
3391 ; CHECK: # %bb.0: # %entry
3392 ; CHECK-NEXT: or r3, r4, r3
3393 ; CHECK-NEXT: lfd f1, 0(r3)
3396 %conv = zext i8 %off to i64
3397 %or = or i64 %conv, %ptr
3398 %0 = inttoptr i64 %or to ptr
3399 %1 = load double, ptr %0, align 8
3403 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3404 define dso_local double @ld_not_disjoint16_double_double(i64 %ptr) {
3405 ; CHECK-LABEL: ld_not_disjoint16_double_double:
3406 ; CHECK: # %bb.0: # %entry
3407 ; CHECK-NEXT: ori r3, r3, 6
3408 ; CHECK-NEXT: lfd f1, 0(r3)
3411 %or = or i64 %ptr, 6
3412 %0 = inttoptr i64 %or to ptr
3413 %1 = load double, ptr %0, align 8
3417 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3418 define dso_local double @ld_disjoint_align16_double_double(i64 %ptr) {
3419 ; CHECK-LABEL: ld_disjoint_align16_double_double:
3420 ; CHECK: # %bb.0: # %entry
3421 ; CHECK-NEXT: rldicr r3, r3, 0, 51
3422 ; CHECK-NEXT: lfd f1, 24(r3)
3425 %and = and i64 %ptr, -4096
3426 %or = or i64 %and, 24
3427 %0 = inttoptr i64 %or to ptr
3428 %1 = load double, ptr %0, align 8
3432 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3433 define dso_local double @ld_not_disjoint32_double_double(i64 %ptr) {
3434 ; CHECK-LABEL: ld_not_disjoint32_double_double:
3435 ; CHECK: # %bb.0: # %entry
3436 ; CHECK-NEXT: ori r3, r3, 34463
3437 ; CHECK-NEXT: oris r3, r3, 1
3438 ; CHECK-NEXT: lfd f1, 0(r3)
3441 %or = or i64 %ptr, 99999
3442 %0 = inttoptr i64 %or to ptr
3443 %1 = load double, ptr %0, align 8
3447 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3448 define dso_local double @ld_disjoint_align32_double_double(i64 %ptr) {
3449 ; CHECK-P10-LABEL: ld_disjoint_align32_double_double:
3450 ; CHECK-P10: # %bb.0: # %entry
3451 ; CHECK-P10-NEXT: lis r4, -15264
3452 ; CHECK-P10-NEXT: and r3, r3, r4
3453 ; CHECK-P10-NEXT: plfd f1, 999990000(r3), 0
3454 ; CHECK-P10-NEXT: blr
3456 ; CHECK-PREP10-LABEL: ld_disjoint_align32_double_double:
3457 ; CHECK-PREP10: # %bb.0: # %entry
3458 ; CHECK-PREP10-NEXT: lis r4, -15264
3459 ; CHECK-PREP10-NEXT: and r3, r3, r4
3460 ; CHECK-PREP10-NEXT: lis r4, 15258
3461 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
3462 ; CHECK-PREP10-NEXT: lfdx f1, r3, r4
3463 ; CHECK-PREP10-NEXT: blr
3465 %and = and i64 %ptr, -1000341504
3466 %or = or i64 %and, 999990000
3467 %0 = inttoptr i64 %or to ptr
3468 %1 = load double, ptr %0, align 16
3472 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3473 define dso_local double @ld_not_disjoint64_double_double(i64 %ptr) {
3474 ; CHECK-P10-LABEL: ld_not_disjoint64_double_double:
3475 ; CHECK-P10: # %bb.0: # %entry
3476 ; CHECK-P10-NEXT: pli r4, 232
3477 ; CHECK-P10-NEXT: pli r5, 3567587329
3478 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
3479 ; CHECK-P10-NEXT: or r3, r3, r5
3480 ; CHECK-P10-NEXT: lfd f1, 0(r3)
3481 ; CHECK-P10-NEXT: blr
3483 ; CHECK-PREP10-LABEL: ld_not_disjoint64_double_double:
3484 ; CHECK-PREP10: # %bb.0: # %entry
3485 ; CHECK-PREP10-NEXT: li r4, 29
3486 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
3487 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
3488 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
3489 ; CHECK-PREP10-NEXT: or r3, r3, r4
3490 ; CHECK-PREP10-NEXT: lfd f1, 0(r3)
3491 ; CHECK-PREP10-NEXT: blr
3493 %or = or i64 %ptr, 1000000000001
3494 %0 = inttoptr i64 %or to ptr
3495 %1 = load double, ptr %0, align 8
3499 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3500 define dso_local double @ld_disjoint_align64_double_double(i64 %ptr) {
3501 ; CHECK-P10-LABEL: ld_disjoint_align64_double_double:
3502 ; CHECK-P10: # %bb.0: # %entry
3503 ; CHECK-P10-NEXT: pli r4, 244140625
3504 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
3505 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
3506 ; CHECK-P10-NEXT: lfdx f1, r3, r4
3507 ; CHECK-P10-NEXT: blr
3509 ; CHECK-PREP10-LABEL: ld_disjoint_align64_double_double:
3510 ; CHECK-PREP10: # %bb.0: # %entry
3511 ; CHECK-PREP10-NEXT: lis r4, 3725
3512 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
3513 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
3514 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
3515 ; CHECK-PREP10-NEXT: lfdx f1, r3, r4
3516 ; CHECK-PREP10-NEXT: blr
3518 %and = and i64 %ptr, -1099511627776
3519 %or = or i64 %and, 1000000000000
3520 %0 = inttoptr i64 %or to ptr
3521 %1 = load double, ptr %0, align 4096
3525 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3526 define dso_local double @ld_cst_align16_double_double() {
3527 ; CHECK-LABEL: ld_cst_align16_double_double:
3528 ; CHECK: # %bb.0: # %entry
3529 ; CHECK-NEXT: lfd f1, 4080(0)
3532 %0 = load double, ptr inttoptr (i64 4080 to ptr), align 16
3536 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3537 define dso_local double @ld_cst_align32_double_double() {
3538 ; CHECK-LABEL: ld_cst_align32_double_double:
3539 ; CHECK: # %bb.0: # %entry
3540 ; CHECK-NEXT: lis r3, 153
3541 ; CHECK-NEXT: lfd f1, -27108(r3)
3544 %0 = load double, ptr inttoptr (i64 9999900 to ptr), align 8
3548 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3549 define dso_local double @ld_cst_align64_double_double() {
3550 ; CHECK-P10-LABEL: ld_cst_align64_double_double:
3551 ; CHECK-P10: # %bb.0: # %entry
3552 ; CHECK-P10-NEXT: pli r3, 244140625
3553 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
3554 ; CHECK-P10-NEXT: lfd f1, 0(r3)
3555 ; CHECK-P10-NEXT: blr
3557 ; CHECK-PREP10-LABEL: ld_cst_align64_double_double:
3558 ; CHECK-PREP10: # %bb.0: # %entry
3559 ; CHECK-PREP10-NEXT: lis r3, 3725
3560 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
3561 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
3562 ; CHECK-PREP10-NEXT: lfd f1, 0(r3)
3563 ; CHECK-PREP10-NEXT: blr
3565 %0 = load double, ptr inttoptr (i64 1000000000000 to ptr), align 4096
3569 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
3570 define dso_local void @st_0_double_uint8_t(i64 %ptr, double %str) {
3571 ; CHECK-POSTP8-LABEL: st_0_double_uint8_t:
3572 ; CHECK-POSTP8: # %bb.0: # %entry
3573 ; CHECK-POSTP8-NEXT: xscvdpuxds f0, f1
3574 ; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
3575 ; CHECK-POSTP8-NEXT: blr
3577 ; CHECK-P8-LABEL: st_0_double_uint8_t:
3578 ; CHECK-P8: # %bb.0: # %entry
3579 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
3580 ; CHECK-P8-NEXT: mffprwz r4, f0
3581 ; CHECK-P8-NEXT: stb r4, 0(r3)
3582 ; CHECK-P8-NEXT: blr
3584 %conv = fptoui double %str to i8
3585 %0 = inttoptr i64 %ptr to ptr
3586 store i8 %conv, ptr %0, align 1
3590 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
3591 define dso_local void @st_align16_double_uint8_t(ptr nocapture %ptr, double %str) {
3592 ; CHECK-POSTP8-LABEL: st_align16_double_uint8_t:
3593 ; CHECK-POSTP8: # %bb.0: # %entry
3594 ; CHECK-POSTP8-NEXT: xscvdpuxds f0, f1
3595 ; CHECK-POSTP8-NEXT: addi r3, r3, 8
3596 ; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
3597 ; CHECK-POSTP8-NEXT: blr
3599 ; CHECK-P8-LABEL: st_align16_double_uint8_t:
3600 ; CHECK-P8: # %bb.0: # %entry
3601 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
3602 ; CHECK-P8-NEXT: mffprwz r4, f0
3603 ; CHECK-P8-NEXT: stb r4, 8(r3)
3604 ; CHECK-P8-NEXT: blr
3606 %conv = fptoui double %str to i8
3607 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
3608 store i8 %conv, ptr %add.ptr, align 1
3612 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
3613 define dso_local void @st_align32_double_uint8_t(ptr nocapture %ptr, double %str) {
3614 ; CHECK-P10-LABEL: st_align32_double_uint8_t:
3615 ; CHECK-P10: # %bb.0: # %entry
3616 ; CHECK-P10-NEXT: xscvdpuxds f0, f1
3617 ; CHECK-P10-NEXT: pli r4, 99999000
3618 ; CHECK-P10-NEXT: stxsibx f0, r3, r4
3619 ; CHECK-P10-NEXT: blr
3621 ; CHECK-P9-LABEL: st_align32_double_uint8_t:
3622 ; CHECK-P9: # %bb.0: # %entry
3623 ; CHECK-P9-NEXT: xscvdpuxds f0, f1
3624 ; CHECK-P9-NEXT: lis r4, 1525
3625 ; CHECK-P9-NEXT: ori r4, r4, 56600
3626 ; CHECK-P9-NEXT: stxsibx f0, r3, r4
3627 ; CHECK-P9-NEXT: blr
3629 ; CHECK-P8-LABEL: st_align32_double_uint8_t:
3630 ; CHECK-P8: # %bb.0: # %entry
3631 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
3632 ; CHECK-P8-NEXT: lis r5, 1525
3633 ; CHECK-P8-NEXT: ori r5, r5, 56600
3634 ; CHECK-P8-NEXT: mffprwz r4, f0
3635 ; CHECK-P8-NEXT: stbx r4, r3, r5
3636 ; CHECK-P8-NEXT: blr
3638 %conv = fptoui double %str to i8
3639 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
3640 store i8 %conv, ptr %add.ptr, align 1
3644 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
3645 define dso_local void @st_align64_double_uint8_t(ptr nocapture %ptr, double %str) {
3646 ; CHECK-P10-LABEL: st_align64_double_uint8_t:
3647 ; CHECK-P10: # %bb.0: # %entry
3648 ; CHECK-P10-NEXT: xscvdpuxds f0, f1
3649 ; CHECK-P10-NEXT: pli r4, 244140625
3650 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
3651 ; CHECK-P10-NEXT: stxsibx f0, r3, r4
3652 ; CHECK-P10-NEXT: blr
3654 ; CHECK-P9-LABEL: st_align64_double_uint8_t:
3655 ; CHECK-P9: # %bb.0: # %entry
3656 ; CHECK-P9-NEXT: xscvdpuxds f0, f1
3657 ; CHECK-P9-NEXT: lis r4, 3725
3658 ; CHECK-P9-NEXT: ori r4, r4, 19025
3659 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
3660 ; CHECK-P9-NEXT: stxsibx f0, r3, r4
3661 ; CHECK-P9-NEXT: blr
3663 ; CHECK-P8-LABEL: st_align64_double_uint8_t:
3664 ; CHECK-P8: # %bb.0: # %entry
3665 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
3666 ; CHECK-P8-NEXT: lis r5, 3725
3667 ; CHECK-P8-NEXT: ori r5, r5, 19025
3668 ; CHECK-P8-NEXT: rldic r5, r5, 12, 24
3669 ; CHECK-P8-NEXT: mffprwz r4, f0
3670 ; CHECK-P8-NEXT: stbx r4, r3, r5
3671 ; CHECK-P8-NEXT: blr
3673 %conv = fptoui double %str to i8
3674 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
3675 store i8 %conv, ptr %add.ptr, align 1
3679 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
3680 define dso_local void @st_reg_double_uint8_t(ptr nocapture %ptr, i64 %off, double %str) {
3681 ; CHECK-POSTP8-LABEL: st_reg_double_uint8_t:
3682 ; CHECK-POSTP8: # %bb.0: # %entry
3683 ; CHECK-POSTP8-NEXT: xscvdpuxds f0, f1
3684 ; CHECK-POSTP8-NEXT: stxsibx f0, r3, r4
3685 ; CHECK-POSTP8-NEXT: blr
3687 ; CHECK-P8-LABEL: st_reg_double_uint8_t:
3688 ; CHECK-P8: # %bb.0: # %entry
3689 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
3690 ; CHECK-P8-NEXT: mffprwz r5, f0
3691 ; CHECK-P8-NEXT: stbx r5, r3, r4
3692 ; CHECK-P8-NEXT: blr
3694 %conv = fptoui double %str to i8
3695 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
3696 store i8 %conv, ptr %add.ptr, align 1
3700 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
3701 define dso_local void @st_or1_double_uint8_t(i64 %ptr, i8 zeroext %off, double %str) {
3702 ; CHECK-POSTP8-LABEL: st_or1_double_uint8_t:
3703 ; CHECK-POSTP8: # %bb.0: # %entry
3704 ; CHECK-POSTP8-NEXT: xscvdpuxds f0, f1
3705 ; CHECK-POSTP8-NEXT: or r3, r4, r3
3706 ; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
3707 ; CHECK-POSTP8-NEXT: blr
3709 ; CHECK-P8-LABEL: st_or1_double_uint8_t:
3710 ; CHECK-P8: # %bb.0: # %entry
3711 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
3712 ; CHECK-P8-NEXT: or r3, r4, r3
3713 ; CHECK-P8-NEXT: mffprwz r5, f0
3714 ; CHECK-P8-NEXT: stb r5, 0(r3)
3715 ; CHECK-P8-NEXT: blr
3717 %conv = fptoui double %str to i8
3718 %conv1 = zext i8 %off to i64
3719 %or = or i64 %conv1, %ptr
3720 %0 = inttoptr i64 %or to ptr
3721 store i8 %conv, ptr %0, align 1
3725 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
3726 define dso_local void @st_not_disjoint16_double_uint8_t(i64 %ptr, double %str) {
3727 ; CHECK-POSTP8-LABEL: st_not_disjoint16_double_uint8_t:
3728 ; CHECK-POSTP8: # %bb.0: # %entry
3729 ; CHECK-POSTP8-NEXT: xscvdpuxds f0, f1
3730 ; CHECK-POSTP8-NEXT: ori r3, r3, 6
3731 ; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
3732 ; CHECK-POSTP8-NEXT: blr
3734 ; CHECK-P8-LABEL: st_not_disjoint16_double_uint8_t:
3735 ; CHECK-P8: # %bb.0: # %entry
3736 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
3737 ; CHECK-P8-NEXT: ori r3, r3, 6
3738 ; CHECK-P8-NEXT: mffprwz r4, f0
3739 ; CHECK-P8-NEXT: stb r4, 0(r3)
3740 ; CHECK-P8-NEXT: blr
3742 %conv = fptoui double %str to i8
3743 %or = or i64 %ptr, 6
3744 %0 = inttoptr i64 %or to ptr
3745 store i8 %conv, ptr %0, align 1
3749 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
3750 define dso_local void @st_disjoint_align16_double_uint8_t(i64 %ptr, double %str) {
3751 ; CHECK-POSTP8-LABEL: st_disjoint_align16_double_uint8_t:
3752 ; CHECK-POSTP8: # %bb.0: # %entry
3753 ; CHECK-POSTP8-NEXT: xscvdpuxds f0, f1
3754 ; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
3755 ; CHECK-POSTP8-NEXT: ori r3, r3, 24
3756 ; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
3757 ; CHECK-POSTP8-NEXT: blr
3759 ; CHECK-P8-LABEL: st_disjoint_align16_double_uint8_t:
3760 ; CHECK-P8: # %bb.0: # %entry
3761 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
3762 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
3763 ; CHECK-P8-NEXT: mffprwz r4, f0
3764 ; CHECK-P8-NEXT: stb r4, 24(r3)
3765 ; CHECK-P8-NEXT: blr
3767 %and = and i64 %ptr, -4096
3768 %conv = fptoui double %str to i8
3769 %or = or i64 %and, 24
3770 %0 = inttoptr i64 %or to ptr
3771 store i8 %conv, ptr %0, align 8
3775 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
3776 define dso_local void @st_not_disjoint32_double_uint8_t(i64 %ptr, double %str) {
3777 ; CHECK-POSTP8-LABEL: st_not_disjoint32_double_uint8_t:
3778 ; CHECK-POSTP8: # %bb.0: # %entry
3779 ; CHECK-POSTP8-NEXT: xscvdpuxds f0, f1
3780 ; CHECK-POSTP8-NEXT: ori r3, r3, 34463
3781 ; CHECK-POSTP8-NEXT: oris r3, r3, 1
3782 ; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
3783 ; CHECK-POSTP8-NEXT: blr
3785 ; CHECK-P8-LABEL: st_not_disjoint32_double_uint8_t:
3786 ; CHECK-P8: # %bb.0: # %entry
3787 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
3788 ; CHECK-P8-NEXT: ori r3, r3, 34463
3789 ; CHECK-P8-NEXT: oris r3, r3, 1
3790 ; CHECK-P8-NEXT: mffprwz r4, f0
3791 ; CHECK-P8-NEXT: stb r4, 0(r3)
3792 ; CHECK-P8-NEXT: blr
3794 %conv = fptoui double %str to i8
3795 %or = or i64 %ptr, 99999
3796 %0 = inttoptr i64 %or to ptr
3797 store i8 %conv, ptr %0, align 1
3801 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
3802 define dso_local void @st_disjoint_align32_double_uint8_t(i64 %ptr, double %str) {
3803 ; CHECK-P10-LABEL: st_disjoint_align32_double_uint8_t:
3804 ; CHECK-P10: # %bb.0: # %entry
3805 ; CHECK-P10-NEXT: xscvdpuxds f0, f1
3806 ; CHECK-P10-NEXT: lis r4, -15264
3807 ; CHECK-P10-NEXT: and r3, r3, r4
3808 ; CHECK-P10-NEXT: pli r4, 999990000
3809 ; CHECK-P10-NEXT: stxsibx f0, r3, r4
3810 ; CHECK-P10-NEXT: blr
3812 ; CHECK-P9-LABEL: st_disjoint_align32_double_uint8_t:
3813 ; CHECK-P9: # %bb.0: # %entry
3814 ; CHECK-P9-NEXT: xscvdpuxds f0, f1
3815 ; CHECK-P9-NEXT: lis r4, -15264
3816 ; CHECK-P9-NEXT: and r3, r3, r4
3817 ; CHECK-P9-NEXT: lis r4, 15258
3818 ; CHECK-P9-NEXT: ori r4, r4, 41712
3819 ; CHECK-P9-NEXT: stxsibx f0, r3, r4
3820 ; CHECK-P9-NEXT: blr
3822 ; CHECK-P8-LABEL: st_disjoint_align32_double_uint8_t:
3823 ; CHECK-P8: # %bb.0: # %entry
3824 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
3825 ; CHECK-P8-NEXT: lis r4, -15264
3826 ; CHECK-P8-NEXT: lis r5, 15258
3827 ; CHECK-P8-NEXT: and r3, r3, r4
3828 ; CHECK-P8-NEXT: ori r5, r5, 41712
3829 ; CHECK-P8-NEXT: mffprwz r4, f0
3830 ; CHECK-P8-NEXT: stbx r4, r3, r5
3831 ; CHECK-P8-NEXT: blr
3833 %and = and i64 %ptr, -1000341504
3834 %conv = fptoui double %str to i8
3835 %or = or i64 %and, 999990000
3836 %0 = inttoptr i64 %or to ptr
3837 store i8 %conv, ptr %0, align 16
3841 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
3842 define dso_local void @st_not_disjoint64_double_uint8_t(i64 %ptr, double %str) {
3843 ; CHECK-P10-LABEL: st_not_disjoint64_double_uint8_t:
3844 ; CHECK-P10: # %bb.0: # %entry
3845 ; CHECK-P10-NEXT: xscvdpuxds f0, f1
3846 ; CHECK-P10-NEXT: pli r4, 232
3847 ; CHECK-P10-NEXT: pli r5, 3567587329
3848 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
3849 ; CHECK-P10-NEXT: or r3, r3, r5
3850 ; CHECK-P10-NEXT: stxsibx f0, 0, r3
3851 ; CHECK-P10-NEXT: blr
3853 ; CHECK-P9-LABEL: st_not_disjoint64_double_uint8_t:
3854 ; CHECK-P9: # %bb.0: # %entry
3855 ; CHECK-P9-NEXT: li r4, 29
3856 ; CHECK-P9-NEXT: xscvdpuxds f0, f1
3857 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
3858 ; CHECK-P9-NEXT: oris r4, r4, 54437
3859 ; CHECK-P9-NEXT: ori r4, r4, 4097
3860 ; CHECK-P9-NEXT: or r3, r3, r4
3861 ; CHECK-P9-NEXT: stxsibx f0, 0, r3
3862 ; CHECK-P9-NEXT: blr
3864 ; CHECK-P8-LABEL: st_not_disjoint64_double_uint8_t:
3865 ; CHECK-P8: # %bb.0: # %entry
3866 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
3867 ; CHECK-P8-NEXT: li r5, 29
3868 ; CHECK-P8-NEXT: rldic r5, r5, 35, 24
3869 ; CHECK-P8-NEXT: oris r5, r5, 54437
3870 ; CHECK-P8-NEXT: mffprwz r4, f0
3871 ; CHECK-P8-NEXT: ori r5, r5, 4097
3872 ; CHECK-P8-NEXT: or r3, r3, r5
3873 ; CHECK-P8-NEXT: stb r4, 0(r3)
3874 ; CHECK-P8-NEXT: blr
3876 %conv = fptoui double %str to i8
3877 %or = or i64 %ptr, 1000000000001
3878 %0 = inttoptr i64 %or to ptr
3879 store i8 %conv, ptr %0, align 1
3883 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
3884 define dso_local void @st_disjoint_align64_double_uint8_t(i64 %ptr, double %str) {
3885 ; CHECK-P10-LABEL: st_disjoint_align64_double_uint8_t:
3886 ; CHECK-P10: # %bb.0: # %entry
3887 ; CHECK-P10-NEXT: xscvdpuxds f0, f1
3888 ; CHECK-P10-NEXT: pli r4, 244140625
3889 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
3890 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
3891 ; CHECK-P10-NEXT: stxsibx f0, r3, r4
3892 ; CHECK-P10-NEXT: blr
3894 ; CHECK-P9-LABEL: st_disjoint_align64_double_uint8_t:
3895 ; CHECK-P9: # %bb.0: # %entry
3896 ; CHECK-P9-NEXT: xscvdpuxds f0, f1
3897 ; CHECK-P9-NEXT: lis r4, 3725
3898 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
3899 ; CHECK-P9-NEXT: ori r4, r4, 19025
3900 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
3901 ; CHECK-P9-NEXT: stxsibx f0, r3, r4
3902 ; CHECK-P9-NEXT: blr
3904 ; CHECK-P8-LABEL: st_disjoint_align64_double_uint8_t:
3905 ; CHECK-P8: # %bb.0: # %entry
3906 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
3907 ; CHECK-P8-NEXT: lis r5, 3725
3908 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
3909 ; CHECK-P8-NEXT: ori r5, r5, 19025
3910 ; CHECK-P8-NEXT: rldic r5, r5, 12, 24
3911 ; CHECK-P8-NEXT: mffprwz r4, f0
3912 ; CHECK-P8-NEXT: stbx r4, r3, r5
3913 ; CHECK-P8-NEXT: blr
3915 %and = and i64 %ptr, -1099511627776
3916 %conv = fptoui double %str to i8
3917 %or = or i64 %and, 1000000000000
3918 %0 = inttoptr i64 %or to ptr
3919 store i8 %conv, ptr %0, align 4096
3923 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
3924 define dso_local void @st_cst_align16_double_uint8_t(double %str) {
3925 ; CHECK-POSTP8-LABEL: st_cst_align16_double_uint8_t:
3926 ; CHECK-POSTP8: # %bb.0: # %entry
3927 ; CHECK-POSTP8-NEXT: xscvdpuxds f0, f1
3928 ; CHECK-POSTP8-NEXT: li r3, 4080
3929 ; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
3930 ; CHECK-POSTP8-NEXT: blr
3932 ; CHECK-P8-LABEL: st_cst_align16_double_uint8_t:
3933 ; CHECK-P8: # %bb.0: # %entry
3934 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
3935 ; CHECK-P8-NEXT: mffprwz r3, f0
3936 ; CHECK-P8-NEXT: stb r3, 4080(0)
3937 ; CHECK-P8-NEXT: blr
3939 %conv = fptoui double %str to i8
3940 store i8 %conv, ptr inttoptr (i64 4080 to ptr), align 16
3944 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
3945 define dso_local void @st_cst_align32_double_uint8_t(double %str) {
3946 ; CHECK-P10-LABEL: st_cst_align32_double_uint8_t:
3947 ; CHECK-P10: # %bb.0: # %entry
3948 ; CHECK-P10-NEXT: xscvdpuxds f0, f1
3949 ; CHECK-P10-NEXT: pli r3, 9999900
3950 ; CHECK-P10-NEXT: stxsibx f0, 0, r3
3951 ; CHECK-P10-NEXT: blr
3953 ; CHECK-P9-LABEL: st_cst_align32_double_uint8_t:
3954 ; CHECK-P9: # %bb.0: # %entry
3955 ; CHECK-P9-NEXT: xscvdpuxds f0, f1
3956 ; CHECK-P9-NEXT: lis r3, 152
3957 ; CHECK-P9-NEXT: ori r3, r3, 38428
3958 ; CHECK-P9-NEXT: stxsibx f0, 0, r3
3959 ; CHECK-P9-NEXT: blr
3961 ; CHECK-P8-LABEL: st_cst_align32_double_uint8_t:
3962 ; CHECK-P8: # %bb.0: # %entry
3963 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
3964 ; CHECK-P8-NEXT: lis r4, 153
3965 ; CHECK-P8-NEXT: mffprwz r3, f0
3966 ; CHECK-P8-NEXT: stb r3, -27108(r4)
3967 ; CHECK-P8-NEXT: blr
3969 %conv = fptoui double %str to i8
3970 store i8 %conv, ptr inttoptr (i64 9999900 to ptr), align 4
3974 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
3975 define dso_local void @st_cst_align64_double_uint8_t(double %str) {
3976 ; CHECK-P10-LABEL: st_cst_align64_double_uint8_t:
3977 ; CHECK-P10: # %bb.0: # %entry
3978 ; CHECK-P10-NEXT: xscvdpuxds f0, f1
3979 ; CHECK-P10-NEXT: pli r3, 244140625
3980 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
3981 ; CHECK-P10-NEXT: stxsibx f0, 0, r3
3982 ; CHECK-P10-NEXT: blr
3984 ; CHECK-P9-LABEL: st_cst_align64_double_uint8_t:
3985 ; CHECK-P9: # %bb.0: # %entry
3986 ; CHECK-P9-NEXT: xscvdpuxds f0, f1
3987 ; CHECK-P9-NEXT: lis r3, 3725
3988 ; CHECK-P9-NEXT: ori r3, r3, 19025
3989 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
3990 ; CHECK-P9-NEXT: stxsibx f0, 0, r3
3991 ; CHECK-P9-NEXT: blr
3993 ; CHECK-P8-LABEL: st_cst_align64_double_uint8_t:
3994 ; CHECK-P8: # %bb.0: # %entry
3995 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
3996 ; CHECK-P8-NEXT: lis r4, 3725
3997 ; CHECK-P8-NEXT: ori r4, r4, 19025
3998 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
3999 ; CHECK-P8-NEXT: mffprwz r3, f0
4000 ; CHECK-P8-NEXT: stb r3, 0(r4)
4001 ; CHECK-P8-NEXT: blr
4003 %conv = fptoui double %str to i8
4004 store i8 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
4008 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4009 define dso_local void @st_0_double_int8_t(i64 %ptr, double %str) {
4010 ; CHECK-POSTP8-LABEL: st_0_double_int8_t:
4011 ; CHECK-POSTP8: # %bb.0: # %entry
4012 ; CHECK-POSTP8-NEXT: xscvdpsxds f0, f1
4013 ; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
4014 ; CHECK-POSTP8-NEXT: blr
4016 ; CHECK-P8-LABEL: st_0_double_int8_t:
4017 ; CHECK-P8: # %bb.0: # %entry
4018 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4019 ; CHECK-P8-NEXT: mffprwz r4, f0
4020 ; CHECK-P8-NEXT: stb r4, 0(r3)
4021 ; CHECK-P8-NEXT: blr
4023 %conv = fptosi double %str to i8
4024 %0 = inttoptr i64 %ptr to ptr
4025 store i8 %conv, ptr %0, align 1
4029 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4030 define dso_local void @st_align16_double_int8_t(ptr nocapture %ptr, double %str) {
4031 ; CHECK-POSTP8-LABEL: st_align16_double_int8_t:
4032 ; CHECK-POSTP8: # %bb.0: # %entry
4033 ; CHECK-POSTP8-NEXT: xscvdpsxds f0, f1
4034 ; CHECK-POSTP8-NEXT: addi r3, r3, 8
4035 ; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
4036 ; CHECK-POSTP8-NEXT: blr
4038 ; CHECK-P8-LABEL: st_align16_double_int8_t:
4039 ; CHECK-P8: # %bb.0: # %entry
4040 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4041 ; CHECK-P8-NEXT: mffprwz r4, f0
4042 ; CHECK-P8-NEXT: stb r4, 8(r3)
4043 ; CHECK-P8-NEXT: blr
4045 %conv = fptosi double %str to i8
4046 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
4047 store i8 %conv, ptr %add.ptr, align 1
4051 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4052 define dso_local void @st_align32_double_int8_t(ptr nocapture %ptr, double %str) {
4053 ; CHECK-P10-LABEL: st_align32_double_int8_t:
4054 ; CHECK-P10: # %bb.0: # %entry
4055 ; CHECK-P10-NEXT: xscvdpsxds f0, f1
4056 ; CHECK-P10-NEXT: pli r4, 99999000
4057 ; CHECK-P10-NEXT: stxsibx f0, r3, r4
4058 ; CHECK-P10-NEXT: blr
4060 ; CHECK-P9-LABEL: st_align32_double_int8_t:
4061 ; CHECK-P9: # %bb.0: # %entry
4062 ; CHECK-P9-NEXT: xscvdpsxds f0, f1
4063 ; CHECK-P9-NEXT: lis r4, 1525
4064 ; CHECK-P9-NEXT: ori r4, r4, 56600
4065 ; CHECK-P9-NEXT: stxsibx f0, r3, r4
4066 ; CHECK-P9-NEXT: blr
4068 ; CHECK-P8-LABEL: st_align32_double_int8_t:
4069 ; CHECK-P8: # %bb.0: # %entry
4070 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4071 ; CHECK-P8-NEXT: lis r5, 1525
4072 ; CHECK-P8-NEXT: ori r5, r5, 56600
4073 ; CHECK-P8-NEXT: mffprwz r4, f0
4074 ; CHECK-P8-NEXT: stbx r4, r3, r5
4075 ; CHECK-P8-NEXT: blr
4077 %conv = fptosi double %str to i8
4078 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
4079 store i8 %conv, ptr %add.ptr, align 1
4083 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4084 define dso_local void @st_align64_double_int8_t(ptr nocapture %ptr, double %str) {
4085 ; CHECK-P10-LABEL: st_align64_double_int8_t:
4086 ; CHECK-P10: # %bb.0: # %entry
4087 ; CHECK-P10-NEXT: xscvdpsxds f0, f1
4088 ; CHECK-P10-NEXT: pli r4, 244140625
4089 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
4090 ; CHECK-P10-NEXT: stxsibx f0, r3, r4
4091 ; CHECK-P10-NEXT: blr
4093 ; CHECK-P9-LABEL: st_align64_double_int8_t:
4094 ; CHECK-P9: # %bb.0: # %entry
4095 ; CHECK-P9-NEXT: xscvdpsxds f0, f1
4096 ; CHECK-P9-NEXT: lis r4, 3725
4097 ; CHECK-P9-NEXT: ori r4, r4, 19025
4098 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
4099 ; CHECK-P9-NEXT: stxsibx f0, r3, r4
4100 ; CHECK-P9-NEXT: blr
4102 ; CHECK-P8-LABEL: st_align64_double_int8_t:
4103 ; CHECK-P8: # %bb.0: # %entry
4104 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4105 ; CHECK-P8-NEXT: lis r5, 3725
4106 ; CHECK-P8-NEXT: ori r5, r5, 19025
4107 ; CHECK-P8-NEXT: rldic r5, r5, 12, 24
4108 ; CHECK-P8-NEXT: mffprwz r4, f0
4109 ; CHECK-P8-NEXT: stbx r4, r3, r5
4110 ; CHECK-P8-NEXT: blr
4112 %conv = fptosi double %str to i8
4113 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
4114 store i8 %conv, ptr %add.ptr, align 1
4118 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4119 define dso_local void @st_reg_double_int8_t(ptr nocapture %ptr, i64 %off, double %str) {
4120 ; CHECK-POSTP8-LABEL: st_reg_double_int8_t:
4121 ; CHECK-POSTP8: # %bb.0: # %entry
4122 ; CHECK-POSTP8-NEXT: xscvdpsxds f0, f1
4123 ; CHECK-POSTP8-NEXT: stxsibx f0, r3, r4
4124 ; CHECK-POSTP8-NEXT: blr
4126 ; CHECK-P8-LABEL: st_reg_double_int8_t:
4127 ; CHECK-P8: # %bb.0: # %entry
4128 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4129 ; CHECK-P8-NEXT: mffprwz r5, f0
4130 ; CHECK-P8-NEXT: stbx r5, r3, r4
4131 ; CHECK-P8-NEXT: blr
4133 %conv = fptosi double %str to i8
4134 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
4135 store i8 %conv, ptr %add.ptr, align 1
4139 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4140 define dso_local void @st_or1_double_int8_t(i64 %ptr, i8 zeroext %off, double %str) {
4141 ; CHECK-POSTP8-LABEL: st_or1_double_int8_t:
4142 ; CHECK-POSTP8: # %bb.0: # %entry
4143 ; CHECK-POSTP8-NEXT: xscvdpsxds f0, f1
4144 ; CHECK-POSTP8-NEXT: or r3, r4, r3
4145 ; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
4146 ; CHECK-POSTP8-NEXT: blr
4148 ; CHECK-P8-LABEL: st_or1_double_int8_t:
4149 ; CHECK-P8: # %bb.0: # %entry
4150 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4151 ; CHECK-P8-NEXT: or r3, r4, r3
4152 ; CHECK-P8-NEXT: mffprwz r5, f0
4153 ; CHECK-P8-NEXT: stb r5, 0(r3)
4154 ; CHECK-P8-NEXT: blr
4156 %conv = fptosi double %str to i8
4157 %conv1 = zext i8 %off to i64
4158 %or = or i64 %conv1, %ptr
4159 %0 = inttoptr i64 %or to ptr
4160 store i8 %conv, ptr %0, align 1
4164 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4165 define dso_local void @st_not_disjoint16_double_int8_t(i64 %ptr, double %str) {
4166 ; CHECK-POSTP8-LABEL: st_not_disjoint16_double_int8_t:
4167 ; CHECK-POSTP8: # %bb.0: # %entry
4168 ; CHECK-POSTP8-NEXT: xscvdpsxds f0, f1
4169 ; CHECK-POSTP8-NEXT: ori r3, r3, 6
4170 ; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
4171 ; CHECK-POSTP8-NEXT: blr
4173 ; CHECK-P8-LABEL: st_not_disjoint16_double_int8_t:
4174 ; CHECK-P8: # %bb.0: # %entry
4175 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4176 ; CHECK-P8-NEXT: ori r3, r3, 6
4177 ; CHECK-P8-NEXT: mffprwz r4, f0
4178 ; CHECK-P8-NEXT: stb r4, 0(r3)
4179 ; CHECK-P8-NEXT: blr
4181 %conv = fptosi double %str to i8
4182 %or = or i64 %ptr, 6
4183 %0 = inttoptr i64 %or to ptr
4184 store i8 %conv, ptr %0, align 1
4188 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4189 define dso_local void @st_disjoint_align16_double_int8_t(i64 %ptr, double %str) {
4190 ; CHECK-POSTP8-LABEL: st_disjoint_align16_double_int8_t:
4191 ; CHECK-POSTP8: # %bb.0: # %entry
4192 ; CHECK-POSTP8-NEXT: xscvdpsxds f0, f1
4193 ; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
4194 ; CHECK-POSTP8-NEXT: ori r3, r3, 24
4195 ; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
4196 ; CHECK-POSTP8-NEXT: blr
4198 ; CHECK-P8-LABEL: st_disjoint_align16_double_int8_t:
4199 ; CHECK-P8: # %bb.0: # %entry
4200 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4201 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
4202 ; CHECK-P8-NEXT: mffprwz r4, f0
4203 ; CHECK-P8-NEXT: stb r4, 24(r3)
4204 ; CHECK-P8-NEXT: blr
4206 %and = and i64 %ptr, -4096
4207 %conv = fptosi double %str to i8
4208 %or = or i64 %and, 24
4209 %0 = inttoptr i64 %or to ptr
4210 store i8 %conv, ptr %0, align 8
4214 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4215 define dso_local void @st_not_disjoint32_double_int8_t(i64 %ptr, double %str) {
4216 ; CHECK-POSTP8-LABEL: st_not_disjoint32_double_int8_t:
4217 ; CHECK-POSTP8: # %bb.0: # %entry
4218 ; CHECK-POSTP8-NEXT: xscvdpsxds f0, f1
4219 ; CHECK-POSTP8-NEXT: ori r3, r3, 34463
4220 ; CHECK-POSTP8-NEXT: oris r3, r3, 1
4221 ; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
4222 ; CHECK-POSTP8-NEXT: blr
4224 ; CHECK-P8-LABEL: st_not_disjoint32_double_int8_t:
4225 ; CHECK-P8: # %bb.0: # %entry
4226 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4227 ; CHECK-P8-NEXT: ori r3, r3, 34463
4228 ; CHECK-P8-NEXT: oris r3, r3, 1
4229 ; CHECK-P8-NEXT: mffprwz r4, f0
4230 ; CHECK-P8-NEXT: stb r4, 0(r3)
4231 ; CHECK-P8-NEXT: blr
4233 %conv = fptosi double %str to i8
4234 %or = or i64 %ptr, 99999
4235 %0 = inttoptr i64 %or to ptr
4236 store i8 %conv, ptr %0, align 1
4240 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4241 define dso_local void @st_disjoint_align32_double_int8_t(i64 %ptr, double %str) {
4242 ; CHECK-P10-LABEL: st_disjoint_align32_double_int8_t:
4243 ; CHECK-P10: # %bb.0: # %entry
4244 ; CHECK-P10-NEXT: xscvdpsxds f0, f1
4245 ; CHECK-P10-NEXT: lis r4, -15264
4246 ; CHECK-P10-NEXT: and r3, r3, r4
4247 ; CHECK-P10-NEXT: pli r4, 999990000
4248 ; CHECK-P10-NEXT: stxsibx f0, r3, r4
4249 ; CHECK-P10-NEXT: blr
4251 ; CHECK-P9-LABEL: st_disjoint_align32_double_int8_t:
4252 ; CHECK-P9: # %bb.0: # %entry
4253 ; CHECK-P9-NEXT: xscvdpsxds f0, f1
4254 ; CHECK-P9-NEXT: lis r4, -15264
4255 ; CHECK-P9-NEXT: and r3, r3, r4
4256 ; CHECK-P9-NEXT: lis r4, 15258
4257 ; CHECK-P9-NEXT: ori r4, r4, 41712
4258 ; CHECK-P9-NEXT: stxsibx f0, r3, r4
4259 ; CHECK-P9-NEXT: blr
4261 ; CHECK-P8-LABEL: st_disjoint_align32_double_int8_t:
4262 ; CHECK-P8: # %bb.0: # %entry
4263 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4264 ; CHECK-P8-NEXT: lis r4, -15264
4265 ; CHECK-P8-NEXT: lis r5, 15258
4266 ; CHECK-P8-NEXT: and r3, r3, r4
4267 ; CHECK-P8-NEXT: ori r5, r5, 41712
4268 ; CHECK-P8-NEXT: mffprwz r4, f0
4269 ; CHECK-P8-NEXT: stbx r4, r3, r5
4270 ; CHECK-P8-NEXT: blr
4272 %and = and i64 %ptr, -1000341504
4273 %conv = fptosi double %str to i8
4274 %or = or i64 %and, 999990000
4275 %0 = inttoptr i64 %or to ptr
4276 store i8 %conv, ptr %0, align 16
4280 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4281 define dso_local void @st_not_disjoint64_double_int8_t(i64 %ptr, double %str) {
4282 ; CHECK-P10-LABEL: st_not_disjoint64_double_int8_t:
4283 ; CHECK-P10: # %bb.0: # %entry
4284 ; CHECK-P10-NEXT: xscvdpsxds f0, f1
4285 ; CHECK-P10-NEXT: pli r4, 232
4286 ; CHECK-P10-NEXT: pli r5, 3567587329
4287 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
4288 ; CHECK-P10-NEXT: or r3, r3, r5
4289 ; CHECK-P10-NEXT: stxsibx f0, 0, r3
4290 ; CHECK-P10-NEXT: blr
4292 ; CHECK-P9-LABEL: st_not_disjoint64_double_int8_t:
4293 ; CHECK-P9: # %bb.0: # %entry
4294 ; CHECK-P9-NEXT: li r4, 29
4295 ; CHECK-P9-NEXT: xscvdpsxds f0, f1
4296 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
4297 ; CHECK-P9-NEXT: oris r4, r4, 54437
4298 ; CHECK-P9-NEXT: ori r4, r4, 4097
4299 ; CHECK-P9-NEXT: or r3, r3, r4
4300 ; CHECK-P9-NEXT: stxsibx f0, 0, r3
4301 ; CHECK-P9-NEXT: blr
4303 ; CHECK-P8-LABEL: st_not_disjoint64_double_int8_t:
4304 ; CHECK-P8: # %bb.0: # %entry
4305 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4306 ; CHECK-P8-NEXT: li r5, 29
4307 ; CHECK-P8-NEXT: rldic r5, r5, 35, 24
4308 ; CHECK-P8-NEXT: oris r5, r5, 54437
4309 ; CHECK-P8-NEXT: mffprwz r4, f0
4310 ; CHECK-P8-NEXT: ori r5, r5, 4097
4311 ; CHECK-P8-NEXT: or r3, r3, r5
4312 ; CHECK-P8-NEXT: stb r4, 0(r3)
4313 ; CHECK-P8-NEXT: blr
4315 %conv = fptosi double %str to i8
4316 %or = or i64 %ptr, 1000000000001
4317 %0 = inttoptr i64 %or to ptr
4318 store i8 %conv, ptr %0, align 1
4322 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4323 define dso_local void @st_disjoint_align64_double_int8_t(i64 %ptr, double %str) {
4324 ; CHECK-P10-LABEL: st_disjoint_align64_double_int8_t:
4325 ; CHECK-P10: # %bb.0: # %entry
4326 ; CHECK-P10-NEXT: xscvdpsxds f0, f1
4327 ; CHECK-P10-NEXT: pli r4, 244140625
4328 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
4329 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
4330 ; CHECK-P10-NEXT: stxsibx f0, r3, r4
4331 ; CHECK-P10-NEXT: blr
4333 ; CHECK-P9-LABEL: st_disjoint_align64_double_int8_t:
4334 ; CHECK-P9: # %bb.0: # %entry
4335 ; CHECK-P9-NEXT: xscvdpsxds f0, f1
4336 ; CHECK-P9-NEXT: lis r4, 3725
4337 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
4338 ; CHECK-P9-NEXT: ori r4, r4, 19025
4339 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
4340 ; CHECK-P9-NEXT: stxsibx f0, r3, r4
4341 ; CHECK-P9-NEXT: blr
4343 ; CHECK-P8-LABEL: st_disjoint_align64_double_int8_t:
4344 ; CHECK-P8: # %bb.0: # %entry
4345 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4346 ; CHECK-P8-NEXT: lis r5, 3725
4347 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
4348 ; CHECK-P8-NEXT: ori r5, r5, 19025
4349 ; CHECK-P8-NEXT: rldic r5, r5, 12, 24
4350 ; CHECK-P8-NEXT: mffprwz r4, f0
4351 ; CHECK-P8-NEXT: stbx r4, r3, r5
4352 ; CHECK-P8-NEXT: blr
4354 %and = and i64 %ptr, -1099511627776
4355 %conv = fptosi double %str to i8
4356 %or = or i64 %and, 1000000000000
4357 %0 = inttoptr i64 %or to ptr
4358 store i8 %conv, ptr %0, align 4096
4362 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4363 define dso_local void @st_cst_align16_double_int8_t(double %str) {
4364 ; CHECK-POSTP8-LABEL: st_cst_align16_double_int8_t:
4365 ; CHECK-POSTP8: # %bb.0: # %entry
4366 ; CHECK-POSTP8-NEXT: xscvdpsxds f0, f1
4367 ; CHECK-POSTP8-NEXT: li r3, 4080
4368 ; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
4369 ; CHECK-POSTP8-NEXT: blr
4371 ; CHECK-P8-LABEL: st_cst_align16_double_int8_t:
4372 ; CHECK-P8: # %bb.0: # %entry
4373 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4374 ; CHECK-P8-NEXT: mffprwz r3, f0
4375 ; CHECK-P8-NEXT: stb r3, 4080(0)
4376 ; CHECK-P8-NEXT: blr
4378 %conv = fptosi double %str to i8
4379 store i8 %conv, ptr inttoptr (i64 4080 to ptr), align 16
4383 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4384 define dso_local void @st_cst_align32_double_int8_t(double %str) {
4385 ; CHECK-P10-LABEL: st_cst_align32_double_int8_t:
4386 ; CHECK-P10: # %bb.0: # %entry
4387 ; CHECK-P10-NEXT: xscvdpsxds f0, f1
4388 ; CHECK-P10-NEXT: pli r3, 9999900
4389 ; CHECK-P10-NEXT: stxsibx f0, 0, r3
4390 ; CHECK-P10-NEXT: blr
4392 ; CHECK-P9-LABEL: st_cst_align32_double_int8_t:
4393 ; CHECK-P9: # %bb.0: # %entry
4394 ; CHECK-P9-NEXT: xscvdpsxds f0, f1
4395 ; CHECK-P9-NEXT: lis r3, 152
4396 ; CHECK-P9-NEXT: ori r3, r3, 38428
4397 ; CHECK-P9-NEXT: stxsibx f0, 0, r3
4398 ; CHECK-P9-NEXT: blr
4400 ; CHECK-P8-LABEL: st_cst_align32_double_int8_t:
4401 ; CHECK-P8: # %bb.0: # %entry
4402 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4403 ; CHECK-P8-NEXT: lis r4, 153
4404 ; CHECK-P8-NEXT: mffprwz r3, f0
4405 ; CHECK-P8-NEXT: stb r3, -27108(r4)
4406 ; CHECK-P8-NEXT: blr
4408 %conv = fptosi double %str to i8
4409 store i8 %conv, ptr inttoptr (i64 9999900 to ptr), align 4
4413 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4414 define dso_local void @st_cst_align64_double_int8_t(double %str) {
4415 ; CHECK-P10-LABEL: st_cst_align64_double_int8_t:
4416 ; CHECK-P10: # %bb.0: # %entry
4417 ; CHECK-P10-NEXT: xscvdpsxds f0, f1
4418 ; CHECK-P10-NEXT: pli r3, 244140625
4419 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
4420 ; CHECK-P10-NEXT: stxsibx f0, 0, r3
4421 ; CHECK-P10-NEXT: blr
4423 ; CHECK-P9-LABEL: st_cst_align64_double_int8_t:
4424 ; CHECK-P9: # %bb.0: # %entry
4425 ; CHECK-P9-NEXT: xscvdpsxds f0, f1
4426 ; CHECK-P9-NEXT: lis r3, 3725
4427 ; CHECK-P9-NEXT: ori r3, r3, 19025
4428 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
4429 ; CHECK-P9-NEXT: stxsibx f0, 0, r3
4430 ; CHECK-P9-NEXT: blr
4432 ; CHECK-P8-LABEL: st_cst_align64_double_int8_t:
4433 ; CHECK-P8: # %bb.0: # %entry
4434 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4435 ; CHECK-P8-NEXT: lis r4, 3725
4436 ; CHECK-P8-NEXT: ori r4, r4, 19025
4437 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
4438 ; CHECK-P8-NEXT: mffprwz r3, f0
4439 ; CHECK-P8-NEXT: stb r3, 0(r4)
4440 ; CHECK-P8-NEXT: blr
4442 %conv = fptosi double %str to i8
4443 store i8 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
4447 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4448 define dso_local void @st_0_double_uint16_t(i64 %ptr, double %str) {
4449 ; CHECK-POSTP8-LABEL: st_0_double_uint16_t:
4450 ; CHECK-POSTP8: # %bb.0: # %entry
4451 ; CHECK-POSTP8-NEXT: xscvdpuxds f0, f1
4452 ; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
4453 ; CHECK-POSTP8-NEXT: blr
4455 ; CHECK-P8-LABEL: st_0_double_uint16_t:
4456 ; CHECK-P8: # %bb.0: # %entry
4457 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4458 ; CHECK-P8-NEXT: mffprwz r4, f0
4459 ; CHECK-P8-NEXT: sth r4, 0(r3)
4460 ; CHECK-P8-NEXT: blr
4462 %conv = fptoui double %str to i16
4463 %0 = inttoptr i64 %ptr to ptr
4464 store i16 %conv, ptr %0, align 2
4468 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4469 define dso_local void @st_align16_double_uint16_t(ptr nocapture %ptr, double %str) {
4470 ; CHECK-POSTP8-LABEL: st_align16_double_uint16_t:
4471 ; CHECK-POSTP8: # %bb.0: # %entry
4472 ; CHECK-POSTP8-NEXT: xscvdpuxds f0, f1
4473 ; CHECK-POSTP8-NEXT: addi r3, r3, 8
4474 ; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
4475 ; CHECK-POSTP8-NEXT: blr
4477 ; CHECK-P8-LABEL: st_align16_double_uint16_t:
4478 ; CHECK-P8: # %bb.0: # %entry
4479 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4480 ; CHECK-P8-NEXT: mffprwz r4, f0
4481 ; CHECK-P8-NEXT: sth r4, 8(r3)
4482 ; CHECK-P8-NEXT: blr
4484 %conv = fptoui double %str to i16
4485 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
4486 store i16 %conv, ptr %add.ptr, align 2
4490 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4491 define dso_local void @st_align32_double_uint16_t(ptr nocapture %ptr, double %str) {
4492 ; CHECK-P10-LABEL: st_align32_double_uint16_t:
4493 ; CHECK-P10: # %bb.0: # %entry
4494 ; CHECK-P10-NEXT: xscvdpuxds f0, f1
4495 ; CHECK-P10-NEXT: pli r4, 99999000
4496 ; CHECK-P10-NEXT: stxsihx f0, r3, r4
4497 ; CHECK-P10-NEXT: blr
4499 ; CHECK-P9-LABEL: st_align32_double_uint16_t:
4500 ; CHECK-P9: # %bb.0: # %entry
4501 ; CHECK-P9-NEXT: xscvdpuxds f0, f1
4502 ; CHECK-P9-NEXT: lis r4, 1525
4503 ; CHECK-P9-NEXT: ori r4, r4, 56600
4504 ; CHECK-P9-NEXT: stxsihx f0, r3, r4
4505 ; CHECK-P9-NEXT: blr
4507 ; CHECK-P8-LABEL: st_align32_double_uint16_t:
4508 ; CHECK-P8: # %bb.0: # %entry
4509 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4510 ; CHECK-P8-NEXT: lis r5, 1525
4511 ; CHECK-P8-NEXT: ori r5, r5, 56600
4512 ; CHECK-P8-NEXT: mffprwz r4, f0
4513 ; CHECK-P8-NEXT: sthx r4, r3, r5
4514 ; CHECK-P8-NEXT: blr
4516 %conv = fptoui double %str to i16
4517 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
4518 store i16 %conv, ptr %add.ptr, align 2
4522 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4523 define dso_local void @st_align64_double_uint16_t(ptr nocapture %ptr, double %str) {
4524 ; CHECK-P10-LABEL: st_align64_double_uint16_t:
4525 ; CHECK-P10: # %bb.0: # %entry
4526 ; CHECK-P10-NEXT: xscvdpuxds f0, f1
4527 ; CHECK-P10-NEXT: pli r4, 244140625
4528 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
4529 ; CHECK-P10-NEXT: stxsihx f0, r3, r4
4530 ; CHECK-P10-NEXT: blr
4532 ; CHECK-P9-LABEL: st_align64_double_uint16_t:
4533 ; CHECK-P9: # %bb.0: # %entry
4534 ; CHECK-P9-NEXT: xscvdpuxds f0, f1
4535 ; CHECK-P9-NEXT: lis r4, 3725
4536 ; CHECK-P9-NEXT: ori r4, r4, 19025
4537 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
4538 ; CHECK-P9-NEXT: stxsihx f0, r3, r4
4539 ; CHECK-P9-NEXT: blr
4541 ; CHECK-P8-LABEL: st_align64_double_uint16_t:
4542 ; CHECK-P8: # %bb.0: # %entry
4543 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4544 ; CHECK-P8-NEXT: lis r5, 3725
4545 ; CHECK-P8-NEXT: ori r5, r5, 19025
4546 ; CHECK-P8-NEXT: rldic r5, r5, 12, 24
4547 ; CHECK-P8-NEXT: mffprwz r4, f0
4548 ; CHECK-P8-NEXT: sthx r4, r3, r5
4549 ; CHECK-P8-NEXT: blr
4551 %conv = fptoui double %str to i16
4552 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
4553 store i16 %conv, ptr %add.ptr, align 2
4557 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4558 define dso_local void @st_reg_double_uint16_t(ptr nocapture %ptr, i64 %off, double %str) {
4559 ; CHECK-POSTP8-LABEL: st_reg_double_uint16_t:
4560 ; CHECK-POSTP8: # %bb.0: # %entry
4561 ; CHECK-POSTP8-NEXT: xscvdpuxds f0, f1
4562 ; CHECK-POSTP8-NEXT: stxsihx f0, r3, r4
4563 ; CHECK-POSTP8-NEXT: blr
4565 ; CHECK-P8-LABEL: st_reg_double_uint16_t:
4566 ; CHECK-P8: # %bb.0: # %entry
4567 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4568 ; CHECK-P8-NEXT: mffprwz r5, f0
4569 ; CHECK-P8-NEXT: sthx r5, r3, r4
4570 ; CHECK-P8-NEXT: blr
4572 %conv = fptoui double %str to i16
4573 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
4574 store i16 %conv, ptr %add.ptr, align 2
4578 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4579 define dso_local void @st_or1_double_uint16_t(i64 %ptr, i8 zeroext %off, double %str) {
4580 ; CHECK-POSTP8-LABEL: st_or1_double_uint16_t:
4581 ; CHECK-POSTP8: # %bb.0: # %entry
4582 ; CHECK-POSTP8-NEXT: xscvdpuxds f0, f1
4583 ; CHECK-POSTP8-NEXT: or r3, r4, r3
4584 ; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
4585 ; CHECK-POSTP8-NEXT: blr
4587 ; CHECK-P8-LABEL: st_or1_double_uint16_t:
4588 ; CHECK-P8: # %bb.0: # %entry
4589 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4590 ; CHECK-P8-NEXT: or r3, r4, r3
4591 ; CHECK-P8-NEXT: mffprwz r5, f0
4592 ; CHECK-P8-NEXT: sth r5, 0(r3)
4593 ; CHECK-P8-NEXT: blr
4595 %conv = fptoui double %str to i16
4596 %conv1 = zext i8 %off to i64
4597 %or = or i64 %conv1, %ptr
4598 %0 = inttoptr i64 %or to ptr
4599 store i16 %conv, ptr %0, align 2
4603 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4604 define dso_local void @st_not_disjoint16_double_uint16_t(i64 %ptr, double %str) {
4605 ; CHECK-POSTP8-LABEL: st_not_disjoint16_double_uint16_t:
4606 ; CHECK-POSTP8: # %bb.0: # %entry
4607 ; CHECK-POSTP8-NEXT: xscvdpuxds f0, f1
4608 ; CHECK-POSTP8-NEXT: ori r3, r3, 6
4609 ; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
4610 ; CHECK-POSTP8-NEXT: blr
4612 ; CHECK-P8-LABEL: st_not_disjoint16_double_uint16_t:
4613 ; CHECK-P8: # %bb.0: # %entry
4614 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4615 ; CHECK-P8-NEXT: ori r3, r3, 6
4616 ; CHECK-P8-NEXT: mffprwz r4, f0
4617 ; CHECK-P8-NEXT: sth r4, 0(r3)
4618 ; CHECK-P8-NEXT: blr
4620 %conv = fptoui double %str to i16
4621 %or = or i64 %ptr, 6
4622 %0 = inttoptr i64 %or to ptr
4623 store i16 %conv, ptr %0, align 2
4627 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4628 define dso_local void @st_disjoint_align16_double_uint16_t(i64 %ptr, double %str) {
4629 ; CHECK-POSTP8-LABEL: st_disjoint_align16_double_uint16_t:
4630 ; CHECK-POSTP8: # %bb.0: # %entry
4631 ; CHECK-POSTP8-NEXT: xscvdpuxds f0, f1
4632 ; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
4633 ; CHECK-POSTP8-NEXT: ori r3, r3, 24
4634 ; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
4635 ; CHECK-POSTP8-NEXT: blr
4637 ; CHECK-P8-LABEL: st_disjoint_align16_double_uint16_t:
4638 ; CHECK-P8: # %bb.0: # %entry
4639 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4640 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
4641 ; CHECK-P8-NEXT: mffprwz r4, f0
4642 ; CHECK-P8-NEXT: sth r4, 24(r3)
4643 ; CHECK-P8-NEXT: blr
4645 %and = and i64 %ptr, -4096
4646 %conv = fptoui double %str to i16
4647 %or = or i64 %and, 24
4648 %0 = inttoptr i64 %or to ptr
4649 store i16 %conv, ptr %0, align 8
4653 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4654 define dso_local void @st_not_disjoint32_double_uint16_t(i64 %ptr, double %str) {
4655 ; CHECK-POSTP8-LABEL: st_not_disjoint32_double_uint16_t:
4656 ; CHECK-POSTP8: # %bb.0: # %entry
4657 ; CHECK-POSTP8-NEXT: xscvdpuxds f0, f1
4658 ; CHECK-POSTP8-NEXT: ori r3, r3, 34463
4659 ; CHECK-POSTP8-NEXT: oris r3, r3, 1
4660 ; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
4661 ; CHECK-POSTP8-NEXT: blr
4663 ; CHECK-P8-LABEL: st_not_disjoint32_double_uint16_t:
4664 ; CHECK-P8: # %bb.0: # %entry
4665 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4666 ; CHECK-P8-NEXT: ori r3, r3, 34463
4667 ; CHECK-P8-NEXT: oris r3, r3, 1
4668 ; CHECK-P8-NEXT: mffprwz r4, f0
4669 ; CHECK-P8-NEXT: sth r4, 0(r3)
4670 ; CHECK-P8-NEXT: blr
4672 %conv = fptoui double %str to i16
4673 %or = or i64 %ptr, 99999
4674 %0 = inttoptr i64 %or to ptr
4675 store i16 %conv, ptr %0, align 2
4679 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4680 define dso_local void @st_disjoint_align32_double_uint16_t(i64 %ptr, double %str) {
4681 ; CHECK-P10-LABEL: st_disjoint_align32_double_uint16_t:
4682 ; CHECK-P10: # %bb.0: # %entry
4683 ; CHECK-P10-NEXT: xscvdpuxds f0, f1
4684 ; CHECK-P10-NEXT: lis r4, -15264
4685 ; CHECK-P10-NEXT: and r3, r3, r4
4686 ; CHECK-P10-NEXT: pli r4, 999990000
4687 ; CHECK-P10-NEXT: stxsihx f0, r3, r4
4688 ; CHECK-P10-NEXT: blr
4690 ; CHECK-P9-LABEL: st_disjoint_align32_double_uint16_t:
4691 ; CHECK-P9: # %bb.0: # %entry
4692 ; CHECK-P9-NEXT: xscvdpuxds f0, f1
4693 ; CHECK-P9-NEXT: lis r4, -15264
4694 ; CHECK-P9-NEXT: and r3, r3, r4
4695 ; CHECK-P9-NEXT: lis r4, 15258
4696 ; CHECK-P9-NEXT: ori r4, r4, 41712
4697 ; CHECK-P9-NEXT: stxsihx f0, r3, r4
4698 ; CHECK-P9-NEXT: blr
4700 ; CHECK-P8-LABEL: st_disjoint_align32_double_uint16_t:
4701 ; CHECK-P8: # %bb.0: # %entry
4702 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4703 ; CHECK-P8-NEXT: lis r4, -15264
4704 ; CHECK-P8-NEXT: lis r5, 15258
4705 ; CHECK-P8-NEXT: and r3, r3, r4
4706 ; CHECK-P8-NEXT: ori r5, r5, 41712
4707 ; CHECK-P8-NEXT: mffprwz r4, f0
4708 ; CHECK-P8-NEXT: sthx r4, r3, r5
4709 ; CHECK-P8-NEXT: blr
4711 %and = and i64 %ptr, -1000341504
4712 %conv = fptoui double %str to i16
4713 %or = or i64 %and, 999990000
4714 %0 = inttoptr i64 %or to ptr
4715 store i16 %conv, ptr %0, align 16
4719 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4720 define dso_local void @st_not_disjoint64_double_uint16_t(i64 %ptr, double %str) {
4721 ; CHECK-P10-LABEL: st_not_disjoint64_double_uint16_t:
4722 ; CHECK-P10: # %bb.0: # %entry
4723 ; CHECK-P10-NEXT: xscvdpuxds f0, f1
4724 ; CHECK-P10-NEXT: pli r4, 232
4725 ; CHECK-P10-NEXT: pli r5, 3567587329
4726 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
4727 ; CHECK-P10-NEXT: or r3, r3, r5
4728 ; CHECK-P10-NEXT: stxsihx f0, 0, r3
4729 ; CHECK-P10-NEXT: blr
4731 ; CHECK-P9-LABEL: st_not_disjoint64_double_uint16_t:
4732 ; CHECK-P9: # %bb.0: # %entry
4733 ; CHECK-P9-NEXT: li r4, 29
4734 ; CHECK-P9-NEXT: xscvdpuxds f0, f1
4735 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
4736 ; CHECK-P9-NEXT: oris r4, r4, 54437
4737 ; CHECK-P9-NEXT: ori r4, r4, 4097
4738 ; CHECK-P9-NEXT: or r3, r3, r4
4739 ; CHECK-P9-NEXT: stxsihx f0, 0, r3
4740 ; CHECK-P9-NEXT: blr
4742 ; CHECK-P8-LABEL: st_not_disjoint64_double_uint16_t:
4743 ; CHECK-P8: # %bb.0: # %entry
4744 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4745 ; CHECK-P8-NEXT: li r5, 29
4746 ; CHECK-P8-NEXT: rldic r5, r5, 35, 24
4747 ; CHECK-P8-NEXT: oris r5, r5, 54437
4748 ; CHECK-P8-NEXT: mffprwz r4, f0
4749 ; CHECK-P8-NEXT: ori r5, r5, 4097
4750 ; CHECK-P8-NEXT: or r3, r3, r5
4751 ; CHECK-P8-NEXT: sth r4, 0(r3)
4752 ; CHECK-P8-NEXT: blr
4754 %conv = fptoui double %str to i16
4755 %or = or i64 %ptr, 1000000000001
4756 %0 = inttoptr i64 %or to ptr
4757 store i16 %conv, ptr %0, align 2
4761 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4762 define dso_local void @st_disjoint_align64_double_uint16_t(i64 %ptr, double %str) {
4763 ; CHECK-P10-LABEL: st_disjoint_align64_double_uint16_t:
4764 ; CHECK-P10: # %bb.0: # %entry
4765 ; CHECK-P10-NEXT: xscvdpuxds f0, f1
4766 ; CHECK-P10-NEXT: pli r4, 244140625
4767 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
4768 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
4769 ; CHECK-P10-NEXT: stxsihx f0, r3, r4
4770 ; CHECK-P10-NEXT: blr
4772 ; CHECK-P9-LABEL: st_disjoint_align64_double_uint16_t:
4773 ; CHECK-P9: # %bb.0: # %entry
4774 ; CHECK-P9-NEXT: xscvdpuxds f0, f1
4775 ; CHECK-P9-NEXT: lis r4, 3725
4776 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
4777 ; CHECK-P9-NEXT: ori r4, r4, 19025
4778 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
4779 ; CHECK-P9-NEXT: stxsihx f0, r3, r4
4780 ; CHECK-P9-NEXT: blr
4782 ; CHECK-P8-LABEL: st_disjoint_align64_double_uint16_t:
4783 ; CHECK-P8: # %bb.0: # %entry
4784 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4785 ; CHECK-P8-NEXT: lis r5, 3725
4786 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
4787 ; CHECK-P8-NEXT: ori r5, r5, 19025
4788 ; CHECK-P8-NEXT: rldic r5, r5, 12, 24
4789 ; CHECK-P8-NEXT: mffprwz r4, f0
4790 ; CHECK-P8-NEXT: sthx r4, r3, r5
4791 ; CHECK-P8-NEXT: blr
4793 %and = and i64 %ptr, -1099511627776
4794 %conv = fptoui double %str to i16
4795 %or = or i64 %and, 1000000000000
4796 %0 = inttoptr i64 %or to ptr
4797 store i16 %conv, ptr %0, align 4096
4801 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4802 define dso_local void @st_cst_align16_double_uint16_t(double %str) {
4803 ; CHECK-POSTP8-LABEL: st_cst_align16_double_uint16_t:
4804 ; CHECK-POSTP8: # %bb.0: # %entry
4805 ; CHECK-POSTP8-NEXT: xscvdpuxds f0, f1
4806 ; CHECK-POSTP8-NEXT: li r3, 4080
4807 ; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
4808 ; CHECK-POSTP8-NEXT: blr
4810 ; CHECK-P8-LABEL: st_cst_align16_double_uint16_t:
4811 ; CHECK-P8: # %bb.0: # %entry
4812 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4813 ; CHECK-P8-NEXT: mffprwz r3, f0
4814 ; CHECK-P8-NEXT: sth r3, 4080(0)
4815 ; CHECK-P8-NEXT: blr
4817 %conv = fptoui double %str to i16
4818 store i16 %conv, ptr inttoptr (i64 4080 to ptr), align 16
4822 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4823 define dso_local void @st_cst_align32_double_uint16_t(double %str) {
4824 ; CHECK-P10-LABEL: st_cst_align32_double_uint16_t:
4825 ; CHECK-P10: # %bb.0: # %entry
4826 ; CHECK-P10-NEXT: xscvdpuxds f0, f1
4827 ; CHECK-P10-NEXT: pli r3, 9999900
4828 ; CHECK-P10-NEXT: stxsihx f0, 0, r3
4829 ; CHECK-P10-NEXT: blr
4831 ; CHECK-P9-LABEL: st_cst_align32_double_uint16_t:
4832 ; CHECK-P9: # %bb.0: # %entry
4833 ; CHECK-P9-NEXT: xscvdpuxds f0, f1
4834 ; CHECK-P9-NEXT: lis r3, 152
4835 ; CHECK-P9-NEXT: ori r3, r3, 38428
4836 ; CHECK-P9-NEXT: stxsihx f0, 0, r3
4837 ; CHECK-P9-NEXT: blr
4839 ; CHECK-P8-LABEL: st_cst_align32_double_uint16_t:
4840 ; CHECK-P8: # %bb.0: # %entry
4841 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4842 ; CHECK-P8-NEXT: lis r4, 153
4843 ; CHECK-P8-NEXT: mffprwz r3, f0
4844 ; CHECK-P8-NEXT: sth r3, -27108(r4)
4845 ; CHECK-P8-NEXT: blr
4847 %conv = fptoui double %str to i16
4848 store i16 %conv, ptr inttoptr (i64 9999900 to ptr), align 4
4852 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4853 define dso_local void @st_cst_align64_double_uint16_t(double %str) {
4854 ; CHECK-P10-LABEL: st_cst_align64_double_uint16_t:
4855 ; CHECK-P10: # %bb.0: # %entry
4856 ; CHECK-P10-NEXT: xscvdpuxds f0, f1
4857 ; CHECK-P10-NEXT: pli r3, 244140625
4858 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
4859 ; CHECK-P10-NEXT: stxsihx f0, 0, r3
4860 ; CHECK-P10-NEXT: blr
4862 ; CHECK-P9-LABEL: st_cst_align64_double_uint16_t:
4863 ; CHECK-P9: # %bb.0: # %entry
4864 ; CHECK-P9-NEXT: xscvdpuxds f0, f1
4865 ; CHECK-P9-NEXT: lis r3, 3725
4866 ; CHECK-P9-NEXT: ori r3, r3, 19025
4867 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
4868 ; CHECK-P9-NEXT: stxsihx f0, 0, r3
4869 ; CHECK-P9-NEXT: blr
4871 ; CHECK-P8-LABEL: st_cst_align64_double_uint16_t:
4872 ; CHECK-P8: # %bb.0: # %entry
4873 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4874 ; CHECK-P8-NEXT: lis r4, 3725
4875 ; CHECK-P8-NEXT: ori r4, r4, 19025
4876 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
4877 ; CHECK-P8-NEXT: mffprwz r3, f0
4878 ; CHECK-P8-NEXT: sth r3, 0(r4)
4879 ; CHECK-P8-NEXT: blr
4881 %conv = fptoui double %str to i16
4882 store i16 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
4886 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4887 define dso_local void @st_0_double_int16_t(i64 %ptr, double %str) {
4888 ; CHECK-POSTP8-LABEL: st_0_double_int16_t:
4889 ; CHECK-POSTP8: # %bb.0: # %entry
4890 ; CHECK-POSTP8-NEXT: xscvdpsxds f0, f1
4891 ; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
4892 ; CHECK-POSTP8-NEXT: blr
4894 ; CHECK-P8-LABEL: st_0_double_int16_t:
4895 ; CHECK-P8: # %bb.0: # %entry
4896 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4897 ; CHECK-P8-NEXT: mffprwz r4, f0
4898 ; CHECK-P8-NEXT: sth r4, 0(r3)
4899 ; CHECK-P8-NEXT: blr
4901 %conv = fptosi double %str to i16
4902 %0 = inttoptr i64 %ptr to ptr
4903 store i16 %conv, ptr %0, align 2
4907 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4908 define dso_local void @st_align16_double_int16_t(ptr nocapture %ptr, double %str) {
4909 ; CHECK-POSTP8-LABEL: st_align16_double_int16_t:
4910 ; CHECK-POSTP8: # %bb.0: # %entry
4911 ; CHECK-POSTP8-NEXT: xscvdpsxds f0, f1
4912 ; CHECK-POSTP8-NEXT: addi r3, r3, 8
4913 ; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
4914 ; CHECK-POSTP8-NEXT: blr
4916 ; CHECK-P8-LABEL: st_align16_double_int16_t:
4917 ; CHECK-P8: # %bb.0: # %entry
4918 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4919 ; CHECK-P8-NEXT: mffprwz r4, f0
4920 ; CHECK-P8-NEXT: sth r4, 8(r3)
4921 ; CHECK-P8-NEXT: blr
4923 %conv = fptosi double %str to i16
4924 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
4925 store i16 %conv, ptr %add.ptr, align 2
4929 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4930 define dso_local void @st_align32_double_int16_t(ptr nocapture %ptr, double %str) {
4931 ; CHECK-P10-LABEL: st_align32_double_int16_t:
4932 ; CHECK-P10: # %bb.0: # %entry
4933 ; CHECK-P10-NEXT: xscvdpsxds f0, f1
4934 ; CHECK-P10-NEXT: pli r4, 99999000
4935 ; CHECK-P10-NEXT: stxsihx f0, r3, r4
4936 ; CHECK-P10-NEXT: blr
4938 ; CHECK-P9-LABEL: st_align32_double_int16_t:
4939 ; CHECK-P9: # %bb.0: # %entry
4940 ; CHECK-P9-NEXT: xscvdpsxds f0, f1
4941 ; CHECK-P9-NEXT: lis r4, 1525
4942 ; CHECK-P9-NEXT: ori r4, r4, 56600
4943 ; CHECK-P9-NEXT: stxsihx f0, r3, r4
4944 ; CHECK-P9-NEXT: blr
4946 ; CHECK-P8-LABEL: st_align32_double_int16_t:
4947 ; CHECK-P8: # %bb.0: # %entry
4948 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4949 ; CHECK-P8-NEXT: lis r5, 1525
4950 ; CHECK-P8-NEXT: ori r5, r5, 56600
4951 ; CHECK-P8-NEXT: mffprwz r4, f0
4952 ; CHECK-P8-NEXT: sthx r4, r3, r5
4953 ; CHECK-P8-NEXT: blr
4955 %conv = fptosi double %str to i16
4956 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
4957 store i16 %conv, ptr %add.ptr, align 2
4961 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4962 define dso_local void @st_align64_double_int16_t(ptr nocapture %ptr, double %str) {
4963 ; CHECK-P10-LABEL: st_align64_double_int16_t:
4964 ; CHECK-P10: # %bb.0: # %entry
4965 ; CHECK-P10-NEXT: xscvdpsxds f0, f1
4966 ; CHECK-P10-NEXT: pli r4, 244140625
4967 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
4968 ; CHECK-P10-NEXT: stxsihx f0, r3, r4
4969 ; CHECK-P10-NEXT: blr
4971 ; CHECK-P9-LABEL: st_align64_double_int16_t:
4972 ; CHECK-P9: # %bb.0: # %entry
4973 ; CHECK-P9-NEXT: xscvdpsxds f0, f1
4974 ; CHECK-P9-NEXT: lis r4, 3725
4975 ; CHECK-P9-NEXT: ori r4, r4, 19025
4976 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
4977 ; CHECK-P9-NEXT: stxsihx f0, r3, r4
4978 ; CHECK-P9-NEXT: blr
4980 ; CHECK-P8-LABEL: st_align64_double_int16_t:
4981 ; CHECK-P8: # %bb.0: # %entry
4982 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4983 ; CHECK-P8-NEXT: lis r5, 3725
4984 ; CHECK-P8-NEXT: ori r5, r5, 19025
4985 ; CHECK-P8-NEXT: rldic r5, r5, 12, 24
4986 ; CHECK-P8-NEXT: mffprwz r4, f0
4987 ; CHECK-P8-NEXT: sthx r4, r3, r5
4988 ; CHECK-P8-NEXT: blr
4990 %conv = fptosi double %str to i16
4991 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
4992 store i16 %conv, ptr %add.ptr, align 2
4996 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4997 define dso_local void @st_reg_double_int16_t(ptr nocapture %ptr, i64 %off, double %str) {
4998 ; CHECK-POSTP8-LABEL: st_reg_double_int16_t:
4999 ; CHECK-POSTP8: # %bb.0: # %entry
5000 ; CHECK-POSTP8-NEXT: xscvdpsxds f0, f1
5001 ; CHECK-POSTP8-NEXT: stxsihx f0, r3, r4
5002 ; CHECK-POSTP8-NEXT: blr
5004 ; CHECK-P8-LABEL: st_reg_double_int16_t:
5005 ; CHECK-P8: # %bb.0: # %entry
5006 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
5007 ; CHECK-P8-NEXT: mffprwz r5, f0
5008 ; CHECK-P8-NEXT: sthx r5, r3, r4
5009 ; CHECK-P8-NEXT: blr
5011 %conv = fptosi double %str to i16
5012 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
5013 store i16 %conv, ptr %add.ptr, align 2
5017 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5018 define dso_local void @st_or1_double_int16_t(i64 %ptr, i8 zeroext %off, double %str) {
5019 ; CHECK-POSTP8-LABEL: st_or1_double_int16_t:
5020 ; CHECK-POSTP8: # %bb.0: # %entry
5021 ; CHECK-POSTP8-NEXT: xscvdpsxds f0, f1
5022 ; CHECK-POSTP8-NEXT: or r3, r4, r3
5023 ; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
5024 ; CHECK-POSTP8-NEXT: blr
5026 ; CHECK-P8-LABEL: st_or1_double_int16_t:
5027 ; CHECK-P8: # %bb.0: # %entry
5028 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
5029 ; CHECK-P8-NEXT: or r3, r4, r3
5030 ; CHECK-P8-NEXT: mffprwz r5, f0
5031 ; CHECK-P8-NEXT: sth r5, 0(r3)
5032 ; CHECK-P8-NEXT: blr
5034 %conv = fptosi double %str to i16
5035 %conv1 = zext i8 %off to i64
5036 %or = or i64 %conv1, %ptr
5037 %0 = inttoptr i64 %or to ptr
5038 store i16 %conv, ptr %0, align 2
5042 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5043 define dso_local void @st_not_disjoint16_double_int16_t(i64 %ptr, double %str) {
5044 ; CHECK-POSTP8-LABEL: st_not_disjoint16_double_int16_t:
5045 ; CHECK-POSTP8: # %bb.0: # %entry
5046 ; CHECK-POSTP8-NEXT: xscvdpsxds f0, f1
5047 ; CHECK-POSTP8-NEXT: ori r3, r3, 6
5048 ; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
5049 ; CHECK-POSTP8-NEXT: blr
5051 ; CHECK-P8-LABEL: st_not_disjoint16_double_int16_t:
5052 ; CHECK-P8: # %bb.0: # %entry
5053 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
5054 ; CHECK-P8-NEXT: ori r3, r3, 6
5055 ; CHECK-P8-NEXT: mffprwz r4, f0
5056 ; CHECK-P8-NEXT: sth r4, 0(r3)
5057 ; CHECK-P8-NEXT: blr
5059 %conv = fptosi double %str to i16
5060 %or = or i64 %ptr, 6
5061 %0 = inttoptr i64 %or to ptr
5062 store i16 %conv, ptr %0, align 2
5066 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5067 define dso_local void @st_disjoint_align16_double_int16_t(i64 %ptr, double %str) {
5068 ; CHECK-POSTP8-LABEL: st_disjoint_align16_double_int16_t:
5069 ; CHECK-POSTP8: # %bb.0: # %entry
5070 ; CHECK-POSTP8-NEXT: xscvdpsxds f0, f1
5071 ; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
5072 ; CHECK-POSTP8-NEXT: ori r3, r3, 24
5073 ; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
5074 ; CHECK-POSTP8-NEXT: blr
5076 ; CHECK-P8-LABEL: st_disjoint_align16_double_int16_t:
5077 ; CHECK-P8: # %bb.0: # %entry
5078 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
5079 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
5080 ; CHECK-P8-NEXT: mffprwz r4, f0
5081 ; CHECK-P8-NEXT: sth r4, 24(r3)
5082 ; CHECK-P8-NEXT: blr
5084 %and = and i64 %ptr, -4096
5085 %conv = fptosi double %str to i16
5086 %or = or i64 %and, 24
5087 %0 = inttoptr i64 %or to ptr
5088 store i16 %conv, ptr %0, align 8
5092 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5093 define dso_local void @st_not_disjoint32_double_int16_t(i64 %ptr, double %str) {
5094 ; CHECK-POSTP8-LABEL: st_not_disjoint32_double_int16_t:
5095 ; CHECK-POSTP8: # %bb.0: # %entry
5096 ; CHECK-POSTP8-NEXT: xscvdpsxds f0, f1
5097 ; CHECK-POSTP8-NEXT: ori r3, r3, 34463
5098 ; CHECK-POSTP8-NEXT: oris r3, r3, 1
5099 ; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
5100 ; CHECK-POSTP8-NEXT: blr
5102 ; CHECK-P8-LABEL: st_not_disjoint32_double_int16_t:
5103 ; CHECK-P8: # %bb.0: # %entry
5104 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
5105 ; CHECK-P8-NEXT: ori r3, r3, 34463
5106 ; CHECK-P8-NEXT: oris r3, r3, 1
5107 ; CHECK-P8-NEXT: mffprwz r4, f0
5108 ; CHECK-P8-NEXT: sth r4, 0(r3)
5109 ; CHECK-P8-NEXT: blr
5111 %conv = fptosi double %str to i16
5112 %or = or i64 %ptr, 99999
5113 %0 = inttoptr i64 %or to ptr
5114 store i16 %conv, ptr %0, align 2
5118 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5119 define dso_local void @st_disjoint_align32_double_int16_t(i64 %ptr, double %str) {
5120 ; CHECK-P10-LABEL: st_disjoint_align32_double_int16_t:
5121 ; CHECK-P10: # %bb.0: # %entry
5122 ; CHECK-P10-NEXT: xscvdpsxds f0, f1
5123 ; CHECK-P10-NEXT: lis r4, -15264
5124 ; CHECK-P10-NEXT: and r3, r3, r4
5125 ; CHECK-P10-NEXT: pli r4, 999990000
5126 ; CHECK-P10-NEXT: stxsihx f0, r3, r4
5127 ; CHECK-P10-NEXT: blr
5129 ; CHECK-P9-LABEL: st_disjoint_align32_double_int16_t:
5130 ; CHECK-P9: # %bb.0: # %entry
5131 ; CHECK-P9-NEXT: xscvdpsxds f0, f1
5132 ; CHECK-P9-NEXT: lis r4, -15264
5133 ; CHECK-P9-NEXT: and r3, r3, r4
5134 ; CHECK-P9-NEXT: lis r4, 15258
5135 ; CHECK-P9-NEXT: ori r4, r4, 41712
5136 ; CHECK-P9-NEXT: stxsihx f0, r3, r4
5137 ; CHECK-P9-NEXT: blr
5139 ; CHECK-P8-LABEL: st_disjoint_align32_double_int16_t:
5140 ; CHECK-P8: # %bb.0: # %entry
5141 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
5142 ; CHECK-P8-NEXT: lis r4, -15264
5143 ; CHECK-P8-NEXT: lis r5, 15258
5144 ; CHECK-P8-NEXT: and r3, r3, r4
5145 ; CHECK-P8-NEXT: ori r5, r5, 41712
5146 ; CHECK-P8-NEXT: mffprwz r4, f0
5147 ; CHECK-P8-NEXT: sthx r4, r3, r5
5148 ; CHECK-P8-NEXT: blr
5150 %and = and i64 %ptr, -1000341504
5151 %conv = fptosi double %str to i16
5152 %or = or i64 %and, 999990000
5153 %0 = inttoptr i64 %or to ptr
5154 store i16 %conv, ptr %0, align 16
5158 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5159 define dso_local void @st_not_disjoint64_double_int16_t(i64 %ptr, double %str) {
5160 ; CHECK-P10-LABEL: st_not_disjoint64_double_int16_t:
5161 ; CHECK-P10: # %bb.0: # %entry
5162 ; CHECK-P10-NEXT: xscvdpsxds f0, f1
5163 ; CHECK-P10-NEXT: pli r4, 232
5164 ; CHECK-P10-NEXT: pli r5, 3567587329
5165 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
5166 ; CHECK-P10-NEXT: or r3, r3, r5
5167 ; CHECK-P10-NEXT: stxsihx f0, 0, r3
5168 ; CHECK-P10-NEXT: blr
5170 ; CHECK-P9-LABEL: st_not_disjoint64_double_int16_t:
5171 ; CHECK-P9: # %bb.0: # %entry
5172 ; CHECK-P9-NEXT: li r4, 29
5173 ; CHECK-P9-NEXT: xscvdpsxds f0, f1
5174 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
5175 ; CHECK-P9-NEXT: oris r4, r4, 54437
5176 ; CHECK-P9-NEXT: ori r4, r4, 4097
5177 ; CHECK-P9-NEXT: or r3, r3, r4
5178 ; CHECK-P9-NEXT: stxsihx f0, 0, r3
5179 ; CHECK-P9-NEXT: blr
5181 ; CHECK-P8-LABEL: st_not_disjoint64_double_int16_t:
5182 ; CHECK-P8: # %bb.0: # %entry
5183 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
5184 ; CHECK-P8-NEXT: li r5, 29
5185 ; CHECK-P8-NEXT: rldic r5, r5, 35, 24
5186 ; CHECK-P8-NEXT: oris r5, r5, 54437
5187 ; CHECK-P8-NEXT: mffprwz r4, f0
5188 ; CHECK-P8-NEXT: ori r5, r5, 4097
5189 ; CHECK-P8-NEXT: or r3, r3, r5
5190 ; CHECK-P8-NEXT: sth r4, 0(r3)
5191 ; CHECK-P8-NEXT: blr
5193 %conv = fptosi double %str to i16
5194 %or = or i64 %ptr, 1000000000001
5195 %0 = inttoptr i64 %or to ptr
5196 store i16 %conv, ptr %0, align 2
5200 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5201 define dso_local void @st_disjoint_align64_double_int16_t(i64 %ptr, double %str) {
5202 ; CHECK-P10-LABEL: st_disjoint_align64_double_int16_t:
5203 ; CHECK-P10: # %bb.0: # %entry
5204 ; CHECK-P10-NEXT: xscvdpsxds f0, f1
5205 ; CHECK-P10-NEXT: pli r4, 244140625
5206 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
5207 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5208 ; CHECK-P10-NEXT: stxsihx f0, r3, r4
5209 ; CHECK-P10-NEXT: blr
5211 ; CHECK-P9-LABEL: st_disjoint_align64_double_int16_t:
5212 ; CHECK-P9: # %bb.0: # %entry
5213 ; CHECK-P9-NEXT: xscvdpsxds f0, f1
5214 ; CHECK-P9-NEXT: lis r4, 3725
5215 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
5216 ; CHECK-P9-NEXT: ori r4, r4, 19025
5217 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
5218 ; CHECK-P9-NEXT: stxsihx f0, r3, r4
5219 ; CHECK-P9-NEXT: blr
5221 ; CHECK-P8-LABEL: st_disjoint_align64_double_int16_t:
5222 ; CHECK-P8: # %bb.0: # %entry
5223 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
5224 ; CHECK-P8-NEXT: lis r5, 3725
5225 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
5226 ; CHECK-P8-NEXT: ori r5, r5, 19025
5227 ; CHECK-P8-NEXT: rldic r5, r5, 12, 24
5228 ; CHECK-P8-NEXT: mffprwz r4, f0
5229 ; CHECK-P8-NEXT: sthx r4, r3, r5
5230 ; CHECK-P8-NEXT: blr
5232 %and = and i64 %ptr, -1099511627776
5233 %conv = fptosi double %str to i16
5234 %or = or i64 %and, 1000000000000
5235 %0 = inttoptr i64 %or to ptr
5236 store i16 %conv, ptr %0, align 4096
5240 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5241 define dso_local void @st_cst_align16_double_int16_t(double %str) {
5242 ; CHECK-POSTP8-LABEL: st_cst_align16_double_int16_t:
5243 ; CHECK-POSTP8: # %bb.0: # %entry
5244 ; CHECK-POSTP8-NEXT: xscvdpsxds f0, f1
5245 ; CHECK-POSTP8-NEXT: li r3, 4080
5246 ; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
5247 ; CHECK-POSTP8-NEXT: blr
5249 ; CHECK-P8-LABEL: st_cst_align16_double_int16_t:
5250 ; CHECK-P8: # %bb.0: # %entry
5251 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
5252 ; CHECK-P8-NEXT: mffprwz r3, f0
5253 ; CHECK-P8-NEXT: sth r3, 4080(0)
5254 ; CHECK-P8-NEXT: blr
5256 %conv = fptosi double %str to i16
5257 store i16 %conv, ptr inttoptr (i64 4080 to ptr), align 16
5261 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5262 define dso_local void @st_cst_align32_double_int16_t(double %str) {
5263 ; CHECK-P10-LABEL: st_cst_align32_double_int16_t:
5264 ; CHECK-P10: # %bb.0: # %entry
5265 ; CHECK-P10-NEXT: xscvdpsxds f0, f1
5266 ; CHECK-P10-NEXT: pli r3, 9999900
5267 ; CHECK-P10-NEXT: stxsihx f0, 0, r3
5268 ; CHECK-P10-NEXT: blr
5270 ; CHECK-P9-LABEL: st_cst_align32_double_int16_t:
5271 ; CHECK-P9: # %bb.0: # %entry
5272 ; CHECK-P9-NEXT: xscvdpsxds f0, f1
5273 ; CHECK-P9-NEXT: lis r3, 152
5274 ; CHECK-P9-NEXT: ori r3, r3, 38428
5275 ; CHECK-P9-NEXT: stxsihx f0, 0, r3
5276 ; CHECK-P9-NEXT: blr
5278 ; CHECK-P8-LABEL: st_cst_align32_double_int16_t:
5279 ; CHECK-P8: # %bb.0: # %entry
5280 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
5281 ; CHECK-P8-NEXT: lis r4, 153
5282 ; CHECK-P8-NEXT: mffprwz r3, f0
5283 ; CHECK-P8-NEXT: sth r3, -27108(r4)
5284 ; CHECK-P8-NEXT: blr
5286 %conv = fptosi double %str to i16
5287 store i16 %conv, ptr inttoptr (i64 9999900 to ptr), align 4
5291 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5292 define dso_local void @st_cst_align64_double_int16_t(double %str) {
5293 ; CHECK-P10-LABEL: st_cst_align64_double_int16_t:
5294 ; CHECK-P10: # %bb.0: # %entry
5295 ; CHECK-P10-NEXT: xscvdpsxds f0, f1
5296 ; CHECK-P10-NEXT: pli r3, 244140625
5297 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
5298 ; CHECK-P10-NEXT: stxsihx f0, 0, r3
5299 ; CHECK-P10-NEXT: blr
5301 ; CHECK-P9-LABEL: st_cst_align64_double_int16_t:
5302 ; CHECK-P9: # %bb.0: # %entry
5303 ; CHECK-P9-NEXT: xscvdpsxds f0, f1
5304 ; CHECK-P9-NEXT: lis r3, 3725
5305 ; CHECK-P9-NEXT: ori r3, r3, 19025
5306 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
5307 ; CHECK-P9-NEXT: stxsihx f0, 0, r3
5308 ; CHECK-P9-NEXT: blr
5310 ; CHECK-P8-LABEL: st_cst_align64_double_int16_t:
5311 ; CHECK-P8: # %bb.0: # %entry
5312 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
5313 ; CHECK-P8-NEXT: lis r4, 3725
5314 ; CHECK-P8-NEXT: ori r4, r4, 19025
5315 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
5316 ; CHECK-P8-NEXT: mffprwz r3, f0
5317 ; CHECK-P8-NEXT: sth r3, 0(r4)
5318 ; CHECK-P8-NEXT: blr
5320 %conv = fptosi double %str to i16
5321 store i16 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
5325 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5326 define dso_local void @st_0_double_uint32_t(i64 %ptr, double %str) {
5327 ; CHECK-LABEL: st_0_double_uint32_t:
5328 ; CHECK: # %bb.0: # %entry
5329 ; CHECK-NEXT: xscvdpuxws f0, f1
5330 ; CHECK-NEXT: stfiwx f0, 0, r3
5333 %conv = fptoui double %str to i32
5334 %0 = inttoptr i64 %ptr to ptr
5335 store i32 %conv, ptr %0, align 4
5339 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5340 define dso_local void @st_align16_double_uint32_t(ptr nocapture %ptr, double %str) {
5341 ; CHECK-LABEL: st_align16_double_uint32_t:
5342 ; CHECK: # %bb.0: # %entry
5343 ; CHECK-NEXT: xscvdpuxws f0, f1
5344 ; CHECK-NEXT: addi r3, r3, 8
5345 ; CHECK-NEXT: stfiwx f0, 0, r3
5348 %conv = fptoui double %str to i32
5349 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
5350 store i32 %conv, ptr %add.ptr, align 4
5354 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5355 define dso_local void @st_align32_double_uint32_t(ptr nocapture %ptr, double %str) {
5356 ; CHECK-P10-LABEL: st_align32_double_uint32_t:
5357 ; CHECK-P10: # %bb.0: # %entry
5358 ; CHECK-P10-NEXT: xscvdpuxws f0, f1
5359 ; CHECK-P10-NEXT: pli r4, 99999000
5360 ; CHECK-P10-NEXT: stfiwx f0, r3, r4
5361 ; CHECK-P10-NEXT: blr
5363 ; CHECK-PREP10-LABEL: st_align32_double_uint32_t:
5364 ; CHECK-PREP10: # %bb.0: # %entry
5365 ; CHECK-PREP10-NEXT: xscvdpuxws f0, f1
5366 ; CHECK-PREP10-NEXT: lis r4, 1525
5367 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
5368 ; CHECK-PREP10-NEXT: stfiwx f0, r3, r4
5369 ; CHECK-PREP10-NEXT: blr
5371 %conv = fptoui double %str to i32
5372 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
5373 store i32 %conv, ptr %add.ptr, align 4
5377 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5378 define dso_local void @st_align64_double_uint32_t(ptr nocapture %ptr, double %str) {
5379 ; CHECK-P10-LABEL: st_align64_double_uint32_t:
5380 ; CHECK-P10: # %bb.0: # %entry
5381 ; CHECK-P10-NEXT: xscvdpuxws f0, f1
5382 ; CHECK-P10-NEXT: pli r4, 244140625
5383 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5384 ; CHECK-P10-NEXT: stfiwx f0, r3, r4
5385 ; CHECK-P10-NEXT: blr
5387 ; CHECK-PREP10-LABEL: st_align64_double_uint32_t:
5388 ; CHECK-PREP10: # %bb.0: # %entry
5389 ; CHECK-PREP10-NEXT: xscvdpuxws f0, f1
5390 ; CHECK-PREP10-NEXT: lis r4, 3725
5391 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
5392 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
5393 ; CHECK-PREP10-NEXT: stfiwx f0, r3, r4
5394 ; CHECK-PREP10-NEXT: blr
5396 %conv = fptoui double %str to i32
5397 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
5398 store i32 %conv, ptr %add.ptr, align 4
5402 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5403 define dso_local void @st_reg_double_uint32_t(ptr nocapture %ptr, i64 %off, double %str) {
5404 ; CHECK-LABEL: st_reg_double_uint32_t:
5405 ; CHECK: # %bb.0: # %entry
5406 ; CHECK-NEXT: xscvdpuxws f0, f1
5407 ; CHECK-NEXT: stfiwx f0, r3, r4
5410 %conv = fptoui double %str to i32
5411 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
5412 store i32 %conv, ptr %add.ptr, align 4
5416 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5417 define dso_local void @st_or1_double_uint32_t(i64 %ptr, i8 zeroext %off, double %str) {
5418 ; CHECK-LABEL: st_or1_double_uint32_t:
5419 ; CHECK: # %bb.0: # %entry
5420 ; CHECK-NEXT: xscvdpuxws f0, f1
5421 ; CHECK-NEXT: or r3, r4, r3
5422 ; CHECK-NEXT: stfiwx f0, 0, r3
5425 %conv = fptoui double %str to i32
5426 %conv1 = zext i8 %off to i64
5427 %or = or i64 %conv1, %ptr
5428 %0 = inttoptr i64 %or to ptr
5429 store i32 %conv, ptr %0, align 4
5433 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5434 define dso_local void @st_not_disjoint16_double_uint32_t(i64 %ptr, double %str) {
5435 ; CHECK-LABEL: st_not_disjoint16_double_uint32_t:
5436 ; CHECK: # %bb.0: # %entry
5437 ; CHECK-NEXT: xscvdpuxws f0, f1
5438 ; CHECK-NEXT: ori r3, r3, 6
5439 ; CHECK-NEXT: stfiwx f0, 0, r3
5442 %conv = fptoui double %str to i32
5443 %or = or i64 %ptr, 6
5444 %0 = inttoptr i64 %or to ptr
5445 store i32 %conv, ptr %0, align 4
5449 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5450 define dso_local void @st_disjoint_align16_double_uint32_t(i64 %ptr, double %str) {
5451 ; CHECK-LABEL: st_disjoint_align16_double_uint32_t:
5452 ; CHECK: # %bb.0: # %entry
5453 ; CHECK-NEXT: xscvdpuxws f0, f1
5454 ; CHECK-NEXT: rldicr r3, r3, 0, 51
5455 ; CHECK-NEXT: ori r3, r3, 24
5456 ; CHECK-NEXT: stfiwx f0, 0, r3
5459 %and = and i64 %ptr, -4096
5460 %conv = fptoui double %str to i32
5461 %or = or i64 %and, 24
5462 %0 = inttoptr i64 %or to ptr
5463 store i32 %conv, ptr %0, align 8
5467 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5468 define dso_local void @st_not_disjoint32_double_uint32_t(i64 %ptr, double %str) {
5469 ; CHECK-LABEL: st_not_disjoint32_double_uint32_t:
5470 ; CHECK: # %bb.0: # %entry
5471 ; CHECK-NEXT: xscvdpuxws f0, f1
5472 ; CHECK-NEXT: ori r3, r3, 34463
5473 ; CHECK-NEXT: oris r3, r3, 1
5474 ; CHECK-NEXT: stfiwx f0, 0, r3
5477 %conv = fptoui double %str to i32
5478 %or = or i64 %ptr, 99999
5479 %0 = inttoptr i64 %or to ptr
5480 store i32 %conv, ptr %0, align 4
5484 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5485 define dso_local void @st_disjoint_align32_double_uint32_t(i64 %ptr, double %str) {
5486 ; CHECK-P10-LABEL: st_disjoint_align32_double_uint32_t:
5487 ; CHECK-P10: # %bb.0: # %entry
5488 ; CHECK-P10-NEXT: xscvdpuxws f0, f1
5489 ; CHECK-P10-NEXT: lis r4, -15264
5490 ; CHECK-P10-NEXT: and r3, r3, r4
5491 ; CHECK-P10-NEXT: pli r4, 999990000
5492 ; CHECK-P10-NEXT: stfiwx f0, r3, r4
5493 ; CHECK-P10-NEXT: blr
5495 ; CHECK-P9-LABEL: st_disjoint_align32_double_uint32_t:
5496 ; CHECK-P9: # %bb.0: # %entry
5497 ; CHECK-P9-NEXT: xscvdpuxws f0, f1
5498 ; CHECK-P9-NEXT: lis r4, -15264
5499 ; CHECK-P9-NEXT: and r3, r3, r4
5500 ; CHECK-P9-NEXT: lis r4, 15258
5501 ; CHECK-P9-NEXT: ori r4, r4, 41712
5502 ; CHECK-P9-NEXT: stfiwx f0, r3, r4
5503 ; CHECK-P9-NEXT: blr
5505 ; CHECK-P8-LABEL: st_disjoint_align32_double_uint32_t:
5506 ; CHECK-P8: # %bb.0: # %entry
5507 ; CHECK-P8-NEXT: lis r4, -15264
5508 ; CHECK-P8-NEXT: xscvdpuxws f0, f1
5509 ; CHECK-P8-NEXT: and r3, r3, r4
5510 ; CHECK-P8-NEXT: lis r4, 15258
5511 ; CHECK-P8-NEXT: ori r4, r4, 41712
5512 ; CHECK-P8-NEXT: stfiwx f0, r3, r4
5513 ; CHECK-P8-NEXT: blr
5515 %and = and i64 %ptr, -1000341504
5516 %conv = fptoui double %str to i32
5517 %or = or i64 %and, 999990000
5518 %0 = inttoptr i64 %or to ptr
5519 store i32 %conv, ptr %0, align 16
5523 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5524 define dso_local void @st_not_disjoint64_double_uint32_t(i64 %ptr, double %str) {
5525 ; CHECK-P10-LABEL: st_not_disjoint64_double_uint32_t:
5526 ; CHECK-P10: # %bb.0: # %entry
5527 ; CHECK-P10-NEXT: xscvdpuxws f0, f1
5528 ; CHECK-P10-NEXT: pli r4, 232
5529 ; CHECK-P10-NEXT: pli r5, 3567587329
5530 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
5531 ; CHECK-P10-NEXT: or r3, r3, r5
5532 ; CHECK-P10-NEXT: stfiwx f0, 0, r3
5533 ; CHECK-P10-NEXT: blr
5535 ; CHECK-PREP10-LABEL: st_not_disjoint64_double_uint32_t:
5536 ; CHECK-PREP10: # %bb.0: # %entry
5537 ; CHECK-PREP10-NEXT: li r4, 29
5538 ; CHECK-PREP10-NEXT: xscvdpuxws f0, f1
5539 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
5540 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
5541 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
5542 ; CHECK-PREP10-NEXT: or r3, r3, r4
5543 ; CHECK-PREP10-NEXT: stfiwx f0, 0, r3
5544 ; CHECK-PREP10-NEXT: blr
5546 %conv = fptoui double %str to i32
5547 %or = or i64 %ptr, 1000000000001
5548 %0 = inttoptr i64 %or to ptr
5549 store i32 %conv, ptr %0, align 4
5553 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5554 define dso_local void @st_disjoint_align64_double_uint32_t(i64 %ptr, double %str) {
5555 ; CHECK-P10-LABEL: st_disjoint_align64_double_uint32_t:
5556 ; CHECK-P10: # %bb.0: # %entry
5557 ; CHECK-P10-NEXT: xscvdpuxws f0, f1
5558 ; CHECK-P10-NEXT: pli r4, 244140625
5559 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
5560 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5561 ; CHECK-P10-NEXT: stfiwx f0, r3, r4
5562 ; CHECK-P10-NEXT: blr
5564 ; CHECK-PREP10-LABEL: st_disjoint_align64_double_uint32_t:
5565 ; CHECK-PREP10: # %bb.0: # %entry
5566 ; CHECK-PREP10-NEXT: xscvdpuxws f0, f1
5567 ; CHECK-PREP10-NEXT: lis r4, 3725
5568 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
5569 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
5570 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
5571 ; CHECK-PREP10-NEXT: stfiwx f0, r3, r4
5572 ; CHECK-PREP10-NEXT: blr
5574 %and = and i64 %ptr, -1099511627776
5575 %conv = fptoui double %str to i32
5576 %or = or i64 %and, 1000000000000
5577 %0 = inttoptr i64 %or to ptr
5578 store i32 %conv, ptr %0, align 4096
5582 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5583 define dso_local void @st_cst_align16_double_uint32_t(double %str) {
5584 ; CHECK-LABEL: st_cst_align16_double_uint32_t:
5585 ; CHECK: # %bb.0: # %entry
5586 ; CHECK-NEXT: xscvdpuxws f0, f1
5587 ; CHECK-NEXT: li r3, 4080
5588 ; CHECK-NEXT: stfiwx f0, 0, r3
5591 %conv = fptoui double %str to i32
5592 store i32 %conv, ptr inttoptr (i64 4080 to ptr), align 16
5596 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5597 define dso_local void @st_cst_align32_double_uint32_t(double %str) {
5598 ; CHECK-P10-LABEL: st_cst_align32_double_uint32_t:
5599 ; CHECK-P10: # %bb.0: # %entry
5600 ; CHECK-P10-NEXT: xscvdpuxws f0, f1
5601 ; CHECK-P10-NEXT: pli r3, 9999900
5602 ; CHECK-P10-NEXT: stfiwx f0, 0, r3
5603 ; CHECK-P10-NEXT: blr
5605 ; CHECK-PREP10-LABEL: st_cst_align32_double_uint32_t:
5606 ; CHECK-PREP10: # %bb.0: # %entry
5607 ; CHECK-PREP10-NEXT: xscvdpuxws f0, f1
5608 ; CHECK-PREP10-NEXT: lis r3, 152
5609 ; CHECK-PREP10-NEXT: ori r3, r3, 38428
5610 ; CHECK-PREP10-NEXT: stfiwx f0, 0, r3
5611 ; CHECK-PREP10-NEXT: blr
5613 %conv = fptoui double %str to i32
5614 store i32 %conv, ptr inttoptr (i64 9999900 to ptr), align 4
5618 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5619 define dso_local void @st_cst_align64_double_uint32_t(double %str) {
5620 ; CHECK-P10-LABEL: st_cst_align64_double_uint32_t:
5621 ; CHECK-P10: # %bb.0: # %entry
5622 ; CHECK-P10-NEXT: xscvdpuxws f0, f1
5623 ; CHECK-P10-NEXT: pli r3, 244140625
5624 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
5625 ; CHECK-P10-NEXT: stfiwx f0, 0, r3
5626 ; CHECK-P10-NEXT: blr
5628 ; CHECK-PREP10-LABEL: st_cst_align64_double_uint32_t:
5629 ; CHECK-PREP10: # %bb.0: # %entry
5630 ; CHECK-PREP10-NEXT: xscvdpuxws f0, f1
5631 ; CHECK-PREP10-NEXT: lis r3, 3725
5632 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
5633 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
5634 ; CHECK-PREP10-NEXT: stfiwx f0, 0, r3
5635 ; CHECK-PREP10-NEXT: blr
5637 %conv = fptoui double %str to i32
5638 store i32 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
5642 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5643 define dso_local void @st_0_double_int32_t(i64 %ptr, double %str) {
5644 ; CHECK-LABEL: st_0_double_int32_t:
5645 ; CHECK: # %bb.0: # %entry
5646 ; CHECK-NEXT: xscvdpsxws f0, f1
5647 ; CHECK-NEXT: stfiwx f0, 0, r3
5650 %conv = fptosi double %str to i32
5651 %0 = inttoptr i64 %ptr to ptr
5652 store i32 %conv, ptr %0, align 4
5656 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5657 define dso_local void @st_align16_double_int32_t(ptr nocapture %ptr, double %str) {
5658 ; CHECK-LABEL: st_align16_double_int32_t:
5659 ; CHECK: # %bb.0: # %entry
5660 ; CHECK-NEXT: xscvdpsxws f0, f1
5661 ; CHECK-NEXT: addi r3, r3, 8
5662 ; CHECK-NEXT: stfiwx f0, 0, r3
5665 %conv = fptosi double %str to i32
5666 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
5667 store i32 %conv, ptr %add.ptr, align 4
5671 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5672 define dso_local void @st_align32_double_int32_t(ptr nocapture %ptr, double %str) {
5673 ; CHECK-P10-LABEL: st_align32_double_int32_t:
5674 ; CHECK-P10: # %bb.0: # %entry
5675 ; CHECK-P10-NEXT: xscvdpsxws f0, f1
5676 ; CHECK-P10-NEXT: pli r4, 99999000
5677 ; CHECK-P10-NEXT: stfiwx f0, r3, r4
5678 ; CHECK-P10-NEXT: blr
5680 ; CHECK-PREP10-LABEL: st_align32_double_int32_t:
5681 ; CHECK-PREP10: # %bb.0: # %entry
5682 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f1
5683 ; CHECK-PREP10-NEXT: lis r4, 1525
5684 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
5685 ; CHECK-PREP10-NEXT: stfiwx f0, r3, r4
5686 ; CHECK-PREP10-NEXT: blr
5688 %conv = fptosi double %str to i32
5689 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
5690 store i32 %conv, ptr %add.ptr, align 4
5694 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5695 define dso_local void @st_align64_double_int32_t(ptr nocapture %ptr, double %str) {
5696 ; CHECK-P10-LABEL: st_align64_double_int32_t:
5697 ; CHECK-P10: # %bb.0: # %entry
5698 ; CHECK-P10-NEXT: xscvdpsxws f0, f1
5699 ; CHECK-P10-NEXT: pli r4, 244140625
5700 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5701 ; CHECK-P10-NEXT: stfiwx f0, r3, r4
5702 ; CHECK-P10-NEXT: blr
5704 ; CHECK-PREP10-LABEL: st_align64_double_int32_t:
5705 ; CHECK-PREP10: # %bb.0: # %entry
5706 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f1
5707 ; CHECK-PREP10-NEXT: lis r4, 3725
5708 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
5709 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
5710 ; CHECK-PREP10-NEXT: stfiwx f0, r3, r4
5711 ; CHECK-PREP10-NEXT: blr
5713 %conv = fptosi double %str to i32
5714 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
5715 store i32 %conv, ptr %add.ptr, align 4
5719 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5720 define dso_local void @st_reg_double_int32_t(ptr nocapture %ptr, i64 %off, double %str) {
5721 ; CHECK-LABEL: st_reg_double_int32_t:
5722 ; CHECK: # %bb.0: # %entry
5723 ; CHECK-NEXT: xscvdpsxws f0, f1
5724 ; CHECK-NEXT: stfiwx f0, r3, r4
5727 %conv = fptosi double %str to i32
5728 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
5729 store i32 %conv, ptr %add.ptr, align 4
5733 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5734 define dso_local void @st_or1_double_int32_t(i64 %ptr, i8 zeroext %off, double %str) {
5735 ; CHECK-LABEL: st_or1_double_int32_t:
5736 ; CHECK: # %bb.0: # %entry
5737 ; CHECK-NEXT: xscvdpsxws f0, f1
5738 ; CHECK-NEXT: or r3, r4, r3
5739 ; CHECK-NEXT: stfiwx f0, 0, r3
5742 %conv = fptosi double %str to i32
5743 %conv1 = zext i8 %off to i64
5744 %or = or i64 %conv1, %ptr
5745 %0 = inttoptr i64 %or to ptr
5746 store i32 %conv, ptr %0, align 4
5750 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5751 define dso_local void @st_not_disjoint16_double_int32_t(i64 %ptr, double %str) {
5752 ; CHECK-LABEL: st_not_disjoint16_double_int32_t:
5753 ; CHECK: # %bb.0: # %entry
5754 ; CHECK-NEXT: xscvdpsxws f0, f1
5755 ; CHECK-NEXT: ori r3, r3, 6
5756 ; CHECK-NEXT: stfiwx f0, 0, r3
5759 %conv = fptosi double %str to i32
5760 %or = or i64 %ptr, 6
5761 %0 = inttoptr i64 %or to ptr
5762 store i32 %conv, ptr %0, align 4
5766 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5767 define dso_local void @st_disjoint_align16_double_int32_t(i64 %ptr, double %str) {
5768 ; CHECK-LABEL: st_disjoint_align16_double_int32_t:
5769 ; CHECK: # %bb.0: # %entry
5770 ; CHECK-NEXT: xscvdpsxws f0, f1
5771 ; CHECK-NEXT: rldicr r3, r3, 0, 51
5772 ; CHECK-NEXT: ori r3, r3, 24
5773 ; CHECK-NEXT: stfiwx f0, 0, r3
5776 %and = and i64 %ptr, -4096
5777 %conv = fptosi double %str to i32
5778 %or = or i64 %and, 24
5779 %0 = inttoptr i64 %or to ptr
5780 store i32 %conv, ptr %0, align 8
5784 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5785 define dso_local void @st_not_disjoint32_double_int32_t(i64 %ptr, double %str) {
5786 ; CHECK-LABEL: st_not_disjoint32_double_int32_t:
5787 ; CHECK: # %bb.0: # %entry
5788 ; CHECK-NEXT: xscvdpsxws f0, f1
5789 ; CHECK-NEXT: ori r3, r3, 34463
5790 ; CHECK-NEXT: oris r3, r3, 1
5791 ; CHECK-NEXT: stfiwx f0, 0, r3
5794 %conv = fptosi double %str to i32
5795 %or = or i64 %ptr, 99999
5796 %0 = inttoptr i64 %or to ptr
5797 store i32 %conv, ptr %0, align 4
5801 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5802 define dso_local void @st_disjoint_align32_double_int32_t(i64 %ptr, double %str) {
5803 ; CHECK-P10-LABEL: st_disjoint_align32_double_int32_t:
5804 ; CHECK-P10: # %bb.0: # %entry
5805 ; CHECK-P10-NEXT: xscvdpsxws f0, f1
5806 ; CHECK-P10-NEXT: lis r4, -15264
5807 ; CHECK-P10-NEXT: and r3, r3, r4
5808 ; CHECK-P10-NEXT: pli r4, 999990000
5809 ; CHECK-P10-NEXT: stfiwx f0, r3, r4
5810 ; CHECK-P10-NEXT: blr
5812 ; CHECK-P9-LABEL: st_disjoint_align32_double_int32_t:
5813 ; CHECK-P9: # %bb.0: # %entry
5814 ; CHECK-P9-NEXT: xscvdpsxws f0, f1
5815 ; CHECK-P9-NEXT: lis r4, -15264
5816 ; CHECK-P9-NEXT: and r3, r3, r4
5817 ; CHECK-P9-NEXT: lis r4, 15258
5818 ; CHECK-P9-NEXT: ori r4, r4, 41712
5819 ; CHECK-P9-NEXT: stfiwx f0, r3, r4
5820 ; CHECK-P9-NEXT: blr
5822 ; CHECK-P8-LABEL: st_disjoint_align32_double_int32_t:
5823 ; CHECK-P8: # %bb.0: # %entry
5824 ; CHECK-P8-NEXT: lis r4, -15264
5825 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
5826 ; CHECK-P8-NEXT: and r3, r3, r4
5827 ; CHECK-P8-NEXT: lis r4, 15258
5828 ; CHECK-P8-NEXT: ori r4, r4, 41712
5829 ; CHECK-P8-NEXT: stfiwx f0, r3, r4
5830 ; CHECK-P8-NEXT: blr
5832 %and = and i64 %ptr, -1000341504
5833 %conv = fptosi double %str to i32
5834 %or = or i64 %and, 999990000
5835 %0 = inttoptr i64 %or to ptr
5836 store i32 %conv, ptr %0, align 16
5840 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5841 define dso_local void @st_not_disjoint64_double_int32_t(i64 %ptr, double %str) {
5842 ; CHECK-P10-LABEL: st_not_disjoint64_double_int32_t:
5843 ; CHECK-P10: # %bb.0: # %entry
5844 ; CHECK-P10-NEXT: xscvdpsxws f0, f1
5845 ; CHECK-P10-NEXT: pli r4, 232
5846 ; CHECK-P10-NEXT: pli r5, 3567587329
5847 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
5848 ; CHECK-P10-NEXT: or r3, r3, r5
5849 ; CHECK-P10-NEXT: stfiwx f0, 0, r3
5850 ; CHECK-P10-NEXT: blr
5852 ; CHECK-PREP10-LABEL: st_not_disjoint64_double_int32_t:
5853 ; CHECK-PREP10: # %bb.0: # %entry
5854 ; CHECK-PREP10-NEXT: li r4, 29
5855 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f1
5856 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
5857 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
5858 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
5859 ; CHECK-PREP10-NEXT: or r3, r3, r4
5860 ; CHECK-PREP10-NEXT: stfiwx f0, 0, r3
5861 ; CHECK-PREP10-NEXT: blr
5863 %conv = fptosi double %str to i32
5864 %or = or i64 %ptr, 1000000000001
5865 %0 = inttoptr i64 %or to ptr
5866 store i32 %conv, ptr %0, align 4
5870 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5871 define dso_local void @st_disjoint_align64_double_int32_t(i64 %ptr, double %str) {
5872 ; CHECK-P10-LABEL: st_disjoint_align64_double_int32_t:
5873 ; CHECK-P10: # %bb.0: # %entry
5874 ; CHECK-P10-NEXT: xscvdpsxws f0, f1
5875 ; CHECK-P10-NEXT: pli r4, 244140625
5876 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
5877 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5878 ; CHECK-P10-NEXT: stfiwx f0, r3, r4
5879 ; CHECK-P10-NEXT: blr
5881 ; CHECK-PREP10-LABEL: st_disjoint_align64_double_int32_t:
5882 ; CHECK-PREP10: # %bb.0: # %entry
5883 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f1
5884 ; CHECK-PREP10-NEXT: lis r4, 3725
5885 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
5886 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
5887 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
5888 ; CHECK-PREP10-NEXT: stfiwx f0, r3, r4
5889 ; CHECK-PREP10-NEXT: blr
5891 %and = and i64 %ptr, -1099511627776
5892 %conv = fptosi double %str to i32
5893 %or = or i64 %and, 1000000000000
5894 %0 = inttoptr i64 %or to ptr
5895 store i32 %conv, ptr %0, align 4096
5899 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5900 define dso_local void @st_cst_align16_double_int32_t(double %str) {
5901 ; CHECK-LABEL: st_cst_align16_double_int32_t:
5902 ; CHECK: # %bb.0: # %entry
5903 ; CHECK-NEXT: xscvdpsxws f0, f1
5904 ; CHECK-NEXT: li r3, 4080
5905 ; CHECK-NEXT: stfiwx f0, 0, r3
5908 %conv = fptosi double %str to i32
5909 store i32 %conv, ptr inttoptr (i64 4080 to ptr), align 16
5913 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5914 define dso_local void @st_cst_align32_double_int32_t(double %str) {
5915 ; CHECK-P10-LABEL: st_cst_align32_double_int32_t:
5916 ; CHECK-P10: # %bb.0: # %entry
5917 ; CHECK-P10-NEXT: xscvdpsxws f0, f1
5918 ; CHECK-P10-NEXT: pli r3, 9999900
5919 ; CHECK-P10-NEXT: stfiwx f0, 0, r3
5920 ; CHECK-P10-NEXT: blr
5922 ; CHECK-PREP10-LABEL: st_cst_align32_double_int32_t:
5923 ; CHECK-PREP10: # %bb.0: # %entry
5924 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f1
5925 ; CHECK-PREP10-NEXT: lis r3, 152
5926 ; CHECK-PREP10-NEXT: ori r3, r3, 38428
5927 ; CHECK-PREP10-NEXT: stfiwx f0, 0, r3
5928 ; CHECK-PREP10-NEXT: blr
5930 %conv = fptosi double %str to i32
5931 store i32 %conv, ptr inttoptr (i64 9999900 to ptr), align 4
5935 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5936 define dso_local void @st_cst_align64_double_int32_t(double %str) {
5937 ; CHECK-P10-LABEL: st_cst_align64_double_int32_t:
5938 ; CHECK-P10: # %bb.0: # %entry
5939 ; CHECK-P10-NEXT: xscvdpsxws f0, f1
5940 ; CHECK-P10-NEXT: pli r3, 244140625
5941 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
5942 ; CHECK-P10-NEXT: stfiwx f0, 0, r3
5943 ; CHECK-P10-NEXT: blr
5945 ; CHECK-PREP10-LABEL: st_cst_align64_double_int32_t:
5946 ; CHECK-PREP10: # %bb.0: # %entry
5947 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f1
5948 ; CHECK-PREP10-NEXT: lis r3, 3725
5949 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
5950 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
5951 ; CHECK-PREP10-NEXT: stfiwx f0, 0, r3
5952 ; CHECK-PREP10-NEXT: blr
5954 %conv = fptosi double %str to i32
5955 store i32 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
5959 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5960 define dso_local void @st_0_double_uint64_t(i64 %ptr, double %str) {
5961 ; CHECK-POSTP8-LABEL: st_0_double_uint64_t:
5962 ; CHECK-POSTP8: # %bb.0: # %entry
5963 ; CHECK-POSTP8-NEXT: xscvdpuxds v2, f1
5964 ; CHECK-POSTP8-NEXT: stxsd v2, 0(r3)
5965 ; CHECK-POSTP8-NEXT: blr
5967 ; CHECK-P8-LABEL: st_0_double_uint64_t:
5968 ; CHECK-P8: # %bb.0: # %entry
5969 ; CHECK-P8-NEXT: xscvdpuxds f0, f1
5970 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
5971 ; CHECK-P8-NEXT: blr
5973 %conv = fptoui double %str to i64
5974 %0 = inttoptr i64 %ptr to ptr
5975 store i64 %conv, ptr %0, align 8
5979 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5980 define dso_local void @st_align16_double_uint64_t(ptr nocapture %ptr, double %str) {
5981 ; CHECK-POSTP8-LABEL: st_align16_double_uint64_t:
5982 ; CHECK-POSTP8: # %bb.0: # %entry
5983 ; CHECK-POSTP8-NEXT: xscvdpuxds v2, f1
5984 ; CHECK-POSTP8-NEXT: stxsd v2, 8(r3)
5985 ; CHECK-POSTP8-NEXT: blr
5987 ; CHECK-P8-LABEL: st_align16_double_uint64_t:
5988 ; CHECK-P8: # %bb.0: # %entry
5989 ; CHECK-P8-NEXT: xscvdpuxds f0, f1
5990 ; CHECK-P8-NEXT: li r4, 8
5991 ; CHECK-P8-NEXT: stxsdx f0, r3, r4
5992 ; CHECK-P8-NEXT: blr
5994 %conv = fptoui double %str to i64
5995 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
5996 store i64 %conv, ptr %add.ptr, align 8
6000 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6001 define dso_local void @st_align32_double_uint64_t(ptr nocapture %ptr, double %str) {
6002 ; CHECK-P10-LABEL: st_align32_double_uint64_t:
6003 ; CHECK-P10: # %bb.0: # %entry
6004 ; CHECK-P10-NEXT: xscvdpuxds v2, f1
6005 ; CHECK-P10-NEXT: pstxsd v2, 99999000(r3), 0
6006 ; CHECK-P10-NEXT: blr
6008 ; CHECK-PREP10-LABEL: st_align32_double_uint64_t:
6009 ; CHECK-PREP10: # %bb.0: # %entry
6010 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f1
6011 ; CHECK-PREP10-NEXT: lis r4, 1525
6012 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
6013 ; CHECK-PREP10-NEXT: stxsdx f0, r3, r4
6014 ; CHECK-PREP10-NEXT: blr
6016 %conv = fptoui double %str to i64
6017 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
6018 store i64 %conv, ptr %add.ptr, align 8
6022 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6023 define dso_local void @st_align64_double_uint64_t(ptr nocapture %ptr, double %str) {
6024 ; CHECK-P10-LABEL: st_align64_double_uint64_t:
6025 ; CHECK-P10: # %bb.0: # %entry
6026 ; CHECK-P10-NEXT: xscvdpuxds f0, f1
6027 ; CHECK-P10-NEXT: pli r4, 244140625
6028 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6029 ; CHECK-P10-NEXT: stxsdx f0, r3, r4
6030 ; CHECK-P10-NEXT: blr
6032 ; CHECK-PREP10-LABEL: st_align64_double_uint64_t:
6033 ; CHECK-PREP10: # %bb.0: # %entry
6034 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f1
6035 ; CHECK-PREP10-NEXT: lis r4, 3725
6036 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
6037 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
6038 ; CHECK-PREP10-NEXT: stxsdx f0, r3, r4
6039 ; CHECK-PREP10-NEXT: blr
6041 %conv = fptoui double %str to i64
6042 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
6043 store i64 %conv, ptr %add.ptr, align 8
6047 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6048 define dso_local void @st_reg_double_uint64_t(ptr nocapture %ptr, i64 %off, double %str) {
6049 ; CHECK-LABEL: st_reg_double_uint64_t:
6050 ; CHECK: # %bb.0: # %entry
6051 ; CHECK-NEXT: xscvdpuxds f0, f1
6052 ; CHECK-NEXT: stxsdx f0, r3, r4
6055 %conv = fptoui double %str to i64
6056 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
6057 store i64 %conv, ptr %add.ptr, align 8
6061 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6062 define dso_local void @st_or1_double_uint64_t(i64 %ptr, i8 zeroext %off, double %str) {
6063 ; CHECK-POSTP8-LABEL: st_or1_double_uint64_t:
6064 ; CHECK-POSTP8: # %bb.0: # %entry
6065 ; CHECK-POSTP8-NEXT: xscvdpuxds v2, f1
6066 ; CHECK-POSTP8-NEXT: or r3, r4, r3
6067 ; CHECK-POSTP8-NEXT: stxsd v2, 0(r3)
6068 ; CHECK-POSTP8-NEXT: blr
6070 ; CHECK-P8-LABEL: st_or1_double_uint64_t:
6071 ; CHECK-P8: # %bb.0: # %entry
6072 ; CHECK-P8-NEXT: xscvdpuxds f0, f1
6073 ; CHECK-P8-NEXT: or r3, r4, r3
6074 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
6075 ; CHECK-P8-NEXT: blr
6077 %conv = fptoui double %str to i64
6078 %conv1 = zext i8 %off to i64
6079 %or = or i64 %conv1, %ptr
6080 %0 = inttoptr i64 %or to ptr
6081 store i64 %conv, ptr %0, align 8
6085 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6086 define dso_local void @st_not_disjoint16_double_uint64_t(i64 %ptr, double %str) {
6087 ; CHECK-POSTP8-LABEL: st_not_disjoint16_double_uint64_t:
6088 ; CHECK-POSTP8: # %bb.0: # %entry
6089 ; CHECK-POSTP8-NEXT: xscvdpuxds v2, f1
6090 ; CHECK-POSTP8-NEXT: ori r3, r3, 6
6091 ; CHECK-POSTP8-NEXT: stxsd v2, 0(r3)
6092 ; CHECK-POSTP8-NEXT: blr
6094 ; CHECK-P8-LABEL: st_not_disjoint16_double_uint64_t:
6095 ; CHECK-P8: # %bb.0: # %entry
6096 ; CHECK-P8-NEXT: xscvdpuxds f0, f1
6097 ; CHECK-P8-NEXT: ori r3, r3, 6
6098 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
6099 ; CHECK-P8-NEXT: blr
6101 %conv = fptoui double %str to i64
6102 %or = or i64 %ptr, 6
6103 %0 = inttoptr i64 %or to ptr
6104 store i64 %conv, ptr %0, align 8
6108 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6109 define dso_local void @st_disjoint_align16_double_uint64_t(i64 %ptr, double %str) {
6110 ; CHECK-POSTP8-LABEL: st_disjoint_align16_double_uint64_t:
6111 ; CHECK-POSTP8: # %bb.0: # %entry
6112 ; CHECK-POSTP8-NEXT: xscvdpuxds v2, f1
6113 ; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
6114 ; CHECK-POSTP8-NEXT: stxsd v2, 24(r3)
6115 ; CHECK-POSTP8-NEXT: blr
6117 ; CHECK-P8-LABEL: st_disjoint_align16_double_uint64_t:
6118 ; CHECK-P8: # %bb.0: # %entry
6119 ; CHECK-P8-NEXT: xscvdpuxds f0, f1
6120 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
6121 ; CHECK-P8-NEXT: ori r3, r3, 24
6122 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
6123 ; CHECK-P8-NEXT: blr
6125 %and = and i64 %ptr, -4096
6126 %conv = fptoui double %str to i64
6127 %or = or i64 %and, 24
6128 %0 = inttoptr i64 %or to ptr
6129 store i64 %conv, ptr %0, align 8
6133 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6134 define dso_local void @st_not_disjoint32_double_uint64_t(i64 %ptr, double %str) {
6135 ; CHECK-POSTP8-LABEL: st_not_disjoint32_double_uint64_t:
6136 ; CHECK-POSTP8: # %bb.0: # %entry
6137 ; CHECK-POSTP8-NEXT: xscvdpuxds v2, f1
6138 ; CHECK-POSTP8-NEXT: ori r3, r3, 34463
6139 ; CHECK-POSTP8-NEXT: oris r3, r3, 1
6140 ; CHECK-POSTP8-NEXT: stxsd v2, 0(r3)
6141 ; CHECK-POSTP8-NEXT: blr
6143 ; CHECK-P8-LABEL: st_not_disjoint32_double_uint64_t:
6144 ; CHECK-P8: # %bb.0: # %entry
6145 ; CHECK-P8-NEXT: xscvdpuxds f0, f1
6146 ; CHECK-P8-NEXT: ori r3, r3, 34463
6147 ; CHECK-P8-NEXT: oris r3, r3, 1
6148 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
6149 ; CHECK-P8-NEXT: blr
6151 %conv = fptoui double %str to i64
6152 %or = or i64 %ptr, 99999
6153 %0 = inttoptr i64 %or to ptr
6154 store i64 %conv, ptr %0, align 8
6158 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6159 define dso_local void @st_disjoint_align32_double_uint64_t(i64 %ptr, double %str) {
6160 ; CHECK-P10-LABEL: st_disjoint_align32_double_uint64_t:
6161 ; CHECK-P10: # %bb.0: # %entry
6162 ; CHECK-P10-NEXT: xscvdpuxds v2, f1
6163 ; CHECK-P10-NEXT: lis r4, -15264
6164 ; CHECK-P10-NEXT: and r3, r3, r4
6165 ; CHECK-P10-NEXT: pstxsd v2, 999990000(r3), 0
6166 ; CHECK-P10-NEXT: blr
6168 ; CHECK-P9-LABEL: st_disjoint_align32_double_uint64_t:
6169 ; CHECK-P9: # %bb.0: # %entry
6170 ; CHECK-P9-NEXT: xscvdpuxds f0, f1
6171 ; CHECK-P9-NEXT: lis r4, -15264
6172 ; CHECK-P9-NEXT: and r3, r3, r4
6173 ; CHECK-P9-NEXT: lis r4, 15258
6174 ; CHECK-P9-NEXT: ori r4, r4, 41712
6175 ; CHECK-P9-NEXT: stxsdx f0, r3, r4
6176 ; CHECK-P9-NEXT: blr
6178 ; CHECK-P8-LABEL: st_disjoint_align32_double_uint64_t:
6179 ; CHECK-P8: # %bb.0: # %entry
6180 ; CHECK-P8-NEXT: lis r4, -15264
6181 ; CHECK-P8-NEXT: xscvdpuxds f0, f1
6182 ; CHECK-P8-NEXT: and r3, r3, r4
6183 ; CHECK-P8-NEXT: lis r4, 15258
6184 ; CHECK-P8-NEXT: ori r4, r4, 41712
6185 ; CHECK-P8-NEXT: stxsdx f0, r3, r4
6186 ; CHECK-P8-NEXT: blr
6188 %and = and i64 %ptr, -1000341504
6189 %conv = fptoui double %str to i64
6190 %or = or i64 %and, 999990000
6191 %0 = inttoptr i64 %or to ptr
6192 store i64 %conv, ptr %0, align 16
6196 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6197 define dso_local void @st_not_disjoint64_double_uint64_t(i64 %ptr, double %str) {
6198 ; CHECK-P10-LABEL: st_not_disjoint64_double_uint64_t:
6199 ; CHECK-P10: # %bb.0: # %entry
6200 ; CHECK-P10-NEXT: xscvdpuxds v2, f1
6201 ; CHECK-P10-NEXT: pli r4, 232
6202 ; CHECK-P10-NEXT: pli r5, 3567587329
6203 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
6204 ; CHECK-P10-NEXT: or r3, r3, r5
6205 ; CHECK-P10-NEXT: stxsd v2, 0(r3)
6206 ; CHECK-P10-NEXT: blr
6208 ; CHECK-P9-LABEL: st_not_disjoint64_double_uint64_t:
6209 ; CHECK-P9: # %bb.0: # %entry
6210 ; CHECK-P9-NEXT: li r4, 29
6211 ; CHECK-P9-NEXT: xscvdpuxds v2, f1
6212 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
6213 ; CHECK-P9-NEXT: oris r4, r4, 54437
6214 ; CHECK-P9-NEXT: ori r4, r4, 4097
6215 ; CHECK-P9-NEXT: or r3, r3, r4
6216 ; CHECK-P9-NEXT: stxsd v2, 0(r3)
6217 ; CHECK-P9-NEXT: blr
6219 ; CHECK-P8-LABEL: st_not_disjoint64_double_uint64_t:
6220 ; CHECK-P8: # %bb.0: # %entry
6221 ; CHECK-P8-NEXT: li r4, 29
6222 ; CHECK-P8-NEXT: xscvdpuxds f0, f1
6223 ; CHECK-P8-NEXT: rldic r4, r4, 35, 24
6224 ; CHECK-P8-NEXT: oris r4, r4, 54437
6225 ; CHECK-P8-NEXT: ori r4, r4, 4097
6226 ; CHECK-P8-NEXT: or r3, r3, r4
6227 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
6228 ; CHECK-P8-NEXT: blr
6230 %conv = fptoui double %str to i64
6231 %or = or i64 %ptr, 1000000000001
6232 %0 = inttoptr i64 %or to ptr
6233 store i64 %conv, ptr %0, align 8
6237 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6238 define dso_local void @st_disjoint_align64_double_uint64_t(i64 %ptr, double %str) {
6239 ; CHECK-P10-LABEL: st_disjoint_align64_double_uint64_t:
6240 ; CHECK-P10: # %bb.0: # %entry
6241 ; CHECK-P10-NEXT: xscvdpuxds f0, f1
6242 ; CHECK-P10-NEXT: pli r4, 244140625
6243 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
6244 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6245 ; CHECK-P10-NEXT: stxsdx f0, r3, r4
6246 ; CHECK-P10-NEXT: blr
6248 ; CHECK-PREP10-LABEL: st_disjoint_align64_double_uint64_t:
6249 ; CHECK-PREP10: # %bb.0: # %entry
6250 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f1
6251 ; CHECK-PREP10-NEXT: lis r4, 3725
6252 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
6253 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
6254 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
6255 ; CHECK-PREP10-NEXT: stxsdx f0, r3, r4
6256 ; CHECK-PREP10-NEXT: blr
6258 %and = and i64 %ptr, -1099511627776
6259 %conv = fptoui double %str to i64
6260 %or = or i64 %and, 1000000000000
6261 %0 = inttoptr i64 %or to ptr
6262 store i64 %conv, ptr %0, align 4096
6266 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6267 define dso_local void @st_cst_align16_double_uint64_t(double %str) {
6268 ; CHECK-POSTP8-LABEL: st_cst_align16_double_uint64_t:
6269 ; CHECK-POSTP8: # %bb.0: # %entry
6270 ; CHECK-POSTP8-NEXT: xscvdpuxds v2, f1
6271 ; CHECK-POSTP8-NEXT: stxsd v2, 4080(0)
6272 ; CHECK-POSTP8-NEXT: blr
6274 ; CHECK-P8-LABEL: st_cst_align16_double_uint64_t:
6275 ; CHECK-P8: # %bb.0: # %entry
6276 ; CHECK-P8-NEXT: xscvdpuxds f0, f1
6277 ; CHECK-P8-NEXT: li r3, 4080
6278 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
6279 ; CHECK-P8-NEXT: blr
6281 %conv = fptoui double %str to i64
6282 store i64 %conv, ptr inttoptr (i64 4080 to ptr), align 16
6286 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6287 define dso_local void @st_cst_align32_double_uint64_t(double %str) {
6288 ; CHECK-POSTP8-LABEL: st_cst_align32_double_uint64_t:
6289 ; CHECK-POSTP8: # %bb.0: # %entry
6290 ; CHECK-POSTP8-NEXT: xscvdpuxds v2, f1
6291 ; CHECK-POSTP8-NEXT: lis r3, 153
6292 ; CHECK-POSTP8-NEXT: stxsd v2, -27108(r3)
6293 ; CHECK-POSTP8-NEXT: blr
6295 ; CHECK-P8-LABEL: st_cst_align32_double_uint64_t:
6296 ; CHECK-P8: # %bb.0: # %entry
6297 ; CHECK-P8-NEXT: xscvdpuxds f0, f1
6298 ; CHECK-P8-NEXT: lis r3, 152
6299 ; CHECK-P8-NEXT: ori r3, r3, 38428
6300 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
6301 ; CHECK-P8-NEXT: blr
6303 %conv = fptoui double %str to i64
6304 store i64 %conv, ptr inttoptr (i64 9999900 to ptr), align 8
6308 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6309 define dso_local void @st_cst_align64_double_uint64_t(double %str) {
6310 ; CHECK-P10-LABEL: st_cst_align64_double_uint64_t:
6311 ; CHECK-P10: # %bb.0: # %entry
6312 ; CHECK-P10-NEXT: xscvdpuxds v2, f1
6313 ; CHECK-P10-NEXT: pli r3, 244140625
6314 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
6315 ; CHECK-P10-NEXT: stxsd v2, 0(r3)
6316 ; CHECK-P10-NEXT: blr
6318 ; CHECK-P9-LABEL: st_cst_align64_double_uint64_t:
6319 ; CHECK-P9: # %bb.0: # %entry
6320 ; CHECK-P9-NEXT: xscvdpuxds v2, f1
6321 ; CHECK-P9-NEXT: lis r3, 3725
6322 ; CHECK-P9-NEXT: ori r3, r3, 19025
6323 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
6324 ; CHECK-P9-NEXT: stxsd v2, 0(r3)
6325 ; CHECK-P9-NEXT: blr
6327 ; CHECK-P8-LABEL: st_cst_align64_double_uint64_t:
6328 ; CHECK-P8: # %bb.0: # %entry
6329 ; CHECK-P8-NEXT: xscvdpuxds f0, f1
6330 ; CHECK-P8-NEXT: lis r3, 3725
6331 ; CHECK-P8-NEXT: ori r3, r3, 19025
6332 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
6333 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
6334 ; CHECK-P8-NEXT: blr
6336 %conv = fptoui double %str to i64
6337 store i64 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
6341 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6342 define dso_local void @st_0_double_int64_t(i64 %ptr, double %str) {
6343 ; CHECK-POSTP8-LABEL: st_0_double_int64_t:
6344 ; CHECK-POSTP8: # %bb.0: # %entry
6345 ; CHECK-POSTP8-NEXT: xscvdpsxds v2, f1
6346 ; CHECK-POSTP8-NEXT: stxsd v2, 0(r3)
6347 ; CHECK-POSTP8-NEXT: blr
6349 ; CHECK-P8-LABEL: st_0_double_int64_t:
6350 ; CHECK-P8: # %bb.0: # %entry
6351 ; CHECK-P8-NEXT: xscvdpsxds f0, f1
6352 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
6353 ; CHECK-P8-NEXT: blr
6355 %conv = fptosi double %str to i64
6356 %0 = inttoptr i64 %ptr to ptr
6357 store i64 %conv, ptr %0, align 8
6361 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6362 define dso_local void @st_align16_double_int64_t(ptr nocapture %ptr, double %str) {
6363 ; CHECK-POSTP8-LABEL: st_align16_double_int64_t:
6364 ; CHECK-POSTP8: # %bb.0: # %entry
6365 ; CHECK-POSTP8-NEXT: xscvdpsxds v2, f1
6366 ; CHECK-POSTP8-NEXT: stxsd v2, 8(r3)
6367 ; CHECK-POSTP8-NEXT: blr
6369 ; CHECK-P8-LABEL: st_align16_double_int64_t:
6370 ; CHECK-P8: # %bb.0: # %entry
6371 ; CHECK-P8-NEXT: xscvdpsxds f0, f1
6372 ; CHECK-P8-NEXT: li r4, 8
6373 ; CHECK-P8-NEXT: stxsdx f0, r3, r4
6374 ; CHECK-P8-NEXT: blr
6376 %conv = fptosi double %str to i64
6377 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
6378 store i64 %conv, ptr %add.ptr, align 8
6382 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6383 define dso_local void @st_align32_double_int64_t(ptr nocapture %ptr, double %str) {
6384 ; CHECK-P10-LABEL: st_align32_double_int64_t:
6385 ; CHECK-P10: # %bb.0: # %entry
6386 ; CHECK-P10-NEXT: xscvdpsxds v2, f1
6387 ; CHECK-P10-NEXT: pstxsd v2, 99999000(r3), 0
6388 ; CHECK-P10-NEXT: blr
6390 ; CHECK-PREP10-LABEL: st_align32_double_int64_t:
6391 ; CHECK-PREP10: # %bb.0: # %entry
6392 ; CHECK-PREP10-NEXT: xscvdpsxds f0, f1
6393 ; CHECK-PREP10-NEXT: lis r4, 1525
6394 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
6395 ; CHECK-PREP10-NEXT: stxsdx f0, r3, r4
6396 ; CHECK-PREP10-NEXT: blr
6398 %conv = fptosi double %str to i64
6399 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
6400 store i64 %conv, ptr %add.ptr, align 8
6404 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6405 define dso_local void @st_align64_double_int64_t(ptr nocapture %ptr, double %str) {
6406 ; CHECK-P10-LABEL: st_align64_double_int64_t:
6407 ; CHECK-P10: # %bb.0: # %entry
6408 ; CHECK-P10-NEXT: xscvdpsxds f0, f1
6409 ; CHECK-P10-NEXT: pli r4, 244140625
6410 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6411 ; CHECK-P10-NEXT: stxsdx f0, r3, r4
6412 ; CHECK-P10-NEXT: blr
6414 ; CHECK-PREP10-LABEL: st_align64_double_int64_t:
6415 ; CHECK-PREP10: # %bb.0: # %entry
6416 ; CHECK-PREP10-NEXT: xscvdpsxds f0, f1
6417 ; CHECK-PREP10-NEXT: lis r4, 3725
6418 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
6419 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
6420 ; CHECK-PREP10-NEXT: stxsdx f0, r3, r4
6421 ; CHECK-PREP10-NEXT: blr
6423 %conv = fptosi double %str to i64
6424 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
6425 store i64 %conv, ptr %add.ptr, align 8
6429 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6430 define dso_local void @st_reg_double_int64_t(ptr nocapture %ptr, i64 %off, double %str) {
6431 ; CHECK-LABEL: st_reg_double_int64_t:
6432 ; CHECK: # %bb.0: # %entry
6433 ; CHECK-NEXT: xscvdpsxds f0, f1
6434 ; CHECK-NEXT: stxsdx f0, r3, r4
6437 %conv = fptosi double %str to i64
6438 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
6439 store i64 %conv, ptr %add.ptr, align 8
6443 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6444 define dso_local void @st_or1_double_int64_t(i64 %ptr, i8 zeroext %off, double %str) {
6445 ; CHECK-POSTP8-LABEL: st_or1_double_int64_t:
6446 ; CHECK-POSTP8: # %bb.0: # %entry
6447 ; CHECK-POSTP8-NEXT: xscvdpsxds v2, f1
6448 ; CHECK-POSTP8-NEXT: or r3, r4, r3
6449 ; CHECK-POSTP8-NEXT: stxsd v2, 0(r3)
6450 ; CHECK-POSTP8-NEXT: blr
6452 ; CHECK-P8-LABEL: st_or1_double_int64_t:
6453 ; CHECK-P8: # %bb.0: # %entry
6454 ; CHECK-P8-NEXT: xscvdpsxds f0, f1
6455 ; CHECK-P8-NEXT: or r3, r4, r3
6456 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
6457 ; CHECK-P8-NEXT: blr
6459 %conv = fptosi double %str to i64
6460 %conv1 = zext i8 %off to i64
6461 %or = or i64 %conv1, %ptr
6462 %0 = inttoptr i64 %or to ptr
6463 store i64 %conv, ptr %0, align 8
6467 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6468 define dso_local void @st_not_disjoint16_double_int64_t(i64 %ptr, double %str) {
6469 ; CHECK-POSTP8-LABEL: st_not_disjoint16_double_int64_t:
6470 ; CHECK-POSTP8: # %bb.0: # %entry
6471 ; CHECK-POSTP8-NEXT: xscvdpsxds v2, f1
6472 ; CHECK-POSTP8-NEXT: ori r3, r3, 6
6473 ; CHECK-POSTP8-NEXT: stxsd v2, 0(r3)
6474 ; CHECK-POSTP8-NEXT: blr
6476 ; CHECK-P8-LABEL: st_not_disjoint16_double_int64_t:
6477 ; CHECK-P8: # %bb.0: # %entry
6478 ; CHECK-P8-NEXT: xscvdpsxds f0, f1
6479 ; CHECK-P8-NEXT: ori r3, r3, 6
6480 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
6481 ; CHECK-P8-NEXT: blr
6483 %conv = fptosi double %str to i64
6484 %or = or i64 %ptr, 6
6485 %0 = inttoptr i64 %or to ptr
6486 store i64 %conv, ptr %0, align 8
6490 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6491 define dso_local void @st_disjoint_align16_double_int64_t(i64 %ptr, double %str) {
6492 ; CHECK-POSTP8-LABEL: st_disjoint_align16_double_int64_t:
6493 ; CHECK-POSTP8: # %bb.0: # %entry
6494 ; CHECK-POSTP8-NEXT: xscvdpsxds v2, f1
6495 ; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
6496 ; CHECK-POSTP8-NEXT: stxsd v2, 24(r3)
6497 ; CHECK-POSTP8-NEXT: blr
6499 ; CHECK-P8-LABEL: st_disjoint_align16_double_int64_t:
6500 ; CHECK-P8: # %bb.0: # %entry
6501 ; CHECK-P8-NEXT: xscvdpsxds f0, f1
6502 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
6503 ; CHECK-P8-NEXT: ori r3, r3, 24
6504 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
6505 ; CHECK-P8-NEXT: blr
6507 %and = and i64 %ptr, -4096
6508 %conv = fptosi double %str to i64
6509 %or = or i64 %and, 24
6510 %0 = inttoptr i64 %or to ptr
6511 store i64 %conv, ptr %0, align 8
6515 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6516 define dso_local void @st_not_disjoint32_double_int64_t(i64 %ptr, double %str) {
6517 ; CHECK-POSTP8-LABEL: st_not_disjoint32_double_int64_t:
6518 ; CHECK-POSTP8: # %bb.0: # %entry
6519 ; CHECK-POSTP8-NEXT: xscvdpsxds v2, f1
6520 ; CHECK-POSTP8-NEXT: ori r3, r3, 34463
6521 ; CHECK-POSTP8-NEXT: oris r3, r3, 1
6522 ; CHECK-POSTP8-NEXT: stxsd v2, 0(r3)
6523 ; CHECK-POSTP8-NEXT: blr
6525 ; CHECK-P8-LABEL: st_not_disjoint32_double_int64_t:
6526 ; CHECK-P8: # %bb.0: # %entry
6527 ; CHECK-P8-NEXT: xscvdpsxds f0, f1
6528 ; CHECK-P8-NEXT: ori r3, r3, 34463
6529 ; CHECK-P8-NEXT: oris r3, r3, 1
6530 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
6531 ; CHECK-P8-NEXT: blr
6533 %conv = fptosi double %str to i64
6534 %or = or i64 %ptr, 99999
6535 %0 = inttoptr i64 %or to ptr
6536 store i64 %conv, ptr %0, align 8
6540 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6541 define dso_local void @st_disjoint_align32_double_int64_t(i64 %ptr, double %str) {
6542 ; CHECK-P10-LABEL: st_disjoint_align32_double_int64_t:
6543 ; CHECK-P10: # %bb.0: # %entry
6544 ; CHECK-P10-NEXT: xscvdpsxds v2, f1
6545 ; CHECK-P10-NEXT: lis r4, -15264
6546 ; CHECK-P10-NEXT: and r3, r3, r4
6547 ; CHECK-P10-NEXT: pstxsd v2, 999990000(r3), 0
6548 ; CHECK-P10-NEXT: blr
6550 ; CHECK-P9-LABEL: st_disjoint_align32_double_int64_t:
6551 ; CHECK-P9: # %bb.0: # %entry
6552 ; CHECK-P9-NEXT: xscvdpsxds f0, f1
6553 ; CHECK-P9-NEXT: lis r4, -15264
6554 ; CHECK-P9-NEXT: and r3, r3, r4
6555 ; CHECK-P9-NEXT: lis r4, 15258
6556 ; CHECK-P9-NEXT: ori r4, r4, 41712
6557 ; CHECK-P9-NEXT: stxsdx f0, r3, r4
6558 ; CHECK-P9-NEXT: blr
6560 ; CHECK-P8-LABEL: st_disjoint_align32_double_int64_t:
6561 ; CHECK-P8: # %bb.0: # %entry
6562 ; CHECK-P8-NEXT: lis r4, -15264
6563 ; CHECK-P8-NEXT: xscvdpsxds f0, f1
6564 ; CHECK-P8-NEXT: and r3, r3, r4
6565 ; CHECK-P8-NEXT: lis r4, 15258
6566 ; CHECK-P8-NEXT: ori r4, r4, 41712
6567 ; CHECK-P8-NEXT: stxsdx f0, r3, r4
6568 ; CHECK-P8-NEXT: blr
6570 %and = and i64 %ptr, -1000341504
6571 %conv = fptosi double %str to i64
6572 %or = or i64 %and, 999990000
6573 %0 = inttoptr i64 %or to ptr
6574 store i64 %conv, ptr %0, align 16
6578 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6579 define dso_local void @st_not_disjoint64_double_int64_t(i64 %ptr, double %str) {
6580 ; CHECK-P10-LABEL: st_not_disjoint64_double_int64_t:
6581 ; CHECK-P10: # %bb.0: # %entry
6582 ; CHECK-P10-NEXT: xscvdpsxds v2, f1
6583 ; CHECK-P10-NEXT: pli r4, 232
6584 ; CHECK-P10-NEXT: pli r5, 3567587329
6585 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
6586 ; CHECK-P10-NEXT: or r3, r3, r5
6587 ; CHECK-P10-NEXT: stxsd v2, 0(r3)
6588 ; CHECK-P10-NEXT: blr
6590 ; CHECK-P9-LABEL: st_not_disjoint64_double_int64_t:
6591 ; CHECK-P9: # %bb.0: # %entry
6592 ; CHECK-P9-NEXT: li r4, 29
6593 ; CHECK-P9-NEXT: xscvdpsxds v2, f1
6594 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
6595 ; CHECK-P9-NEXT: oris r4, r4, 54437
6596 ; CHECK-P9-NEXT: ori r4, r4, 4097
6597 ; CHECK-P9-NEXT: or r3, r3, r4
6598 ; CHECK-P9-NEXT: stxsd v2, 0(r3)
6599 ; CHECK-P9-NEXT: blr
6601 ; CHECK-P8-LABEL: st_not_disjoint64_double_int64_t:
6602 ; CHECK-P8: # %bb.0: # %entry
6603 ; CHECK-P8-NEXT: li r4, 29
6604 ; CHECK-P8-NEXT: xscvdpsxds f0, f1
6605 ; CHECK-P8-NEXT: rldic r4, r4, 35, 24
6606 ; CHECK-P8-NEXT: oris r4, r4, 54437
6607 ; CHECK-P8-NEXT: ori r4, r4, 4097
6608 ; CHECK-P8-NEXT: or r3, r3, r4
6609 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
6610 ; CHECK-P8-NEXT: blr
6612 %conv = fptosi double %str to i64
6613 %or = or i64 %ptr, 1000000000001
6614 %0 = inttoptr i64 %or to ptr
6615 store i64 %conv, ptr %0, align 8
6619 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6620 define dso_local void @st_disjoint_align64_double_int64_t(i64 %ptr, double %str) {
6621 ; CHECK-P10-LABEL: st_disjoint_align64_double_int64_t:
6622 ; CHECK-P10: # %bb.0: # %entry
6623 ; CHECK-P10-NEXT: xscvdpsxds f0, f1
6624 ; CHECK-P10-NEXT: pli r4, 244140625
6625 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
6626 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6627 ; CHECK-P10-NEXT: stxsdx f0, r3, r4
6628 ; CHECK-P10-NEXT: blr
6630 ; CHECK-PREP10-LABEL: st_disjoint_align64_double_int64_t:
6631 ; CHECK-PREP10: # %bb.0: # %entry
6632 ; CHECK-PREP10-NEXT: xscvdpsxds f0, f1
6633 ; CHECK-PREP10-NEXT: lis r4, 3725
6634 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
6635 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
6636 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
6637 ; CHECK-PREP10-NEXT: stxsdx f0, r3, r4
6638 ; CHECK-PREP10-NEXT: blr
6640 %and = and i64 %ptr, -1099511627776
6641 %conv = fptosi double %str to i64
6642 %or = or i64 %and, 1000000000000
6643 %0 = inttoptr i64 %or to ptr
6644 store i64 %conv, ptr %0, align 4096
6648 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6649 define dso_local void @st_cst_align16_double_int64_t(double %str) {
6650 ; CHECK-POSTP8-LABEL: st_cst_align16_double_int64_t:
6651 ; CHECK-POSTP8: # %bb.0: # %entry
6652 ; CHECK-POSTP8-NEXT: xscvdpsxds v2, f1
6653 ; CHECK-POSTP8-NEXT: stxsd v2, 4080(0)
6654 ; CHECK-POSTP8-NEXT: blr
6656 ; CHECK-P8-LABEL: st_cst_align16_double_int64_t:
6657 ; CHECK-P8: # %bb.0: # %entry
6658 ; CHECK-P8-NEXT: xscvdpsxds f0, f1
6659 ; CHECK-P8-NEXT: li r3, 4080
6660 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
6661 ; CHECK-P8-NEXT: blr
6663 %conv = fptosi double %str to i64
6664 store i64 %conv, ptr inttoptr (i64 4080 to ptr), align 16
6668 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6669 define dso_local void @st_cst_align32_double_int64_t(double %str) {
6670 ; CHECK-POSTP8-LABEL: st_cst_align32_double_int64_t:
6671 ; CHECK-POSTP8: # %bb.0: # %entry
6672 ; CHECK-POSTP8-NEXT: xscvdpsxds v2, f1
6673 ; CHECK-POSTP8-NEXT: lis r3, 153
6674 ; CHECK-POSTP8-NEXT: stxsd v2, -27108(r3)
6675 ; CHECK-POSTP8-NEXT: blr
6677 ; CHECK-P8-LABEL: st_cst_align32_double_int64_t:
6678 ; CHECK-P8: # %bb.0: # %entry
6679 ; CHECK-P8-NEXT: xscvdpsxds f0, f1
6680 ; CHECK-P8-NEXT: lis r3, 152
6681 ; CHECK-P8-NEXT: ori r3, r3, 38428
6682 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
6683 ; CHECK-P8-NEXT: blr
6685 %conv = fptosi double %str to i64
6686 store i64 %conv, ptr inttoptr (i64 9999900 to ptr), align 8
6690 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6691 define dso_local void @st_cst_align64_double_int64_t(double %str) {
6692 ; CHECK-P10-LABEL: st_cst_align64_double_int64_t:
6693 ; CHECK-P10: # %bb.0: # %entry
6694 ; CHECK-P10-NEXT: xscvdpsxds v2, f1
6695 ; CHECK-P10-NEXT: pli r3, 244140625
6696 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
6697 ; CHECK-P10-NEXT: stxsd v2, 0(r3)
6698 ; CHECK-P10-NEXT: blr
6700 ; CHECK-P9-LABEL: st_cst_align64_double_int64_t:
6701 ; CHECK-P9: # %bb.0: # %entry
6702 ; CHECK-P9-NEXT: xscvdpsxds v2, f1
6703 ; CHECK-P9-NEXT: lis r3, 3725
6704 ; CHECK-P9-NEXT: ori r3, r3, 19025
6705 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
6706 ; CHECK-P9-NEXT: stxsd v2, 0(r3)
6707 ; CHECK-P9-NEXT: blr
6709 ; CHECK-P8-LABEL: st_cst_align64_double_int64_t:
6710 ; CHECK-P8: # %bb.0: # %entry
6711 ; CHECK-P8-NEXT: xscvdpsxds f0, f1
6712 ; CHECK-P8-NEXT: lis r3, 3725
6713 ; CHECK-P8-NEXT: ori r3, r3, 19025
6714 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
6715 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
6716 ; CHECK-P8-NEXT: blr
6718 %conv = fptosi double %str to i64
6719 store i64 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
6723 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6724 define dso_local void @st_0_double_float(i64 %ptr, double %str) {
6725 ; CHECK-LABEL: st_0_double_float:
6726 ; CHECK: # %bb.0: # %entry
6727 ; CHECK-NEXT: xsrsp f0, f1
6728 ; CHECK-NEXT: stfs f0, 0(r3)
6731 %conv = fptrunc double %str to float
6732 %0 = inttoptr i64 %ptr to ptr
6733 store float %conv, ptr %0, align 4
6737 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6738 define dso_local void @st_align16_double_float(ptr nocapture %ptr, double %str) {
6739 ; CHECK-LABEL: st_align16_double_float:
6740 ; CHECK: # %bb.0: # %entry
6741 ; CHECK-NEXT: xsrsp f0, f1
6742 ; CHECK-NEXT: stfs f0, 8(r3)
6745 %conv = fptrunc double %str to float
6746 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
6747 store float %conv, ptr %add.ptr, align 4
6751 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6752 define dso_local void @st_align32_double_float(ptr nocapture %ptr, double %str) {
6753 ; CHECK-P10-LABEL: st_align32_double_float:
6754 ; CHECK-P10: # %bb.0: # %entry
6755 ; CHECK-P10-NEXT: xsrsp f0, f1
6756 ; CHECK-P10-NEXT: pstfs f0, 99999000(r3), 0
6757 ; CHECK-P10-NEXT: blr
6759 ; CHECK-PREP10-LABEL: st_align32_double_float:
6760 ; CHECK-PREP10: # %bb.0: # %entry
6761 ; CHECK-PREP10-NEXT: xsrsp f0, f1
6762 ; CHECK-PREP10-NEXT: lis r4, 1525
6763 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
6764 ; CHECK-PREP10-NEXT: stfsx f0, r3, r4
6765 ; CHECK-PREP10-NEXT: blr
6767 %conv = fptrunc double %str to float
6768 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
6769 store float %conv, ptr %add.ptr, align 4
6773 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6774 define dso_local void @st_align64_double_float(ptr nocapture %ptr, double %str) {
6775 ; CHECK-P10-LABEL: st_align64_double_float:
6776 ; CHECK-P10: # %bb.0: # %entry
6777 ; CHECK-P10-NEXT: xsrsp f0, f1
6778 ; CHECK-P10-NEXT: pli r4, 244140625
6779 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6780 ; CHECK-P10-NEXT: stfsx f0, r3, r4
6781 ; CHECK-P10-NEXT: blr
6783 ; CHECK-PREP10-LABEL: st_align64_double_float:
6784 ; CHECK-PREP10: # %bb.0: # %entry
6785 ; CHECK-PREP10-NEXT: xsrsp f0, f1
6786 ; CHECK-PREP10-NEXT: lis r4, 3725
6787 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
6788 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
6789 ; CHECK-PREP10-NEXT: stfsx f0, r3, r4
6790 ; CHECK-PREP10-NEXT: blr
6792 %conv = fptrunc double %str to float
6793 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
6794 store float %conv, ptr %add.ptr, align 4
6798 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6799 define dso_local void @st_reg_double_float(ptr nocapture %ptr, i64 %off, double %str) {
6800 ; CHECK-LABEL: st_reg_double_float:
6801 ; CHECK: # %bb.0: # %entry
6802 ; CHECK-NEXT: xsrsp f0, f1
6803 ; CHECK-NEXT: stfsx f0, r3, r4
6806 %conv = fptrunc double %str to float
6807 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
6808 store float %conv, ptr %add.ptr, align 4
6812 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6813 define dso_local void @st_or1_double_float(i64 %ptr, i8 zeroext %off, double %str) {
6814 ; CHECK-LABEL: st_or1_double_float:
6815 ; CHECK: # %bb.0: # %entry
6816 ; CHECK-NEXT: xsrsp f0, f1
6817 ; CHECK-NEXT: or r3, r4, r3
6818 ; CHECK-NEXT: stfs f0, 0(r3)
6821 %conv = fptrunc double %str to float
6822 %conv1 = zext i8 %off to i64
6823 %or = or i64 %conv1, %ptr
6824 %0 = inttoptr i64 %or to ptr
6825 store float %conv, ptr %0, align 4
6829 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6830 define dso_local void @st_not_disjoint16_double_float(i64 %ptr, double %str) {
6831 ; CHECK-LABEL: st_not_disjoint16_double_float:
6832 ; CHECK: # %bb.0: # %entry
6833 ; CHECK-NEXT: xsrsp f0, f1
6834 ; CHECK-NEXT: ori r3, r3, 6
6835 ; CHECK-NEXT: stfs f0, 0(r3)
6838 %conv = fptrunc double %str to float
6839 %or = or i64 %ptr, 6
6840 %0 = inttoptr i64 %or to ptr
6841 store float %conv, ptr %0, align 4
6845 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6846 define dso_local void @st_disjoint_align16_double_float(i64 %ptr, double %str) {
6847 ; CHECK-LABEL: st_disjoint_align16_double_float:
6848 ; CHECK: # %bb.0: # %entry
6849 ; CHECK-NEXT: xsrsp f0, f1
6850 ; CHECK-NEXT: rldicr r3, r3, 0, 51
6851 ; CHECK-NEXT: stfs f0, 24(r3)
6854 %and = and i64 %ptr, -4096
6855 %conv = fptrunc double %str to float
6856 %or = or i64 %and, 24
6857 %0 = inttoptr i64 %or to ptr
6858 store float %conv, ptr %0, align 8
6862 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6863 define dso_local void @st_not_disjoint32_double_float(i64 %ptr, double %str) {
6864 ; CHECK-LABEL: st_not_disjoint32_double_float:
6865 ; CHECK: # %bb.0: # %entry
6866 ; CHECK-NEXT: xsrsp f0, f1
6867 ; CHECK-NEXT: ori r3, r3, 34463
6868 ; CHECK-NEXT: oris r3, r3, 1
6869 ; CHECK-NEXT: stfs f0, 0(r3)
6872 %conv = fptrunc double %str to float
6873 %or = or i64 %ptr, 99999
6874 %0 = inttoptr i64 %or to ptr
6875 store float %conv, ptr %0, align 4
6879 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6880 define dso_local void @st_disjoint_align32_double_float(i64 %ptr, double %str) {
6881 ; CHECK-P10-LABEL: st_disjoint_align32_double_float:
6882 ; CHECK-P10: # %bb.0: # %entry
6883 ; CHECK-P10-NEXT: xsrsp f0, f1
6884 ; CHECK-P10-NEXT: lis r4, -15264
6885 ; CHECK-P10-NEXT: and r3, r3, r4
6886 ; CHECK-P10-NEXT: pstfs f0, 999990000(r3), 0
6887 ; CHECK-P10-NEXT: blr
6889 ; CHECK-P9-LABEL: st_disjoint_align32_double_float:
6890 ; CHECK-P9: # %bb.0: # %entry
6891 ; CHECK-P9-NEXT: xsrsp f0, f1
6892 ; CHECK-P9-NEXT: lis r4, -15264
6893 ; CHECK-P9-NEXT: and r3, r3, r4
6894 ; CHECK-P9-NEXT: lis r4, 15258
6895 ; CHECK-P9-NEXT: ori r4, r4, 41712
6896 ; CHECK-P9-NEXT: stfsx f0, r3, r4
6897 ; CHECK-P9-NEXT: blr
6899 ; CHECK-P8-LABEL: st_disjoint_align32_double_float:
6900 ; CHECK-P8: # %bb.0: # %entry
6901 ; CHECK-P8-NEXT: lis r4, -15264
6902 ; CHECK-P8-NEXT: xsrsp f0, f1
6903 ; CHECK-P8-NEXT: and r3, r3, r4
6904 ; CHECK-P8-NEXT: lis r4, 15258
6905 ; CHECK-P8-NEXT: ori r4, r4, 41712
6906 ; CHECK-P8-NEXT: stfsx f0, r3, r4
6907 ; CHECK-P8-NEXT: blr
6909 %and = and i64 %ptr, -1000341504
6910 %conv = fptrunc double %str to float
6911 %or = or i64 %and, 999990000
6912 %0 = inttoptr i64 %or to ptr
6913 store float %conv, ptr %0, align 16
6917 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6918 define dso_local void @st_not_disjoint64_double_float(i64 %ptr, double %str) {
6919 ; CHECK-P10-LABEL: st_not_disjoint64_double_float:
6920 ; CHECK-P10: # %bb.0: # %entry
6921 ; CHECK-P10-NEXT: xsrsp f0, f1
6922 ; CHECK-P10-NEXT: pli r4, 232
6923 ; CHECK-P10-NEXT: pli r5, 3567587329
6924 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
6925 ; CHECK-P10-NEXT: or r3, r3, r5
6926 ; CHECK-P10-NEXT: stfs f0, 0(r3)
6927 ; CHECK-P10-NEXT: blr
6929 ; CHECK-PREP10-LABEL: st_not_disjoint64_double_float:
6930 ; CHECK-PREP10: # %bb.0: # %entry
6931 ; CHECK-PREP10-NEXT: li r4, 29
6932 ; CHECK-PREP10-NEXT: xsrsp f0, f1
6933 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
6934 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
6935 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
6936 ; CHECK-PREP10-NEXT: or r3, r3, r4
6937 ; CHECK-PREP10-NEXT: stfs f0, 0(r3)
6938 ; CHECK-PREP10-NEXT: blr
6940 %conv = fptrunc double %str to float
6941 %or = or i64 %ptr, 1000000000001
6942 %0 = inttoptr i64 %or to ptr
6943 store float %conv, ptr %0, align 4
6947 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6948 define dso_local void @st_disjoint_align64_double_float(i64 %ptr, double %str) {
6949 ; CHECK-P10-LABEL: st_disjoint_align64_double_float:
6950 ; CHECK-P10: # %bb.0: # %entry
6951 ; CHECK-P10-NEXT: xsrsp f0, f1
6952 ; CHECK-P10-NEXT: pli r4, 244140625
6953 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
6954 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6955 ; CHECK-P10-NEXT: stfsx f0, r3, r4
6956 ; CHECK-P10-NEXT: blr
6958 ; CHECK-PREP10-LABEL: st_disjoint_align64_double_float:
6959 ; CHECK-PREP10: # %bb.0: # %entry
6960 ; CHECK-PREP10-NEXT: xsrsp f0, f1
6961 ; CHECK-PREP10-NEXT: lis r4, 3725
6962 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
6963 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
6964 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
6965 ; CHECK-PREP10-NEXT: stfsx f0, r3, r4
6966 ; CHECK-PREP10-NEXT: blr
6968 %and = and i64 %ptr, -1099511627776
6969 %conv = fptrunc double %str to float
6970 %or = or i64 %and, 1000000000000
6971 %0 = inttoptr i64 %or to ptr
6972 store float %conv, ptr %0, align 4096
6976 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6977 define dso_local void @st_cst_align16_double_float(double %str) {
6978 ; CHECK-LABEL: st_cst_align16_double_float:
6979 ; CHECK: # %bb.0: # %entry
6980 ; CHECK-NEXT: xsrsp f0, f1
6981 ; CHECK-NEXT: stfs f0, 4080(0)
6984 %conv = fptrunc double %str to float
6985 store float %conv, ptr inttoptr (i64 4080 to ptr), align 16
6989 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6990 define dso_local void @st_cst_align32_double_float(double %str) {
6991 ; CHECK-LABEL: st_cst_align32_double_float:
6992 ; CHECK: # %bb.0: # %entry
6993 ; CHECK-NEXT: xsrsp f0, f1
6994 ; CHECK-NEXT: lis r3, 153
6995 ; CHECK-NEXT: stfs f0, -27108(r3)
6998 %conv = fptrunc double %str to float
6999 store float %conv, ptr inttoptr (i64 9999900 to ptr), align 4
7003 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7004 define dso_local void @st_cst_align64_double_float(double %str) {
7005 ; CHECK-P10-LABEL: st_cst_align64_double_float:
7006 ; CHECK-P10: # %bb.0: # %entry
7007 ; CHECK-P10-NEXT: xsrsp f0, f1
7008 ; CHECK-P10-NEXT: pli r3, 244140625
7009 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
7010 ; CHECK-P10-NEXT: stfs f0, 0(r3)
7011 ; CHECK-P10-NEXT: blr
7013 ; CHECK-PREP10-LABEL: st_cst_align64_double_float:
7014 ; CHECK-PREP10: # %bb.0: # %entry
7015 ; CHECK-PREP10-NEXT: xsrsp f0, f1
7016 ; CHECK-PREP10-NEXT: lis r3, 3725
7017 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
7018 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
7019 ; CHECK-PREP10-NEXT: stfs f0, 0(r3)
7020 ; CHECK-PREP10-NEXT: blr
7022 %conv = fptrunc double %str to float
7023 store float %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
7027 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7028 define dso_local void @st_0_double_double(i64 %ptr, double %str) {
7029 ; CHECK-LABEL: st_0_double_double:
7030 ; CHECK: # %bb.0: # %entry
7031 ; CHECK-NEXT: stfd f1, 0(r3)
7034 %0 = inttoptr i64 %ptr to ptr
7035 store double %str, ptr %0, align 8
7039 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7040 define dso_local void @st_align16_double_double(ptr nocapture %ptr, double %str) {
7041 ; CHECK-LABEL: st_align16_double_double:
7042 ; CHECK: # %bb.0: # %entry
7043 ; CHECK-NEXT: stfd f1, 8(r3)
7046 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
7047 store double %str, ptr %add.ptr, align 8
7051 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7052 define dso_local void @st_align32_double_double(ptr nocapture %ptr, double %str) {
7053 ; CHECK-P10-LABEL: st_align32_double_double:
7054 ; CHECK-P10: # %bb.0: # %entry
7055 ; CHECK-P10-NEXT: pstfd f1, 99999000(r3), 0
7056 ; CHECK-P10-NEXT: blr
7058 ; CHECK-PREP10-LABEL: st_align32_double_double:
7059 ; CHECK-PREP10: # %bb.0: # %entry
7060 ; CHECK-PREP10-NEXT: lis r4, 1525
7061 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
7062 ; CHECK-PREP10-NEXT: stfdx f1, r3, r4
7063 ; CHECK-PREP10-NEXT: blr
7065 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
7066 store double %str, ptr %add.ptr, align 8
7070 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7071 define dso_local void @st_align64_double_double(ptr nocapture %ptr, double %str) {
7072 ; CHECK-P10-LABEL: st_align64_double_double:
7073 ; CHECK-P10: # %bb.0: # %entry
7074 ; CHECK-P10-NEXT: pli r4, 244140625
7075 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7076 ; CHECK-P10-NEXT: stfdx f1, r3, r4
7077 ; CHECK-P10-NEXT: blr
7079 ; CHECK-PREP10-LABEL: st_align64_double_double:
7080 ; CHECK-PREP10: # %bb.0: # %entry
7081 ; CHECK-PREP10-NEXT: lis r4, 3725
7082 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
7083 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
7084 ; CHECK-PREP10-NEXT: stfdx f1, r3, r4
7085 ; CHECK-PREP10-NEXT: blr
7087 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
7088 store double %str, ptr %add.ptr, align 8
7092 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7093 define dso_local void @st_reg_double_double(ptr nocapture %ptr, i64 %off, double %str) {
7094 ; CHECK-LABEL: st_reg_double_double:
7095 ; CHECK: # %bb.0: # %entry
7096 ; CHECK-NEXT: stfdx f1, r3, r4
7099 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
7100 store double %str, ptr %add.ptr, align 8
7104 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7105 define dso_local void @st_or1_double_double(i64 %ptr, i8 zeroext %off, double %str) {
7106 ; CHECK-LABEL: st_or1_double_double:
7107 ; CHECK: # %bb.0: # %entry
7108 ; CHECK-NEXT: or r3, r4, r3
7109 ; CHECK-NEXT: stfd f1, 0(r3)
7112 %conv = zext i8 %off to i64
7113 %or = or i64 %conv, %ptr
7114 %0 = inttoptr i64 %or to ptr
7115 store double %str, ptr %0, align 8
7119 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7120 define dso_local void @st_not_disjoint16_double_double(i64 %ptr, double %str) {
7121 ; CHECK-LABEL: st_not_disjoint16_double_double:
7122 ; CHECK: # %bb.0: # %entry
7123 ; CHECK-NEXT: ori r3, r3, 6
7124 ; CHECK-NEXT: stfd f1, 0(r3)
7127 %or = or i64 %ptr, 6
7128 %0 = inttoptr i64 %or to ptr
7129 store double %str, ptr %0, align 8
7133 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7134 define dso_local void @st_disjoint_align16_double_double(i64 %ptr, double %str) {
7135 ; CHECK-LABEL: st_disjoint_align16_double_double:
7136 ; CHECK: # %bb.0: # %entry
7137 ; CHECK-NEXT: rldicr r3, r3, 0, 51
7138 ; CHECK-NEXT: stfd f1, 24(r3)
7141 %and = and i64 %ptr, -4096
7142 %or = or i64 %and, 24
7143 %0 = inttoptr i64 %or to ptr
7144 store double %str, ptr %0, align 8
7148 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7149 define dso_local void @st_not_disjoint32_double_double(i64 %ptr, double %str) {
7150 ; CHECK-LABEL: st_not_disjoint32_double_double:
7151 ; CHECK: # %bb.0: # %entry
7152 ; CHECK-NEXT: ori r3, r3, 34463
7153 ; CHECK-NEXT: oris r3, r3, 1
7154 ; CHECK-NEXT: stfd f1, 0(r3)
7157 %or = or i64 %ptr, 99999
7158 %0 = inttoptr i64 %or to ptr
7159 store double %str, ptr %0, align 8
7163 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7164 define dso_local void @st_disjoint_align32_double_double(i64 %ptr, double %str) {
7165 ; CHECK-P10-LABEL: st_disjoint_align32_double_double:
7166 ; CHECK-P10: # %bb.0: # %entry
7167 ; CHECK-P10-NEXT: lis r4, -15264
7168 ; CHECK-P10-NEXT: and r3, r3, r4
7169 ; CHECK-P10-NEXT: pstfd f1, 999990000(r3), 0
7170 ; CHECK-P10-NEXT: blr
7172 ; CHECK-PREP10-LABEL: st_disjoint_align32_double_double:
7173 ; CHECK-PREP10: # %bb.0: # %entry
7174 ; CHECK-PREP10-NEXT: lis r4, -15264
7175 ; CHECK-PREP10-NEXT: and r3, r3, r4
7176 ; CHECK-PREP10-NEXT: lis r4, 15258
7177 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
7178 ; CHECK-PREP10-NEXT: stfdx f1, r3, r4
7179 ; CHECK-PREP10-NEXT: blr
7181 %and = and i64 %ptr, -1000341504
7182 %or = or i64 %and, 999990000
7183 %0 = inttoptr i64 %or to ptr
7184 store double %str, ptr %0, align 16
7188 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7189 define dso_local void @st_not_disjoint64_double_double(i64 %ptr, double %str) {
7190 ; CHECK-P10-LABEL: st_not_disjoint64_double_double:
7191 ; CHECK-P10: # %bb.0: # %entry
7192 ; CHECK-P10-NEXT: pli r4, 232
7193 ; CHECK-P10-NEXT: pli r5, 3567587329
7194 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
7195 ; CHECK-P10-NEXT: or r3, r3, r5
7196 ; CHECK-P10-NEXT: stfd f1, 0(r3)
7197 ; CHECK-P10-NEXT: blr
7199 ; CHECK-PREP10-LABEL: st_not_disjoint64_double_double:
7200 ; CHECK-PREP10: # %bb.0: # %entry
7201 ; CHECK-PREP10-NEXT: li r4, 29
7202 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
7203 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
7204 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
7205 ; CHECK-PREP10-NEXT: or r3, r3, r4
7206 ; CHECK-PREP10-NEXT: stfd f1, 0(r3)
7207 ; CHECK-PREP10-NEXT: blr
7209 %or = or i64 %ptr, 1000000000001
7210 %0 = inttoptr i64 %or to ptr
7211 store double %str, ptr %0, align 8
7215 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7216 define dso_local void @st_disjoint_align64_double_double(i64 %ptr, double %str) {
7217 ; CHECK-P10-LABEL: st_disjoint_align64_double_double:
7218 ; CHECK-P10: # %bb.0: # %entry
7219 ; CHECK-P10-NEXT: pli r4, 244140625
7220 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
7221 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7222 ; CHECK-P10-NEXT: stfdx f1, r3, r4
7223 ; CHECK-P10-NEXT: blr
7225 ; CHECK-PREP10-LABEL: st_disjoint_align64_double_double:
7226 ; CHECK-PREP10: # %bb.0: # %entry
7227 ; CHECK-PREP10-NEXT: lis r4, 3725
7228 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
7229 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
7230 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
7231 ; CHECK-PREP10-NEXT: stfdx f1, r3, r4
7232 ; CHECK-PREP10-NEXT: blr
7234 %and = and i64 %ptr, -1099511627776
7235 %or = or i64 %and, 1000000000000
7236 %0 = inttoptr i64 %or to ptr
7237 store double %str, ptr %0, align 4096
7241 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7242 define dso_local void @st_cst_align16_double_double(double %str) {
7243 ; CHECK-LABEL: st_cst_align16_double_double:
7244 ; CHECK: # %bb.0: # %entry
7245 ; CHECK-NEXT: stfd f1, 4080(0)
7248 store double %str, ptr inttoptr (i64 4080 to ptr), align 16
7252 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7253 define dso_local void @st_cst_align32_double_double(double %str) {
7254 ; CHECK-LABEL: st_cst_align32_double_double:
7255 ; CHECK: # %bb.0: # %entry
7256 ; CHECK-NEXT: lis r3, 153
7257 ; CHECK-NEXT: stfd f1, -27108(r3)
7260 store double %str, ptr inttoptr (i64 9999900 to ptr), align 8
7264 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7265 define dso_local void @st_cst_align64_double_double(double %str) {
7266 ; CHECK-P10-LABEL: st_cst_align64_double_double:
7267 ; CHECK-P10: # %bb.0: # %entry
7268 ; CHECK-P10-NEXT: pli r3, 244140625
7269 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
7270 ; CHECK-P10-NEXT: stfd f1, 0(r3)
7271 ; CHECK-P10-NEXT: blr
7273 ; CHECK-PREP10-LABEL: st_cst_align64_double_double:
7274 ; CHECK-PREP10: # %bb.0: # %entry
7275 ; CHECK-PREP10-NEXT: lis r3, 3725
7276 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
7277 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
7278 ; CHECK-PREP10-NEXT: stfd f1, 0(r3)
7279 ; CHECK-PREP10-NEXT: blr
7281 store double %str, ptr inttoptr (i64 1000000000000 to ptr), align 4096
7285 define dso_local void @st_reversed_double_from_i8(ptr %ptr) {
7286 ; CHECK-P10-LABEL: st_reversed_double_from_i8:
7287 ; CHECK-P10: # %bb.0: # %entry
7288 ; CHECK-P10-NEXT: li r4, 8
7289 ; CHECK-P10-NEXT: lxsibzx f0, 0, r3
7290 ; CHECK-P10-NEXT: xxspltidp vs2, -1023410176
7291 ; CHECK-P10-NEXT: lxsibzx f1, r3, r4
7292 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7293 ; CHECK-P10-NEXT: xscvuxddp f1, f1
7294 ; CHECK-P10-NEXT: xsadddp f0, f0, f2
7295 ; CHECK-P10-NEXT: xsadddp f1, f1, f2
7296 ; CHECK-P10-NEXT: stfd f1, 0(r3)
7297 ; CHECK-P10-NEXT: stfd f0, 8(r3)
7298 ; CHECK-P10-NEXT: blr
7300 ; CHECK-P9-LABEL: st_reversed_double_from_i8:
7301 ; CHECK-P9: # %bb.0: # %entry
7302 ; CHECK-P9-NEXT: li r4, 8
7303 ; CHECK-P9-NEXT: lxsibzx f0, 0, r3
7304 ; CHECK-P9-NEXT: lxsibzx f1, r3, r4
7305 ; CHECK-P9-NEXT: addis r4, r2, .LCPI300_0@toc@ha
7306 ; CHECK-P9-NEXT: lfs f2, .LCPI300_0@toc@l(r4)
7307 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7308 ; CHECK-P9-NEXT: xscvuxddp f1, f1
7309 ; CHECK-P9-NEXT: xsadddp f0, f0, f2
7310 ; CHECK-P9-NEXT: xsadddp f1, f1, f2
7311 ; CHECK-P9-NEXT: stfd f0, 8(r3)
7312 ; CHECK-P9-NEXT: stfd f1, 0(r3)
7313 ; CHECK-P9-NEXT: blr
7315 ; CHECK-P8-LABEL: st_reversed_double_from_i8:
7316 ; CHECK-P8: # %bb.0: # %entry
7317 ; CHECK-P8-NEXT: lbz r4, 0(r3)
7318 ; CHECK-P8-NEXT: lbz r5, 8(r3)
7319 ; CHECK-P8-NEXT: mtfprwz f0, r4
7320 ; CHECK-P8-NEXT: mtfprwz f1, r5
7321 ; CHECK-P8-NEXT: addis r4, r2, .LCPI300_0@toc@ha
7322 ; CHECK-P8-NEXT: lfs f2, .LCPI300_0@toc@l(r4)
7323 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7324 ; CHECK-P8-NEXT: xscvuxddp f1, f1
7325 ; CHECK-P8-NEXT: xsadddp f0, f0, f2
7326 ; CHECK-P8-NEXT: xsadddp f1, f1, f2
7327 ; CHECK-P8-NEXT: stfd f1, 0(r3)
7328 ; CHECK-P8-NEXT: stfd f0, 8(r3)
7329 ; CHECK-P8-NEXT: blr
7331 %idx = getelementptr inbounds i8, ptr %ptr, i64 8
7332 %i0 = load i8, ptr %ptr, align 1
7333 %i1 = load i8, ptr %idx, align 1
7334 %f0 = uitofp i8 %i0 to double
7335 %f1 = uitofp i8 %i1 to double
7336 %a0 = fadd double %f0, -1.280000e+02
7337 %a1 = fadd double %f1, -1.280000e+02
7338 store double %a1, ptr %ptr, align 8
7339 store double %a0, ptr %idx, align 8