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 i8*
37 %1 = load i8, i8* %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(i8* 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, i8* %ptr, i64 8
59 %0 = load i8, i8* %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(i8* 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, i8* %ptr, i64 99999000
91 %0 = load i8, i8* %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(i8* 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, i8* %ptr, i64 1000000000000
126 %0 = load i8, i8* %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(i8* 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, i8* %ptr, i64 %off
147 %0 = load i8, i8* %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 i8*
172 %1 = load i8, i8* %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 i8*
196 %1 = load i8, i8* %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 i8*
222 %1 = load i8, i8* %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 i8*
248 %1 = load i8, i8* %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: lis r5, 15258
278 ; CHECK-P8-NEXT: and r3, r3, r4
279 ; CHECK-P8-NEXT: ori r4, r5, 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 i8*
288 %1 = load i8, i8* %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 i8*
330 %1 = load i8, i8* %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 i8*
370 %1 = load i8, i8* %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, i8* inttoptr (i64 4080 to i8*), 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, i8* inttoptr (i64 9999900 to i8*), 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, i8* inttoptr (i64 1000000000000 to i8*), 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 i8*
478 %1 = load i8, i8* %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(i8* 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, i8* %ptr, i64 8
502 %0 = load i8, i8* %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(i8* 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, i8* %ptr, i64 99999000
537 %0 = load i8, i8* %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(i8* 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, i8* %ptr, i64 1000000000000
575 %0 = load i8, i8* %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(i8* 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, i8* %ptr, i64 %off
598 %0 = load i8, i8* %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 i8*
625 %1 = load i8, i8* %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 i8*
651 %1 = load i8, i8* %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 i8*
679 %1 = load i8, i8* %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 i8*
707 %1 = load i8, i8* %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: lis r5, 15258
739 ; CHECK-P8-NEXT: and r3, r3, r4
740 ; CHECK-P8-NEXT: ori r4, r5, 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 i8*
750 %1 = load i8, i8* %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 i8*
795 %1 = load i8, i8* %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 i8*
838 %1 = load i8, i8* %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, i8* inttoptr (i64 4080 to i8*), 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, i8* inttoptr (i64 9999900 to i8*), 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, i8* inttoptr (i64 1000000000000 to i8*), 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 i16*
952 %1 = load i16, i16* %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(i8* 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, i8* %ptr, i64 8
974 %0 = bitcast i8* %add.ptr to i16*
975 %1 = load i16, i16* %0, align 2
976 %conv = uitofp i16 %1 to double
980 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
981 define dso_local double @ld_align32_double_uint16_t(i8* nocapture readonly %ptr) {
982 ; CHECK-P10-LABEL: ld_align32_double_uint16_t:
983 ; CHECK-P10: # %bb.0: # %entry
984 ; CHECK-P10-NEXT: pli r4, 99999000
985 ; CHECK-P10-NEXT: lxsihzx f0, r3, r4
986 ; CHECK-P10-NEXT: xscvuxddp f1, f0
987 ; CHECK-P10-NEXT: blr
989 ; CHECK-P9-LABEL: ld_align32_double_uint16_t:
990 ; CHECK-P9: # %bb.0: # %entry
991 ; CHECK-P9-NEXT: lis r4, 1525
992 ; CHECK-P9-NEXT: ori r4, r4, 56600
993 ; CHECK-P9-NEXT: lxsihzx f0, r3, r4
994 ; CHECK-P9-NEXT: xscvuxddp f1, f0
997 ; CHECK-P8-LABEL: ld_align32_double_uint16_t:
998 ; CHECK-P8: # %bb.0: # %entry
999 ; CHECK-P8-NEXT: lis r4, 1525
1000 ; CHECK-P8-NEXT: ori r4, r4, 56600
1001 ; CHECK-P8-NEXT: lhzx r3, r3, r4
1002 ; CHECK-P8-NEXT: mtfprwz f0, r3
1003 ; CHECK-P8-NEXT: xscvuxddp f1, f0
1004 ; CHECK-P8-NEXT: blr
1006 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
1007 %0 = bitcast i8* %add.ptr to i16*
1008 %1 = load i16, i16* %0, align 2
1009 %conv = uitofp i16 %1 to double
1013 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1014 define dso_local double @ld_align64_double_uint16_t(i8* nocapture readonly %ptr) {
1015 ; CHECK-P10-LABEL: ld_align64_double_uint16_t:
1016 ; CHECK-P10: # %bb.0: # %entry
1017 ; CHECK-P10-NEXT: pli r4, 244140625
1018 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
1019 ; CHECK-P10-NEXT: lxsihzx f0, r3, r4
1020 ; CHECK-P10-NEXT: xscvuxddp f1, f0
1021 ; CHECK-P10-NEXT: blr
1023 ; CHECK-P9-LABEL: ld_align64_double_uint16_t:
1024 ; CHECK-P9: # %bb.0: # %entry
1025 ; CHECK-P9-NEXT: lis r4, 3725
1026 ; CHECK-P9-NEXT: ori r4, r4, 19025
1027 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
1028 ; CHECK-P9-NEXT: lxsihzx f0, r3, r4
1029 ; CHECK-P9-NEXT: xscvuxddp f1, f0
1030 ; CHECK-P9-NEXT: blr
1032 ; CHECK-P8-LABEL: ld_align64_double_uint16_t:
1033 ; CHECK-P8: # %bb.0: # %entry
1034 ; CHECK-P8-NEXT: lis r4, 3725
1035 ; CHECK-P8-NEXT: ori r4, r4, 19025
1036 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
1037 ; CHECK-P8-NEXT: lhzx r3, r3, r4
1038 ; CHECK-P8-NEXT: mtfprwz f0, r3
1039 ; CHECK-P8-NEXT: xscvuxddp f1, f0
1040 ; CHECK-P8-NEXT: blr
1042 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
1043 %0 = bitcast i8* %add.ptr to i16*
1044 %1 = load i16, i16* %0, align 2
1045 %conv = uitofp i16 %1 to double
1049 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1050 define dso_local double @ld_reg_double_uint16_t(i8* nocapture readonly %ptr, i64 %off) {
1051 ; CHECK-POSTP8-LABEL: ld_reg_double_uint16_t:
1052 ; CHECK-POSTP8: # %bb.0: # %entry
1053 ; CHECK-POSTP8-NEXT: lxsihzx f0, r3, r4
1054 ; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
1055 ; CHECK-POSTP8-NEXT: blr
1057 ; CHECK-P8-LABEL: ld_reg_double_uint16_t:
1058 ; CHECK-P8: # %bb.0: # %entry
1059 ; CHECK-P8-NEXT: lhzx r3, r3, r4
1060 ; CHECK-P8-NEXT: mtfprwz f0, r3
1061 ; CHECK-P8-NEXT: xscvuxddp f1, f0
1062 ; CHECK-P8-NEXT: blr
1064 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
1065 %0 = bitcast i8* %add.ptr to i16*
1066 %1 = load i16, i16* %0, align 2
1067 %conv = uitofp i16 %1 to double
1071 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1072 define dso_local double @ld_or_double_uint16_t(i64 %ptr, i8 zeroext %off) {
1073 ; CHECK-POSTP8-LABEL: ld_or_double_uint16_t:
1074 ; CHECK-POSTP8: # %bb.0: # %entry
1075 ; CHECK-POSTP8-NEXT: or r3, r4, r3
1076 ; CHECK-POSTP8-NEXT: lxsihzx f0, 0, r3
1077 ; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
1078 ; CHECK-POSTP8-NEXT: blr
1080 ; CHECK-P8-LABEL: ld_or_double_uint16_t:
1081 ; CHECK-P8: # %bb.0: # %entry
1082 ; CHECK-P8-NEXT: or r3, r4, r3
1083 ; CHECK-P8-NEXT: lhz r3, 0(r3)
1084 ; CHECK-P8-NEXT: mtfprwz f0, r3
1085 ; CHECK-P8-NEXT: xscvuxddp f1, f0
1086 ; CHECK-P8-NEXT: blr
1088 %conv = zext i8 %off to i64
1089 %or = or i64 %conv, %ptr
1090 %0 = inttoptr i64 %or to i16*
1091 %1 = load i16, i16* %0, align 2
1092 %conv1 = uitofp i16 %1 to double
1096 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1097 define dso_local double @ld_not_disjoint16_double_uint16_t(i64 %ptr) {
1098 ; CHECK-POSTP8-LABEL: ld_not_disjoint16_double_uint16_t:
1099 ; CHECK-POSTP8: # %bb.0: # %entry
1100 ; CHECK-POSTP8-NEXT: ori r3, r3, 6
1101 ; CHECK-POSTP8-NEXT: lxsihzx f0, 0, r3
1102 ; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
1103 ; CHECK-POSTP8-NEXT: blr
1105 ; CHECK-P8-LABEL: ld_not_disjoint16_double_uint16_t:
1106 ; CHECK-P8: # %bb.0: # %entry
1107 ; CHECK-P8-NEXT: ori r3, r3, 6
1108 ; CHECK-P8-NEXT: lhz r3, 0(r3)
1109 ; CHECK-P8-NEXT: mtfprwz f0, r3
1110 ; CHECK-P8-NEXT: xscvuxddp f1, f0
1111 ; CHECK-P8-NEXT: blr
1113 %or = or i64 %ptr, 6
1114 %0 = inttoptr i64 %or to i16*
1115 %1 = load i16, i16* %0, align 2
1116 %conv = uitofp i16 %1 to double
1120 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1121 define dso_local double @ld_disjoint_align16_double_uint16_t(i64 %ptr) {
1122 ; CHECK-POSTP8-LABEL: ld_disjoint_align16_double_uint16_t:
1123 ; CHECK-POSTP8: # %bb.0: # %entry
1124 ; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
1125 ; CHECK-POSTP8-NEXT: ori r3, r3, 24
1126 ; CHECK-POSTP8-NEXT: lxsihzx f0, 0, r3
1127 ; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
1128 ; CHECK-POSTP8-NEXT: blr
1130 ; CHECK-P8-LABEL: ld_disjoint_align16_double_uint16_t:
1131 ; CHECK-P8: # %bb.0: # %entry
1132 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
1133 ; CHECK-P8-NEXT: lhz r3, 24(r3)
1134 ; CHECK-P8-NEXT: mtfprwz f0, r3
1135 ; CHECK-P8-NEXT: xscvuxddp f1, f0
1136 ; CHECK-P8-NEXT: blr
1138 %and = and i64 %ptr, -4096
1139 %or = or i64 %and, 24
1140 %0 = inttoptr i64 %or to i16*
1141 %1 = load i16, i16* %0, align 8
1142 %conv = uitofp i16 %1 to double
1146 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1147 define dso_local double @ld_not_disjoint32_double_uint16_t(i64 %ptr) {
1148 ; CHECK-POSTP8-LABEL: ld_not_disjoint32_double_uint16_t:
1149 ; CHECK-POSTP8: # %bb.0: # %entry
1150 ; CHECK-POSTP8-NEXT: ori r3, r3, 34463
1151 ; CHECK-POSTP8-NEXT: oris r3, r3, 1
1152 ; CHECK-POSTP8-NEXT: lxsihzx f0, 0, r3
1153 ; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
1154 ; CHECK-POSTP8-NEXT: blr
1156 ; CHECK-P8-LABEL: ld_not_disjoint32_double_uint16_t:
1157 ; CHECK-P8: # %bb.0: # %entry
1158 ; CHECK-P8-NEXT: ori r3, r3, 34463
1159 ; CHECK-P8-NEXT: oris r3, r3, 1
1160 ; CHECK-P8-NEXT: lhz r3, 0(r3)
1161 ; CHECK-P8-NEXT: mtfprwz f0, r3
1162 ; CHECK-P8-NEXT: xscvuxddp f1, f0
1163 ; CHECK-P8-NEXT: blr
1165 %or = or i64 %ptr, 99999
1166 %0 = inttoptr i64 %or to i16*
1167 %1 = load i16, i16* %0, align 2
1168 %conv = uitofp i16 %1 to double
1172 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1173 define dso_local double @ld_disjoint_align32_double_uint16_t(i64 %ptr) {
1174 ; CHECK-P10-LABEL: ld_disjoint_align32_double_uint16_t:
1175 ; CHECK-P10: # %bb.0: # %entry
1176 ; CHECK-P10-NEXT: lis r4, -15264
1177 ; CHECK-P10-NEXT: and r3, r3, r4
1178 ; CHECK-P10-NEXT: pli r4, 999990000
1179 ; CHECK-P10-NEXT: lxsihzx f0, r3, r4
1180 ; CHECK-P10-NEXT: xscvuxddp f1, f0
1181 ; CHECK-P10-NEXT: blr
1183 ; CHECK-P9-LABEL: ld_disjoint_align32_double_uint16_t:
1184 ; CHECK-P9: # %bb.0: # %entry
1185 ; CHECK-P9-NEXT: lis r4, -15264
1186 ; CHECK-P9-NEXT: and r3, r3, r4
1187 ; CHECK-P9-NEXT: lis r4, 15258
1188 ; CHECK-P9-NEXT: ori r4, r4, 41712
1189 ; CHECK-P9-NEXT: lxsihzx f0, r3, r4
1190 ; CHECK-P9-NEXT: xscvuxddp f1, f0
1191 ; CHECK-P9-NEXT: blr
1193 ; CHECK-P8-LABEL: ld_disjoint_align32_double_uint16_t:
1194 ; CHECK-P8: # %bb.0: # %entry
1195 ; CHECK-P8-NEXT: lis r4, -15264
1196 ; CHECK-P8-NEXT: lis r5, 15258
1197 ; CHECK-P8-NEXT: and r3, r3, r4
1198 ; CHECK-P8-NEXT: ori r4, r5, 41712
1199 ; CHECK-P8-NEXT: lhzx r3, r3, r4
1200 ; CHECK-P8-NEXT: mtfprwz f0, r3
1201 ; CHECK-P8-NEXT: xscvuxddp f1, f0
1202 ; CHECK-P8-NEXT: blr
1204 %and = and i64 %ptr, -1000341504
1205 %or = or i64 %and, 999990000
1206 %0 = inttoptr i64 %or to i16*
1207 %1 = load i16, i16* %0, align 16
1208 %conv = uitofp i16 %1 to double
1212 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1213 define dso_local double @ld_not_disjoint64_double_uint16_t(i64 %ptr) {
1214 ; CHECK-P10-LABEL: ld_not_disjoint64_double_uint16_t:
1215 ; CHECK-P10: # %bb.0: # %entry
1216 ; CHECK-P10-NEXT: pli r4, 232
1217 ; CHECK-P10-NEXT: pli r5, 3567587329
1218 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
1219 ; CHECK-P10-NEXT: or r3, r3, r5
1220 ; CHECK-P10-NEXT: lxsihzx f0, 0, r3
1221 ; CHECK-P10-NEXT: xscvuxddp f1, f0
1222 ; CHECK-P10-NEXT: blr
1224 ; CHECK-P9-LABEL: ld_not_disjoint64_double_uint16_t:
1225 ; CHECK-P9: # %bb.0: # %entry
1226 ; CHECK-P9-NEXT: li r4, 29
1227 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
1228 ; CHECK-P9-NEXT: oris r4, r4, 54437
1229 ; CHECK-P9-NEXT: ori r4, r4, 4097
1230 ; CHECK-P9-NEXT: or r3, r3, r4
1231 ; CHECK-P9-NEXT: lxsihzx f0, 0, r3
1232 ; CHECK-P9-NEXT: xscvuxddp f1, f0
1233 ; CHECK-P9-NEXT: blr
1235 ; CHECK-P8-LABEL: ld_not_disjoint64_double_uint16_t:
1236 ; CHECK-P8: # %bb.0: # %entry
1237 ; CHECK-P8-NEXT: li r4, 29
1238 ; CHECK-P8-NEXT: rldic r4, r4, 35, 24
1239 ; CHECK-P8-NEXT: oris r4, r4, 54437
1240 ; CHECK-P8-NEXT: ori r4, r4, 4097
1241 ; CHECK-P8-NEXT: or r3, r3, r4
1242 ; CHECK-P8-NEXT: lhz r3, 0(r3)
1243 ; CHECK-P8-NEXT: mtfprwz f0, r3
1244 ; CHECK-P8-NEXT: xscvuxddp f1, f0
1245 ; CHECK-P8-NEXT: blr
1247 %or = or i64 %ptr, 1000000000001
1248 %0 = inttoptr i64 %or to i16*
1249 %1 = load i16, i16* %0, align 2
1250 %conv = uitofp i16 %1 to double
1254 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1255 define dso_local double @ld_disjoint_align64_double_uint16_t(i64 %ptr) {
1256 ; CHECK-P10-LABEL: ld_disjoint_align64_double_uint16_t:
1257 ; CHECK-P10: # %bb.0: # %entry
1258 ; CHECK-P10-NEXT: pli r4, 244140625
1259 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
1260 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
1261 ; CHECK-P10-NEXT: lxsihzx f0, r3, r4
1262 ; CHECK-P10-NEXT: xscvuxddp f1, f0
1263 ; CHECK-P10-NEXT: blr
1265 ; CHECK-P9-LABEL: ld_disjoint_align64_double_uint16_t:
1266 ; CHECK-P9: # %bb.0: # %entry
1267 ; CHECK-P9-NEXT: lis r4, 3725
1268 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
1269 ; CHECK-P9-NEXT: ori r4, r4, 19025
1270 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
1271 ; CHECK-P9-NEXT: lxsihzx f0, r3, r4
1272 ; CHECK-P9-NEXT: xscvuxddp f1, f0
1273 ; CHECK-P9-NEXT: blr
1275 ; CHECK-P8-LABEL: ld_disjoint_align64_double_uint16_t:
1276 ; CHECK-P8: # %bb.0: # %entry
1277 ; CHECK-P8-NEXT: lis r4, 3725
1278 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
1279 ; CHECK-P8-NEXT: ori r4, r4, 19025
1280 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
1281 ; CHECK-P8-NEXT: lhzx r3, r3, r4
1282 ; CHECK-P8-NEXT: mtfprwz f0, r3
1283 ; CHECK-P8-NEXT: xscvuxddp f1, f0
1284 ; CHECK-P8-NEXT: blr
1286 %and = and i64 %ptr, -1099511627776
1287 %or = or i64 %and, 1000000000000
1288 %0 = inttoptr i64 %or to i16*
1289 %1 = load i16, i16* %0, align 4096
1290 %conv = uitofp i16 %1 to double
1294 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1295 define dso_local double @ld_cst_align16_double_uint16_t() {
1296 ; CHECK-POSTP8-LABEL: ld_cst_align16_double_uint16_t:
1297 ; CHECK-POSTP8: # %bb.0: # %entry
1298 ; CHECK-POSTP8-NEXT: li r3, 4080
1299 ; CHECK-POSTP8-NEXT: lxsihzx f0, 0, r3
1300 ; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
1301 ; CHECK-POSTP8-NEXT: blr
1303 ; CHECK-P8-LABEL: ld_cst_align16_double_uint16_t:
1304 ; CHECK-P8: # %bb.0: # %entry
1305 ; CHECK-P8-NEXT: lhz r3, 4080(0)
1306 ; CHECK-P8-NEXT: mtfprwz f0, r3
1307 ; CHECK-P8-NEXT: xscvuxddp f1, f0
1308 ; CHECK-P8-NEXT: blr
1310 %0 = load i16, i16* inttoptr (i64 4080 to i16*), align 16
1311 %conv = uitofp i16 %0 to double
1315 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1316 define dso_local double @ld_cst_align32_double_uint16_t() {
1317 ; CHECK-P10-LABEL: ld_cst_align32_double_uint16_t:
1318 ; CHECK-P10: # %bb.0: # %entry
1319 ; CHECK-P10-NEXT: pli r3, 9999900
1320 ; CHECK-P10-NEXT: lxsihzx f0, 0, r3
1321 ; CHECK-P10-NEXT: xscvuxddp f1, f0
1322 ; CHECK-P10-NEXT: blr
1324 ; CHECK-P9-LABEL: ld_cst_align32_double_uint16_t:
1325 ; CHECK-P9: # %bb.0: # %entry
1326 ; CHECK-P9-NEXT: lis r3, 152
1327 ; CHECK-P9-NEXT: ori r3, r3, 38428
1328 ; CHECK-P9-NEXT: lxsihzx f0, 0, r3
1329 ; CHECK-P9-NEXT: xscvuxddp f1, f0
1330 ; CHECK-P9-NEXT: blr
1332 ; CHECK-P8-LABEL: ld_cst_align32_double_uint16_t:
1333 ; CHECK-P8: # %bb.0: # %entry
1334 ; CHECK-P8-NEXT: lis r3, 153
1335 ; CHECK-P8-NEXT: lhz r3, -27108(r3)
1336 ; CHECK-P8-NEXT: mtfprwz f0, r3
1337 ; CHECK-P8-NEXT: xscvuxddp f1, f0
1338 ; CHECK-P8-NEXT: blr
1340 %0 = load i16, i16* inttoptr (i64 9999900 to i16*), align 4
1341 %conv = uitofp i16 %0 to double
1345 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1346 define dso_local double @ld_cst_align64_double_uint16_t() {
1347 ; CHECK-P10-LABEL: ld_cst_align64_double_uint16_t:
1348 ; CHECK-P10: # %bb.0: # %entry
1349 ; CHECK-P10-NEXT: pli r3, 244140625
1350 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
1351 ; CHECK-P10-NEXT: lxsihzx f0, 0, r3
1352 ; CHECK-P10-NEXT: xscvuxddp f1, f0
1353 ; CHECK-P10-NEXT: blr
1355 ; CHECK-P9-LABEL: ld_cst_align64_double_uint16_t:
1356 ; CHECK-P9: # %bb.0: # %entry
1357 ; CHECK-P9-NEXT: lis r3, 3725
1358 ; CHECK-P9-NEXT: ori r3, r3, 19025
1359 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
1360 ; CHECK-P9-NEXT: lxsihzx f0, 0, r3
1361 ; CHECK-P9-NEXT: xscvuxddp f1, f0
1362 ; CHECK-P9-NEXT: blr
1364 ; CHECK-P8-LABEL: ld_cst_align64_double_uint16_t:
1365 ; CHECK-P8: # %bb.0: # %entry
1366 ; CHECK-P8-NEXT: lis r3, 3725
1367 ; CHECK-P8-NEXT: ori r3, r3, 19025
1368 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
1369 ; CHECK-P8-NEXT: lhz r3, 0(r3)
1370 ; CHECK-P8-NEXT: mtfprwz f0, r3
1371 ; CHECK-P8-NEXT: xscvuxddp f1, f0
1372 ; CHECK-P8-NEXT: blr
1374 %0 = load i16, i16* inttoptr (i64 1000000000000 to i16*), align 4096
1375 %conv = uitofp i16 %0 to double
1379 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1380 define dso_local double @ld_0_double_int16_t(i64 %ptr) {
1381 ; CHECK-POSTP8-LABEL: ld_0_double_int16_t:
1382 ; CHECK-POSTP8: # %bb.0: # %entry
1383 ; CHECK-POSTP8-NEXT: lxsihzx v2, 0, r3
1384 ; CHECK-POSTP8-NEXT: vextsh2d v2, v2
1385 ; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
1386 ; CHECK-POSTP8-NEXT: blr
1388 ; CHECK-P8-LABEL: ld_0_double_int16_t:
1389 ; CHECK-P8: # %bb.0: # %entry
1390 ; CHECK-P8-NEXT: lha r3, 0(r3)
1391 ; CHECK-P8-NEXT: mtfprwa f0, r3
1392 ; CHECK-P8-NEXT: xscvsxddp f1, f0
1393 ; CHECK-P8-NEXT: blr
1395 %0 = inttoptr i64 %ptr to i16*
1396 %1 = load i16, i16* %0, align 2
1397 %conv = sitofp i16 %1 to double
1401 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1402 define dso_local double @ld_align16_double_int16_t(i8* nocapture readonly %ptr) {
1403 ; CHECK-POSTP8-LABEL: ld_align16_double_int16_t:
1404 ; CHECK-POSTP8: # %bb.0: # %entry
1405 ; CHECK-POSTP8-NEXT: addi r3, r3, 8
1406 ; CHECK-POSTP8-NEXT: lxsihzx v2, 0, r3
1407 ; CHECK-POSTP8-NEXT: vextsh2d v2, v2
1408 ; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
1409 ; CHECK-POSTP8-NEXT: blr
1411 ; CHECK-P8-LABEL: ld_align16_double_int16_t:
1412 ; CHECK-P8: # %bb.0: # %entry
1413 ; CHECK-P8-NEXT: lha r3, 8(r3)
1414 ; CHECK-P8-NEXT: mtfprwa f0, r3
1415 ; CHECK-P8-NEXT: xscvsxddp f1, f0
1416 ; CHECK-P8-NEXT: blr
1418 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
1419 %0 = bitcast i8* %add.ptr to i16*
1420 %1 = load i16, i16* %0, align 2
1421 %conv = sitofp i16 %1 to double
1425 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1426 define dso_local double @ld_align32_double_int16_t(i8* nocapture readonly %ptr) {
1427 ; CHECK-P10-LABEL: ld_align32_double_int16_t:
1428 ; CHECK-P10: # %bb.0: # %entry
1429 ; CHECK-P10-NEXT: pli r4, 99999000
1430 ; CHECK-P10-NEXT: lxsihzx v2, r3, r4
1431 ; CHECK-P10-NEXT: vextsh2d v2, v2
1432 ; CHECK-P10-NEXT: xscvsxddp f1, v2
1433 ; CHECK-P10-NEXT: blr
1435 ; CHECK-P9-LABEL: ld_align32_double_int16_t:
1436 ; CHECK-P9: # %bb.0: # %entry
1437 ; CHECK-P9-NEXT: lis r4, 1525
1438 ; CHECK-P9-NEXT: ori r4, r4, 56600
1439 ; CHECK-P9-NEXT: lxsihzx v2, r3, r4
1440 ; CHECK-P9-NEXT: vextsh2d v2, v2
1441 ; CHECK-P9-NEXT: xscvsxddp f1, v2
1442 ; CHECK-P9-NEXT: blr
1444 ; CHECK-P8-LABEL: ld_align32_double_int16_t:
1445 ; CHECK-P8: # %bb.0: # %entry
1446 ; CHECK-P8-NEXT: lis r4, 1525
1447 ; CHECK-P8-NEXT: ori r4, r4, 56600
1448 ; CHECK-P8-NEXT: lhax r3, r3, r4
1449 ; CHECK-P8-NEXT: mtfprwa f0, r3
1450 ; CHECK-P8-NEXT: xscvsxddp f1, f0
1451 ; CHECK-P8-NEXT: blr
1453 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
1454 %0 = bitcast i8* %add.ptr to i16*
1455 %1 = load i16, i16* %0, align 2
1456 %conv = sitofp i16 %1 to double
1460 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1461 define dso_local double @ld_align64_double_int16_t(i8* nocapture readonly %ptr) {
1462 ; CHECK-P10-LABEL: ld_align64_double_int16_t:
1463 ; CHECK-P10: # %bb.0: # %entry
1464 ; CHECK-P10-NEXT: pli r4, 244140625
1465 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
1466 ; CHECK-P10-NEXT: lxsihzx v2, r3, r4
1467 ; CHECK-P10-NEXT: vextsh2d v2, v2
1468 ; CHECK-P10-NEXT: xscvsxddp f1, v2
1469 ; CHECK-P10-NEXT: blr
1471 ; CHECK-P9-LABEL: ld_align64_double_int16_t:
1472 ; CHECK-P9: # %bb.0: # %entry
1473 ; CHECK-P9-NEXT: lis r4, 3725
1474 ; CHECK-P9-NEXT: ori r4, r4, 19025
1475 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
1476 ; CHECK-P9-NEXT: lxsihzx v2, r3, r4
1477 ; CHECK-P9-NEXT: vextsh2d v2, v2
1478 ; CHECK-P9-NEXT: xscvsxddp f1, v2
1479 ; CHECK-P9-NEXT: blr
1481 ; CHECK-P8-LABEL: ld_align64_double_int16_t:
1482 ; CHECK-P8: # %bb.0: # %entry
1483 ; CHECK-P8-NEXT: lis r4, 3725
1484 ; CHECK-P8-NEXT: ori r4, r4, 19025
1485 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
1486 ; CHECK-P8-NEXT: lhax r3, r3, r4
1487 ; CHECK-P8-NEXT: mtfprwa f0, r3
1488 ; CHECK-P8-NEXT: xscvsxddp f1, f0
1489 ; CHECK-P8-NEXT: blr
1491 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
1492 %0 = bitcast i8* %add.ptr to i16*
1493 %1 = load i16, i16* %0, align 2
1494 %conv = sitofp i16 %1 to double
1498 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1499 define dso_local double @ld_reg_double_int16_t(i8* nocapture readonly %ptr, i64 %off) {
1500 ; CHECK-POSTP8-LABEL: ld_reg_double_int16_t:
1501 ; CHECK-POSTP8: # %bb.0: # %entry
1502 ; CHECK-POSTP8-NEXT: lxsihzx v2, r3, r4
1503 ; CHECK-POSTP8-NEXT: vextsh2d v2, v2
1504 ; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
1505 ; CHECK-POSTP8-NEXT: blr
1507 ; CHECK-P8-LABEL: ld_reg_double_int16_t:
1508 ; CHECK-P8: # %bb.0: # %entry
1509 ; CHECK-P8-NEXT: lhax r3, r3, r4
1510 ; CHECK-P8-NEXT: mtfprwa f0, r3
1511 ; CHECK-P8-NEXT: xscvsxddp f1, f0
1512 ; CHECK-P8-NEXT: blr
1514 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
1515 %0 = bitcast i8* %add.ptr to i16*
1516 %1 = load i16, i16* %0, align 2
1517 %conv = sitofp i16 %1 to double
1521 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1522 define dso_local double @ld_or_double_int16_t(i64 %ptr, i8 zeroext %off) {
1523 ; CHECK-POSTP8-LABEL: ld_or_double_int16_t:
1524 ; CHECK-POSTP8: # %bb.0: # %entry
1525 ; CHECK-POSTP8-NEXT: or r3, r4, r3
1526 ; CHECK-POSTP8-NEXT: lxsihzx v2, 0, r3
1527 ; CHECK-POSTP8-NEXT: vextsh2d v2, v2
1528 ; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
1529 ; CHECK-POSTP8-NEXT: blr
1531 ; CHECK-P8-LABEL: ld_or_double_int16_t:
1532 ; CHECK-P8: # %bb.0: # %entry
1533 ; CHECK-P8-NEXT: or r3, r4, r3
1534 ; CHECK-P8-NEXT: lha r3, 0(r3)
1535 ; CHECK-P8-NEXT: mtfprwa f0, r3
1536 ; CHECK-P8-NEXT: xscvsxddp f1, f0
1537 ; CHECK-P8-NEXT: blr
1539 %conv = zext i8 %off to i64
1540 %or = or i64 %conv, %ptr
1541 %0 = inttoptr i64 %or to i16*
1542 %1 = load i16, i16* %0, align 2
1543 %conv1 = sitofp i16 %1 to double
1547 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1548 define dso_local double @ld_not_disjoint16_double_int16_t(i64 %ptr) {
1549 ; CHECK-POSTP8-LABEL: ld_not_disjoint16_double_int16_t:
1550 ; CHECK-POSTP8: # %bb.0: # %entry
1551 ; CHECK-POSTP8-NEXT: ori r3, r3, 6
1552 ; CHECK-POSTP8-NEXT: lxsihzx v2, 0, r3
1553 ; CHECK-POSTP8-NEXT: vextsh2d v2, v2
1554 ; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
1555 ; CHECK-POSTP8-NEXT: blr
1557 ; CHECK-P8-LABEL: ld_not_disjoint16_double_int16_t:
1558 ; CHECK-P8: # %bb.0: # %entry
1559 ; CHECK-P8-NEXT: ori r3, r3, 6
1560 ; CHECK-P8-NEXT: lha r3, 0(r3)
1561 ; CHECK-P8-NEXT: mtfprwa f0, r3
1562 ; CHECK-P8-NEXT: xscvsxddp f1, f0
1563 ; CHECK-P8-NEXT: blr
1565 %or = or i64 %ptr, 6
1566 %0 = inttoptr i64 %or to i16*
1567 %1 = load i16, i16* %0, align 2
1568 %conv = sitofp i16 %1 to double
1572 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1573 define dso_local double @ld_disjoint_align16_double_int16_t(i64 %ptr) {
1574 ; CHECK-POSTP8-LABEL: ld_disjoint_align16_double_int16_t:
1575 ; CHECK-POSTP8: # %bb.0: # %entry
1576 ; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
1577 ; CHECK-POSTP8-NEXT: ori r3, r3, 24
1578 ; CHECK-POSTP8-NEXT: lxsihzx v2, 0, r3
1579 ; CHECK-POSTP8-NEXT: vextsh2d v2, v2
1580 ; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
1581 ; CHECK-POSTP8-NEXT: blr
1583 ; CHECK-P8-LABEL: ld_disjoint_align16_double_int16_t:
1584 ; CHECK-P8: # %bb.0: # %entry
1585 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
1586 ; CHECK-P8-NEXT: lha r3, 24(r3)
1587 ; CHECK-P8-NEXT: mtfprwa f0, r3
1588 ; CHECK-P8-NEXT: xscvsxddp f1, f0
1589 ; CHECK-P8-NEXT: blr
1591 %and = and i64 %ptr, -4096
1592 %or = or i64 %and, 24
1593 %0 = inttoptr i64 %or to i16*
1594 %1 = load i16, i16* %0, align 8
1595 %conv = sitofp i16 %1 to double
1599 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1600 define dso_local double @ld_not_disjoint32_double_int16_t(i64 %ptr) {
1601 ; CHECK-POSTP8-LABEL: ld_not_disjoint32_double_int16_t:
1602 ; CHECK-POSTP8: # %bb.0: # %entry
1603 ; CHECK-POSTP8-NEXT: ori r3, r3, 34463
1604 ; CHECK-POSTP8-NEXT: oris r3, r3, 1
1605 ; CHECK-POSTP8-NEXT: lxsihzx v2, 0, r3
1606 ; CHECK-POSTP8-NEXT: vextsh2d v2, v2
1607 ; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
1608 ; CHECK-POSTP8-NEXT: blr
1610 ; CHECK-P8-LABEL: ld_not_disjoint32_double_int16_t:
1611 ; CHECK-P8: # %bb.0: # %entry
1612 ; CHECK-P8-NEXT: ori r3, r3, 34463
1613 ; CHECK-P8-NEXT: oris r3, r3, 1
1614 ; CHECK-P8-NEXT: lha r3, 0(r3)
1615 ; CHECK-P8-NEXT: mtfprwa f0, r3
1616 ; CHECK-P8-NEXT: xscvsxddp f1, f0
1617 ; CHECK-P8-NEXT: blr
1619 %or = or i64 %ptr, 99999
1620 %0 = inttoptr i64 %or to i16*
1621 %1 = load i16, i16* %0, align 2
1622 %conv = sitofp i16 %1 to double
1626 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1627 define dso_local double @ld_disjoint_align32_double_int16_t(i64 %ptr) {
1628 ; CHECK-P10-LABEL: ld_disjoint_align32_double_int16_t:
1629 ; CHECK-P10: # %bb.0: # %entry
1630 ; CHECK-P10-NEXT: lis r4, -15264
1631 ; CHECK-P10-NEXT: and r3, r3, r4
1632 ; CHECK-P10-NEXT: pli r4, 999990000
1633 ; CHECK-P10-NEXT: lxsihzx v2, r3, r4
1634 ; CHECK-P10-NEXT: vextsh2d v2, v2
1635 ; CHECK-P10-NEXT: xscvsxddp f1, v2
1636 ; CHECK-P10-NEXT: blr
1638 ; CHECK-P9-LABEL: ld_disjoint_align32_double_int16_t:
1639 ; CHECK-P9: # %bb.0: # %entry
1640 ; CHECK-P9-NEXT: lis r4, -15264
1641 ; CHECK-P9-NEXT: and r3, r3, r4
1642 ; CHECK-P9-NEXT: lis r4, 15258
1643 ; CHECK-P9-NEXT: ori r4, r4, 41712
1644 ; CHECK-P9-NEXT: lxsihzx v2, r3, r4
1645 ; CHECK-P9-NEXT: vextsh2d v2, v2
1646 ; CHECK-P9-NEXT: xscvsxddp f1, v2
1647 ; CHECK-P9-NEXT: blr
1649 ; CHECK-P8-LABEL: ld_disjoint_align32_double_int16_t:
1650 ; CHECK-P8: # %bb.0: # %entry
1651 ; CHECK-P8-NEXT: lis r4, -15264
1652 ; CHECK-P8-NEXT: lis r5, 15258
1653 ; CHECK-P8-NEXT: and r3, r3, r4
1654 ; CHECK-P8-NEXT: ori r4, r5, 41712
1655 ; CHECK-P8-NEXT: lhax r3, r3, r4
1656 ; CHECK-P8-NEXT: mtfprwa f0, r3
1657 ; CHECK-P8-NEXT: xscvsxddp f1, f0
1658 ; CHECK-P8-NEXT: blr
1660 %and = and i64 %ptr, -1000341504
1661 %or = or i64 %and, 999990000
1662 %0 = inttoptr i64 %or to i16*
1663 %1 = load i16, i16* %0, align 16
1664 %conv = sitofp i16 %1 to double
1668 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1669 define dso_local double @ld_not_disjoint64_double_int16_t(i64 %ptr) {
1670 ; CHECK-P10-LABEL: ld_not_disjoint64_double_int16_t:
1671 ; CHECK-P10: # %bb.0: # %entry
1672 ; CHECK-P10-NEXT: pli r4, 232
1673 ; CHECK-P10-NEXT: pli r5, 3567587329
1674 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
1675 ; CHECK-P10-NEXT: or r3, r3, r5
1676 ; CHECK-P10-NEXT: lxsihzx v2, 0, r3
1677 ; CHECK-P10-NEXT: vextsh2d v2, v2
1678 ; CHECK-P10-NEXT: xscvsxddp f1, v2
1679 ; CHECK-P10-NEXT: blr
1681 ; CHECK-P9-LABEL: ld_not_disjoint64_double_int16_t:
1682 ; CHECK-P9: # %bb.0: # %entry
1683 ; CHECK-P9-NEXT: li r4, 29
1684 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
1685 ; CHECK-P9-NEXT: oris r4, r4, 54437
1686 ; CHECK-P9-NEXT: ori r4, r4, 4097
1687 ; CHECK-P9-NEXT: or r3, r3, r4
1688 ; CHECK-P9-NEXT: lxsihzx v2, 0, r3
1689 ; CHECK-P9-NEXT: vextsh2d v2, v2
1690 ; CHECK-P9-NEXT: xscvsxddp f1, v2
1691 ; CHECK-P9-NEXT: blr
1693 ; CHECK-P8-LABEL: ld_not_disjoint64_double_int16_t:
1694 ; CHECK-P8: # %bb.0: # %entry
1695 ; CHECK-P8-NEXT: li r4, 29
1696 ; CHECK-P8-NEXT: rldic r4, r4, 35, 24
1697 ; CHECK-P8-NEXT: oris r4, r4, 54437
1698 ; CHECK-P8-NEXT: ori r4, r4, 4097
1699 ; CHECK-P8-NEXT: or r3, r3, r4
1700 ; CHECK-P8-NEXT: lha r3, 0(r3)
1701 ; CHECK-P8-NEXT: mtfprwa f0, r3
1702 ; CHECK-P8-NEXT: xscvsxddp f1, f0
1703 ; CHECK-P8-NEXT: blr
1705 %or = or i64 %ptr, 1000000000001
1706 %0 = inttoptr i64 %or to i16*
1707 %1 = load i16, i16* %0, align 2
1708 %conv = sitofp i16 %1 to double
1712 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1713 define dso_local double @ld_disjoint_align64_double_int16_t(i64 %ptr) {
1714 ; CHECK-P10-LABEL: ld_disjoint_align64_double_int16_t:
1715 ; CHECK-P10: # %bb.0: # %entry
1716 ; CHECK-P10-NEXT: pli r4, 244140625
1717 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
1718 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
1719 ; CHECK-P10-NEXT: lxsihzx v2, r3, r4
1720 ; CHECK-P10-NEXT: vextsh2d v2, v2
1721 ; CHECK-P10-NEXT: xscvsxddp f1, v2
1722 ; CHECK-P10-NEXT: blr
1724 ; CHECK-P9-LABEL: ld_disjoint_align64_double_int16_t:
1725 ; CHECK-P9: # %bb.0: # %entry
1726 ; CHECK-P9-NEXT: lis r4, 3725
1727 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
1728 ; CHECK-P9-NEXT: ori r4, r4, 19025
1729 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
1730 ; CHECK-P9-NEXT: lxsihzx v2, r3, r4
1731 ; CHECK-P9-NEXT: vextsh2d v2, v2
1732 ; CHECK-P9-NEXT: xscvsxddp f1, v2
1733 ; CHECK-P9-NEXT: blr
1735 ; CHECK-P8-LABEL: ld_disjoint_align64_double_int16_t:
1736 ; CHECK-P8: # %bb.0: # %entry
1737 ; CHECK-P8-NEXT: lis r4, 3725
1738 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
1739 ; CHECK-P8-NEXT: ori r4, r4, 19025
1740 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
1741 ; CHECK-P8-NEXT: lhax r3, r3, r4
1742 ; CHECK-P8-NEXT: mtfprwa f0, r3
1743 ; CHECK-P8-NEXT: xscvsxddp f1, f0
1744 ; CHECK-P8-NEXT: blr
1746 %and = and i64 %ptr, -1099511627776
1747 %or = or i64 %and, 1000000000000
1748 %0 = inttoptr i64 %or to i16*
1749 %1 = load i16, i16* %0, align 4096
1750 %conv = sitofp i16 %1 to double
1754 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1755 define dso_local double @ld_cst_align16_double_int16_t() {
1756 ; CHECK-POSTP8-LABEL: ld_cst_align16_double_int16_t:
1757 ; CHECK-POSTP8: # %bb.0: # %entry
1758 ; CHECK-POSTP8-NEXT: li r3, 4080
1759 ; CHECK-POSTP8-NEXT: lxsihzx v2, 0, r3
1760 ; CHECK-POSTP8-NEXT: vextsh2d v2, v2
1761 ; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
1762 ; CHECK-POSTP8-NEXT: blr
1764 ; CHECK-P8-LABEL: ld_cst_align16_double_int16_t:
1765 ; CHECK-P8: # %bb.0: # %entry
1766 ; CHECK-P8-NEXT: lha r3, 4080(0)
1767 ; CHECK-P8-NEXT: mtfprwa f0, r3
1768 ; CHECK-P8-NEXT: xscvsxddp f1, f0
1769 ; CHECK-P8-NEXT: blr
1771 %0 = load i16, i16* inttoptr (i64 4080 to i16*), align 16
1772 %conv = sitofp i16 %0 to double
1776 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1777 define dso_local double @ld_cst_align32_double_int16_t() {
1778 ; CHECK-P10-LABEL: ld_cst_align32_double_int16_t:
1779 ; CHECK-P10: # %bb.0: # %entry
1780 ; CHECK-P10-NEXT: pli r3, 9999900
1781 ; CHECK-P10-NEXT: lxsihzx v2, 0, r3
1782 ; CHECK-P10-NEXT: vextsh2d v2, v2
1783 ; CHECK-P10-NEXT: xscvsxddp f1, v2
1784 ; CHECK-P10-NEXT: blr
1786 ; CHECK-P9-LABEL: ld_cst_align32_double_int16_t:
1787 ; CHECK-P9: # %bb.0: # %entry
1788 ; CHECK-P9-NEXT: lis r3, 152
1789 ; CHECK-P9-NEXT: ori r3, r3, 38428
1790 ; CHECK-P9-NEXT: lxsihzx v2, 0, r3
1791 ; CHECK-P9-NEXT: vextsh2d v2, v2
1792 ; CHECK-P9-NEXT: xscvsxddp f1, v2
1793 ; CHECK-P9-NEXT: blr
1795 ; CHECK-P8-LABEL: ld_cst_align32_double_int16_t:
1796 ; CHECK-P8: # %bb.0: # %entry
1797 ; CHECK-P8-NEXT: lis r3, 153
1798 ; CHECK-P8-NEXT: lha r3, -27108(r3)
1799 ; CHECK-P8-NEXT: mtfprwa f0, r3
1800 ; CHECK-P8-NEXT: xscvsxddp f1, f0
1801 ; CHECK-P8-NEXT: blr
1803 %0 = load i16, i16* inttoptr (i64 9999900 to i16*), align 4
1804 %conv = sitofp i16 %0 to double
1808 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1809 define dso_local double @ld_cst_align64_double_int16_t() {
1810 ; CHECK-P10-LABEL: ld_cst_align64_double_int16_t:
1811 ; CHECK-P10: # %bb.0: # %entry
1812 ; CHECK-P10-NEXT: pli r3, 244140625
1813 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
1814 ; CHECK-P10-NEXT: lxsihzx v2, 0, r3
1815 ; CHECK-P10-NEXT: vextsh2d v2, v2
1816 ; CHECK-P10-NEXT: xscvsxddp f1, v2
1817 ; CHECK-P10-NEXT: blr
1819 ; CHECK-P9-LABEL: ld_cst_align64_double_int16_t:
1820 ; CHECK-P9: # %bb.0: # %entry
1821 ; CHECK-P9-NEXT: lis r3, 3725
1822 ; CHECK-P9-NEXT: ori r3, r3, 19025
1823 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
1824 ; CHECK-P9-NEXT: lxsihzx v2, 0, r3
1825 ; CHECK-P9-NEXT: vextsh2d v2, v2
1826 ; CHECK-P9-NEXT: xscvsxddp f1, v2
1827 ; CHECK-P9-NEXT: blr
1829 ; CHECK-P8-LABEL: ld_cst_align64_double_int16_t:
1830 ; CHECK-P8: # %bb.0: # %entry
1831 ; CHECK-P8-NEXT: lis r3, 3725
1832 ; CHECK-P8-NEXT: ori r3, r3, 19025
1833 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
1834 ; CHECK-P8-NEXT: lha r3, 0(r3)
1835 ; CHECK-P8-NEXT: mtfprwa f0, r3
1836 ; CHECK-P8-NEXT: xscvsxddp f1, f0
1837 ; CHECK-P8-NEXT: blr
1839 %0 = load i16, i16* inttoptr (i64 1000000000000 to i16*), align 4096
1840 %conv = sitofp i16 %0 to double
1844 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1845 define dso_local double @ld_0_double_uint32_t(i64 %ptr) {
1846 ; CHECK-LABEL: ld_0_double_uint32_t:
1847 ; CHECK: # %bb.0: # %entry
1848 ; CHECK-NEXT: lfiwzx f0, 0, r3
1849 ; CHECK-NEXT: xscvuxddp f1, f0
1852 %0 = inttoptr i64 %ptr to i32*
1853 %1 = load i32, i32* %0, align 4
1854 %conv = uitofp i32 %1 to double
1858 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1859 define dso_local double @ld_align16_double_uint32_t(i8* nocapture readonly %ptr) {
1860 ; CHECK-LABEL: ld_align16_double_uint32_t:
1861 ; CHECK: # %bb.0: # %entry
1862 ; CHECK-NEXT: addi r3, r3, 8
1863 ; CHECK-NEXT: lfiwzx f0, 0, r3
1864 ; CHECK-NEXT: xscvuxddp f1, f0
1867 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
1868 %0 = bitcast i8* %add.ptr to i32*
1869 %1 = load i32, i32* %0, align 4
1870 %conv = uitofp i32 %1 to double
1874 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1875 define dso_local double @ld_align32_double_uint32_t(i8* nocapture readonly %ptr) {
1876 ; CHECK-P10-LABEL: ld_align32_double_uint32_t:
1877 ; CHECK-P10: # %bb.0: # %entry
1878 ; CHECK-P10-NEXT: pli r4, 99999000
1879 ; CHECK-P10-NEXT: lfiwzx f0, r3, r4
1880 ; CHECK-P10-NEXT: xscvuxddp f1, f0
1881 ; CHECK-P10-NEXT: blr
1883 ; CHECK-PREP10-LABEL: ld_align32_double_uint32_t:
1884 ; CHECK-PREP10: # %bb.0: # %entry
1885 ; CHECK-PREP10-NEXT: lis r4, 1525
1886 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
1887 ; CHECK-PREP10-NEXT: lfiwzx f0, r3, r4
1888 ; CHECK-PREP10-NEXT: xscvuxddp f1, f0
1889 ; CHECK-PREP10-NEXT: blr
1891 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
1892 %0 = bitcast i8* %add.ptr to i32*
1893 %1 = load i32, i32* %0, align 4
1894 %conv = uitofp i32 %1 to double
1898 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1899 define dso_local double @ld_align64_double_uint32_t(i8* nocapture readonly %ptr) {
1900 ; CHECK-P10-LABEL: ld_align64_double_uint32_t:
1901 ; CHECK-P10: # %bb.0: # %entry
1902 ; CHECK-P10-NEXT: pli r4, 244140625
1903 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
1904 ; CHECK-P10-NEXT: lfiwzx f0, r3, r4
1905 ; CHECK-P10-NEXT: xscvuxddp f1, f0
1906 ; CHECK-P10-NEXT: blr
1908 ; CHECK-PREP10-LABEL: ld_align64_double_uint32_t:
1909 ; CHECK-PREP10: # %bb.0: # %entry
1910 ; CHECK-PREP10-NEXT: lis r4, 3725
1911 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
1912 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
1913 ; CHECK-PREP10-NEXT: lfiwzx f0, r3, r4
1914 ; CHECK-PREP10-NEXT: xscvuxddp f1, f0
1915 ; CHECK-PREP10-NEXT: blr
1917 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
1918 %0 = bitcast i8* %add.ptr to i32*
1919 %1 = load i32, i32* %0, align 4
1920 %conv = uitofp i32 %1 to double
1924 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1925 define dso_local double @ld_reg_double_uint32_t(i8* nocapture readonly %ptr, i64 %off) {
1926 ; CHECK-LABEL: ld_reg_double_uint32_t:
1927 ; CHECK: # %bb.0: # %entry
1928 ; CHECK-NEXT: lfiwzx f0, r3, r4
1929 ; CHECK-NEXT: xscvuxddp f1, f0
1932 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
1933 %0 = bitcast i8* %add.ptr to i32*
1934 %1 = load i32, i32* %0, align 4
1935 %conv = uitofp i32 %1 to double
1939 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1940 define dso_local double @ld_or_double_uint32_t(i64 %ptr, i8 zeroext %off) {
1941 ; CHECK-LABEL: ld_or_double_uint32_t:
1942 ; CHECK: # %bb.0: # %entry
1943 ; CHECK-NEXT: or r3, r4, r3
1944 ; CHECK-NEXT: lfiwzx f0, 0, r3
1945 ; CHECK-NEXT: xscvuxddp f1, f0
1948 %conv = zext i8 %off to i64
1949 %or = or i64 %conv, %ptr
1950 %0 = inttoptr i64 %or to i32*
1951 %1 = load i32, i32* %0, align 4
1952 %conv1 = uitofp i32 %1 to double
1956 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1957 define dso_local double @ld_not_disjoint16_double_uint32_t(i64 %ptr) {
1958 ; CHECK-LABEL: ld_not_disjoint16_double_uint32_t:
1959 ; CHECK: # %bb.0: # %entry
1960 ; CHECK-NEXT: ori r3, r3, 6
1961 ; CHECK-NEXT: lfiwzx f0, 0, r3
1962 ; CHECK-NEXT: xscvuxddp f1, f0
1965 %or = or i64 %ptr, 6
1966 %0 = inttoptr i64 %or to i32*
1967 %1 = load i32, i32* %0, align 4
1968 %conv = uitofp i32 %1 to double
1972 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1973 define dso_local double @ld_disjoint_align16_double_uint32_t(i64 %ptr) {
1974 ; CHECK-LABEL: ld_disjoint_align16_double_uint32_t:
1975 ; CHECK: # %bb.0: # %entry
1976 ; CHECK-NEXT: rldicr r3, r3, 0, 51
1977 ; CHECK-NEXT: ori r3, r3, 24
1978 ; CHECK-NEXT: lfiwzx f0, 0, r3
1979 ; CHECK-NEXT: xscvuxddp f1, f0
1982 %and = and i64 %ptr, -4096
1983 %or = or i64 %and, 24
1984 %0 = inttoptr i64 %or to i32*
1985 %1 = load i32, i32* %0, align 8
1986 %conv = uitofp i32 %1 to double
1990 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1991 define dso_local double @ld_not_disjoint32_double_uint32_t(i64 %ptr) {
1992 ; CHECK-LABEL: ld_not_disjoint32_double_uint32_t:
1993 ; CHECK: # %bb.0: # %entry
1994 ; CHECK-NEXT: ori r3, r3, 34463
1995 ; CHECK-NEXT: oris r3, r3, 1
1996 ; CHECK-NEXT: lfiwzx f0, 0, r3
1997 ; CHECK-NEXT: xscvuxddp f1, f0
2000 %or = or i64 %ptr, 99999
2001 %0 = inttoptr i64 %or to i32*
2002 %1 = load i32, i32* %0, align 4
2003 %conv = uitofp i32 %1 to double
2007 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2008 define dso_local double @ld_disjoint_align32_double_uint32_t(i64 %ptr) {
2009 ; CHECK-P10-LABEL: ld_disjoint_align32_double_uint32_t:
2010 ; CHECK-P10: # %bb.0: # %entry
2011 ; CHECK-P10-NEXT: lis r4, -15264
2012 ; CHECK-P10-NEXT: and r3, r3, r4
2013 ; CHECK-P10-NEXT: pli r4, 999990000
2014 ; CHECK-P10-NEXT: lfiwzx f0, r3, r4
2015 ; CHECK-P10-NEXT: xscvuxddp f1, f0
2016 ; CHECK-P10-NEXT: blr
2018 ; CHECK-P9-LABEL: ld_disjoint_align32_double_uint32_t:
2019 ; CHECK-P9: # %bb.0: # %entry
2020 ; CHECK-P9-NEXT: lis r4, -15264
2021 ; CHECK-P9-NEXT: and r3, r3, r4
2022 ; CHECK-P9-NEXT: lis r4, 15258
2023 ; CHECK-P9-NEXT: ori r4, r4, 41712
2024 ; CHECK-P9-NEXT: lfiwzx f0, r3, r4
2025 ; CHECK-P9-NEXT: xscvuxddp f1, f0
2026 ; CHECK-P9-NEXT: blr
2028 ; CHECK-P8-LABEL: ld_disjoint_align32_double_uint32_t:
2029 ; CHECK-P8: # %bb.0: # %entry
2030 ; CHECK-P8-NEXT: lis r4, -15264
2031 ; CHECK-P8-NEXT: lis r5, 15258
2032 ; CHECK-P8-NEXT: and r3, r3, r4
2033 ; CHECK-P8-NEXT: ori r4, r5, 41712
2034 ; CHECK-P8-NEXT: lfiwzx f0, r3, r4
2035 ; CHECK-P8-NEXT: xscvuxddp f1, f0
2036 ; CHECK-P8-NEXT: blr
2038 %and = and i64 %ptr, -1000341504
2039 %or = or i64 %and, 999990000
2040 %0 = inttoptr i64 %or to i32*
2041 %1 = load i32, i32* %0, align 16
2042 %conv = uitofp i32 %1 to double
2046 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2047 define dso_local double @ld_not_disjoint64_double_uint32_t(i64 %ptr) {
2048 ; CHECK-P10-LABEL: ld_not_disjoint64_double_uint32_t:
2049 ; CHECK-P10: # %bb.0: # %entry
2050 ; CHECK-P10-NEXT: pli r4, 232
2051 ; CHECK-P10-NEXT: pli r5, 3567587329
2052 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2053 ; CHECK-P10-NEXT: or r3, r3, r5
2054 ; CHECK-P10-NEXT: lfiwzx f0, 0, r3
2055 ; CHECK-P10-NEXT: xscvuxddp f1, f0
2056 ; CHECK-P10-NEXT: blr
2058 ; CHECK-PREP10-LABEL: ld_not_disjoint64_double_uint32_t:
2059 ; CHECK-PREP10: # %bb.0: # %entry
2060 ; CHECK-PREP10-NEXT: li r4, 29
2061 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2062 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2063 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2064 ; CHECK-PREP10-NEXT: or r3, r3, r4
2065 ; CHECK-PREP10-NEXT: lfiwzx f0, 0, r3
2066 ; CHECK-PREP10-NEXT: xscvuxddp f1, f0
2067 ; CHECK-PREP10-NEXT: blr
2069 %or = or i64 %ptr, 1000000000001
2070 %0 = inttoptr i64 %or to i32*
2071 %1 = load i32, i32* %0, align 4
2072 %conv = uitofp i32 %1 to double
2076 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2077 define dso_local double @ld_disjoint_align64_double_uint32_t(i64 %ptr) {
2078 ; CHECK-P10-LABEL: ld_disjoint_align64_double_uint32_t:
2079 ; CHECK-P10: # %bb.0: # %entry
2080 ; CHECK-P10-NEXT: pli r4, 244140625
2081 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
2082 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2083 ; CHECK-P10-NEXT: lfiwzx f0, r3, r4
2084 ; CHECK-P10-NEXT: xscvuxddp f1, f0
2085 ; CHECK-P10-NEXT: blr
2087 ; CHECK-PREP10-LABEL: ld_disjoint_align64_double_uint32_t:
2088 ; CHECK-PREP10: # %bb.0: # %entry
2089 ; CHECK-PREP10-NEXT: lis r4, 3725
2090 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
2091 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2092 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2093 ; CHECK-PREP10-NEXT: lfiwzx f0, r3, r4
2094 ; CHECK-PREP10-NEXT: xscvuxddp f1, f0
2095 ; CHECK-PREP10-NEXT: blr
2097 %and = and i64 %ptr, -1099511627776
2098 %or = or i64 %and, 1000000000000
2099 %0 = inttoptr i64 %or to i32*
2100 %1 = load i32, i32* %0, align 4096
2101 %conv = uitofp i32 %1 to double
2105 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2106 define dso_local double @ld_cst_align16_double_uint32_t() {
2107 ; CHECK-LABEL: ld_cst_align16_double_uint32_t:
2108 ; CHECK: # %bb.0: # %entry
2109 ; CHECK-NEXT: li r3, 4080
2110 ; CHECK-NEXT: lfiwzx f0, 0, r3
2111 ; CHECK-NEXT: xscvuxddp f1, f0
2114 %0 = load i32, i32* inttoptr (i64 4080 to i32*), align 16
2115 %conv = uitofp i32 %0 to double
2119 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2120 define dso_local double @ld_cst_align32_double_uint32_t() {
2121 ; CHECK-P10-LABEL: ld_cst_align32_double_uint32_t:
2122 ; CHECK-P10: # %bb.0: # %entry
2123 ; CHECK-P10-NEXT: pli r3, 9999900
2124 ; CHECK-P10-NEXT: lfiwzx f0, 0, r3
2125 ; CHECK-P10-NEXT: xscvuxddp f1, f0
2126 ; CHECK-P10-NEXT: blr
2128 ; CHECK-PREP10-LABEL: ld_cst_align32_double_uint32_t:
2129 ; CHECK-PREP10: # %bb.0: # %entry
2130 ; CHECK-PREP10-NEXT: lis r3, 152
2131 ; CHECK-PREP10-NEXT: ori r3, r3, 38428
2132 ; CHECK-PREP10-NEXT: lfiwzx f0, 0, r3
2133 ; CHECK-PREP10-NEXT: xscvuxddp f1, f0
2134 ; CHECK-PREP10-NEXT: blr
2136 %0 = load i32, i32* inttoptr (i64 9999900 to i32*), align 4
2137 %conv = uitofp i32 %0 to double
2141 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2142 define dso_local double @ld_cst_align64_double_uint32_t() {
2143 ; CHECK-P10-LABEL: ld_cst_align64_double_uint32_t:
2144 ; CHECK-P10: # %bb.0: # %entry
2145 ; CHECK-P10-NEXT: pli r3, 244140625
2146 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
2147 ; CHECK-P10-NEXT: lfiwzx f0, 0, r3
2148 ; CHECK-P10-NEXT: xscvuxddp f1, f0
2149 ; CHECK-P10-NEXT: blr
2151 ; CHECK-PREP10-LABEL: ld_cst_align64_double_uint32_t:
2152 ; CHECK-PREP10: # %bb.0: # %entry
2153 ; CHECK-PREP10-NEXT: lis r3, 3725
2154 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
2155 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
2156 ; CHECK-PREP10-NEXT: lfiwzx f0, 0, r3
2157 ; CHECK-PREP10-NEXT: xscvuxddp f1, f0
2158 ; CHECK-PREP10-NEXT: blr
2160 %0 = load i32, i32* inttoptr (i64 1000000000000 to i32*), align 4096
2161 %conv = uitofp i32 %0 to double
2165 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2166 define dso_local double @ld_0_double_int32_t(i64 %ptr) {
2167 ; CHECK-LABEL: ld_0_double_int32_t:
2168 ; CHECK: # %bb.0: # %entry
2169 ; CHECK-NEXT: lfiwax f0, 0, r3
2170 ; CHECK-NEXT: xscvsxddp f1, f0
2173 %0 = inttoptr i64 %ptr to i32*
2174 %1 = load i32, i32* %0, align 4
2175 %conv = sitofp i32 %1 to double
2179 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2180 define dso_local double @ld_align16_double_int32_t(i8* nocapture readonly %ptr) {
2181 ; CHECK-LABEL: ld_align16_double_int32_t:
2182 ; CHECK: # %bb.0: # %entry
2183 ; CHECK-NEXT: addi r3, r3, 8
2184 ; CHECK-NEXT: lfiwax f0, 0, r3
2185 ; CHECK-NEXT: xscvsxddp f1, f0
2188 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
2189 %0 = bitcast i8* %add.ptr to i32*
2190 %1 = load i32, i32* %0, align 4
2191 %conv = sitofp i32 %1 to double
2195 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2196 define dso_local double @ld_align32_double_int32_t(i8* nocapture readonly %ptr) {
2197 ; CHECK-P10-LABEL: ld_align32_double_int32_t:
2198 ; CHECK-P10: # %bb.0: # %entry
2199 ; CHECK-P10-NEXT: pli r4, 99999000
2200 ; CHECK-P10-NEXT: lfiwax f0, r3, r4
2201 ; CHECK-P10-NEXT: xscvsxddp f1, f0
2202 ; CHECK-P10-NEXT: blr
2204 ; CHECK-PREP10-LABEL: ld_align32_double_int32_t:
2205 ; CHECK-PREP10: # %bb.0: # %entry
2206 ; CHECK-PREP10-NEXT: lis r4, 1525
2207 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
2208 ; CHECK-PREP10-NEXT: lfiwax f0, r3, r4
2209 ; CHECK-PREP10-NEXT: xscvsxddp f1, f0
2210 ; CHECK-PREP10-NEXT: blr
2212 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
2213 %0 = bitcast i8* %add.ptr to i32*
2214 %1 = load i32, i32* %0, align 4
2215 %conv = sitofp i32 %1 to double
2219 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2220 define dso_local double @ld_align64_double_int32_t(i8* nocapture readonly %ptr) {
2221 ; CHECK-P10-LABEL: ld_align64_double_int32_t:
2222 ; CHECK-P10: # %bb.0: # %entry
2223 ; CHECK-P10-NEXT: pli r4, 244140625
2224 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2225 ; CHECK-P10-NEXT: lfiwax f0, r3, r4
2226 ; CHECK-P10-NEXT: xscvsxddp f1, f0
2227 ; CHECK-P10-NEXT: blr
2229 ; CHECK-PREP10-LABEL: ld_align64_double_int32_t:
2230 ; CHECK-PREP10: # %bb.0: # %entry
2231 ; CHECK-PREP10-NEXT: lis r4, 3725
2232 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2233 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2234 ; CHECK-PREP10-NEXT: lfiwax f0, r3, r4
2235 ; CHECK-PREP10-NEXT: xscvsxddp f1, f0
2236 ; CHECK-PREP10-NEXT: blr
2238 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
2239 %0 = bitcast i8* %add.ptr to i32*
2240 %1 = load i32, i32* %0, align 4
2241 %conv = sitofp i32 %1 to double
2245 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2246 define dso_local double @ld_reg_double_int32_t(i8* nocapture readonly %ptr, i64 %off) {
2247 ; CHECK-LABEL: ld_reg_double_int32_t:
2248 ; CHECK: # %bb.0: # %entry
2249 ; CHECK-NEXT: lfiwax f0, r3, r4
2250 ; CHECK-NEXT: xscvsxddp f1, f0
2253 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
2254 %0 = bitcast i8* %add.ptr to i32*
2255 %1 = load i32, i32* %0, align 4
2256 %conv = sitofp i32 %1 to double
2260 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2261 define dso_local double @ld_or_double_int32_t(i64 %ptr, i8 zeroext %off) {
2262 ; CHECK-LABEL: ld_or_double_int32_t:
2263 ; CHECK: # %bb.0: # %entry
2264 ; CHECK-NEXT: or r3, r4, r3
2265 ; CHECK-NEXT: lfiwax f0, 0, r3
2266 ; CHECK-NEXT: xscvsxddp f1, f0
2269 %conv = zext i8 %off to i64
2270 %or = or i64 %conv, %ptr
2271 %0 = inttoptr i64 %or to i32*
2272 %1 = load i32, i32* %0, align 4
2273 %conv1 = sitofp i32 %1 to double
2277 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2278 define dso_local double @ld_not_disjoint16_double_int32_t(i64 %ptr) {
2279 ; CHECK-LABEL: ld_not_disjoint16_double_int32_t:
2280 ; CHECK: # %bb.0: # %entry
2281 ; CHECK-NEXT: ori r3, r3, 6
2282 ; CHECK-NEXT: lfiwax f0, 0, r3
2283 ; CHECK-NEXT: xscvsxddp f1, f0
2286 %or = or i64 %ptr, 6
2287 %0 = inttoptr i64 %or to i32*
2288 %1 = load i32, i32* %0, align 4
2289 %conv = sitofp i32 %1 to double
2293 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2294 define dso_local double @ld_disjoint_align16_double_int32_t(i64 %ptr) {
2295 ; CHECK-LABEL: ld_disjoint_align16_double_int32_t:
2296 ; CHECK: # %bb.0: # %entry
2297 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2298 ; CHECK-NEXT: ori r3, r3, 24
2299 ; CHECK-NEXT: lfiwax f0, 0, r3
2300 ; CHECK-NEXT: xscvsxddp f1, f0
2303 %and = and i64 %ptr, -4096
2304 %or = or i64 %and, 24
2305 %0 = inttoptr i64 %or to i32*
2306 %1 = load i32, i32* %0, align 8
2307 %conv = sitofp i32 %1 to double
2311 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2312 define dso_local double @ld_not_disjoint32_double_int32_t(i64 %ptr) {
2313 ; CHECK-LABEL: ld_not_disjoint32_double_int32_t:
2314 ; CHECK: # %bb.0: # %entry
2315 ; CHECK-NEXT: ori r3, r3, 34463
2316 ; CHECK-NEXT: oris r3, r3, 1
2317 ; CHECK-NEXT: lfiwax f0, 0, r3
2318 ; CHECK-NEXT: xscvsxddp f1, f0
2321 %or = or i64 %ptr, 99999
2322 %0 = inttoptr i64 %or to i32*
2323 %1 = load i32, i32* %0, align 4
2324 %conv = sitofp i32 %1 to double
2328 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2329 define dso_local double @ld_disjoint_align32_double_int32_t(i64 %ptr) {
2330 ; CHECK-P10-LABEL: ld_disjoint_align32_double_int32_t:
2331 ; CHECK-P10: # %bb.0: # %entry
2332 ; CHECK-P10-NEXT: lis r4, -15264
2333 ; CHECK-P10-NEXT: and r3, r3, r4
2334 ; CHECK-P10-NEXT: pli r4, 999990000
2335 ; CHECK-P10-NEXT: lfiwax f0, r3, r4
2336 ; CHECK-P10-NEXT: xscvsxddp f1, f0
2337 ; CHECK-P10-NEXT: blr
2339 ; CHECK-P9-LABEL: ld_disjoint_align32_double_int32_t:
2340 ; CHECK-P9: # %bb.0: # %entry
2341 ; CHECK-P9-NEXT: lis r4, -15264
2342 ; CHECK-P9-NEXT: and r3, r3, r4
2343 ; CHECK-P9-NEXT: lis r4, 15258
2344 ; CHECK-P9-NEXT: ori r4, r4, 41712
2345 ; CHECK-P9-NEXT: lfiwax f0, r3, r4
2346 ; CHECK-P9-NEXT: xscvsxddp f1, f0
2347 ; CHECK-P9-NEXT: blr
2349 ; CHECK-P8-LABEL: ld_disjoint_align32_double_int32_t:
2350 ; CHECK-P8: # %bb.0: # %entry
2351 ; CHECK-P8-NEXT: lis r4, -15264
2352 ; CHECK-P8-NEXT: lis r5, 15258
2353 ; CHECK-P8-NEXT: and r3, r3, r4
2354 ; CHECK-P8-NEXT: ori r4, r5, 41712
2355 ; CHECK-P8-NEXT: lfiwax f0, r3, r4
2356 ; CHECK-P8-NEXT: xscvsxddp f1, f0
2357 ; CHECK-P8-NEXT: blr
2359 %and = and i64 %ptr, -1000341504
2360 %or = or i64 %and, 999990000
2361 %0 = inttoptr i64 %or to i32*
2362 %1 = load i32, i32* %0, align 16
2363 %conv = sitofp i32 %1 to double
2367 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2368 define dso_local double @ld_not_disjoint64_double_int32_t(i64 %ptr) {
2369 ; CHECK-P10-LABEL: ld_not_disjoint64_double_int32_t:
2370 ; CHECK-P10: # %bb.0: # %entry
2371 ; CHECK-P10-NEXT: pli r4, 232
2372 ; CHECK-P10-NEXT: pli r5, 3567587329
2373 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2374 ; CHECK-P10-NEXT: or r3, r3, r5
2375 ; CHECK-P10-NEXT: lfiwax f0, 0, r3
2376 ; CHECK-P10-NEXT: xscvsxddp f1, f0
2377 ; CHECK-P10-NEXT: blr
2379 ; CHECK-PREP10-LABEL: ld_not_disjoint64_double_int32_t:
2380 ; CHECK-PREP10: # %bb.0: # %entry
2381 ; CHECK-PREP10-NEXT: li r4, 29
2382 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2383 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2384 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2385 ; CHECK-PREP10-NEXT: or r3, r3, r4
2386 ; CHECK-PREP10-NEXT: lfiwax f0, 0, r3
2387 ; CHECK-PREP10-NEXT: xscvsxddp f1, f0
2388 ; CHECK-PREP10-NEXT: blr
2390 %or = or i64 %ptr, 1000000000001
2391 %0 = inttoptr i64 %or to i32*
2392 %1 = load i32, i32* %0, align 4
2393 %conv = sitofp i32 %1 to double
2397 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2398 define dso_local double @ld_disjoint_align64_double_int32_t(i64 %ptr) {
2399 ; CHECK-P10-LABEL: ld_disjoint_align64_double_int32_t:
2400 ; CHECK-P10: # %bb.0: # %entry
2401 ; CHECK-P10-NEXT: pli r4, 244140625
2402 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
2403 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2404 ; CHECK-P10-NEXT: lfiwax f0, r3, r4
2405 ; CHECK-P10-NEXT: xscvsxddp f1, f0
2406 ; CHECK-P10-NEXT: blr
2408 ; CHECK-PREP10-LABEL: ld_disjoint_align64_double_int32_t:
2409 ; CHECK-PREP10: # %bb.0: # %entry
2410 ; CHECK-PREP10-NEXT: lis r4, 3725
2411 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
2412 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2413 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2414 ; CHECK-PREP10-NEXT: lfiwax f0, r3, r4
2415 ; CHECK-PREP10-NEXT: xscvsxddp f1, f0
2416 ; CHECK-PREP10-NEXT: blr
2418 %and = and i64 %ptr, -1099511627776
2419 %or = or i64 %and, 1000000000000
2420 %0 = inttoptr i64 %or to i32*
2421 %1 = load i32, i32* %0, align 4096
2422 %conv = sitofp i32 %1 to double
2426 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2427 define dso_local double @ld_cst_align16_double_int32_t() {
2428 ; CHECK-LABEL: ld_cst_align16_double_int32_t:
2429 ; CHECK: # %bb.0: # %entry
2430 ; CHECK-NEXT: li r3, 4080
2431 ; CHECK-NEXT: lfiwax f0, 0, r3
2432 ; CHECK-NEXT: xscvsxddp f1, f0
2435 %0 = load i32, i32* inttoptr (i64 4080 to i32*), align 16
2436 %conv = sitofp i32 %0 to double
2440 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2441 define dso_local double @ld_cst_align32_double_int32_t() {
2442 ; CHECK-P10-LABEL: ld_cst_align32_double_int32_t:
2443 ; CHECK-P10: # %bb.0: # %entry
2444 ; CHECK-P10-NEXT: pli r3, 9999900
2445 ; CHECK-P10-NEXT: lfiwax f0, 0, r3
2446 ; CHECK-P10-NEXT: xscvsxddp f1, f0
2447 ; CHECK-P10-NEXT: blr
2449 ; CHECK-PREP10-LABEL: ld_cst_align32_double_int32_t:
2450 ; CHECK-PREP10: # %bb.0: # %entry
2451 ; CHECK-PREP10-NEXT: lis r3, 152
2452 ; CHECK-PREP10-NEXT: ori r3, r3, 38428
2453 ; CHECK-PREP10-NEXT: lfiwax f0, 0, r3
2454 ; CHECK-PREP10-NEXT: xscvsxddp f1, f0
2455 ; CHECK-PREP10-NEXT: blr
2457 %0 = load i32, i32* inttoptr (i64 9999900 to i32*), align 4
2458 %conv = sitofp i32 %0 to double
2462 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2463 define dso_local double @ld_cst_align64_double_int32_t() {
2464 ; CHECK-P10-LABEL: ld_cst_align64_double_int32_t:
2465 ; CHECK-P10: # %bb.0: # %entry
2466 ; CHECK-P10-NEXT: pli r3, 244140625
2467 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
2468 ; CHECK-P10-NEXT: lfiwax f0, 0, r3
2469 ; CHECK-P10-NEXT: xscvsxddp f1, f0
2470 ; CHECK-P10-NEXT: blr
2472 ; CHECK-PREP10-LABEL: ld_cst_align64_double_int32_t:
2473 ; CHECK-PREP10: # %bb.0: # %entry
2474 ; CHECK-PREP10-NEXT: lis r3, 3725
2475 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
2476 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
2477 ; CHECK-PREP10-NEXT: lfiwax f0, 0, r3
2478 ; CHECK-PREP10-NEXT: xscvsxddp f1, f0
2479 ; CHECK-PREP10-NEXT: blr
2481 %0 = load i32, i32* inttoptr (i64 1000000000000 to i32*), align 4096
2482 %conv = sitofp i32 %0 to double
2486 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2487 define dso_local double @ld_0_double_uint64_t(i64 %ptr) {
2488 ; CHECK-LABEL: ld_0_double_uint64_t:
2489 ; CHECK: # %bb.0: # %entry
2490 ; CHECK-NEXT: lfd f0, 0(r3)
2491 ; CHECK-NEXT: xscvuxddp f1, f0
2494 %0 = inttoptr i64 %ptr to i64*
2495 %1 = load i64, i64* %0, align 8
2496 %conv = uitofp i64 %1 to double
2500 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2501 define dso_local double @ld_align16_double_uint64_t(i8* nocapture readonly %ptr) {
2502 ; CHECK-LABEL: ld_align16_double_uint64_t:
2503 ; CHECK: # %bb.0: # %entry
2504 ; CHECK-NEXT: lfd f0, 8(r3)
2505 ; CHECK-NEXT: xscvuxddp f1, f0
2508 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
2509 %0 = bitcast i8* %add.ptr to i64*
2510 %1 = load i64, i64* %0, align 8
2511 %conv = uitofp i64 %1 to double
2515 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2516 define dso_local double @ld_align32_double_uint64_t(i8* nocapture readonly %ptr) {
2517 ; CHECK-P10-LABEL: ld_align32_double_uint64_t:
2518 ; CHECK-P10: # %bb.0: # %entry
2519 ; CHECK-P10-NEXT: pli r4, 99999000
2520 ; CHECK-P10-NEXT: lfdx f0, r3, r4
2521 ; CHECK-P10-NEXT: xscvuxddp f1, f0
2522 ; CHECK-P10-NEXT: blr
2524 ; CHECK-PREP10-LABEL: ld_align32_double_uint64_t:
2525 ; CHECK-PREP10: # %bb.0: # %entry
2526 ; CHECK-PREP10-NEXT: lis r4, 1525
2527 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
2528 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
2529 ; CHECK-PREP10-NEXT: xscvuxddp f1, f0
2530 ; CHECK-PREP10-NEXT: blr
2532 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
2533 %0 = bitcast i8* %add.ptr to i64*
2534 %1 = load i64, i64* %0, align 8
2535 %conv = uitofp i64 %1 to double
2539 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2540 define dso_local double @ld_align64_double_uint64_t(i8* nocapture readonly %ptr) {
2541 ; CHECK-P10-LABEL: ld_align64_double_uint64_t:
2542 ; CHECK-P10: # %bb.0: # %entry
2543 ; CHECK-P10-NEXT: pli r4, 244140625
2544 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2545 ; CHECK-P10-NEXT: lfdx f0, r3, r4
2546 ; CHECK-P10-NEXT: xscvuxddp f1, f0
2547 ; CHECK-P10-NEXT: blr
2549 ; CHECK-PREP10-LABEL: ld_align64_double_uint64_t:
2550 ; CHECK-PREP10: # %bb.0: # %entry
2551 ; CHECK-PREP10-NEXT: lis r4, 3725
2552 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2553 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2554 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
2555 ; CHECK-PREP10-NEXT: xscvuxddp f1, f0
2556 ; CHECK-PREP10-NEXT: blr
2558 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
2559 %0 = bitcast i8* %add.ptr to i64*
2560 %1 = load i64, i64* %0, align 8
2561 %conv = uitofp i64 %1 to double
2565 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2566 define dso_local double @ld_reg_double_uint64_t(i8* nocapture readonly %ptr, i64 %off) {
2567 ; CHECK-LABEL: ld_reg_double_uint64_t:
2568 ; CHECK: # %bb.0: # %entry
2569 ; CHECK-NEXT: lfdx f0, r3, r4
2570 ; CHECK-NEXT: xscvuxddp f1, f0
2573 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
2574 %0 = bitcast i8* %add.ptr to i64*
2575 %1 = load i64, i64* %0, align 8
2576 %conv = uitofp i64 %1 to double
2580 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2581 define dso_local double @ld_or_double_uint64_t(i64 %ptr, i8 zeroext %off) {
2582 ; CHECK-LABEL: ld_or_double_uint64_t:
2583 ; CHECK: # %bb.0: # %entry
2584 ; CHECK-NEXT: or r3, r4, r3
2585 ; CHECK-NEXT: lfd f0, 0(r3)
2586 ; CHECK-NEXT: xscvuxddp f1, f0
2589 %conv = zext i8 %off to i64
2590 %or = or i64 %conv, %ptr
2591 %0 = inttoptr i64 %or to i64*
2592 %1 = load i64, i64* %0, align 8
2593 %conv1 = uitofp i64 %1 to double
2597 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2598 define dso_local double @ld_not_disjoint16_double_uint64_t(i64 %ptr) {
2599 ; CHECK-LABEL: ld_not_disjoint16_double_uint64_t:
2600 ; CHECK: # %bb.0: # %entry
2601 ; CHECK-NEXT: ori r3, r3, 6
2602 ; CHECK-NEXT: lfd f0, 0(r3)
2603 ; CHECK-NEXT: xscvuxddp f1, f0
2606 %or = or i64 %ptr, 6
2607 %0 = inttoptr i64 %or to i64*
2608 %1 = load i64, i64* %0, align 8
2609 %conv = uitofp i64 %1 to double
2613 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2614 define dso_local double @ld_disjoint_align16_double_uint64_t(i64 %ptr) {
2615 ; CHECK-LABEL: ld_disjoint_align16_double_uint64_t:
2616 ; CHECK: # %bb.0: # %entry
2617 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2618 ; CHECK-NEXT: lfd f0, 24(r3)
2619 ; CHECK-NEXT: xscvuxddp f1, f0
2622 %and = and i64 %ptr, -4096
2623 %or = or i64 %and, 24
2624 %0 = inttoptr i64 %or to i64*
2625 %1 = load i64, i64* %0, align 8
2626 %conv = uitofp i64 %1 to double
2630 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2631 define dso_local double @ld_not_disjoint32_double_uint64_t(i64 %ptr) {
2632 ; CHECK-LABEL: ld_not_disjoint32_double_uint64_t:
2633 ; CHECK: # %bb.0: # %entry
2634 ; CHECK-NEXT: ori r3, r3, 34463
2635 ; CHECK-NEXT: oris r3, r3, 1
2636 ; CHECK-NEXT: lfd f0, 0(r3)
2637 ; CHECK-NEXT: xscvuxddp f1, f0
2640 %or = or i64 %ptr, 99999
2641 %0 = inttoptr i64 %or to i64*
2642 %1 = load i64, i64* %0, align 8
2643 %conv = uitofp i64 %1 to double
2647 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2648 define dso_local double @ld_disjoint_align32_double_uint64_t(i64 %ptr) {
2649 ; CHECK-P10-LABEL: ld_disjoint_align32_double_uint64_t:
2650 ; CHECK-P10: # %bb.0: # %entry
2651 ; CHECK-P10-NEXT: lis r4, -15264
2652 ; CHECK-P10-NEXT: and r3, r3, r4
2653 ; CHECK-P10-NEXT: pli r4, 999990000
2654 ; CHECK-P10-NEXT: lfdx f0, r3, r4
2655 ; CHECK-P10-NEXT: xscvuxddp f1, f0
2656 ; CHECK-P10-NEXT: blr
2658 ; CHECK-P9-LABEL: ld_disjoint_align32_double_uint64_t:
2659 ; CHECK-P9: # %bb.0: # %entry
2660 ; CHECK-P9-NEXT: lis r4, -15264
2661 ; CHECK-P9-NEXT: and r3, r3, r4
2662 ; CHECK-P9-NEXT: lis r4, 15258
2663 ; CHECK-P9-NEXT: ori r4, r4, 41712
2664 ; CHECK-P9-NEXT: lfdx f0, r3, r4
2665 ; CHECK-P9-NEXT: xscvuxddp f1, f0
2666 ; CHECK-P9-NEXT: blr
2668 ; CHECK-P8-LABEL: ld_disjoint_align32_double_uint64_t:
2669 ; CHECK-P8: # %bb.0: # %entry
2670 ; CHECK-P8-NEXT: lis r4, -15264
2671 ; CHECK-P8-NEXT: lis r5, 15258
2672 ; CHECK-P8-NEXT: and r3, r3, r4
2673 ; CHECK-P8-NEXT: ori r4, r5, 41712
2674 ; CHECK-P8-NEXT: lfdx f0, r3, r4
2675 ; CHECK-P8-NEXT: xscvuxddp f1, f0
2676 ; CHECK-P8-NEXT: blr
2678 %and = and i64 %ptr, -1000341504
2679 %or = or i64 %and, 999990000
2680 %0 = inttoptr i64 %or to i64*
2681 %1 = load i64, i64* %0, align 16
2682 %conv = uitofp i64 %1 to double
2686 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2687 define dso_local double @ld_not_disjoint64_double_uint64_t(i64 %ptr) {
2688 ; CHECK-P10-LABEL: ld_not_disjoint64_double_uint64_t:
2689 ; CHECK-P10: # %bb.0: # %entry
2690 ; CHECK-P10-NEXT: pli r4, 232
2691 ; CHECK-P10-NEXT: pli r5, 3567587329
2692 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2693 ; CHECK-P10-NEXT: or r3, r3, r5
2694 ; CHECK-P10-NEXT: lfd f0, 0(r3)
2695 ; CHECK-P10-NEXT: xscvuxddp f1, f0
2696 ; CHECK-P10-NEXT: blr
2698 ; CHECK-PREP10-LABEL: ld_not_disjoint64_double_uint64_t:
2699 ; CHECK-PREP10: # %bb.0: # %entry
2700 ; CHECK-PREP10-NEXT: li r4, 29
2701 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2702 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2703 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2704 ; CHECK-PREP10-NEXT: or r3, r3, r4
2705 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
2706 ; CHECK-PREP10-NEXT: xscvuxddp f1, f0
2707 ; CHECK-PREP10-NEXT: blr
2709 %or = or i64 %ptr, 1000000000001
2710 %0 = inttoptr i64 %or to i64*
2711 %1 = load i64, i64* %0, align 8
2712 %conv = uitofp i64 %1 to double
2716 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2717 define dso_local double @ld_disjoint_align64_double_uint64_t(i64 %ptr) {
2718 ; CHECK-P10-LABEL: ld_disjoint_align64_double_uint64_t:
2719 ; CHECK-P10: # %bb.0: # %entry
2720 ; CHECK-P10-NEXT: pli r4, 244140625
2721 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
2722 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2723 ; CHECK-P10-NEXT: lfdx f0, r3, r4
2724 ; CHECK-P10-NEXT: xscvuxddp f1, f0
2725 ; CHECK-P10-NEXT: blr
2727 ; CHECK-PREP10-LABEL: ld_disjoint_align64_double_uint64_t:
2728 ; CHECK-PREP10: # %bb.0: # %entry
2729 ; CHECK-PREP10-NEXT: lis r4, 3725
2730 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
2731 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2732 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2733 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
2734 ; CHECK-PREP10-NEXT: xscvuxddp f1, f0
2735 ; CHECK-PREP10-NEXT: blr
2737 %and = and i64 %ptr, -1099511627776
2738 %or = or i64 %and, 1000000000000
2739 %0 = inttoptr i64 %or to i64*
2740 %1 = load i64, i64* %0, align 4096
2741 %conv = uitofp i64 %1 to double
2745 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2746 define dso_local double @ld_cst_align16_double_uint64_t() {
2747 ; CHECK-LABEL: ld_cst_align16_double_uint64_t:
2748 ; CHECK: # %bb.0: # %entry
2749 ; CHECK-NEXT: lfd f0, 4080(0)
2750 ; CHECK-NEXT: xscvuxddp f1, f0
2753 %0 = load i64, i64* inttoptr (i64 4080 to i64*), align 16
2754 %conv = uitofp i64 %0 to double
2758 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2759 define dso_local double @ld_cst_align32_double_uint64_t() {
2760 ; CHECK-LABEL: ld_cst_align32_double_uint64_t:
2761 ; CHECK: # %bb.0: # %entry
2762 ; CHECK-NEXT: lis r3, 153
2763 ; CHECK-NEXT: lfd f0, -27108(r3)
2764 ; CHECK-NEXT: xscvuxddp f1, f0
2767 %0 = load i64, i64* inttoptr (i64 9999900 to i64*), align 8
2768 %conv = uitofp i64 %0 to double
2772 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2773 define dso_local double @ld_cst_align64_double_uint64_t() {
2774 ; CHECK-P10-LABEL: ld_cst_align64_double_uint64_t:
2775 ; CHECK-P10: # %bb.0: # %entry
2776 ; CHECK-P10-NEXT: pli r3, 244140625
2777 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
2778 ; CHECK-P10-NEXT: lfd f0, 0(r3)
2779 ; CHECK-P10-NEXT: xscvuxddp f1, f0
2780 ; CHECK-P10-NEXT: blr
2782 ; CHECK-PREP10-LABEL: ld_cst_align64_double_uint64_t:
2783 ; CHECK-PREP10: # %bb.0: # %entry
2784 ; CHECK-PREP10-NEXT: lis r3, 3725
2785 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
2786 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
2787 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
2788 ; CHECK-PREP10-NEXT: xscvuxddp f1, f0
2789 ; CHECK-PREP10-NEXT: blr
2791 %0 = load i64, i64* inttoptr (i64 1000000000000 to i64*), align 4096
2792 %conv = uitofp i64 %0 to double
2796 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2797 define dso_local double @ld_0_double_int64_t(i64 %ptr) {
2798 ; CHECK-LABEL: ld_0_double_int64_t:
2799 ; CHECK: # %bb.0: # %entry
2800 ; CHECK-NEXT: lfd f0, 0(r3)
2801 ; CHECK-NEXT: xscvsxddp f1, f0
2804 %0 = inttoptr i64 %ptr to i64*
2805 %1 = load i64, i64* %0, align 8
2806 %conv = sitofp i64 %1 to double
2810 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2811 define dso_local double @ld_align16_double_int64_t(i8* nocapture readonly %ptr) {
2812 ; CHECK-LABEL: ld_align16_double_int64_t:
2813 ; CHECK: # %bb.0: # %entry
2814 ; CHECK-NEXT: lfd f0, 8(r3)
2815 ; CHECK-NEXT: xscvsxddp f1, f0
2818 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
2819 %0 = bitcast i8* %add.ptr to i64*
2820 %1 = load i64, i64* %0, align 8
2821 %conv = sitofp i64 %1 to double
2825 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2826 define dso_local double @ld_align32_double_int64_t(i8* nocapture readonly %ptr) {
2827 ; CHECK-P10-LABEL: ld_align32_double_int64_t:
2828 ; CHECK-P10: # %bb.0: # %entry
2829 ; CHECK-P10-NEXT: pli r4, 99999000
2830 ; CHECK-P10-NEXT: lfdx f0, r3, r4
2831 ; CHECK-P10-NEXT: xscvsxddp f1, f0
2832 ; CHECK-P10-NEXT: blr
2834 ; CHECK-PREP10-LABEL: ld_align32_double_int64_t:
2835 ; CHECK-PREP10: # %bb.0: # %entry
2836 ; CHECK-PREP10-NEXT: lis r4, 1525
2837 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
2838 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
2839 ; CHECK-PREP10-NEXT: xscvsxddp f1, f0
2840 ; CHECK-PREP10-NEXT: blr
2842 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
2843 %0 = bitcast i8* %add.ptr to i64*
2844 %1 = load i64, i64* %0, align 8
2845 %conv = sitofp i64 %1 to double
2849 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2850 define dso_local double @ld_align64_double_int64_t(i8* nocapture readonly %ptr) {
2851 ; CHECK-P10-LABEL: ld_align64_double_int64_t:
2852 ; CHECK-P10: # %bb.0: # %entry
2853 ; CHECK-P10-NEXT: pli r4, 244140625
2854 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2855 ; CHECK-P10-NEXT: lfdx f0, r3, r4
2856 ; CHECK-P10-NEXT: xscvsxddp f1, f0
2857 ; CHECK-P10-NEXT: blr
2859 ; CHECK-PREP10-LABEL: ld_align64_double_int64_t:
2860 ; CHECK-PREP10: # %bb.0: # %entry
2861 ; CHECK-PREP10-NEXT: lis r4, 3725
2862 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2863 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2864 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
2865 ; CHECK-PREP10-NEXT: xscvsxddp f1, f0
2866 ; CHECK-PREP10-NEXT: blr
2868 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
2869 %0 = bitcast i8* %add.ptr to i64*
2870 %1 = load i64, i64* %0, align 8
2871 %conv = sitofp i64 %1 to double
2875 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2876 define dso_local double @ld_reg_double_int64_t(i8* nocapture readonly %ptr, i64 %off) {
2877 ; CHECK-LABEL: ld_reg_double_int64_t:
2878 ; CHECK: # %bb.0: # %entry
2879 ; CHECK-NEXT: lfdx f0, r3, r4
2880 ; CHECK-NEXT: xscvsxddp f1, f0
2883 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
2884 %0 = bitcast i8* %add.ptr to i64*
2885 %1 = load i64, i64* %0, align 8
2886 %conv = sitofp i64 %1 to double
2890 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2891 define dso_local double @ld_or_double_int64_t(i64 %ptr, i8 zeroext %off) {
2892 ; CHECK-LABEL: ld_or_double_int64_t:
2893 ; CHECK: # %bb.0: # %entry
2894 ; CHECK-NEXT: or r3, r4, r3
2895 ; CHECK-NEXT: lfd f0, 0(r3)
2896 ; CHECK-NEXT: xscvsxddp f1, f0
2899 %conv = zext i8 %off to i64
2900 %or = or i64 %conv, %ptr
2901 %0 = inttoptr i64 %or to i64*
2902 %1 = load i64, i64* %0, align 8
2903 %conv1 = sitofp i64 %1 to double
2907 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2908 define dso_local double @ld_not_disjoint16_double_int64_t(i64 %ptr) {
2909 ; CHECK-LABEL: ld_not_disjoint16_double_int64_t:
2910 ; CHECK: # %bb.0: # %entry
2911 ; CHECK-NEXT: ori r3, r3, 6
2912 ; CHECK-NEXT: lfd f0, 0(r3)
2913 ; CHECK-NEXT: xscvsxddp f1, f0
2916 %or = or i64 %ptr, 6
2917 %0 = inttoptr i64 %or to i64*
2918 %1 = load i64, i64* %0, align 8
2919 %conv = sitofp i64 %1 to double
2923 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2924 define dso_local double @ld_disjoint_align16_double_int64_t(i64 %ptr) {
2925 ; CHECK-LABEL: ld_disjoint_align16_double_int64_t:
2926 ; CHECK: # %bb.0: # %entry
2927 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2928 ; CHECK-NEXT: lfd f0, 24(r3)
2929 ; CHECK-NEXT: xscvsxddp f1, f0
2932 %and = and i64 %ptr, -4096
2933 %or = or i64 %and, 24
2934 %0 = inttoptr i64 %or to i64*
2935 %1 = load i64, i64* %0, align 8
2936 %conv = sitofp i64 %1 to double
2940 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2941 define dso_local double @ld_not_disjoint32_double_int64_t(i64 %ptr) {
2942 ; CHECK-LABEL: ld_not_disjoint32_double_int64_t:
2943 ; CHECK: # %bb.0: # %entry
2944 ; CHECK-NEXT: ori r3, r3, 34463
2945 ; CHECK-NEXT: oris r3, r3, 1
2946 ; CHECK-NEXT: lfd f0, 0(r3)
2947 ; CHECK-NEXT: xscvsxddp f1, f0
2950 %or = or i64 %ptr, 99999
2951 %0 = inttoptr i64 %or to i64*
2952 %1 = load i64, i64* %0, align 8
2953 %conv = sitofp i64 %1 to double
2957 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2958 define dso_local double @ld_disjoint_align32_double_int64_t(i64 %ptr) {
2959 ; CHECK-P10-LABEL: ld_disjoint_align32_double_int64_t:
2960 ; CHECK-P10: # %bb.0: # %entry
2961 ; CHECK-P10-NEXT: lis r4, -15264
2962 ; CHECK-P10-NEXT: and r3, r3, r4
2963 ; CHECK-P10-NEXT: pli r4, 999990000
2964 ; CHECK-P10-NEXT: lfdx f0, r3, r4
2965 ; CHECK-P10-NEXT: xscvsxddp f1, f0
2966 ; CHECK-P10-NEXT: blr
2968 ; CHECK-P9-LABEL: ld_disjoint_align32_double_int64_t:
2969 ; CHECK-P9: # %bb.0: # %entry
2970 ; CHECK-P9-NEXT: lis r4, -15264
2971 ; CHECK-P9-NEXT: and r3, r3, r4
2972 ; CHECK-P9-NEXT: lis r4, 15258
2973 ; CHECK-P9-NEXT: ori r4, r4, 41712
2974 ; CHECK-P9-NEXT: lfdx f0, r3, r4
2975 ; CHECK-P9-NEXT: xscvsxddp f1, f0
2976 ; CHECK-P9-NEXT: blr
2978 ; CHECK-P8-LABEL: ld_disjoint_align32_double_int64_t:
2979 ; CHECK-P8: # %bb.0: # %entry
2980 ; CHECK-P8-NEXT: lis r4, -15264
2981 ; CHECK-P8-NEXT: lis r5, 15258
2982 ; CHECK-P8-NEXT: and r3, r3, r4
2983 ; CHECK-P8-NEXT: ori r4, r5, 41712
2984 ; CHECK-P8-NEXT: lfdx f0, r3, r4
2985 ; CHECK-P8-NEXT: xscvsxddp f1, f0
2986 ; CHECK-P8-NEXT: blr
2988 %and = and i64 %ptr, -1000341504
2989 %or = or i64 %and, 999990000
2990 %0 = inttoptr i64 %or to i64*
2991 %1 = load i64, i64* %0, align 16
2992 %conv = sitofp i64 %1 to double
2996 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2997 define dso_local double @ld_not_disjoint64_double_int64_t(i64 %ptr) {
2998 ; CHECK-P10-LABEL: ld_not_disjoint64_double_int64_t:
2999 ; CHECK-P10: # %bb.0: # %entry
3000 ; CHECK-P10-NEXT: pli r4, 232
3001 ; CHECK-P10-NEXT: pli r5, 3567587329
3002 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
3003 ; CHECK-P10-NEXT: or r3, r3, r5
3004 ; CHECK-P10-NEXT: lfd f0, 0(r3)
3005 ; CHECK-P10-NEXT: xscvsxddp f1, f0
3006 ; CHECK-P10-NEXT: blr
3008 ; CHECK-PREP10-LABEL: ld_not_disjoint64_double_int64_t:
3009 ; CHECK-PREP10: # %bb.0: # %entry
3010 ; CHECK-PREP10-NEXT: li r4, 29
3011 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
3012 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
3013 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
3014 ; CHECK-PREP10-NEXT: or r3, r3, r4
3015 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
3016 ; CHECK-PREP10-NEXT: xscvsxddp f1, f0
3017 ; CHECK-PREP10-NEXT: blr
3019 %or = or i64 %ptr, 1000000000001
3020 %0 = inttoptr i64 %or to i64*
3021 %1 = load i64, i64* %0, align 8
3022 %conv = sitofp i64 %1 to double
3026 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3027 define dso_local double @ld_disjoint_align64_double_int64_t(i64 %ptr) {
3028 ; CHECK-P10-LABEL: ld_disjoint_align64_double_int64_t:
3029 ; CHECK-P10: # %bb.0: # %entry
3030 ; CHECK-P10-NEXT: pli r4, 244140625
3031 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
3032 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
3033 ; CHECK-P10-NEXT: lfdx f0, r3, r4
3034 ; CHECK-P10-NEXT: xscvsxddp f1, f0
3035 ; CHECK-P10-NEXT: blr
3037 ; CHECK-PREP10-LABEL: ld_disjoint_align64_double_int64_t:
3038 ; CHECK-PREP10: # %bb.0: # %entry
3039 ; CHECK-PREP10-NEXT: lis r4, 3725
3040 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
3041 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
3042 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
3043 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
3044 ; CHECK-PREP10-NEXT: xscvsxddp f1, f0
3045 ; CHECK-PREP10-NEXT: blr
3047 %and = and i64 %ptr, -1099511627776
3048 %or = or i64 %and, 1000000000000
3049 %0 = inttoptr i64 %or to i64*
3050 %1 = load i64, i64* %0, align 4096
3051 %conv = sitofp i64 %1 to double
3055 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3056 define dso_local double @ld_cst_align16_double_int64_t() {
3057 ; CHECK-LABEL: ld_cst_align16_double_int64_t:
3058 ; CHECK: # %bb.0: # %entry
3059 ; CHECK-NEXT: lfd f0, 4080(0)
3060 ; CHECK-NEXT: xscvsxddp f1, f0
3063 %0 = load i64, i64* inttoptr (i64 4080 to i64*), align 16
3064 %conv = sitofp i64 %0 to double
3068 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3069 define dso_local double @ld_cst_align32_double_int64_t() {
3070 ; CHECK-LABEL: ld_cst_align32_double_int64_t:
3071 ; CHECK: # %bb.0: # %entry
3072 ; CHECK-NEXT: lis r3, 153
3073 ; CHECK-NEXT: lfd f0, -27108(r3)
3074 ; CHECK-NEXT: xscvsxddp f1, f0
3077 %0 = load i64, i64* inttoptr (i64 9999900 to i64*), align 8
3078 %conv = sitofp i64 %0 to double
3082 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3083 define dso_local double @ld_cst_align64_double_int64_t() {
3084 ; CHECK-P10-LABEL: ld_cst_align64_double_int64_t:
3085 ; CHECK-P10: # %bb.0: # %entry
3086 ; CHECK-P10-NEXT: pli r3, 244140625
3087 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
3088 ; CHECK-P10-NEXT: lfd f0, 0(r3)
3089 ; CHECK-P10-NEXT: xscvsxddp f1, f0
3090 ; CHECK-P10-NEXT: blr
3092 ; CHECK-PREP10-LABEL: ld_cst_align64_double_int64_t:
3093 ; CHECK-PREP10: # %bb.0: # %entry
3094 ; CHECK-PREP10-NEXT: lis r3, 3725
3095 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
3096 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
3097 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
3098 ; CHECK-PREP10-NEXT: xscvsxddp f1, f0
3099 ; CHECK-PREP10-NEXT: blr
3101 %0 = load i64, i64* inttoptr (i64 1000000000000 to i64*), align 4096
3102 %conv = sitofp i64 %0 to double
3106 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3107 define dso_local double @ld_0_double_float(i64 %ptr) {
3108 ; CHECK-LABEL: ld_0_double_float:
3109 ; CHECK: # %bb.0: # %entry
3110 ; CHECK-NEXT: lfs f1, 0(r3)
3113 %0 = inttoptr i64 %ptr to float*
3114 %1 = load float, float* %0, align 4
3115 %conv = fpext float %1 to double
3119 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3120 define dso_local double @ld_align16_double_float(i8* nocapture readonly %ptr) {
3121 ; CHECK-LABEL: ld_align16_double_float:
3122 ; CHECK: # %bb.0: # %entry
3123 ; CHECK-NEXT: lfs f1, 8(r3)
3126 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
3127 %0 = bitcast i8* %add.ptr to float*
3128 %1 = load float, float* %0, align 4
3129 %conv = fpext float %1 to double
3133 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3134 define dso_local double @ld_align32_double_float(i8* nocapture readonly %ptr) {
3135 ; CHECK-P10-LABEL: ld_align32_double_float:
3136 ; CHECK-P10: # %bb.0: # %entry
3137 ; CHECK-P10-NEXT: pli r4, 99999000
3138 ; CHECK-P10-NEXT: lfsx f1, r3, r4
3139 ; CHECK-P10-NEXT: blr
3141 ; CHECK-PREP10-LABEL: ld_align32_double_float:
3142 ; CHECK-PREP10: # %bb.0: # %entry
3143 ; CHECK-PREP10-NEXT: lis r4, 1525
3144 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
3145 ; CHECK-PREP10-NEXT: lfsx f1, r3, r4
3146 ; CHECK-PREP10-NEXT: blr
3148 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
3149 %0 = bitcast i8* %add.ptr to float*
3150 %1 = load float, float* %0, align 4
3151 %conv = fpext float %1 to double
3155 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3156 define dso_local double @ld_align64_double_float(i8* nocapture readonly %ptr) {
3157 ; CHECK-P10-LABEL: ld_align64_double_float:
3158 ; CHECK-P10: # %bb.0: # %entry
3159 ; CHECK-P10-NEXT: pli r4, 244140625
3160 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
3161 ; CHECK-P10-NEXT: lfsx f1, r3, r4
3162 ; CHECK-P10-NEXT: blr
3164 ; CHECK-PREP10-LABEL: ld_align64_double_float:
3165 ; CHECK-PREP10: # %bb.0: # %entry
3166 ; CHECK-PREP10-NEXT: lis r4, 3725
3167 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
3168 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
3169 ; CHECK-PREP10-NEXT: lfsx f1, r3, r4
3170 ; CHECK-PREP10-NEXT: blr
3172 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
3173 %0 = bitcast i8* %add.ptr to float*
3174 %1 = load float, float* %0, align 4
3175 %conv = fpext float %1 to double
3179 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3180 define dso_local double @ld_reg_double_float(i8* nocapture readonly %ptr, i64 %off) {
3181 ; CHECK-LABEL: ld_reg_double_float:
3182 ; CHECK: # %bb.0: # %entry
3183 ; CHECK-NEXT: lfsx f1, r3, r4
3186 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
3187 %0 = bitcast i8* %add.ptr to float*
3188 %1 = load float, float* %0, align 4
3189 %conv = fpext float %1 to double
3193 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3194 define dso_local double @ld_or_double_float(i64 %ptr, i8 zeroext %off) {
3195 ; CHECK-LABEL: ld_or_double_float:
3196 ; CHECK: # %bb.0: # %entry
3197 ; CHECK-NEXT: or r3, r4, r3
3198 ; CHECK-NEXT: lfs f1, 0(r3)
3201 %conv = zext i8 %off to i64
3202 %or = or i64 %conv, %ptr
3203 %0 = inttoptr i64 %or to float*
3204 %1 = load float, float* %0, align 4
3205 %conv1 = fpext float %1 to double
3209 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3210 define dso_local double @ld_not_disjoint16_double_float(i64 %ptr) {
3211 ; CHECK-LABEL: ld_not_disjoint16_double_float:
3212 ; CHECK: # %bb.0: # %entry
3213 ; CHECK-NEXT: ori r3, r3, 6
3214 ; CHECK-NEXT: lfs f1, 0(r3)
3217 %or = or i64 %ptr, 6
3218 %0 = inttoptr i64 %or to float*
3219 %1 = load float, float* %0, align 4
3220 %conv = fpext float %1 to double
3224 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3225 define dso_local double @ld_disjoint_align16_double_float(i64 %ptr) {
3226 ; CHECK-LABEL: ld_disjoint_align16_double_float:
3227 ; CHECK: # %bb.0: # %entry
3228 ; CHECK-NEXT: rldicr r3, r3, 0, 51
3229 ; CHECK-NEXT: lfs f1, 24(r3)
3232 %and = and i64 %ptr, -4096
3233 %or = or i64 %and, 24
3234 %0 = inttoptr i64 %or to float*
3235 %1 = load float, float* %0, align 8
3236 %conv = fpext float %1 to double
3240 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3241 define dso_local double @ld_not_disjoint32_double_float(i64 %ptr) {
3242 ; CHECK-LABEL: ld_not_disjoint32_double_float:
3243 ; CHECK: # %bb.0: # %entry
3244 ; CHECK-NEXT: ori r3, r3, 34463
3245 ; CHECK-NEXT: oris r3, r3, 1
3246 ; CHECK-NEXT: lfs f1, 0(r3)
3249 %or = or i64 %ptr, 99999
3250 %0 = inttoptr i64 %or to float*
3251 %1 = load float, float* %0, align 4
3252 %conv = fpext float %1 to double
3256 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3257 define dso_local double @ld_disjoint_align32_double_float(i64 %ptr) {
3258 ; CHECK-P10-LABEL: ld_disjoint_align32_double_float:
3259 ; CHECK-P10: # %bb.0: # %entry
3260 ; CHECK-P10-NEXT: lis r4, -15264
3261 ; CHECK-P10-NEXT: and r3, r3, r4
3262 ; CHECK-P10-NEXT: pli r4, 999990000
3263 ; CHECK-P10-NEXT: lfsx f1, r3, r4
3264 ; CHECK-P10-NEXT: blr
3266 ; CHECK-P9-LABEL: ld_disjoint_align32_double_float:
3267 ; CHECK-P9: # %bb.0: # %entry
3268 ; CHECK-P9-NEXT: lis r4, -15264
3269 ; CHECK-P9-NEXT: and r3, r3, r4
3270 ; CHECK-P9-NEXT: lis r4, 15258
3271 ; CHECK-P9-NEXT: ori r4, r4, 41712
3272 ; CHECK-P9-NEXT: lfsx f1, r3, r4
3273 ; CHECK-P9-NEXT: blr
3275 ; CHECK-P8-LABEL: ld_disjoint_align32_double_float:
3276 ; CHECK-P8: # %bb.0: # %entry
3277 ; CHECK-P8-NEXT: lis r4, -15264
3278 ; CHECK-P8-NEXT: lis r5, 15258
3279 ; CHECK-P8-NEXT: and r3, r3, r4
3280 ; CHECK-P8-NEXT: ori r4, r5, 41712
3281 ; CHECK-P8-NEXT: lfsx f1, r3, r4
3282 ; CHECK-P8-NEXT: blr
3284 %and = and i64 %ptr, -1000341504
3285 %or = or i64 %and, 999990000
3286 %0 = inttoptr i64 %or to float*
3287 %1 = load float, float* %0, align 16
3288 %conv = fpext float %1 to double
3292 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3293 define dso_local double @ld_not_disjoint64_double_float(i64 %ptr) {
3294 ; CHECK-P10-LABEL: ld_not_disjoint64_double_float:
3295 ; CHECK-P10: # %bb.0: # %entry
3296 ; CHECK-P10-NEXT: pli r4, 232
3297 ; CHECK-P10-NEXT: pli r5, 3567587329
3298 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
3299 ; CHECK-P10-NEXT: or r3, r3, r5
3300 ; CHECK-P10-NEXT: lfs f1, 0(r3)
3301 ; CHECK-P10-NEXT: blr
3303 ; CHECK-PREP10-LABEL: ld_not_disjoint64_double_float:
3304 ; CHECK-PREP10: # %bb.0: # %entry
3305 ; CHECK-PREP10-NEXT: li r4, 29
3306 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
3307 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
3308 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
3309 ; CHECK-PREP10-NEXT: or r3, r3, r4
3310 ; CHECK-PREP10-NEXT: lfs f1, 0(r3)
3311 ; CHECK-PREP10-NEXT: blr
3313 %or = or i64 %ptr, 1000000000001
3314 %0 = inttoptr i64 %or to float*
3315 %1 = load float, float* %0, align 4
3316 %conv = fpext float %1 to double
3320 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3321 define dso_local double @ld_disjoint_align64_double_float(i64 %ptr) {
3322 ; CHECK-P10-LABEL: ld_disjoint_align64_double_float:
3323 ; CHECK-P10: # %bb.0: # %entry
3324 ; CHECK-P10-NEXT: pli r4, 244140625
3325 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
3326 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
3327 ; CHECK-P10-NEXT: lfsx f1, r3, r4
3328 ; CHECK-P10-NEXT: blr
3330 ; CHECK-PREP10-LABEL: ld_disjoint_align64_double_float:
3331 ; CHECK-PREP10: # %bb.0: # %entry
3332 ; CHECK-PREP10-NEXT: lis r4, 3725
3333 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
3334 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
3335 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
3336 ; CHECK-PREP10-NEXT: lfsx f1, r3, r4
3337 ; CHECK-PREP10-NEXT: blr
3339 %and = and i64 %ptr, -1099511627776
3340 %or = or i64 %and, 1000000000000
3341 %0 = inttoptr i64 %or to float*
3342 %1 = load float, float* %0, align 4096
3343 %conv = fpext float %1 to double
3347 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3348 define dso_local double @ld_cst_align16_double_float() {
3349 ; CHECK-LABEL: ld_cst_align16_double_float:
3350 ; CHECK: # %bb.0: # %entry
3351 ; CHECK-NEXT: lfs f1, 4080(0)
3354 %0 = load float, float* inttoptr (i64 4080 to float*), align 16
3355 %conv = fpext float %0 to double
3359 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3360 define dso_local double @ld_cst_align32_double_float() {
3361 ; CHECK-LABEL: ld_cst_align32_double_float:
3362 ; CHECK: # %bb.0: # %entry
3363 ; CHECK-NEXT: lis r3, 153
3364 ; CHECK-NEXT: lfs f1, -27108(r3)
3367 %0 = load float, float* inttoptr (i64 9999900 to float*), align 4
3368 %conv = fpext float %0 to double
3372 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3373 define dso_local double @ld_cst_align64_double_float() {
3374 ; CHECK-P10-LABEL: ld_cst_align64_double_float:
3375 ; CHECK-P10: # %bb.0: # %entry
3376 ; CHECK-P10-NEXT: pli r3, 244140625
3377 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
3378 ; CHECK-P10-NEXT: lfs f1, 0(r3)
3379 ; CHECK-P10-NEXT: blr
3381 ; CHECK-PREP10-LABEL: ld_cst_align64_double_float:
3382 ; CHECK-PREP10: # %bb.0: # %entry
3383 ; CHECK-PREP10-NEXT: lis r3, 3725
3384 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
3385 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
3386 ; CHECK-PREP10-NEXT: lfs f1, 0(r3)
3387 ; CHECK-PREP10-NEXT: blr
3389 %0 = load float, float* inttoptr (i64 1000000000000 to float*), align 4096
3390 %conv = fpext float %0 to double
3394 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3395 define dso_local double @ld_0_double_double(i64 %ptr) {
3396 ; CHECK-LABEL: ld_0_double_double:
3397 ; CHECK: # %bb.0: # %entry
3398 ; CHECK-NEXT: lfd f1, 0(r3)
3401 %0 = inttoptr i64 %ptr to double*
3402 %1 = load double, double* %0, align 8
3406 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3407 define dso_local double @ld_align16_double_double(i8* nocapture readonly %ptr) {
3408 ; CHECK-LABEL: ld_align16_double_double:
3409 ; CHECK: # %bb.0: # %entry
3410 ; CHECK-NEXT: lfd f1, 8(r3)
3413 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
3414 %0 = bitcast i8* %add.ptr to double*
3415 %1 = load double, double* %0, align 8
3419 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3420 define dso_local double @ld_align32_double_double(i8* nocapture readonly %ptr) {
3421 ; CHECK-P10-LABEL: ld_align32_double_double:
3422 ; CHECK-P10: # %bb.0: # %entry
3423 ; CHECK-P10-NEXT: pli r4, 99999000
3424 ; CHECK-P10-NEXT: lfdx f1, r3, r4
3425 ; CHECK-P10-NEXT: blr
3427 ; CHECK-PREP10-LABEL: ld_align32_double_double:
3428 ; CHECK-PREP10: # %bb.0: # %entry
3429 ; CHECK-PREP10-NEXT: lis r4, 1525
3430 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
3431 ; CHECK-PREP10-NEXT: lfdx f1, r3, r4
3432 ; CHECK-PREP10-NEXT: blr
3434 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
3435 %0 = bitcast i8* %add.ptr to double*
3436 %1 = load double, double* %0, align 8
3440 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3441 define dso_local double @ld_align64_double_double(i8* nocapture readonly %ptr) {
3442 ; CHECK-P10-LABEL: ld_align64_double_double:
3443 ; CHECK-P10: # %bb.0: # %entry
3444 ; CHECK-P10-NEXT: pli r4, 244140625
3445 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
3446 ; CHECK-P10-NEXT: lfdx f1, r3, r4
3447 ; CHECK-P10-NEXT: blr
3449 ; CHECK-PREP10-LABEL: ld_align64_double_double:
3450 ; CHECK-PREP10: # %bb.0: # %entry
3451 ; CHECK-PREP10-NEXT: lis r4, 3725
3452 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
3453 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
3454 ; CHECK-PREP10-NEXT: lfdx f1, r3, r4
3455 ; CHECK-PREP10-NEXT: blr
3457 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
3458 %0 = bitcast i8* %add.ptr to double*
3459 %1 = load double, double* %0, align 8
3463 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3464 define dso_local double @ld_reg_double_double(i8* nocapture readonly %ptr, i64 %off) {
3465 ; CHECK-LABEL: ld_reg_double_double:
3466 ; CHECK: # %bb.0: # %entry
3467 ; CHECK-NEXT: lfdx f1, r3, r4
3470 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
3471 %0 = bitcast i8* %add.ptr to double*
3472 %1 = load double, double* %0, align 8
3476 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3477 define dso_local double @ld_or_double_double(i64 %ptr, i8 zeroext %off) {
3478 ; CHECK-LABEL: ld_or_double_double:
3479 ; CHECK: # %bb.0: # %entry
3480 ; CHECK-NEXT: or r3, r4, r3
3481 ; CHECK-NEXT: lfd f1, 0(r3)
3484 %conv = zext i8 %off to i64
3485 %or = or i64 %conv, %ptr
3486 %0 = inttoptr i64 %or to double*
3487 %1 = load double, double* %0, align 8
3491 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3492 define dso_local double @ld_not_disjoint16_double_double(i64 %ptr) {
3493 ; CHECK-LABEL: ld_not_disjoint16_double_double:
3494 ; CHECK: # %bb.0: # %entry
3495 ; CHECK-NEXT: ori r3, r3, 6
3496 ; CHECK-NEXT: lfd f1, 0(r3)
3499 %or = or i64 %ptr, 6
3500 %0 = inttoptr i64 %or to double*
3501 %1 = load double, double* %0, align 8
3505 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3506 define dso_local double @ld_disjoint_align16_double_double(i64 %ptr) {
3507 ; CHECK-LABEL: ld_disjoint_align16_double_double:
3508 ; CHECK: # %bb.0: # %entry
3509 ; CHECK-NEXT: rldicr r3, r3, 0, 51
3510 ; CHECK-NEXT: lfd f1, 24(r3)
3513 %and = and i64 %ptr, -4096
3514 %or = or i64 %and, 24
3515 %0 = inttoptr i64 %or to double*
3516 %1 = load double, double* %0, align 8
3520 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3521 define dso_local double @ld_not_disjoint32_double_double(i64 %ptr) {
3522 ; CHECK-LABEL: ld_not_disjoint32_double_double:
3523 ; CHECK: # %bb.0: # %entry
3524 ; CHECK-NEXT: ori r3, r3, 34463
3525 ; CHECK-NEXT: oris r3, r3, 1
3526 ; CHECK-NEXT: lfd f1, 0(r3)
3529 %or = or i64 %ptr, 99999
3530 %0 = inttoptr i64 %or to double*
3531 %1 = load double, double* %0, align 8
3535 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3536 define dso_local double @ld_disjoint_align32_double_double(i64 %ptr) {
3537 ; CHECK-P10-LABEL: ld_disjoint_align32_double_double:
3538 ; CHECK-P10: # %bb.0: # %entry
3539 ; CHECK-P10-NEXT: lis r4, -15264
3540 ; CHECK-P10-NEXT: and r3, r3, r4
3541 ; CHECK-P10-NEXT: pli r4, 999990000
3542 ; CHECK-P10-NEXT: lfdx f1, r3, r4
3543 ; CHECK-P10-NEXT: blr
3545 ; CHECK-P9-LABEL: ld_disjoint_align32_double_double:
3546 ; CHECK-P9: # %bb.0: # %entry
3547 ; CHECK-P9-NEXT: lis r4, -15264
3548 ; CHECK-P9-NEXT: and r3, r3, r4
3549 ; CHECK-P9-NEXT: lis r4, 15258
3550 ; CHECK-P9-NEXT: ori r4, r4, 41712
3551 ; CHECK-P9-NEXT: lfdx f1, r3, r4
3552 ; CHECK-P9-NEXT: blr
3554 ; CHECK-P8-LABEL: ld_disjoint_align32_double_double:
3555 ; CHECK-P8: # %bb.0: # %entry
3556 ; CHECK-P8-NEXT: lis r4, -15264
3557 ; CHECK-P8-NEXT: lis r5, 15258
3558 ; CHECK-P8-NEXT: and r3, r3, r4
3559 ; CHECK-P8-NEXT: ori r4, r5, 41712
3560 ; CHECK-P8-NEXT: lfdx f1, r3, r4
3561 ; CHECK-P8-NEXT: blr
3563 %and = and i64 %ptr, -1000341504
3564 %or = or i64 %and, 999990000
3565 %0 = inttoptr i64 %or to double*
3566 %1 = load double, double* %0, align 16
3570 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3571 define dso_local double @ld_not_disjoint64_double_double(i64 %ptr) {
3572 ; CHECK-P10-LABEL: ld_not_disjoint64_double_double:
3573 ; CHECK-P10: # %bb.0: # %entry
3574 ; CHECK-P10-NEXT: pli r4, 232
3575 ; CHECK-P10-NEXT: pli r5, 3567587329
3576 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
3577 ; CHECK-P10-NEXT: or r3, r3, r5
3578 ; CHECK-P10-NEXT: lfd f1, 0(r3)
3579 ; CHECK-P10-NEXT: blr
3581 ; CHECK-PREP10-LABEL: ld_not_disjoint64_double_double:
3582 ; CHECK-PREP10: # %bb.0: # %entry
3583 ; CHECK-PREP10-NEXT: li r4, 29
3584 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
3585 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
3586 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
3587 ; CHECK-PREP10-NEXT: or r3, r3, r4
3588 ; CHECK-PREP10-NEXT: lfd f1, 0(r3)
3589 ; CHECK-PREP10-NEXT: blr
3591 %or = or i64 %ptr, 1000000000001
3592 %0 = inttoptr i64 %or to double*
3593 %1 = load double, double* %0, align 8
3597 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3598 define dso_local double @ld_disjoint_align64_double_double(i64 %ptr) {
3599 ; CHECK-P10-LABEL: ld_disjoint_align64_double_double:
3600 ; CHECK-P10: # %bb.0: # %entry
3601 ; CHECK-P10-NEXT: pli r4, 244140625
3602 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
3603 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
3604 ; CHECK-P10-NEXT: lfdx f1, r3, r4
3605 ; CHECK-P10-NEXT: blr
3607 ; CHECK-PREP10-LABEL: ld_disjoint_align64_double_double:
3608 ; CHECK-PREP10: # %bb.0: # %entry
3609 ; CHECK-PREP10-NEXT: lis r4, 3725
3610 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
3611 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
3612 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
3613 ; CHECK-PREP10-NEXT: lfdx f1, r3, r4
3614 ; CHECK-PREP10-NEXT: blr
3616 %and = and i64 %ptr, -1099511627776
3617 %or = or i64 %and, 1000000000000
3618 %0 = inttoptr i64 %or to double*
3619 %1 = load double, double* %0, align 4096
3623 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3624 define dso_local double @ld_cst_align16_double_double() {
3625 ; CHECK-LABEL: ld_cst_align16_double_double:
3626 ; CHECK: # %bb.0: # %entry
3627 ; CHECK-NEXT: lfd f1, 4080(0)
3630 %0 = load double, double* inttoptr (i64 4080 to double*), align 16
3634 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3635 define dso_local double @ld_cst_align32_double_double() {
3636 ; CHECK-LABEL: ld_cst_align32_double_double:
3637 ; CHECK: # %bb.0: # %entry
3638 ; CHECK-NEXT: lis r3, 153
3639 ; CHECK-NEXT: lfd f1, -27108(r3)
3642 %0 = load double, double* inttoptr (i64 9999900 to double*), align 8
3646 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3647 define dso_local double @ld_cst_align64_double_double() {
3648 ; CHECK-P10-LABEL: ld_cst_align64_double_double:
3649 ; CHECK-P10: # %bb.0: # %entry
3650 ; CHECK-P10-NEXT: pli r3, 244140625
3651 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
3652 ; CHECK-P10-NEXT: lfd f1, 0(r3)
3653 ; CHECK-P10-NEXT: blr
3655 ; CHECK-PREP10-LABEL: ld_cst_align64_double_double:
3656 ; CHECK-PREP10: # %bb.0: # %entry
3657 ; CHECK-PREP10-NEXT: lis r3, 3725
3658 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
3659 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
3660 ; CHECK-PREP10-NEXT: lfd f1, 0(r3)
3661 ; CHECK-PREP10-NEXT: blr
3663 %0 = load double, double* inttoptr (i64 1000000000000 to double*), align 4096
3667 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
3668 define dso_local void @st_0_double_uint8_t(i64 %ptr, double %str) {
3669 ; CHECK-POSTP8-LABEL: st_0_double_uint8_t:
3670 ; CHECK-POSTP8: # %bb.0: # %entry
3671 ; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
3672 ; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
3673 ; CHECK-POSTP8-NEXT: blr
3675 ; CHECK-P8-LABEL: st_0_double_uint8_t:
3676 ; CHECK-P8: # %bb.0: # %entry
3677 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
3678 ; CHECK-P8-NEXT: mffprwz r4, f0
3679 ; CHECK-P8-NEXT: stb r4, 0(r3)
3680 ; CHECK-P8-NEXT: blr
3682 %conv = fptoui double %str to i8
3683 %0 = inttoptr i64 %ptr to i8*
3684 store i8 %conv, i8* %0, align 1
3688 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
3689 define dso_local void @st_align16_double_uint8_t(i8* nocapture %ptr, double %str) {
3690 ; CHECK-POSTP8-LABEL: st_align16_double_uint8_t:
3691 ; CHECK-POSTP8: # %bb.0: # %entry
3692 ; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
3693 ; CHECK-POSTP8-NEXT: addi r3, r3, 8
3694 ; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
3695 ; CHECK-POSTP8-NEXT: blr
3697 ; CHECK-P8-LABEL: st_align16_double_uint8_t:
3698 ; CHECK-P8: # %bb.0: # %entry
3699 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
3700 ; CHECK-P8-NEXT: mffprwz r4, f0
3701 ; CHECK-P8-NEXT: stb r4, 8(r3)
3702 ; CHECK-P8-NEXT: blr
3704 %conv = fptoui double %str to i8
3705 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
3706 store i8 %conv, i8* %add.ptr, align 1
3710 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
3711 define dso_local void @st_align32_double_uint8_t(i8* nocapture %ptr, double %str) {
3712 ; CHECK-P10-LABEL: st_align32_double_uint8_t:
3713 ; CHECK-P10: # %bb.0: # %entry
3714 ; CHECK-P10-NEXT: xscvdpuxws f0, f1
3715 ; CHECK-P10-NEXT: pli r4, 99999000
3716 ; CHECK-P10-NEXT: stxsibx f0, r3, r4
3717 ; CHECK-P10-NEXT: blr
3719 ; CHECK-P9-LABEL: st_align32_double_uint8_t:
3720 ; CHECK-P9: # %bb.0: # %entry
3721 ; CHECK-P9-NEXT: xscvdpuxws f0, f1
3722 ; CHECK-P9-NEXT: lis r4, 1525
3723 ; CHECK-P9-NEXT: ori r4, r4, 56600
3724 ; CHECK-P9-NEXT: stxsibx f0, r3, r4
3725 ; CHECK-P9-NEXT: blr
3727 ; CHECK-P8-LABEL: st_align32_double_uint8_t:
3728 ; CHECK-P8: # %bb.0: # %entry
3729 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
3730 ; CHECK-P8-NEXT: lis r4, 1525
3731 ; CHECK-P8-NEXT: ori r4, r4, 56600
3732 ; CHECK-P8-NEXT: mffprwz r5, f0
3733 ; CHECK-P8-NEXT: stbx r5, r3, r4
3734 ; CHECK-P8-NEXT: blr
3736 %conv = fptoui double %str to i8
3737 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
3738 store i8 %conv, i8* %add.ptr, align 1
3742 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
3743 define dso_local void @st_align64_double_uint8_t(i8* nocapture %ptr, double %str) {
3744 ; CHECK-P10-LABEL: st_align64_double_uint8_t:
3745 ; CHECK-P10: # %bb.0: # %entry
3746 ; CHECK-P10-NEXT: xscvdpuxws f0, f1
3747 ; CHECK-P10-NEXT: pli r4, 244140625
3748 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
3749 ; CHECK-P10-NEXT: stxsibx f0, r3, r4
3750 ; CHECK-P10-NEXT: blr
3752 ; CHECK-P9-LABEL: st_align64_double_uint8_t:
3753 ; CHECK-P9: # %bb.0: # %entry
3754 ; CHECK-P9-NEXT: xscvdpuxws f0, f1
3755 ; CHECK-P9-NEXT: lis r4, 3725
3756 ; CHECK-P9-NEXT: ori r4, r4, 19025
3757 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
3758 ; CHECK-P9-NEXT: stxsibx f0, r3, r4
3759 ; CHECK-P9-NEXT: blr
3761 ; CHECK-P8-LABEL: st_align64_double_uint8_t:
3762 ; CHECK-P8: # %bb.0: # %entry
3763 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
3764 ; CHECK-P8-NEXT: lis r4, 3725
3765 ; CHECK-P8-NEXT: ori r4, r4, 19025
3766 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
3767 ; CHECK-P8-NEXT: mffprwz r5, f0
3768 ; CHECK-P8-NEXT: stbx r5, r3, r4
3769 ; CHECK-P8-NEXT: blr
3771 %conv = fptoui double %str to i8
3772 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
3773 store i8 %conv, i8* %add.ptr, align 1
3777 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
3778 define dso_local void @st_reg_double_uint8_t(i8* nocapture %ptr, i64 %off, double %str) {
3779 ; CHECK-POSTP8-LABEL: st_reg_double_uint8_t:
3780 ; CHECK-POSTP8: # %bb.0: # %entry
3781 ; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
3782 ; CHECK-POSTP8-NEXT: stxsibx f0, r3, r4
3783 ; CHECK-POSTP8-NEXT: blr
3785 ; CHECK-P8-LABEL: st_reg_double_uint8_t:
3786 ; CHECK-P8: # %bb.0: # %entry
3787 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
3788 ; CHECK-P8-NEXT: mffprwz r5, f0
3789 ; CHECK-P8-NEXT: stbx r5, r3, r4
3790 ; CHECK-P8-NEXT: blr
3792 %conv = fptoui double %str to i8
3793 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
3794 store i8 %conv, i8* %add.ptr, align 1
3798 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
3799 define dso_local void @st_or1_double_uint8_t(i64 %ptr, i8 zeroext %off, double %str) {
3800 ; CHECK-POSTP8-LABEL: st_or1_double_uint8_t:
3801 ; CHECK-POSTP8: # %bb.0: # %entry
3802 ; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
3803 ; CHECK-POSTP8-NEXT: or r3, r4, r3
3804 ; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
3805 ; CHECK-POSTP8-NEXT: blr
3807 ; CHECK-P8-LABEL: st_or1_double_uint8_t:
3808 ; CHECK-P8: # %bb.0: # %entry
3809 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
3810 ; CHECK-P8-NEXT: or r3, r4, r3
3811 ; CHECK-P8-NEXT: mffprwz r5, f0
3812 ; CHECK-P8-NEXT: stb r5, 0(r3)
3813 ; CHECK-P8-NEXT: blr
3815 %conv = fptoui double %str to i8
3816 %conv1 = zext i8 %off to i64
3817 %or = or i64 %conv1, %ptr
3818 %0 = inttoptr i64 %or to i8*
3819 store i8 %conv, i8* %0, align 1
3823 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
3824 define dso_local void @st_not_disjoint16_double_uint8_t(i64 %ptr, double %str) {
3825 ; CHECK-POSTP8-LABEL: st_not_disjoint16_double_uint8_t:
3826 ; CHECK-POSTP8: # %bb.0: # %entry
3827 ; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
3828 ; CHECK-POSTP8-NEXT: ori r3, r3, 6
3829 ; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
3830 ; CHECK-POSTP8-NEXT: blr
3832 ; CHECK-P8-LABEL: st_not_disjoint16_double_uint8_t:
3833 ; CHECK-P8: # %bb.0: # %entry
3834 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
3835 ; CHECK-P8-NEXT: ori r3, r3, 6
3836 ; CHECK-P8-NEXT: mffprwz r4, f0
3837 ; CHECK-P8-NEXT: stb r4, 0(r3)
3838 ; CHECK-P8-NEXT: blr
3840 %conv = fptoui double %str to i8
3841 %or = or i64 %ptr, 6
3842 %0 = inttoptr i64 %or to i8*
3843 store i8 %conv, i8* %0, align 1
3847 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
3848 define dso_local void @st_disjoint_align16_double_uint8_t(i64 %ptr, double %str) {
3849 ; CHECK-POSTP8-LABEL: st_disjoint_align16_double_uint8_t:
3850 ; CHECK-POSTP8: # %bb.0: # %entry
3851 ; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
3852 ; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
3853 ; CHECK-POSTP8-NEXT: ori r3, r3, 24
3854 ; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
3855 ; CHECK-POSTP8-NEXT: blr
3857 ; CHECK-P8-LABEL: st_disjoint_align16_double_uint8_t:
3858 ; CHECK-P8: # %bb.0: # %entry
3859 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
3860 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
3861 ; CHECK-P8-NEXT: mffprwz r4, f0
3862 ; CHECK-P8-NEXT: stb r4, 24(r3)
3863 ; CHECK-P8-NEXT: blr
3865 %and = and i64 %ptr, -4096
3866 %conv = fptoui double %str to i8
3867 %or = or i64 %and, 24
3868 %0 = inttoptr i64 %or to i8*
3869 store i8 %conv, i8* %0, align 8
3873 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
3874 define dso_local void @st_not_disjoint32_double_uint8_t(i64 %ptr, double %str) {
3875 ; CHECK-POSTP8-LABEL: st_not_disjoint32_double_uint8_t:
3876 ; CHECK-POSTP8: # %bb.0: # %entry
3877 ; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
3878 ; CHECK-POSTP8-NEXT: ori r3, r3, 34463
3879 ; CHECK-POSTP8-NEXT: oris r3, r3, 1
3880 ; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
3881 ; CHECK-POSTP8-NEXT: blr
3883 ; CHECK-P8-LABEL: st_not_disjoint32_double_uint8_t:
3884 ; CHECK-P8: # %bb.0: # %entry
3885 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
3886 ; CHECK-P8-NEXT: ori r3, r3, 34463
3887 ; CHECK-P8-NEXT: oris r3, r3, 1
3888 ; CHECK-P8-NEXT: mffprwz r4, f0
3889 ; CHECK-P8-NEXT: stb r4, 0(r3)
3890 ; CHECK-P8-NEXT: blr
3892 %conv = fptoui double %str to i8
3893 %or = or i64 %ptr, 99999
3894 %0 = inttoptr i64 %or to i8*
3895 store i8 %conv, i8* %0, align 1
3899 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
3900 define dso_local void @st_disjoint_align32_double_uint8_t(i64 %ptr, double %str) {
3901 ; CHECK-P10-LABEL: st_disjoint_align32_double_uint8_t:
3902 ; CHECK-P10: # %bb.0: # %entry
3903 ; CHECK-P10-NEXT: xscvdpuxws f0, f1
3904 ; CHECK-P10-NEXT: lis r4, -15264
3905 ; CHECK-P10-NEXT: and r3, r3, r4
3906 ; CHECK-P10-NEXT: pli r4, 999990000
3907 ; CHECK-P10-NEXT: stxsibx f0, r3, r4
3908 ; CHECK-P10-NEXT: blr
3910 ; CHECK-P9-LABEL: st_disjoint_align32_double_uint8_t:
3911 ; CHECK-P9: # %bb.0: # %entry
3912 ; CHECK-P9-NEXT: xscvdpuxws f0, f1
3913 ; CHECK-P9-NEXT: lis r4, -15264
3914 ; CHECK-P9-NEXT: and r3, r3, r4
3915 ; CHECK-P9-NEXT: lis r4, 15258
3916 ; CHECK-P9-NEXT: ori r4, r4, 41712
3917 ; CHECK-P9-NEXT: stxsibx f0, r3, r4
3918 ; CHECK-P9-NEXT: blr
3920 ; CHECK-P8-LABEL: st_disjoint_align32_double_uint8_t:
3921 ; CHECK-P8: # %bb.0: # %entry
3922 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
3923 ; CHECK-P8-NEXT: lis r4, -15264
3924 ; CHECK-P8-NEXT: lis r6, 15258
3925 ; CHECK-P8-NEXT: and r3, r3, r4
3926 ; CHECK-P8-NEXT: ori r4, r6, 41712
3927 ; CHECK-P8-NEXT: mffprwz r5, f0
3928 ; CHECK-P8-NEXT: stbx r5, r3, r4
3929 ; CHECK-P8-NEXT: blr
3931 %and = and i64 %ptr, -1000341504
3932 %conv = fptoui double %str to i8
3933 %or = or i64 %and, 999990000
3934 %0 = inttoptr i64 %or to i8*
3935 store i8 %conv, i8* %0, align 16
3939 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
3940 define dso_local void @st_not_disjoint64_double_uint8_t(i64 %ptr, double %str) {
3941 ; CHECK-P10-LABEL: st_not_disjoint64_double_uint8_t:
3942 ; CHECK-P10: # %bb.0: # %entry
3943 ; CHECK-P10-NEXT: xscvdpuxws f0, f1
3944 ; CHECK-P10-NEXT: pli r4, 232
3945 ; CHECK-P10-NEXT: pli r5, 3567587329
3946 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
3947 ; CHECK-P10-NEXT: or r3, r3, r5
3948 ; CHECK-P10-NEXT: stxsibx f0, 0, r3
3949 ; CHECK-P10-NEXT: blr
3951 ; CHECK-P9-LABEL: st_not_disjoint64_double_uint8_t:
3952 ; CHECK-P9: # %bb.0: # %entry
3953 ; CHECK-P9-NEXT: li r4, 29
3954 ; CHECK-P9-NEXT: xscvdpuxws f0, f1
3955 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
3956 ; CHECK-P9-NEXT: oris r4, r4, 54437
3957 ; CHECK-P9-NEXT: ori r4, r4, 4097
3958 ; CHECK-P9-NEXT: or r3, r3, r4
3959 ; CHECK-P9-NEXT: stxsibx f0, 0, r3
3960 ; CHECK-P9-NEXT: blr
3962 ; CHECK-P8-LABEL: st_not_disjoint64_double_uint8_t:
3963 ; CHECK-P8: # %bb.0: # %entry
3964 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
3965 ; CHECK-P8-NEXT: li r4, 29
3966 ; CHECK-P8-NEXT: rldic r4, r4, 35, 24
3967 ; CHECK-P8-NEXT: oris r4, r4, 54437
3968 ; CHECK-P8-NEXT: ori r4, r4, 4097
3969 ; CHECK-P8-NEXT: or r3, r3, r4
3970 ; CHECK-P8-NEXT: mffprwz r5, f0
3971 ; CHECK-P8-NEXT: stb r5, 0(r3)
3972 ; CHECK-P8-NEXT: blr
3974 %conv = fptoui double %str to i8
3975 %or = or i64 %ptr, 1000000000001
3976 %0 = inttoptr i64 %or to i8*
3977 store i8 %conv, i8* %0, align 1
3981 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
3982 define dso_local void @st_disjoint_align64_double_uint8_t(i64 %ptr, double %str) {
3983 ; CHECK-P10-LABEL: st_disjoint_align64_double_uint8_t:
3984 ; CHECK-P10: # %bb.0: # %entry
3985 ; CHECK-P10-NEXT: xscvdpuxws f0, f1
3986 ; CHECK-P10-NEXT: pli r4, 244140625
3987 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
3988 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
3989 ; CHECK-P10-NEXT: stxsibx f0, r3, r4
3990 ; CHECK-P10-NEXT: blr
3992 ; CHECK-P9-LABEL: st_disjoint_align64_double_uint8_t:
3993 ; CHECK-P9: # %bb.0: # %entry
3994 ; CHECK-P9-NEXT: xscvdpuxws f0, f1
3995 ; CHECK-P9-NEXT: lis r4, 3725
3996 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
3997 ; CHECK-P9-NEXT: ori r4, r4, 19025
3998 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
3999 ; CHECK-P9-NEXT: stxsibx f0, r3, r4
4000 ; CHECK-P9-NEXT: blr
4002 ; CHECK-P8-LABEL: st_disjoint_align64_double_uint8_t:
4003 ; CHECK-P8: # %bb.0: # %entry
4004 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4005 ; CHECK-P8-NEXT: lis r4, 3725
4006 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
4007 ; CHECK-P8-NEXT: ori r4, r4, 19025
4008 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
4009 ; CHECK-P8-NEXT: mffprwz r5, f0
4010 ; CHECK-P8-NEXT: stbx r5, r3, r4
4011 ; CHECK-P8-NEXT: blr
4013 %and = and i64 %ptr, -1099511627776
4014 %conv = fptoui double %str to i8
4015 %or = or i64 %and, 1000000000000
4016 %0 = inttoptr i64 %or to i8*
4017 store i8 %conv, i8* %0, align 4096
4021 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4022 define dso_local void @st_cst_align16_double_uint8_t(double %str) {
4023 ; CHECK-POSTP8-LABEL: st_cst_align16_double_uint8_t:
4024 ; CHECK-POSTP8: # %bb.0: # %entry
4025 ; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
4026 ; CHECK-POSTP8-NEXT: li r3, 4080
4027 ; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
4028 ; CHECK-POSTP8-NEXT: blr
4030 ; CHECK-P8-LABEL: st_cst_align16_double_uint8_t:
4031 ; CHECK-P8: # %bb.0: # %entry
4032 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4033 ; CHECK-P8-NEXT: mffprwz r3, f0
4034 ; CHECK-P8-NEXT: stb r3, 4080(0)
4035 ; CHECK-P8-NEXT: blr
4037 %conv = fptoui double %str to i8
4038 store i8 %conv, i8* inttoptr (i64 4080 to i8*), align 16
4042 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4043 define dso_local void @st_cst_align32_double_uint8_t(double %str) {
4044 ; CHECK-P10-LABEL: st_cst_align32_double_uint8_t:
4045 ; CHECK-P10: # %bb.0: # %entry
4046 ; CHECK-P10-NEXT: xscvdpuxws f0, f1
4047 ; CHECK-P10-NEXT: pli r3, 9999900
4048 ; CHECK-P10-NEXT: stxsibx f0, 0, r3
4049 ; CHECK-P10-NEXT: blr
4051 ; CHECK-P9-LABEL: st_cst_align32_double_uint8_t:
4052 ; CHECK-P9: # %bb.0: # %entry
4053 ; CHECK-P9-NEXT: xscvdpuxws f0, f1
4054 ; CHECK-P9-NEXT: lis r3, 152
4055 ; CHECK-P9-NEXT: ori r3, r3, 38428
4056 ; CHECK-P9-NEXT: stxsibx f0, 0, r3
4057 ; CHECK-P9-NEXT: blr
4059 ; CHECK-P8-LABEL: st_cst_align32_double_uint8_t:
4060 ; CHECK-P8: # %bb.0: # %entry
4061 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4062 ; CHECK-P8-NEXT: lis r4, 153
4063 ; CHECK-P8-NEXT: mffprwz r3, f0
4064 ; CHECK-P8-NEXT: stb r3, -27108(r4)
4065 ; CHECK-P8-NEXT: blr
4067 %conv = fptoui double %str to i8
4068 store i8 %conv, i8* inttoptr (i64 9999900 to i8*), align 4
4072 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4073 define dso_local void @st_cst_align64_double_uint8_t(double %str) {
4074 ; CHECK-P10-LABEL: st_cst_align64_double_uint8_t:
4075 ; CHECK-P10: # %bb.0: # %entry
4076 ; CHECK-P10-NEXT: xscvdpuxws f0, f1
4077 ; CHECK-P10-NEXT: pli r3, 244140625
4078 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
4079 ; CHECK-P10-NEXT: stxsibx f0, 0, r3
4080 ; CHECK-P10-NEXT: blr
4082 ; CHECK-P9-LABEL: st_cst_align64_double_uint8_t:
4083 ; CHECK-P9: # %bb.0: # %entry
4084 ; CHECK-P9-NEXT: xscvdpuxws f0, f1
4085 ; CHECK-P9-NEXT: lis r3, 3725
4086 ; CHECK-P9-NEXT: ori r3, r3, 19025
4087 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
4088 ; CHECK-P9-NEXT: stxsibx f0, 0, r3
4089 ; CHECK-P9-NEXT: blr
4091 ; CHECK-P8-LABEL: st_cst_align64_double_uint8_t:
4092 ; CHECK-P8: # %bb.0: # %entry
4093 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4094 ; CHECK-P8-NEXT: lis r3, 3725
4095 ; CHECK-P8-NEXT: ori r3, r3, 19025
4096 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
4097 ; CHECK-P8-NEXT: mffprwz r4, f0
4098 ; CHECK-P8-NEXT: stb r4, 0(r3)
4099 ; CHECK-P8-NEXT: blr
4101 %conv = fptoui double %str to i8
4102 store i8 %conv, i8* inttoptr (i64 1000000000000 to i8*), align 4096
4106 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4107 define dso_local void @st_0_double_int8_t(i64 %ptr, double %str) {
4108 ; CHECK-POSTP8-LABEL: st_0_double_int8_t:
4109 ; CHECK-POSTP8: # %bb.0: # %entry
4110 ; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
4111 ; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
4112 ; CHECK-POSTP8-NEXT: blr
4114 ; CHECK-P8-LABEL: st_0_double_int8_t:
4115 ; CHECK-P8: # %bb.0: # %entry
4116 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4117 ; CHECK-P8-NEXT: mffprwz r4, f0
4118 ; CHECK-P8-NEXT: stb r4, 0(r3)
4119 ; CHECK-P8-NEXT: blr
4121 %conv = fptosi double %str to i8
4122 %0 = inttoptr i64 %ptr to i8*
4123 store i8 %conv, i8* %0, align 1
4127 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4128 define dso_local void @st_align16_double_int8_t(i8* nocapture %ptr, double %str) {
4129 ; CHECK-POSTP8-LABEL: st_align16_double_int8_t:
4130 ; CHECK-POSTP8: # %bb.0: # %entry
4131 ; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
4132 ; CHECK-POSTP8-NEXT: addi r3, r3, 8
4133 ; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
4134 ; CHECK-POSTP8-NEXT: blr
4136 ; CHECK-P8-LABEL: st_align16_double_int8_t:
4137 ; CHECK-P8: # %bb.0: # %entry
4138 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4139 ; CHECK-P8-NEXT: mffprwz r4, f0
4140 ; CHECK-P8-NEXT: stb r4, 8(r3)
4141 ; CHECK-P8-NEXT: blr
4143 %conv = fptosi double %str to i8
4144 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
4145 store i8 %conv, i8* %add.ptr, align 1
4149 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4150 define dso_local void @st_align32_double_int8_t(i8* nocapture %ptr, double %str) {
4151 ; CHECK-P10-LABEL: st_align32_double_int8_t:
4152 ; CHECK-P10: # %bb.0: # %entry
4153 ; CHECK-P10-NEXT: xscvdpsxws f0, f1
4154 ; CHECK-P10-NEXT: pli r4, 99999000
4155 ; CHECK-P10-NEXT: stxsibx f0, r3, r4
4156 ; CHECK-P10-NEXT: blr
4158 ; CHECK-P9-LABEL: st_align32_double_int8_t:
4159 ; CHECK-P9: # %bb.0: # %entry
4160 ; CHECK-P9-NEXT: xscvdpsxws f0, f1
4161 ; CHECK-P9-NEXT: lis r4, 1525
4162 ; CHECK-P9-NEXT: ori r4, r4, 56600
4163 ; CHECK-P9-NEXT: stxsibx f0, r3, r4
4164 ; CHECK-P9-NEXT: blr
4166 ; CHECK-P8-LABEL: st_align32_double_int8_t:
4167 ; CHECK-P8: # %bb.0: # %entry
4168 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4169 ; CHECK-P8-NEXT: lis r4, 1525
4170 ; CHECK-P8-NEXT: ori r4, r4, 56600
4171 ; CHECK-P8-NEXT: mffprwz r5, f0
4172 ; CHECK-P8-NEXT: stbx r5, r3, r4
4173 ; CHECK-P8-NEXT: blr
4175 %conv = fptosi double %str to i8
4176 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
4177 store i8 %conv, i8* %add.ptr, align 1
4181 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4182 define dso_local void @st_align64_double_int8_t(i8* nocapture %ptr, double %str) {
4183 ; CHECK-P10-LABEL: st_align64_double_int8_t:
4184 ; CHECK-P10: # %bb.0: # %entry
4185 ; CHECK-P10-NEXT: xscvdpsxws f0, f1
4186 ; CHECK-P10-NEXT: pli r4, 244140625
4187 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
4188 ; CHECK-P10-NEXT: stxsibx f0, r3, r4
4189 ; CHECK-P10-NEXT: blr
4191 ; CHECK-P9-LABEL: st_align64_double_int8_t:
4192 ; CHECK-P9: # %bb.0: # %entry
4193 ; CHECK-P9-NEXT: xscvdpsxws f0, f1
4194 ; CHECK-P9-NEXT: lis r4, 3725
4195 ; CHECK-P9-NEXT: ori r4, r4, 19025
4196 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
4197 ; CHECK-P9-NEXT: stxsibx f0, r3, r4
4198 ; CHECK-P9-NEXT: blr
4200 ; CHECK-P8-LABEL: st_align64_double_int8_t:
4201 ; CHECK-P8: # %bb.0: # %entry
4202 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4203 ; CHECK-P8-NEXT: lis r4, 3725
4204 ; CHECK-P8-NEXT: ori r4, r4, 19025
4205 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
4206 ; CHECK-P8-NEXT: mffprwz r5, f0
4207 ; CHECK-P8-NEXT: stbx r5, r3, r4
4208 ; CHECK-P8-NEXT: blr
4210 %conv = fptosi double %str to i8
4211 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
4212 store i8 %conv, i8* %add.ptr, align 1
4216 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4217 define dso_local void @st_reg_double_int8_t(i8* nocapture %ptr, i64 %off, double %str) {
4218 ; CHECK-POSTP8-LABEL: st_reg_double_int8_t:
4219 ; CHECK-POSTP8: # %bb.0: # %entry
4220 ; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
4221 ; CHECK-POSTP8-NEXT: stxsibx f0, r3, r4
4222 ; CHECK-POSTP8-NEXT: blr
4224 ; CHECK-P8-LABEL: st_reg_double_int8_t:
4225 ; CHECK-P8: # %bb.0: # %entry
4226 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4227 ; CHECK-P8-NEXT: mffprwz r5, f0
4228 ; CHECK-P8-NEXT: stbx r5, r3, r4
4229 ; CHECK-P8-NEXT: blr
4231 %conv = fptosi double %str to i8
4232 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
4233 store i8 %conv, i8* %add.ptr, align 1
4237 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4238 define dso_local void @st_or1_double_int8_t(i64 %ptr, i8 zeroext %off, double %str) {
4239 ; CHECK-POSTP8-LABEL: st_or1_double_int8_t:
4240 ; CHECK-POSTP8: # %bb.0: # %entry
4241 ; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
4242 ; CHECK-POSTP8-NEXT: or r3, r4, r3
4243 ; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
4244 ; CHECK-POSTP8-NEXT: blr
4246 ; CHECK-P8-LABEL: st_or1_double_int8_t:
4247 ; CHECK-P8: # %bb.0: # %entry
4248 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4249 ; CHECK-P8-NEXT: or r3, r4, r3
4250 ; CHECK-P8-NEXT: mffprwz r5, f0
4251 ; CHECK-P8-NEXT: stb r5, 0(r3)
4252 ; CHECK-P8-NEXT: blr
4254 %conv = fptosi double %str to i8
4255 %conv1 = zext i8 %off to i64
4256 %or = or i64 %conv1, %ptr
4257 %0 = inttoptr i64 %or to i8*
4258 store i8 %conv, i8* %0, align 1
4262 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4263 define dso_local void @st_not_disjoint16_double_int8_t(i64 %ptr, double %str) {
4264 ; CHECK-POSTP8-LABEL: st_not_disjoint16_double_int8_t:
4265 ; CHECK-POSTP8: # %bb.0: # %entry
4266 ; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
4267 ; CHECK-POSTP8-NEXT: ori r3, r3, 6
4268 ; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
4269 ; CHECK-POSTP8-NEXT: blr
4271 ; CHECK-P8-LABEL: st_not_disjoint16_double_int8_t:
4272 ; CHECK-P8: # %bb.0: # %entry
4273 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4274 ; CHECK-P8-NEXT: ori r3, r3, 6
4275 ; CHECK-P8-NEXT: mffprwz r4, f0
4276 ; CHECK-P8-NEXT: stb r4, 0(r3)
4277 ; CHECK-P8-NEXT: blr
4279 %conv = fptosi double %str to i8
4280 %or = or i64 %ptr, 6
4281 %0 = inttoptr i64 %or to i8*
4282 store i8 %conv, i8* %0, align 1
4286 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4287 define dso_local void @st_disjoint_align16_double_int8_t(i64 %ptr, double %str) {
4288 ; CHECK-POSTP8-LABEL: st_disjoint_align16_double_int8_t:
4289 ; CHECK-POSTP8: # %bb.0: # %entry
4290 ; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
4291 ; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
4292 ; CHECK-POSTP8-NEXT: ori r3, r3, 24
4293 ; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
4294 ; CHECK-POSTP8-NEXT: blr
4296 ; CHECK-P8-LABEL: st_disjoint_align16_double_int8_t:
4297 ; CHECK-P8: # %bb.0: # %entry
4298 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4299 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
4300 ; CHECK-P8-NEXT: mffprwz r4, f0
4301 ; CHECK-P8-NEXT: stb r4, 24(r3)
4302 ; CHECK-P8-NEXT: blr
4304 %and = and i64 %ptr, -4096
4305 %conv = fptosi double %str to i8
4306 %or = or i64 %and, 24
4307 %0 = inttoptr i64 %or to i8*
4308 store i8 %conv, i8* %0, align 8
4312 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4313 define dso_local void @st_not_disjoint32_double_int8_t(i64 %ptr, double %str) {
4314 ; CHECK-POSTP8-LABEL: st_not_disjoint32_double_int8_t:
4315 ; CHECK-POSTP8: # %bb.0: # %entry
4316 ; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
4317 ; CHECK-POSTP8-NEXT: ori r3, r3, 34463
4318 ; CHECK-POSTP8-NEXT: oris r3, r3, 1
4319 ; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
4320 ; CHECK-POSTP8-NEXT: blr
4322 ; CHECK-P8-LABEL: st_not_disjoint32_double_int8_t:
4323 ; CHECK-P8: # %bb.0: # %entry
4324 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4325 ; CHECK-P8-NEXT: ori r3, r3, 34463
4326 ; CHECK-P8-NEXT: oris r3, r3, 1
4327 ; CHECK-P8-NEXT: mffprwz r4, f0
4328 ; CHECK-P8-NEXT: stb r4, 0(r3)
4329 ; CHECK-P8-NEXT: blr
4331 %conv = fptosi double %str to i8
4332 %or = or i64 %ptr, 99999
4333 %0 = inttoptr i64 %or to i8*
4334 store i8 %conv, i8* %0, align 1
4338 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4339 define dso_local void @st_disjoint_align32_double_int8_t(i64 %ptr, double %str) {
4340 ; CHECK-P10-LABEL: st_disjoint_align32_double_int8_t:
4341 ; CHECK-P10: # %bb.0: # %entry
4342 ; CHECK-P10-NEXT: xscvdpsxws f0, f1
4343 ; CHECK-P10-NEXT: lis r4, -15264
4344 ; CHECK-P10-NEXT: and r3, r3, r4
4345 ; CHECK-P10-NEXT: pli r4, 999990000
4346 ; CHECK-P10-NEXT: stxsibx f0, r3, r4
4347 ; CHECK-P10-NEXT: blr
4349 ; CHECK-P9-LABEL: st_disjoint_align32_double_int8_t:
4350 ; CHECK-P9: # %bb.0: # %entry
4351 ; CHECK-P9-NEXT: xscvdpsxws f0, f1
4352 ; CHECK-P9-NEXT: lis r4, -15264
4353 ; CHECK-P9-NEXT: and r3, r3, r4
4354 ; CHECK-P9-NEXT: lis r4, 15258
4355 ; CHECK-P9-NEXT: ori r4, r4, 41712
4356 ; CHECK-P9-NEXT: stxsibx f0, r3, r4
4357 ; CHECK-P9-NEXT: blr
4359 ; CHECK-P8-LABEL: st_disjoint_align32_double_int8_t:
4360 ; CHECK-P8: # %bb.0: # %entry
4361 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4362 ; CHECK-P8-NEXT: lis r4, -15264
4363 ; CHECK-P8-NEXT: lis r6, 15258
4364 ; CHECK-P8-NEXT: and r3, r3, r4
4365 ; CHECK-P8-NEXT: ori r4, r6, 41712
4366 ; CHECK-P8-NEXT: mffprwz r5, f0
4367 ; CHECK-P8-NEXT: stbx r5, r3, r4
4368 ; CHECK-P8-NEXT: blr
4370 %and = and i64 %ptr, -1000341504
4371 %conv = fptosi double %str to i8
4372 %or = or i64 %and, 999990000
4373 %0 = inttoptr i64 %or to i8*
4374 store i8 %conv, i8* %0, align 16
4378 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4379 define dso_local void @st_not_disjoint64_double_int8_t(i64 %ptr, double %str) {
4380 ; CHECK-P10-LABEL: st_not_disjoint64_double_int8_t:
4381 ; CHECK-P10: # %bb.0: # %entry
4382 ; CHECK-P10-NEXT: xscvdpsxws f0, f1
4383 ; CHECK-P10-NEXT: pli r4, 232
4384 ; CHECK-P10-NEXT: pli r5, 3567587329
4385 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
4386 ; CHECK-P10-NEXT: or r3, r3, r5
4387 ; CHECK-P10-NEXT: stxsibx f0, 0, r3
4388 ; CHECK-P10-NEXT: blr
4390 ; CHECK-P9-LABEL: st_not_disjoint64_double_int8_t:
4391 ; CHECK-P9: # %bb.0: # %entry
4392 ; CHECK-P9-NEXT: li r4, 29
4393 ; CHECK-P9-NEXT: xscvdpsxws f0, f1
4394 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
4395 ; CHECK-P9-NEXT: oris r4, r4, 54437
4396 ; CHECK-P9-NEXT: ori r4, r4, 4097
4397 ; CHECK-P9-NEXT: or r3, r3, r4
4398 ; CHECK-P9-NEXT: stxsibx f0, 0, r3
4399 ; CHECK-P9-NEXT: blr
4401 ; CHECK-P8-LABEL: st_not_disjoint64_double_int8_t:
4402 ; CHECK-P8: # %bb.0: # %entry
4403 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4404 ; CHECK-P8-NEXT: li r4, 29
4405 ; CHECK-P8-NEXT: rldic r4, r4, 35, 24
4406 ; CHECK-P8-NEXT: oris r4, r4, 54437
4407 ; CHECK-P8-NEXT: ori r4, r4, 4097
4408 ; CHECK-P8-NEXT: or r3, r3, r4
4409 ; CHECK-P8-NEXT: mffprwz r5, f0
4410 ; CHECK-P8-NEXT: stb r5, 0(r3)
4411 ; CHECK-P8-NEXT: blr
4413 %conv = fptosi double %str to i8
4414 %or = or i64 %ptr, 1000000000001
4415 %0 = inttoptr i64 %or to i8*
4416 store i8 %conv, i8* %0, align 1
4420 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4421 define dso_local void @st_disjoint_align64_double_int8_t(i64 %ptr, double %str) {
4422 ; CHECK-P10-LABEL: st_disjoint_align64_double_int8_t:
4423 ; CHECK-P10: # %bb.0: # %entry
4424 ; CHECK-P10-NEXT: xscvdpsxws f0, f1
4425 ; CHECK-P10-NEXT: pli r4, 244140625
4426 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
4427 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
4428 ; CHECK-P10-NEXT: stxsibx f0, r3, r4
4429 ; CHECK-P10-NEXT: blr
4431 ; CHECK-P9-LABEL: st_disjoint_align64_double_int8_t:
4432 ; CHECK-P9: # %bb.0: # %entry
4433 ; CHECK-P9-NEXT: xscvdpsxws f0, f1
4434 ; CHECK-P9-NEXT: lis r4, 3725
4435 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
4436 ; CHECK-P9-NEXT: ori r4, r4, 19025
4437 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
4438 ; CHECK-P9-NEXT: stxsibx f0, r3, r4
4439 ; CHECK-P9-NEXT: blr
4441 ; CHECK-P8-LABEL: st_disjoint_align64_double_int8_t:
4442 ; CHECK-P8: # %bb.0: # %entry
4443 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4444 ; CHECK-P8-NEXT: lis r4, 3725
4445 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
4446 ; CHECK-P8-NEXT: ori r4, r4, 19025
4447 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
4448 ; CHECK-P8-NEXT: mffprwz r5, f0
4449 ; CHECK-P8-NEXT: stbx r5, r3, r4
4450 ; CHECK-P8-NEXT: blr
4452 %and = and i64 %ptr, -1099511627776
4453 %conv = fptosi double %str to i8
4454 %or = or i64 %and, 1000000000000
4455 %0 = inttoptr i64 %or to i8*
4456 store i8 %conv, i8* %0, align 4096
4460 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4461 define dso_local void @st_cst_align16_double_int8_t(double %str) {
4462 ; CHECK-POSTP8-LABEL: st_cst_align16_double_int8_t:
4463 ; CHECK-POSTP8: # %bb.0: # %entry
4464 ; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
4465 ; CHECK-POSTP8-NEXT: li r3, 4080
4466 ; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
4467 ; CHECK-POSTP8-NEXT: blr
4469 ; CHECK-P8-LABEL: st_cst_align16_double_int8_t:
4470 ; CHECK-P8: # %bb.0: # %entry
4471 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4472 ; CHECK-P8-NEXT: mffprwz r3, f0
4473 ; CHECK-P8-NEXT: stb r3, 4080(0)
4474 ; CHECK-P8-NEXT: blr
4476 %conv = fptosi double %str to i8
4477 store i8 %conv, i8* inttoptr (i64 4080 to i8*), align 16
4481 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4482 define dso_local void @st_cst_align32_double_int8_t(double %str) {
4483 ; CHECK-P10-LABEL: st_cst_align32_double_int8_t:
4484 ; CHECK-P10: # %bb.0: # %entry
4485 ; CHECK-P10-NEXT: xscvdpsxws f0, f1
4486 ; CHECK-P10-NEXT: pli r3, 9999900
4487 ; CHECK-P10-NEXT: stxsibx f0, 0, r3
4488 ; CHECK-P10-NEXT: blr
4490 ; CHECK-P9-LABEL: st_cst_align32_double_int8_t:
4491 ; CHECK-P9: # %bb.0: # %entry
4492 ; CHECK-P9-NEXT: xscvdpsxws f0, f1
4493 ; CHECK-P9-NEXT: lis r3, 152
4494 ; CHECK-P9-NEXT: ori r3, r3, 38428
4495 ; CHECK-P9-NEXT: stxsibx f0, 0, r3
4496 ; CHECK-P9-NEXT: blr
4498 ; CHECK-P8-LABEL: st_cst_align32_double_int8_t:
4499 ; CHECK-P8: # %bb.0: # %entry
4500 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4501 ; CHECK-P8-NEXT: lis r4, 153
4502 ; CHECK-P8-NEXT: mffprwz r3, f0
4503 ; CHECK-P8-NEXT: stb r3, -27108(r4)
4504 ; CHECK-P8-NEXT: blr
4506 %conv = fptosi double %str to i8
4507 store i8 %conv, i8* inttoptr (i64 9999900 to i8*), align 4
4511 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4512 define dso_local void @st_cst_align64_double_int8_t(double %str) {
4513 ; CHECK-P10-LABEL: st_cst_align64_double_int8_t:
4514 ; CHECK-P10: # %bb.0: # %entry
4515 ; CHECK-P10-NEXT: xscvdpsxws f0, f1
4516 ; CHECK-P10-NEXT: pli r3, 244140625
4517 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
4518 ; CHECK-P10-NEXT: stxsibx f0, 0, r3
4519 ; CHECK-P10-NEXT: blr
4521 ; CHECK-P9-LABEL: st_cst_align64_double_int8_t:
4522 ; CHECK-P9: # %bb.0: # %entry
4523 ; CHECK-P9-NEXT: xscvdpsxws f0, f1
4524 ; CHECK-P9-NEXT: lis r3, 3725
4525 ; CHECK-P9-NEXT: ori r3, r3, 19025
4526 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
4527 ; CHECK-P9-NEXT: stxsibx f0, 0, r3
4528 ; CHECK-P9-NEXT: blr
4530 ; CHECK-P8-LABEL: st_cst_align64_double_int8_t:
4531 ; CHECK-P8: # %bb.0: # %entry
4532 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4533 ; CHECK-P8-NEXT: lis r3, 3725
4534 ; CHECK-P8-NEXT: ori r3, r3, 19025
4535 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
4536 ; CHECK-P8-NEXT: mffprwz r4, f0
4537 ; CHECK-P8-NEXT: stb r4, 0(r3)
4538 ; CHECK-P8-NEXT: blr
4540 %conv = fptosi double %str to i8
4541 store i8 %conv, i8* inttoptr (i64 1000000000000 to i8*), align 4096
4545 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4546 define dso_local void @st_0_double_uint16_t(i64 %ptr, double %str) {
4547 ; CHECK-POSTP8-LABEL: st_0_double_uint16_t:
4548 ; CHECK-POSTP8: # %bb.0: # %entry
4549 ; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
4550 ; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
4551 ; CHECK-POSTP8-NEXT: blr
4553 ; CHECK-P8-LABEL: st_0_double_uint16_t:
4554 ; CHECK-P8: # %bb.0: # %entry
4555 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4556 ; CHECK-P8-NEXT: mffprwz r4, f0
4557 ; CHECK-P8-NEXT: sth r4, 0(r3)
4558 ; CHECK-P8-NEXT: blr
4560 %conv = fptoui double %str to i16
4561 %0 = inttoptr i64 %ptr to i16*
4562 store i16 %conv, i16* %0, align 2
4566 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4567 define dso_local void @st_align16_double_uint16_t(i8* nocapture %ptr, double %str) {
4568 ; CHECK-POSTP8-LABEL: st_align16_double_uint16_t:
4569 ; CHECK-POSTP8: # %bb.0: # %entry
4570 ; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
4571 ; CHECK-POSTP8-NEXT: addi r3, r3, 8
4572 ; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
4573 ; CHECK-POSTP8-NEXT: blr
4575 ; CHECK-P8-LABEL: st_align16_double_uint16_t:
4576 ; CHECK-P8: # %bb.0: # %entry
4577 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4578 ; CHECK-P8-NEXT: mffprwz r4, f0
4579 ; CHECK-P8-NEXT: sth r4, 8(r3)
4580 ; CHECK-P8-NEXT: blr
4582 %conv = fptoui double %str to i16
4583 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
4584 %0 = bitcast i8* %add.ptr to i16*
4585 store i16 %conv, i16* %0, align 2
4589 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4590 define dso_local void @st_align32_double_uint16_t(i8* nocapture %ptr, double %str) {
4591 ; CHECK-P10-LABEL: st_align32_double_uint16_t:
4592 ; CHECK-P10: # %bb.0: # %entry
4593 ; CHECK-P10-NEXT: xscvdpuxws f0, f1
4594 ; CHECK-P10-NEXT: pli r4, 99999000
4595 ; CHECK-P10-NEXT: stxsihx f0, r3, r4
4596 ; CHECK-P10-NEXT: blr
4598 ; CHECK-P9-LABEL: st_align32_double_uint16_t:
4599 ; CHECK-P9: # %bb.0: # %entry
4600 ; CHECK-P9-NEXT: xscvdpuxws f0, f1
4601 ; CHECK-P9-NEXT: lis r4, 1525
4602 ; CHECK-P9-NEXT: ori r4, r4, 56600
4603 ; CHECK-P9-NEXT: stxsihx f0, r3, r4
4604 ; CHECK-P9-NEXT: blr
4606 ; CHECK-P8-LABEL: st_align32_double_uint16_t:
4607 ; CHECK-P8: # %bb.0: # %entry
4608 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4609 ; CHECK-P8-NEXT: lis r4, 1525
4610 ; CHECK-P8-NEXT: ori r4, r4, 56600
4611 ; CHECK-P8-NEXT: mffprwz r5, f0
4612 ; CHECK-P8-NEXT: sthx r5, r3, r4
4613 ; CHECK-P8-NEXT: blr
4615 %conv = fptoui double %str to i16
4616 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
4617 %0 = bitcast i8* %add.ptr to i16*
4618 store i16 %conv, i16* %0, align 2
4622 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4623 define dso_local void @st_align64_double_uint16_t(i8* nocapture %ptr, double %str) {
4624 ; CHECK-P10-LABEL: st_align64_double_uint16_t:
4625 ; CHECK-P10: # %bb.0: # %entry
4626 ; CHECK-P10-NEXT: xscvdpuxws f0, f1
4627 ; CHECK-P10-NEXT: pli r4, 244140625
4628 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
4629 ; CHECK-P10-NEXT: stxsihx f0, r3, r4
4630 ; CHECK-P10-NEXT: blr
4632 ; CHECK-P9-LABEL: st_align64_double_uint16_t:
4633 ; CHECK-P9: # %bb.0: # %entry
4634 ; CHECK-P9-NEXT: xscvdpuxws f0, f1
4635 ; CHECK-P9-NEXT: lis r4, 3725
4636 ; CHECK-P9-NEXT: ori r4, r4, 19025
4637 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
4638 ; CHECK-P9-NEXT: stxsihx f0, r3, r4
4639 ; CHECK-P9-NEXT: blr
4641 ; CHECK-P8-LABEL: st_align64_double_uint16_t:
4642 ; CHECK-P8: # %bb.0: # %entry
4643 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4644 ; CHECK-P8-NEXT: lis r4, 3725
4645 ; CHECK-P8-NEXT: ori r4, r4, 19025
4646 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
4647 ; CHECK-P8-NEXT: mffprwz r5, f0
4648 ; CHECK-P8-NEXT: sthx r5, r3, r4
4649 ; CHECK-P8-NEXT: blr
4651 %conv = fptoui double %str to i16
4652 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
4653 %0 = bitcast i8* %add.ptr to i16*
4654 store i16 %conv, i16* %0, align 2
4658 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4659 define dso_local void @st_reg_double_uint16_t(i8* nocapture %ptr, i64 %off, double %str) {
4660 ; CHECK-POSTP8-LABEL: st_reg_double_uint16_t:
4661 ; CHECK-POSTP8: # %bb.0: # %entry
4662 ; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
4663 ; CHECK-POSTP8-NEXT: stxsihx f0, r3, r4
4664 ; CHECK-POSTP8-NEXT: blr
4666 ; CHECK-P8-LABEL: st_reg_double_uint16_t:
4667 ; CHECK-P8: # %bb.0: # %entry
4668 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4669 ; CHECK-P8-NEXT: mffprwz r5, f0
4670 ; CHECK-P8-NEXT: sthx r5, r3, r4
4671 ; CHECK-P8-NEXT: blr
4673 %conv = fptoui double %str to i16
4674 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
4675 %0 = bitcast i8* %add.ptr to i16*
4676 store i16 %conv, i16* %0, align 2
4680 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4681 define dso_local void @st_or1_double_uint16_t(i64 %ptr, i8 zeroext %off, double %str) {
4682 ; CHECK-POSTP8-LABEL: st_or1_double_uint16_t:
4683 ; CHECK-POSTP8: # %bb.0: # %entry
4684 ; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
4685 ; CHECK-POSTP8-NEXT: or r3, r4, r3
4686 ; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
4687 ; CHECK-POSTP8-NEXT: blr
4689 ; CHECK-P8-LABEL: st_or1_double_uint16_t:
4690 ; CHECK-P8: # %bb.0: # %entry
4691 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4692 ; CHECK-P8-NEXT: or r3, r4, r3
4693 ; CHECK-P8-NEXT: mffprwz r5, f0
4694 ; CHECK-P8-NEXT: sth r5, 0(r3)
4695 ; CHECK-P8-NEXT: blr
4697 %conv = fptoui double %str to i16
4698 %conv1 = zext i8 %off to i64
4699 %or = or i64 %conv1, %ptr
4700 %0 = inttoptr i64 %or to i16*
4701 store i16 %conv, i16* %0, align 2
4705 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4706 define dso_local void @st_not_disjoint16_double_uint16_t(i64 %ptr, double %str) {
4707 ; CHECK-POSTP8-LABEL: st_not_disjoint16_double_uint16_t:
4708 ; CHECK-POSTP8: # %bb.0: # %entry
4709 ; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
4710 ; CHECK-POSTP8-NEXT: ori r3, r3, 6
4711 ; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
4712 ; CHECK-POSTP8-NEXT: blr
4714 ; CHECK-P8-LABEL: st_not_disjoint16_double_uint16_t:
4715 ; CHECK-P8: # %bb.0: # %entry
4716 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4717 ; CHECK-P8-NEXT: ori r3, r3, 6
4718 ; CHECK-P8-NEXT: mffprwz r4, f0
4719 ; CHECK-P8-NEXT: sth r4, 0(r3)
4720 ; CHECK-P8-NEXT: blr
4722 %conv = fptoui double %str to i16
4723 %or = or i64 %ptr, 6
4724 %0 = inttoptr i64 %or to i16*
4725 store i16 %conv, i16* %0, align 2
4729 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4730 define dso_local void @st_disjoint_align16_double_uint16_t(i64 %ptr, double %str) {
4731 ; CHECK-POSTP8-LABEL: st_disjoint_align16_double_uint16_t:
4732 ; CHECK-POSTP8: # %bb.0: # %entry
4733 ; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
4734 ; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
4735 ; CHECK-POSTP8-NEXT: ori r3, r3, 24
4736 ; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
4737 ; CHECK-POSTP8-NEXT: blr
4739 ; CHECK-P8-LABEL: st_disjoint_align16_double_uint16_t:
4740 ; CHECK-P8: # %bb.0: # %entry
4741 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4742 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
4743 ; CHECK-P8-NEXT: mffprwz r4, f0
4744 ; CHECK-P8-NEXT: sth r4, 24(r3)
4745 ; CHECK-P8-NEXT: blr
4747 %and = and i64 %ptr, -4096
4748 %conv = fptoui double %str to i16
4749 %or = or i64 %and, 24
4750 %0 = inttoptr i64 %or to i16*
4751 store i16 %conv, i16* %0, align 8
4755 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4756 define dso_local void @st_not_disjoint32_double_uint16_t(i64 %ptr, double %str) {
4757 ; CHECK-POSTP8-LABEL: st_not_disjoint32_double_uint16_t:
4758 ; CHECK-POSTP8: # %bb.0: # %entry
4759 ; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
4760 ; CHECK-POSTP8-NEXT: ori r3, r3, 34463
4761 ; CHECK-POSTP8-NEXT: oris r3, r3, 1
4762 ; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
4763 ; CHECK-POSTP8-NEXT: blr
4765 ; CHECK-P8-LABEL: st_not_disjoint32_double_uint16_t:
4766 ; CHECK-P8: # %bb.0: # %entry
4767 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4768 ; CHECK-P8-NEXT: ori r3, r3, 34463
4769 ; CHECK-P8-NEXT: oris r3, r3, 1
4770 ; CHECK-P8-NEXT: mffprwz r4, f0
4771 ; CHECK-P8-NEXT: sth r4, 0(r3)
4772 ; CHECK-P8-NEXT: blr
4774 %conv = fptoui double %str to i16
4775 %or = or i64 %ptr, 99999
4776 %0 = inttoptr i64 %or to i16*
4777 store i16 %conv, i16* %0, align 2
4781 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4782 define dso_local void @st_disjoint_align32_double_uint16_t(i64 %ptr, double %str) {
4783 ; CHECK-P10-LABEL: st_disjoint_align32_double_uint16_t:
4784 ; CHECK-P10: # %bb.0: # %entry
4785 ; CHECK-P10-NEXT: xscvdpuxws f0, f1
4786 ; CHECK-P10-NEXT: lis r4, -15264
4787 ; CHECK-P10-NEXT: and r3, r3, r4
4788 ; CHECK-P10-NEXT: pli r4, 999990000
4789 ; CHECK-P10-NEXT: stxsihx f0, r3, r4
4790 ; CHECK-P10-NEXT: blr
4792 ; CHECK-P9-LABEL: st_disjoint_align32_double_uint16_t:
4793 ; CHECK-P9: # %bb.0: # %entry
4794 ; CHECK-P9-NEXT: xscvdpuxws f0, f1
4795 ; CHECK-P9-NEXT: lis r4, -15264
4796 ; CHECK-P9-NEXT: and r3, r3, r4
4797 ; CHECK-P9-NEXT: lis r4, 15258
4798 ; CHECK-P9-NEXT: ori r4, r4, 41712
4799 ; CHECK-P9-NEXT: stxsihx f0, r3, r4
4800 ; CHECK-P9-NEXT: blr
4802 ; CHECK-P8-LABEL: st_disjoint_align32_double_uint16_t:
4803 ; CHECK-P8: # %bb.0: # %entry
4804 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4805 ; CHECK-P8-NEXT: lis r4, -15264
4806 ; CHECK-P8-NEXT: lis r6, 15258
4807 ; CHECK-P8-NEXT: and r3, r3, r4
4808 ; CHECK-P8-NEXT: ori r4, r6, 41712
4809 ; CHECK-P8-NEXT: mffprwz r5, f0
4810 ; CHECK-P8-NEXT: sthx r5, r3, r4
4811 ; CHECK-P8-NEXT: blr
4813 %and = and i64 %ptr, -1000341504
4814 %conv = fptoui double %str to i16
4815 %or = or i64 %and, 999990000
4816 %0 = inttoptr i64 %or to i16*
4817 store i16 %conv, i16* %0, align 16
4821 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4822 define dso_local void @st_not_disjoint64_double_uint16_t(i64 %ptr, double %str) {
4823 ; CHECK-P10-LABEL: st_not_disjoint64_double_uint16_t:
4824 ; CHECK-P10: # %bb.0: # %entry
4825 ; CHECK-P10-NEXT: xscvdpuxws f0, f1
4826 ; CHECK-P10-NEXT: pli r4, 232
4827 ; CHECK-P10-NEXT: pli r5, 3567587329
4828 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
4829 ; CHECK-P10-NEXT: or r3, r3, r5
4830 ; CHECK-P10-NEXT: stxsihx f0, 0, r3
4831 ; CHECK-P10-NEXT: blr
4833 ; CHECK-P9-LABEL: st_not_disjoint64_double_uint16_t:
4834 ; CHECK-P9: # %bb.0: # %entry
4835 ; CHECK-P9-NEXT: li r4, 29
4836 ; CHECK-P9-NEXT: xscvdpuxws f0, f1
4837 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
4838 ; CHECK-P9-NEXT: oris r4, r4, 54437
4839 ; CHECK-P9-NEXT: ori r4, r4, 4097
4840 ; CHECK-P9-NEXT: or r3, r3, r4
4841 ; CHECK-P9-NEXT: stxsihx f0, 0, r3
4842 ; CHECK-P9-NEXT: blr
4844 ; CHECK-P8-LABEL: st_not_disjoint64_double_uint16_t:
4845 ; CHECK-P8: # %bb.0: # %entry
4846 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4847 ; CHECK-P8-NEXT: li r4, 29
4848 ; CHECK-P8-NEXT: rldic r4, r4, 35, 24
4849 ; CHECK-P8-NEXT: oris r4, r4, 54437
4850 ; CHECK-P8-NEXT: ori r4, r4, 4097
4851 ; CHECK-P8-NEXT: or r3, r3, r4
4852 ; CHECK-P8-NEXT: mffprwz r5, f0
4853 ; CHECK-P8-NEXT: sth r5, 0(r3)
4854 ; CHECK-P8-NEXT: blr
4856 %conv = fptoui double %str to i16
4857 %or = or i64 %ptr, 1000000000001
4858 %0 = inttoptr i64 %or to i16*
4859 store i16 %conv, i16* %0, align 2
4863 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4864 define dso_local void @st_disjoint_align64_double_uint16_t(i64 %ptr, double %str) {
4865 ; CHECK-P10-LABEL: st_disjoint_align64_double_uint16_t:
4866 ; CHECK-P10: # %bb.0: # %entry
4867 ; CHECK-P10-NEXT: xscvdpuxws f0, f1
4868 ; CHECK-P10-NEXT: pli r4, 244140625
4869 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
4870 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
4871 ; CHECK-P10-NEXT: stxsihx f0, r3, r4
4872 ; CHECK-P10-NEXT: blr
4874 ; CHECK-P9-LABEL: st_disjoint_align64_double_uint16_t:
4875 ; CHECK-P9: # %bb.0: # %entry
4876 ; CHECK-P9-NEXT: xscvdpuxws f0, f1
4877 ; CHECK-P9-NEXT: lis r4, 3725
4878 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
4879 ; CHECK-P9-NEXT: ori r4, r4, 19025
4880 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
4881 ; CHECK-P9-NEXT: stxsihx f0, r3, r4
4882 ; CHECK-P9-NEXT: blr
4884 ; CHECK-P8-LABEL: st_disjoint_align64_double_uint16_t:
4885 ; CHECK-P8: # %bb.0: # %entry
4886 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4887 ; CHECK-P8-NEXT: lis r4, 3725
4888 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
4889 ; CHECK-P8-NEXT: ori r4, r4, 19025
4890 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
4891 ; CHECK-P8-NEXT: mffprwz r5, f0
4892 ; CHECK-P8-NEXT: sthx r5, r3, r4
4893 ; CHECK-P8-NEXT: blr
4895 %and = and i64 %ptr, -1099511627776
4896 %conv = fptoui double %str to i16
4897 %or = or i64 %and, 1000000000000
4898 %0 = inttoptr i64 %or to i16*
4899 store i16 %conv, i16* %0, align 4096
4903 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4904 define dso_local void @st_cst_align16_double_uint16_t(double %str) {
4905 ; CHECK-POSTP8-LABEL: st_cst_align16_double_uint16_t:
4906 ; CHECK-POSTP8: # %bb.0: # %entry
4907 ; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
4908 ; CHECK-POSTP8-NEXT: li r3, 4080
4909 ; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
4910 ; CHECK-POSTP8-NEXT: blr
4912 ; CHECK-P8-LABEL: st_cst_align16_double_uint16_t:
4913 ; CHECK-P8: # %bb.0: # %entry
4914 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4915 ; CHECK-P8-NEXT: mffprwz r3, f0
4916 ; CHECK-P8-NEXT: sth r3, 4080(0)
4917 ; CHECK-P8-NEXT: blr
4919 %conv = fptoui double %str to i16
4920 store i16 %conv, i16* inttoptr (i64 4080 to i16*), align 16
4924 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4925 define dso_local void @st_cst_align32_double_uint16_t(double %str) {
4926 ; CHECK-P10-LABEL: st_cst_align32_double_uint16_t:
4927 ; CHECK-P10: # %bb.0: # %entry
4928 ; CHECK-P10-NEXT: xscvdpuxws f0, f1
4929 ; CHECK-P10-NEXT: pli r3, 9999900
4930 ; CHECK-P10-NEXT: stxsihx f0, 0, r3
4931 ; CHECK-P10-NEXT: blr
4933 ; CHECK-P9-LABEL: st_cst_align32_double_uint16_t:
4934 ; CHECK-P9: # %bb.0: # %entry
4935 ; CHECK-P9-NEXT: xscvdpuxws f0, f1
4936 ; CHECK-P9-NEXT: lis r3, 152
4937 ; CHECK-P9-NEXT: ori r3, r3, 38428
4938 ; CHECK-P9-NEXT: stxsihx f0, 0, r3
4939 ; CHECK-P9-NEXT: blr
4941 ; CHECK-P8-LABEL: st_cst_align32_double_uint16_t:
4942 ; CHECK-P8: # %bb.0: # %entry
4943 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4944 ; CHECK-P8-NEXT: lis r4, 153
4945 ; CHECK-P8-NEXT: mffprwz r3, f0
4946 ; CHECK-P8-NEXT: sth r3, -27108(r4)
4947 ; CHECK-P8-NEXT: blr
4949 %conv = fptoui double %str to i16
4950 store i16 %conv, i16* inttoptr (i64 9999900 to i16*), align 4
4954 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4955 define dso_local void @st_cst_align64_double_uint16_t(double %str) {
4956 ; CHECK-P10-LABEL: st_cst_align64_double_uint16_t:
4957 ; CHECK-P10: # %bb.0: # %entry
4958 ; CHECK-P10-NEXT: xscvdpuxws f0, f1
4959 ; CHECK-P10-NEXT: pli r3, 244140625
4960 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
4961 ; CHECK-P10-NEXT: stxsihx f0, 0, r3
4962 ; CHECK-P10-NEXT: blr
4964 ; CHECK-P9-LABEL: st_cst_align64_double_uint16_t:
4965 ; CHECK-P9: # %bb.0: # %entry
4966 ; CHECK-P9-NEXT: xscvdpuxws f0, f1
4967 ; CHECK-P9-NEXT: lis r3, 3725
4968 ; CHECK-P9-NEXT: ori r3, r3, 19025
4969 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
4970 ; CHECK-P9-NEXT: stxsihx f0, 0, r3
4971 ; CHECK-P9-NEXT: blr
4973 ; CHECK-P8-LABEL: st_cst_align64_double_uint16_t:
4974 ; CHECK-P8: # %bb.0: # %entry
4975 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4976 ; CHECK-P8-NEXT: lis r3, 3725
4977 ; CHECK-P8-NEXT: ori r3, r3, 19025
4978 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
4979 ; CHECK-P8-NEXT: mffprwz r4, f0
4980 ; CHECK-P8-NEXT: sth r4, 0(r3)
4981 ; CHECK-P8-NEXT: blr
4983 %conv = fptoui double %str to i16
4984 store i16 %conv, i16* inttoptr (i64 1000000000000 to i16*), align 4096
4988 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4989 define dso_local void @st_0_double_int16_t(i64 %ptr, double %str) {
4990 ; CHECK-POSTP8-LABEL: st_0_double_int16_t:
4991 ; CHECK-POSTP8: # %bb.0: # %entry
4992 ; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
4993 ; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
4994 ; CHECK-POSTP8-NEXT: blr
4996 ; CHECK-P8-LABEL: st_0_double_int16_t:
4997 ; CHECK-P8: # %bb.0: # %entry
4998 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
4999 ; CHECK-P8-NEXT: mffprwz r4, f0
5000 ; CHECK-P8-NEXT: sth r4, 0(r3)
5001 ; CHECK-P8-NEXT: blr
5003 %conv = fptosi double %str to i16
5004 %0 = inttoptr i64 %ptr to i16*
5005 store i16 %conv, i16* %0, align 2
5009 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5010 define dso_local void @st_align16_double_int16_t(i8* nocapture %ptr, double %str) {
5011 ; CHECK-POSTP8-LABEL: st_align16_double_int16_t:
5012 ; CHECK-POSTP8: # %bb.0: # %entry
5013 ; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
5014 ; CHECK-POSTP8-NEXT: addi r3, r3, 8
5015 ; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
5016 ; CHECK-POSTP8-NEXT: blr
5018 ; CHECK-P8-LABEL: st_align16_double_int16_t:
5019 ; CHECK-P8: # %bb.0: # %entry
5020 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
5021 ; CHECK-P8-NEXT: mffprwz r4, f0
5022 ; CHECK-P8-NEXT: sth r4, 8(r3)
5023 ; CHECK-P8-NEXT: blr
5025 %conv = fptosi double %str to i16
5026 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
5027 %0 = bitcast i8* %add.ptr to i16*
5028 store i16 %conv, i16* %0, align 2
5032 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5033 define dso_local void @st_align32_double_int16_t(i8* nocapture %ptr, double %str) {
5034 ; CHECK-P10-LABEL: st_align32_double_int16_t:
5035 ; CHECK-P10: # %bb.0: # %entry
5036 ; CHECK-P10-NEXT: xscvdpsxws f0, f1
5037 ; CHECK-P10-NEXT: pli r4, 99999000
5038 ; CHECK-P10-NEXT: stxsihx f0, r3, r4
5039 ; CHECK-P10-NEXT: blr
5041 ; CHECK-P9-LABEL: st_align32_double_int16_t:
5042 ; CHECK-P9: # %bb.0: # %entry
5043 ; CHECK-P9-NEXT: xscvdpsxws f0, f1
5044 ; CHECK-P9-NEXT: lis r4, 1525
5045 ; CHECK-P9-NEXT: ori r4, r4, 56600
5046 ; CHECK-P9-NEXT: stxsihx f0, r3, r4
5047 ; CHECK-P9-NEXT: blr
5049 ; CHECK-P8-LABEL: st_align32_double_int16_t:
5050 ; CHECK-P8: # %bb.0: # %entry
5051 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
5052 ; CHECK-P8-NEXT: lis r4, 1525
5053 ; CHECK-P8-NEXT: ori r4, r4, 56600
5054 ; CHECK-P8-NEXT: mffprwz r5, f0
5055 ; CHECK-P8-NEXT: sthx r5, r3, r4
5056 ; CHECK-P8-NEXT: blr
5058 %conv = fptosi double %str to i16
5059 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
5060 %0 = bitcast i8* %add.ptr to i16*
5061 store i16 %conv, i16* %0, align 2
5065 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5066 define dso_local void @st_align64_double_int16_t(i8* nocapture %ptr, double %str) {
5067 ; CHECK-P10-LABEL: st_align64_double_int16_t:
5068 ; CHECK-P10: # %bb.0: # %entry
5069 ; CHECK-P10-NEXT: xscvdpsxws f0, f1
5070 ; CHECK-P10-NEXT: pli r4, 244140625
5071 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5072 ; CHECK-P10-NEXT: stxsihx f0, r3, r4
5073 ; CHECK-P10-NEXT: blr
5075 ; CHECK-P9-LABEL: st_align64_double_int16_t:
5076 ; CHECK-P9: # %bb.0: # %entry
5077 ; CHECK-P9-NEXT: xscvdpsxws f0, f1
5078 ; CHECK-P9-NEXT: lis r4, 3725
5079 ; CHECK-P9-NEXT: ori r4, r4, 19025
5080 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
5081 ; CHECK-P9-NEXT: stxsihx f0, r3, r4
5082 ; CHECK-P9-NEXT: blr
5084 ; CHECK-P8-LABEL: st_align64_double_int16_t:
5085 ; CHECK-P8: # %bb.0: # %entry
5086 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
5087 ; CHECK-P8-NEXT: lis r4, 3725
5088 ; CHECK-P8-NEXT: ori r4, r4, 19025
5089 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
5090 ; CHECK-P8-NEXT: mffprwz r5, f0
5091 ; CHECK-P8-NEXT: sthx r5, r3, r4
5092 ; CHECK-P8-NEXT: blr
5094 %conv = fptosi double %str to i16
5095 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
5096 %0 = bitcast i8* %add.ptr to i16*
5097 store i16 %conv, i16* %0, align 2
5101 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5102 define dso_local void @st_reg_double_int16_t(i8* nocapture %ptr, i64 %off, double %str) {
5103 ; CHECK-POSTP8-LABEL: st_reg_double_int16_t:
5104 ; CHECK-POSTP8: # %bb.0: # %entry
5105 ; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
5106 ; CHECK-POSTP8-NEXT: stxsihx f0, r3, r4
5107 ; CHECK-POSTP8-NEXT: blr
5109 ; CHECK-P8-LABEL: st_reg_double_int16_t:
5110 ; CHECK-P8: # %bb.0: # %entry
5111 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
5112 ; CHECK-P8-NEXT: mffprwz r5, f0
5113 ; CHECK-P8-NEXT: sthx r5, r3, r4
5114 ; CHECK-P8-NEXT: blr
5116 %conv = fptosi double %str to i16
5117 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
5118 %0 = bitcast i8* %add.ptr to i16*
5119 store i16 %conv, i16* %0, align 2
5123 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5124 define dso_local void @st_or1_double_int16_t(i64 %ptr, i8 zeroext %off, double %str) {
5125 ; CHECK-POSTP8-LABEL: st_or1_double_int16_t:
5126 ; CHECK-POSTP8: # %bb.0: # %entry
5127 ; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
5128 ; CHECK-POSTP8-NEXT: or r3, r4, r3
5129 ; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
5130 ; CHECK-POSTP8-NEXT: blr
5132 ; CHECK-P8-LABEL: st_or1_double_int16_t:
5133 ; CHECK-P8: # %bb.0: # %entry
5134 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
5135 ; CHECK-P8-NEXT: or r3, r4, r3
5136 ; CHECK-P8-NEXT: mffprwz r5, f0
5137 ; CHECK-P8-NEXT: sth r5, 0(r3)
5138 ; CHECK-P8-NEXT: blr
5140 %conv = fptosi double %str to i16
5141 %conv1 = zext i8 %off to i64
5142 %or = or i64 %conv1, %ptr
5143 %0 = inttoptr i64 %or to i16*
5144 store i16 %conv, i16* %0, align 2
5148 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5149 define dso_local void @st_not_disjoint16_double_int16_t(i64 %ptr, double %str) {
5150 ; CHECK-POSTP8-LABEL: st_not_disjoint16_double_int16_t:
5151 ; CHECK-POSTP8: # %bb.0: # %entry
5152 ; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
5153 ; CHECK-POSTP8-NEXT: ori r3, r3, 6
5154 ; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
5155 ; CHECK-POSTP8-NEXT: blr
5157 ; CHECK-P8-LABEL: st_not_disjoint16_double_int16_t:
5158 ; CHECK-P8: # %bb.0: # %entry
5159 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
5160 ; CHECK-P8-NEXT: ori r3, r3, 6
5161 ; CHECK-P8-NEXT: mffprwz r4, f0
5162 ; CHECK-P8-NEXT: sth r4, 0(r3)
5163 ; CHECK-P8-NEXT: blr
5165 %conv = fptosi double %str to i16
5166 %or = or i64 %ptr, 6
5167 %0 = inttoptr i64 %or to i16*
5168 store i16 %conv, i16* %0, align 2
5172 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5173 define dso_local void @st_disjoint_align16_double_int16_t(i64 %ptr, double %str) {
5174 ; CHECK-POSTP8-LABEL: st_disjoint_align16_double_int16_t:
5175 ; CHECK-POSTP8: # %bb.0: # %entry
5176 ; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
5177 ; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
5178 ; CHECK-POSTP8-NEXT: ori r3, r3, 24
5179 ; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
5180 ; CHECK-POSTP8-NEXT: blr
5182 ; CHECK-P8-LABEL: st_disjoint_align16_double_int16_t:
5183 ; CHECK-P8: # %bb.0: # %entry
5184 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
5185 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
5186 ; CHECK-P8-NEXT: mffprwz r4, f0
5187 ; CHECK-P8-NEXT: sth r4, 24(r3)
5188 ; CHECK-P8-NEXT: blr
5190 %and = and i64 %ptr, -4096
5191 %conv = fptosi double %str to i16
5192 %or = or i64 %and, 24
5193 %0 = inttoptr i64 %or to i16*
5194 store i16 %conv, i16* %0, align 8
5198 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5199 define dso_local void @st_not_disjoint32_double_int16_t(i64 %ptr, double %str) {
5200 ; CHECK-POSTP8-LABEL: st_not_disjoint32_double_int16_t:
5201 ; CHECK-POSTP8: # %bb.0: # %entry
5202 ; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
5203 ; CHECK-POSTP8-NEXT: ori r3, r3, 34463
5204 ; CHECK-POSTP8-NEXT: oris r3, r3, 1
5205 ; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
5206 ; CHECK-POSTP8-NEXT: blr
5208 ; CHECK-P8-LABEL: st_not_disjoint32_double_int16_t:
5209 ; CHECK-P8: # %bb.0: # %entry
5210 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
5211 ; CHECK-P8-NEXT: ori r3, r3, 34463
5212 ; CHECK-P8-NEXT: oris r3, r3, 1
5213 ; CHECK-P8-NEXT: mffprwz r4, f0
5214 ; CHECK-P8-NEXT: sth r4, 0(r3)
5215 ; CHECK-P8-NEXT: blr
5217 %conv = fptosi double %str to i16
5218 %or = or i64 %ptr, 99999
5219 %0 = inttoptr i64 %or to i16*
5220 store i16 %conv, i16* %0, align 2
5224 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5225 define dso_local void @st_disjoint_align32_double_int16_t(i64 %ptr, double %str) {
5226 ; CHECK-P10-LABEL: st_disjoint_align32_double_int16_t:
5227 ; CHECK-P10: # %bb.0: # %entry
5228 ; CHECK-P10-NEXT: xscvdpsxws f0, f1
5229 ; CHECK-P10-NEXT: lis r4, -15264
5230 ; CHECK-P10-NEXT: and r3, r3, r4
5231 ; CHECK-P10-NEXT: pli r4, 999990000
5232 ; CHECK-P10-NEXT: stxsihx f0, r3, r4
5233 ; CHECK-P10-NEXT: blr
5235 ; CHECK-P9-LABEL: st_disjoint_align32_double_int16_t:
5236 ; CHECK-P9: # %bb.0: # %entry
5237 ; CHECK-P9-NEXT: xscvdpsxws f0, f1
5238 ; CHECK-P9-NEXT: lis r4, -15264
5239 ; CHECK-P9-NEXT: and r3, r3, r4
5240 ; CHECK-P9-NEXT: lis r4, 15258
5241 ; CHECK-P9-NEXT: ori r4, r4, 41712
5242 ; CHECK-P9-NEXT: stxsihx f0, r3, r4
5243 ; CHECK-P9-NEXT: blr
5245 ; CHECK-P8-LABEL: st_disjoint_align32_double_int16_t:
5246 ; CHECK-P8: # %bb.0: # %entry
5247 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
5248 ; CHECK-P8-NEXT: lis r4, -15264
5249 ; CHECK-P8-NEXT: lis r6, 15258
5250 ; CHECK-P8-NEXT: and r3, r3, r4
5251 ; CHECK-P8-NEXT: ori r4, r6, 41712
5252 ; CHECK-P8-NEXT: mffprwz r5, f0
5253 ; CHECK-P8-NEXT: sthx r5, r3, r4
5254 ; CHECK-P8-NEXT: blr
5256 %and = and i64 %ptr, -1000341504
5257 %conv = fptosi double %str to i16
5258 %or = or i64 %and, 999990000
5259 %0 = inttoptr i64 %or to i16*
5260 store i16 %conv, i16* %0, align 16
5264 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5265 define dso_local void @st_not_disjoint64_double_int16_t(i64 %ptr, double %str) {
5266 ; CHECK-P10-LABEL: st_not_disjoint64_double_int16_t:
5267 ; CHECK-P10: # %bb.0: # %entry
5268 ; CHECK-P10-NEXT: xscvdpsxws f0, f1
5269 ; CHECK-P10-NEXT: pli r4, 232
5270 ; CHECK-P10-NEXT: pli r5, 3567587329
5271 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
5272 ; CHECK-P10-NEXT: or r3, r3, r5
5273 ; CHECK-P10-NEXT: stxsihx f0, 0, r3
5274 ; CHECK-P10-NEXT: blr
5276 ; CHECK-P9-LABEL: st_not_disjoint64_double_int16_t:
5277 ; CHECK-P9: # %bb.0: # %entry
5278 ; CHECK-P9-NEXT: li r4, 29
5279 ; CHECK-P9-NEXT: xscvdpsxws f0, f1
5280 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
5281 ; CHECK-P9-NEXT: oris r4, r4, 54437
5282 ; CHECK-P9-NEXT: ori r4, r4, 4097
5283 ; CHECK-P9-NEXT: or r3, r3, r4
5284 ; CHECK-P9-NEXT: stxsihx f0, 0, r3
5285 ; CHECK-P9-NEXT: blr
5287 ; CHECK-P8-LABEL: st_not_disjoint64_double_int16_t:
5288 ; CHECK-P8: # %bb.0: # %entry
5289 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
5290 ; CHECK-P8-NEXT: li r4, 29
5291 ; CHECK-P8-NEXT: rldic r4, r4, 35, 24
5292 ; CHECK-P8-NEXT: oris r4, r4, 54437
5293 ; CHECK-P8-NEXT: ori r4, r4, 4097
5294 ; CHECK-P8-NEXT: or r3, r3, r4
5295 ; CHECK-P8-NEXT: mffprwz r5, f0
5296 ; CHECK-P8-NEXT: sth r5, 0(r3)
5297 ; CHECK-P8-NEXT: blr
5299 %conv = fptosi double %str to i16
5300 %or = or i64 %ptr, 1000000000001
5301 %0 = inttoptr i64 %or to i16*
5302 store i16 %conv, i16* %0, align 2
5306 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5307 define dso_local void @st_disjoint_align64_double_int16_t(i64 %ptr, double %str) {
5308 ; CHECK-P10-LABEL: st_disjoint_align64_double_int16_t:
5309 ; CHECK-P10: # %bb.0: # %entry
5310 ; CHECK-P10-NEXT: xscvdpsxws f0, f1
5311 ; CHECK-P10-NEXT: pli r4, 244140625
5312 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
5313 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5314 ; CHECK-P10-NEXT: stxsihx f0, r3, r4
5315 ; CHECK-P10-NEXT: blr
5317 ; CHECK-P9-LABEL: st_disjoint_align64_double_int16_t:
5318 ; CHECK-P9: # %bb.0: # %entry
5319 ; CHECK-P9-NEXT: xscvdpsxws f0, f1
5320 ; CHECK-P9-NEXT: lis r4, 3725
5321 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
5322 ; CHECK-P9-NEXT: ori r4, r4, 19025
5323 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
5324 ; CHECK-P9-NEXT: stxsihx f0, r3, r4
5325 ; CHECK-P9-NEXT: blr
5327 ; CHECK-P8-LABEL: st_disjoint_align64_double_int16_t:
5328 ; CHECK-P8: # %bb.0: # %entry
5329 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
5330 ; CHECK-P8-NEXT: lis r4, 3725
5331 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
5332 ; CHECK-P8-NEXT: ori r4, r4, 19025
5333 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
5334 ; CHECK-P8-NEXT: mffprwz r5, f0
5335 ; CHECK-P8-NEXT: sthx r5, r3, r4
5336 ; CHECK-P8-NEXT: blr
5338 %and = and i64 %ptr, -1099511627776
5339 %conv = fptosi double %str to i16
5340 %or = or i64 %and, 1000000000000
5341 %0 = inttoptr i64 %or to i16*
5342 store i16 %conv, i16* %0, align 4096
5346 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5347 define dso_local void @st_cst_align16_double_int16_t(double %str) {
5348 ; CHECK-POSTP8-LABEL: st_cst_align16_double_int16_t:
5349 ; CHECK-POSTP8: # %bb.0: # %entry
5350 ; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
5351 ; CHECK-POSTP8-NEXT: li r3, 4080
5352 ; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
5353 ; CHECK-POSTP8-NEXT: blr
5355 ; CHECK-P8-LABEL: st_cst_align16_double_int16_t:
5356 ; CHECK-P8: # %bb.0: # %entry
5357 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
5358 ; CHECK-P8-NEXT: mffprwz r3, f0
5359 ; CHECK-P8-NEXT: sth r3, 4080(0)
5360 ; CHECK-P8-NEXT: blr
5362 %conv = fptosi double %str to i16
5363 store i16 %conv, i16* inttoptr (i64 4080 to i16*), align 16
5367 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5368 define dso_local void @st_cst_align32_double_int16_t(double %str) {
5369 ; CHECK-P10-LABEL: st_cst_align32_double_int16_t:
5370 ; CHECK-P10: # %bb.0: # %entry
5371 ; CHECK-P10-NEXT: xscvdpsxws f0, f1
5372 ; CHECK-P10-NEXT: pli r3, 9999900
5373 ; CHECK-P10-NEXT: stxsihx f0, 0, r3
5374 ; CHECK-P10-NEXT: blr
5376 ; CHECK-P9-LABEL: st_cst_align32_double_int16_t:
5377 ; CHECK-P9: # %bb.0: # %entry
5378 ; CHECK-P9-NEXT: xscvdpsxws f0, f1
5379 ; CHECK-P9-NEXT: lis r3, 152
5380 ; CHECK-P9-NEXT: ori r3, r3, 38428
5381 ; CHECK-P9-NEXT: stxsihx f0, 0, r3
5382 ; CHECK-P9-NEXT: blr
5384 ; CHECK-P8-LABEL: st_cst_align32_double_int16_t:
5385 ; CHECK-P8: # %bb.0: # %entry
5386 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
5387 ; CHECK-P8-NEXT: lis r4, 153
5388 ; CHECK-P8-NEXT: mffprwz r3, f0
5389 ; CHECK-P8-NEXT: sth r3, -27108(r4)
5390 ; CHECK-P8-NEXT: blr
5392 %conv = fptosi double %str to i16
5393 store i16 %conv, i16* inttoptr (i64 9999900 to i16*), align 4
5397 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5398 define dso_local void @st_cst_align64_double_int16_t(double %str) {
5399 ; CHECK-P10-LABEL: st_cst_align64_double_int16_t:
5400 ; CHECK-P10: # %bb.0: # %entry
5401 ; CHECK-P10-NEXT: xscvdpsxws f0, f1
5402 ; CHECK-P10-NEXT: pli r3, 244140625
5403 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
5404 ; CHECK-P10-NEXT: stxsihx f0, 0, r3
5405 ; CHECK-P10-NEXT: blr
5407 ; CHECK-P9-LABEL: st_cst_align64_double_int16_t:
5408 ; CHECK-P9: # %bb.0: # %entry
5409 ; CHECK-P9-NEXT: xscvdpsxws f0, f1
5410 ; CHECK-P9-NEXT: lis r3, 3725
5411 ; CHECK-P9-NEXT: ori r3, r3, 19025
5412 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
5413 ; CHECK-P9-NEXT: stxsihx f0, 0, r3
5414 ; CHECK-P9-NEXT: blr
5416 ; CHECK-P8-LABEL: st_cst_align64_double_int16_t:
5417 ; CHECK-P8: # %bb.0: # %entry
5418 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
5419 ; CHECK-P8-NEXT: lis r3, 3725
5420 ; CHECK-P8-NEXT: ori r3, r3, 19025
5421 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
5422 ; CHECK-P8-NEXT: mffprwz r4, f0
5423 ; CHECK-P8-NEXT: sth r4, 0(r3)
5424 ; CHECK-P8-NEXT: blr
5426 %conv = fptosi double %str to i16
5427 store i16 %conv, i16* inttoptr (i64 1000000000000 to i16*), align 4096
5431 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5432 define dso_local void @st_0_double_uint32_t(i64 %ptr, double %str) {
5433 ; CHECK-LABEL: st_0_double_uint32_t:
5434 ; CHECK: # %bb.0: # %entry
5435 ; CHECK-NEXT: xscvdpuxws f0, f1
5436 ; CHECK-NEXT: stfiwx f0, 0, r3
5439 %conv = fptoui double %str to i32
5440 %0 = inttoptr i64 %ptr to i32*
5441 store i32 %conv, i32* %0, align 4
5445 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5446 define dso_local void @st_align16_double_uint32_t(i8* nocapture %ptr, double %str) {
5447 ; CHECK-LABEL: st_align16_double_uint32_t:
5448 ; CHECK: # %bb.0: # %entry
5449 ; CHECK-NEXT: xscvdpuxws f0, f1
5450 ; CHECK-NEXT: addi r3, r3, 8
5451 ; CHECK-NEXT: stfiwx f0, 0, r3
5454 %conv = fptoui double %str to i32
5455 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
5456 %0 = bitcast i8* %add.ptr to i32*
5457 store i32 %conv, i32* %0, align 4
5461 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5462 define dso_local void @st_align32_double_uint32_t(i8* nocapture %ptr, double %str) {
5463 ; CHECK-P10-LABEL: st_align32_double_uint32_t:
5464 ; CHECK-P10: # %bb.0: # %entry
5465 ; CHECK-P10-NEXT: xscvdpuxws f0, f1
5466 ; CHECK-P10-NEXT: pli r4, 99999000
5467 ; CHECK-P10-NEXT: stfiwx f0, r3, r4
5468 ; CHECK-P10-NEXT: blr
5470 ; CHECK-PREP10-LABEL: st_align32_double_uint32_t:
5471 ; CHECK-PREP10: # %bb.0: # %entry
5472 ; CHECK-PREP10-NEXT: xscvdpuxws f0, f1
5473 ; CHECK-PREP10-NEXT: lis r4, 1525
5474 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
5475 ; CHECK-PREP10-NEXT: stfiwx f0, r3, r4
5476 ; CHECK-PREP10-NEXT: blr
5478 %conv = fptoui double %str to i32
5479 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
5480 %0 = bitcast i8* %add.ptr to i32*
5481 store i32 %conv, i32* %0, align 4
5485 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5486 define dso_local void @st_align64_double_uint32_t(i8* nocapture %ptr, double %str) {
5487 ; CHECK-P10-LABEL: st_align64_double_uint32_t:
5488 ; CHECK-P10: # %bb.0: # %entry
5489 ; CHECK-P10-NEXT: xscvdpuxws f0, f1
5490 ; CHECK-P10-NEXT: pli r4, 244140625
5491 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5492 ; CHECK-P10-NEXT: stfiwx f0, r3, r4
5493 ; CHECK-P10-NEXT: blr
5495 ; CHECK-PREP10-LABEL: st_align64_double_uint32_t:
5496 ; CHECK-PREP10: # %bb.0: # %entry
5497 ; CHECK-PREP10-NEXT: xscvdpuxws f0, f1
5498 ; CHECK-PREP10-NEXT: lis r4, 3725
5499 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
5500 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
5501 ; CHECK-PREP10-NEXT: stfiwx f0, r3, r4
5502 ; CHECK-PREP10-NEXT: blr
5504 %conv = fptoui double %str to i32
5505 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
5506 %0 = bitcast i8* %add.ptr to i32*
5507 store i32 %conv, i32* %0, align 4
5511 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5512 define dso_local void @st_reg_double_uint32_t(i8* nocapture %ptr, i64 %off, double %str) {
5513 ; CHECK-LABEL: st_reg_double_uint32_t:
5514 ; CHECK: # %bb.0: # %entry
5515 ; CHECK-NEXT: xscvdpuxws f0, f1
5516 ; CHECK-NEXT: stfiwx f0, r3, r4
5519 %conv = fptoui double %str to i32
5520 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
5521 %0 = bitcast i8* %add.ptr to i32*
5522 store i32 %conv, i32* %0, align 4
5526 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5527 define dso_local void @st_or1_double_uint32_t(i64 %ptr, i8 zeroext %off, double %str) {
5528 ; CHECK-LABEL: st_or1_double_uint32_t:
5529 ; CHECK: # %bb.0: # %entry
5530 ; CHECK-NEXT: xscvdpuxws f0, f1
5531 ; CHECK-NEXT: or r3, r4, r3
5532 ; CHECK-NEXT: stfiwx f0, 0, r3
5535 %conv = fptoui double %str to i32
5536 %conv1 = zext i8 %off to i64
5537 %or = or i64 %conv1, %ptr
5538 %0 = inttoptr i64 %or to i32*
5539 store i32 %conv, i32* %0, align 4
5543 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5544 define dso_local void @st_not_disjoint16_double_uint32_t(i64 %ptr, double %str) {
5545 ; CHECK-LABEL: st_not_disjoint16_double_uint32_t:
5546 ; CHECK: # %bb.0: # %entry
5547 ; CHECK-NEXT: xscvdpuxws f0, f1
5548 ; CHECK-NEXT: ori r3, r3, 6
5549 ; CHECK-NEXT: stfiwx f0, 0, r3
5552 %conv = fptoui double %str to i32
5553 %or = or i64 %ptr, 6
5554 %0 = inttoptr i64 %or to i32*
5555 store i32 %conv, i32* %0, align 4
5559 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5560 define dso_local void @st_disjoint_align16_double_uint32_t(i64 %ptr, double %str) {
5561 ; CHECK-LABEL: st_disjoint_align16_double_uint32_t:
5562 ; CHECK: # %bb.0: # %entry
5563 ; CHECK-NEXT: xscvdpuxws f0, f1
5564 ; CHECK-NEXT: rldicr r3, r3, 0, 51
5565 ; CHECK-NEXT: ori r3, r3, 24
5566 ; CHECK-NEXT: stfiwx f0, 0, r3
5569 %and = and i64 %ptr, -4096
5570 %conv = fptoui double %str to i32
5571 %or = or i64 %and, 24
5572 %0 = inttoptr i64 %or to i32*
5573 store i32 %conv, i32* %0, align 8
5577 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5578 define dso_local void @st_not_disjoint32_double_uint32_t(i64 %ptr, double %str) {
5579 ; CHECK-LABEL: st_not_disjoint32_double_uint32_t:
5580 ; CHECK: # %bb.0: # %entry
5581 ; CHECK-NEXT: xscvdpuxws f0, f1
5582 ; CHECK-NEXT: ori r3, r3, 34463
5583 ; CHECK-NEXT: oris r3, r3, 1
5584 ; CHECK-NEXT: stfiwx f0, 0, r3
5587 %conv = fptoui double %str to i32
5588 %or = or i64 %ptr, 99999
5589 %0 = inttoptr i64 %or to i32*
5590 store i32 %conv, i32* %0, align 4
5594 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5595 define dso_local void @st_disjoint_align32_double_uint32_t(i64 %ptr, double %str) {
5596 ; CHECK-P10-LABEL: st_disjoint_align32_double_uint32_t:
5597 ; CHECK-P10: # %bb.0: # %entry
5598 ; CHECK-P10-NEXT: xscvdpuxws f0, f1
5599 ; CHECK-P10-NEXT: lis r4, -15264
5600 ; CHECK-P10-NEXT: and r3, r3, r4
5601 ; CHECK-P10-NEXT: pli r4, 999990000
5602 ; CHECK-P10-NEXT: stfiwx f0, r3, r4
5603 ; CHECK-P10-NEXT: blr
5605 ; CHECK-P9-LABEL: st_disjoint_align32_double_uint32_t:
5606 ; CHECK-P9: # %bb.0: # %entry
5607 ; CHECK-P9-NEXT: xscvdpuxws f0, f1
5608 ; CHECK-P9-NEXT: lis r4, -15264
5609 ; CHECK-P9-NEXT: and r3, r3, r4
5610 ; CHECK-P9-NEXT: lis r4, 15258
5611 ; CHECK-P9-NEXT: ori r4, r4, 41712
5612 ; CHECK-P9-NEXT: stfiwx f0, r3, r4
5613 ; CHECK-P9-NEXT: blr
5615 ; CHECK-P8-LABEL: st_disjoint_align32_double_uint32_t:
5616 ; CHECK-P8: # %bb.0: # %entry
5617 ; CHECK-P8-NEXT: xscvdpuxws f0, f1
5618 ; CHECK-P8-NEXT: lis r4, -15264
5619 ; CHECK-P8-NEXT: lis r5, 15258
5620 ; CHECK-P8-NEXT: and r3, r3, r4
5621 ; CHECK-P8-NEXT: ori r4, r5, 41712
5622 ; CHECK-P8-NEXT: stfiwx f0, r3, r4
5623 ; CHECK-P8-NEXT: blr
5625 %and = and i64 %ptr, -1000341504
5626 %conv = fptoui double %str to i32
5627 %or = or i64 %and, 999990000
5628 %0 = inttoptr i64 %or to i32*
5629 store i32 %conv, i32* %0, align 16
5633 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5634 define dso_local void @st_not_disjoint64_double_uint32_t(i64 %ptr, double %str) {
5635 ; CHECK-P10-LABEL: st_not_disjoint64_double_uint32_t:
5636 ; CHECK-P10: # %bb.0: # %entry
5637 ; CHECK-P10-NEXT: xscvdpuxws f0, f1
5638 ; CHECK-P10-NEXT: pli r4, 232
5639 ; CHECK-P10-NEXT: pli r5, 3567587329
5640 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
5641 ; CHECK-P10-NEXT: or r3, r3, r5
5642 ; CHECK-P10-NEXT: stfiwx f0, 0, r3
5643 ; CHECK-P10-NEXT: blr
5645 ; CHECK-P9-LABEL: st_not_disjoint64_double_uint32_t:
5646 ; CHECK-P9: # %bb.0: # %entry
5647 ; CHECK-P9-NEXT: li r4, 29
5648 ; CHECK-P9-NEXT: xscvdpuxws f0, f1
5649 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
5650 ; CHECK-P9-NEXT: oris r4, r4, 54437
5651 ; CHECK-P9-NEXT: ori r4, r4, 4097
5652 ; CHECK-P9-NEXT: or r3, r3, r4
5653 ; CHECK-P9-NEXT: stfiwx f0, 0, r3
5654 ; CHECK-P9-NEXT: blr
5656 ; CHECK-P8-LABEL: st_not_disjoint64_double_uint32_t:
5657 ; CHECK-P8: # %bb.0: # %entry
5658 ; CHECK-P8-NEXT: xscvdpuxws f0, f1
5659 ; CHECK-P8-NEXT: li r4, 29
5660 ; CHECK-P8-NEXT: rldic r4, r4, 35, 24
5661 ; CHECK-P8-NEXT: oris r4, r4, 54437
5662 ; CHECK-P8-NEXT: ori r4, r4, 4097
5663 ; CHECK-P8-NEXT: or r3, r3, r4
5664 ; CHECK-P8-NEXT: stfiwx f0, 0, r3
5665 ; CHECK-P8-NEXT: blr
5667 %conv = fptoui double %str to i32
5668 %or = or i64 %ptr, 1000000000001
5669 %0 = inttoptr i64 %or to i32*
5670 store i32 %conv, i32* %0, align 4
5674 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5675 define dso_local void @st_disjoint_align64_double_uint32_t(i64 %ptr, double %str) {
5676 ; CHECK-P10-LABEL: st_disjoint_align64_double_uint32_t:
5677 ; CHECK-P10: # %bb.0: # %entry
5678 ; CHECK-P10-NEXT: xscvdpuxws f0, f1
5679 ; CHECK-P10-NEXT: pli r4, 244140625
5680 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
5681 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5682 ; CHECK-P10-NEXT: stfiwx f0, r3, r4
5683 ; CHECK-P10-NEXT: blr
5685 ; CHECK-PREP10-LABEL: st_disjoint_align64_double_uint32_t:
5686 ; CHECK-PREP10: # %bb.0: # %entry
5687 ; CHECK-PREP10-NEXT: xscvdpuxws f0, f1
5688 ; CHECK-PREP10-NEXT: lis r4, 3725
5689 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
5690 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
5691 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
5692 ; CHECK-PREP10-NEXT: stfiwx f0, r3, r4
5693 ; CHECK-PREP10-NEXT: blr
5695 %and = and i64 %ptr, -1099511627776
5696 %conv = fptoui double %str to i32
5697 %or = or i64 %and, 1000000000000
5698 %0 = inttoptr i64 %or to i32*
5699 store i32 %conv, i32* %0, align 4096
5703 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5704 define dso_local void @st_cst_align16_double_uint32_t(double %str) {
5705 ; CHECK-LABEL: st_cst_align16_double_uint32_t:
5706 ; CHECK: # %bb.0: # %entry
5707 ; CHECK-NEXT: xscvdpuxws f0, f1
5708 ; CHECK-NEXT: li r3, 4080
5709 ; CHECK-NEXT: stfiwx f0, 0, r3
5712 %conv = fptoui double %str to i32
5713 store i32 %conv, i32* inttoptr (i64 4080 to i32*), align 16
5717 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5718 define dso_local void @st_cst_align32_double_uint32_t(double %str) {
5719 ; CHECK-P10-LABEL: st_cst_align32_double_uint32_t:
5720 ; CHECK-P10: # %bb.0: # %entry
5721 ; CHECK-P10-NEXT: xscvdpuxws f0, f1
5722 ; CHECK-P10-NEXT: pli r3, 9999900
5723 ; CHECK-P10-NEXT: stfiwx f0, 0, r3
5724 ; CHECK-P10-NEXT: blr
5726 ; CHECK-PREP10-LABEL: st_cst_align32_double_uint32_t:
5727 ; CHECK-PREP10: # %bb.0: # %entry
5728 ; CHECK-PREP10-NEXT: xscvdpuxws f0, f1
5729 ; CHECK-PREP10-NEXT: lis r3, 152
5730 ; CHECK-PREP10-NEXT: ori r3, r3, 38428
5731 ; CHECK-PREP10-NEXT: stfiwx f0, 0, r3
5732 ; CHECK-PREP10-NEXT: blr
5734 %conv = fptoui double %str to i32
5735 store i32 %conv, i32* inttoptr (i64 9999900 to i32*), align 4
5739 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5740 define dso_local void @st_cst_align64_double_uint32_t(double %str) {
5741 ; CHECK-P10-LABEL: st_cst_align64_double_uint32_t:
5742 ; CHECK-P10: # %bb.0: # %entry
5743 ; CHECK-P10-NEXT: xscvdpuxws f0, f1
5744 ; CHECK-P10-NEXT: pli r3, 244140625
5745 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
5746 ; CHECK-P10-NEXT: stfiwx f0, 0, r3
5747 ; CHECK-P10-NEXT: blr
5749 ; CHECK-PREP10-LABEL: st_cst_align64_double_uint32_t:
5750 ; CHECK-PREP10: # %bb.0: # %entry
5751 ; CHECK-PREP10-NEXT: xscvdpuxws f0, f1
5752 ; CHECK-PREP10-NEXT: lis r3, 3725
5753 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
5754 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
5755 ; CHECK-PREP10-NEXT: stfiwx f0, 0, r3
5756 ; CHECK-PREP10-NEXT: blr
5758 %conv = fptoui double %str to i32
5759 store i32 %conv, i32* inttoptr (i64 1000000000000 to i32*), align 4096
5763 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5764 define dso_local void @st_0_double_int32_t(i64 %ptr, double %str) {
5765 ; CHECK-LABEL: st_0_double_int32_t:
5766 ; CHECK: # %bb.0: # %entry
5767 ; CHECK-NEXT: xscvdpsxws f0, f1
5768 ; CHECK-NEXT: stfiwx f0, 0, r3
5771 %conv = fptosi double %str to i32
5772 %0 = inttoptr i64 %ptr to i32*
5773 store i32 %conv, i32* %0, align 4
5777 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5778 define dso_local void @st_align16_double_int32_t(i8* nocapture %ptr, double %str) {
5779 ; CHECK-LABEL: st_align16_double_int32_t:
5780 ; CHECK: # %bb.0: # %entry
5781 ; CHECK-NEXT: xscvdpsxws f0, f1
5782 ; CHECK-NEXT: addi r3, r3, 8
5783 ; CHECK-NEXT: stfiwx f0, 0, r3
5786 %conv = fptosi double %str to i32
5787 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
5788 %0 = bitcast i8* %add.ptr to i32*
5789 store i32 %conv, i32* %0, align 4
5793 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5794 define dso_local void @st_align32_double_int32_t(i8* nocapture %ptr, double %str) {
5795 ; CHECK-P10-LABEL: st_align32_double_int32_t:
5796 ; CHECK-P10: # %bb.0: # %entry
5797 ; CHECK-P10-NEXT: xscvdpsxws f0, f1
5798 ; CHECK-P10-NEXT: pli r4, 99999000
5799 ; CHECK-P10-NEXT: stfiwx f0, r3, r4
5800 ; CHECK-P10-NEXT: blr
5802 ; CHECK-PREP10-LABEL: st_align32_double_int32_t:
5803 ; CHECK-PREP10: # %bb.0: # %entry
5804 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f1
5805 ; CHECK-PREP10-NEXT: lis r4, 1525
5806 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
5807 ; CHECK-PREP10-NEXT: stfiwx f0, r3, r4
5808 ; CHECK-PREP10-NEXT: blr
5810 %conv = fptosi double %str to i32
5811 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
5812 %0 = bitcast i8* %add.ptr to i32*
5813 store i32 %conv, i32* %0, align 4
5817 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5818 define dso_local void @st_align64_double_int32_t(i8* nocapture %ptr, double %str) {
5819 ; CHECK-P10-LABEL: st_align64_double_int32_t:
5820 ; CHECK-P10: # %bb.0: # %entry
5821 ; CHECK-P10-NEXT: xscvdpsxws f0, f1
5822 ; CHECK-P10-NEXT: pli r4, 244140625
5823 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5824 ; CHECK-P10-NEXT: stfiwx f0, r3, r4
5825 ; CHECK-P10-NEXT: blr
5827 ; CHECK-PREP10-LABEL: st_align64_double_int32_t:
5828 ; CHECK-PREP10: # %bb.0: # %entry
5829 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f1
5830 ; CHECK-PREP10-NEXT: lis r4, 3725
5831 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
5832 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
5833 ; CHECK-PREP10-NEXT: stfiwx f0, r3, r4
5834 ; CHECK-PREP10-NEXT: blr
5836 %conv = fptosi double %str to i32
5837 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
5838 %0 = bitcast i8* %add.ptr to i32*
5839 store i32 %conv, i32* %0, align 4
5843 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5844 define dso_local void @st_reg_double_int32_t(i8* nocapture %ptr, i64 %off, double %str) {
5845 ; CHECK-LABEL: st_reg_double_int32_t:
5846 ; CHECK: # %bb.0: # %entry
5847 ; CHECK-NEXT: xscvdpsxws f0, f1
5848 ; CHECK-NEXT: stfiwx f0, r3, r4
5851 %conv = fptosi double %str to i32
5852 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
5853 %0 = bitcast i8* %add.ptr to i32*
5854 store i32 %conv, i32* %0, align 4
5858 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5859 define dso_local void @st_or1_double_int32_t(i64 %ptr, i8 zeroext %off, double %str) {
5860 ; CHECK-LABEL: st_or1_double_int32_t:
5861 ; CHECK: # %bb.0: # %entry
5862 ; CHECK-NEXT: xscvdpsxws f0, f1
5863 ; CHECK-NEXT: or r3, r4, r3
5864 ; CHECK-NEXT: stfiwx f0, 0, r3
5867 %conv = fptosi double %str to i32
5868 %conv1 = zext i8 %off to i64
5869 %or = or i64 %conv1, %ptr
5870 %0 = inttoptr i64 %or to i32*
5871 store i32 %conv, i32* %0, align 4
5875 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5876 define dso_local void @st_not_disjoint16_double_int32_t(i64 %ptr, double %str) {
5877 ; CHECK-LABEL: st_not_disjoint16_double_int32_t:
5878 ; CHECK: # %bb.0: # %entry
5879 ; CHECK-NEXT: xscvdpsxws f0, f1
5880 ; CHECK-NEXT: ori r3, r3, 6
5881 ; CHECK-NEXT: stfiwx f0, 0, r3
5884 %conv = fptosi double %str to i32
5885 %or = or i64 %ptr, 6
5886 %0 = inttoptr i64 %or to i32*
5887 store i32 %conv, i32* %0, align 4
5891 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5892 define dso_local void @st_disjoint_align16_double_int32_t(i64 %ptr, double %str) {
5893 ; CHECK-LABEL: st_disjoint_align16_double_int32_t:
5894 ; CHECK: # %bb.0: # %entry
5895 ; CHECK-NEXT: xscvdpsxws f0, f1
5896 ; CHECK-NEXT: rldicr r3, r3, 0, 51
5897 ; CHECK-NEXT: ori r3, r3, 24
5898 ; CHECK-NEXT: stfiwx f0, 0, r3
5901 %and = and i64 %ptr, -4096
5902 %conv = fptosi double %str to i32
5903 %or = or i64 %and, 24
5904 %0 = inttoptr i64 %or to i32*
5905 store i32 %conv, i32* %0, align 8
5909 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5910 define dso_local void @st_not_disjoint32_double_int32_t(i64 %ptr, double %str) {
5911 ; CHECK-LABEL: st_not_disjoint32_double_int32_t:
5912 ; CHECK: # %bb.0: # %entry
5913 ; CHECK-NEXT: xscvdpsxws f0, f1
5914 ; CHECK-NEXT: ori r3, r3, 34463
5915 ; CHECK-NEXT: oris r3, r3, 1
5916 ; CHECK-NEXT: stfiwx f0, 0, r3
5919 %conv = fptosi double %str to i32
5920 %or = or i64 %ptr, 99999
5921 %0 = inttoptr i64 %or to i32*
5922 store i32 %conv, i32* %0, align 4
5926 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5927 define dso_local void @st_disjoint_align32_double_int32_t(i64 %ptr, double %str) {
5928 ; CHECK-P10-LABEL: st_disjoint_align32_double_int32_t:
5929 ; CHECK-P10: # %bb.0: # %entry
5930 ; CHECK-P10-NEXT: xscvdpsxws f0, f1
5931 ; CHECK-P10-NEXT: lis r4, -15264
5932 ; CHECK-P10-NEXT: and r3, r3, r4
5933 ; CHECK-P10-NEXT: pli r4, 999990000
5934 ; CHECK-P10-NEXT: stfiwx f0, r3, r4
5935 ; CHECK-P10-NEXT: blr
5937 ; CHECK-P9-LABEL: st_disjoint_align32_double_int32_t:
5938 ; CHECK-P9: # %bb.0: # %entry
5939 ; CHECK-P9-NEXT: xscvdpsxws f0, f1
5940 ; CHECK-P9-NEXT: lis r4, -15264
5941 ; CHECK-P9-NEXT: and r3, r3, r4
5942 ; CHECK-P9-NEXT: lis r4, 15258
5943 ; CHECK-P9-NEXT: ori r4, r4, 41712
5944 ; CHECK-P9-NEXT: stfiwx f0, r3, r4
5945 ; CHECK-P9-NEXT: blr
5947 ; CHECK-P8-LABEL: st_disjoint_align32_double_int32_t:
5948 ; CHECK-P8: # %bb.0: # %entry
5949 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
5950 ; CHECK-P8-NEXT: lis r4, -15264
5951 ; CHECK-P8-NEXT: lis r5, 15258
5952 ; CHECK-P8-NEXT: and r3, r3, r4
5953 ; CHECK-P8-NEXT: ori r4, r5, 41712
5954 ; CHECK-P8-NEXT: stfiwx f0, r3, r4
5955 ; CHECK-P8-NEXT: blr
5957 %and = and i64 %ptr, -1000341504
5958 %conv = fptosi double %str to i32
5959 %or = or i64 %and, 999990000
5960 %0 = inttoptr i64 %or to i32*
5961 store i32 %conv, i32* %0, align 16
5965 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5966 define dso_local void @st_not_disjoint64_double_int32_t(i64 %ptr, double %str) {
5967 ; CHECK-P10-LABEL: st_not_disjoint64_double_int32_t:
5968 ; CHECK-P10: # %bb.0: # %entry
5969 ; CHECK-P10-NEXT: xscvdpsxws f0, f1
5970 ; CHECK-P10-NEXT: pli r4, 232
5971 ; CHECK-P10-NEXT: pli r5, 3567587329
5972 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
5973 ; CHECK-P10-NEXT: or r3, r3, r5
5974 ; CHECK-P10-NEXT: stfiwx f0, 0, r3
5975 ; CHECK-P10-NEXT: blr
5977 ; CHECK-P9-LABEL: st_not_disjoint64_double_int32_t:
5978 ; CHECK-P9: # %bb.0: # %entry
5979 ; CHECK-P9-NEXT: li r4, 29
5980 ; CHECK-P9-NEXT: xscvdpsxws f0, f1
5981 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
5982 ; CHECK-P9-NEXT: oris r4, r4, 54437
5983 ; CHECK-P9-NEXT: ori r4, r4, 4097
5984 ; CHECK-P9-NEXT: or r3, r3, r4
5985 ; CHECK-P9-NEXT: stfiwx f0, 0, r3
5986 ; CHECK-P9-NEXT: blr
5988 ; CHECK-P8-LABEL: st_not_disjoint64_double_int32_t:
5989 ; CHECK-P8: # %bb.0: # %entry
5990 ; CHECK-P8-NEXT: xscvdpsxws f0, f1
5991 ; CHECK-P8-NEXT: li r4, 29
5992 ; CHECK-P8-NEXT: rldic r4, r4, 35, 24
5993 ; CHECK-P8-NEXT: oris r4, r4, 54437
5994 ; CHECK-P8-NEXT: ori r4, r4, 4097
5995 ; CHECK-P8-NEXT: or r3, r3, r4
5996 ; CHECK-P8-NEXT: stfiwx f0, 0, r3
5997 ; CHECK-P8-NEXT: blr
5999 %conv = fptosi double %str to i32
6000 %or = or i64 %ptr, 1000000000001
6001 %0 = inttoptr i64 %or to i32*
6002 store i32 %conv, i32* %0, align 4
6006 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6007 define dso_local void @st_disjoint_align64_double_int32_t(i64 %ptr, double %str) {
6008 ; CHECK-P10-LABEL: st_disjoint_align64_double_int32_t:
6009 ; CHECK-P10: # %bb.0: # %entry
6010 ; CHECK-P10-NEXT: xscvdpsxws f0, f1
6011 ; CHECK-P10-NEXT: pli r4, 244140625
6012 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
6013 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6014 ; CHECK-P10-NEXT: stfiwx f0, r3, r4
6015 ; CHECK-P10-NEXT: blr
6017 ; CHECK-PREP10-LABEL: st_disjoint_align64_double_int32_t:
6018 ; CHECK-PREP10: # %bb.0: # %entry
6019 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f1
6020 ; CHECK-PREP10-NEXT: lis r4, 3725
6021 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
6022 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
6023 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
6024 ; CHECK-PREP10-NEXT: stfiwx f0, r3, r4
6025 ; CHECK-PREP10-NEXT: blr
6027 %and = and i64 %ptr, -1099511627776
6028 %conv = fptosi double %str to i32
6029 %or = or i64 %and, 1000000000000
6030 %0 = inttoptr i64 %or to i32*
6031 store i32 %conv, i32* %0, align 4096
6035 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6036 define dso_local void @st_cst_align16_double_int32_t(double %str) {
6037 ; CHECK-LABEL: st_cst_align16_double_int32_t:
6038 ; CHECK: # %bb.0: # %entry
6039 ; CHECK-NEXT: xscvdpsxws f0, f1
6040 ; CHECK-NEXT: li r3, 4080
6041 ; CHECK-NEXT: stfiwx f0, 0, r3
6044 %conv = fptosi double %str to i32
6045 store i32 %conv, i32* inttoptr (i64 4080 to i32*), align 16
6049 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6050 define dso_local void @st_cst_align32_double_int32_t(double %str) {
6051 ; CHECK-P10-LABEL: st_cst_align32_double_int32_t:
6052 ; CHECK-P10: # %bb.0: # %entry
6053 ; CHECK-P10-NEXT: xscvdpsxws f0, f1
6054 ; CHECK-P10-NEXT: pli r3, 9999900
6055 ; CHECK-P10-NEXT: stfiwx f0, 0, r3
6056 ; CHECK-P10-NEXT: blr
6058 ; CHECK-PREP10-LABEL: st_cst_align32_double_int32_t:
6059 ; CHECK-PREP10: # %bb.0: # %entry
6060 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f1
6061 ; CHECK-PREP10-NEXT: lis r3, 152
6062 ; CHECK-PREP10-NEXT: ori r3, r3, 38428
6063 ; CHECK-PREP10-NEXT: stfiwx f0, 0, r3
6064 ; CHECK-PREP10-NEXT: blr
6066 %conv = fptosi double %str to i32
6067 store i32 %conv, i32* inttoptr (i64 9999900 to i32*), align 4
6071 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6072 define dso_local void @st_cst_align64_double_int32_t(double %str) {
6073 ; CHECK-P10-LABEL: st_cst_align64_double_int32_t:
6074 ; CHECK-P10: # %bb.0: # %entry
6075 ; CHECK-P10-NEXT: xscvdpsxws f0, f1
6076 ; CHECK-P10-NEXT: pli r3, 244140625
6077 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
6078 ; CHECK-P10-NEXT: stfiwx f0, 0, r3
6079 ; CHECK-P10-NEXT: blr
6081 ; CHECK-PREP10-LABEL: st_cst_align64_double_int32_t:
6082 ; CHECK-PREP10: # %bb.0: # %entry
6083 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f1
6084 ; CHECK-PREP10-NEXT: lis r3, 3725
6085 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
6086 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
6087 ; CHECK-PREP10-NEXT: stfiwx f0, 0, r3
6088 ; CHECK-PREP10-NEXT: blr
6090 %conv = fptosi double %str to i32
6091 store i32 %conv, i32* inttoptr (i64 1000000000000 to i32*), align 4096
6095 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6096 define dso_local void @st_0_double_uint64_t(i64 %ptr, double %str) {
6097 ; CHECK-POSTP8-LABEL: st_0_double_uint64_t:
6098 ; CHECK-POSTP8: # %bb.0: # %entry
6099 ; CHECK-POSTP8-NEXT: xscvdpuxds v2, f1
6100 ; CHECK-POSTP8-NEXT: stxsd v2, 0(r3)
6101 ; CHECK-POSTP8-NEXT: blr
6103 ; CHECK-P8-LABEL: st_0_double_uint64_t:
6104 ; CHECK-P8: # %bb.0: # %entry
6105 ; CHECK-P8-NEXT: xscvdpuxds f0, f1
6106 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
6107 ; CHECK-P8-NEXT: blr
6109 %conv = fptoui double %str to i64
6110 %0 = inttoptr i64 %ptr to i64*
6111 store i64 %conv, i64* %0, align 8
6115 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6116 define dso_local void @st_align16_double_uint64_t(i8* nocapture %ptr, double %str) {
6117 ; CHECK-POSTP8-LABEL: st_align16_double_uint64_t:
6118 ; CHECK-POSTP8: # %bb.0: # %entry
6119 ; CHECK-POSTP8-NEXT: xscvdpuxds v2, f1
6120 ; CHECK-POSTP8-NEXT: stxsd v2, 8(r3)
6121 ; CHECK-POSTP8-NEXT: blr
6123 ; CHECK-P8-LABEL: st_align16_double_uint64_t:
6124 ; CHECK-P8: # %bb.0: # %entry
6125 ; CHECK-P8-NEXT: xscvdpuxds f0, f1
6126 ; CHECK-P8-NEXT: li r4, 8
6127 ; CHECK-P8-NEXT: stxsdx f0, r3, r4
6128 ; CHECK-P8-NEXT: blr
6130 %conv = fptoui double %str to i64
6131 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
6132 %0 = bitcast i8* %add.ptr to i64*
6133 store i64 %conv, i64* %0, align 8
6137 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6138 define dso_local void @st_align32_double_uint64_t(i8* nocapture %ptr, double %str) {
6139 ; CHECK-P10-LABEL: st_align32_double_uint64_t:
6140 ; CHECK-P10: # %bb.0: # %entry
6141 ; CHECK-P10-NEXT: xscvdpuxds f0, f1
6142 ; CHECK-P10-NEXT: pli r4, 99999000
6143 ; CHECK-P10-NEXT: stxsdx f0, r3, r4
6144 ; CHECK-P10-NEXT: blr
6146 ; CHECK-PREP10-LABEL: st_align32_double_uint64_t:
6147 ; CHECK-PREP10: # %bb.0: # %entry
6148 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f1
6149 ; CHECK-PREP10-NEXT: lis r4, 1525
6150 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
6151 ; CHECK-PREP10-NEXT: stxsdx f0, r3, r4
6152 ; CHECK-PREP10-NEXT: blr
6154 %conv = fptoui double %str to i64
6155 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
6156 %0 = bitcast i8* %add.ptr to i64*
6157 store i64 %conv, i64* %0, align 8
6161 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6162 define dso_local void @st_align64_double_uint64_t(i8* nocapture %ptr, double %str) {
6163 ; CHECK-P10-LABEL: st_align64_double_uint64_t:
6164 ; CHECK-P10: # %bb.0: # %entry
6165 ; CHECK-P10-NEXT: xscvdpuxds f0, f1
6166 ; CHECK-P10-NEXT: pli r4, 244140625
6167 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6168 ; CHECK-P10-NEXT: stxsdx f0, r3, r4
6169 ; CHECK-P10-NEXT: blr
6171 ; CHECK-PREP10-LABEL: st_align64_double_uint64_t:
6172 ; CHECK-PREP10: # %bb.0: # %entry
6173 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f1
6174 ; CHECK-PREP10-NEXT: lis r4, 3725
6175 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
6176 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
6177 ; CHECK-PREP10-NEXT: stxsdx f0, r3, r4
6178 ; CHECK-PREP10-NEXT: blr
6180 %conv = fptoui double %str to i64
6181 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
6182 %0 = bitcast i8* %add.ptr to i64*
6183 store i64 %conv, i64* %0, align 8
6187 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6188 define dso_local void @st_reg_double_uint64_t(i8* nocapture %ptr, i64 %off, double %str) {
6189 ; CHECK-LABEL: st_reg_double_uint64_t:
6190 ; CHECK: # %bb.0: # %entry
6191 ; CHECK-NEXT: xscvdpuxds f0, f1
6192 ; CHECK-NEXT: stxsdx f0, r3, r4
6195 %conv = fptoui double %str to i64
6196 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
6197 %0 = bitcast i8* %add.ptr to i64*
6198 store i64 %conv, i64* %0, align 8
6202 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6203 define dso_local void @st_or1_double_uint64_t(i64 %ptr, i8 zeroext %off, double %str) {
6204 ; CHECK-POSTP8-LABEL: st_or1_double_uint64_t:
6205 ; CHECK-POSTP8: # %bb.0: # %entry
6206 ; CHECK-POSTP8-NEXT: xscvdpuxds v2, f1
6207 ; CHECK-POSTP8-NEXT: or r3, r4, r3
6208 ; CHECK-POSTP8-NEXT: stxsd v2, 0(r3)
6209 ; CHECK-POSTP8-NEXT: blr
6211 ; CHECK-P8-LABEL: st_or1_double_uint64_t:
6212 ; CHECK-P8: # %bb.0: # %entry
6213 ; CHECK-P8-NEXT: xscvdpuxds f0, f1
6214 ; CHECK-P8-NEXT: or r3, r4, r3
6215 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
6216 ; CHECK-P8-NEXT: blr
6218 %conv = fptoui double %str to i64
6219 %conv1 = zext i8 %off to i64
6220 %or = or i64 %conv1, %ptr
6221 %0 = inttoptr i64 %or to i64*
6222 store i64 %conv, i64* %0, align 8
6226 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6227 define dso_local void @st_not_disjoint16_double_uint64_t(i64 %ptr, double %str) {
6228 ; CHECK-POSTP8-LABEL: st_not_disjoint16_double_uint64_t:
6229 ; CHECK-POSTP8: # %bb.0: # %entry
6230 ; CHECK-POSTP8-NEXT: xscvdpuxds v2, f1
6231 ; CHECK-POSTP8-NEXT: ori r3, r3, 6
6232 ; CHECK-POSTP8-NEXT: stxsd v2, 0(r3)
6233 ; CHECK-POSTP8-NEXT: blr
6235 ; CHECK-P8-LABEL: st_not_disjoint16_double_uint64_t:
6236 ; CHECK-P8: # %bb.0: # %entry
6237 ; CHECK-P8-NEXT: xscvdpuxds f0, f1
6238 ; CHECK-P8-NEXT: ori r3, r3, 6
6239 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
6240 ; CHECK-P8-NEXT: blr
6242 %conv = fptoui double %str to i64
6243 %or = or i64 %ptr, 6
6244 %0 = inttoptr i64 %or to i64*
6245 store i64 %conv, i64* %0, align 8
6249 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6250 define dso_local void @st_disjoint_align16_double_uint64_t(i64 %ptr, double %str) {
6251 ; CHECK-POSTP8-LABEL: st_disjoint_align16_double_uint64_t:
6252 ; CHECK-POSTP8: # %bb.0: # %entry
6253 ; CHECK-POSTP8-NEXT: xscvdpuxds v2, f1
6254 ; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
6255 ; CHECK-POSTP8-NEXT: stxsd v2, 24(r3)
6256 ; CHECK-POSTP8-NEXT: blr
6258 ; CHECK-P8-LABEL: st_disjoint_align16_double_uint64_t:
6259 ; CHECK-P8: # %bb.0: # %entry
6260 ; CHECK-P8-NEXT: xscvdpuxds f0, f1
6261 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
6262 ; CHECK-P8-NEXT: ori r3, r3, 24
6263 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
6264 ; CHECK-P8-NEXT: blr
6266 %and = and i64 %ptr, -4096
6267 %conv = fptoui double %str to i64
6268 %or = or i64 %and, 24
6269 %0 = inttoptr i64 %or to i64*
6270 store i64 %conv, i64* %0, align 8
6274 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6275 define dso_local void @st_not_disjoint32_double_uint64_t(i64 %ptr, double %str) {
6276 ; CHECK-POSTP8-LABEL: st_not_disjoint32_double_uint64_t:
6277 ; CHECK-POSTP8: # %bb.0: # %entry
6278 ; CHECK-POSTP8-NEXT: xscvdpuxds v2, f1
6279 ; CHECK-POSTP8-NEXT: ori r3, r3, 34463
6280 ; CHECK-POSTP8-NEXT: oris r3, r3, 1
6281 ; CHECK-POSTP8-NEXT: stxsd v2, 0(r3)
6282 ; CHECK-POSTP8-NEXT: blr
6284 ; CHECK-P8-LABEL: st_not_disjoint32_double_uint64_t:
6285 ; CHECK-P8: # %bb.0: # %entry
6286 ; CHECK-P8-NEXT: xscvdpuxds f0, f1
6287 ; CHECK-P8-NEXT: ori r3, r3, 34463
6288 ; CHECK-P8-NEXT: oris r3, r3, 1
6289 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
6290 ; CHECK-P8-NEXT: blr
6292 %conv = fptoui double %str to i64
6293 %or = or i64 %ptr, 99999
6294 %0 = inttoptr i64 %or to i64*
6295 store i64 %conv, i64* %0, align 8
6299 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6300 define dso_local void @st_disjoint_align32_double_uint64_t(i64 %ptr, double %str) {
6301 ; CHECK-P10-LABEL: st_disjoint_align32_double_uint64_t:
6302 ; CHECK-P10: # %bb.0: # %entry
6303 ; CHECK-P10-NEXT: xscvdpuxds f0, f1
6304 ; CHECK-P10-NEXT: lis r4, -15264
6305 ; CHECK-P10-NEXT: and r3, r3, r4
6306 ; CHECK-P10-NEXT: pli r4, 999990000
6307 ; CHECK-P10-NEXT: stxsdx f0, r3, r4
6308 ; CHECK-P10-NEXT: blr
6310 ; CHECK-P9-LABEL: st_disjoint_align32_double_uint64_t:
6311 ; CHECK-P9: # %bb.0: # %entry
6312 ; CHECK-P9-NEXT: xscvdpuxds f0, f1
6313 ; CHECK-P9-NEXT: lis r4, -15264
6314 ; CHECK-P9-NEXT: and r3, r3, r4
6315 ; CHECK-P9-NEXT: lis r4, 15258
6316 ; CHECK-P9-NEXT: ori r4, r4, 41712
6317 ; CHECK-P9-NEXT: stxsdx f0, r3, r4
6318 ; CHECK-P9-NEXT: blr
6320 ; CHECK-P8-LABEL: st_disjoint_align32_double_uint64_t:
6321 ; CHECK-P8: # %bb.0: # %entry
6322 ; CHECK-P8-NEXT: xscvdpuxds f0, f1
6323 ; CHECK-P8-NEXT: lis r4, -15264
6324 ; CHECK-P8-NEXT: lis r5, 15258
6325 ; CHECK-P8-NEXT: and r3, r3, r4
6326 ; CHECK-P8-NEXT: ori r4, r5, 41712
6327 ; CHECK-P8-NEXT: stxsdx f0, r3, r4
6328 ; CHECK-P8-NEXT: blr
6330 %and = and i64 %ptr, -1000341504
6331 %conv = fptoui double %str to i64
6332 %or = or i64 %and, 999990000
6333 %0 = inttoptr i64 %or to i64*
6334 store i64 %conv, i64* %0, align 16
6338 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6339 define dso_local void @st_not_disjoint64_double_uint64_t(i64 %ptr, double %str) {
6340 ; CHECK-P10-LABEL: st_not_disjoint64_double_uint64_t:
6341 ; CHECK-P10: # %bb.0: # %entry
6342 ; CHECK-P10-NEXT: xscvdpuxds v2, f1
6343 ; CHECK-P10-NEXT: pli r4, 232
6344 ; CHECK-P10-NEXT: pli r5, 3567587329
6345 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
6346 ; CHECK-P10-NEXT: or r3, r3, r5
6347 ; CHECK-P10-NEXT: stxsd v2, 0(r3)
6348 ; CHECK-P10-NEXT: blr
6350 ; CHECK-P9-LABEL: st_not_disjoint64_double_uint64_t:
6351 ; CHECK-P9: # %bb.0: # %entry
6352 ; CHECK-P9-NEXT: li r4, 29
6353 ; CHECK-P9-NEXT: xscvdpuxds v2, f1
6354 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
6355 ; CHECK-P9-NEXT: oris r4, r4, 54437
6356 ; CHECK-P9-NEXT: ori r4, r4, 4097
6357 ; CHECK-P9-NEXT: or r3, r3, r4
6358 ; CHECK-P9-NEXT: stxsd v2, 0(r3)
6359 ; CHECK-P9-NEXT: blr
6361 ; CHECK-P8-LABEL: st_not_disjoint64_double_uint64_t:
6362 ; CHECK-P8: # %bb.0: # %entry
6363 ; CHECK-P8-NEXT: xscvdpuxds f0, f1
6364 ; CHECK-P8-NEXT: li r4, 29
6365 ; CHECK-P8-NEXT: rldic r4, r4, 35, 24
6366 ; CHECK-P8-NEXT: oris r4, r4, 54437
6367 ; CHECK-P8-NEXT: ori r4, r4, 4097
6368 ; CHECK-P8-NEXT: or r3, r3, r4
6369 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
6370 ; CHECK-P8-NEXT: blr
6372 %conv = fptoui double %str to i64
6373 %or = or i64 %ptr, 1000000000001
6374 %0 = inttoptr i64 %or to i64*
6375 store i64 %conv, i64* %0, align 8
6379 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6380 define dso_local void @st_disjoint_align64_double_uint64_t(i64 %ptr, double %str) {
6381 ; CHECK-P10-LABEL: st_disjoint_align64_double_uint64_t:
6382 ; CHECK-P10: # %bb.0: # %entry
6383 ; CHECK-P10-NEXT: xscvdpuxds f0, f1
6384 ; CHECK-P10-NEXT: pli r4, 244140625
6385 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
6386 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6387 ; CHECK-P10-NEXT: stxsdx f0, r3, r4
6388 ; CHECK-P10-NEXT: blr
6390 ; CHECK-PREP10-LABEL: st_disjoint_align64_double_uint64_t:
6391 ; CHECK-PREP10: # %bb.0: # %entry
6392 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f1
6393 ; CHECK-PREP10-NEXT: lis r4, 3725
6394 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
6395 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
6396 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
6397 ; CHECK-PREP10-NEXT: stxsdx f0, r3, r4
6398 ; CHECK-PREP10-NEXT: blr
6400 %and = and i64 %ptr, -1099511627776
6401 %conv = fptoui double %str to i64
6402 %or = or i64 %and, 1000000000000
6403 %0 = inttoptr i64 %or to i64*
6404 store i64 %conv, i64* %0, align 4096
6408 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6409 define dso_local void @st_cst_align16_double_uint64_t(double %str) {
6410 ; CHECK-POSTP8-LABEL: st_cst_align16_double_uint64_t:
6411 ; CHECK-POSTP8: # %bb.0: # %entry
6412 ; CHECK-POSTP8-NEXT: xscvdpuxds v2, f1
6413 ; CHECK-POSTP8-NEXT: stxsd v2, 4080(0)
6414 ; CHECK-POSTP8-NEXT: blr
6416 ; CHECK-P8-LABEL: st_cst_align16_double_uint64_t:
6417 ; CHECK-P8: # %bb.0: # %entry
6418 ; CHECK-P8-NEXT: xscvdpuxds f0, f1
6419 ; CHECK-P8-NEXT: li r3, 4080
6420 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
6421 ; CHECK-P8-NEXT: blr
6423 %conv = fptoui double %str to i64
6424 store i64 %conv, i64* inttoptr (i64 4080 to i64*), align 16
6428 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6429 define dso_local void @st_cst_align32_double_uint64_t(double %str) {
6430 ; CHECK-POSTP8-LABEL: st_cst_align32_double_uint64_t:
6431 ; CHECK-POSTP8: # %bb.0: # %entry
6432 ; CHECK-POSTP8-NEXT: xscvdpuxds v2, f1
6433 ; CHECK-POSTP8-NEXT: lis r3, 153
6434 ; CHECK-POSTP8-NEXT: stxsd v2, -27108(r3)
6435 ; CHECK-POSTP8-NEXT: blr
6437 ; CHECK-P8-LABEL: st_cst_align32_double_uint64_t:
6438 ; CHECK-P8: # %bb.0: # %entry
6439 ; CHECK-P8-NEXT: xscvdpuxds f0, f1
6440 ; CHECK-P8-NEXT: lis r3, 152
6441 ; CHECK-P8-NEXT: ori r3, r3, 38428
6442 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
6443 ; CHECK-P8-NEXT: blr
6445 %conv = fptoui double %str to i64
6446 store i64 %conv, i64* inttoptr (i64 9999900 to i64*), align 8
6450 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6451 define dso_local void @st_cst_align64_double_uint64_t(double %str) {
6452 ; CHECK-P10-LABEL: st_cst_align64_double_uint64_t:
6453 ; CHECK-P10: # %bb.0: # %entry
6454 ; CHECK-P10-NEXT: xscvdpuxds v2, f1
6455 ; CHECK-P10-NEXT: pli r3, 244140625
6456 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
6457 ; CHECK-P10-NEXT: stxsd v2, 0(r3)
6458 ; CHECK-P10-NEXT: blr
6460 ; CHECK-P9-LABEL: st_cst_align64_double_uint64_t:
6461 ; CHECK-P9: # %bb.0: # %entry
6462 ; CHECK-P9-NEXT: xscvdpuxds v2, f1
6463 ; CHECK-P9-NEXT: lis r3, 3725
6464 ; CHECK-P9-NEXT: ori r3, r3, 19025
6465 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
6466 ; CHECK-P9-NEXT: stxsd v2, 0(r3)
6467 ; CHECK-P9-NEXT: blr
6469 ; CHECK-P8-LABEL: st_cst_align64_double_uint64_t:
6470 ; CHECK-P8: # %bb.0: # %entry
6471 ; CHECK-P8-NEXT: xscvdpuxds f0, f1
6472 ; CHECK-P8-NEXT: lis r3, 3725
6473 ; CHECK-P8-NEXT: ori r3, r3, 19025
6474 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
6475 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
6476 ; CHECK-P8-NEXT: blr
6478 %conv = fptoui double %str to i64
6479 store i64 %conv, i64* inttoptr (i64 1000000000000 to i64*), align 4096
6483 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6484 define dso_local void @st_0_double_int64_t(i64 %ptr, double %str) {
6485 ; CHECK-POSTP8-LABEL: st_0_double_int64_t:
6486 ; CHECK-POSTP8: # %bb.0: # %entry
6487 ; CHECK-POSTP8-NEXT: xscvdpsxds v2, f1
6488 ; CHECK-POSTP8-NEXT: stxsd v2, 0(r3)
6489 ; CHECK-POSTP8-NEXT: blr
6491 ; CHECK-P8-LABEL: st_0_double_int64_t:
6492 ; CHECK-P8: # %bb.0: # %entry
6493 ; CHECK-P8-NEXT: xscvdpsxds f0, f1
6494 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
6495 ; CHECK-P8-NEXT: blr
6497 %conv = fptosi double %str to i64
6498 %0 = inttoptr i64 %ptr to i64*
6499 store i64 %conv, i64* %0, align 8
6503 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6504 define dso_local void @st_align16_double_int64_t(i8* nocapture %ptr, double %str) {
6505 ; CHECK-POSTP8-LABEL: st_align16_double_int64_t:
6506 ; CHECK-POSTP8: # %bb.0: # %entry
6507 ; CHECK-POSTP8-NEXT: xscvdpsxds v2, f1
6508 ; CHECK-POSTP8-NEXT: stxsd v2, 8(r3)
6509 ; CHECK-POSTP8-NEXT: blr
6511 ; CHECK-P8-LABEL: st_align16_double_int64_t:
6512 ; CHECK-P8: # %bb.0: # %entry
6513 ; CHECK-P8-NEXT: xscvdpsxds f0, f1
6514 ; CHECK-P8-NEXT: li r4, 8
6515 ; CHECK-P8-NEXT: stxsdx f0, r3, r4
6516 ; CHECK-P8-NEXT: blr
6518 %conv = fptosi double %str to i64
6519 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
6520 %0 = bitcast i8* %add.ptr to i64*
6521 store i64 %conv, i64* %0, align 8
6525 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6526 define dso_local void @st_align32_double_int64_t(i8* nocapture %ptr, double %str) {
6527 ; CHECK-P10-LABEL: st_align32_double_int64_t:
6528 ; CHECK-P10: # %bb.0: # %entry
6529 ; CHECK-P10-NEXT: xscvdpsxds f0, f1
6530 ; CHECK-P10-NEXT: pli r4, 99999000
6531 ; CHECK-P10-NEXT: stxsdx f0, r3, r4
6532 ; CHECK-P10-NEXT: blr
6534 ; CHECK-PREP10-LABEL: st_align32_double_int64_t:
6535 ; CHECK-PREP10: # %bb.0: # %entry
6536 ; CHECK-PREP10-NEXT: xscvdpsxds f0, f1
6537 ; CHECK-PREP10-NEXT: lis r4, 1525
6538 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
6539 ; CHECK-PREP10-NEXT: stxsdx f0, r3, r4
6540 ; CHECK-PREP10-NEXT: blr
6542 %conv = fptosi double %str to i64
6543 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
6544 %0 = bitcast i8* %add.ptr to i64*
6545 store i64 %conv, i64* %0, align 8
6549 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6550 define dso_local void @st_align64_double_int64_t(i8* nocapture %ptr, double %str) {
6551 ; CHECK-P10-LABEL: st_align64_double_int64_t:
6552 ; CHECK-P10: # %bb.0: # %entry
6553 ; CHECK-P10-NEXT: xscvdpsxds f0, f1
6554 ; CHECK-P10-NEXT: pli r4, 244140625
6555 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6556 ; CHECK-P10-NEXT: stxsdx f0, r3, r4
6557 ; CHECK-P10-NEXT: blr
6559 ; CHECK-PREP10-LABEL: st_align64_double_int64_t:
6560 ; CHECK-PREP10: # %bb.0: # %entry
6561 ; CHECK-PREP10-NEXT: xscvdpsxds f0, f1
6562 ; CHECK-PREP10-NEXT: lis r4, 3725
6563 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
6564 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
6565 ; CHECK-PREP10-NEXT: stxsdx f0, r3, r4
6566 ; CHECK-PREP10-NEXT: blr
6568 %conv = fptosi double %str to i64
6569 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
6570 %0 = bitcast i8* %add.ptr to i64*
6571 store i64 %conv, i64* %0, align 8
6575 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6576 define dso_local void @st_reg_double_int64_t(i8* nocapture %ptr, i64 %off, double %str) {
6577 ; CHECK-LABEL: st_reg_double_int64_t:
6578 ; CHECK: # %bb.0: # %entry
6579 ; CHECK-NEXT: xscvdpsxds f0, f1
6580 ; CHECK-NEXT: stxsdx f0, r3, r4
6583 %conv = fptosi double %str to i64
6584 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
6585 %0 = bitcast i8* %add.ptr to i64*
6586 store i64 %conv, i64* %0, align 8
6590 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6591 define dso_local void @st_or1_double_int64_t(i64 %ptr, i8 zeroext %off, double %str) {
6592 ; CHECK-POSTP8-LABEL: st_or1_double_int64_t:
6593 ; CHECK-POSTP8: # %bb.0: # %entry
6594 ; CHECK-POSTP8-NEXT: xscvdpsxds v2, f1
6595 ; CHECK-POSTP8-NEXT: or r3, r4, r3
6596 ; CHECK-POSTP8-NEXT: stxsd v2, 0(r3)
6597 ; CHECK-POSTP8-NEXT: blr
6599 ; CHECK-P8-LABEL: st_or1_double_int64_t:
6600 ; CHECK-P8: # %bb.0: # %entry
6601 ; CHECK-P8-NEXT: xscvdpsxds f0, f1
6602 ; CHECK-P8-NEXT: or r3, r4, r3
6603 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
6604 ; CHECK-P8-NEXT: blr
6606 %conv = fptosi double %str to i64
6607 %conv1 = zext i8 %off to i64
6608 %or = or i64 %conv1, %ptr
6609 %0 = inttoptr i64 %or to i64*
6610 store i64 %conv, i64* %0, align 8
6614 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6615 define dso_local void @st_not_disjoint16_double_int64_t(i64 %ptr, double %str) {
6616 ; CHECK-POSTP8-LABEL: st_not_disjoint16_double_int64_t:
6617 ; CHECK-POSTP8: # %bb.0: # %entry
6618 ; CHECK-POSTP8-NEXT: xscvdpsxds v2, f1
6619 ; CHECK-POSTP8-NEXT: ori r3, r3, 6
6620 ; CHECK-POSTP8-NEXT: stxsd v2, 0(r3)
6621 ; CHECK-POSTP8-NEXT: blr
6623 ; CHECK-P8-LABEL: st_not_disjoint16_double_int64_t:
6624 ; CHECK-P8: # %bb.0: # %entry
6625 ; CHECK-P8-NEXT: xscvdpsxds f0, f1
6626 ; CHECK-P8-NEXT: ori r3, r3, 6
6627 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
6628 ; CHECK-P8-NEXT: blr
6630 %conv = fptosi double %str to i64
6631 %or = or i64 %ptr, 6
6632 %0 = inttoptr i64 %or to i64*
6633 store i64 %conv, i64* %0, align 8
6637 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6638 define dso_local void @st_disjoint_align16_double_int64_t(i64 %ptr, double %str) {
6639 ; CHECK-POSTP8-LABEL: st_disjoint_align16_double_int64_t:
6640 ; CHECK-POSTP8: # %bb.0: # %entry
6641 ; CHECK-POSTP8-NEXT: xscvdpsxds v2, f1
6642 ; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
6643 ; CHECK-POSTP8-NEXT: stxsd v2, 24(r3)
6644 ; CHECK-POSTP8-NEXT: blr
6646 ; CHECK-P8-LABEL: st_disjoint_align16_double_int64_t:
6647 ; CHECK-P8: # %bb.0: # %entry
6648 ; CHECK-P8-NEXT: xscvdpsxds f0, f1
6649 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
6650 ; CHECK-P8-NEXT: ori r3, r3, 24
6651 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
6652 ; CHECK-P8-NEXT: blr
6654 %and = and i64 %ptr, -4096
6655 %conv = fptosi double %str to i64
6656 %or = or i64 %and, 24
6657 %0 = inttoptr i64 %or to i64*
6658 store i64 %conv, i64* %0, align 8
6662 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6663 define dso_local void @st_not_disjoint32_double_int64_t(i64 %ptr, double %str) {
6664 ; CHECK-POSTP8-LABEL: st_not_disjoint32_double_int64_t:
6665 ; CHECK-POSTP8: # %bb.0: # %entry
6666 ; CHECK-POSTP8-NEXT: xscvdpsxds v2, f1
6667 ; CHECK-POSTP8-NEXT: ori r3, r3, 34463
6668 ; CHECK-POSTP8-NEXT: oris r3, r3, 1
6669 ; CHECK-POSTP8-NEXT: stxsd v2, 0(r3)
6670 ; CHECK-POSTP8-NEXT: blr
6672 ; CHECK-P8-LABEL: st_not_disjoint32_double_int64_t:
6673 ; CHECK-P8: # %bb.0: # %entry
6674 ; CHECK-P8-NEXT: xscvdpsxds f0, f1
6675 ; CHECK-P8-NEXT: ori r3, r3, 34463
6676 ; CHECK-P8-NEXT: oris r3, r3, 1
6677 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
6678 ; CHECK-P8-NEXT: blr
6680 %conv = fptosi double %str to i64
6681 %or = or i64 %ptr, 99999
6682 %0 = inttoptr i64 %or to i64*
6683 store i64 %conv, i64* %0, align 8
6687 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6688 define dso_local void @st_disjoint_align32_double_int64_t(i64 %ptr, double %str) {
6689 ; CHECK-P10-LABEL: st_disjoint_align32_double_int64_t:
6690 ; CHECK-P10: # %bb.0: # %entry
6691 ; CHECK-P10-NEXT: xscvdpsxds f0, f1
6692 ; CHECK-P10-NEXT: lis r4, -15264
6693 ; CHECK-P10-NEXT: and r3, r3, r4
6694 ; CHECK-P10-NEXT: pli r4, 999990000
6695 ; CHECK-P10-NEXT: stxsdx f0, r3, r4
6696 ; CHECK-P10-NEXT: blr
6698 ; CHECK-P9-LABEL: st_disjoint_align32_double_int64_t:
6699 ; CHECK-P9: # %bb.0: # %entry
6700 ; CHECK-P9-NEXT: xscvdpsxds f0, f1
6701 ; CHECK-P9-NEXT: lis r4, -15264
6702 ; CHECK-P9-NEXT: and r3, r3, r4
6703 ; CHECK-P9-NEXT: lis r4, 15258
6704 ; CHECK-P9-NEXT: ori r4, r4, 41712
6705 ; CHECK-P9-NEXT: stxsdx f0, r3, r4
6706 ; CHECK-P9-NEXT: blr
6708 ; CHECK-P8-LABEL: st_disjoint_align32_double_int64_t:
6709 ; CHECK-P8: # %bb.0: # %entry
6710 ; CHECK-P8-NEXT: xscvdpsxds f0, f1
6711 ; CHECK-P8-NEXT: lis r4, -15264
6712 ; CHECK-P8-NEXT: lis r5, 15258
6713 ; CHECK-P8-NEXT: and r3, r3, r4
6714 ; CHECK-P8-NEXT: ori r4, r5, 41712
6715 ; CHECK-P8-NEXT: stxsdx f0, r3, r4
6716 ; CHECK-P8-NEXT: blr
6718 %and = and i64 %ptr, -1000341504
6719 %conv = fptosi double %str to i64
6720 %or = or i64 %and, 999990000
6721 %0 = inttoptr i64 %or to i64*
6722 store i64 %conv, i64* %0, align 16
6726 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6727 define dso_local void @st_not_disjoint64_double_int64_t(i64 %ptr, double %str) {
6728 ; CHECK-P10-LABEL: st_not_disjoint64_double_int64_t:
6729 ; CHECK-P10: # %bb.0: # %entry
6730 ; CHECK-P10-NEXT: xscvdpsxds v2, f1
6731 ; CHECK-P10-NEXT: pli r4, 232
6732 ; CHECK-P10-NEXT: pli r5, 3567587329
6733 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
6734 ; CHECK-P10-NEXT: or r3, r3, r5
6735 ; CHECK-P10-NEXT: stxsd v2, 0(r3)
6736 ; CHECK-P10-NEXT: blr
6738 ; CHECK-P9-LABEL: st_not_disjoint64_double_int64_t:
6739 ; CHECK-P9: # %bb.0: # %entry
6740 ; CHECK-P9-NEXT: li r4, 29
6741 ; CHECK-P9-NEXT: xscvdpsxds v2, f1
6742 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
6743 ; CHECK-P9-NEXT: oris r4, r4, 54437
6744 ; CHECK-P9-NEXT: ori r4, r4, 4097
6745 ; CHECK-P9-NEXT: or r3, r3, r4
6746 ; CHECK-P9-NEXT: stxsd v2, 0(r3)
6747 ; CHECK-P9-NEXT: blr
6749 ; CHECK-P8-LABEL: st_not_disjoint64_double_int64_t:
6750 ; CHECK-P8: # %bb.0: # %entry
6751 ; CHECK-P8-NEXT: xscvdpsxds f0, f1
6752 ; CHECK-P8-NEXT: li r4, 29
6753 ; CHECK-P8-NEXT: rldic r4, r4, 35, 24
6754 ; CHECK-P8-NEXT: oris r4, r4, 54437
6755 ; CHECK-P8-NEXT: ori r4, r4, 4097
6756 ; CHECK-P8-NEXT: or r3, r3, r4
6757 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
6758 ; CHECK-P8-NEXT: blr
6760 %conv = fptosi double %str to i64
6761 %or = or i64 %ptr, 1000000000001
6762 %0 = inttoptr i64 %or to i64*
6763 store i64 %conv, i64* %0, align 8
6767 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6768 define dso_local void @st_disjoint_align64_double_int64_t(i64 %ptr, double %str) {
6769 ; CHECK-P10-LABEL: st_disjoint_align64_double_int64_t:
6770 ; CHECK-P10: # %bb.0: # %entry
6771 ; CHECK-P10-NEXT: xscvdpsxds f0, f1
6772 ; CHECK-P10-NEXT: pli r4, 244140625
6773 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
6774 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6775 ; CHECK-P10-NEXT: stxsdx f0, r3, r4
6776 ; CHECK-P10-NEXT: blr
6778 ; CHECK-PREP10-LABEL: st_disjoint_align64_double_int64_t:
6779 ; CHECK-PREP10: # %bb.0: # %entry
6780 ; CHECK-PREP10-NEXT: xscvdpsxds f0, f1
6781 ; CHECK-PREP10-NEXT: lis r4, 3725
6782 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
6783 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
6784 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
6785 ; CHECK-PREP10-NEXT: stxsdx f0, r3, r4
6786 ; CHECK-PREP10-NEXT: blr
6788 %and = and i64 %ptr, -1099511627776
6789 %conv = fptosi double %str to i64
6790 %or = or i64 %and, 1000000000000
6791 %0 = inttoptr i64 %or to i64*
6792 store i64 %conv, i64* %0, align 4096
6796 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6797 define dso_local void @st_cst_align16_double_int64_t(double %str) {
6798 ; CHECK-POSTP8-LABEL: st_cst_align16_double_int64_t:
6799 ; CHECK-POSTP8: # %bb.0: # %entry
6800 ; CHECK-POSTP8-NEXT: xscvdpsxds v2, f1
6801 ; CHECK-POSTP8-NEXT: stxsd v2, 4080(0)
6802 ; CHECK-POSTP8-NEXT: blr
6804 ; CHECK-P8-LABEL: st_cst_align16_double_int64_t:
6805 ; CHECK-P8: # %bb.0: # %entry
6806 ; CHECK-P8-NEXT: xscvdpsxds f0, f1
6807 ; CHECK-P8-NEXT: li r3, 4080
6808 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
6809 ; CHECK-P8-NEXT: blr
6811 %conv = fptosi double %str to i64
6812 store i64 %conv, i64* inttoptr (i64 4080 to i64*), align 16
6816 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6817 define dso_local void @st_cst_align32_double_int64_t(double %str) {
6818 ; CHECK-POSTP8-LABEL: st_cst_align32_double_int64_t:
6819 ; CHECK-POSTP8: # %bb.0: # %entry
6820 ; CHECK-POSTP8-NEXT: xscvdpsxds v2, f1
6821 ; CHECK-POSTP8-NEXT: lis r3, 153
6822 ; CHECK-POSTP8-NEXT: stxsd v2, -27108(r3)
6823 ; CHECK-POSTP8-NEXT: blr
6825 ; CHECK-P8-LABEL: st_cst_align32_double_int64_t:
6826 ; CHECK-P8: # %bb.0: # %entry
6827 ; CHECK-P8-NEXT: xscvdpsxds f0, f1
6828 ; CHECK-P8-NEXT: lis r3, 152
6829 ; CHECK-P8-NEXT: ori r3, r3, 38428
6830 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
6831 ; CHECK-P8-NEXT: blr
6833 %conv = fptosi double %str to i64
6834 store i64 %conv, i64* inttoptr (i64 9999900 to i64*), align 8
6838 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6839 define dso_local void @st_cst_align64_double_int64_t(double %str) {
6840 ; CHECK-P10-LABEL: st_cst_align64_double_int64_t:
6841 ; CHECK-P10: # %bb.0: # %entry
6842 ; CHECK-P10-NEXT: xscvdpsxds v2, f1
6843 ; CHECK-P10-NEXT: pli r3, 244140625
6844 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
6845 ; CHECK-P10-NEXT: stxsd v2, 0(r3)
6846 ; CHECK-P10-NEXT: blr
6848 ; CHECK-P9-LABEL: st_cst_align64_double_int64_t:
6849 ; CHECK-P9: # %bb.0: # %entry
6850 ; CHECK-P9-NEXT: xscvdpsxds v2, f1
6851 ; CHECK-P9-NEXT: lis r3, 3725
6852 ; CHECK-P9-NEXT: ori r3, r3, 19025
6853 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
6854 ; CHECK-P9-NEXT: stxsd v2, 0(r3)
6855 ; CHECK-P9-NEXT: blr
6857 ; CHECK-P8-LABEL: st_cst_align64_double_int64_t:
6858 ; CHECK-P8: # %bb.0: # %entry
6859 ; CHECK-P8-NEXT: xscvdpsxds f0, f1
6860 ; CHECK-P8-NEXT: lis r3, 3725
6861 ; CHECK-P8-NEXT: ori r3, r3, 19025
6862 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
6863 ; CHECK-P8-NEXT: stxsdx f0, 0, r3
6864 ; CHECK-P8-NEXT: blr
6866 %conv = fptosi double %str to i64
6867 store i64 %conv, i64* inttoptr (i64 1000000000000 to i64*), align 4096
6871 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6872 define dso_local void @st_0_double_float(i64 %ptr, double %str) {
6873 ; CHECK-LABEL: st_0_double_float:
6874 ; CHECK: # %bb.0: # %entry
6875 ; CHECK-NEXT: xsrsp f0, f1
6876 ; CHECK-NEXT: stfs f0, 0(r3)
6879 %conv = fptrunc double %str to float
6880 %0 = inttoptr i64 %ptr to float*
6881 store float %conv, float* %0, align 4
6885 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6886 define dso_local void @st_align16_double_float(i8* nocapture %ptr, double %str) {
6887 ; CHECK-LABEL: st_align16_double_float:
6888 ; CHECK: # %bb.0: # %entry
6889 ; CHECK-NEXT: xsrsp f0, f1
6890 ; CHECK-NEXT: stfs f0, 8(r3)
6893 %conv = fptrunc double %str to float
6894 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
6895 %0 = bitcast i8* %add.ptr to float*
6896 store float %conv, float* %0, align 4
6900 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6901 define dso_local void @st_align32_double_float(i8* nocapture %ptr, double %str) {
6902 ; CHECK-P10-LABEL: st_align32_double_float:
6903 ; CHECK-P10: # %bb.0: # %entry
6904 ; CHECK-P10-NEXT: xsrsp f0, f1
6905 ; CHECK-P10-NEXT: pli r4, 99999000
6906 ; CHECK-P10-NEXT: stfsx f0, r3, r4
6907 ; CHECK-P10-NEXT: blr
6909 ; CHECK-PREP10-LABEL: st_align32_double_float:
6910 ; CHECK-PREP10: # %bb.0: # %entry
6911 ; CHECK-PREP10-NEXT: xsrsp f0, f1
6912 ; CHECK-PREP10-NEXT: lis r4, 1525
6913 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
6914 ; CHECK-PREP10-NEXT: stfsx f0, r3, r4
6915 ; CHECK-PREP10-NEXT: blr
6917 %conv = fptrunc double %str to float
6918 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
6919 %0 = bitcast i8* %add.ptr to float*
6920 store float %conv, float* %0, align 4
6924 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6925 define dso_local void @st_align64_double_float(i8* nocapture %ptr, double %str) {
6926 ; CHECK-P10-LABEL: st_align64_double_float:
6927 ; CHECK-P10: # %bb.0: # %entry
6928 ; CHECK-P10-NEXT: xsrsp f0, f1
6929 ; CHECK-P10-NEXT: pli r4, 244140625
6930 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6931 ; CHECK-P10-NEXT: stfsx f0, r3, r4
6932 ; CHECK-P10-NEXT: blr
6934 ; CHECK-PREP10-LABEL: st_align64_double_float:
6935 ; CHECK-PREP10: # %bb.0: # %entry
6936 ; CHECK-PREP10-NEXT: xsrsp f0, f1
6937 ; CHECK-PREP10-NEXT: lis r4, 3725
6938 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
6939 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
6940 ; CHECK-PREP10-NEXT: stfsx f0, r3, r4
6941 ; CHECK-PREP10-NEXT: blr
6943 %conv = fptrunc double %str to float
6944 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
6945 %0 = bitcast i8* %add.ptr to float*
6946 store float %conv, float* %0, align 4
6950 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6951 define dso_local void @st_reg_double_float(i8* nocapture %ptr, i64 %off, double %str) {
6952 ; CHECK-LABEL: st_reg_double_float:
6953 ; CHECK: # %bb.0: # %entry
6954 ; CHECK-NEXT: xsrsp f0, f1
6955 ; CHECK-NEXT: stfsx f0, r3, r4
6958 %conv = fptrunc double %str to float
6959 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
6960 %0 = bitcast i8* %add.ptr to float*
6961 store float %conv, float* %0, align 4
6965 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6966 define dso_local void @st_or1_double_float(i64 %ptr, i8 zeroext %off, double %str) {
6967 ; CHECK-LABEL: st_or1_double_float:
6968 ; CHECK: # %bb.0: # %entry
6969 ; CHECK-NEXT: xsrsp f0, f1
6970 ; CHECK-NEXT: or r3, r4, r3
6971 ; CHECK-NEXT: stfs f0, 0(r3)
6974 %conv = fptrunc double %str to float
6975 %conv1 = zext i8 %off to i64
6976 %or = or i64 %conv1, %ptr
6977 %0 = inttoptr i64 %or to float*
6978 store float %conv, float* %0, align 4
6982 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6983 define dso_local void @st_not_disjoint16_double_float(i64 %ptr, double %str) {
6984 ; CHECK-LABEL: st_not_disjoint16_double_float:
6985 ; CHECK: # %bb.0: # %entry
6986 ; CHECK-NEXT: xsrsp f0, f1
6987 ; CHECK-NEXT: ori r3, r3, 6
6988 ; CHECK-NEXT: stfs f0, 0(r3)
6991 %conv = fptrunc double %str to float
6992 %or = or i64 %ptr, 6
6993 %0 = inttoptr i64 %or to float*
6994 store float %conv, float* %0, align 4
6998 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6999 define dso_local void @st_disjoint_align16_double_float(i64 %ptr, double %str) {
7000 ; CHECK-LABEL: st_disjoint_align16_double_float:
7001 ; CHECK: # %bb.0: # %entry
7002 ; CHECK-NEXT: xsrsp f0, f1
7003 ; CHECK-NEXT: rldicr r3, r3, 0, 51
7004 ; CHECK-NEXT: stfs f0, 24(r3)
7007 %and = and i64 %ptr, -4096
7008 %conv = fptrunc double %str to float
7009 %or = or i64 %and, 24
7010 %0 = inttoptr i64 %or to float*
7011 store float %conv, float* %0, align 8
7015 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7016 define dso_local void @st_not_disjoint32_double_float(i64 %ptr, double %str) {
7017 ; CHECK-LABEL: st_not_disjoint32_double_float:
7018 ; CHECK: # %bb.0: # %entry
7019 ; CHECK-NEXT: xsrsp f0, f1
7020 ; CHECK-NEXT: ori r3, r3, 34463
7021 ; CHECK-NEXT: oris r3, r3, 1
7022 ; CHECK-NEXT: stfs f0, 0(r3)
7025 %conv = fptrunc double %str to float
7026 %or = or i64 %ptr, 99999
7027 %0 = inttoptr i64 %or to float*
7028 store float %conv, float* %0, align 4
7032 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7033 define dso_local void @st_disjoint_align32_double_float(i64 %ptr, double %str) {
7034 ; CHECK-P10-LABEL: st_disjoint_align32_double_float:
7035 ; CHECK-P10: # %bb.0: # %entry
7036 ; CHECK-P10-NEXT: xsrsp f0, f1
7037 ; CHECK-P10-NEXT: lis r4, -15264
7038 ; CHECK-P10-NEXT: and r3, r3, r4
7039 ; CHECK-P10-NEXT: pli r4, 999990000
7040 ; CHECK-P10-NEXT: stfsx f0, r3, r4
7041 ; CHECK-P10-NEXT: blr
7043 ; CHECK-P9-LABEL: st_disjoint_align32_double_float:
7044 ; CHECK-P9: # %bb.0: # %entry
7045 ; CHECK-P9-NEXT: xsrsp f0, f1
7046 ; CHECK-P9-NEXT: lis r4, -15264
7047 ; CHECK-P9-NEXT: and r3, r3, r4
7048 ; CHECK-P9-NEXT: lis r4, 15258
7049 ; CHECK-P9-NEXT: ori r4, r4, 41712
7050 ; CHECK-P9-NEXT: stfsx f0, r3, r4
7051 ; CHECK-P9-NEXT: blr
7053 ; CHECK-P8-LABEL: st_disjoint_align32_double_float:
7054 ; CHECK-P8: # %bb.0: # %entry
7055 ; CHECK-P8-NEXT: xsrsp f0, f1
7056 ; CHECK-P8-NEXT: lis r4, -15264
7057 ; CHECK-P8-NEXT: lis r5, 15258
7058 ; CHECK-P8-NEXT: and r3, r3, r4
7059 ; CHECK-P8-NEXT: ori r4, r5, 41712
7060 ; CHECK-P8-NEXT: stfsx f0, r3, r4
7061 ; CHECK-P8-NEXT: blr
7063 %and = and i64 %ptr, -1000341504
7064 %conv = fptrunc double %str to float
7065 %or = or i64 %and, 999990000
7066 %0 = inttoptr i64 %or to float*
7067 store float %conv, float* %0, align 16
7071 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7072 define dso_local void @st_not_disjoint64_double_float(i64 %ptr, double %str) {
7073 ; CHECK-P10-LABEL: st_not_disjoint64_double_float:
7074 ; CHECK-P10: # %bb.0: # %entry
7075 ; CHECK-P10-NEXT: xsrsp f0, f1
7076 ; CHECK-P10-NEXT: pli r4, 232
7077 ; CHECK-P10-NEXT: pli r5, 3567587329
7078 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
7079 ; CHECK-P10-NEXT: or r3, r3, r5
7080 ; CHECK-P10-NEXT: stfs f0, 0(r3)
7081 ; CHECK-P10-NEXT: blr
7083 ; CHECK-P9-LABEL: st_not_disjoint64_double_float:
7084 ; CHECK-P9: # %bb.0: # %entry
7085 ; CHECK-P9-NEXT: li r4, 29
7086 ; CHECK-P9-NEXT: xsrsp f0, f1
7087 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
7088 ; CHECK-P9-NEXT: oris r4, r4, 54437
7089 ; CHECK-P9-NEXT: ori r4, r4, 4097
7090 ; CHECK-P9-NEXT: or r3, r3, r4
7091 ; CHECK-P9-NEXT: stfs f0, 0(r3)
7092 ; CHECK-P9-NEXT: blr
7094 ; CHECK-P8-LABEL: st_not_disjoint64_double_float:
7095 ; CHECK-P8: # %bb.0: # %entry
7096 ; CHECK-P8-NEXT: xsrsp f0, f1
7097 ; CHECK-P8-NEXT: li r4, 29
7098 ; CHECK-P8-NEXT: rldic r4, r4, 35, 24
7099 ; CHECK-P8-NEXT: oris r4, r4, 54437
7100 ; CHECK-P8-NEXT: ori r4, r4, 4097
7101 ; CHECK-P8-NEXT: or r3, r3, r4
7102 ; CHECK-P8-NEXT: stfs f0, 0(r3)
7103 ; CHECK-P8-NEXT: blr
7105 %conv = fptrunc double %str to float
7106 %or = or i64 %ptr, 1000000000001
7107 %0 = inttoptr i64 %or to float*
7108 store float %conv, float* %0, align 4
7112 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7113 define dso_local void @st_disjoint_align64_double_float(i64 %ptr, double %str) {
7114 ; CHECK-P10-LABEL: st_disjoint_align64_double_float:
7115 ; CHECK-P10: # %bb.0: # %entry
7116 ; CHECK-P10-NEXT: xsrsp f0, f1
7117 ; CHECK-P10-NEXT: pli r4, 244140625
7118 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
7119 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7120 ; CHECK-P10-NEXT: stfsx f0, r3, r4
7121 ; CHECK-P10-NEXT: blr
7123 ; CHECK-PREP10-LABEL: st_disjoint_align64_double_float:
7124 ; CHECK-PREP10: # %bb.0: # %entry
7125 ; CHECK-PREP10-NEXT: xsrsp f0, f1
7126 ; CHECK-PREP10-NEXT: lis r4, 3725
7127 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
7128 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
7129 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
7130 ; CHECK-PREP10-NEXT: stfsx f0, r3, r4
7131 ; CHECK-PREP10-NEXT: blr
7133 %and = and i64 %ptr, -1099511627776
7134 %conv = fptrunc double %str to float
7135 %or = or i64 %and, 1000000000000
7136 %0 = inttoptr i64 %or to float*
7137 store float %conv, float* %0, align 4096
7141 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7142 define dso_local void @st_cst_align16_double_float(double %str) {
7143 ; CHECK-LABEL: st_cst_align16_double_float:
7144 ; CHECK: # %bb.0: # %entry
7145 ; CHECK-NEXT: xsrsp f0, f1
7146 ; CHECK-NEXT: stfs f0, 4080(0)
7149 %conv = fptrunc double %str to float
7150 store float %conv, float* inttoptr (i64 4080 to float*), align 16
7154 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7155 define dso_local void @st_cst_align32_double_float(double %str) {
7156 ; CHECK-LABEL: st_cst_align32_double_float:
7157 ; CHECK: # %bb.0: # %entry
7158 ; CHECK-NEXT: xsrsp f0, f1
7159 ; CHECK-NEXT: lis r3, 153
7160 ; CHECK-NEXT: stfs f0, -27108(r3)
7163 %conv = fptrunc double %str to float
7164 store float %conv, float* inttoptr (i64 9999900 to float*), align 4
7168 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7169 define dso_local void @st_cst_align64_double_float(double %str) {
7170 ; CHECK-P10-LABEL: st_cst_align64_double_float:
7171 ; CHECK-P10: # %bb.0: # %entry
7172 ; CHECK-P10-NEXT: xsrsp f0, f1
7173 ; CHECK-P10-NEXT: pli r3, 244140625
7174 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
7175 ; CHECK-P10-NEXT: stfs f0, 0(r3)
7176 ; CHECK-P10-NEXT: blr
7178 ; CHECK-PREP10-LABEL: st_cst_align64_double_float:
7179 ; CHECK-PREP10: # %bb.0: # %entry
7180 ; CHECK-PREP10-NEXT: xsrsp f0, f1
7181 ; CHECK-PREP10-NEXT: lis r3, 3725
7182 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
7183 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
7184 ; CHECK-PREP10-NEXT: stfs f0, 0(r3)
7185 ; CHECK-PREP10-NEXT: blr
7187 %conv = fptrunc double %str to float
7188 store float %conv, float* inttoptr (i64 1000000000000 to float*), align 4096
7192 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7193 define dso_local void @st_0_double_double(i64 %ptr, double %str) {
7194 ; CHECK-LABEL: st_0_double_double:
7195 ; CHECK: # %bb.0: # %entry
7196 ; CHECK-NEXT: stfd f1, 0(r3)
7199 %0 = inttoptr i64 %ptr to double*
7200 store double %str, double* %0, align 8
7204 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7205 define dso_local void @st_align16_double_double(i8* nocapture %ptr, double %str) {
7206 ; CHECK-LABEL: st_align16_double_double:
7207 ; CHECK: # %bb.0: # %entry
7208 ; CHECK-NEXT: stfd f1, 8(r3)
7211 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
7212 %0 = bitcast i8* %add.ptr to double*
7213 store double %str, double* %0, align 8
7217 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7218 define dso_local void @st_align32_double_double(i8* nocapture %ptr, double %str) {
7219 ; CHECK-P10-LABEL: st_align32_double_double:
7220 ; CHECK-P10: # %bb.0: # %entry
7221 ; CHECK-P10-NEXT: pli r4, 99999000
7222 ; CHECK-P10-NEXT: stfdx f1, r3, r4
7223 ; CHECK-P10-NEXT: blr
7225 ; CHECK-PREP10-LABEL: st_align32_double_double:
7226 ; CHECK-PREP10: # %bb.0: # %entry
7227 ; CHECK-PREP10-NEXT: lis r4, 1525
7228 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
7229 ; CHECK-PREP10-NEXT: stfdx f1, r3, r4
7230 ; CHECK-PREP10-NEXT: blr
7232 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
7233 %0 = bitcast i8* %add.ptr to double*
7234 store double %str, double* %0, align 8
7238 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7239 define dso_local void @st_align64_double_double(i8* nocapture %ptr, double %str) {
7240 ; CHECK-P10-LABEL: st_align64_double_double:
7241 ; CHECK-P10: # %bb.0: # %entry
7242 ; CHECK-P10-NEXT: pli r4, 244140625
7243 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7244 ; CHECK-P10-NEXT: stfdx f1, r3, r4
7245 ; CHECK-P10-NEXT: blr
7247 ; CHECK-PREP10-LABEL: st_align64_double_double:
7248 ; CHECK-PREP10: # %bb.0: # %entry
7249 ; CHECK-PREP10-NEXT: lis r4, 3725
7250 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
7251 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
7252 ; CHECK-PREP10-NEXT: stfdx f1, r3, r4
7253 ; CHECK-PREP10-NEXT: blr
7255 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
7256 %0 = bitcast i8* %add.ptr to double*
7257 store double %str, double* %0, align 8
7261 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7262 define dso_local void @st_reg_double_double(i8* nocapture %ptr, i64 %off, double %str) {
7263 ; CHECK-LABEL: st_reg_double_double:
7264 ; CHECK: # %bb.0: # %entry
7265 ; CHECK-NEXT: stfdx f1, r3, r4
7268 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
7269 %0 = bitcast i8* %add.ptr to double*
7270 store double %str, double* %0, align 8
7274 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7275 define dso_local void @st_or1_double_double(i64 %ptr, i8 zeroext %off, double %str) {
7276 ; CHECK-LABEL: st_or1_double_double:
7277 ; CHECK: # %bb.0: # %entry
7278 ; CHECK-NEXT: or r3, r4, r3
7279 ; CHECK-NEXT: stfd f1, 0(r3)
7282 %conv = zext i8 %off to i64
7283 %or = or i64 %conv, %ptr
7284 %0 = inttoptr i64 %or to double*
7285 store double %str, double* %0, align 8
7289 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7290 define dso_local void @st_not_disjoint16_double_double(i64 %ptr, double %str) {
7291 ; CHECK-LABEL: st_not_disjoint16_double_double:
7292 ; CHECK: # %bb.0: # %entry
7293 ; CHECK-NEXT: ori r3, r3, 6
7294 ; CHECK-NEXT: stfd f1, 0(r3)
7297 %or = or i64 %ptr, 6
7298 %0 = inttoptr i64 %or to double*
7299 store double %str, double* %0, align 8
7303 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7304 define dso_local void @st_disjoint_align16_double_double(i64 %ptr, double %str) {
7305 ; CHECK-LABEL: st_disjoint_align16_double_double:
7306 ; CHECK: # %bb.0: # %entry
7307 ; CHECK-NEXT: rldicr r3, r3, 0, 51
7308 ; CHECK-NEXT: stfd f1, 24(r3)
7311 %and = and i64 %ptr, -4096
7312 %or = or i64 %and, 24
7313 %0 = inttoptr i64 %or to double*
7314 store double %str, double* %0, align 8
7318 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7319 define dso_local void @st_not_disjoint32_double_double(i64 %ptr, double %str) {
7320 ; CHECK-LABEL: st_not_disjoint32_double_double:
7321 ; CHECK: # %bb.0: # %entry
7322 ; CHECK-NEXT: ori r3, r3, 34463
7323 ; CHECK-NEXT: oris r3, r3, 1
7324 ; CHECK-NEXT: stfd f1, 0(r3)
7327 %or = or i64 %ptr, 99999
7328 %0 = inttoptr i64 %or to double*
7329 store double %str, double* %0, align 8
7333 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7334 define dso_local void @st_disjoint_align32_double_double(i64 %ptr, double %str) {
7335 ; CHECK-P10-LABEL: st_disjoint_align32_double_double:
7336 ; CHECK-P10: # %bb.0: # %entry
7337 ; CHECK-P10-NEXT: lis r4, -15264
7338 ; CHECK-P10-NEXT: and r3, r3, r4
7339 ; CHECK-P10-NEXT: pli r4, 999990000
7340 ; CHECK-P10-NEXT: stfdx f1, r3, r4
7341 ; CHECK-P10-NEXT: blr
7343 ; CHECK-P9-LABEL: st_disjoint_align32_double_double:
7344 ; CHECK-P9: # %bb.0: # %entry
7345 ; CHECK-P9-NEXT: lis r4, -15264
7346 ; CHECK-P9-NEXT: and r3, r3, r4
7347 ; CHECK-P9-NEXT: lis r4, 15258
7348 ; CHECK-P9-NEXT: ori r4, r4, 41712
7349 ; CHECK-P9-NEXT: stfdx f1, r3, r4
7350 ; CHECK-P9-NEXT: blr
7352 ; CHECK-P8-LABEL: st_disjoint_align32_double_double:
7353 ; CHECK-P8: # %bb.0: # %entry
7354 ; CHECK-P8-NEXT: lis r4, -15264
7355 ; CHECK-P8-NEXT: lis r5, 15258
7356 ; CHECK-P8-NEXT: and r3, r3, r4
7357 ; CHECK-P8-NEXT: ori r4, r5, 41712
7358 ; CHECK-P8-NEXT: stfdx f1, r3, r4
7359 ; CHECK-P8-NEXT: blr
7361 %and = and i64 %ptr, -1000341504
7362 %or = or i64 %and, 999990000
7363 %0 = inttoptr i64 %or to double*
7364 store double %str, double* %0, align 16
7368 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7369 define dso_local void @st_not_disjoint64_double_double(i64 %ptr, double %str) {
7370 ; CHECK-P10-LABEL: st_not_disjoint64_double_double:
7371 ; CHECK-P10: # %bb.0: # %entry
7372 ; CHECK-P10-NEXT: pli r4, 232
7373 ; CHECK-P10-NEXT: pli r5, 3567587329
7374 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
7375 ; CHECK-P10-NEXT: or r3, r3, r5
7376 ; CHECK-P10-NEXT: stfd f1, 0(r3)
7377 ; CHECK-P10-NEXT: blr
7379 ; CHECK-PREP10-LABEL: st_not_disjoint64_double_double:
7380 ; CHECK-PREP10: # %bb.0: # %entry
7381 ; CHECK-PREP10-NEXT: li r4, 29
7382 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
7383 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
7384 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
7385 ; CHECK-PREP10-NEXT: or r3, r3, r4
7386 ; CHECK-PREP10-NEXT: stfd f1, 0(r3)
7387 ; CHECK-PREP10-NEXT: blr
7389 %or = or i64 %ptr, 1000000000001
7390 %0 = inttoptr i64 %or to double*
7391 store double %str, double* %0, align 8
7395 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7396 define dso_local void @st_disjoint_align64_double_double(i64 %ptr, double %str) {
7397 ; CHECK-P10-LABEL: st_disjoint_align64_double_double:
7398 ; CHECK-P10: # %bb.0: # %entry
7399 ; CHECK-P10-NEXT: pli r4, 244140625
7400 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
7401 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7402 ; CHECK-P10-NEXT: stfdx f1, r3, r4
7403 ; CHECK-P10-NEXT: blr
7405 ; CHECK-PREP10-LABEL: st_disjoint_align64_double_double:
7406 ; CHECK-PREP10: # %bb.0: # %entry
7407 ; CHECK-PREP10-NEXT: lis r4, 3725
7408 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
7409 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
7410 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
7411 ; CHECK-PREP10-NEXT: stfdx f1, r3, r4
7412 ; CHECK-PREP10-NEXT: blr
7414 %and = and i64 %ptr, -1099511627776
7415 %or = or i64 %and, 1000000000000
7416 %0 = inttoptr i64 %or to double*
7417 store double %str, double* %0, align 4096
7421 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7422 define dso_local void @st_cst_align16_double_double(double %str) {
7423 ; CHECK-LABEL: st_cst_align16_double_double:
7424 ; CHECK: # %bb.0: # %entry
7425 ; CHECK-NEXT: stfd f1, 4080(0)
7428 store double %str, double* inttoptr (i64 4080 to double*), align 16
7432 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7433 define dso_local void @st_cst_align32_double_double(double %str) {
7434 ; CHECK-LABEL: st_cst_align32_double_double:
7435 ; CHECK: # %bb.0: # %entry
7436 ; CHECK-NEXT: lis r3, 153
7437 ; CHECK-NEXT: stfd f1, -27108(r3)
7440 store double %str, double* inttoptr (i64 9999900 to double*), align 8
7444 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7445 define dso_local void @st_cst_align64_double_double(double %str) {
7446 ; CHECK-P10-LABEL: st_cst_align64_double_double:
7447 ; CHECK-P10: # %bb.0: # %entry
7448 ; CHECK-P10-NEXT: pli r3, 244140625
7449 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
7450 ; CHECK-P10-NEXT: stfd f1, 0(r3)
7451 ; CHECK-P10-NEXT: blr
7453 ; CHECK-PREP10-LABEL: st_cst_align64_double_double:
7454 ; CHECK-PREP10: # %bb.0: # %entry
7455 ; CHECK-PREP10-NEXT: lis r3, 3725
7456 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
7457 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
7458 ; CHECK-PREP10-NEXT: stfd f1, 0(r3)
7459 ; CHECK-PREP10-NEXT: blr
7461 store double %str, double* inttoptr (i64 1000000000000 to double*), align 4096