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-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-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-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-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 i64 @ld_0_int64_t_float(i64 %ptr) {
23 ; CHECK-LABEL: ld_0_int64_t_float:
24 ; CHECK: # %bb.0: # %entry
25 ; CHECK-NEXT: lfs f0, 0(r3)
26 ; CHECK-NEXT: xscvdpsxds f0, f0
27 ; CHECK-NEXT: mffprd r3, f0
30 %0 = inttoptr i64 %ptr to ptr
31 %1 = load float, ptr %0, align 4
32 %conv = fptosi float %1 to i64
36 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
37 define dso_local i64 @ld_align16_int64_t_float(ptr nocapture readonly %ptr) {
38 ; CHECK-LABEL: ld_align16_int64_t_float:
39 ; CHECK: # %bb.0: # %entry
40 ; CHECK-NEXT: lfs f0, 8(r3)
41 ; CHECK-NEXT: xscvdpsxds f0, f0
42 ; CHECK-NEXT: mffprd r3, f0
45 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
46 %0 = load float, ptr %add.ptr, align 4
47 %conv = fptosi float %0 to i64
51 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
52 define dso_local i64 @ld_align32_int64_t_float(ptr nocapture readonly %ptr) {
53 ; CHECK-P10-LABEL: ld_align32_int64_t_float:
54 ; CHECK-P10: # %bb.0: # %entry
55 ; CHECK-P10-NEXT: plfs f0, 99999000(r3), 0
56 ; CHECK-P10-NEXT: xscvdpsxds f0, f0
57 ; CHECK-P10-NEXT: mffprd r3, f0
60 ; CHECK-PREP10-LABEL: ld_align32_int64_t_float:
61 ; CHECK-PREP10: # %bb.0: # %entry
62 ; CHECK-PREP10-NEXT: lis r4, 1525
63 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
64 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
65 ; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
66 ; CHECK-PREP10-NEXT: mffprd r3, f0
67 ; CHECK-PREP10-NEXT: blr
69 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
70 %0 = load float, ptr %add.ptr, align 4
71 %conv = fptosi float %0 to i64
75 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
76 define dso_local i64 @ld_align64_int64_t_float(ptr nocapture readonly %ptr) {
77 ; CHECK-P10-LABEL: ld_align64_int64_t_float:
78 ; CHECK-P10: # %bb.0: # %entry
79 ; CHECK-P10-NEXT: pli r4, 244140625
80 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
81 ; CHECK-P10-NEXT: lfsx f0, r3, r4
82 ; CHECK-P10-NEXT: xscvdpsxds f0, f0
83 ; CHECK-P10-NEXT: mffprd r3, f0
86 ; CHECK-PREP10-LABEL: ld_align64_int64_t_float:
87 ; CHECK-PREP10: # %bb.0: # %entry
88 ; CHECK-PREP10-NEXT: lis r4, 3725
89 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
90 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
91 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
92 ; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
93 ; CHECK-PREP10-NEXT: mffprd r3, f0
94 ; CHECK-PREP10-NEXT: blr
96 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
97 %0 = load float, ptr %add.ptr, align 4
98 %conv = fptosi float %0 to i64
102 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
103 define dso_local i64 @ld_reg_int64_t_float(ptr nocapture readonly %ptr, i64 %off) {
104 ; CHECK-LABEL: ld_reg_int64_t_float:
105 ; CHECK: # %bb.0: # %entry
106 ; CHECK-NEXT: lfsx f0, r3, r4
107 ; CHECK-NEXT: xscvdpsxds f0, f0
108 ; CHECK-NEXT: mffprd r3, f0
111 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
112 %0 = load float, ptr %add.ptr, align 4
113 %conv = fptosi float %0 to i64
117 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
118 define dso_local i64 @ld_or_int64_t_float(i64 %ptr, i8 zeroext %off) {
119 ; CHECK-LABEL: ld_or_int64_t_float:
120 ; CHECK: # %bb.0: # %entry
121 ; CHECK-NEXT: or r3, r4, r3
122 ; CHECK-NEXT: lfs f0, 0(r3)
123 ; CHECK-NEXT: xscvdpsxds f0, f0
124 ; CHECK-NEXT: mffprd r3, f0
127 %conv = zext i8 %off to i64
128 %or = or i64 %conv, %ptr
129 %0 = inttoptr i64 %or to ptr
130 %1 = load float, ptr %0, align 4
131 %conv1 = fptosi float %1 to i64
135 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
136 define dso_local i64 @ld_not_disjoint16_int64_t_float(i64 %ptr) {
137 ; CHECK-LABEL: ld_not_disjoint16_int64_t_float:
138 ; CHECK: # %bb.0: # %entry
139 ; CHECK-NEXT: ori r3, r3, 6
140 ; CHECK-NEXT: lfs f0, 0(r3)
141 ; CHECK-NEXT: xscvdpsxds f0, f0
142 ; CHECK-NEXT: mffprd r3, f0
146 %0 = inttoptr i64 %or to ptr
147 %1 = load float, ptr %0, align 4
148 %conv = fptosi float %1 to i64
152 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
153 define dso_local i64 @ld_disjoint_align16_int64_t_float(i64 %ptr) {
154 ; CHECK-LABEL: ld_disjoint_align16_int64_t_float:
155 ; CHECK: # %bb.0: # %entry
156 ; CHECK-NEXT: rldicr r3, r3, 0, 51
157 ; CHECK-NEXT: lfs f0, 24(r3)
158 ; CHECK-NEXT: xscvdpsxds f0, f0
159 ; CHECK-NEXT: mffprd r3, f0
162 %and = and i64 %ptr, -4096
163 %or = or i64 %and, 24
164 %0 = inttoptr i64 %or to ptr
165 %1 = load float, ptr %0, align 8
166 %conv = fptosi float %1 to i64
170 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
171 define dso_local i64 @ld_not_disjoint32_int64_t_float(i64 %ptr) {
172 ; CHECK-LABEL: ld_not_disjoint32_int64_t_float:
173 ; CHECK: # %bb.0: # %entry
174 ; CHECK-NEXT: ori r3, r3, 34463
175 ; CHECK-NEXT: oris r3, r3, 1
176 ; CHECK-NEXT: lfs f0, 0(r3)
177 ; CHECK-NEXT: xscvdpsxds f0, f0
178 ; CHECK-NEXT: mffprd r3, f0
181 %or = or i64 %ptr, 99999
182 %0 = inttoptr i64 %or to ptr
183 %1 = load float, ptr %0, align 4
184 %conv = fptosi float %1 to i64
188 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
189 define dso_local i64 @ld_disjoint_align32_int64_t_float(i64 %ptr) {
190 ; CHECK-P10-LABEL: ld_disjoint_align32_int64_t_float:
191 ; CHECK-P10: # %bb.0: # %entry
192 ; CHECK-P10-NEXT: lis r4, -15264
193 ; CHECK-P10-NEXT: and r3, r3, r4
194 ; CHECK-P10-NEXT: plfs f0, 999990000(r3), 0
195 ; CHECK-P10-NEXT: xscvdpsxds f0, f0
196 ; CHECK-P10-NEXT: mffprd r3, f0
197 ; CHECK-P10-NEXT: blr
199 ; CHECK-P9-LABEL: ld_disjoint_align32_int64_t_float:
200 ; CHECK-P9: # %bb.0: # %entry
201 ; CHECK-P9-NEXT: lis r4, -15264
202 ; CHECK-P9-NEXT: and r3, r3, r4
203 ; CHECK-P9-NEXT: lis r4, 15258
204 ; CHECK-P9-NEXT: ori r4, r4, 41712
205 ; CHECK-P9-NEXT: lfsx f0, r3, r4
206 ; CHECK-P9-NEXT: xscvdpsxds f0, f0
207 ; CHECK-P9-NEXT: mffprd r3, f0
210 ; CHECK-P8-LABEL: ld_disjoint_align32_int64_t_float:
211 ; CHECK-P8: # %bb.0: # %entry
212 ; CHECK-P8-NEXT: lis r4, -15264
213 ; CHECK-P8-NEXT: lis r5, 15258
214 ; CHECK-P8-NEXT: and r3, r3, r4
215 ; CHECK-P8-NEXT: ori r4, r5, 41712
216 ; CHECK-P8-NEXT: lfsx f0, r3, r4
217 ; CHECK-P8-NEXT: xscvdpsxds f0, f0
218 ; CHECK-P8-NEXT: mffprd r3, f0
221 %and = and i64 %ptr, -1000341504
222 %or = or i64 %and, 999990000
223 %0 = inttoptr i64 %or to ptr
224 %1 = load float, ptr %0, align 16
225 %conv = fptosi float %1 to i64
229 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
230 define dso_local i64 @ld_not_disjoint64_int64_t_float(i64 %ptr) {
231 ; CHECK-P10-LABEL: ld_not_disjoint64_int64_t_float:
232 ; CHECK-P10: # %bb.0: # %entry
233 ; CHECK-P10-NEXT: pli r4, 232
234 ; CHECK-P10-NEXT: pli r5, 3567587329
235 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
236 ; CHECK-P10-NEXT: or r3, r3, r5
237 ; CHECK-P10-NEXT: lfs f0, 0(r3)
238 ; CHECK-P10-NEXT: xscvdpsxds f0, f0
239 ; CHECK-P10-NEXT: mffprd r3, f0
240 ; CHECK-P10-NEXT: blr
242 ; CHECK-PREP10-LABEL: ld_not_disjoint64_int64_t_float:
243 ; CHECK-PREP10: # %bb.0: # %entry
244 ; CHECK-PREP10-NEXT: li r4, 29
245 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
246 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
247 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
248 ; CHECK-PREP10-NEXT: or r3, r3, r4
249 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
250 ; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
251 ; CHECK-PREP10-NEXT: mffprd r3, f0
252 ; CHECK-PREP10-NEXT: blr
254 %or = or i64 %ptr, 1000000000001
255 %0 = inttoptr i64 %or to ptr
256 %1 = load float, ptr %0, align 4
257 %conv = fptosi float %1 to i64
261 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
262 define dso_local i64 @ld_disjoint_align64_int64_t_float(i64 %ptr) {
263 ; CHECK-P10-LABEL: ld_disjoint_align64_int64_t_float:
264 ; CHECK-P10: # %bb.0: # %entry
265 ; CHECK-P10-NEXT: pli r4, 244140625
266 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
267 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
268 ; CHECK-P10-NEXT: lfsx f0, r3, r4
269 ; CHECK-P10-NEXT: xscvdpsxds f0, f0
270 ; CHECK-P10-NEXT: mffprd r3, f0
271 ; CHECK-P10-NEXT: blr
273 ; CHECK-PREP10-LABEL: ld_disjoint_align64_int64_t_float:
274 ; CHECK-PREP10: # %bb.0: # %entry
275 ; CHECK-PREP10-NEXT: lis r4, 3725
276 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
277 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
278 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
279 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
280 ; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
281 ; CHECK-PREP10-NEXT: mffprd r3, f0
282 ; CHECK-PREP10-NEXT: blr
284 %and = and i64 %ptr, -1099511627776
285 %or = or i64 %and, 1000000000000
286 %0 = inttoptr i64 %or to ptr
287 %1 = load float, ptr %0, align 4096
288 %conv = fptosi float %1 to i64
292 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
293 define dso_local i64 @ld_cst_align16_int64_t_float() {
294 ; CHECK-LABEL: ld_cst_align16_int64_t_float:
295 ; CHECK: # %bb.0: # %entry
296 ; CHECK-NEXT: lfs f0, 4080(0)
297 ; CHECK-NEXT: xscvdpsxds f0, f0
298 ; CHECK-NEXT: mffprd r3, f0
301 %0 = load float, ptr inttoptr (i64 4080 to ptr), align 16
302 %conv = fptosi float %0 to i64
306 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
307 define dso_local i64 @ld_cst_align32_int64_t_float() {
308 ; CHECK-LABEL: ld_cst_align32_int64_t_float:
309 ; CHECK: # %bb.0: # %entry
310 ; CHECK-NEXT: lis r3, 153
311 ; CHECK-NEXT: lfs f0, -27108(r3)
312 ; CHECK-NEXT: xscvdpsxds f0, f0
313 ; CHECK-NEXT: mffprd r3, f0
316 %0 = load float, ptr inttoptr (i64 9999900 to ptr), align 4
317 %conv = fptosi float %0 to i64
321 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
322 define dso_local i64 @ld_cst_align64_int64_t_float() {
323 ; CHECK-P10-LABEL: ld_cst_align64_int64_t_float:
324 ; CHECK-P10: # %bb.0: # %entry
325 ; CHECK-P10-NEXT: pli r3, 244140625
326 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
327 ; CHECK-P10-NEXT: lfs f0, 0(r3)
328 ; CHECK-P10-NEXT: xscvdpsxds f0, f0
329 ; CHECK-P10-NEXT: mffprd r3, f0
330 ; CHECK-P10-NEXT: blr
332 ; CHECK-PREP10-LABEL: ld_cst_align64_int64_t_float:
333 ; CHECK-PREP10: # %bb.0: # %entry
334 ; CHECK-PREP10-NEXT: lis r3, 3725
335 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
336 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
337 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
338 ; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
339 ; CHECK-PREP10-NEXT: mffprd r3, f0
340 ; CHECK-PREP10-NEXT: blr
342 %0 = load float, ptr inttoptr (i64 1000000000000 to ptr), align 4096
343 %conv = fptosi float %0 to i64
347 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
348 define dso_local i64 @ld_0_int64_t_double(i64 %ptr) {
349 ; CHECK-LABEL: ld_0_int64_t_double:
350 ; CHECK: # %bb.0: # %entry
351 ; CHECK-NEXT: lfd f0, 0(r3)
352 ; CHECK-NEXT: xscvdpsxds f0, f0
353 ; CHECK-NEXT: mffprd r3, f0
356 %0 = inttoptr i64 %ptr to ptr
357 %1 = load double, ptr %0, align 8
358 %conv = fptosi double %1 to i64
362 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
363 define dso_local i64 @ld_align16_int64_t_double(ptr nocapture readonly %ptr) {
364 ; CHECK-LABEL: ld_align16_int64_t_double:
365 ; CHECK: # %bb.0: # %entry
366 ; CHECK-NEXT: lfd f0, 8(r3)
367 ; CHECK-NEXT: xscvdpsxds f0, f0
368 ; CHECK-NEXT: mffprd r3, f0
371 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
372 %0 = load double, ptr %add.ptr, align 8
373 %conv = fptosi double %0 to i64
377 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
378 define dso_local i64 @ld_align32_int64_t_double(ptr nocapture readonly %ptr) {
379 ; CHECK-P10-LABEL: ld_align32_int64_t_double:
380 ; CHECK-P10: # %bb.0: # %entry
381 ; CHECK-P10-NEXT: plfd f0, 99999000(r3), 0
382 ; CHECK-P10-NEXT: xscvdpsxds f0, f0
383 ; CHECK-P10-NEXT: mffprd r3, f0
384 ; CHECK-P10-NEXT: blr
386 ; CHECK-PREP10-LABEL: ld_align32_int64_t_double:
387 ; CHECK-PREP10: # %bb.0: # %entry
388 ; CHECK-PREP10-NEXT: lis r4, 1525
389 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
390 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
391 ; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
392 ; CHECK-PREP10-NEXT: mffprd r3, f0
393 ; CHECK-PREP10-NEXT: blr
395 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
396 %0 = load double, ptr %add.ptr, align 8
397 %conv = fptosi double %0 to i64
401 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
402 define dso_local i64 @ld_align64_int64_t_double(ptr nocapture readonly %ptr) {
403 ; CHECK-P10-LABEL: ld_align64_int64_t_double:
404 ; CHECK-P10: # %bb.0: # %entry
405 ; CHECK-P10-NEXT: pli r4, 244140625
406 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
407 ; CHECK-P10-NEXT: lfdx f0, r3, r4
408 ; CHECK-P10-NEXT: xscvdpsxds f0, f0
409 ; CHECK-P10-NEXT: mffprd r3, f0
410 ; CHECK-P10-NEXT: blr
412 ; CHECK-PREP10-LABEL: ld_align64_int64_t_double:
413 ; CHECK-PREP10: # %bb.0: # %entry
414 ; CHECK-PREP10-NEXT: lis r4, 3725
415 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
416 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
417 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
418 ; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
419 ; CHECK-PREP10-NEXT: mffprd r3, f0
420 ; CHECK-PREP10-NEXT: blr
422 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
423 %0 = load double, ptr %add.ptr, align 8
424 %conv = fptosi double %0 to i64
428 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
429 define dso_local i64 @ld_reg_int64_t_double(ptr nocapture readonly %ptr, i64 %off) {
430 ; CHECK-LABEL: ld_reg_int64_t_double:
431 ; CHECK: # %bb.0: # %entry
432 ; CHECK-NEXT: lfdx f0, r3, r4
433 ; CHECK-NEXT: xscvdpsxds f0, f0
434 ; CHECK-NEXT: mffprd r3, f0
437 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
438 %0 = load double, ptr %add.ptr, align 8
439 %conv = fptosi double %0 to i64
443 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
444 define dso_local i64 @ld_or_int64_t_double(i64 %ptr, i8 zeroext %off) {
445 ; CHECK-LABEL: ld_or_int64_t_double:
446 ; CHECK: # %bb.0: # %entry
447 ; CHECK-NEXT: or r3, r4, r3
448 ; CHECK-NEXT: lfd f0, 0(r3)
449 ; CHECK-NEXT: xscvdpsxds f0, f0
450 ; CHECK-NEXT: mffprd r3, f0
453 %conv = zext i8 %off to i64
454 %or = or i64 %conv, %ptr
455 %0 = inttoptr i64 %or to ptr
456 %1 = load double, ptr %0, align 8
457 %conv1 = fptosi double %1 to i64
461 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
462 define dso_local i64 @ld_not_disjoint16_int64_t_double(i64 %ptr) {
463 ; CHECK-LABEL: ld_not_disjoint16_int64_t_double:
464 ; CHECK: # %bb.0: # %entry
465 ; CHECK-NEXT: ori r3, r3, 6
466 ; CHECK-NEXT: lfd f0, 0(r3)
467 ; CHECK-NEXT: xscvdpsxds f0, f0
468 ; CHECK-NEXT: mffprd r3, f0
472 %0 = inttoptr i64 %or to ptr
473 %1 = load double, ptr %0, align 8
474 %conv = fptosi double %1 to i64
478 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
479 define dso_local i64 @ld_disjoint_align16_int64_t_double(i64 %ptr) {
480 ; CHECK-LABEL: ld_disjoint_align16_int64_t_double:
481 ; CHECK: # %bb.0: # %entry
482 ; CHECK-NEXT: rldicr r3, r3, 0, 51
483 ; CHECK-NEXT: lfd f0, 24(r3)
484 ; CHECK-NEXT: xscvdpsxds f0, f0
485 ; CHECK-NEXT: mffprd r3, f0
488 %and = and i64 %ptr, -4096
489 %or = or i64 %and, 24
490 %0 = inttoptr i64 %or to ptr
491 %1 = load double, ptr %0, align 8
492 %conv = fptosi double %1 to i64
496 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
497 define dso_local i64 @ld_not_disjoint32_int64_t_double(i64 %ptr) {
498 ; CHECK-LABEL: ld_not_disjoint32_int64_t_double:
499 ; CHECK: # %bb.0: # %entry
500 ; CHECK-NEXT: ori r3, r3, 34463
501 ; CHECK-NEXT: oris r3, r3, 1
502 ; CHECK-NEXT: lfd f0, 0(r3)
503 ; CHECK-NEXT: xscvdpsxds f0, f0
504 ; CHECK-NEXT: mffprd r3, f0
507 %or = or i64 %ptr, 99999
508 %0 = inttoptr i64 %or to ptr
509 %1 = load double, ptr %0, align 8
510 %conv = fptosi double %1 to i64
514 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
515 define dso_local i64 @ld_disjoint_align32_int64_t_double(i64 %ptr) {
516 ; CHECK-P10-LABEL: ld_disjoint_align32_int64_t_double:
517 ; CHECK-P10: # %bb.0: # %entry
518 ; CHECK-P10-NEXT: lis r4, -15264
519 ; CHECK-P10-NEXT: and r3, r3, r4
520 ; CHECK-P10-NEXT: plfd f0, 999990000(r3), 0
521 ; CHECK-P10-NEXT: xscvdpsxds f0, f0
522 ; CHECK-P10-NEXT: mffprd r3, f0
523 ; CHECK-P10-NEXT: blr
525 ; CHECK-P9-LABEL: ld_disjoint_align32_int64_t_double:
526 ; CHECK-P9: # %bb.0: # %entry
527 ; CHECK-P9-NEXT: lis r4, -15264
528 ; CHECK-P9-NEXT: and r3, r3, r4
529 ; CHECK-P9-NEXT: lis r4, 15258
530 ; CHECK-P9-NEXT: ori r4, r4, 41712
531 ; CHECK-P9-NEXT: lfdx f0, r3, r4
532 ; CHECK-P9-NEXT: xscvdpsxds f0, f0
533 ; CHECK-P9-NEXT: mffprd r3, f0
536 ; CHECK-P8-LABEL: ld_disjoint_align32_int64_t_double:
537 ; CHECK-P8: # %bb.0: # %entry
538 ; CHECK-P8-NEXT: lis r4, -15264
539 ; CHECK-P8-NEXT: lis r5, 15258
540 ; CHECK-P8-NEXT: and r3, r3, r4
541 ; CHECK-P8-NEXT: ori r4, r5, 41712
542 ; CHECK-P8-NEXT: lfdx f0, r3, r4
543 ; CHECK-P8-NEXT: xscvdpsxds f0, f0
544 ; CHECK-P8-NEXT: mffprd r3, f0
547 %and = and i64 %ptr, -1000341504
548 %or = or i64 %and, 999990000
549 %0 = inttoptr i64 %or to ptr
550 %1 = load double, ptr %0, align 16
551 %conv = fptosi double %1 to i64
555 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
556 define dso_local i64 @ld_not_disjoint64_int64_t_double(i64 %ptr) {
557 ; CHECK-P10-LABEL: ld_not_disjoint64_int64_t_double:
558 ; CHECK-P10: # %bb.0: # %entry
559 ; CHECK-P10-NEXT: pli r4, 232
560 ; CHECK-P10-NEXT: pli r5, 3567587329
561 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
562 ; CHECK-P10-NEXT: or r3, r3, r5
563 ; CHECK-P10-NEXT: lfd f0, 0(r3)
564 ; CHECK-P10-NEXT: xscvdpsxds f0, f0
565 ; CHECK-P10-NEXT: mffprd r3, f0
566 ; CHECK-P10-NEXT: blr
568 ; CHECK-PREP10-LABEL: ld_not_disjoint64_int64_t_double:
569 ; CHECK-PREP10: # %bb.0: # %entry
570 ; CHECK-PREP10-NEXT: li r4, 29
571 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
572 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
573 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
574 ; CHECK-PREP10-NEXT: or r3, r3, r4
575 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
576 ; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
577 ; CHECK-PREP10-NEXT: mffprd r3, f0
578 ; CHECK-PREP10-NEXT: blr
580 %or = or i64 %ptr, 1000000000001
581 %0 = inttoptr i64 %or to ptr
582 %1 = load double, ptr %0, align 8
583 %conv = fptosi double %1 to i64
587 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
588 define dso_local i64 @ld_disjoint_align64_int64_t_double(i64 %ptr) {
589 ; CHECK-P10-LABEL: ld_disjoint_align64_int64_t_double:
590 ; CHECK-P10: # %bb.0: # %entry
591 ; CHECK-P10-NEXT: pli r4, 244140625
592 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
593 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
594 ; CHECK-P10-NEXT: lfdx f0, r3, r4
595 ; CHECK-P10-NEXT: xscvdpsxds f0, f0
596 ; CHECK-P10-NEXT: mffprd r3, f0
597 ; CHECK-P10-NEXT: blr
599 ; CHECK-PREP10-LABEL: ld_disjoint_align64_int64_t_double:
600 ; CHECK-PREP10: # %bb.0: # %entry
601 ; CHECK-PREP10-NEXT: lis r4, 3725
602 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
603 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
604 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
605 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
606 ; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
607 ; CHECK-PREP10-NEXT: mffprd r3, f0
608 ; CHECK-PREP10-NEXT: blr
610 %and = and i64 %ptr, -1099511627776
611 %or = or i64 %and, 1000000000000
612 %0 = inttoptr i64 %or to ptr
613 %1 = load double, ptr %0, align 4096
614 %conv = fptosi double %1 to i64
618 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
619 define dso_local i64 @ld_cst_align16_int64_t_double() {
620 ; CHECK-LABEL: ld_cst_align16_int64_t_double:
621 ; CHECK: # %bb.0: # %entry
622 ; CHECK-NEXT: lfd f0, 4080(0)
623 ; CHECK-NEXT: xscvdpsxds f0, f0
624 ; CHECK-NEXT: mffprd r3, f0
627 %0 = load double, ptr inttoptr (i64 4080 to ptr), align 16
628 %conv = fptosi double %0 to i64
632 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
633 define dso_local i64 @ld_cst_align32_int64_t_double() {
634 ; CHECK-LABEL: ld_cst_align32_int64_t_double:
635 ; CHECK: # %bb.0: # %entry
636 ; CHECK-NEXT: lis r3, 153
637 ; CHECK-NEXT: lfd f0, -27108(r3)
638 ; CHECK-NEXT: xscvdpsxds f0, f0
639 ; CHECK-NEXT: mffprd r3, f0
642 %0 = load double, ptr inttoptr (i64 9999900 to ptr), align 8
643 %conv = fptosi double %0 to i64
647 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
648 define dso_local i64 @ld_cst_align64_int64_t_double() {
649 ; CHECK-P10-LABEL: ld_cst_align64_int64_t_double:
650 ; CHECK-P10: # %bb.0: # %entry
651 ; CHECK-P10-NEXT: pli r3, 244140625
652 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
653 ; CHECK-P10-NEXT: lfd f0, 0(r3)
654 ; CHECK-P10-NEXT: xscvdpsxds f0, f0
655 ; CHECK-P10-NEXT: mffprd r3, f0
656 ; CHECK-P10-NEXT: blr
658 ; CHECK-PREP10-LABEL: ld_cst_align64_int64_t_double:
659 ; CHECK-PREP10: # %bb.0: # %entry
660 ; CHECK-PREP10-NEXT: lis r3, 3725
661 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
662 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
663 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
664 ; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
665 ; CHECK-PREP10-NEXT: mffprd r3, f0
666 ; CHECK-PREP10-NEXT: blr
668 %0 = load double, ptr inttoptr (i64 1000000000000 to ptr), align 4096
669 %conv = fptosi double %0 to i64
673 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
674 define dso_local i64 @ld_0_uint64_t_uint8_t(i64 %ptr) {
675 ; CHECK-LABEL: ld_0_uint64_t_uint8_t:
676 ; CHECK: # %bb.0: # %entry
677 ; CHECK-NEXT: lbz r3, 0(r3)
680 %0 = inttoptr i64 %ptr to ptr
681 %1 = load i8, ptr %0, align 1
682 %conv = zext i8 %1 to i64
686 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
687 define dso_local i64 @ld_unalign16_uint64_t_uint8_t(ptr nocapture readonly %ptr) {
688 ; CHECK-LABEL: ld_unalign16_uint64_t_uint8_t:
689 ; CHECK: # %bb.0: # %entry
690 ; CHECK-NEXT: lbz r3, 1(r3)
693 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1
694 %0 = load i8, ptr %add.ptr, align 1
695 %conv = zext i8 %0 to i64
699 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
700 define dso_local i64 @ld_align16_uint64_t_uint8_t(ptr nocapture readonly %ptr) {
701 ; CHECK-LABEL: ld_align16_uint64_t_uint8_t:
702 ; CHECK: # %bb.0: # %entry
703 ; CHECK-NEXT: lbz r3, 8(r3)
706 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
707 %0 = load i8, ptr %add.ptr, align 1
708 %conv = zext i8 %0 to i64
712 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
713 define dso_local i64 @ld_unalign32_uint64_t_uint8_t(ptr nocapture readonly %ptr) {
714 ; CHECK-P10-LABEL: ld_unalign32_uint64_t_uint8_t:
715 ; CHECK-P10: # %bb.0: # %entry
716 ; CHECK-P10-NEXT: plbz r3, 99999(r3), 0
717 ; CHECK-P10-NEXT: blr
719 ; CHECK-PREP10-LABEL: ld_unalign32_uint64_t_uint8_t:
720 ; CHECK-PREP10: # %bb.0: # %entry
721 ; CHECK-PREP10-NEXT: lis r4, 1
722 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
723 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
724 ; CHECK-PREP10-NEXT: blr
726 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999
727 %0 = load i8, ptr %add.ptr, align 1
728 %conv = zext i8 %0 to i64
732 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
733 define dso_local i64 @ld_align32_uint64_t_uint8_t(ptr nocapture readonly %ptr) {
734 ; CHECK-P10-LABEL: ld_align32_uint64_t_uint8_t:
735 ; CHECK-P10: # %bb.0: # %entry
736 ; CHECK-P10-NEXT: plbz r3, 99999000(r3), 0
737 ; CHECK-P10-NEXT: blr
739 ; CHECK-PREP10-LABEL: ld_align32_uint64_t_uint8_t:
740 ; CHECK-PREP10: # %bb.0: # %entry
741 ; CHECK-PREP10-NEXT: lis r4, 1525
742 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
743 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
744 ; CHECK-PREP10-NEXT: blr
746 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
747 %0 = load i8, ptr %add.ptr, align 1
748 %conv = zext i8 %0 to i64
752 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
753 define dso_local i64 @ld_unalign64_uint64_t_uint8_t(ptr nocapture readonly %ptr) {
754 ; CHECK-P10-LABEL: ld_unalign64_uint64_t_uint8_t:
755 ; CHECK-P10: # %bb.0: # %entry
756 ; CHECK-P10-NEXT: pli r4, 232
757 ; CHECK-P10-NEXT: pli r5, 3567587329
758 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
759 ; CHECK-P10-NEXT: lbzx r3, r3, r5
760 ; CHECK-P10-NEXT: blr
762 ; CHECK-PREP10-LABEL: ld_unalign64_uint64_t_uint8_t:
763 ; CHECK-PREP10: # %bb.0: # %entry
764 ; CHECK-PREP10-NEXT: li r4, 29
765 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
766 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
767 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
768 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
769 ; CHECK-PREP10-NEXT: blr
771 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000001
772 %0 = load i8, ptr %add.ptr, align 1
773 %conv = zext i8 %0 to i64
777 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
778 define dso_local i64 @ld_align64_uint64_t_uint8_t(ptr nocapture readonly %ptr) {
779 ; CHECK-P10-LABEL: ld_align64_uint64_t_uint8_t:
780 ; CHECK-P10: # %bb.0: # %entry
781 ; CHECK-P10-NEXT: pli r4, 244140625
782 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
783 ; CHECK-P10-NEXT: lbzx r3, r3, r4
784 ; CHECK-P10-NEXT: blr
786 ; CHECK-PREP10-LABEL: ld_align64_uint64_t_uint8_t:
787 ; CHECK-PREP10: # %bb.0: # %entry
788 ; CHECK-PREP10-NEXT: lis r4, 3725
789 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
790 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
791 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
792 ; CHECK-PREP10-NEXT: blr
794 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
795 %0 = load i8, ptr %add.ptr, align 1
796 %conv = zext i8 %0 to i64
800 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
801 define dso_local i64 @ld_reg_uint64_t_uint8_t(ptr nocapture readonly %ptr, i64 %off) {
802 ; CHECK-LABEL: ld_reg_uint64_t_uint8_t:
803 ; CHECK: # %bb.0: # %entry
804 ; CHECK-NEXT: lbzx r3, r3, r4
807 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
808 %0 = load i8, ptr %add.ptr, align 1
809 %conv = zext i8 %0 to i64
813 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
814 define dso_local i64 @ld_or_uint64_t_uint8_t(i64 %ptr, i8 zeroext %off) {
815 ; CHECK-LABEL: ld_or_uint64_t_uint8_t:
816 ; CHECK: # %bb.0: # %entry
817 ; CHECK-NEXT: or r3, r4, r3
818 ; CHECK-NEXT: lbz r3, 0(r3)
821 %conv = zext i8 %off to i64
822 %or = or i64 %conv, %ptr
823 %0 = inttoptr i64 %or to ptr
824 %1 = load i8, ptr %0, align 1
825 %conv1 = zext i8 %1 to i64
829 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
830 define dso_local i64 @ld_or2_uint64_t_uint8_t(i64 %ptr, i8 zeroext %off) {
831 ; CHECK-LABEL: ld_or2_uint64_t_uint8_t:
832 ; CHECK: # %bb.0: # %entry
833 ; CHECK-NEXT: rldicr r3, r3, 0, 51
834 ; CHECK-NEXT: lbzx r3, r3, r4
837 %and = and i64 %ptr, -4096
838 %conv = zext i8 %off to i64
839 %or = or i64 %and, %conv
840 %0 = inttoptr i64 %or to ptr
841 %1 = load i8, ptr %0, align 1
842 %conv1 = zext i8 %1 to i64
846 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
847 define dso_local i64 @ld_not_disjoint16_uint64_t_uint8_t(i64 %ptr) {
848 ; CHECK-LABEL: ld_not_disjoint16_uint64_t_uint8_t:
849 ; CHECK: # %bb.0: # %entry
850 ; CHECK-NEXT: ori r3, r3, 6
851 ; CHECK-NEXT: lbz r3, 0(r3)
855 %0 = inttoptr i64 %or to ptr
856 %1 = load i8, ptr %0, align 1
857 %conv = zext i8 %1 to i64
861 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
862 define dso_local i64 @ld_disjoint_unalign16_uint64_t_uint8_t(i64 %ptr) {
863 ; CHECK-LABEL: ld_disjoint_unalign16_uint64_t_uint8_t:
864 ; CHECK: # %bb.0: # %entry
865 ; CHECK-NEXT: rldicr r3, r3, 0, 51
866 ; CHECK-NEXT: lbz r3, 6(r3)
869 %and = and i64 %ptr, -4096
871 %0 = inttoptr i64 %or to ptr
872 %1 = load i8, ptr %0, align 2
873 %conv = zext i8 %1 to i64
877 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
878 define dso_local i64 @ld_disjoint_align16_uint64_t_uint8_t(i64 %ptr) {
879 ; CHECK-LABEL: ld_disjoint_align16_uint64_t_uint8_t:
880 ; CHECK: # %bb.0: # %entry
881 ; CHECK-NEXT: rldicr r3, r3, 0, 51
882 ; CHECK-NEXT: lbz r3, 24(r3)
885 %and = and i64 %ptr, -4096
886 %or = or i64 %and, 24
887 %0 = inttoptr i64 %or to ptr
888 %1 = load i8, ptr %0, align 8
889 %conv = zext i8 %1 to i64
893 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
894 define dso_local i64 @ld_not_disjoint32_uint64_t_uint8_t(i64 %ptr) {
895 ; CHECK-LABEL: ld_not_disjoint32_uint64_t_uint8_t:
896 ; CHECK: # %bb.0: # %entry
897 ; CHECK-NEXT: ori r3, r3, 34463
898 ; CHECK-NEXT: oris r3, r3, 1
899 ; CHECK-NEXT: lbz r3, 0(r3)
902 %or = or i64 %ptr, 99999
903 %0 = inttoptr i64 %or to ptr
904 %1 = load i8, ptr %0, align 1
905 %conv = zext i8 %1 to i64
909 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
910 define dso_local i64 @ld_disjoint_unalign32_uint64_t_uint8_t(i64 %ptr) {
911 ; CHECK-P10-LABEL: ld_disjoint_unalign32_uint64_t_uint8_t:
912 ; CHECK-P10: # %bb.0: # %entry
913 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
914 ; CHECK-P10-NEXT: plbz r3, 99999(r3), 0
915 ; CHECK-P10-NEXT: blr
917 ; CHECK-PREP10-LABEL: ld_disjoint_unalign32_uint64_t_uint8_t:
918 ; CHECK-PREP10: # %bb.0: # %entry
919 ; CHECK-PREP10-NEXT: lis r4, 1
920 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
921 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
922 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
923 ; CHECK-PREP10-NEXT: blr
925 %and = and i64 %ptr, -1048576
926 %or = or i64 %and, 99999
927 %0 = inttoptr i64 %or to ptr
928 %1 = load i8, ptr %0, align 1
929 %conv = zext i8 %1 to i64
933 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
934 define dso_local i64 @ld_disjoint_align32_uint64_t_uint8_t(i64 %ptr) {
935 ; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_uint8_t:
936 ; CHECK-P10: # %bb.0: # %entry
937 ; CHECK-P10-NEXT: lis r4, -15264
938 ; CHECK-P10-NEXT: and r3, r3, r4
939 ; CHECK-P10-NEXT: plbz r3, 999990000(r3), 0
940 ; CHECK-P10-NEXT: blr
942 ; CHECK-P9-LABEL: ld_disjoint_align32_uint64_t_uint8_t:
943 ; CHECK-P9: # %bb.0: # %entry
944 ; CHECK-P9-NEXT: lis r4, -15264
945 ; CHECK-P9-NEXT: and r3, r3, r4
946 ; CHECK-P9-NEXT: lis r4, 15258
947 ; CHECK-P9-NEXT: ori r4, r4, 41712
948 ; CHECK-P9-NEXT: lbzx r3, r3, r4
951 ; CHECK-P8-LABEL: ld_disjoint_align32_uint64_t_uint8_t:
952 ; CHECK-P8: # %bb.0: # %entry
953 ; CHECK-P8-NEXT: lis r4, -15264
954 ; CHECK-P8-NEXT: lis r5, 15258
955 ; CHECK-P8-NEXT: and r3, r3, r4
956 ; CHECK-P8-NEXT: ori r4, r5, 41712
957 ; CHECK-P8-NEXT: lbzx r3, r3, r4
960 %and = and i64 %ptr, -1000341504
961 %or = or i64 %and, 999990000
962 %0 = inttoptr i64 %or to ptr
963 %1 = load i8, ptr %0, align 16
964 %conv = zext i8 %1 to i64
968 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
969 define dso_local i64 @ld_not_disjoint64_uint64_t_uint8_t(i64 %ptr) {
970 ; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_uint8_t:
971 ; CHECK-P10: # %bb.0: # %entry
972 ; CHECK-P10-NEXT: pli r4, 232
973 ; CHECK-P10-NEXT: pli r5, 3567587329
974 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
975 ; CHECK-P10-NEXT: or r3, r3, r5
976 ; CHECK-P10-NEXT: lbz r3, 0(r3)
977 ; CHECK-P10-NEXT: blr
979 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_uint8_t:
980 ; CHECK-PREP10: # %bb.0: # %entry
981 ; CHECK-PREP10-NEXT: li r4, 29
982 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
983 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
984 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
985 ; CHECK-PREP10-NEXT: or r3, r3, r4
986 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
987 ; CHECK-PREP10-NEXT: blr
989 %or = or i64 %ptr, 1000000000001
990 %0 = inttoptr i64 %or to ptr
991 %1 = load i8, ptr %0, align 1
992 %conv = zext i8 %1 to i64
996 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
997 define dso_local i64 @ld_disjoint_unalign64_uint64_t_uint8_t(i64 %ptr) {
998 ; CHECK-P10-LABEL: ld_disjoint_unalign64_uint64_t_uint8_t:
999 ; CHECK-P10: # %bb.0: # %entry
1000 ; CHECK-P10-NEXT: pli r4, 232
1001 ; CHECK-P10-NEXT: pli r5, 3567587329
1002 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
1003 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
1004 ; CHECK-P10-NEXT: lbzx r3, r3, r5
1005 ; CHECK-P10-NEXT: blr
1007 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint64_t_uint8_t:
1008 ; CHECK-PREP10: # %bb.0: # %entry
1009 ; CHECK-PREP10-NEXT: li r4, 29
1010 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
1011 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
1012 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
1013 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
1014 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
1015 ; CHECK-PREP10-NEXT: blr
1017 %and = and i64 %ptr, -1099511627776
1018 %or = or i64 %and, 1000000000001
1019 %0 = inttoptr i64 %or to ptr
1020 %1 = load i8, ptr %0, align 1
1021 %conv = zext i8 %1 to i64
1025 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1026 define dso_local i64 @ld_disjoint_align64_uint64_t_uint8_t(i64 %ptr) {
1027 ; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_uint8_t:
1028 ; CHECK-P10: # %bb.0: # %entry
1029 ; CHECK-P10-NEXT: pli r4, 244140625
1030 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
1031 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
1032 ; CHECK-P10-NEXT: lbzx r3, r3, r4
1033 ; CHECK-P10-NEXT: blr
1035 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_uint8_t:
1036 ; CHECK-PREP10: # %bb.0: # %entry
1037 ; CHECK-PREP10-NEXT: lis r4, 3725
1038 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
1039 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
1040 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
1041 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
1042 ; CHECK-PREP10-NEXT: blr
1044 %and = and i64 %ptr, -1099511627776
1045 %or = or i64 %and, 1000000000000
1046 %0 = inttoptr i64 %or to ptr
1047 %1 = load i8, ptr %0, align 4096
1048 %conv = zext i8 %1 to i64
1052 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1053 define dso_local i64 @ld_cst_unalign16_uint64_t_uint8_t() {
1054 ; CHECK-LABEL: ld_cst_unalign16_uint64_t_uint8_t:
1055 ; CHECK: # %bb.0: # %entry
1056 ; CHECK-NEXT: lbz r3, 255(0)
1059 %0 = load i8, ptr inttoptr (i64 255 to ptr), align 1
1060 %conv = zext i8 %0 to i64
1064 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1065 define dso_local i64 @ld_cst_align16_uint64_t_uint8_t() {
1066 ; CHECK-LABEL: ld_cst_align16_uint64_t_uint8_t:
1067 ; CHECK: # %bb.0: # %entry
1068 ; CHECK-NEXT: lbz r3, 4080(0)
1071 %0 = load i8, ptr inttoptr (i64 4080 to ptr), align 16
1072 %conv = zext i8 %0 to i64
1076 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1077 define dso_local i64 @ld_cst_unalign32_uint64_t_uint8_t() {
1078 ; CHECK-LABEL: ld_cst_unalign32_uint64_t_uint8_t:
1079 ; CHECK: # %bb.0: # %entry
1080 ; CHECK-NEXT: lis r3, 2
1081 ; CHECK-NEXT: lbz r3, -31073(r3)
1084 %0 = load i8, ptr inttoptr (i64 99999 to ptr), align 1
1085 %conv = zext i8 %0 to i64
1089 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1090 define dso_local i64 @ld_cst_align32_uint64_t_uint8_t() {
1091 ; CHECK-LABEL: ld_cst_align32_uint64_t_uint8_t:
1092 ; CHECK: # %bb.0: # %entry
1093 ; CHECK-NEXT: lis r3, 153
1094 ; CHECK-NEXT: lbz r3, -27108(r3)
1097 %0 = load i8, ptr inttoptr (i64 9999900 to ptr), align 4
1098 %conv = zext i8 %0 to i64
1102 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1103 define dso_local i64 @ld_cst_unalign64_uint64_t_uint8_t() {
1104 ; CHECK-P10-LABEL: ld_cst_unalign64_uint64_t_uint8_t:
1105 ; CHECK-P10: # %bb.0: # %entry
1106 ; CHECK-P10-NEXT: pli r3, 232
1107 ; CHECK-P10-NEXT: pli r4, 3567587329
1108 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
1109 ; CHECK-P10-NEXT: lbz r3, 0(r4)
1110 ; CHECK-P10-NEXT: blr
1112 ; CHECK-PREP10-LABEL: ld_cst_unalign64_uint64_t_uint8_t:
1113 ; CHECK-PREP10: # %bb.0: # %entry
1114 ; CHECK-PREP10-NEXT: li r3, 29
1115 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
1116 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
1117 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
1118 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
1119 ; CHECK-PREP10-NEXT: blr
1121 %0 = load i8, ptr inttoptr (i64 1000000000001 to ptr), align 1
1122 %conv = zext i8 %0 to i64
1126 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1127 define dso_local i64 @ld_cst_align64_uint64_t_uint8_t() {
1128 ; CHECK-P10-LABEL: ld_cst_align64_uint64_t_uint8_t:
1129 ; CHECK-P10: # %bb.0: # %entry
1130 ; CHECK-P10-NEXT: pli r3, 244140625
1131 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
1132 ; CHECK-P10-NEXT: lbz r3, 0(r3)
1133 ; CHECK-P10-NEXT: blr
1135 ; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_uint8_t:
1136 ; CHECK-PREP10: # %bb.0: # %entry
1137 ; CHECK-PREP10-NEXT: lis r3, 3725
1138 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
1139 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
1140 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
1141 ; CHECK-PREP10-NEXT: blr
1143 %0 = load i8, ptr inttoptr (i64 1000000000000 to ptr), align 4096
1144 %conv = zext i8 %0 to i64
1148 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1149 define dso_local i64 @ld_0_uint64_t_int8_t(i64 %ptr) {
1150 ; CHECK-LABEL: ld_0_uint64_t_int8_t:
1151 ; CHECK: # %bb.0: # %entry
1152 ; CHECK-NEXT: lbz r3, 0(r3)
1153 ; CHECK-NEXT: extsb r3, r3
1156 %0 = inttoptr i64 %ptr to ptr
1157 %1 = load i8, ptr %0, align 1
1158 %conv = sext i8 %1 to i64
1162 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1163 define dso_local i64 @ld_unalign16_uint64_t_int8_t(ptr nocapture readonly %ptr) {
1164 ; CHECK-LABEL: ld_unalign16_uint64_t_int8_t:
1165 ; CHECK: # %bb.0: # %entry
1166 ; CHECK-NEXT: lbz r3, 1(r3)
1167 ; CHECK-NEXT: extsb r3, r3
1170 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1
1171 %0 = load i8, ptr %add.ptr, align 1
1172 %conv = sext i8 %0 to i64
1176 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1177 define dso_local i64 @ld_align16_uint64_t_int8_t(ptr nocapture readonly %ptr) {
1178 ; CHECK-LABEL: ld_align16_uint64_t_int8_t:
1179 ; CHECK: # %bb.0: # %entry
1180 ; CHECK-NEXT: lbz r3, 8(r3)
1181 ; CHECK-NEXT: extsb r3, r3
1184 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
1185 %0 = load i8, ptr %add.ptr, align 1
1186 %conv = sext i8 %0 to i64
1190 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1191 define dso_local i64 @ld_unalign32_uint64_t_int8_t(ptr nocapture readonly %ptr) {
1192 ; CHECK-P10-LABEL: ld_unalign32_uint64_t_int8_t:
1193 ; CHECK-P10: # %bb.0: # %entry
1194 ; CHECK-P10-NEXT: plbz r3, 99999(r3), 0
1195 ; CHECK-P10-NEXT: extsb r3, r3
1196 ; CHECK-P10-NEXT: blr
1198 ; CHECK-PREP10-LABEL: ld_unalign32_uint64_t_int8_t:
1199 ; CHECK-PREP10: # %bb.0: # %entry
1200 ; CHECK-PREP10-NEXT: lis r4, 1
1201 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
1202 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
1203 ; CHECK-PREP10-NEXT: extsb r3, r3
1204 ; CHECK-PREP10-NEXT: blr
1206 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999
1207 %0 = load i8, ptr %add.ptr, align 1
1208 %conv = sext i8 %0 to i64
1212 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1213 define dso_local i64 @ld_align32_uint64_t_int8_t(ptr nocapture readonly %ptr) {
1214 ; CHECK-P10-LABEL: ld_align32_uint64_t_int8_t:
1215 ; CHECK-P10: # %bb.0: # %entry
1216 ; CHECK-P10-NEXT: plbz r3, 99999000(r3), 0
1217 ; CHECK-P10-NEXT: extsb r3, r3
1218 ; CHECK-P10-NEXT: blr
1220 ; CHECK-PREP10-LABEL: ld_align32_uint64_t_int8_t:
1221 ; CHECK-PREP10: # %bb.0: # %entry
1222 ; CHECK-PREP10-NEXT: lis r4, 1525
1223 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
1224 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
1225 ; CHECK-PREP10-NEXT: extsb r3, r3
1226 ; CHECK-PREP10-NEXT: blr
1228 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
1229 %0 = load i8, ptr %add.ptr, align 1
1230 %conv = sext i8 %0 to i64
1234 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1235 define dso_local i64 @ld_unalign64_uint64_t_int8_t(ptr nocapture readonly %ptr) {
1236 ; CHECK-P10-LABEL: ld_unalign64_uint64_t_int8_t:
1237 ; CHECK-P10: # %bb.0: # %entry
1238 ; CHECK-P10-NEXT: pli r4, 232
1239 ; CHECK-P10-NEXT: pli r5, 3567587329
1240 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
1241 ; CHECK-P10-NEXT: lbzx r3, r3, r5
1242 ; CHECK-P10-NEXT: extsb r3, r3
1243 ; CHECK-P10-NEXT: blr
1245 ; CHECK-PREP10-LABEL: ld_unalign64_uint64_t_int8_t:
1246 ; CHECK-PREP10: # %bb.0: # %entry
1247 ; CHECK-PREP10-NEXT: li r4, 29
1248 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
1249 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
1250 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
1251 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
1252 ; CHECK-PREP10-NEXT: extsb r3, r3
1253 ; CHECK-PREP10-NEXT: blr
1255 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000001
1256 %0 = load i8, ptr %add.ptr, align 1
1257 %conv = sext i8 %0 to i64
1261 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1262 define dso_local i64 @ld_align64_uint64_t_int8_t(ptr nocapture readonly %ptr) {
1263 ; CHECK-P10-LABEL: ld_align64_uint64_t_int8_t:
1264 ; CHECK-P10: # %bb.0: # %entry
1265 ; CHECK-P10-NEXT: pli r4, 244140625
1266 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
1267 ; CHECK-P10-NEXT: lbzx r3, r3, r4
1268 ; CHECK-P10-NEXT: extsb r3, r3
1269 ; CHECK-P10-NEXT: blr
1271 ; CHECK-PREP10-LABEL: ld_align64_uint64_t_int8_t:
1272 ; CHECK-PREP10: # %bb.0: # %entry
1273 ; CHECK-PREP10-NEXT: lis r4, 3725
1274 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
1275 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
1276 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
1277 ; CHECK-PREP10-NEXT: extsb r3, r3
1278 ; CHECK-PREP10-NEXT: blr
1280 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
1281 %0 = load i8, ptr %add.ptr, align 1
1282 %conv = sext i8 %0 to i64
1286 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1287 define dso_local i64 @ld_reg_uint64_t_int8_t(ptr nocapture readonly %ptr, i64 %off) {
1288 ; CHECK-LABEL: ld_reg_uint64_t_int8_t:
1289 ; CHECK: # %bb.0: # %entry
1290 ; CHECK-NEXT: lbzx r3, r3, r4
1291 ; CHECK-NEXT: extsb r3, r3
1294 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
1295 %0 = load i8, ptr %add.ptr, align 1
1296 %conv = sext i8 %0 to i64
1300 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1301 define dso_local i64 @ld_or_uint64_t_int8_t(i64 %ptr, i8 zeroext %off) {
1302 ; CHECK-LABEL: ld_or_uint64_t_int8_t:
1303 ; CHECK: # %bb.0: # %entry
1304 ; CHECK-NEXT: or r3, r4, r3
1305 ; CHECK-NEXT: lbz r3, 0(r3)
1306 ; CHECK-NEXT: extsb r3, r3
1309 %conv = zext i8 %off to i64
1310 %or = or i64 %conv, %ptr
1311 %0 = inttoptr i64 %or to ptr
1312 %1 = load i8, ptr %0, align 1
1313 %conv1 = sext i8 %1 to i64
1317 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1318 define dso_local i64 @ld_or2_uint64_t_int8_t(i64 %ptr, i8 zeroext %off) {
1319 ; CHECK-LABEL: ld_or2_uint64_t_int8_t:
1320 ; CHECK: # %bb.0: # %entry
1321 ; CHECK-NEXT: rldicr r3, r3, 0, 51
1322 ; CHECK-NEXT: lbzx r3, r3, r4
1323 ; CHECK-NEXT: extsb r3, r3
1326 %and = and i64 %ptr, -4096
1327 %conv = zext i8 %off to i64
1328 %or = or i64 %and, %conv
1329 %0 = inttoptr i64 %or to ptr
1330 %1 = load i8, ptr %0, align 1
1331 %conv1 = sext i8 %1 to i64
1335 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1336 define dso_local i64 @ld_not_disjoint16_uint64_t_int8_t(i64 %ptr) {
1337 ; CHECK-LABEL: ld_not_disjoint16_uint64_t_int8_t:
1338 ; CHECK: # %bb.0: # %entry
1339 ; CHECK-NEXT: ori r3, r3, 6
1340 ; CHECK-NEXT: lbz r3, 0(r3)
1341 ; CHECK-NEXT: extsb r3, r3
1344 %or = or i64 %ptr, 6
1345 %0 = inttoptr i64 %or to ptr
1346 %1 = load i8, ptr %0, align 1
1347 %conv = sext i8 %1 to i64
1351 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1352 define dso_local i64 @ld_disjoint_unalign16_uint64_t_int8_t(i64 %ptr) {
1353 ; CHECK-LABEL: ld_disjoint_unalign16_uint64_t_int8_t:
1354 ; CHECK: # %bb.0: # %entry
1355 ; CHECK-NEXT: rldicr r3, r3, 0, 51
1356 ; CHECK-NEXT: lbz r3, 6(r3)
1357 ; CHECK-NEXT: extsb r3, r3
1360 %and = and i64 %ptr, -4096
1361 %or = or i64 %and, 6
1362 %0 = inttoptr i64 %or to ptr
1363 %1 = load i8, ptr %0, align 2
1364 %conv = sext i8 %1 to i64
1368 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1369 define dso_local i64 @ld_disjoint_align16_uint64_t_int8_t(i64 %ptr) {
1370 ; CHECK-LABEL: ld_disjoint_align16_uint64_t_int8_t:
1371 ; CHECK: # %bb.0: # %entry
1372 ; CHECK-NEXT: rldicr r3, r3, 0, 51
1373 ; CHECK-NEXT: lbz r3, 24(r3)
1374 ; CHECK-NEXT: extsb r3, r3
1377 %and = and i64 %ptr, -4096
1378 %or = or i64 %and, 24
1379 %0 = inttoptr i64 %or to ptr
1380 %1 = load i8, ptr %0, align 8
1381 %conv = sext i8 %1 to i64
1385 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1386 define dso_local i64 @ld_not_disjoint32_uint64_t_int8_t(i64 %ptr) {
1387 ; CHECK-LABEL: ld_not_disjoint32_uint64_t_int8_t:
1388 ; CHECK: # %bb.0: # %entry
1389 ; CHECK-NEXT: ori r3, r3, 34463
1390 ; CHECK-NEXT: oris r3, r3, 1
1391 ; CHECK-NEXT: lbz r3, 0(r3)
1392 ; CHECK-NEXT: extsb r3, r3
1395 %or = or i64 %ptr, 99999
1396 %0 = inttoptr i64 %or to ptr
1397 %1 = load i8, ptr %0, align 1
1398 %conv = sext i8 %1 to i64
1402 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1403 define dso_local i64 @ld_disjoint_unalign32_uint64_t_int8_t(i64 %ptr) {
1404 ; CHECK-P10-LABEL: ld_disjoint_unalign32_uint64_t_int8_t:
1405 ; CHECK-P10: # %bb.0: # %entry
1406 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
1407 ; CHECK-P10-NEXT: plbz r3, 99999(r3), 0
1408 ; CHECK-P10-NEXT: extsb r3, r3
1409 ; CHECK-P10-NEXT: blr
1411 ; CHECK-PREP10-LABEL: ld_disjoint_unalign32_uint64_t_int8_t:
1412 ; CHECK-PREP10: # %bb.0: # %entry
1413 ; CHECK-PREP10-NEXT: lis r4, 1
1414 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
1415 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
1416 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
1417 ; CHECK-PREP10-NEXT: extsb r3, r3
1418 ; CHECK-PREP10-NEXT: blr
1420 %and = and i64 %ptr, -1048576
1421 %or = or i64 %and, 99999
1422 %0 = inttoptr i64 %or to ptr
1423 %1 = load i8, ptr %0, align 1
1424 %conv = sext i8 %1 to i64
1428 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1429 define dso_local i64 @ld_disjoint_align32_uint64_t_int8_t(i64 %ptr) {
1430 ; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_int8_t:
1431 ; CHECK-P10: # %bb.0: # %entry
1432 ; CHECK-P10-NEXT: lis r4, -15264
1433 ; CHECK-P10-NEXT: and r3, r3, r4
1434 ; CHECK-P10-NEXT: plbz r3, 999990000(r3), 0
1435 ; CHECK-P10-NEXT: extsb r3, r3
1436 ; CHECK-P10-NEXT: blr
1438 ; CHECK-P9-LABEL: ld_disjoint_align32_uint64_t_int8_t:
1439 ; CHECK-P9: # %bb.0: # %entry
1440 ; CHECK-P9-NEXT: lis r4, -15264
1441 ; CHECK-P9-NEXT: and r3, r3, r4
1442 ; CHECK-P9-NEXT: lis r4, 15258
1443 ; CHECK-P9-NEXT: ori r4, r4, 41712
1444 ; CHECK-P9-NEXT: lbzx r3, r3, r4
1445 ; CHECK-P9-NEXT: extsb r3, r3
1446 ; CHECK-P9-NEXT: blr
1448 ; CHECK-P8-LABEL: ld_disjoint_align32_uint64_t_int8_t:
1449 ; CHECK-P8: # %bb.0: # %entry
1450 ; CHECK-P8-NEXT: lis r4, -15264
1451 ; CHECK-P8-NEXT: lis r5, 15258
1452 ; CHECK-P8-NEXT: and r3, r3, r4
1453 ; CHECK-P8-NEXT: ori r4, r5, 41712
1454 ; CHECK-P8-NEXT: lbzx r3, r3, r4
1455 ; CHECK-P8-NEXT: extsb r3, r3
1456 ; CHECK-P8-NEXT: blr
1458 %and = and i64 %ptr, -1000341504
1459 %or = or i64 %and, 999990000
1460 %0 = inttoptr i64 %or to ptr
1461 %1 = load i8, ptr %0, align 16
1462 %conv = sext i8 %1 to i64
1466 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1467 define dso_local i64 @ld_not_disjoint64_uint64_t_int8_t(i64 %ptr) {
1468 ; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_int8_t:
1469 ; CHECK-P10: # %bb.0: # %entry
1470 ; CHECK-P10-NEXT: pli r4, 232
1471 ; CHECK-P10-NEXT: pli r5, 3567587329
1472 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
1473 ; CHECK-P10-NEXT: or r3, r3, r5
1474 ; CHECK-P10-NEXT: lbz r3, 0(r3)
1475 ; CHECK-P10-NEXT: extsb r3, r3
1476 ; CHECK-P10-NEXT: blr
1478 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_int8_t:
1479 ; CHECK-PREP10: # %bb.0: # %entry
1480 ; CHECK-PREP10-NEXT: li r4, 29
1481 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
1482 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
1483 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
1484 ; CHECK-PREP10-NEXT: or r3, r3, r4
1485 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
1486 ; CHECK-PREP10-NEXT: extsb r3, r3
1487 ; CHECK-PREP10-NEXT: blr
1489 %or = or i64 %ptr, 1000000000001
1490 %0 = inttoptr i64 %or to ptr
1491 %1 = load i8, ptr %0, align 1
1492 %conv = sext i8 %1 to i64
1496 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1497 define dso_local i64 @ld_disjoint_unalign64_uint64_t_int8_t(i64 %ptr) {
1498 ; CHECK-P10-LABEL: ld_disjoint_unalign64_uint64_t_int8_t:
1499 ; CHECK-P10: # %bb.0: # %entry
1500 ; CHECK-P10-NEXT: pli r4, 232
1501 ; CHECK-P10-NEXT: pli r5, 3567587329
1502 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
1503 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
1504 ; CHECK-P10-NEXT: lbzx r3, r3, r5
1505 ; CHECK-P10-NEXT: extsb r3, r3
1506 ; CHECK-P10-NEXT: blr
1508 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint64_t_int8_t:
1509 ; CHECK-PREP10: # %bb.0: # %entry
1510 ; CHECK-PREP10-NEXT: li r4, 29
1511 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
1512 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
1513 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
1514 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
1515 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
1516 ; CHECK-PREP10-NEXT: extsb r3, r3
1517 ; CHECK-PREP10-NEXT: blr
1519 %and = and i64 %ptr, -1099511627776
1520 %or = or i64 %and, 1000000000001
1521 %0 = inttoptr i64 %or to ptr
1522 %1 = load i8, ptr %0, align 1
1523 %conv = sext i8 %1 to i64
1527 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1528 define dso_local i64 @ld_disjoint_align64_uint64_t_int8_t(i64 %ptr) {
1529 ; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_int8_t:
1530 ; CHECK-P10: # %bb.0: # %entry
1531 ; CHECK-P10-NEXT: pli r4, 244140625
1532 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
1533 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
1534 ; CHECK-P10-NEXT: lbzx r3, r3, r4
1535 ; CHECK-P10-NEXT: extsb r3, r3
1536 ; CHECK-P10-NEXT: blr
1538 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_int8_t:
1539 ; CHECK-PREP10: # %bb.0: # %entry
1540 ; CHECK-PREP10-NEXT: lis r4, 3725
1541 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
1542 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
1543 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
1544 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
1545 ; CHECK-PREP10-NEXT: extsb r3, r3
1546 ; CHECK-PREP10-NEXT: blr
1548 %and = and i64 %ptr, -1099511627776
1549 %or = or i64 %and, 1000000000000
1550 %0 = inttoptr i64 %or to ptr
1551 %1 = load i8, ptr %0, align 4096
1552 %conv = sext i8 %1 to i64
1556 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1557 define dso_local i64 @ld_cst_unalign16_uint64_t_int8_t() {
1558 ; CHECK-LABEL: ld_cst_unalign16_uint64_t_int8_t:
1559 ; CHECK: # %bb.0: # %entry
1560 ; CHECK-NEXT: lbz r3, 255(0)
1561 ; CHECK-NEXT: extsb r3, r3
1564 %0 = load i8, ptr inttoptr (i64 255 to ptr), align 1
1565 %conv = sext i8 %0 to i64
1569 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1570 define dso_local i64 @ld_cst_align16_uint64_t_int8_t() {
1571 ; CHECK-LABEL: ld_cst_align16_uint64_t_int8_t:
1572 ; CHECK: # %bb.0: # %entry
1573 ; CHECK-NEXT: lbz r3, 4080(0)
1574 ; CHECK-NEXT: extsb r3, r3
1577 %0 = load i8, ptr inttoptr (i64 4080 to ptr), align 16
1578 %conv = sext i8 %0 to i64
1582 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1583 define dso_local i64 @ld_cst_unalign32_uint64_t_int8_t() {
1584 ; CHECK-LABEL: ld_cst_unalign32_uint64_t_int8_t:
1585 ; CHECK: # %bb.0: # %entry
1586 ; CHECK-NEXT: lis r3, 2
1587 ; CHECK-NEXT: lbz r3, -31073(r3)
1588 ; CHECK-NEXT: extsb r3, r3
1591 %0 = load i8, ptr inttoptr (i64 99999 to ptr), align 1
1592 %conv = sext i8 %0 to i64
1596 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1597 define dso_local i64 @ld_cst_align32_uint64_t_int8_t() {
1598 ; CHECK-LABEL: ld_cst_align32_uint64_t_int8_t:
1599 ; CHECK: # %bb.0: # %entry
1600 ; CHECK-NEXT: lis r3, 153
1601 ; CHECK-NEXT: lbz r3, -27108(r3)
1602 ; CHECK-NEXT: extsb r3, r3
1605 %0 = load i8, ptr inttoptr (i64 9999900 to ptr), align 4
1606 %conv = sext i8 %0 to i64
1610 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1611 define dso_local i64 @ld_cst_unalign64_uint64_t_int8_t() {
1612 ; CHECK-P10-LABEL: ld_cst_unalign64_uint64_t_int8_t:
1613 ; CHECK-P10: # %bb.0: # %entry
1614 ; CHECK-P10-NEXT: pli r3, 232
1615 ; CHECK-P10-NEXT: pli r4, 3567587329
1616 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
1617 ; CHECK-P10-NEXT: lbz r3, 0(r4)
1618 ; CHECK-P10-NEXT: extsb r3, r3
1619 ; CHECK-P10-NEXT: blr
1621 ; CHECK-PREP10-LABEL: ld_cst_unalign64_uint64_t_int8_t:
1622 ; CHECK-PREP10: # %bb.0: # %entry
1623 ; CHECK-PREP10-NEXT: li r3, 29
1624 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
1625 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
1626 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
1627 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
1628 ; CHECK-PREP10-NEXT: extsb r3, r3
1629 ; CHECK-PREP10-NEXT: blr
1631 %0 = load i8, ptr inttoptr (i64 1000000000001 to ptr), align 1
1632 %conv = sext i8 %0 to i64
1636 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1637 define dso_local i64 @ld_cst_align64_uint64_t_int8_t() {
1638 ; CHECK-P10-LABEL: ld_cst_align64_uint64_t_int8_t:
1639 ; CHECK-P10: # %bb.0: # %entry
1640 ; CHECK-P10-NEXT: pli r3, 244140625
1641 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
1642 ; CHECK-P10-NEXT: lbz r3, 0(r3)
1643 ; CHECK-P10-NEXT: extsb r3, r3
1644 ; CHECK-P10-NEXT: blr
1646 ; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_int8_t:
1647 ; CHECK-PREP10: # %bb.0: # %entry
1648 ; CHECK-PREP10-NEXT: lis r3, 3725
1649 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
1650 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
1651 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
1652 ; CHECK-PREP10-NEXT: extsb r3, r3
1653 ; CHECK-PREP10-NEXT: blr
1655 %0 = load i8, ptr inttoptr (i64 1000000000000 to ptr), align 4096
1656 %conv = sext i8 %0 to i64
1660 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1661 define dso_local i64 @ld_0_uint64_t_uint16_t(i64 %ptr) {
1662 ; CHECK-LABEL: ld_0_uint64_t_uint16_t:
1663 ; CHECK: # %bb.0: # %entry
1664 ; CHECK-NEXT: lhz r3, 0(r3)
1667 %0 = inttoptr i64 %ptr to ptr
1668 %1 = load i16, ptr %0, align 2
1669 %conv = zext i16 %1 to i64
1673 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1674 define dso_local i64 @ld_unalign16_uint64_t_uint16_t(ptr nocapture readonly %ptr) {
1675 ; CHECK-LABEL: ld_unalign16_uint64_t_uint16_t:
1676 ; CHECK: # %bb.0: # %entry
1677 ; CHECK-NEXT: lhz r3, 1(r3)
1680 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1
1681 %0 = load i16, ptr %add.ptr, align 2
1682 %conv = zext i16 %0 to i64
1686 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1687 define dso_local i64 @ld_align16_uint64_t_uint16_t(ptr nocapture readonly %ptr) {
1688 ; CHECK-LABEL: ld_align16_uint64_t_uint16_t:
1689 ; CHECK: # %bb.0: # %entry
1690 ; CHECK-NEXT: lhz r3, 8(r3)
1693 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
1694 %0 = load i16, ptr %add.ptr, align 2
1695 %conv = zext i16 %0 to i64
1699 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1700 define dso_local i64 @ld_unalign32_uint64_t_uint16_t(ptr nocapture readonly %ptr) {
1701 ; CHECK-P10-LABEL: ld_unalign32_uint64_t_uint16_t:
1702 ; CHECK-P10: # %bb.0: # %entry
1703 ; CHECK-P10-NEXT: plhz r3, 99999(r3), 0
1704 ; CHECK-P10-NEXT: blr
1706 ; CHECK-PREP10-LABEL: ld_unalign32_uint64_t_uint16_t:
1707 ; CHECK-PREP10: # %bb.0: # %entry
1708 ; CHECK-PREP10-NEXT: lis r4, 1
1709 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
1710 ; CHECK-PREP10-NEXT: lhzx r3, r3, r4
1711 ; CHECK-PREP10-NEXT: blr
1713 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999
1714 %0 = load i16, ptr %add.ptr, align 2
1715 %conv = zext i16 %0 to i64
1719 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1720 define dso_local i64 @ld_align32_uint64_t_uint16_t(ptr nocapture readonly %ptr) {
1721 ; CHECK-P10-LABEL: ld_align32_uint64_t_uint16_t:
1722 ; CHECK-P10: # %bb.0: # %entry
1723 ; CHECK-P10-NEXT: plhz r3, 99999000(r3), 0
1724 ; CHECK-P10-NEXT: blr
1726 ; CHECK-PREP10-LABEL: ld_align32_uint64_t_uint16_t:
1727 ; CHECK-PREP10: # %bb.0: # %entry
1728 ; CHECK-PREP10-NEXT: lis r4, 1525
1729 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
1730 ; CHECK-PREP10-NEXT: lhzx r3, r3, r4
1731 ; CHECK-PREP10-NEXT: blr
1733 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
1734 %0 = load i16, ptr %add.ptr, align 2
1735 %conv = zext i16 %0 to i64
1739 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1740 define dso_local i64 @ld_unalign64_uint64_t_uint16_t(ptr nocapture readonly %ptr) {
1741 ; CHECK-P10-LABEL: ld_unalign64_uint64_t_uint16_t:
1742 ; CHECK-P10: # %bb.0: # %entry
1743 ; CHECK-P10-NEXT: pli r4, 232
1744 ; CHECK-P10-NEXT: pli r5, 3567587329
1745 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
1746 ; CHECK-P10-NEXT: lhzx r3, r3, r5
1747 ; CHECK-P10-NEXT: blr
1749 ; CHECK-PREP10-LABEL: ld_unalign64_uint64_t_uint16_t:
1750 ; CHECK-PREP10: # %bb.0: # %entry
1751 ; CHECK-PREP10-NEXT: li r4, 29
1752 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
1753 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
1754 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
1755 ; CHECK-PREP10-NEXT: lhzx r3, r3, r4
1756 ; CHECK-PREP10-NEXT: blr
1758 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000001
1759 %0 = load i16, ptr %add.ptr, align 2
1760 %conv = zext i16 %0 to i64
1764 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1765 define dso_local i64 @ld_align64_uint64_t_uint16_t(ptr nocapture readonly %ptr) {
1766 ; CHECK-P10-LABEL: ld_align64_uint64_t_uint16_t:
1767 ; CHECK-P10: # %bb.0: # %entry
1768 ; CHECK-P10-NEXT: pli r4, 244140625
1769 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
1770 ; CHECK-P10-NEXT: lhzx r3, r3, r4
1771 ; CHECK-P10-NEXT: blr
1773 ; CHECK-PREP10-LABEL: ld_align64_uint64_t_uint16_t:
1774 ; CHECK-PREP10: # %bb.0: # %entry
1775 ; CHECK-PREP10-NEXT: lis r4, 3725
1776 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
1777 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
1778 ; CHECK-PREP10-NEXT: lhzx r3, r3, r4
1779 ; CHECK-PREP10-NEXT: blr
1781 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
1782 %0 = load i16, ptr %add.ptr, align 2
1783 %conv = zext i16 %0 to i64
1787 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1788 define dso_local i64 @ld_reg_uint64_t_uint16_t(ptr nocapture readonly %ptr, i64 %off) {
1789 ; CHECK-LABEL: ld_reg_uint64_t_uint16_t:
1790 ; CHECK: # %bb.0: # %entry
1791 ; CHECK-NEXT: lhzx r3, r3, r4
1794 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
1795 %0 = load i16, ptr %add.ptr, align 2
1796 %conv = zext i16 %0 to i64
1800 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1801 define dso_local i64 @ld_or_uint64_t_uint16_t(i64 %ptr, i8 zeroext %off) {
1802 ; CHECK-LABEL: ld_or_uint64_t_uint16_t:
1803 ; CHECK: # %bb.0: # %entry
1804 ; CHECK-NEXT: or r3, r4, r3
1805 ; CHECK-NEXT: lhz r3, 0(r3)
1808 %conv = zext i8 %off to i64
1809 %or = or i64 %conv, %ptr
1810 %0 = inttoptr i64 %or to ptr
1811 %1 = load i16, ptr %0, align 2
1812 %conv1 = zext i16 %1 to i64
1816 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1817 define dso_local i64 @ld_or2_uint64_t_uint16_t(i64 %ptr, i8 zeroext %off) {
1818 ; CHECK-LABEL: ld_or2_uint64_t_uint16_t:
1819 ; CHECK: # %bb.0: # %entry
1820 ; CHECK-NEXT: rldicr r3, r3, 0, 51
1821 ; CHECK-NEXT: lhzx r3, r3, r4
1824 %and = and i64 %ptr, -4096
1825 %conv = zext i8 %off to i64
1826 %or = or i64 %and, %conv
1827 %0 = inttoptr i64 %or to ptr
1828 %1 = load i16, ptr %0, align 2
1829 %conv1 = zext i16 %1 to i64
1833 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1834 define dso_local i64 @ld_not_disjoint16_uint64_t_uint16_t(i64 %ptr) {
1835 ; CHECK-LABEL: ld_not_disjoint16_uint64_t_uint16_t:
1836 ; CHECK: # %bb.0: # %entry
1837 ; CHECK-NEXT: ori r3, r3, 6
1838 ; CHECK-NEXT: lhz r3, 0(r3)
1841 %or = or i64 %ptr, 6
1842 %0 = inttoptr i64 %or to ptr
1843 %1 = load i16, ptr %0, align 2
1844 %conv = zext i16 %1 to i64
1848 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1849 define dso_local i64 @ld_disjoint_unalign16_uint64_t_uint16_t(i64 %ptr) {
1850 ; CHECK-LABEL: ld_disjoint_unalign16_uint64_t_uint16_t:
1851 ; CHECK: # %bb.0: # %entry
1852 ; CHECK-NEXT: rldicr r3, r3, 0, 51
1853 ; CHECK-NEXT: lhz r3, 6(r3)
1856 %and = and i64 %ptr, -4096
1857 %or = or i64 %and, 6
1858 %0 = inttoptr i64 %or to ptr
1859 %1 = load i16, ptr %0, align 2
1860 %conv = zext i16 %1 to i64
1864 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1865 define dso_local i64 @ld_disjoint_align16_uint64_t_uint16_t(i64 %ptr) {
1866 ; CHECK-LABEL: ld_disjoint_align16_uint64_t_uint16_t:
1867 ; CHECK: # %bb.0: # %entry
1868 ; CHECK-NEXT: rldicr r3, r3, 0, 51
1869 ; CHECK-NEXT: lhz r3, 24(r3)
1872 %and = and i64 %ptr, -4096
1873 %or = or i64 %and, 24
1874 %0 = inttoptr i64 %or to ptr
1875 %1 = load i16, ptr %0, align 8
1876 %conv = zext i16 %1 to i64
1880 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1881 define dso_local i64 @ld_not_disjoint32_uint64_t_uint16_t(i64 %ptr) {
1882 ; CHECK-LABEL: ld_not_disjoint32_uint64_t_uint16_t:
1883 ; CHECK: # %bb.0: # %entry
1884 ; CHECK-NEXT: ori r3, r3, 34463
1885 ; CHECK-NEXT: oris r3, r3, 1
1886 ; CHECK-NEXT: lhz r3, 0(r3)
1889 %or = or i64 %ptr, 99999
1890 %0 = inttoptr i64 %or to ptr
1891 %1 = load i16, ptr %0, align 2
1892 %conv = zext i16 %1 to i64
1896 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1897 define dso_local i64 @ld_disjoint_unalign32_uint64_t_uint16_t(i64 %ptr) {
1898 ; CHECK-P10-LABEL: ld_disjoint_unalign32_uint64_t_uint16_t:
1899 ; CHECK-P10: # %bb.0: # %entry
1900 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
1901 ; CHECK-P10-NEXT: plhz r3, 99999(r3), 0
1902 ; CHECK-P10-NEXT: blr
1904 ; CHECK-PREP10-LABEL: ld_disjoint_unalign32_uint64_t_uint16_t:
1905 ; CHECK-PREP10: # %bb.0: # %entry
1906 ; CHECK-PREP10-NEXT: lis r4, 1
1907 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
1908 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
1909 ; CHECK-PREP10-NEXT: lhzx r3, r3, r4
1910 ; CHECK-PREP10-NEXT: blr
1912 %and = and i64 %ptr, -1048576
1913 %or = or i64 %and, 99999
1914 %0 = inttoptr i64 %or to ptr
1915 %1 = load i16, ptr %0, align 2
1916 %conv = zext i16 %1 to i64
1920 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1921 define dso_local i64 @ld_disjoint_align32_uint64_t_uint16_t(i64 %ptr) {
1922 ; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_uint16_t:
1923 ; CHECK-P10: # %bb.0: # %entry
1924 ; CHECK-P10-NEXT: lis r4, -15264
1925 ; CHECK-P10-NEXT: and r3, r3, r4
1926 ; CHECK-P10-NEXT: plhz r3, 999990000(r3), 0
1927 ; CHECK-P10-NEXT: blr
1929 ; CHECK-P9-LABEL: ld_disjoint_align32_uint64_t_uint16_t:
1930 ; CHECK-P9: # %bb.0: # %entry
1931 ; CHECK-P9-NEXT: lis r4, -15264
1932 ; CHECK-P9-NEXT: and r3, r3, r4
1933 ; CHECK-P9-NEXT: lis r4, 15258
1934 ; CHECK-P9-NEXT: ori r4, r4, 41712
1935 ; CHECK-P9-NEXT: lhzx r3, r3, r4
1936 ; CHECK-P9-NEXT: blr
1938 ; CHECK-P8-LABEL: ld_disjoint_align32_uint64_t_uint16_t:
1939 ; CHECK-P8: # %bb.0: # %entry
1940 ; CHECK-P8-NEXT: lis r4, -15264
1941 ; CHECK-P8-NEXT: lis r5, 15258
1942 ; CHECK-P8-NEXT: and r3, r3, r4
1943 ; CHECK-P8-NEXT: ori r4, r5, 41712
1944 ; CHECK-P8-NEXT: lhzx r3, r3, r4
1945 ; CHECK-P8-NEXT: blr
1947 %and = and i64 %ptr, -1000341504
1948 %or = or i64 %and, 999990000
1949 %0 = inttoptr i64 %or to ptr
1950 %1 = load i16, ptr %0, align 16
1951 %conv = zext i16 %1 to i64
1955 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1956 define dso_local i64 @ld_not_disjoint64_uint64_t_uint16_t(i64 %ptr) {
1957 ; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_uint16_t:
1958 ; CHECK-P10: # %bb.0: # %entry
1959 ; CHECK-P10-NEXT: pli r4, 232
1960 ; CHECK-P10-NEXT: pli r5, 3567587329
1961 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
1962 ; CHECK-P10-NEXT: or r3, r3, r5
1963 ; CHECK-P10-NEXT: lhz r3, 0(r3)
1964 ; CHECK-P10-NEXT: blr
1966 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_uint16_t:
1967 ; CHECK-PREP10: # %bb.0: # %entry
1968 ; CHECK-PREP10-NEXT: li r4, 29
1969 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
1970 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
1971 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
1972 ; CHECK-PREP10-NEXT: or r3, r3, r4
1973 ; CHECK-PREP10-NEXT: lhz r3, 0(r3)
1974 ; CHECK-PREP10-NEXT: blr
1976 %or = or i64 %ptr, 1000000000001
1977 %0 = inttoptr i64 %or to ptr
1978 %1 = load i16, ptr %0, align 2
1979 %conv = zext i16 %1 to i64
1983 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1984 define dso_local i64 @ld_disjoint_unalign64_uint64_t_uint16_t(i64 %ptr) {
1985 ; CHECK-P10-LABEL: ld_disjoint_unalign64_uint64_t_uint16_t:
1986 ; CHECK-P10: # %bb.0: # %entry
1987 ; CHECK-P10-NEXT: pli r4, 232
1988 ; CHECK-P10-NEXT: pli r5, 3567587329
1989 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
1990 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
1991 ; CHECK-P10-NEXT: lhzx r3, r3, r5
1992 ; CHECK-P10-NEXT: blr
1994 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint64_t_uint16_t:
1995 ; CHECK-PREP10: # %bb.0: # %entry
1996 ; CHECK-PREP10-NEXT: li r4, 29
1997 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
1998 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
1999 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2000 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2001 ; CHECK-PREP10-NEXT: lhzx r3, r3, r4
2002 ; CHECK-PREP10-NEXT: blr
2004 %and = and i64 %ptr, -1099511627776
2005 %or = or i64 %and, 1000000000001
2006 %0 = inttoptr i64 %or to ptr
2007 %1 = load i16, ptr %0, align 2
2008 %conv = zext i16 %1 to i64
2012 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2013 define dso_local i64 @ld_disjoint_align64_uint64_t_uint16_t(i64 %ptr) {
2014 ; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_uint16_t:
2015 ; CHECK-P10: # %bb.0: # %entry
2016 ; CHECK-P10-NEXT: pli r4, 244140625
2017 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
2018 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2019 ; CHECK-P10-NEXT: lhzx r3, r3, r4
2020 ; CHECK-P10-NEXT: blr
2022 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_uint16_t:
2023 ; CHECK-PREP10: # %bb.0: # %entry
2024 ; CHECK-PREP10-NEXT: lis r4, 3725
2025 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
2026 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2027 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2028 ; CHECK-PREP10-NEXT: lhzx r3, r3, r4
2029 ; CHECK-PREP10-NEXT: blr
2031 %and = and i64 %ptr, -1099511627776
2032 %or = or i64 %and, 1000000000000
2033 %0 = inttoptr i64 %or to ptr
2034 %1 = load i16, ptr %0, align 4096
2035 %conv = zext i16 %1 to i64
2039 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2040 define dso_local i64 @ld_cst_unalign16_uint64_t_uint16_t() {
2041 ; CHECK-LABEL: ld_cst_unalign16_uint64_t_uint16_t:
2042 ; CHECK: # %bb.0: # %entry
2043 ; CHECK-NEXT: lhz r3, 255(0)
2046 %0 = load i16, ptr inttoptr (i64 255 to ptr), align 2
2047 %conv = zext i16 %0 to i64
2051 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2052 define dso_local i64 @ld_cst_align16_uint64_t_uint16_t() {
2053 ; CHECK-LABEL: ld_cst_align16_uint64_t_uint16_t:
2054 ; CHECK: # %bb.0: # %entry
2055 ; CHECK-NEXT: lhz r3, 4080(0)
2058 %0 = load i16, ptr inttoptr (i64 4080 to ptr), align 16
2059 %conv = zext i16 %0 to i64
2063 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2064 define dso_local i64 @ld_cst_unalign32_uint64_t_uint16_t() {
2065 ; CHECK-LABEL: ld_cst_unalign32_uint64_t_uint16_t:
2066 ; CHECK: # %bb.0: # %entry
2067 ; CHECK-NEXT: lis r3, 2
2068 ; CHECK-NEXT: lhz r3, -31073(r3)
2071 %0 = load i16, ptr inttoptr (i64 99999 to ptr), align 2
2072 %conv = zext i16 %0 to i64
2076 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2077 define dso_local i64 @ld_cst_align32_uint64_t_uint16_t() {
2078 ; CHECK-LABEL: ld_cst_align32_uint64_t_uint16_t:
2079 ; CHECK: # %bb.0: # %entry
2080 ; CHECK-NEXT: lis r3, 153
2081 ; CHECK-NEXT: lhz r3, -27108(r3)
2084 %0 = load i16, ptr inttoptr (i64 9999900 to ptr), align 4
2085 %conv = zext i16 %0 to i64
2089 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2090 define dso_local i64 @ld_cst_unalign64_uint64_t_uint16_t() {
2091 ; CHECK-P10-LABEL: ld_cst_unalign64_uint64_t_uint16_t:
2092 ; CHECK-P10: # %bb.0: # %entry
2093 ; CHECK-P10-NEXT: pli r3, 232
2094 ; CHECK-P10-NEXT: pli r4, 3567587329
2095 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
2096 ; CHECK-P10-NEXT: lhz r3, 0(r4)
2097 ; CHECK-P10-NEXT: blr
2099 ; CHECK-PREP10-LABEL: ld_cst_unalign64_uint64_t_uint16_t:
2100 ; CHECK-PREP10: # %bb.0: # %entry
2101 ; CHECK-PREP10-NEXT: li r3, 29
2102 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
2103 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
2104 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
2105 ; CHECK-PREP10-NEXT: lhz r3, 0(r3)
2106 ; CHECK-PREP10-NEXT: blr
2108 %0 = load i16, ptr inttoptr (i64 1000000000001 to ptr), align 2
2109 %conv = zext i16 %0 to i64
2113 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2114 define dso_local i64 @ld_cst_align64_uint64_t_uint16_t() {
2115 ; CHECK-P10-LABEL: ld_cst_align64_uint64_t_uint16_t:
2116 ; CHECK-P10: # %bb.0: # %entry
2117 ; CHECK-P10-NEXT: pli r3, 244140625
2118 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
2119 ; CHECK-P10-NEXT: lhz r3, 0(r3)
2120 ; CHECK-P10-NEXT: blr
2122 ; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_uint16_t:
2123 ; CHECK-PREP10: # %bb.0: # %entry
2124 ; CHECK-PREP10-NEXT: lis r3, 3725
2125 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
2126 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
2127 ; CHECK-PREP10-NEXT: lhz r3, 0(r3)
2128 ; CHECK-PREP10-NEXT: blr
2130 %0 = load i16, ptr inttoptr (i64 1000000000000 to ptr), align 4096
2131 %conv = zext i16 %0 to i64
2135 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2136 define dso_local i64 @ld_0_uint64_t_int16_t(i64 %ptr) {
2137 ; CHECK-LABEL: ld_0_uint64_t_int16_t:
2138 ; CHECK: # %bb.0: # %entry
2139 ; CHECK-NEXT: lha r3, 0(r3)
2142 %0 = inttoptr i64 %ptr to ptr
2143 %1 = load i16, ptr %0, align 2
2144 %conv = sext i16 %1 to i64
2148 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2149 define dso_local i64 @ld_unalign16_uint64_t_int16_t(ptr nocapture readonly %ptr) {
2150 ; CHECK-LABEL: ld_unalign16_uint64_t_int16_t:
2151 ; CHECK: # %bb.0: # %entry
2152 ; CHECK-NEXT: lha r3, 1(r3)
2155 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1
2156 %0 = load i16, ptr %add.ptr, align 2
2157 %conv = sext i16 %0 to i64
2161 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2162 define dso_local i64 @ld_align16_uint64_t_int16_t(ptr nocapture readonly %ptr) {
2163 ; CHECK-LABEL: ld_align16_uint64_t_int16_t:
2164 ; CHECK: # %bb.0: # %entry
2165 ; CHECK-NEXT: lha r3, 8(r3)
2168 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
2169 %0 = load i16, ptr %add.ptr, align 2
2170 %conv = sext i16 %0 to i64
2174 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2175 define dso_local i64 @ld_unalign32_uint64_t_int16_t(ptr nocapture readonly %ptr) {
2176 ; CHECK-P10-LABEL: ld_unalign32_uint64_t_int16_t:
2177 ; CHECK-P10: # %bb.0: # %entry
2178 ; CHECK-P10-NEXT: plha r3, 99999(r3), 0
2179 ; CHECK-P10-NEXT: blr
2181 ; CHECK-PREP10-LABEL: ld_unalign32_uint64_t_int16_t:
2182 ; CHECK-PREP10: # %bb.0: # %entry
2183 ; CHECK-PREP10-NEXT: lis r4, 1
2184 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
2185 ; CHECK-PREP10-NEXT: lhax r3, r3, r4
2186 ; CHECK-PREP10-NEXT: blr
2188 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999
2189 %0 = load i16, ptr %add.ptr, align 2
2190 %conv = sext i16 %0 to i64
2194 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2195 define dso_local i64 @ld_align32_uint64_t_int16_t(ptr nocapture readonly %ptr) {
2196 ; CHECK-P10-LABEL: ld_align32_uint64_t_int16_t:
2197 ; CHECK-P10: # %bb.0: # %entry
2198 ; CHECK-P10-NEXT: plha r3, 99999000(r3), 0
2199 ; CHECK-P10-NEXT: blr
2201 ; CHECK-PREP10-LABEL: ld_align32_uint64_t_int16_t:
2202 ; CHECK-PREP10: # %bb.0: # %entry
2203 ; CHECK-PREP10-NEXT: lis r4, 1525
2204 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
2205 ; CHECK-PREP10-NEXT: lhax r3, r3, r4
2206 ; CHECK-PREP10-NEXT: blr
2208 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
2209 %0 = load i16, ptr %add.ptr, align 2
2210 %conv = sext i16 %0 to i64
2214 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2215 define dso_local i64 @ld_unalign64_uint64_t_int16_t(ptr nocapture readonly %ptr) {
2216 ; CHECK-P10-LABEL: ld_unalign64_uint64_t_int16_t:
2217 ; CHECK-P10: # %bb.0: # %entry
2218 ; CHECK-P10-NEXT: pli r4, 232
2219 ; CHECK-P10-NEXT: pli r5, 3567587329
2220 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2221 ; CHECK-P10-NEXT: lhax r3, r3, r5
2222 ; CHECK-P10-NEXT: blr
2224 ; CHECK-PREP10-LABEL: ld_unalign64_uint64_t_int16_t:
2225 ; CHECK-PREP10: # %bb.0: # %entry
2226 ; CHECK-PREP10-NEXT: li r4, 29
2227 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2228 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2229 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2230 ; CHECK-PREP10-NEXT: lhax r3, r3, r4
2231 ; CHECK-PREP10-NEXT: blr
2233 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000001
2234 %0 = load i16, ptr %add.ptr, align 2
2235 %conv = sext i16 %0 to i64
2239 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2240 define dso_local i64 @ld_align64_uint64_t_int16_t(ptr nocapture readonly %ptr) {
2241 ; CHECK-P10-LABEL: ld_align64_uint64_t_int16_t:
2242 ; CHECK-P10: # %bb.0: # %entry
2243 ; CHECK-P10-NEXT: pli r4, 244140625
2244 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2245 ; CHECK-P10-NEXT: lhax r3, r3, r4
2246 ; CHECK-P10-NEXT: blr
2248 ; CHECK-PREP10-LABEL: ld_align64_uint64_t_int16_t:
2249 ; CHECK-PREP10: # %bb.0: # %entry
2250 ; CHECK-PREP10-NEXT: lis r4, 3725
2251 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2252 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2253 ; CHECK-PREP10-NEXT: lhax r3, r3, r4
2254 ; CHECK-PREP10-NEXT: blr
2256 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
2257 %0 = load i16, ptr %add.ptr, align 2
2258 %conv = sext i16 %0 to i64
2262 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2263 define dso_local i64 @ld_reg_uint64_t_int16_t(ptr nocapture readonly %ptr, i64 %off) {
2264 ; CHECK-LABEL: ld_reg_uint64_t_int16_t:
2265 ; CHECK: # %bb.0: # %entry
2266 ; CHECK-NEXT: lhax r3, r3, r4
2269 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
2270 %0 = load i16, ptr %add.ptr, align 2
2271 %conv = sext i16 %0 to i64
2275 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2276 define dso_local i64 @ld_or_uint64_t_int16_t(i64 %ptr, i8 zeroext %off) {
2277 ; CHECK-LABEL: ld_or_uint64_t_int16_t:
2278 ; CHECK: # %bb.0: # %entry
2279 ; CHECK-NEXT: or r3, r4, r3
2280 ; CHECK-NEXT: lha r3, 0(r3)
2283 %conv = zext i8 %off to i64
2284 %or = or i64 %conv, %ptr
2285 %0 = inttoptr i64 %or to ptr
2286 %1 = load i16, ptr %0, align 2
2287 %conv1 = sext i16 %1 to i64
2291 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2292 define dso_local i64 @ld_or2_uint64_t_int16_t(i64 %ptr, i8 zeroext %off) {
2293 ; CHECK-LABEL: ld_or2_uint64_t_int16_t:
2294 ; CHECK: # %bb.0: # %entry
2295 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2296 ; CHECK-NEXT: lhax r3, r3, r4
2299 %and = and i64 %ptr, -4096
2300 %conv = zext i8 %off to i64
2301 %or = or i64 %and, %conv
2302 %0 = inttoptr i64 %or to ptr
2303 %1 = load i16, ptr %0, align 2
2304 %conv1 = sext i16 %1 to i64
2308 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2309 define dso_local i64 @ld_not_disjoint16_uint64_t_int16_t(i64 %ptr) {
2310 ; CHECK-LABEL: ld_not_disjoint16_uint64_t_int16_t:
2311 ; CHECK: # %bb.0: # %entry
2312 ; CHECK-NEXT: ori r3, r3, 6
2313 ; CHECK-NEXT: lha r3, 0(r3)
2316 %or = or i64 %ptr, 6
2317 %0 = inttoptr i64 %or to ptr
2318 %1 = load i16, ptr %0, align 2
2319 %conv = sext i16 %1 to i64
2323 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2324 define dso_local i64 @ld_disjoint_unalign16_uint64_t_int16_t(i64 %ptr) {
2325 ; CHECK-LABEL: ld_disjoint_unalign16_uint64_t_int16_t:
2326 ; CHECK: # %bb.0: # %entry
2327 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2328 ; CHECK-NEXT: lha r3, 6(r3)
2331 %and = and i64 %ptr, -4096
2332 %or = or i64 %and, 6
2333 %0 = inttoptr i64 %or to ptr
2334 %1 = load i16, ptr %0, align 2
2335 %conv = sext i16 %1 to i64
2339 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2340 define dso_local i64 @ld_disjoint_align16_uint64_t_int16_t(i64 %ptr) {
2341 ; CHECK-LABEL: ld_disjoint_align16_uint64_t_int16_t:
2342 ; CHECK: # %bb.0: # %entry
2343 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2344 ; CHECK-NEXT: lha r3, 24(r3)
2347 %and = and i64 %ptr, -4096
2348 %or = or i64 %and, 24
2349 %0 = inttoptr i64 %or to ptr
2350 %1 = load i16, ptr %0, align 8
2351 %conv = sext i16 %1 to i64
2355 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2356 define dso_local i64 @ld_not_disjoint32_uint64_t_int16_t(i64 %ptr) {
2357 ; CHECK-LABEL: ld_not_disjoint32_uint64_t_int16_t:
2358 ; CHECK: # %bb.0: # %entry
2359 ; CHECK-NEXT: ori r3, r3, 34463
2360 ; CHECK-NEXT: oris r3, r3, 1
2361 ; CHECK-NEXT: lha r3, 0(r3)
2364 %or = or i64 %ptr, 99999
2365 %0 = inttoptr i64 %or to ptr
2366 %1 = load i16, ptr %0, align 2
2367 %conv = sext i16 %1 to i64
2371 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2372 define dso_local i64 @ld_disjoint_unalign32_uint64_t_int16_t(i64 %ptr) {
2373 ; CHECK-P10-LABEL: ld_disjoint_unalign32_uint64_t_int16_t:
2374 ; CHECK-P10: # %bb.0: # %entry
2375 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
2376 ; CHECK-P10-NEXT: plha r3, 99999(r3), 0
2377 ; CHECK-P10-NEXT: blr
2379 ; CHECK-PREP10-LABEL: ld_disjoint_unalign32_uint64_t_int16_t:
2380 ; CHECK-PREP10: # %bb.0: # %entry
2381 ; CHECK-PREP10-NEXT: lis r4, 1
2382 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
2383 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
2384 ; CHECK-PREP10-NEXT: lhax r3, r3, r4
2385 ; CHECK-PREP10-NEXT: blr
2387 %and = and i64 %ptr, -1048576
2388 %or = or i64 %and, 99999
2389 %0 = inttoptr i64 %or to ptr
2390 %1 = load i16, ptr %0, align 2
2391 %conv = sext i16 %1 to i64
2395 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2396 define dso_local i64 @ld_disjoint_align32_uint64_t_int16_t(i64 %ptr) {
2397 ; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_int16_t:
2398 ; CHECK-P10: # %bb.0: # %entry
2399 ; CHECK-P10-NEXT: lis r4, -15264
2400 ; CHECK-P10-NEXT: and r3, r3, r4
2401 ; CHECK-P10-NEXT: plha r3, 999990000(r3), 0
2402 ; CHECK-P10-NEXT: blr
2404 ; CHECK-P9-LABEL: ld_disjoint_align32_uint64_t_int16_t:
2405 ; CHECK-P9: # %bb.0: # %entry
2406 ; CHECK-P9-NEXT: lis r4, -15264
2407 ; CHECK-P9-NEXT: and r3, r3, r4
2408 ; CHECK-P9-NEXT: lis r4, 15258
2409 ; CHECK-P9-NEXT: ori r4, r4, 41712
2410 ; CHECK-P9-NEXT: lhax r3, r3, r4
2411 ; CHECK-P9-NEXT: blr
2413 ; CHECK-P8-LABEL: ld_disjoint_align32_uint64_t_int16_t:
2414 ; CHECK-P8: # %bb.0: # %entry
2415 ; CHECK-P8-NEXT: lis r4, -15264
2416 ; CHECK-P8-NEXT: lis r5, 15258
2417 ; CHECK-P8-NEXT: and r3, r3, r4
2418 ; CHECK-P8-NEXT: ori r4, r5, 41712
2419 ; CHECK-P8-NEXT: lhax r3, r3, r4
2420 ; CHECK-P8-NEXT: blr
2422 %and = and i64 %ptr, -1000341504
2423 %or = or i64 %and, 999990000
2424 %0 = inttoptr i64 %or to ptr
2425 %1 = load i16, ptr %0, align 16
2426 %conv = sext i16 %1 to i64
2430 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2431 define dso_local i64 @ld_not_disjoint64_uint64_t_int16_t(i64 %ptr) {
2432 ; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_int16_t:
2433 ; CHECK-P10: # %bb.0: # %entry
2434 ; CHECK-P10-NEXT: pli r4, 232
2435 ; CHECK-P10-NEXT: pli r5, 3567587329
2436 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2437 ; CHECK-P10-NEXT: or r3, r3, r5
2438 ; CHECK-P10-NEXT: lha r3, 0(r3)
2439 ; CHECK-P10-NEXT: blr
2441 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_int16_t:
2442 ; CHECK-PREP10: # %bb.0: # %entry
2443 ; CHECK-PREP10-NEXT: li r4, 29
2444 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2445 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2446 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2447 ; CHECK-PREP10-NEXT: or r3, r3, r4
2448 ; CHECK-PREP10-NEXT: lha r3, 0(r3)
2449 ; CHECK-PREP10-NEXT: blr
2451 %or = or i64 %ptr, 1000000000001
2452 %0 = inttoptr i64 %or to ptr
2453 %1 = load i16, ptr %0, align 2
2454 %conv = sext i16 %1 to i64
2458 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2459 define dso_local i64 @ld_disjoint_unalign64_uint64_t_int16_t(i64 %ptr) {
2460 ; CHECK-P10-LABEL: ld_disjoint_unalign64_uint64_t_int16_t:
2461 ; CHECK-P10: # %bb.0: # %entry
2462 ; CHECK-P10-NEXT: pli r4, 232
2463 ; CHECK-P10-NEXT: pli r5, 3567587329
2464 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
2465 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2466 ; CHECK-P10-NEXT: lhax r3, r3, r5
2467 ; CHECK-P10-NEXT: blr
2469 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint64_t_int16_t:
2470 ; CHECK-PREP10: # %bb.0: # %entry
2471 ; CHECK-PREP10-NEXT: li r4, 29
2472 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
2473 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2474 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2475 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2476 ; CHECK-PREP10-NEXT: lhax r3, r3, r4
2477 ; CHECK-PREP10-NEXT: blr
2479 %and = and i64 %ptr, -1099511627776
2480 %or = or i64 %and, 1000000000001
2481 %0 = inttoptr i64 %or to ptr
2482 %1 = load i16, ptr %0, align 2
2483 %conv = sext i16 %1 to i64
2487 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2488 define dso_local i64 @ld_disjoint_align64_uint64_t_int16_t(i64 %ptr) {
2489 ; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_int16_t:
2490 ; CHECK-P10: # %bb.0: # %entry
2491 ; CHECK-P10-NEXT: pli r4, 244140625
2492 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
2493 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2494 ; CHECK-P10-NEXT: lhax r3, r3, r4
2495 ; CHECK-P10-NEXT: blr
2497 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_int16_t:
2498 ; CHECK-PREP10: # %bb.0: # %entry
2499 ; CHECK-PREP10-NEXT: lis r4, 3725
2500 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
2501 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2502 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2503 ; CHECK-PREP10-NEXT: lhax r3, r3, r4
2504 ; CHECK-PREP10-NEXT: blr
2506 %and = and i64 %ptr, -1099511627776
2507 %or = or i64 %and, 1000000000000
2508 %0 = inttoptr i64 %or to ptr
2509 %1 = load i16, ptr %0, align 4096
2510 %conv = sext i16 %1 to i64
2514 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2515 define dso_local i64 @ld_cst_unalign16_uint64_t_int16_t() {
2516 ; CHECK-LABEL: ld_cst_unalign16_uint64_t_int16_t:
2517 ; CHECK: # %bb.0: # %entry
2518 ; CHECK-NEXT: lha r3, 255(0)
2521 %0 = load i16, ptr inttoptr (i64 255 to ptr), align 2
2522 %conv = sext i16 %0 to i64
2526 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2527 define dso_local i64 @ld_cst_align16_uint64_t_int16_t() {
2528 ; CHECK-LABEL: ld_cst_align16_uint64_t_int16_t:
2529 ; CHECK: # %bb.0: # %entry
2530 ; CHECK-NEXT: lha r3, 4080(0)
2533 %0 = load i16, ptr inttoptr (i64 4080 to ptr), align 16
2534 %conv = sext i16 %0 to i64
2538 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2539 define dso_local i64 @ld_cst_unalign32_uint64_t_int16_t() {
2540 ; CHECK-LABEL: ld_cst_unalign32_uint64_t_int16_t:
2541 ; CHECK: # %bb.0: # %entry
2542 ; CHECK-NEXT: lis r3, 2
2543 ; CHECK-NEXT: lha r3, -31073(r3)
2546 %0 = load i16, ptr inttoptr (i64 99999 to ptr), align 2
2547 %conv = sext i16 %0 to i64
2551 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2552 define dso_local i64 @ld_cst_align32_uint64_t_int16_t() {
2553 ; CHECK-LABEL: ld_cst_align32_uint64_t_int16_t:
2554 ; CHECK: # %bb.0: # %entry
2555 ; CHECK-NEXT: lis r3, 153
2556 ; CHECK-NEXT: lha r3, -27108(r3)
2559 %0 = load i16, ptr inttoptr (i64 9999900 to ptr), align 4
2560 %conv = sext i16 %0 to i64
2564 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2565 define dso_local i64 @ld_cst_unalign64_uint64_t_int16_t() {
2566 ; CHECK-P10-LABEL: ld_cst_unalign64_uint64_t_int16_t:
2567 ; CHECK-P10: # %bb.0: # %entry
2568 ; CHECK-P10-NEXT: pli r3, 232
2569 ; CHECK-P10-NEXT: pli r4, 3567587329
2570 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
2571 ; CHECK-P10-NEXT: lha r3, 0(r4)
2572 ; CHECK-P10-NEXT: blr
2574 ; CHECK-PREP10-LABEL: ld_cst_unalign64_uint64_t_int16_t:
2575 ; CHECK-PREP10: # %bb.0: # %entry
2576 ; CHECK-PREP10-NEXT: li r3, 29
2577 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
2578 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
2579 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
2580 ; CHECK-PREP10-NEXT: lha r3, 0(r3)
2581 ; CHECK-PREP10-NEXT: blr
2583 %0 = load i16, ptr inttoptr (i64 1000000000001 to ptr), align 2
2584 %conv = sext i16 %0 to i64
2588 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2589 define dso_local i64 @ld_cst_align64_uint64_t_int16_t() {
2590 ; CHECK-P10-LABEL: ld_cst_align64_uint64_t_int16_t:
2591 ; CHECK-P10: # %bb.0: # %entry
2592 ; CHECK-P10-NEXT: pli r3, 244140625
2593 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
2594 ; CHECK-P10-NEXT: lha r3, 0(r3)
2595 ; CHECK-P10-NEXT: blr
2597 ; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_int16_t:
2598 ; CHECK-PREP10: # %bb.0: # %entry
2599 ; CHECK-PREP10-NEXT: lis r3, 3725
2600 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
2601 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
2602 ; CHECK-PREP10-NEXT: lha r3, 0(r3)
2603 ; CHECK-PREP10-NEXT: blr
2605 %0 = load i16, ptr inttoptr (i64 1000000000000 to ptr), align 4096
2606 %conv = sext i16 %0 to i64
2610 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2611 define dso_local i64 @ld_0_uint64_t_uint32_t(i64 %ptr) {
2612 ; CHECK-LABEL: ld_0_uint64_t_uint32_t:
2613 ; CHECK: # %bb.0: # %entry
2614 ; CHECK-NEXT: lwz r3, 0(r3)
2617 %0 = inttoptr i64 %ptr to ptr
2618 %1 = load i32, ptr %0, align 4
2619 %conv = zext i32 %1 to i64
2623 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2624 define dso_local i64 @ld_unalign16_uint64_t_uint32_t(ptr nocapture readonly %ptr) {
2625 ; CHECK-LABEL: ld_unalign16_uint64_t_uint32_t:
2626 ; CHECK: # %bb.0: # %entry
2627 ; CHECK-NEXT: lwz r3, 1(r3)
2630 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1
2631 %0 = load i32, ptr %add.ptr, align 4
2632 %conv = zext i32 %0 to i64
2636 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2637 define dso_local i64 @ld_align16_uint64_t_uint32_t(ptr nocapture readonly %ptr) {
2638 ; CHECK-LABEL: ld_align16_uint64_t_uint32_t:
2639 ; CHECK: # %bb.0: # %entry
2640 ; CHECK-NEXT: lwz r3, 8(r3)
2643 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
2644 %0 = load i32, ptr %add.ptr, align 4
2645 %conv = zext i32 %0 to i64
2649 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2650 define dso_local i64 @ld_unalign32_uint64_t_uint32_t(ptr nocapture readonly %ptr) {
2651 ; CHECK-P10-LABEL: ld_unalign32_uint64_t_uint32_t:
2652 ; CHECK-P10: # %bb.0: # %entry
2653 ; CHECK-P10-NEXT: plwz r3, 99999(r3), 0
2654 ; CHECK-P10-NEXT: blr
2656 ; CHECK-PREP10-LABEL: ld_unalign32_uint64_t_uint32_t:
2657 ; CHECK-PREP10: # %bb.0: # %entry
2658 ; CHECK-PREP10-NEXT: lis r4, 1
2659 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
2660 ; CHECK-PREP10-NEXT: lwzx r3, r3, r4
2661 ; CHECK-PREP10-NEXT: blr
2663 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999
2664 %0 = load i32, ptr %add.ptr, align 4
2665 %conv = zext i32 %0 to i64
2669 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2670 define dso_local i64 @ld_align32_uint64_t_uint32_t(ptr nocapture readonly %ptr) {
2671 ; CHECK-P10-LABEL: ld_align32_uint64_t_uint32_t:
2672 ; CHECK-P10: # %bb.0: # %entry
2673 ; CHECK-P10-NEXT: plwz r3, 99999000(r3), 0
2674 ; CHECK-P10-NEXT: blr
2676 ; CHECK-PREP10-LABEL: ld_align32_uint64_t_uint32_t:
2677 ; CHECK-PREP10: # %bb.0: # %entry
2678 ; CHECK-PREP10-NEXT: lis r4, 1525
2679 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
2680 ; CHECK-PREP10-NEXT: lwzx r3, r3, r4
2681 ; CHECK-PREP10-NEXT: blr
2683 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
2684 %0 = load i32, ptr %add.ptr, align 4
2685 %conv = zext i32 %0 to i64
2689 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2690 define dso_local i64 @ld_unalign64_uint64_t_uint32_t(ptr nocapture readonly %ptr) {
2691 ; CHECK-P10-LABEL: ld_unalign64_uint64_t_uint32_t:
2692 ; CHECK-P10: # %bb.0: # %entry
2693 ; CHECK-P10-NEXT: pli r4, 232
2694 ; CHECK-P10-NEXT: pli r5, 3567587329
2695 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2696 ; CHECK-P10-NEXT: lwzx r3, r3, r5
2697 ; CHECK-P10-NEXT: blr
2699 ; CHECK-PREP10-LABEL: ld_unalign64_uint64_t_uint32_t:
2700 ; CHECK-PREP10: # %bb.0: # %entry
2701 ; CHECK-PREP10-NEXT: li r4, 29
2702 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2703 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2704 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2705 ; CHECK-PREP10-NEXT: lwzx r3, r3, r4
2706 ; CHECK-PREP10-NEXT: blr
2708 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000001
2709 %0 = load i32, ptr %add.ptr, align 4
2710 %conv = zext i32 %0 to i64
2714 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2715 define dso_local i64 @ld_align64_uint64_t_uint32_t(ptr nocapture readonly %ptr) {
2716 ; CHECK-P10-LABEL: ld_align64_uint64_t_uint32_t:
2717 ; CHECK-P10: # %bb.0: # %entry
2718 ; CHECK-P10-NEXT: pli r4, 244140625
2719 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2720 ; CHECK-P10-NEXT: lwzx r3, r3, r4
2721 ; CHECK-P10-NEXT: blr
2723 ; CHECK-PREP10-LABEL: ld_align64_uint64_t_uint32_t:
2724 ; CHECK-PREP10: # %bb.0: # %entry
2725 ; CHECK-PREP10-NEXT: lis r4, 3725
2726 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2727 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2728 ; CHECK-PREP10-NEXT: lwzx r3, r3, r4
2729 ; CHECK-PREP10-NEXT: blr
2731 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
2732 %0 = load i32, ptr %add.ptr, align 4
2733 %conv = zext i32 %0 to i64
2737 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2738 define dso_local i64 @ld_reg_uint64_t_uint32_t(ptr nocapture readonly %ptr, i64 %off) {
2739 ; CHECK-LABEL: ld_reg_uint64_t_uint32_t:
2740 ; CHECK: # %bb.0: # %entry
2741 ; CHECK-NEXT: lwzx r3, r3, r4
2744 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
2745 %0 = load i32, ptr %add.ptr, align 4
2746 %conv = zext i32 %0 to i64
2750 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2751 define dso_local i64 @ld_or_uint64_t_uint32_t(i64 %ptr, i8 zeroext %off) {
2752 ; CHECK-LABEL: ld_or_uint64_t_uint32_t:
2753 ; CHECK: # %bb.0: # %entry
2754 ; CHECK-NEXT: or r3, r4, r3
2755 ; CHECK-NEXT: lwz r3, 0(r3)
2758 %conv = zext i8 %off to i64
2759 %or = or i64 %conv, %ptr
2760 %0 = inttoptr i64 %or to ptr
2761 %1 = load i32, ptr %0, align 4
2762 %conv1 = zext i32 %1 to i64
2766 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2767 define dso_local i64 @ld_or2_uint64_t_uint32_t(i64 %ptr, i8 zeroext %off) {
2768 ; CHECK-LABEL: ld_or2_uint64_t_uint32_t:
2769 ; CHECK: # %bb.0: # %entry
2770 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2771 ; CHECK-NEXT: lwzx r3, r3, r4
2774 %and = and i64 %ptr, -4096
2775 %conv = zext i8 %off to i64
2776 %or = or i64 %and, %conv
2777 %0 = inttoptr i64 %or to ptr
2778 %1 = load i32, ptr %0, align 4
2779 %conv1 = zext i32 %1 to i64
2783 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2784 define dso_local i64 @ld_not_disjoint16_uint64_t_uint32_t(i64 %ptr) {
2785 ; CHECK-LABEL: ld_not_disjoint16_uint64_t_uint32_t:
2786 ; CHECK: # %bb.0: # %entry
2787 ; CHECK-NEXT: ori r3, r3, 6
2788 ; CHECK-NEXT: lwz r3, 0(r3)
2791 %or = or i64 %ptr, 6
2792 %0 = inttoptr i64 %or to ptr
2793 %1 = load i32, ptr %0, align 4
2794 %conv = zext i32 %1 to i64
2798 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2799 define dso_local i64 @ld_disjoint_unalign16_uint64_t_uint32_t(i64 %ptr) {
2800 ; CHECK-LABEL: ld_disjoint_unalign16_uint64_t_uint32_t:
2801 ; CHECK: # %bb.0: # %entry
2802 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2803 ; CHECK-NEXT: lwz r3, 6(r3)
2806 %and = and i64 %ptr, -4096
2807 %or = or i64 %and, 6
2808 %0 = inttoptr i64 %or to ptr
2809 %1 = load i32, ptr %0, align 4
2810 %conv = zext i32 %1 to i64
2814 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2815 define dso_local i64 @ld_disjoint_align16_uint64_t_uint32_t(i64 %ptr) {
2816 ; CHECK-LABEL: ld_disjoint_align16_uint64_t_uint32_t:
2817 ; CHECK: # %bb.0: # %entry
2818 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2819 ; CHECK-NEXT: lwz r3, 24(r3)
2822 %and = and i64 %ptr, -4096
2823 %or = or i64 %and, 24
2824 %0 = inttoptr i64 %or to ptr
2825 %1 = load i32, ptr %0, align 8
2826 %conv = zext i32 %1 to i64
2830 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2831 define dso_local i64 @ld_not_disjoint32_uint64_t_uint32_t(i64 %ptr) {
2832 ; CHECK-LABEL: ld_not_disjoint32_uint64_t_uint32_t:
2833 ; CHECK: # %bb.0: # %entry
2834 ; CHECK-NEXT: ori r3, r3, 34463
2835 ; CHECK-NEXT: oris r3, r3, 1
2836 ; CHECK-NEXT: lwz r3, 0(r3)
2839 %or = or i64 %ptr, 99999
2840 %0 = inttoptr i64 %or to ptr
2841 %1 = load i32, ptr %0, align 4
2842 %conv = zext i32 %1 to i64
2846 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2847 define dso_local i64 @ld_disjoint_unalign32_uint64_t_uint32_t(i64 %ptr) {
2848 ; CHECK-P10-LABEL: ld_disjoint_unalign32_uint64_t_uint32_t:
2849 ; CHECK-P10: # %bb.0: # %entry
2850 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
2851 ; CHECK-P10-NEXT: plwz r3, 99999(r3), 0
2852 ; CHECK-P10-NEXT: blr
2854 ; CHECK-PREP10-LABEL: ld_disjoint_unalign32_uint64_t_uint32_t:
2855 ; CHECK-PREP10: # %bb.0: # %entry
2856 ; CHECK-PREP10-NEXT: lis r4, 1
2857 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
2858 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
2859 ; CHECK-PREP10-NEXT: lwzx r3, r3, r4
2860 ; CHECK-PREP10-NEXT: blr
2862 %and = and i64 %ptr, -1048576
2863 %or = or i64 %and, 99999
2864 %0 = inttoptr i64 %or to ptr
2865 %1 = load i32, ptr %0, align 4
2866 %conv = zext i32 %1 to i64
2870 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2871 define dso_local i64 @ld_disjoint_align32_uint64_t_uint32_t(i64 %ptr) {
2872 ; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_uint32_t:
2873 ; CHECK-P10: # %bb.0: # %entry
2874 ; CHECK-P10-NEXT: lis r4, -15264
2875 ; CHECK-P10-NEXT: and r3, r3, r4
2876 ; CHECK-P10-NEXT: plwz r3, 999990000(r3), 0
2877 ; CHECK-P10-NEXT: blr
2879 ; CHECK-P9-LABEL: ld_disjoint_align32_uint64_t_uint32_t:
2880 ; CHECK-P9: # %bb.0: # %entry
2881 ; CHECK-P9-NEXT: lis r4, -15264
2882 ; CHECK-P9-NEXT: and r3, r3, r4
2883 ; CHECK-P9-NEXT: lis r4, 15258
2884 ; CHECK-P9-NEXT: ori r4, r4, 41712
2885 ; CHECK-P9-NEXT: lwzx r3, r3, r4
2886 ; CHECK-P9-NEXT: blr
2888 ; CHECK-P8-LABEL: ld_disjoint_align32_uint64_t_uint32_t:
2889 ; CHECK-P8: # %bb.0: # %entry
2890 ; CHECK-P8-NEXT: lis r4, -15264
2891 ; CHECK-P8-NEXT: lis r5, 15258
2892 ; CHECK-P8-NEXT: and r3, r3, r4
2893 ; CHECK-P8-NEXT: ori r4, r5, 41712
2894 ; CHECK-P8-NEXT: lwzx r3, r3, r4
2895 ; CHECK-P8-NEXT: blr
2897 %and = and i64 %ptr, -1000341504
2898 %or = or i64 %and, 999990000
2899 %0 = inttoptr i64 %or to ptr
2900 %1 = load i32, ptr %0, align 16
2901 %conv = zext i32 %1 to i64
2905 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2906 define dso_local i64 @ld_not_disjoint64_uint64_t_uint32_t(i64 %ptr) {
2907 ; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_uint32_t:
2908 ; CHECK-P10: # %bb.0: # %entry
2909 ; CHECK-P10-NEXT: pli r4, 232
2910 ; CHECK-P10-NEXT: pli r5, 3567587329
2911 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2912 ; CHECK-P10-NEXT: or r3, r3, r5
2913 ; CHECK-P10-NEXT: lwz r3, 0(r3)
2914 ; CHECK-P10-NEXT: blr
2916 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_uint32_t:
2917 ; CHECK-PREP10: # %bb.0: # %entry
2918 ; CHECK-PREP10-NEXT: li r4, 29
2919 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2920 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2921 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2922 ; CHECK-PREP10-NEXT: or r3, r3, r4
2923 ; CHECK-PREP10-NEXT: lwz r3, 0(r3)
2924 ; CHECK-PREP10-NEXT: blr
2926 %or = or i64 %ptr, 1000000000001
2927 %0 = inttoptr i64 %or to ptr
2928 %1 = load i32, ptr %0, align 4
2929 %conv = zext i32 %1 to i64
2933 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2934 define dso_local i64 @ld_disjoint_unalign64_uint64_t_uint32_t(i64 %ptr) {
2935 ; CHECK-P10-LABEL: ld_disjoint_unalign64_uint64_t_uint32_t:
2936 ; CHECK-P10: # %bb.0: # %entry
2937 ; CHECK-P10-NEXT: pli r4, 232
2938 ; CHECK-P10-NEXT: pli r5, 3567587329
2939 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
2940 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2941 ; CHECK-P10-NEXT: lwzx r3, r3, r5
2942 ; CHECK-P10-NEXT: blr
2944 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint64_t_uint32_t:
2945 ; CHECK-PREP10: # %bb.0: # %entry
2946 ; CHECK-PREP10-NEXT: li r4, 29
2947 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
2948 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2949 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2950 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2951 ; CHECK-PREP10-NEXT: lwzx r3, r3, r4
2952 ; CHECK-PREP10-NEXT: blr
2954 %and = and i64 %ptr, -1099511627776
2955 %or = or i64 %and, 1000000000001
2956 %0 = inttoptr i64 %or to ptr
2957 %1 = load i32, ptr %0, align 4
2958 %conv = zext i32 %1 to i64
2962 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2963 define dso_local i64 @ld_disjoint_align64_uint64_t_uint32_t(i64 %ptr) {
2964 ; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_uint32_t:
2965 ; CHECK-P10: # %bb.0: # %entry
2966 ; CHECK-P10-NEXT: pli r4, 244140625
2967 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
2968 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2969 ; CHECK-P10-NEXT: lwzx r3, r3, r4
2970 ; CHECK-P10-NEXT: blr
2972 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_uint32_t:
2973 ; CHECK-PREP10: # %bb.0: # %entry
2974 ; CHECK-PREP10-NEXT: lis r4, 3725
2975 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
2976 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2977 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2978 ; CHECK-PREP10-NEXT: lwzx r3, r3, r4
2979 ; CHECK-PREP10-NEXT: blr
2981 %and = and i64 %ptr, -1099511627776
2982 %or = or i64 %and, 1000000000000
2983 %0 = inttoptr i64 %or to ptr
2984 %1 = load i32, ptr %0, align 4096
2985 %conv = zext i32 %1 to i64
2989 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2990 define dso_local i64 @ld_cst_unalign16_uint64_t_uint32_t() {
2991 ; CHECK-LABEL: ld_cst_unalign16_uint64_t_uint32_t:
2992 ; CHECK: # %bb.0: # %entry
2993 ; CHECK-NEXT: lwz r3, 255(0)
2996 %0 = load i32, ptr inttoptr (i64 255 to ptr), align 4
2997 %conv = zext i32 %0 to i64
3001 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3002 define dso_local i64 @ld_cst_align16_uint64_t_uint32_t() {
3003 ; CHECK-LABEL: ld_cst_align16_uint64_t_uint32_t:
3004 ; CHECK: # %bb.0: # %entry
3005 ; CHECK-NEXT: lwz r3, 4080(0)
3008 %0 = load i32, ptr inttoptr (i64 4080 to ptr), align 16
3009 %conv = zext i32 %0 to i64
3013 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3014 define dso_local i64 @ld_cst_unalign32_uint64_t_uint32_t() {
3015 ; CHECK-LABEL: ld_cst_unalign32_uint64_t_uint32_t:
3016 ; CHECK: # %bb.0: # %entry
3017 ; CHECK-NEXT: lis r3, 2
3018 ; CHECK-NEXT: lwz r3, -31073(r3)
3021 %0 = load i32, ptr inttoptr (i64 99999 to ptr), align 4
3022 %conv = zext i32 %0 to i64
3026 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3027 define dso_local i64 @ld_cst_align32_uint64_t_uint32_t() {
3028 ; CHECK-LABEL: ld_cst_align32_uint64_t_uint32_t:
3029 ; CHECK: # %bb.0: # %entry
3030 ; CHECK-NEXT: lis r3, 153
3031 ; CHECK-NEXT: lwz r3, -27108(r3)
3034 %0 = load i32, ptr inttoptr (i64 9999900 to ptr), align 4
3035 %conv = zext i32 %0 to i64
3039 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3040 define dso_local i64 @ld_cst_unalign64_uint64_t_uint32_t() {
3041 ; CHECK-P10-LABEL: ld_cst_unalign64_uint64_t_uint32_t:
3042 ; CHECK-P10: # %bb.0: # %entry
3043 ; CHECK-P10-NEXT: pli r3, 232
3044 ; CHECK-P10-NEXT: pli r4, 3567587329
3045 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
3046 ; CHECK-P10-NEXT: lwz r3, 0(r4)
3047 ; CHECK-P10-NEXT: blr
3049 ; CHECK-PREP10-LABEL: ld_cst_unalign64_uint64_t_uint32_t:
3050 ; CHECK-PREP10: # %bb.0: # %entry
3051 ; CHECK-PREP10-NEXT: li r3, 29
3052 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
3053 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
3054 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
3055 ; CHECK-PREP10-NEXT: lwz r3, 0(r3)
3056 ; CHECK-PREP10-NEXT: blr
3058 %0 = load i32, ptr inttoptr (i64 1000000000001 to ptr), align 4
3059 %conv = zext i32 %0 to i64
3063 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3064 define dso_local i64 @ld_cst_align64_uint64_t_uint32_t() {
3065 ; CHECK-P10-LABEL: ld_cst_align64_uint64_t_uint32_t:
3066 ; CHECK-P10: # %bb.0: # %entry
3067 ; CHECK-P10-NEXT: pli r3, 244140625
3068 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
3069 ; CHECK-P10-NEXT: lwz r3, 0(r3)
3070 ; CHECK-P10-NEXT: blr
3072 ; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_uint32_t:
3073 ; CHECK-PREP10: # %bb.0: # %entry
3074 ; CHECK-PREP10-NEXT: lis r3, 3725
3075 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
3076 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
3077 ; CHECK-PREP10-NEXT: lwz r3, 0(r3)
3078 ; CHECK-PREP10-NEXT: blr
3080 %0 = load i32, ptr inttoptr (i64 1000000000000 to ptr), align 4096
3081 %conv = zext i32 %0 to i64
3085 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3086 define dso_local i64 @ld_0_uint64_t_int32_t(i64 %ptr) {
3087 ; CHECK-LABEL: ld_0_uint64_t_int32_t:
3088 ; CHECK: # %bb.0: # %entry
3089 ; CHECK-NEXT: lwa r3, 0(r3)
3092 %0 = inttoptr i64 %ptr to ptr
3093 %1 = load i32, ptr %0, align 4
3094 %conv = sext i32 %1 to i64
3098 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3099 define dso_local i64 @ld_unalign16_uint64_t_int32_t(ptr nocapture readonly %ptr) {
3100 ; CHECK-P10-LABEL: ld_unalign16_uint64_t_int32_t:
3101 ; CHECK-P10: # %bb.0: # %entry
3102 ; CHECK-P10-NEXT: plwa r3, 1(r3), 0
3103 ; CHECK-P10-NEXT: blr
3105 ; CHECK-PREP10-LABEL: ld_unalign16_uint64_t_int32_t:
3106 ; CHECK-PREP10: # %bb.0: # %entry
3107 ; CHECK-PREP10-NEXT: li r4, 1
3108 ; CHECK-PREP10-NEXT: lwax r3, r3, r4
3109 ; CHECK-PREP10-NEXT: blr
3111 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1
3112 %0 = load i32, ptr %add.ptr, align 4
3113 %conv = sext i32 %0 to i64
3117 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3118 define dso_local i64 @ld_align16_uint64_t_int32_t(ptr nocapture readonly %ptr) {
3119 ; CHECK-LABEL: ld_align16_uint64_t_int32_t:
3120 ; CHECK: # %bb.0: # %entry
3121 ; CHECK-NEXT: lwa r3, 8(r3)
3124 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
3125 %0 = load i32, ptr %add.ptr, align 4
3126 %conv = sext i32 %0 to i64
3130 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3131 define dso_local i64 @ld_unalign32_uint64_t_int32_t(ptr nocapture readonly %ptr) {
3132 ; CHECK-P10-LABEL: ld_unalign32_uint64_t_int32_t:
3133 ; CHECK-P10: # %bb.0: # %entry
3134 ; CHECK-P10-NEXT: plwa r3, 99999(r3), 0
3135 ; CHECK-P10-NEXT: blr
3137 ; CHECK-PREP10-LABEL: ld_unalign32_uint64_t_int32_t:
3138 ; CHECK-PREP10: # %bb.0: # %entry
3139 ; CHECK-PREP10-NEXT: lis r4, 1
3140 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
3141 ; CHECK-PREP10-NEXT: lwax r3, r3, r4
3142 ; CHECK-PREP10-NEXT: blr
3144 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999
3145 %0 = load i32, ptr %add.ptr, align 4
3146 %conv = sext i32 %0 to i64
3150 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3151 define dso_local i64 @ld_align32_uint64_t_int32_t(ptr nocapture readonly %ptr) {
3152 ; CHECK-P10-LABEL: ld_align32_uint64_t_int32_t:
3153 ; CHECK-P10: # %bb.0: # %entry
3154 ; CHECK-P10-NEXT: plwa r3, 99999000(r3), 0
3155 ; CHECK-P10-NEXT: blr
3157 ; CHECK-PREP10-LABEL: ld_align32_uint64_t_int32_t:
3158 ; CHECK-PREP10: # %bb.0: # %entry
3159 ; CHECK-PREP10-NEXT: lis r4, 1525
3160 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
3161 ; CHECK-PREP10-NEXT: lwax r3, r3, r4
3162 ; CHECK-PREP10-NEXT: blr
3164 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
3165 %0 = load i32, ptr %add.ptr, align 4
3166 %conv = sext i32 %0 to i64
3170 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3171 define dso_local i64 @ld_unalign64_uint64_t_int32_t(ptr nocapture readonly %ptr) {
3172 ; CHECK-P10-LABEL: ld_unalign64_uint64_t_int32_t:
3173 ; CHECK-P10: # %bb.0: # %entry
3174 ; CHECK-P10-NEXT: pli r4, 232
3175 ; CHECK-P10-NEXT: pli r5, 3567587329
3176 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
3177 ; CHECK-P10-NEXT: lwax r3, r3, r5
3178 ; CHECK-P10-NEXT: blr
3180 ; CHECK-PREP10-LABEL: ld_unalign64_uint64_t_int32_t:
3181 ; CHECK-PREP10: # %bb.0: # %entry
3182 ; CHECK-PREP10-NEXT: li r4, 29
3183 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
3184 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
3185 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
3186 ; CHECK-PREP10-NEXT: lwax r3, r3, r4
3187 ; CHECK-PREP10-NEXT: blr
3189 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000001
3190 %0 = load i32, ptr %add.ptr, align 4
3191 %conv = sext i32 %0 to i64
3195 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3196 define dso_local i64 @ld_align64_uint64_t_int32_t(ptr nocapture readonly %ptr) {
3197 ; CHECK-P10-LABEL: ld_align64_uint64_t_int32_t:
3198 ; CHECK-P10: # %bb.0: # %entry
3199 ; CHECK-P10-NEXT: pli r4, 244140625
3200 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
3201 ; CHECK-P10-NEXT: lwax r3, r3, r4
3202 ; CHECK-P10-NEXT: blr
3204 ; CHECK-PREP10-LABEL: ld_align64_uint64_t_int32_t:
3205 ; CHECK-PREP10: # %bb.0: # %entry
3206 ; CHECK-PREP10-NEXT: lis r4, 3725
3207 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
3208 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
3209 ; CHECK-PREP10-NEXT: lwax r3, r3, r4
3210 ; CHECK-PREP10-NEXT: blr
3212 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
3213 %0 = load i32, ptr %add.ptr, align 4
3214 %conv = sext i32 %0 to i64
3218 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3219 define dso_local i64 @ld_reg_uint64_t_int32_t(ptr nocapture readonly %ptr, i64 %off) {
3220 ; CHECK-LABEL: ld_reg_uint64_t_int32_t:
3221 ; CHECK: # %bb.0: # %entry
3222 ; CHECK-NEXT: lwax r3, r3, r4
3225 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
3226 %0 = load i32, ptr %add.ptr, align 4
3227 %conv = sext i32 %0 to i64
3231 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3232 define dso_local i64 @ld_or_uint64_t_int32_t(i64 %ptr, i8 zeroext %off) {
3233 ; CHECK-LABEL: ld_or_uint64_t_int32_t:
3234 ; CHECK: # %bb.0: # %entry
3235 ; CHECK-NEXT: or r3, r4, r3
3236 ; CHECK-NEXT: lwa r3, 0(r3)
3239 %conv = zext i8 %off to i64
3240 %or = or i64 %conv, %ptr
3241 %0 = inttoptr i64 %or to ptr
3242 %1 = load i32, ptr %0, align 4
3243 %conv1 = sext i32 %1 to i64
3247 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3248 define dso_local i64 @ld_or2_uint64_t_int32_t(i64 %ptr, i8 zeroext %off) {
3249 ; CHECK-LABEL: ld_or2_uint64_t_int32_t:
3250 ; CHECK: # %bb.0: # %entry
3251 ; CHECK-NEXT: rldicr r3, r3, 0, 51
3252 ; CHECK-NEXT: lwax r3, r3, r4
3255 %and = and i64 %ptr, -4096
3256 %conv = zext i8 %off to i64
3257 %or = or i64 %and, %conv
3258 %0 = inttoptr i64 %or to ptr
3259 %1 = load i32, ptr %0, align 4
3260 %conv1 = sext i32 %1 to i64
3264 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3265 define dso_local i64 @ld_not_disjoint16_uint64_t_int32_t(i64 %ptr) {
3266 ; CHECK-LABEL: ld_not_disjoint16_uint64_t_int32_t:
3267 ; CHECK: # %bb.0: # %entry
3268 ; CHECK-NEXT: ori r3, r3, 6
3269 ; CHECK-NEXT: lwa r3, 0(r3)
3272 %or = or i64 %ptr, 6
3273 %0 = inttoptr i64 %or to ptr
3274 %1 = load i32, ptr %0, align 4
3275 %conv = sext i32 %1 to i64
3279 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3280 define dso_local i64 @ld_disjoint_unalign16_uint64_t_int32_t(i64 %ptr) {
3281 ; CHECK-P10-LABEL: ld_disjoint_unalign16_uint64_t_int32_t:
3282 ; CHECK-P10: # %bb.0: # %entry
3283 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
3284 ; CHECK-P10-NEXT: plwa r3, 6(r3), 0
3285 ; CHECK-P10-NEXT: blr
3287 ; CHECK-P9-LABEL: ld_disjoint_unalign16_uint64_t_int32_t:
3288 ; CHECK-P9: # %bb.0: # %entry
3289 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
3290 ; CHECK-P9-NEXT: li r4, 6
3291 ; CHECK-P9-NEXT: lwax r3, r3, r4
3292 ; CHECK-P9-NEXT: blr
3294 ; CHECK-P8-LABEL: ld_disjoint_unalign16_uint64_t_int32_t:
3295 ; CHECK-P8: # %bb.0: # %entry
3296 ; CHECK-P8-NEXT: li r4, 6
3297 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
3298 ; CHECK-P8-NEXT: lwax r3, r3, r4
3299 ; CHECK-P8-NEXT: blr
3301 %and = and i64 %ptr, -4096
3302 %or = or i64 %and, 6
3303 %0 = inttoptr i64 %or to ptr
3304 %1 = load i32, ptr %0, align 4
3305 %conv = sext i32 %1 to i64
3309 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3310 define dso_local i64 @ld_disjoint_align16_uint64_t_int32_t(i64 %ptr) {
3311 ; CHECK-LABEL: ld_disjoint_align16_uint64_t_int32_t:
3312 ; CHECK: # %bb.0: # %entry
3313 ; CHECK-NEXT: rldicr r3, r3, 0, 51
3314 ; CHECK-NEXT: lwa r3, 24(r3)
3317 %and = and i64 %ptr, -4096
3318 %or = or i64 %and, 24
3319 %0 = inttoptr i64 %or to ptr
3320 %1 = load i32, ptr %0, align 8
3321 %conv = sext i32 %1 to i64
3325 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3326 define dso_local i64 @ld_not_disjoint32_uint64_t_int32_t(i64 %ptr) {
3327 ; CHECK-LABEL: ld_not_disjoint32_uint64_t_int32_t:
3328 ; CHECK: # %bb.0: # %entry
3329 ; CHECK-NEXT: ori r3, r3, 34463
3330 ; CHECK-NEXT: oris r3, r3, 1
3331 ; CHECK-NEXT: lwa r3, 0(r3)
3334 %or = or i64 %ptr, 99999
3335 %0 = inttoptr i64 %or to ptr
3336 %1 = load i32, ptr %0, align 4
3337 %conv = sext i32 %1 to i64
3341 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3342 define dso_local i64 @ld_disjoint_unalign32_uint64_t_int32_t(i64 %ptr) {
3343 ; CHECK-P10-LABEL: ld_disjoint_unalign32_uint64_t_int32_t:
3344 ; CHECK-P10: # %bb.0: # %entry
3345 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
3346 ; CHECK-P10-NEXT: plwa r3, 99999(r3), 0
3347 ; CHECK-P10-NEXT: blr
3349 ; CHECK-PREP10-LABEL: ld_disjoint_unalign32_uint64_t_int32_t:
3350 ; CHECK-PREP10: # %bb.0: # %entry
3351 ; CHECK-PREP10-NEXT: lis r4, 1
3352 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
3353 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
3354 ; CHECK-PREP10-NEXT: lwax r3, r3, r4
3355 ; CHECK-PREP10-NEXT: blr
3357 %and = and i64 %ptr, -1048576
3358 %or = or i64 %and, 99999
3359 %0 = inttoptr i64 %or to ptr
3360 %1 = load i32, ptr %0, align 4
3361 %conv = sext i32 %1 to i64
3365 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3366 define dso_local i64 @ld_disjoint_align32_uint64_t_int32_t(i64 %ptr) {
3367 ; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_int32_t:
3368 ; CHECK-P10: # %bb.0: # %entry
3369 ; CHECK-P10-NEXT: lis r4, -15264
3370 ; CHECK-P10-NEXT: and r3, r3, r4
3371 ; CHECK-P10-NEXT: plwa r3, 999990000(r3), 0
3372 ; CHECK-P10-NEXT: blr
3374 ; CHECK-P9-LABEL: ld_disjoint_align32_uint64_t_int32_t:
3375 ; CHECK-P9: # %bb.0: # %entry
3376 ; CHECK-P9-NEXT: lis r4, -15264
3377 ; CHECK-P9-NEXT: and r3, r3, r4
3378 ; CHECK-P9-NEXT: lis r4, 15258
3379 ; CHECK-P9-NEXT: ori r4, r4, 41712
3380 ; CHECK-P9-NEXT: lwax r3, r3, r4
3381 ; CHECK-P9-NEXT: blr
3383 ; CHECK-P8-LABEL: ld_disjoint_align32_uint64_t_int32_t:
3384 ; CHECK-P8: # %bb.0: # %entry
3385 ; CHECK-P8-NEXT: lis r4, -15264
3386 ; CHECK-P8-NEXT: lis r5, 15258
3387 ; CHECK-P8-NEXT: and r3, r3, r4
3388 ; CHECK-P8-NEXT: ori r4, r5, 41712
3389 ; CHECK-P8-NEXT: lwax r3, r3, r4
3390 ; CHECK-P8-NEXT: blr
3392 %and = and i64 %ptr, -1000341504
3393 %or = or i64 %and, 999990000
3394 %0 = inttoptr i64 %or to ptr
3395 %1 = load i32, ptr %0, align 16
3396 %conv = sext i32 %1 to i64
3400 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3401 define dso_local i64 @ld_not_disjoint64_uint64_t_int32_t(i64 %ptr) {
3402 ; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_int32_t:
3403 ; CHECK-P10: # %bb.0: # %entry
3404 ; CHECK-P10-NEXT: pli r4, 232
3405 ; CHECK-P10-NEXT: pli r5, 3567587329
3406 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
3407 ; CHECK-P10-NEXT: or r3, r3, r5
3408 ; CHECK-P10-NEXT: lwa r3, 0(r3)
3409 ; CHECK-P10-NEXT: blr
3411 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_int32_t:
3412 ; CHECK-PREP10: # %bb.0: # %entry
3413 ; CHECK-PREP10-NEXT: li r4, 29
3414 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
3415 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
3416 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
3417 ; CHECK-PREP10-NEXT: or r3, r3, r4
3418 ; CHECK-PREP10-NEXT: lwa r3, 0(r3)
3419 ; CHECK-PREP10-NEXT: blr
3421 %or = or i64 %ptr, 1000000000001
3422 %0 = inttoptr i64 %or to ptr
3423 %1 = load i32, ptr %0, align 4
3424 %conv = sext i32 %1 to i64
3428 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3429 define dso_local i64 @ld_disjoint_unalign64_uint64_t_int32_t(i64 %ptr) {
3430 ; CHECK-P10-LABEL: ld_disjoint_unalign64_uint64_t_int32_t:
3431 ; CHECK-P10: # %bb.0: # %entry
3432 ; CHECK-P10-NEXT: pli r4, 232
3433 ; CHECK-P10-NEXT: pli r5, 3567587329
3434 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
3435 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
3436 ; CHECK-P10-NEXT: lwax r3, r3, r5
3437 ; CHECK-P10-NEXT: blr
3439 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint64_t_int32_t:
3440 ; CHECK-PREP10: # %bb.0: # %entry
3441 ; CHECK-PREP10-NEXT: li r4, 29
3442 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
3443 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
3444 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
3445 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
3446 ; CHECK-PREP10-NEXT: lwax r3, r3, r4
3447 ; CHECK-PREP10-NEXT: blr
3449 %and = and i64 %ptr, -1099511627776
3450 %or = or i64 %and, 1000000000001
3451 %0 = inttoptr i64 %or to ptr
3452 %1 = load i32, ptr %0, align 4
3453 %conv = sext i32 %1 to i64
3457 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3458 define dso_local i64 @ld_disjoint_align64_uint64_t_int32_t(i64 %ptr) {
3459 ; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_int32_t:
3460 ; CHECK-P10: # %bb.0: # %entry
3461 ; CHECK-P10-NEXT: pli r4, 244140625
3462 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
3463 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
3464 ; CHECK-P10-NEXT: lwax r3, r3, r4
3465 ; CHECK-P10-NEXT: blr
3467 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_int32_t:
3468 ; CHECK-PREP10: # %bb.0: # %entry
3469 ; CHECK-PREP10-NEXT: lis r4, 3725
3470 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
3471 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
3472 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
3473 ; CHECK-PREP10-NEXT: lwax r3, r3, r4
3474 ; CHECK-PREP10-NEXT: blr
3476 %and = and i64 %ptr, -1099511627776
3477 %or = or i64 %and, 1000000000000
3478 %0 = inttoptr i64 %or to ptr
3479 %1 = load i32, ptr %0, align 4096
3480 %conv = sext i32 %1 to i64
3484 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3485 define dso_local i64 @ld_cst_unalign16_uint64_t_int32_t() {
3486 ; CHECK-LABEL: ld_cst_unalign16_uint64_t_int32_t:
3487 ; CHECK: # %bb.0: # %entry
3488 ; CHECK-NEXT: li r3, 255
3489 ; CHECK-NEXT: lwa r3, 0(r3)
3492 %0 = load i32, ptr inttoptr (i64 255 to ptr), align 4
3493 %conv = sext i32 %0 to i64
3497 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3498 define dso_local i64 @ld_cst_align16_uint64_t_int32_t() {
3499 ; CHECK-LABEL: ld_cst_align16_uint64_t_int32_t:
3500 ; CHECK: # %bb.0: # %entry
3501 ; CHECK-NEXT: lwa r3, 4080(0)
3504 %0 = load i32, ptr inttoptr (i64 4080 to ptr), align 16
3505 %conv = sext i32 %0 to i64
3509 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3510 define dso_local i64 @ld_cst_unalign32_uint64_t_int32_t() {
3511 ; CHECK-P10-LABEL: ld_cst_unalign32_uint64_t_int32_t:
3512 ; CHECK-P10: # %bb.0: # %entry
3513 ; CHECK-P10-NEXT: pli r3, 99999
3514 ; CHECK-P10-NEXT: lwa r3, 0(r3)
3515 ; CHECK-P10-NEXT: blr
3517 ; CHECK-PREP10-LABEL: ld_cst_unalign32_uint64_t_int32_t:
3518 ; CHECK-PREP10: # %bb.0: # %entry
3519 ; CHECK-PREP10-NEXT: lis r3, 1
3520 ; CHECK-PREP10-NEXT: ori r3, r3, 34463
3521 ; CHECK-PREP10-NEXT: lwa r3, 0(r3)
3522 ; CHECK-PREP10-NEXT: blr
3524 %0 = load i32, ptr inttoptr (i64 99999 to ptr), align 4
3525 %conv = sext i32 %0 to i64
3529 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3530 define dso_local i64 @ld_cst_align32_uint64_t_int32_t() {
3531 ; CHECK-LABEL: ld_cst_align32_uint64_t_int32_t:
3532 ; CHECK: # %bb.0: # %entry
3533 ; CHECK-NEXT: lis r3, 153
3534 ; CHECK-NEXT: lwa r3, -27108(r3)
3537 %0 = load i32, ptr inttoptr (i64 9999900 to ptr), align 4
3538 %conv = sext i32 %0 to i64
3542 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3543 define dso_local i64 @ld_cst_unalign64_uint64_t_int32_t() {
3544 ; CHECK-P10-LABEL: ld_cst_unalign64_uint64_t_int32_t:
3545 ; CHECK-P10: # %bb.0: # %entry
3546 ; CHECK-P10-NEXT: pli r3, 232
3547 ; CHECK-P10-NEXT: pli r4, 3567587329
3548 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
3549 ; CHECK-P10-NEXT: lwa r3, 0(r4)
3550 ; CHECK-P10-NEXT: blr
3552 ; CHECK-PREP10-LABEL: ld_cst_unalign64_uint64_t_int32_t:
3553 ; CHECK-PREP10: # %bb.0: # %entry
3554 ; CHECK-PREP10-NEXT: li r3, 29
3555 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
3556 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
3557 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
3558 ; CHECK-PREP10-NEXT: lwa r3, 0(r3)
3559 ; CHECK-PREP10-NEXT: blr
3561 %0 = load i32, ptr inttoptr (i64 1000000000001 to ptr), align 4
3562 %conv = sext i32 %0 to i64
3566 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3567 define dso_local i64 @ld_cst_align64_uint64_t_int32_t() {
3568 ; CHECK-P10-LABEL: ld_cst_align64_uint64_t_int32_t:
3569 ; CHECK-P10: # %bb.0: # %entry
3570 ; CHECK-P10-NEXT: pli r3, 244140625
3571 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
3572 ; CHECK-P10-NEXT: lwa r3, 0(r3)
3573 ; CHECK-P10-NEXT: blr
3575 ; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_int32_t:
3576 ; CHECK-PREP10: # %bb.0: # %entry
3577 ; CHECK-PREP10-NEXT: lis r3, 3725
3578 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
3579 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
3580 ; CHECK-PREP10-NEXT: lwa r3, 0(r3)
3581 ; CHECK-PREP10-NEXT: blr
3583 %0 = load i32, ptr inttoptr (i64 1000000000000 to ptr), align 4096
3584 %conv = sext i32 %0 to i64
3588 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3589 define dso_local i64 @ld_0_uint64_t_uint64_t(i64 %ptr) {
3590 ; CHECK-LABEL: ld_0_uint64_t_uint64_t:
3591 ; CHECK: # %bb.0: # %entry
3592 ; CHECK-NEXT: ld r3, 0(r3)
3595 %0 = inttoptr i64 %ptr to ptr
3596 %1 = load i64, ptr %0, align 8
3600 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3601 define dso_local i64 @ld_unalign16_uint64_t_uint64_t(ptr nocapture readonly %ptr) {
3602 ; CHECK-P10-LABEL: ld_unalign16_uint64_t_uint64_t:
3603 ; CHECK-P10: # %bb.0: # %entry
3604 ; CHECK-P10-NEXT: pld r3, 1(r3), 0
3605 ; CHECK-P10-NEXT: blr
3607 ; CHECK-PREP10-LABEL: ld_unalign16_uint64_t_uint64_t:
3608 ; CHECK-PREP10: # %bb.0: # %entry
3609 ; CHECK-PREP10-NEXT: li r4, 1
3610 ; CHECK-PREP10-NEXT: ldx r3, r3, r4
3611 ; CHECK-PREP10-NEXT: blr
3613 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1
3614 %0 = load i64, ptr %add.ptr, align 8
3618 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3619 define dso_local i64 @ld_align16_uint64_t_uint64_t(ptr nocapture readonly %ptr) {
3620 ; CHECK-LABEL: ld_align16_uint64_t_uint64_t:
3621 ; CHECK: # %bb.0: # %entry
3622 ; CHECK-NEXT: ld r3, 8(r3)
3625 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
3626 %0 = load i64, ptr %add.ptr, align 8
3630 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3631 define dso_local i64 @ld_unalign32_uint64_t_uint64_t(ptr nocapture readonly %ptr) {
3632 ; CHECK-P10-LABEL: ld_unalign32_uint64_t_uint64_t:
3633 ; CHECK-P10: # %bb.0: # %entry
3634 ; CHECK-P10-NEXT: pld r3, 99999(r3), 0
3635 ; CHECK-P10-NEXT: blr
3637 ; CHECK-PREP10-LABEL: ld_unalign32_uint64_t_uint64_t:
3638 ; CHECK-PREP10: # %bb.0: # %entry
3639 ; CHECK-PREP10-NEXT: lis r4, 1
3640 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
3641 ; CHECK-PREP10-NEXT: ldx r3, r3, r4
3642 ; CHECK-PREP10-NEXT: blr
3644 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999
3645 %0 = load i64, ptr %add.ptr, align 8
3649 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3650 define dso_local i64 @ld_align32_uint64_t_uint64_t(ptr nocapture readonly %ptr) {
3651 ; CHECK-P10-LABEL: ld_align32_uint64_t_uint64_t:
3652 ; CHECK-P10: # %bb.0: # %entry
3653 ; CHECK-P10-NEXT: pld r3, 99999000(r3), 0
3654 ; CHECK-P10-NEXT: blr
3656 ; CHECK-PREP10-LABEL: ld_align32_uint64_t_uint64_t:
3657 ; CHECK-PREP10: # %bb.0: # %entry
3658 ; CHECK-PREP10-NEXT: lis r4, 1525
3659 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
3660 ; CHECK-PREP10-NEXT: ldx r3, r3, r4
3661 ; CHECK-PREP10-NEXT: blr
3663 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
3664 %0 = load i64, ptr %add.ptr, align 8
3668 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3669 define dso_local i64 @ld_unalign64_uint64_t_uint64_t(ptr nocapture readonly %ptr) {
3670 ; CHECK-P10-LABEL: ld_unalign64_uint64_t_uint64_t:
3671 ; CHECK-P10: # %bb.0: # %entry
3672 ; CHECK-P10-NEXT: pli r4, 232
3673 ; CHECK-P10-NEXT: pli r5, 3567587329
3674 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
3675 ; CHECK-P10-NEXT: ldx r3, r3, r5
3676 ; CHECK-P10-NEXT: blr
3678 ; CHECK-PREP10-LABEL: ld_unalign64_uint64_t_uint64_t:
3679 ; CHECK-PREP10: # %bb.0: # %entry
3680 ; CHECK-PREP10-NEXT: li r4, 29
3681 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
3682 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
3683 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
3684 ; CHECK-PREP10-NEXT: ldx r3, r3, r4
3685 ; CHECK-PREP10-NEXT: blr
3687 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000001
3688 %0 = load i64, ptr %add.ptr, align 8
3692 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3693 define dso_local i64 @ld_align64_uint64_t_uint64_t(ptr nocapture readonly %ptr) {
3694 ; CHECK-P10-LABEL: ld_align64_uint64_t_uint64_t:
3695 ; CHECK-P10: # %bb.0: # %entry
3696 ; CHECK-P10-NEXT: pli r4, 244140625
3697 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
3698 ; CHECK-P10-NEXT: ldx r3, r3, r4
3699 ; CHECK-P10-NEXT: blr
3701 ; CHECK-PREP10-LABEL: ld_align64_uint64_t_uint64_t:
3702 ; CHECK-PREP10: # %bb.0: # %entry
3703 ; CHECK-PREP10-NEXT: lis r4, 3725
3704 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
3705 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
3706 ; CHECK-PREP10-NEXT: ldx r3, r3, r4
3707 ; CHECK-PREP10-NEXT: blr
3709 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
3710 %0 = load i64, ptr %add.ptr, align 8
3714 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3715 define dso_local i64 @ld_reg_uint64_t_uint64_t(ptr nocapture readonly %ptr, i64 %off) {
3716 ; CHECK-LABEL: ld_reg_uint64_t_uint64_t:
3717 ; CHECK: # %bb.0: # %entry
3718 ; CHECK-NEXT: ldx r3, r3, r4
3721 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
3722 %0 = load i64, ptr %add.ptr, align 8
3726 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3727 define dso_local i64 @ld_or_uint64_t_uint64_t(i64 %ptr, i8 zeroext %off) {
3728 ; CHECK-LABEL: ld_or_uint64_t_uint64_t:
3729 ; CHECK: # %bb.0: # %entry
3730 ; CHECK-NEXT: or r3, r4, r3
3731 ; CHECK-NEXT: ld r3, 0(r3)
3734 %conv = zext i8 %off to i64
3735 %or = or i64 %conv, %ptr
3736 %0 = inttoptr i64 %or to ptr
3737 %1 = load i64, ptr %0, align 8
3741 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3742 define dso_local i64 @ld_or2_uint64_t_uint64_t(i64 %ptr, i8 zeroext %off) {
3743 ; CHECK-LABEL: ld_or2_uint64_t_uint64_t:
3744 ; CHECK: # %bb.0: # %entry
3745 ; CHECK-NEXT: rldicr r3, r3, 0, 51
3746 ; CHECK-NEXT: ldx r3, r3, r4
3749 %and = and i64 %ptr, -4096
3750 %conv = zext i8 %off to i64
3751 %or = or i64 %and, %conv
3752 %0 = inttoptr i64 %or to ptr
3753 %1 = load i64, ptr %0, align 8
3757 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3758 define dso_local i64 @ld_not_disjoint16_uint64_t_uint64_t(i64 %ptr) {
3759 ; CHECK-LABEL: ld_not_disjoint16_uint64_t_uint64_t:
3760 ; CHECK: # %bb.0: # %entry
3761 ; CHECK-NEXT: ori r3, r3, 6
3762 ; CHECK-NEXT: ld r3, 0(r3)
3765 %or = or i64 %ptr, 6
3766 %0 = inttoptr i64 %or to ptr
3767 %1 = load i64, ptr %0, align 8
3771 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3772 define dso_local i64 @ld_disjoint_unalign16_uint64_t_uint64_t(i64 %ptr) {
3773 ; CHECK-P10-LABEL: ld_disjoint_unalign16_uint64_t_uint64_t:
3774 ; CHECK-P10: # %bb.0: # %entry
3775 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
3776 ; CHECK-P10-NEXT: pld r3, 6(r3), 0
3777 ; CHECK-P10-NEXT: blr
3779 ; CHECK-P9-LABEL: ld_disjoint_unalign16_uint64_t_uint64_t:
3780 ; CHECK-P9: # %bb.0: # %entry
3781 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
3782 ; CHECK-P9-NEXT: li r4, 6
3783 ; CHECK-P9-NEXT: ldx r3, r3, r4
3784 ; CHECK-P9-NEXT: blr
3786 ; CHECK-P8-LABEL: ld_disjoint_unalign16_uint64_t_uint64_t:
3787 ; CHECK-P8: # %bb.0: # %entry
3788 ; CHECK-P8-NEXT: li r4, 6
3789 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
3790 ; CHECK-P8-NEXT: ldx r3, r3, r4
3791 ; CHECK-P8-NEXT: blr
3793 %and = and i64 %ptr, -4096
3794 %or = or i64 %and, 6
3795 %0 = inttoptr i64 %or to ptr
3796 %1 = load i64, ptr %0, align 8
3800 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3801 define dso_local i64 @ld_disjoint_align16_uint64_t_uint64_t(i64 %ptr) {
3802 ; CHECK-LABEL: ld_disjoint_align16_uint64_t_uint64_t:
3803 ; CHECK: # %bb.0: # %entry
3804 ; CHECK-NEXT: rldicr r3, r3, 0, 51
3805 ; CHECK-NEXT: ld r3, 24(r3)
3808 %and = and i64 %ptr, -4096
3809 %or = or i64 %and, 24
3810 %0 = inttoptr i64 %or to ptr
3811 %1 = load i64, ptr %0, align 8
3815 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3816 define dso_local i64 @ld_not_disjoint32_uint64_t_uint64_t(i64 %ptr) {
3817 ; CHECK-LABEL: ld_not_disjoint32_uint64_t_uint64_t:
3818 ; CHECK: # %bb.0: # %entry
3819 ; CHECK-NEXT: ori r3, r3, 34463
3820 ; CHECK-NEXT: oris r3, r3, 1
3821 ; CHECK-NEXT: ld r3, 0(r3)
3824 %or = or i64 %ptr, 99999
3825 %0 = inttoptr i64 %or to ptr
3826 %1 = load i64, ptr %0, align 8
3830 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3831 define dso_local i64 @ld_disjoint_unalign32_uint64_t_uint64_t(i64 %ptr) {
3832 ; CHECK-P10-LABEL: ld_disjoint_unalign32_uint64_t_uint64_t:
3833 ; CHECK-P10: # %bb.0: # %entry
3834 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
3835 ; CHECK-P10-NEXT: pld r3, 99999(r3), 0
3836 ; CHECK-P10-NEXT: blr
3838 ; CHECK-PREP10-LABEL: ld_disjoint_unalign32_uint64_t_uint64_t:
3839 ; CHECK-PREP10: # %bb.0: # %entry
3840 ; CHECK-PREP10-NEXT: lis r4, 1
3841 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
3842 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
3843 ; CHECK-PREP10-NEXT: ldx r3, r3, r4
3844 ; CHECK-PREP10-NEXT: blr
3846 %and = and i64 %ptr, -1048576
3847 %or = or i64 %and, 99999
3848 %0 = inttoptr i64 %or to ptr
3849 %1 = load i64, ptr %0, align 8
3853 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3854 define dso_local i64 @ld_disjoint_align32_uint64_t_uint64_t(i64 %ptr) {
3855 ; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_uint64_t:
3856 ; CHECK-P10: # %bb.0: # %entry
3857 ; CHECK-P10-NEXT: lis r4, -15264
3858 ; CHECK-P10-NEXT: and r3, r3, r4
3859 ; CHECK-P10-NEXT: pld r3, 999990000(r3), 0
3860 ; CHECK-P10-NEXT: blr
3862 ; CHECK-P9-LABEL: ld_disjoint_align32_uint64_t_uint64_t:
3863 ; CHECK-P9: # %bb.0: # %entry
3864 ; CHECK-P9-NEXT: lis r4, -15264
3865 ; CHECK-P9-NEXT: and r3, r3, r4
3866 ; CHECK-P9-NEXT: lis r4, 15258
3867 ; CHECK-P9-NEXT: ori r4, r4, 41712
3868 ; CHECK-P9-NEXT: ldx r3, r3, r4
3869 ; CHECK-P9-NEXT: blr
3871 ; CHECK-P8-LABEL: ld_disjoint_align32_uint64_t_uint64_t:
3872 ; CHECK-P8: # %bb.0: # %entry
3873 ; CHECK-P8-NEXT: lis r4, -15264
3874 ; CHECK-P8-NEXT: lis r5, 15258
3875 ; CHECK-P8-NEXT: and r3, r3, r4
3876 ; CHECK-P8-NEXT: ori r4, r5, 41712
3877 ; CHECK-P8-NEXT: ldx r3, r3, r4
3878 ; CHECK-P8-NEXT: blr
3880 %and = and i64 %ptr, -1000341504
3881 %or = or i64 %and, 999990000
3882 %0 = inttoptr i64 %or to ptr
3883 %1 = load i64, ptr %0, align 16
3887 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3888 define dso_local i64 @ld_not_disjoint64_uint64_t_uint64_t(i64 %ptr) {
3889 ; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_uint64_t:
3890 ; CHECK-P10: # %bb.0: # %entry
3891 ; CHECK-P10-NEXT: pli r4, 232
3892 ; CHECK-P10-NEXT: pli r5, 3567587329
3893 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
3894 ; CHECK-P10-NEXT: or r3, r3, r5
3895 ; CHECK-P10-NEXT: ld r3, 0(r3)
3896 ; CHECK-P10-NEXT: blr
3898 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_uint64_t:
3899 ; CHECK-PREP10: # %bb.0: # %entry
3900 ; CHECK-PREP10-NEXT: li r4, 29
3901 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
3902 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
3903 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
3904 ; CHECK-PREP10-NEXT: or r3, r3, r4
3905 ; CHECK-PREP10-NEXT: ld r3, 0(r3)
3906 ; CHECK-PREP10-NEXT: blr
3908 %or = or i64 %ptr, 1000000000001
3909 %0 = inttoptr i64 %or to ptr
3910 %1 = load i64, ptr %0, align 8
3914 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3915 define dso_local i64 @ld_disjoint_unalign64_uint64_t_uint64_t(i64 %ptr) {
3916 ; CHECK-P10-LABEL: ld_disjoint_unalign64_uint64_t_uint64_t:
3917 ; CHECK-P10: # %bb.0: # %entry
3918 ; CHECK-P10-NEXT: pli r4, 232
3919 ; CHECK-P10-NEXT: pli r5, 3567587329
3920 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
3921 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
3922 ; CHECK-P10-NEXT: ldx r3, r3, r5
3923 ; CHECK-P10-NEXT: blr
3925 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint64_t_uint64_t:
3926 ; CHECK-PREP10: # %bb.0: # %entry
3927 ; CHECK-PREP10-NEXT: li r4, 29
3928 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
3929 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
3930 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
3931 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
3932 ; CHECK-PREP10-NEXT: ldx r3, r3, r4
3933 ; CHECK-PREP10-NEXT: blr
3935 %and = and i64 %ptr, -1099511627776
3936 %or = or i64 %and, 1000000000001
3937 %0 = inttoptr i64 %or to ptr
3938 %1 = load i64, ptr %0, align 8
3942 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3943 define dso_local i64 @ld_disjoint_align64_uint64_t_uint64_t(i64 %ptr) {
3944 ; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_uint64_t:
3945 ; CHECK-P10: # %bb.0: # %entry
3946 ; CHECK-P10-NEXT: pli r4, 244140625
3947 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
3948 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
3949 ; CHECK-P10-NEXT: ldx r3, r3, r4
3950 ; CHECK-P10-NEXT: blr
3952 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_uint64_t:
3953 ; CHECK-PREP10: # %bb.0: # %entry
3954 ; CHECK-PREP10-NEXT: lis r4, 3725
3955 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
3956 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
3957 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
3958 ; CHECK-PREP10-NEXT: ldx r3, r3, r4
3959 ; CHECK-PREP10-NEXT: blr
3961 %and = and i64 %ptr, -1099511627776
3962 %or = or i64 %and, 1000000000000
3963 %0 = inttoptr i64 %or to ptr
3964 %1 = load i64, ptr %0, align 4096
3968 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3969 define dso_local i64 @ld_cst_unalign16_uint64_t_uint64_t() {
3970 ; CHECK-LABEL: ld_cst_unalign16_uint64_t_uint64_t:
3971 ; CHECK: # %bb.0: # %entry
3972 ; CHECK-NEXT: li r3, 255
3973 ; CHECK-NEXT: ld r3, 0(r3)
3976 %0 = load i64, ptr inttoptr (i64 255 to ptr), align 8
3980 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3981 define dso_local i64 @ld_cst_align16_uint64_t_uint64_t() {
3982 ; CHECK-LABEL: ld_cst_align16_uint64_t_uint64_t:
3983 ; CHECK: # %bb.0: # %entry
3984 ; CHECK-NEXT: ld r3, 4080(0)
3987 %0 = load i64, ptr inttoptr (i64 4080 to ptr), align 16
3991 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3992 define dso_local i64 @ld_cst_unalign32_uint64_t_uint64_t() {
3993 ; CHECK-P10-LABEL: ld_cst_unalign32_uint64_t_uint64_t:
3994 ; CHECK-P10: # %bb.0: # %entry
3995 ; CHECK-P10-NEXT: pli r3, 99999
3996 ; CHECK-P10-NEXT: ld r3, 0(r3)
3997 ; CHECK-P10-NEXT: blr
3999 ; CHECK-PREP10-LABEL: ld_cst_unalign32_uint64_t_uint64_t:
4000 ; CHECK-PREP10: # %bb.0: # %entry
4001 ; CHECK-PREP10-NEXT: lis r3, 1
4002 ; CHECK-PREP10-NEXT: ori r3, r3, 34463
4003 ; CHECK-PREP10-NEXT: ld r3, 0(r3)
4004 ; CHECK-PREP10-NEXT: blr
4006 %0 = load i64, ptr inttoptr (i64 99999 to ptr), align 8
4010 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4011 define dso_local i64 @ld_cst_align32_uint64_t_uint64_t() {
4012 ; CHECK-LABEL: ld_cst_align32_uint64_t_uint64_t:
4013 ; CHECK: # %bb.0: # %entry
4014 ; CHECK-NEXT: lis r3, 153
4015 ; CHECK-NEXT: ld r3, -27108(r3)
4018 %0 = load i64, ptr inttoptr (i64 9999900 to ptr), align 8
4022 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4023 define dso_local i64 @ld_cst_unalign64_uint64_t_uint64_t() {
4024 ; CHECK-P10-LABEL: ld_cst_unalign64_uint64_t_uint64_t:
4025 ; CHECK-P10: # %bb.0: # %entry
4026 ; CHECK-P10-NEXT: pli r3, 232
4027 ; CHECK-P10-NEXT: pli r4, 3567587329
4028 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
4029 ; CHECK-P10-NEXT: ld r3, 0(r4)
4030 ; CHECK-P10-NEXT: blr
4032 ; CHECK-PREP10-LABEL: ld_cst_unalign64_uint64_t_uint64_t:
4033 ; CHECK-PREP10: # %bb.0: # %entry
4034 ; CHECK-PREP10-NEXT: li r3, 29
4035 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
4036 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
4037 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
4038 ; CHECK-PREP10-NEXT: ld r3, 0(r3)
4039 ; CHECK-PREP10-NEXT: blr
4041 %0 = load i64, ptr inttoptr (i64 1000000000001 to ptr), align 8
4045 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4046 define dso_local i64 @ld_cst_align64_uint64_t_uint64_t() {
4047 ; CHECK-P10-LABEL: ld_cst_align64_uint64_t_uint64_t:
4048 ; CHECK-P10: # %bb.0: # %entry
4049 ; CHECK-P10-NEXT: pli r3, 244140625
4050 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
4051 ; CHECK-P10-NEXT: ld r3, 0(r3)
4052 ; CHECK-P10-NEXT: blr
4054 ; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_uint64_t:
4055 ; CHECK-PREP10: # %bb.0: # %entry
4056 ; CHECK-PREP10-NEXT: lis r3, 3725
4057 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
4058 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
4059 ; CHECK-PREP10-NEXT: ld r3, 0(r3)
4060 ; CHECK-PREP10-NEXT: blr
4062 %0 = load i64, ptr inttoptr (i64 1000000000000 to ptr), align 4096
4066 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4067 define dso_local i64 @ld_0_uint64_t_float(i64 %ptr) {
4068 ; CHECK-LABEL: ld_0_uint64_t_float:
4069 ; CHECK: # %bb.0: # %entry
4070 ; CHECK-NEXT: lfs f0, 0(r3)
4071 ; CHECK-NEXT: xscvdpuxds f0, f0
4072 ; CHECK-NEXT: mffprd r3, f0
4075 %0 = inttoptr i64 %ptr to ptr
4076 %1 = load float, ptr %0, align 4
4077 %conv = fptoui float %1 to i64
4081 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4082 define dso_local i64 @ld_unalign16_uint64_t_float(ptr nocapture readonly %ptr) {
4083 ; CHECK-P10-LABEL: ld_unalign16_uint64_t_float:
4084 ; CHECK-P10: # %bb.0: # %entry
4085 ; CHECK-P10-NEXT: plfs f0, 1(r3), 0
4086 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4087 ; CHECK-P10-NEXT: mffprd r3, f0
4088 ; CHECK-P10-NEXT: blr
4090 ; CHECK-PREP10-LABEL: ld_unalign16_uint64_t_float:
4091 ; CHECK-PREP10: # %bb.0: # %entry
4092 ; CHECK-PREP10-NEXT: lfs f0, 1(r3)
4093 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4094 ; CHECK-PREP10-NEXT: mffprd r3, f0
4095 ; CHECK-PREP10-NEXT: blr
4097 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1
4098 %0 = load float, ptr %add.ptr, align 4
4099 %conv = fptoui float %0 to i64
4103 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4104 define dso_local i64 @ld_align16_uint64_t_float(ptr nocapture readonly %ptr) {
4105 ; CHECK-LABEL: ld_align16_uint64_t_float:
4106 ; CHECK: # %bb.0: # %entry
4107 ; CHECK-NEXT: lfs f0, 8(r3)
4108 ; CHECK-NEXT: xscvdpuxds f0, f0
4109 ; CHECK-NEXT: mffprd r3, f0
4112 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
4113 %0 = load float, ptr %add.ptr, align 4
4114 %conv = fptoui float %0 to i64
4118 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4119 define dso_local i64 @ld_unalign32_uint64_t_float(ptr nocapture readonly %ptr) {
4120 ; CHECK-P10-LABEL: ld_unalign32_uint64_t_float:
4121 ; CHECK-P10: # %bb.0: # %entry
4122 ; CHECK-P10-NEXT: plfs f0, 99999(r3), 0
4123 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4124 ; CHECK-P10-NEXT: mffprd r3, f0
4125 ; CHECK-P10-NEXT: blr
4127 ; CHECK-PREP10-LABEL: ld_unalign32_uint64_t_float:
4128 ; CHECK-PREP10: # %bb.0: # %entry
4129 ; CHECK-PREP10-NEXT: lis r4, 1
4130 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
4131 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
4132 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4133 ; CHECK-PREP10-NEXT: mffprd r3, f0
4134 ; CHECK-PREP10-NEXT: blr
4136 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999
4137 %0 = load float, ptr %add.ptr, align 4
4138 %conv = fptoui float %0 to i64
4142 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4143 define dso_local i64 @ld_align32_uint64_t_float(ptr nocapture readonly %ptr) {
4144 ; CHECK-P10-LABEL: ld_align32_uint64_t_float:
4145 ; CHECK-P10: # %bb.0: # %entry
4146 ; CHECK-P10-NEXT: plfs f0, 99999000(r3), 0
4147 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4148 ; CHECK-P10-NEXT: mffprd r3, f0
4149 ; CHECK-P10-NEXT: blr
4151 ; CHECK-PREP10-LABEL: ld_align32_uint64_t_float:
4152 ; CHECK-PREP10: # %bb.0: # %entry
4153 ; CHECK-PREP10-NEXT: lis r4, 1525
4154 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
4155 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
4156 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4157 ; CHECK-PREP10-NEXT: mffprd r3, f0
4158 ; CHECK-PREP10-NEXT: blr
4160 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
4161 %0 = load float, ptr %add.ptr, align 4
4162 %conv = fptoui float %0 to i64
4166 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4167 define dso_local i64 @ld_unalign64_uint64_t_float(ptr nocapture readonly %ptr) {
4168 ; CHECK-P10-LABEL: ld_unalign64_uint64_t_float:
4169 ; CHECK-P10: # %bb.0: # %entry
4170 ; CHECK-P10-NEXT: pli r4, 232
4171 ; CHECK-P10-NEXT: pli r5, 3567587329
4172 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
4173 ; CHECK-P10-NEXT: lfsx f0, r3, r5
4174 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4175 ; CHECK-P10-NEXT: mffprd r3, f0
4176 ; CHECK-P10-NEXT: blr
4178 ; CHECK-PREP10-LABEL: ld_unalign64_uint64_t_float:
4179 ; CHECK-PREP10: # %bb.0: # %entry
4180 ; CHECK-PREP10-NEXT: li r4, 29
4181 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
4182 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
4183 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
4184 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
4185 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4186 ; CHECK-PREP10-NEXT: mffprd r3, f0
4187 ; CHECK-PREP10-NEXT: blr
4189 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000001
4190 %0 = load float, ptr %add.ptr, align 4
4191 %conv = fptoui float %0 to i64
4195 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4196 define dso_local i64 @ld_align64_uint64_t_float(ptr nocapture readonly %ptr) {
4197 ; CHECK-P10-LABEL: ld_align64_uint64_t_float:
4198 ; CHECK-P10: # %bb.0: # %entry
4199 ; CHECK-P10-NEXT: pli r4, 244140625
4200 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
4201 ; CHECK-P10-NEXT: lfsx f0, r3, r4
4202 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4203 ; CHECK-P10-NEXT: mffprd r3, f0
4204 ; CHECK-P10-NEXT: blr
4206 ; CHECK-PREP10-LABEL: ld_align64_uint64_t_float:
4207 ; CHECK-PREP10: # %bb.0: # %entry
4208 ; CHECK-PREP10-NEXT: lis r4, 3725
4209 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
4210 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
4211 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
4212 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4213 ; CHECK-PREP10-NEXT: mffprd r3, f0
4214 ; CHECK-PREP10-NEXT: blr
4216 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
4217 %0 = load float, ptr %add.ptr, align 4
4218 %conv = fptoui float %0 to i64
4222 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4223 define dso_local i64 @ld_reg_uint64_t_float(ptr nocapture readonly %ptr, i64 %off) {
4224 ; CHECK-LABEL: ld_reg_uint64_t_float:
4225 ; CHECK: # %bb.0: # %entry
4226 ; CHECK-NEXT: lfsx f0, r3, r4
4227 ; CHECK-NEXT: xscvdpuxds f0, f0
4228 ; CHECK-NEXT: mffprd r3, f0
4231 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
4232 %0 = load float, ptr %add.ptr, align 4
4233 %conv = fptoui float %0 to i64
4237 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4238 define dso_local i64 @ld_or_uint64_t_float(i64 %ptr, i8 zeroext %off) {
4239 ; CHECK-LABEL: ld_or_uint64_t_float:
4240 ; CHECK: # %bb.0: # %entry
4241 ; CHECK-NEXT: or r3, r4, r3
4242 ; CHECK-NEXT: lfs f0, 0(r3)
4243 ; CHECK-NEXT: xscvdpuxds f0, f0
4244 ; CHECK-NEXT: mffprd r3, f0
4247 %conv = zext i8 %off to i64
4248 %or = or i64 %conv, %ptr
4249 %0 = inttoptr i64 %or to ptr
4250 %1 = load float, ptr %0, align 4
4251 %conv1 = fptoui float %1 to i64
4255 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4256 define dso_local i64 @ld_or2_uint64_t_float(i64 %ptr, i8 zeroext %off) {
4257 ; CHECK-LABEL: ld_or2_uint64_t_float:
4258 ; CHECK: # %bb.0: # %entry
4259 ; CHECK-NEXT: rldicr r3, r3, 0, 51
4260 ; CHECK-NEXT: lfsx f0, r3, r4
4261 ; CHECK-NEXT: xscvdpuxds f0, f0
4262 ; CHECK-NEXT: mffprd r3, f0
4265 %and = and i64 %ptr, -4096
4266 %conv = zext i8 %off to i64
4267 %or = or i64 %and, %conv
4268 %0 = inttoptr i64 %or to ptr
4269 %1 = load float, ptr %0, align 4
4270 %conv1 = fptoui float %1 to i64
4274 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4275 define dso_local i64 @ld_not_disjoint16_uint64_t_float(i64 %ptr) {
4276 ; CHECK-LABEL: ld_not_disjoint16_uint64_t_float:
4277 ; CHECK: # %bb.0: # %entry
4278 ; CHECK-NEXT: ori r3, r3, 6
4279 ; CHECK-NEXT: lfs f0, 0(r3)
4280 ; CHECK-NEXT: xscvdpuxds f0, f0
4281 ; CHECK-NEXT: mffprd r3, f0
4284 %or = or i64 %ptr, 6
4285 %0 = inttoptr i64 %or to ptr
4286 %1 = load float, ptr %0, align 4
4287 %conv = fptoui float %1 to i64
4291 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4292 define dso_local i64 @ld_disjoint_unalign16_uint64_t_float(i64 %ptr) {
4293 ; CHECK-P10-LABEL: ld_disjoint_unalign16_uint64_t_float:
4294 ; CHECK-P10: # %bb.0: # %entry
4295 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
4296 ; CHECK-P10-NEXT: plfs f0, 6(r3), 0
4297 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4298 ; CHECK-P10-NEXT: mffprd r3, f0
4299 ; CHECK-P10-NEXT: blr
4301 ; CHECK-PREP10-LABEL: ld_disjoint_unalign16_uint64_t_float:
4302 ; CHECK-PREP10: # %bb.0: # %entry
4303 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 51
4304 ; CHECK-PREP10-NEXT: lfs f0, 6(r3)
4305 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4306 ; CHECK-PREP10-NEXT: mffprd r3, f0
4307 ; CHECK-PREP10-NEXT: blr
4309 %and = and i64 %ptr, -4096
4310 %or = or i64 %and, 6
4311 %0 = inttoptr i64 %or to ptr
4312 %1 = load float, ptr %0, align 4
4313 %conv = fptoui float %1 to i64
4317 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4318 define dso_local i64 @ld_disjoint_align16_uint64_t_float(i64 %ptr) {
4319 ; CHECK-LABEL: ld_disjoint_align16_uint64_t_float:
4320 ; CHECK: # %bb.0: # %entry
4321 ; CHECK-NEXT: rldicr r3, r3, 0, 51
4322 ; CHECK-NEXT: lfs f0, 24(r3)
4323 ; CHECK-NEXT: xscvdpuxds f0, f0
4324 ; CHECK-NEXT: mffprd r3, f0
4327 %and = and i64 %ptr, -4096
4328 %or = or i64 %and, 24
4329 %0 = inttoptr i64 %or to ptr
4330 %1 = load float, ptr %0, align 8
4331 %conv = fptoui float %1 to i64
4335 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4336 define dso_local i64 @ld_not_disjoint32_uint64_t_float(i64 %ptr) {
4337 ; CHECK-LABEL: ld_not_disjoint32_uint64_t_float:
4338 ; CHECK: # %bb.0: # %entry
4339 ; CHECK-NEXT: ori r3, r3, 34463
4340 ; CHECK-NEXT: oris r3, r3, 1
4341 ; CHECK-NEXT: lfs f0, 0(r3)
4342 ; CHECK-NEXT: xscvdpuxds f0, f0
4343 ; CHECK-NEXT: mffprd r3, f0
4346 %or = or i64 %ptr, 99999
4347 %0 = inttoptr i64 %or to ptr
4348 %1 = load float, ptr %0, align 4
4349 %conv = fptoui float %1 to i64
4353 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4354 define dso_local i64 @ld_disjoint_unalign32_uint64_t_float(i64 %ptr) {
4355 ; CHECK-P10-LABEL: ld_disjoint_unalign32_uint64_t_float:
4356 ; CHECK-P10: # %bb.0: # %entry
4357 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
4358 ; CHECK-P10-NEXT: plfs f0, 99999(r3), 0
4359 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4360 ; CHECK-P10-NEXT: mffprd r3, f0
4361 ; CHECK-P10-NEXT: blr
4363 ; CHECK-PREP10-LABEL: ld_disjoint_unalign32_uint64_t_float:
4364 ; CHECK-PREP10: # %bb.0: # %entry
4365 ; CHECK-PREP10-NEXT: lis r4, 1
4366 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
4367 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
4368 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
4369 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4370 ; CHECK-PREP10-NEXT: mffprd r3, f0
4371 ; CHECK-PREP10-NEXT: blr
4373 %and = and i64 %ptr, -1048576
4374 %or = or i64 %and, 99999
4375 %0 = inttoptr i64 %or to ptr
4376 %1 = load float, ptr %0, align 4
4377 %conv = fptoui float %1 to i64
4381 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4382 define dso_local i64 @ld_disjoint_align32_uint64_t_float(i64 %ptr) {
4383 ; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_float:
4384 ; CHECK-P10: # %bb.0: # %entry
4385 ; CHECK-P10-NEXT: lis r4, -15264
4386 ; CHECK-P10-NEXT: and r3, r3, r4
4387 ; CHECK-P10-NEXT: plfs f0, 999990000(r3), 0
4388 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4389 ; CHECK-P10-NEXT: mffprd r3, f0
4390 ; CHECK-P10-NEXT: blr
4392 ; CHECK-P9-LABEL: ld_disjoint_align32_uint64_t_float:
4393 ; CHECK-P9: # %bb.0: # %entry
4394 ; CHECK-P9-NEXT: lis r4, -15264
4395 ; CHECK-P9-NEXT: and r3, r3, r4
4396 ; CHECK-P9-NEXT: lis r4, 15258
4397 ; CHECK-P9-NEXT: ori r4, r4, 41712
4398 ; CHECK-P9-NEXT: lfsx f0, r3, r4
4399 ; CHECK-P9-NEXT: xscvdpuxds f0, f0
4400 ; CHECK-P9-NEXT: mffprd r3, f0
4401 ; CHECK-P9-NEXT: blr
4403 ; CHECK-P8-LABEL: ld_disjoint_align32_uint64_t_float:
4404 ; CHECK-P8: # %bb.0: # %entry
4405 ; CHECK-P8-NEXT: lis r4, -15264
4406 ; CHECK-P8-NEXT: lis r5, 15258
4407 ; CHECK-P8-NEXT: and r3, r3, r4
4408 ; CHECK-P8-NEXT: ori r4, r5, 41712
4409 ; CHECK-P8-NEXT: lfsx f0, r3, r4
4410 ; CHECK-P8-NEXT: xscvdpuxds f0, f0
4411 ; CHECK-P8-NEXT: mffprd r3, f0
4412 ; CHECK-P8-NEXT: blr
4414 %and = and i64 %ptr, -1000341504
4415 %or = or i64 %and, 999990000
4416 %0 = inttoptr i64 %or to ptr
4417 %1 = load float, ptr %0, align 16
4418 %conv = fptoui float %1 to i64
4422 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4423 define dso_local i64 @ld_not_disjoint64_uint64_t_float(i64 %ptr) {
4424 ; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_float:
4425 ; CHECK-P10: # %bb.0: # %entry
4426 ; CHECK-P10-NEXT: pli r4, 232
4427 ; CHECK-P10-NEXT: pli r5, 3567587329
4428 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
4429 ; CHECK-P10-NEXT: or r3, r3, r5
4430 ; CHECK-P10-NEXT: lfs f0, 0(r3)
4431 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4432 ; CHECK-P10-NEXT: mffprd r3, f0
4433 ; CHECK-P10-NEXT: blr
4435 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_float:
4436 ; CHECK-PREP10: # %bb.0: # %entry
4437 ; CHECK-PREP10-NEXT: li r4, 29
4438 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
4439 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
4440 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
4441 ; CHECK-PREP10-NEXT: or r3, r3, r4
4442 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
4443 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4444 ; CHECK-PREP10-NEXT: mffprd r3, f0
4445 ; CHECK-PREP10-NEXT: blr
4447 %or = or i64 %ptr, 1000000000001
4448 %0 = inttoptr i64 %or to ptr
4449 %1 = load float, ptr %0, align 4
4450 %conv = fptoui float %1 to i64
4454 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4455 define dso_local i64 @ld_disjoint_unalign64_uint64_t_float(i64 %ptr) {
4456 ; CHECK-P10-LABEL: ld_disjoint_unalign64_uint64_t_float:
4457 ; CHECK-P10: # %bb.0: # %entry
4458 ; CHECK-P10-NEXT: pli r4, 232
4459 ; CHECK-P10-NEXT: pli r5, 3567587329
4460 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
4461 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
4462 ; CHECK-P10-NEXT: lfsx f0, r3, r5
4463 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4464 ; CHECK-P10-NEXT: mffprd r3, f0
4465 ; CHECK-P10-NEXT: blr
4467 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint64_t_float:
4468 ; CHECK-PREP10: # %bb.0: # %entry
4469 ; CHECK-PREP10-NEXT: li r4, 29
4470 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
4471 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
4472 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
4473 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
4474 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
4475 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4476 ; CHECK-PREP10-NEXT: mffprd r3, f0
4477 ; CHECK-PREP10-NEXT: blr
4479 %and = and i64 %ptr, -1099511627776
4480 %or = or i64 %and, 1000000000001
4481 %0 = inttoptr i64 %or to ptr
4482 %1 = load float, ptr %0, align 4
4483 %conv = fptoui float %1 to i64
4487 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4488 define dso_local i64 @ld_disjoint_align64_uint64_t_float(i64 %ptr) {
4489 ; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_float:
4490 ; CHECK-P10: # %bb.0: # %entry
4491 ; CHECK-P10-NEXT: pli r4, 244140625
4492 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
4493 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
4494 ; CHECK-P10-NEXT: lfsx f0, r3, r4
4495 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4496 ; CHECK-P10-NEXT: mffprd r3, f0
4497 ; CHECK-P10-NEXT: blr
4499 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_float:
4500 ; CHECK-PREP10: # %bb.0: # %entry
4501 ; CHECK-PREP10-NEXT: lis r4, 3725
4502 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
4503 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
4504 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
4505 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
4506 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4507 ; CHECK-PREP10-NEXT: mffprd r3, f0
4508 ; CHECK-PREP10-NEXT: blr
4510 %and = and i64 %ptr, -1099511627776
4511 %or = or i64 %and, 1000000000000
4512 %0 = inttoptr i64 %or to ptr
4513 %1 = load float, ptr %0, align 4096
4514 %conv = fptoui float %1 to i64
4518 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4519 define dso_local i64 @ld_cst_unalign16_uint64_t_float() {
4520 ; CHECK-P10-LABEL: ld_cst_unalign16_uint64_t_float:
4521 ; CHECK-P10: # %bb.0: # %entry
4522 ; CHECK-P10-NEXT: li r3, 255
4523 ; CHECK-P10-NEXT: lfs f0, 0(r3)
4524 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4525 ; CHECK-P10-NEXT: mffprd r3, f0
4526 ; CHECK-P10-NEXT: blr
4528 ; CHECK-P9-LABEL: ld_cst_unalign16_uint64_t_float:
4529 ; CHECK-P9: # %bb.0: # %entry
4530 ; CHECK-P9-NEXT: li r3, 255
4531 ; CHECK-P9-NEXT: lfs f0, 0(r3)
4532 ; CHECK-P9-NEXT: xscvdpuxds f0, f0
4533 ; CHECK-P9-NEXT: mffprd r3, f0
4534 ; CHECK-P9-NEXT: blr
4536 ; CHECK-P8-LABEL: ld_cst_unalign16_uint64_t_float:
4537 ; CHECK-P8: # %bb.0: # %entry
4538 ; CHECK-P8-NEXT: lfs f0, 255(0)
4539 ; CHECK-P8-NEXT: xscvdpuxds f0, f0
4540 ; CHECK-P8-NEXT: mffprd r3, f0
4541 ; CHECK-P8-NEXT: blr
4543 %0 = load float, ptr inttoptr (i64 255 to ptr), align 4
4544 %conv = fptoui float %0 to i64
4548 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4549 define dso_local i64 @ld_cst_align16_uint64_t_float() {
4550 ; CHECK-LABEL: ld_cst_align16_uint64_t_float:
4551 ; CHECK: # %bb.0: # %entry
4552 ; CHECK-NEXT: lfs f0, 4080(0)
4553 ; CHECK-NEXT: xscvdpuxds f0, f0
4554 ; CHECK-NEXT: mffprd r3, f0
4557 %0 = load float, ptr inttoptr (i64 4080 to ptr), align 16
4558 %conv = fptoui float %0 to i64
4562 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4563 define dso_local i64 @ld_cst_unalign32_uint64_t_float() {
4564 ; CHECK-P10-LABEL: ld_cst_unalign32_uint64_t_float:
4565 ; CHECK-P10: # %bb.0: # %entry
4566 ; CHECK-P10-NEXT: pli r3, 99999
4567 ; CHECK-P10-NEXT: lfs f0, 0(r3)
4568 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4569 ; CHECK-P10-NEXT: mffprd r3, f0
4570 ; CHECK-P10-NEXT: blr
4572 ; CHECK-P9-LABEL: ld_cst_unalign32_uint64_t_float:
4573 ; CHECK-P9: # %bb.0: # %entry
4574 ; CHECK-P9-NEXT: lis r3, 1
4575 ; CHECK-P9-NEXT: ori r3, r3, 34463
4576 ; CHECK-P9-NEXT: lfs f0, 0(r3)
4577 ; CHECK-P9-NEXT: xscvdpuxds f0, f0
4578 ; CHECK-P9-NEXT: mffprd r3, f0
4579 ; CHECK-P9-NEXT: blr
4581 ; CHECK-P8-LABEL: ld_cst_unalign32_uint64_t_float:
4582 ; CHECK-P8: # %bb.0: # %entry
4583 ; CHECK-P8-NEXT: lis r3, 2
4584 ; CHECK-P8-NEXT: lfs f0, -31073(r3)
4585 ; CHECK-P8-NEXT: xscvdpuxds f0, f0
4586 ; CHECK-P8-NEXT: mffprd r3, f0
4587 ; CHECK-P8-NEXT: blr
4589 %0 = load float, ptr inttoptr (i64 99999 to ptr), align 4
4590 %conv = fptoui float %0 to i64
4594 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4595 define dso_local i64 @ld_cst_align32_uint64_t_float() {
4596 ; CHECK-LABEL: ld_cst_align32_uint64_t_float:
4597 ; CHECK: # %bb.0: # %entry
4598 ; CHECK-NEXT: lis r3, 153
4599 ; CHECK-NEXT: lfs f0, -27108(r3)
4600 ; CHECK-NEXT: xscvdpuxds f0, f0
4601 ; CHECK-NEXT: mffprd r3, f0
4604 %0 = load float, ptr inttoptr (i64 9999900 to ptr), align 4
4605 %conv = fptoui float %0 to i64
4609 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4610 define dso_local i64 @ld_cst_unalign64_uint64_t_float() {
4611 ; CHECK-P10-LABEL: ld_cst_unalign64_uint64_t_float:
4612 ; CHECK-P10: # %bb.0: # %entry
4613 ; CHECK-P10-NEXT: pli r3, 232
4614 ; CHECK-P10-NEXT: pli r4, 3567587329
4615 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
4616 ; CHECK-P10-NEXT: lfs f0, 0(r4)
4617 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4618 ; CHECK-P10-NEXT: mffprd r3, f0
4619 ; CHECK-P10-NEXT: blr
4621 ; CHECK-PREP10-LABEL: ld_cst_unalign64_uint64_t_float:
4622 ; CHECK-PREP10: # %bb.0: # %entry
4623 ; CHECK-PREP10-NEXT: li r3, 29
4624 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
4625 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
4626 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
4627 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
4628 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4629 ; CHECK-PREP10-NEXT: mffprd r3, f0
4630 ; CHECK-PREP10-NEXT: blr
4632 %0 = load float, ptr inttoptr (i64 1000000000001 to ptr), align 4
4633 %conv = fptoui float %0 to i64
4637 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4638 define dso_local i64 @ld_cst_align64_uint64_t_float() {
4639 ; CHECK-P10-LABEL: ld_cst_align64_uint64_t_float:
4640 ; CHECK-P10: # %bb.0: # %entry
4641 ; CHECK-P10-NEXT: pli r3, 244140625
4642 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
4643 ; CHECK-P10-NEXT: lfs f0, 0(r3)
4644 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4645 ; CHECK-P10-NEXT: mffprd r3, f0
4646 ; CHECK-P10-NEXT: blr
4648 ; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_float:
4649 ; CHECK-PREP10: # %bb.0: # %entry
4650 ; CHECK-PREP10-NEXT: lis r3, 3725
4651 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
4652 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
4653 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
4654 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4655 ; CHECK-PREP10-NEXT: mffprd r3, f0
4656 ; CHECK-PREP10-NEXT: blr
4658 %0 = load float, ptr inttoptr (i64 1000000000000 to ptr), align 4096
4659 %conv = fptoui float %0 to i64
4663 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4664 define dso_local i64 @ld_0_uint64_t_double(i64 %ptr) {
4665 ; CHECK-LABEL: ld_0_uint64_t_double:
4666 ; CHECK: # %bb.0: # %entry
4667 ; CHECK-NEXT: lfd f0, 0(r3)
4668 ; CHECK-NEXT: xscvdpuxds f0, f0
4669 ; CHECK-NEXT: mffprd r3, f0
4672 %0 = inttoptr i64 %ptr to ptr
4673 %1 = load double, ptr %0, align 8
4674 %conv = fptoui double %1 to i64
4678 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4679 define dso_local i64 @ld_unalign16_uint64_t_double(ptr nocapture readonly %ptr) {
4680 ; CHECK-P10-LABEL: ld_unalign16_uint64_t_double:
4681 ; CHECK-P10: # %bb.0: # %entry
4682 ; CHECK-P10-NEXT: plfd f0, 1(r3), 0
4683 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4684 ; CHECK-P10-NEXT: mffprd r3, f0
4685 ; CHECK-P10-NEXT: blr
4687 ; CHECK-PREP10-LABEL: ld_unalign16_uint64_t_double:
4688 ; CHECK-PREP10: # %bb.0: # %entry
4689 ; CHECK-PREP10-NEXT: lfd f0, 1(r3)
4690 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4691 ; CHECK-PREP10-NEXT: mffprd r3, f0
4692 ; CHECK-PREP10-NEXT: blr
4694 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1
4695 %0 = load double, ptr %add.ptr, align 8
4696 %conv = fptoui double %0 to i64
4700 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4701 define dso_local i64 @ld_align16_uint64_t_double(ptr nocapture readonly %ptr) {
4702 ; CHECK-LABEL: ld_align16_uint64_t_double:
4703 ; CHECK: # %bb.0: # %entry
4704 ; CHECK-NEXT: lfd f0, 8(r3)
4705 ; CHECK-NEXT: xscvdpuxds f0, f0
4706 ; CHECK-NEXT: mffprd r3, f0
4709 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
4710 %0 = load double, ptr %add.ptr, align 8
4711 %conv = fptoui double %0 to i64
4715 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4716 define dso_local i64 @ld_unalign32_uint64_t_double(ptr nocapture readonly %ptr) {
4717 ; CHECK-P10-LABEL: ld_unalign32_uint64_t_double:
4718 ; CHECK-P10: # %bb.0: # %entry
4719 ; CHECK-P10-NEXT: plfd f0, 99999(r3), 0
4720 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4721 ; CHECK-P10-NEXT: mffprd r3, f0
4722 ; CHECK-P10-NEXT: blr
4724 ; CHECK-PREP10-LABEL: ld_unalign32_uint64_t_double:
4725 ; CHECK-PREP10: # %bb.0: # %entry
4726 ; CHECK-PREP10-NEXT: lis r4, 1
4727 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
4728 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
4729 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4730 ; CHECK-PREP10-NEXT: mffprd r3, f0
4731 ; CHECK-PREP10-NEXT: blr
4733 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999
4734 %0 = load double, ptr %add.ptr, align 8
4735 %conv = fptoui double %0 to i64
4739 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4740 define dso_local i64 @ld_align32_uint64_t_double(ptr nocapture readonly %ptr) {
4741 ; CHECK-P10-LABEL: ld_align32_uint64_t_double:
4742 ; CHECK-P10: # %bb.0: # %entry
4743 ; CHECK-P10-NEXT: plfd f0, 99999000(r3), 0
4744 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4745 ; CHECK-P10-NEXT: mffprd r3, f0
4746 ; CHECK-P10-NEXT: blr
4748 ; CHECK-PREP10-LABEL: ld_align32_uint64_t_double:
4749 ; CHECK-PREP10: # %bb.0: # %entry
4750 ; CHECK-PREP10-NEXT: lis r4, 1525
4751 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
4752 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
4753 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4754 ; CHECK-PREP10-NEXT: mffprd r3, f0
4755 ; CHECK-PREP10-NEXT: blr
4757 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
4758 %0 = load double, ptr %add.ptr, align 8
4759 %conv = fptoui double %0 to i64
4763 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4764 define dso_local i64 @ld_unalign64_uint64_t_double(ptr nocapture readonly %ptr) {
4765 ; CHECK-P10-LABEL: ld_unalign64_uint64_t_double:
4766 ; CHECK-P10: # %bb.0: # %entry
4767 ; CHECK-P10-NEXT: pli r4, 232
4768 ; CHECK-P10-NEXT: pli r5, 3567587329
4769 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
4770 ; CHECK-P10-NEXT: lfdx f0, r3, r5
4771 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4772 ; CHECK-P10-NEXT: mffprd r3, f0
4773 ; CHECK-P10-NEXT: blr
4775 ; CHECK-PREP10-LABEL: ld_unalign64_uint64_t_double:
4776 ; CHECK-PREP10: # %bb.0: # %entry
4777 ; CHECK-PREP10-NEXT: li r4, 29
4778 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
4779 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
4780 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
4781 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
4782 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4783 ; CHECK-PREP10-NEXT: mffprd r3, f0
4784 ; CHECK-PREP10-NEXT: blr
4786 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000001
4787 %0 = load double, ptr %add.ptr, align 8
4788 %conv = fptoui double %0 to i64
4792 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4793 define dso_local i64 @ld_align64_uint64_t_double(ptr nocapture readonly %ptr) {
4794 ; CHECK-P10-LABEL: ld_align64_uint64_t_double:
4795 ; CHECK-P10: # %bb.0: # %entry
4796 ; CHECK-P10-NEXT: pli r4, 244140625
4797 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
4798 ; CHECK-P10-NEXT: lfdx f0, r3, r4
4799 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4800 ; CHECK-P10-NEXT: mffprd r3, f0
4801 ; CHECK-P10-NEXT: blr
4803 ; CHECK-PREP10-LABEL: ld_align64_uint64_t_double:
4804 ; CHECK-PREP10: # %bb.0: # %entry
4805 ; CHECK-PREP10-NEXT: lis r4, 3725
4806 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
4807 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
4808 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
4809 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4810 ; CHECK-PREP10-NEXT: mffprd r3, f0
4811 ; CHECK-PREP10-NEXT: blr
4813 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
4814 %0 = load double, ptr %add.ptr, align 8
4815 %conv = fptoui double %0 to i64
4819 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4820 define dso_local i64 @ld_reg_uint64_t_double(ptr nocapture readonly %ptr, i64 %off) {
4821 ; CHECK-LABEL: ld_reg_uint64_t_double:
4822 ; CHECK: # %bb.0: # %entry
4823 ; CHECK-NEXT: lfdx f0, r3, r4
4824 ; CHECK-NEXT: xscvdpuxds f0, f0
4825 ; CHECK-NEXT: mffprd r3, f0
4828 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
4829 %0 = load double, ptr %add.ptr, align 8
4830 %conv = fptoui double %0 to i64
4834 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4835 define dso_local i64 @ld_or_uint64_t_double(i64 %ptr, i8 zeroext %off) {
4836 ; CHECK-LABEL: ld_or_uint64_t_double:
4837 ; CHECK: # %bb.0: # %entry
4838 ; CHECK-NEXT: or r3, r4, r3
4839 ; CHECK-NEXT: lfd f0, 0(r3)
4840 ; CHECK-NEXT: xscvdpuxds f0, f0
4841 ; CHECK-NEXT: mffprd r3, f0
4844 %conv = zext i8 %off to i64
4845 %or = or i64 %conv, %ptr
4846 %0 = inttoptr i64 %or to ptr
4847 %1 = load double, ptr %0, align 8
4848 %conv1 = fptoui double %1 to i64
4852 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4853 define dso_local i64 @ld_or2_uint64_t_double(i64 %ptr, i8 zeroext %off) {
4854 ; CHECK-LABEL: ld_or2_uint64_t_double:
4855 ; CHECK: # %bb.0: # %entry
4856 ; CHECK-NEXT: rldicr r3, r3, 0, 51
4857 ; CHECK-NEXT: lfdx f0, r3, r4
4858 ; CHECK-NEXT: xscvdpuxds f0, f0
4859 ; CHECK-NEXT: mffprd r3, f0
4862 %and = and i64 %ptr, -4096
4863 %conv = zext i8 %off to i64
4864 %or = or i64 %and, %conv
4865 %0 = inttoptr i64 %or to ptr
4866 %1 = load double, ptr %0, align 8
4867 %conv1 = fptoui double %1 to i64
4871 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4872 define dso_local i64 @ld_not_disjoint16_uint64_t_double(i64 %ptr) {
4873 ; CHECK-LABEL: ld_not_disjoint16_uint64_t_double:
4874 ; CHECK: # %bb.0: # %entry
4875 ; CHECK-NEXT: ori r3, r3, 6
4876 ; CHECK-NEXT: lfd f0, 0(r3)
4877 ; CHECK-NEXT: xscvdpuxds f0, f0
4878 ; CHECK-NEXT: mffprd r3, f0
4881 %or = or i64 %ptr, 6
4882 %0 = inttoptr i64 %or to ptr
4883 %1 = load double, ptr %0, align 8
4884 %conv = fptoui double %1 to i64
4888 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4889 define dso_local i64 @ld_disjoint_unalign16_uint64_t_double(i64 %ptr) {
4890 ; CHECK-P10-LABEL: ld_disjoint_unalign16_uint64_t_double:
4891 ; CHECK-P10: # %bb.0: # %entry
4892 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
4893 ; CHECK-P10-NEXT: plfd f0, 6(r3), 0
4894 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4895 ; CHECK-P10-NEXT: mffprd r3, f0
4896 ; CHECK-P10-NEXT: blr
4898 ; CHECK-PREP10-LABEL: ld_disjoint_unalign16_uint64_t_double:
4899 ; CHECK-PREP10: # %bb.0: # %entry
4900 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 51
4901 ; CHECK-PREP10-NEXT: lfd f0, 6(r3)
4902 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4903 ; CHECK-PREP10-NEXT: mffprd r3, f0
4904 ; CHECK-PREP10-NEXT: blr
4906 %and = and i64 %ptr, -4096
4907 %or = or i64 %and, 6
4908 %0 = inttoptr i64 %or to ptr
4909 %1 = load double, ptr %0, align 8
4910 %conv = fptoui double %1 to i64
4914 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4915 define dso_local i64 @ld_disjoint_align16_uint64_t_double(i64 %ptr) {
4916 ; CHECK-LABEL: ld_disjoint_align16_uint64_t_double:
4917 ; CHECK: # %bb.0: # %entry
4918 ; CHECK-NEXT: rldicr r3, r3, 0, 51
4919 ; CHECK-NEXT: lfd f0, 24(r3)
4920 ; CHECK-NEXT: xscvdpuxds f0, f0
4921 ; CHECK-NEXT: mffprd r3, f0
4924 %and = and i64 %ptr, -4096
4925 %or = or i64 %and, 24
4926 %0 = inttoptr i64 %or to ptr
4927 %1 = load double, ptr %0, align 8
4928 %conv = fptoui double %1 to i64
4932 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4933 define dso_local i64 @ld_not_disjoint32_uint64_t_double(i64 %ptr) {
4934 ; CHECK-LABEL: ld_not_disjoint32_uint64_t_double:
4935 ; CHECK: # %bb.0: # %entry
4936 ; CHECK-NEXT: ori r3, r3, 34463
4937 ; CHECK-NEXT: oris r3, r3, 1
4938 ; CHECK-NEXT: lfd f0, 0(r3)
4939 ; CHECK-NEXT: xscvdpuxds f0, f0
4940 ; CHECK-NEXT: mffprd r3, f0
4943 %or = or i64 %ptr, 99999
4944 %0 = inttoptr i64 %or to ptr
4945 %1 = load double, ptr %0, align 8
4946 %conv = fptoui double %1 to i64
4950 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4951 define dso_local i64 @ld_disjoint_unalign32_uint64_t_double(i64 %ptr) {
4952 ; CHECK-P10-LABEL: ld_disjoint_unalign32_uint64_t_double:
4953 ; CHECK-P10: # %bb.0: # %entry
4954 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
4955 ; CHECK-P10-NEXT: plfd f0, 99999(r3), 0
4956 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4957 ; CHECK-P10-NEXT: mffprd r3, f0
4958 ; CHECK-P10-NEXT: blr
4960 ; CHECK-PREP10-LABEL: ld_disjoint_unalign32_uint64_t_double:
4961 ; CHECK-PREP10: # %bb.0: # %entry
4962 ; CHECK-PREP10-NEXT: lis r4, 1
4963 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
4964 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
4965 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
4966 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4967 ; CHECK-PREP10-NEXT: mffprd r3, f0
4968 ; CHECK-PREP10-NEXT: blr
4970 %and = and i64 %ptr, -1048576
4971 %or = or i64 %and, 99999
4972 %0 = inttoptr i64 %or to ptr
4973 %1 = load double, ptr %0, align 8
4974 %conv = fptoui double %1 to i64
4978 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4979 define dso_local i64 @ld_disjoint_align32_uint64_t_double(i64 %ptr) {
4980 ; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_double:
4981 ; CHECK-P10: # %bb.0: # %entry
4982 ; CHECK-P10-NEXT: lis r4, -15264
4983 ; CHECK-P10-NEXT: and r3, r3, r4
4984 ; CHECK-P10-NEXT: plfd f0, 999990000(r3), 0
4985 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4986 ; CHECK-P10-NEXT: mffprd r3, f0
4987 ; CHECK-P10-NEXT: blr
4989 ; CHECK-P9-LABEL: ld_disjoint_align32_uint64_t_double:
4990 ; CHECK-P9: # %bb.0: # %entry
4991 ; CHECK-P9-NEXT: lis r4, -15264
4992 ; CHECK-P9-NEXT: and r3, r3, r4
4993 ; CHECK-P9-NEXT: lis r4, 15258
4994 ; CHECK-P9-NEXT: ori r4, r4, 41712
4995 ; CHECK-P9-NEXT: lfdx f0, r3, r4
4996 ; CHECK-P9-NEXT: xscvdpuxds f0, f0
4997 ; CHECK-P9-NEXT: mffprd r3, f0
4998 ; CHECK-P9-NEXT: blr
5000 ; CHECK-P8-LABEL: ld_disjoint_align32_uint64_t_double:
5001 ; CHECK-P8: # %bb.0: # %entry
5002 ; CHECK-P8-NEXT: lis r4, -15264
5003 ; CHECK-P8-NEXT: lis r5, 15258
5004 ; CHECK-P8-NEXT: and r3, r3, r4
5005 ; CHECK-P8-NEXT: ori r4, r5, 41712
5006 ; CHECK-P8-NEXT: lfdx f0, r3, r4
5007 ; CHECK-P8-NEXT: xscvdpuxds f0, f0
5008 ; CHECK-P8-NEXT: mffprd r3, f0
5009 ; CHECK-P8-NEXT: blr
5011 %and = and i64 %ptr, -1000341504
5012 %or = or i64 %and, 999990000
5013 %0 = inttoptr i64 %or to ptr
5014 %1 = load double, ptr %0, align 16
5015 %conv = fptoui double %1 to i64
5019 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5020 define dso_local i64 @ld_not_disjoint64_uint64_t_double(i64 %ptr) {
5021 ; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_double:
5022 ; CHECK-P10: # %bb.0: # %entry
5023 ; CHECK-P10-NEXT: pli r4, 232
5024 ; CHECK-P10-NEXT: pli r5, 3567587329
5025 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
5026 ; CHECK-P10-NEXT: or r3, r3, r5
5027 ; CHECK-P10-NEXT: lfd f0, 0(r3)
5028 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
5029 ; CHECK-P10-NEXT: mffprd r3, f0
5030 ; CHECK-P10-NEXT: blr
5032 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_double:
5033 ; CHECK-PREP10: # %bb.0: # %entry
5034 ; CHECK-PREP10-NEXT: li r4, 29
5035 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
5036 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
5037 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
5038 ; CHECK-PREP10-NEXT: or r3, r3, r4
5039 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
5040 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
5041 ; CHECK-PREP10-NEXT: mffprd r3, f0
5042 ; CHECK-PREP10-NEXT: blr
5044 %or = or i64 %ptr, 1000000000001
5045 %0 = inttoptr i64 %or to ptr
5046 %1 = load double, ptr %0, align 8
5047 %conv = fptoui double %1 to i64
5051 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5052 define dso_local i64 @ld_disjoint_unalign64_uint64_t_double(i64 %ptr) {
5053 ; CHECK-P10-LABEL: ld_disjoint_unalign64_uint64_t_double:
5054 ; CHECK-P10: # %bb.0: # %entry
5055 ; CHECK-P10-NEXT: pli r4, 232
5056 ; CHECK-P10-NEXT: pli r5, 3567587329
5057 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
5058 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
5059 ; CHECK-P10-NEXT: lfdx f0, r3, r5
5060 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
5061 ; CHECK-P10-NEXT: mffprd r3, f0
5062 ; CHECK-P10-NEXT: blr
5064 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint64_t_double:
5065 ; CHECK-PREP10: # %bb.0: # %entry
5066 ; CHECK-PREP10-NEXT: li r4, 29
5067 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
5068 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
5069 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
5070 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
5071 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
5072 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
5073 ; CHECK-PREP10-NEXT: mffprd r3, f0
5074 ; CHECK-PREP10-NEXT: blr
5076 %and = and i64 %ptr, -1099511627776
5077 %or = or i64 %and, 1000000000001
5078 %0 = inttoptr i64 %or to ptr
5079 %1 = load double, ptr %0, align 8
5080 %conv = fptoui double %1 to i64
5084 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5085 define dso_local i64 @ld_disjoint_align64_uint64_t_double(i64 %ptr) {
5086 ; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_double:
5087 ; CHECK-P10: # %bb.0: # %entry
5088 ; CHECK-P10-NEXT: pli r4, 244140625
5089 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
5090 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5091 ; CHECK-P10-NEXT: lfdx f0, r3, r4
5092 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
5093 ; CHECK-P10-NEXT: mffprd r3, f0
5094 ; CHECK-P10-NEXT: blr
5096 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_double:
5097 ; CHECK-PREP10: # %bb.0: # %entry
5098 ; CHECK-PREP10-NEXT: lis r4, 3725
5099 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
5100 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
5101 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
5102 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
5103 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
5104 ; CHECK-PREP10-NEXT: mffprd r3, f0
5105 ; CHECK-PREP10-NEXT: blr
5107 %and = and i64 %ptr, -1099511627776
5108 %or = or i64 %and, 1000000000000
5109 %0 = inttoptr i64 %or to ptr
5110 %1 = load double, ptr %0, align 4096
5111 %conv = fptoui double %1 to i64
5115 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5116 define dso_local i64 @ld_cst_unalign16_uint64_t_double() {
5117 ; CHECK-P10-LABEL: ld_cst_unalign16_uint64_t_double:
5118 ; CHECK-P10: # %bb.0: # %entry
5119 ; CHECK-P10-NEXT: li r3, 255
5120 ; CHECK-P10-NEXT: lfd f0, 0(r3)
5121 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
5122 ; CHECK-P10-NEXT: mffprd r3, f0
5123 ; CHECK-P10-NEXT: blr
5125 ; CHECK-P9-LABEL: ld_cst_unalign16_uint64_t_double:
5126 ; CHECK-P9: # %bb.0: # %entry
5127 ; CHECK-P9-NEXT: li r3, 255
5128 ; CHECK-P9-NEXT: lfd f0, 0(r3)
5129 ; CHECK-P9-NEXT: xscvdpuxds f0, f0
5130 ; CHECK-P9-NEXT: mffprd r3, f0
5131 ; CHECK-P9-NEXT: blr
5133 ; CHECK-P8-LABEL: ld_cst_unalign16_uint64_t_double:
5134 ; CHECK-P8: # %bb.0: # %entry
5135 ; CHECK-P8-NEXT: lfd f0, 255(0)
5136 ; CHECK-P8-NEXT: xscvdpuxds f0, f0
5137 ; CHECK-P8-NEXT: mffprd r3, f0
5138 ; CHECK-P8-NEXT: blr
5140 %0 = load double, ptr inttoptr (i64 255 to ptr), align 8
5141 %conv = fptoui double %0 to i64
5145 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5146 define dso_local i64 @ld_cst_align16_uint64_t_double() {
5147 ; CHECK-LABEL: ld_cst_align16_uint64_t_double:
5148 ; CHECK: # %bb.0: # %entry
5149 ; CHECK-NEXT: lfd f0, 4080(0)
5150 ; CHECK-NEXT: xscvdpuxds f0, f0
5151 ; CHECK-NEXT: mffprd r3, f0
5154 %0 = load double, ptr inttoptr (i64 4080 to ptr), align 16
5155 %conv = fptoui double %0 to i64
5159 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5160 define dso_local i64 @ld_cst_unalign32_uint64_t_double() {
5161 ; CHECK-P10-LABEL: ld_cst_unalign32_uint64_t_double:
5162 ; CHECK-P10: # %bb.0: # %entry
5163 ; CHECK-P10-NEXT: pli r3, 99999
5164 ; CHECK-P10-NEXT: lfd f0, 0(r3)
5165 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
5166 ; CHECK-P10-NEXT: mffprd r3, f0
5167 ; CHECK-P10-NEXT: blr
5169 ; CHECK-P9-LABEL: ld_cst_unalign32_uint64_t_double:
5170 ; CHECK-P9: # %bb.0: # %entry
5171 ; CHECK-P9-NEXT: lis r3, 1
5172 ; CHECK-P9-NEXT: ori r3, r3, 34463
5173 ; CHECK-P9-NEXT: lfd f0, 0(r3)
5174 ; CHECK-P9-NEXT: xscvdpuxds f0, f0
5175 ; CHECK-P9-NEXT: mffprd r3, f0
5176 ; CHECK-P9-NEXT: blr
5178 ; CHECK-P8-LABEL: ld_cst_unalign32_uint64_t_double:
5179 ; CHECK-P8: # %bb.0: # %entry
5180 ; CHECK-P8-NEXT: lis r3, 2
5181 ; CHECK-P8-NEXT: lfd f0, -31073(r3)
5182 ; CHECK-P8-NEXT: xscvdpuxds f0, f0
5183 ; CHECK-P8-NEXT: mffprd r3, f0
5184 ; CHECK-P8-NEXT: blr
5186 %0 = load double, ptr inttoptr (i64 99999 to ptr), align 8
5187 %conv = fptoui double %0 to i64
5191 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5192 define dso_local i64 @ld_cst_align32_uint64_t_double() {
5193 ; CHECK-LABEL: ld_cst_align32_uint64_t_double:
5194 ; CHECK: # %bb.0: # %entry
5195 ; CHECK-NEXT: lis r3, 153
5196 ; CHECK-NEXT: lfd f0, -27108(r3)
5197 ; CHECK-NEXT: xscvdpuxds f0, f0
5198 ; CHECK-NEXT: mffprd r3, f0
5201 %0 = load double, ptr inttoptr (i64 9999900 to ptr), align 8
5202 %conv = fptoui double %0 to i64
5206 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5207 define dso_local i64 @ld_cst_unalign64_uint64_t_double() {
5208 ; CHECK-P10-LABEL: ld_cst_unalign64_uint64_t_double:
5209 ; CHECK-P10: # %bb.0: # %entry
5210 ; CHECK-P10-NEXT: pli r3, 232
5211 ; CHECK-P10-NEXT: pli r4, 3567587329
5212 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
5213 ; CHECK-P10-NEXT: lfd f0, 0(r4)
5214 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
5215 ; CHECK-P10-NEXT: mffprd r3, f0
5216 ; CHECK-P10-NEXT: blr
5218 ; CHECK-PREP10-LABEL: ld_cst_unalign64_uint64_t_double:
5219 ; CHECK-PREP10: # %bb.0: # %entry
5220 ; CHECK-PREP10-NEXT: li r3, 29
5221 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
5222 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
5223 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
5224 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
5225 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
5226 ; CHECK-PREP10-NEXT: mffprd r3, f0
5227 ; CHECK-PREP10-NEXT: blr
5229 %0 = load double, ptr inttoptr (i64 1000000000001 to ptr), align 8
5230 %conv = fptoui double %0 to i64
5234 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5235 define dso_local i64 @ld_cst_align64_uint64_t_double() {
5236 ; CHECK-P10-LABEL: ld_cst_align64_uint64_t_double:
5237 ; CHECK-P10: # %bb.0: # %entry
5238 ; CHECK-P10-NEXT: pli r3, 244140625
5239 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
5240 ; CHECK-P10-NEXT: lfd f0, 0(r3)
5241 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
5242 ; CHECK-P10-NEXT: mffprd r3, f0
5243 ; CHECK-P10-NEXT: blr
5245 ; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_double:
5246 ; CHECK-PREP10: # %bb.0: # %entry
5247 ; CHECK-PREP10-NEXT: lis r3, 3725
5248 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
5249 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
5250 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
5251 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
5252 ; CHECK-PREP10-NEXT: mffprd r3, f0
5253 ; CHECK-PREP10-NEXT: blr
5255 %0 = load double, ptr inttoptr (i64 1000000000000 to ptr), align 4096
5256 %conv = fptoui double %0 to i64
5260 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5261 define dso_local void @st_0_uint64_t_uint8_t(i64 %ptr, i64 %str) {
5262 ; CHECK-LABEL: st_0_uint64_t_uint8_t:
5263 ; CHECK: # %bb.0: # %entry
5264 ; CHECK-NEXT: stb r4, 0(r3)
5267 %conv = trunc i64 %str to i8
5268 %0 = inttoptr i64 %ptr to ptr
5269 store i8 %conv, ptr %0, align 1
5273 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5274 define dso_local void @st_align16_uint64_t_uint8_t(ptr nocapture %ptr, i64 %str) {
5275 ; CHECK-LABEL: st_align16_uint64_t_uint8_t:
5276 ; CHECK: # %bb.0: # %entry
5277 ; CHECK-NEXT: stb r4, 8(r3)
5280 %conv = trunc i64 %str to i8
5281 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
5282 store i8 %conv, ptr %add.ptr, align 1
5286 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5287 define dso_local void @st_align32_uint64_t_uint8_t(ptr nocapture %ptr, i64 %str) {
5288 ; CHECK-P10-LABEL: st_align32_uint64_t_uint8_t:
5289 ; CHECK-P10: # %bb.0: # %entry
5290 ; CHECK-P10-NEXT: pstb r4, 99999000(r3), 0
5291 ; CHECK-P10-NEXT: blr
5293 ; CHECK-PREP10-LABEL: st_align32_uint64_t_uint8_t:
5294 ; CHECK-PREP10: # %bb.0: # %entry
5295 ; CHECK-PREP10-NEXT: lis r5, 1525
5296 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
5297 ; CHECK-PREP10-NEXT: stbx r4, r3, r5
5298 ; CHECK-PREP10-NEXT: blr
5300 %conv = trunc i64 %str to i8
5301 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
5302 store i8 %conv, ptr %add.ptr, align 1
5306 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5307 define dso_local void @st_align64_uint64_t_uint8_t(ptr nocapture %ptr, i64 %str) {
5308 ; CHECK-P10-LABEL: st_align64_uint64_t_uint8_t:
5309 ; CHECK-P10: # %bb.0: # %entry
5310 ; CHECK-P10-NEXT: pli r5, 244140625
5311 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
5312 ; CHECK-P10-NEXT: stbx r4, r3, r5
5313 ; CHECK-P10-NEXT: blr
5315 ; CHECK-PREP10-LABEL: st_align64_uint64_t_uint8_t:
5316 ; CHECK-PREP10: # %bb.0: # %entry
5317 ; CHECK-PREP10-NEXT: lis r5, 3725
5318 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
5319 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
5320 ; CHECK-PREP10-NEXT: stbx r4, r3, r5
5321 ; CHECK-PREP10-NEXT: blr
5323 %conv = trunc i64 %str to i8
5324 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
5325 store i8 %conv, ptr %add.ptr, align 1
5329 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5330 define dso_local void @st_reg_uint64_t_uint8_t(ptr nocapture %ptr, i64 %off, i64 %str) {
5331 ; CHECK-LABEL: st_reg_uint64_t_uint8_t:
5332 ; CHECK: # %bb.0: # %entry
5333 ; CHECK-NEXT: stbx r5, r3, r4
5336 %conv = trunc i64 %str to i8
5337 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
5338 store i8 %conv, ptr %add.ptr, align 1
5342 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5343 define dso_local void @st_or1_uint64_t_uint8_t(i64 %ptr, i8 zeroext %off, i64 %str) {
5344 ; CHECK-LABEL: st_or1_uint64_t_uint8_t:
5345 ; CHECK: # %bb.0: # %entry
5346 ; CHECK-NEXT: or r3, r4, r3
5347 ; CHECK-NEXT: stb r5, 0(r3)
5350 %conv = trunc i64 %str to i8
5351 %conv1 = zext i8 %off to i64
5352 %or = or i64 %conv1, %ptr
5353 %0 = inttoptr i64 %or to ptr
5354 store i8 %conv, ptr %0, align 1
5358 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5359 define dso_local void @st_or2_uint64_t_uint8_t(i64 %ptr, i8 zeroext %off, i64 %str) {
5360 ; CHECK-LABEL: st_or2_uint64_t_uint8_t:
5361 ; CHECK: # %bb.0: # %entry
5362 ; CHECK-NEXT: rldicr r3, r3, 0, 51
5363 ; CHECK-NEXT: stbx r5, r3, r4
5366 %and = and i64 %ptr, -4096
5367 %conv = trunc i64 %str to i8
5368 %conv1 = zext i8 %off to i64
5369 %or = or i64 %and, %conv1
5370 %0 = inttoptr i64 %or to ptr
5371 store i8 %conv, ptr %0, align 1
5375 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5376 define dso_local void @st_not_disjoint16_uint64_t_uint8_t(i64 %ptr, i64 %str) {
5377 ; CHECK-LABEL: st_not_disjoint16_uint64_t_uint8_t:
5378 ; CHECK: # %bb.0: # %entry
5379 ; CHECK-NEXT: ori r3, r3, 6
5380 ; CHECK-NEXT: stb r4, 0(r3)
5383 %conv = trunc i64 %str to i8
5384 %or = or i64 %ptr, 6
5385 %0 = inttoptr i64 %or to ptr
5386 store i8 %conv, ptr %0, align 1
5390 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5391 define dso_local void @st_disjoint_align16_uint64_t_uint8_t(i64 %ptr, i64 %str) {
5392 ; CHECK-LABEL: st_disjoint_align16_uint64_t_uint8_t:
5393 ; CHECK: # %bb.0: # %entry
5394 ; CHECK-NEXT: rldicr r3, r3, 0, 51
5395 ; CHECK-NEXT: stb r4, 24(r3)
5398 %and = and i64 %ptr, -4096
5399 %conv = trunc i64 %str to i8
5400 %or = or i64 %and, 24
5401 %0 = inttoptr i64 %or to ptr
5402 store i8 %conv, ptr %0, align 8
5406 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5407 define dso_local void @st_not_disjoint32_uint64_t_uint8_t(i64 %ptr, i64 %str) {
5408 ; CHECK-LABEL: st_not_disjoint32_uint64_t_uint8_t:
5409 ; CHECK: # %bb.0: # %entry
5410 ; CHECK-NEXT: ori r3, r3, 34463
5411 ; CHECK-NEXT: oris r3, r3, 1
5412 ; CHECK-NEXT: stb r4, 0(r3)
5415 %conv = trunc i64 %str to i8
5416 %or = or i64 %ptr, 99999
5417 %0 = inttoptr i64 %or to ptr
5418 store i8 %conv, ptr %0, align 1
5422 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5423 define dso_local void @st_disjoint_align32_uint64_t_uint8_t(i64 %ptr, i64 %str) {
5424 ; CHECK-P10-LABEL: st_disjoint_align32_uint64_t_uint8_t:
5425 ; CHECK-P10: # %bb.0: # %entry
5426 ; CHECK-P10-NEXT: lis r5, -15264
5427 ; CHECK-P10-NEXT: and r3, r3, r5
5428 ; CHECK-P10-NEXT: pstb r4, 999990000(r3), 0
5429 ; CHECK-P10-NEXT: blr
5431 ; CHECK-P9-LABEL: st_disjoint_align32_uint64_t_uint8_t:
5432 ; CHECK-P9: # %bb.0: # %entry
5433 ; CHECK-P9-NEXT: lis r5, -15264
5434 ; CHECK-P9-NEXT: and r3, r3, r5
5435 ; CHECK-P9-NEXT: lis r5, 15258
5436 ; CHECK-P9-NEXT: ori r5, r5, 41712
5437 ; CHECK-P9-NEXT: stbx r4, r3, r5
5438 ; CHECK-P9-NEXT: blr
5440 ; CHECK-P8-LABEL: st_disjoint_align32_uint64_t_uint8_t:
5441 ; CHECK-P8: # %bb.0: # %entry
5442 ; CHECK-P8-NEXT: lis r5, -15264
5443 ; CHECK-P8-NEXT: lis r6, 15258
5444 ; CHECK-P8-NEXT: and r3, r3, r5
5445 ; CHECK-P8-NEXT: ori r5, r6, 41712
5446 ; CHECK-P8-NEXT: stbx r4, r3, r5
5447 ; CHECK-P8-NEXT: blr
5449 %and = and i64 %ptr, -1000341504
5450 %conv = trunc i64 %str to i8
5451 %or = or i64 %and, 999990000
5452 %0 = inttoptr i64 %or to ptr
5453 store i8 %conv, ptr %0, align 16
5457 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5458 define dso_local void @st_not_disjoint64_uint64_t_uint8_t(i64 %ptr, i64 %str) {
5459 ; CHECK-P10-LABEL: st_not_disjoint64_uint64_t_uint8_t:
5460 ; CHECK-P10: # %bb.0: # %entry
5461 ; CHECK-P10-NEXT: pli r5, 232
5462 ; CHECK-P10-NEXT: pli r6, 3567587329
5463 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
5464 ; CHECK-P10-NEXT: or r3, r3, r6
5465 ; CHECK-P10-NEXT: stb r4, 0(r3)
5466 ; CHECK-P10-NEXT: blr
5468 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint64_t_uint8_t:
5469 ; CHECK-PREP10: # %bb.0: # %entry
5470 ; CHECK-PREP10-NEXT: li r5, 29
5471 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
5472 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
5473 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
5474 ; CHECK-PREP10-NEXT: or r3, r3, r5
5475 ; CHECK-PREP10-NEXT: stb r4, 0(r3)
5476 ; CHECK-PREP10-NEXT: blr
5478 %conv = trunc i64 %str to i8
5479 %or = or i64 %ptr, 1000000000001
5480 %0 = inttoptr i64 %or to ptr
5481 store i8 %conv, ptr %0, align 1
5485 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5486 define dso_local void @st_disjoint_align64_uint64_t_uint8_t(i64 %ptr, i64 %str) {
5487 ; CHECK-P10-LABEL: st_disjoint_align64_uint64_t_uint8_t:
5488 ; CHECK-P10: # %bb.0: # %entry
5489 ; CHECK-P10-NEXT: pli r5, 244140625
5490 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
5491 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
5492 ; CHECK-P10-NEXT: stbx r4, r3, r5
5493 ; CHECK-P10-NEXT: blr
5495 ; CHECK-PREP10-LABEL: st_disjoint_align64_uint64_t_uint8_t:
5496 ; CHECK-PREP10: # %bb.0: # %entry
5497 ; CHECK-PREP10-NEXT: lis r5, 3725
5498 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
5499 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
5500 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
5501 ; CHECK-PREP10-NEXT: stbx r4, r3, r5
5502 ; CHECK-PREP10-NEXT: blr
5504 %and = and i64 %ptr, -1099511627776
5505 %conv = trunc i64 %str to i8
5506 %or = or i64 %and, 1000000000000
5507 %0 = inttoptr i64 %or to ptr
5508 store i8 %conv, ptr %0, align 4096
5512 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5513 define dso_local void @st_cst_align16_uint64_t_uint8_t(i64 %str) {
5514 ; CHECK-LABEL: st_cst_align16_uint64_t_uint8_t:
5515 ; CHECK: # %bb.0: # %entry
5516 ; CHECK-NEXT: stb r3, 4080(0)
5519 %conv = trunc i64 %str to i8
5520 store i8 %conv, ptr inttoptr (i64 4080 to ptr), align 16
5524 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5525 define dso_local void @st_cst_align32_uint64_t_uint8_t(i64 %str) {
5526 ; CHECK-LABEL: st_cst_align32_uint64_t_uint8_t:
5527 ; CHECK: # %bb.0: # %entry
5528 ; CHECK-NEXT: lis r4, 153
5529 ; CHECK-NEXT: stb r3, -27108(r4)
5532 %conv = trunc i64 %str to i8
5533 store i8 %conv, ptr inttoptr (i64 9999900 to ptr), align 4
5537 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5538 define dso_local void @st_cst_align64_uint64_t_uint8_t(i64 %str) {
5539 ; CHECK-P10-LABEL: st_cst_align64_uint64_t_uint8_t:
5540 ; CHECK-P10: # %bb.0: # %entry
5541 ; CHECK-P10-NEXT: pli r4, 244140625
5542 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5543 ; CHECK-P10-NEXT: stb r3, 0(r4)
5544 ; CHECK-P10-NEXT: blr
5546 ; CHECK-PREP10-LABEL: st_cst_align64_uint64_t_uint8_t:
5547 ; CHECK-PREP10: # %bb.0: # %entry
5548 ; CHECK-PREP10-NEXT: lis r4, 3725
5549 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
5550 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
5551 ; CHECK-PREP10-NEXT: stb r3, 0(r4)
5552 ; CHECK-PREP10-NEXT: blr
5554 %conv = trunc i64 %str to i8
5555 store i8 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
5559 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5560 define dso_local void @st_0_uint64_t_uint16_t(i64 %ptr, i64 %str) {
5561 ; CHECK-LABEL: st_0_uint64_t_uint16_t:
5562 ; CHECK: # %bb.0: # %entry
5563 ; CHECK-NEXT: sth r4, 0(r3)
5566 %conv = trunc i64 %str to i16
5567 %0 = inttoptr i64 %ptr to ptr
5568 store i16 %conv, ptr %0, align 2
5572 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5573 define dso_local void @st_align16_uint64_t_uint16_t(ptr nocapture %ptr, i64 %str) {
5574 ; CHECK-LABEL: st_align16_uint64_t_uint16_t:
5575 ; CHECK: # %bb.0: # %entry
5576 ; CHECK-NEXT: sth r4, 8(r3)
5579 %conv = trunc i64 %str to i16
5580 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
5581 store i16 %conv, ptr %add.ptr, align 2
5585 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5586 define dso_local void @st_align32_uint64_t_uint16_t(ptr nocapture %ptr, i64 %str) {
5587 ; CHECK-P10-LABEL: st_align32_uint64_t_uint16_t:
5588 ; CHECK-P10: # %bb.0: # %entry
5589 ; CHECK-P10-NEXT: psth r4, 99999000(r3), 0
5590 ; CHECK-P10-NEXT: blr
5592 ; CHECK-PREP10-LABEL: st_align32_uint64_t_uint16_t:
5593 ; CHECK-PREP10: # %bb.0: # %entry
5594 ; CHECK-PREP10-NEXT: lis r5, 1525
5595 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
5596 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
5597 ; CHECK-PREP10-NEXT: blr
5599 %conv = trunc i64 %str to i16
5600 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
5601 store i16 %conv, ptr %add.ptr, align 2
5605 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5606 define dso_local void @st_align64_uint64_t_uint16_t(ptr nocapture %ptr, i64 %str) {
5607 ; CHECK-P10-LABEL: st_align64_uint64_t_uint16_t:
5608 ; CHECK-P10: # %bb.0: # %entry
5609 ; CHECK-P10-NEXT: pli r5, 244140625
5610 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
5611 ; CHECK-P10-NEXT: sthx r4, r3, r5
5612 ; CHECK-P10-NEXT: blr
5614 ; CHECK-PREP10-LABEL: st_align64_uint64_t_uint16_t:
5615 ; CHECK-PREP10: # %bb.0: # %entry
5616 ; CHECK-PREP10-NEXT: lis r5, 3725
5617 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
5618 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
5619 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
5620 ; CHECK-PREP10-NEXT: blr
5622 %conv = trunc i64 %str to i16
5623 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
5624 store i16 %conv, ptr %add.ptr, align 2
5628 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5629 define dso_local void @st_reg_uint64_t_uint16_t(ptr nocapture %ptr, i64 %off, i64 %str) {
5630 ; CHECK-LABEL: st_reg_uint64_t_uint16_t:
5631 ; CHECK: # %bb.0: # %entry
5632 ; CHECK-NEXT: sthx r5, r3, r4
5635 %conv = trunc i64 %str to i16
5636 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
5637 store i16 %conv, ptr %add.ptr, align 2
5641 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5642 define dso_local void @st_or1_uint64_t_uint16_t(i64 %ptr, i8 zeroext %off, i64 %str) {
5643 ; CHECK-LABEL: st_or1_uint64_t_uint16_t:
5644 ; CHECK: # %bb.0: # %entry
5645 ; CHECK-NEXT: or r3, r4, r3
5646 ; CHECK-NEXT: sth r5, 0(r3)
5649 %conv = trunc i64 %str to i16
5650 %conv1 = zext i8 %off to i64
5651 %or = or i64 %conv1, %ptr
5652 %0 = inttoptr i64 %or to ptr
5653 store i16 %conv, ptr %0, align 2
5657 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5658 define dso_local void @st_or2_uint64_t_uint16_t(i64 %ptr, i8 zeroext %off, i64 %str) {
5659 ; CHECK-LABEL: st_or2_uint64_t_uint16_t:
5660 ; CHECK: # %bb.0: # %entry
5661 ; CHECK-NEXT: rldicr r3, r3, 0, 51
5662 ; CHECK-NEXT: sthx r5, r3, r4
5665 %and = and i64 %ptr, -4096
5666 %conv = trunc i64 %str to i16
5667 %conv1 = zext i8 %off to i64
5668 %or = or i64 %and, %conv1
5669 %0 = inttoptr i64 %or to ptr
5670 store i16 %conv, ptr %0, align 2
5674 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5675 define dso_local void @st_not_disjoint16_uint64_t_uint16_t(i64 %ptr, i64 %str) {
5676 ; CHECK-LABEL: st_not_disjoint16_uint64_t_uint16_t:
5677 ; CHECK: # %bb.0: # %entry
5678 ; CHECK-NEXT: ori r3, r3, 6
5679 ; CHECK-NEXT: sth r4, 0(r3)
5682 %conv = trunc i64 %str to i16
5683 %or = or i64 %ptr, 6
5684 %0 = inttoptr i64 %or to ptr
5685 store i16 %conv, ptr %0, align 2
5689 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5690 define dso_local void @st_disjoint_align16_uint64_t_uint16_t(i64 %ptr, i64 %str) {
5691 ; CHECK-LABEL: st_disjoint_align16_uint64_t_uint16_t:
5692 ; CHECK: # %bb.0: # %entry
5693 ; CHECK-NEXT: rldicr r3, r3, 0, 51
5694 ; CHECK-NEXT: sth r4, 24(r3)
5697 %and = and i64 %ptr, -4096
5698 %conv = trunc i64 %str to i16
5699 %or = or i64 %and, 24
5700 %0 = inttoptr i64 %or to ptr
5701 store i16 %conv, ptr %0, align 8
5705 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5706 define dso_local void @st_not_disjoint32_uint64_t_uint16_t(i64 %ptr, i64 %str) {
5707 ; CHECK-LABEL: st_not_disjoint32_uint64_t_uint16_t:
5708 ; CHECK: # %bb.0: # %entry
5709 ; CHECK-NEXT: ori r3, r3, 34463
5710 ; CHECK-NEXT: oris r3, r3, 1
5711 ; CHECK-NEXT: sth r4, 0(r3)
5714 %conv = trunc i64 %str to i16
5715 %or = or i64 %ptr, 99999
5716 %0 = inttoptr i64 %or to ptr
5717 store i16 %conv, ptr %0, align 2
5721 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5722 define dso_local void @st_disjoint_align32_uint64_t_uint16_t(i64 %ptr, i64 %str) {
5723 ; CHECK-P10-LABEL: st_disjoint_align32_uint64_t_uint16_t:
5724 ; CHECK-P10: # %bb.0: # %entry
5725 ; CHECK-P10-NEXT: lis r5, -15264
5726 ; CHECK-P10-NEXT: and r3, r3, r5
5727 ; CHECK-P10-NEXT: psth r4, 999990000(r3), 0
5728 ; CHECK-P10-NEXT: blr
5730 ; CHECK-P9-LABEL: st_disjoint_align32_uint64_t_uint16_t:
5731 ; CHECK-P9: # %bb.0: # %entry
5732 ; CHECK-P9-NEXT: lis r5, -15264
5733 ; CHECK-P9-NEXT: and r3, r3, r5
5734 ; CHECK-P9-NEXT: lis r5, 15258
5735 ; CHECK-P9-NEXT: ori r5, r5, 41712
5736 ; CHECK-P9-NEXT: sthx r4, r3, r5
5737 ; CHECK-P9-NEXT: blr
5739 ; CHECK-P8-LABEL: st_disjoint_align32_uint64_t_uint16_t:
5740 ; CHECK-P8: # %bb.0: # %entry
5741 ; CHECK-P8-NEXT: lis r5, -15264
5742 ; CHECK-P8-NEXT: lis r6, 15258
5743 ; CHECK-P8-NEXT: and r3, r3, r5
5744 ; CHECK-P8-NEXT: ori r5, r6, 41712
5745 ; CHECK-P8-NEXT: sthx r4, r3, r5
5746 ; CHECK-P8-NEXT: blr
5748 %and = and i64 %ptr, -1000341504
5749 %conv = trunc i64 %str to i16
5750 %or = or i64 %and, 999990000
5751 %0 = inttoptr i64 %or to ptr
5752 store i16 %conv, ptr %0, align 16
5756 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5757 define dso_local void @st_not_disjoint64_uint64_t_uint16_t(i64 %ptr, i64 %str) {
5758 ; CHECK-P10-LABEL: st_not_disjoint64_uint64_t_uint16_t:
5759 ; CHECK-P10: # %bb.0: # %entry
5760 ; CHECK-P10-NEXT: pli r5, 232
5761 ; CHECK-P10-NEXT: pli r6, 3567587329
5762 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
5763 ; CHECK-P10-NEXT: or r3, r3, r6
5764 ; CHECK-P10-NEXT: sth r4, 0(r3)
5765 ; CHECK-P10-NEXT: blr
5767 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint64_t_uint16_t:
5768 ; CHECK-PREP10: # %bb.0: # %entry
5769 ; CHECK-PREP10-NEXT: li r5, 29
5770 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
5771 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
5772 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
5773 ; CHECK-PREP10-NEXT: or r3, r3, r5
5774 ; CHECK-PREP10-NEXT: sth r4, 0(r3)
5775 ; CHECK-PREP10-NEXT: blr
5777 %conv = trunc i64 %str to i16
5778 %or = or i64 %ptr, 1000000000001
5779 %0 = inttoptr i64 %or to ptr
5780 store i16 %conv, ptr %0, align 2
5784 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5785 define dso_local void @st_disjoint_align64_uint64_t_uint16_t(i64 %ptr, i64 %str) {
5786 ; CHECK-P10-LABEL: st_disjoint_align64_uint64_t_uint16_t:
5787 ; CHECK-P10: # %bb.0: # %entry
5788 ; CHECK-P10-NEXT: pli r5, 244140625
5789 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
5790 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
5791 ; CHECK-P10-NEXT: sthx r4, r3, r5
5792 ; CHECK-P10-NEXT: blr
5794 ; CHECK-PREP10-LABEL: st_disjoint_align64_uint64_t_uint16_t:
5795 ; CHECK-PREP10: # %bb.0: # %entry
5796 ; CHECK-PREP10-NEXT: lis r5, 3725
5797 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
5798 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
5799 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
5800 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
5801 ; CHECK-PREP10-NEXT: blr
5803 %and = and i64 %ptr, -1099511627776
5804 %conv = trunc i64 %str to i16
5805 %or = or i64 %and, 1000000000000
5806 %0 = inttoptr i64 %or to ptr
5807 store i16 %conv, ptr %0, align 4096
5811 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5812 define dso_local void @st_cst_align16_uint64_t_uint16_t(i64 %str) {
5813 ; CHECK-LABEL: st_cst_align16_uint64_t_uint16_t:
5814 ; CHECK: # %bb.0: # %entry
5815 ; CHECK-NEXT: sth r3, 4080(0)
5818 %conv = trunc i64 %str to i16
5819 store i16 %conv, ptr inttoptr (i64 4080 to ptr), align 16
5823 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5824 define dso_local void @st_cst_align32_uint64_t_uint16_t(i64 %str) {
5825 ; CHECK-LABEL: st_cst_align32_uint64_t_uint16_t:
5826 ; CHECK: # %bb.0: # %entry
5827 ; CHECK-NEXT: lis r4, 153
5828 ; CHECK-NEXT: sth r3, -27108(r4)
5831 %conv = trunc i64 %str to i16
5832 store i16 %conv, ptr inttoptr (i64 9999900 to ptr), align 4
5836 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5837 define dso_local void @st_cst_align64_uint64_t_uint16_t(i64 %str) {
5838 ; CHECK-P10-LABEL: st_cst_align64_uint64_t_uint16_t:
5839 ; CHECK-P10: # %bb.0: # %entry
5840 ; CHECK-P10-NEXT: pli r4, 244140625
5841 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5842 ; CHECK-P10-NEXT: sth r3, 0(r4)
5843 ; CHECK-P10-NEXT: blr
5845 ; CHECK-PREP10-LABEL: st_cst_align64_uint64_t_uint16_t:
5846 ; CHECK-PREP10: # %bb.0: # %entry
5847 ; CHECK-PREP10-NEXT: lis r4, 3725
5848 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
5849 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
5850 ; CHECK-PREP10-NEXT: sth r3, 0(r4)
5851 ; CHECK-PREP10-NEXT: blr
5853 %conv = trunc i64 %str to i16
5854 store i16 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
5858 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5859 define dso_local void @st_0_uint64_t_int16_t(i64 %ptr, i64 %str) {
5860 ; CHECK-LABEL: st_0_uint64_t_int16_t:
5861 ; CHECK: # %bb.0: # %entry
5862 ; CHECK-NEXT: sth r4, 0(r3)
5865 %conv = trunc i64 %str to i16
5866 %0 = inttoptr i64 %ptr to ptr
5867 store i16 %conv, ptr %0, align 2
5871 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5872 define dso_local void @st_align16_uint64_t_int16_t(ptr nocapture %ptr, i64 %str) {
5873 ; CHECK-LABEL: st_align16_uint64_t_int16_t:
5874 ; CHECK: # %bb.0: # %entry
5875 ; CHECK-NEXT: sth r4, 8(r3)
5878 %conv = trunc i64 %str to i16
5879 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
5880 store i16 %conv, ptr %add.ptr, align 2
5884 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5885 define dso_local void @st_align32_uint64_t_int16_t(ptr nocapture %ptr, i64 %str) {
5886 ; CHECK-P10-LABEL: st_align32_uint64_t_int16_t:
5887 ; CHECK-P10: # %bb.0: # %entry
5888 ; CHECK-P10-NEXT: psth r4, 99999000(r3), 0
5889 ; CHECK-P10-NEXT: blr
5891 ; CHECK-PREP10-LABEL: st_align32_uint64_t_int16_t:
5892 ; CHECK-PREP10: # %bb.0: # %entry
5893 ; CHECK-PREP10-NEXT: lis r5, 1525
5894 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
5895 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
5896 ; CHECK-PREP10-NEXT: blr
5898 %conv = trunc i64 %str to i16
5899 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
5900 store i16 %conv, ptr %add.ptr, align 2
5904 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5905 define dso_local void @st_align64_uint64_t_int16_t(ptr nocapture %ptr, i64 %str) {
5906 ; CHECK-P10-LABEL: st_align64_uint64_t_int16_t:
5907 ; CHECK-P10: # %bb.0: # %entry
5908 ; CHECK-P10-NEXT: pli r5, 244140625
5909 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
5910 ; CHECK-P10-NEXT: sthx r4, r3, r5
5911 ; CHECK-P10-NEXT: blr
5913 ; CHECK-PREP10-LABEL: st_align64_uint64_t_int16_t:
5914 ; CHECK-PREP10: # %bb.0: # %entry
5915 ; CHECK-PREP10-NEXT: lis r5, 3725
5916 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
5917 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
5918 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
5919 ; CHECK-PREP10-NEXT: blr
5921 %conv = trunc i64 %str to i16
5922 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
5923 store i16 %conv, ptr %add.ptr, align 2
5927 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5928 define dso_local void @st_reg_uint64_t_int16_t(ptr nocapture %ptr, i64 %off, i64 %str) {
5929 ; CHECK-LABEL: st_reg_uint64_t_int16_t:
5930 ; CHECK: # %bb.0: # %entry
5931 ; CHECK-NEXT: sthx r5, r3, r4
5934 %conv = trunc i64 %str to i16
5935 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
5936 store i16 %conv, ptr %add.ptr, align 2
5940 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5941 define dso_local void @st_or1_uint64_t_int16_t(i64 %ptr, i8 zeroext %off, i64 %str) {
5942 ; CHECK-LABEL: st_or1_uint64_t_int16_t:
5943 ; CHECK: # %bb.0: # %entry
5944 ; CHECK-NEXT: or r3, r4, r3
5945 ; CHECK-NEXT: sth r5, 0(r3)
5948 %conv = trunc i64 %str to i16
5949 %conv1 = zext i8 %off to i64
5950 %or = or i64 %conv1, %ptr
5951 %0 = inttoptr i64 %or to ptr
5952 store i16 %conv, ptr %0, align 2
5956 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5957 define dso_local void @st_or2_uint64_t_int16_t(i64 %ptr, i8 zeroext %off, i64 %str) {
5958 ; CHECK-LABEL: st_or2_uint64_t_int16_t:
5959 ; CHECK: # %bb.0: # %entry
5960 ; CHECK-NEXT: rldicr r3, r3, 0, 51
5961 ; CHECK-NEXT: sthx r5, r3, r4
5964 %and = and i64 %ptr, -4096
5965 %conv = trunc i64 %str to i16
5966 %conv1 = zext i8 %off to i64
5967 %or = or i64 %and, %conv1
5968 %0 = inttoptr i64 %or to ptr
5969 store i16 %conv, ptr %0, align 2
5973 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5974 define dso_local void @st_not_disjoint16_uint64_t_int16_t(i64 %ptr, i64 %str) {
5975 ; CHECK-LABEL: st_not_disjoint16_uint64_t_int16_t:
5976 ; CHECK: # %bb.0: # %entry
5977 ; CHECK-NEXT: ori r3, r3, 6
5978 ; CHECK-NEXT: sth r4, 0(r3)
5981 %conv = trunc i64 %str to i16
5982 %or = or i64 %ptr, 6
5983 %0 = inttoptr i64 %or to ptr
5984 store i16 %conv, ptr %0, align 2
5988 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5989 define dso_local void @st_disjoint_align16_uint64_t_int16_t(i64 %ptr, i64 %str) {
5990 ; CHECK-LABEL: st_disjoint_align16_uint64_t_int16_t:
5991 ; CHECK: # %bb.0: # %entry
5992 ; CHECK-NEXT: rldicr r3, r3, 0, 51
5993 ; CHECK-NEXT: sth r4, 24(r3)
5996 %and = and i64 %ptr, -4096
5997 %conv = trunc i64 %str to i16
5998 %or = or i64 %and, 24
5999 %0 = inttoptr i64 %or to ptr
6000 store i16 %conv, ptr %0, align 8
6004 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6005 define dso_local void @st_not_disjoint32_uint64_t_int16_t(i64 %ptr, i64 %str) {
6006 ; CHECK-LABEL: st_not_disjoint32_uint64_t_int16_t:
6007 ; CHECK: # %bb.0: # %entry
6008 ; CHECK-NEXT: ori r3, r3, 34463
6009 ; CHECK-NEXT: oris r3, r3, 1
6010 ; CHECK-NEXT: sth r4, 0(r3)
6013 %conv = trunc i64 %str to i16
6014 %or = or i64 %ptr, 99999
6015 %0 = inttoptr i64 %or to ptr
6016 store i16 %conv, ptr %0, align 2
6020 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6021 define dso_local void @st_disjoint_align32_uint64_t_int16_t(i64 %ptr, i64 %str) {
6022 ; CHECK-P10-LABEL: st_disjoint_align32_uint64_t_int16_t:
6023 ; CHECK-P10: # %bb.0: # %entry
6024 ; CHECK-P10-NEXT: lis r5, -15264
6025 ; CHECK-P10-NEXT: and r3, r3, r5
6026 ; CHECK-P10-NEXT: psth r4, 999990000(r3), 0
6027 ; CHECK-P10-NEXT: blr
6029 ; CHECK-P9-LABEL: st_disjoint_align32_uint64_t_int16_t:
6030 ; CHECK-P9: # %bb.0: # %entry
6031 ; CHECK-P9-NEXT: lis r5, -15264
6032 ; CHECK-P9-NEXT: and r3, r3, r5
6033 ; CHECK-P9-NEXT: lis r5, 15258
6034 ; CHECK-P9-NEXT: ori r5, r5, 41712
6035 ; CHECK-P9-NEXT: sthx r4, r3, r5
6036 ; CHECK-P9-NEXT: blr
6038 ; CHECK-P8-LABEL: st_disjoint_align32_uint64_t_int16_t:
6039 ; CHECK-P8: # %bb.0: # %entry
6040 ; CHECK-P8-NEXT: lis r5, -15264
6041 ; CHECK-P8-NEXT: lis r6, 15258
6042 ; CHECK-P8-NEXT: and r3, r3, r5
6043 ; CHECK-P8-NEXT: ori r5, r6, 41712
6044 ; CHECK-P8-NEXT: sthx r4, r3, r5
6045 ; CHECK-P8-NEXT: blr
6047 %and = and i64 %ptr, -1000341504
6048 %conv = trunc i64 %str to i16
6049 %or = or i64 %and, 999990000
6050 %0 = inttoptr i64 %or to ptr
6051 store i16 %conv, ptr %0, align 16
6055 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6056 define dso_local void @st_not_disjoint64_uint64_t_int16_t(i64 %ptr, i64 %str) {
6057 ; CHECK-P10-LABEL: st_not_disjoint64_uint64_t_int16_t:
6058 ; CHECK-P10: # %bb.0: # %entry
6059 ; CHECK-P10-NEXT: pli r5, 232
6060 ; CHECK-P10-NEXT: pli r6, 3567587329
6061 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
6062 ; CHECK-P10-NEXT: or r3, r3, r6
6063 ; CHECK-P10-NEXT: sth r4, 0(r3)
6064 ; CHECK-P10-NEXT: blr
6066 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint64_t_int16_t:
6067 ; CHECK-PREP10: # %bb.0: # %entry
6068 ; CHECK-PREP10-NEXT: li r5, 29
6069 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
6070 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
6071 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
6072 ; CHECK-PREP10-NEXT: or r3, r3, r5
6073 ; CHECK-PREP10-NEXT: sth r4, 0(r3)
6074 ; CHECK-PREP10-NEXT: blr
6076 %conv = trunc i64 %str to i16
6077 %or = or i64 %ptr, 1000000000001
6078 %0 = inttoptr i64 %or to ptr
6079 store i16 %conv, ptr %0, align 2
6083 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6084 define dso_local void @st_disjoint_align64_uint64_t_int16_t(i64 %ptr, i64 %str) {
6085 ; CHECK-P10-LABEL: st_disjoint_align64_uint64_t_int16_t:
6086 ; CHECK-P10: # %bb.0: # %entry
6087 ; CHECK-P10-NEXT: pli r5, 244140625
6088 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
6089 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6090 ; CHECK-P10-NEXT: sthx r4, r3, r5
6091 ; CHECK-P10-NEXT: blr
6093 ; CHECK-PREP10-LABEL: st_disjoint_align64_uint64_t_int16_t:
6094 ; CHECK-PREP10: # %bb.0: # %entry
6095 ; CHECK-PREP10-NEXT: lis r5, 3725
6096 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
6097 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6098 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6099 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
6100 ; CHECK-PREP10-NEXT: blr
6102 %and = and i64 %ptr, -1099511627776
6103 %conv = trunc i64 %str to i16
6104 %or = or i64 %and, 1000000000000
6105 %0 = inttoptr i64 %or to ptr
6106 store i16 %conv, ptr %0, align 4096
6110 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6111 define dso_local void @st_cst_align16_uint64_t_int16_t(i64 %str) {
6112 ; CHECK-LABEL: st_cst_align16_uint64_t_int16_t:
6113 ; CHECK: # %bb.0: # %entry
6114 ; CHECK-NEXT: sth r3, 4080(0)
6117 %conv = trunc i64 %str to i16
6118 store i16 %conv, ptr inttoptr (i64 4080 to ptr), align 16
6122 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6123 define dso_local void @st_cst_align32_uint64_t_int16_t(i64 %str) {
6124 ; CHECK-LABEL: st_cst_align32_uint64_t_int16_t:
6125 ; CHECK: # %bb.0: # %entry
6126 ; CHECK-NEXT: lis r4, 153
6127 ; CHECK-NEXT: sth r3, -27108(r4)
6130 %conv = trunc i64 %str to i16
6131 store i16 %conv, ptr inttoptr (i64 9999900 to ptr), align 4
6135 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6136 define dso_local void @st_cst_align64_uint64_t_int16_t(i64 %str) {
6137 ; CHECK-P10-LABEL: st_cst_align64_uint64_t_int16_t:
6138 ; CHECK-P10: # %bb.0: # %entry
6139 ; CHECK-P10-NEXT: pli r4, 244140625
6140 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6141 ; CHECK-P10-NEXT: sth r3, 0(r4)
6142 ; CHECK-P10-NEXT: blr
6144 ; CHECK-PREP10-LABEL: st_cst_align64_uint64_t_int16_t:
6145 ; CHECK-PREP10: # %bb.0: # %entry
6146 ; CHECK-PREP10-NEXT: lis r4, 3725
6147 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
6148 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
6149 ; CHECK-PREP10-NEXT: sth r3, 0(r4)
6150 ; CHECK-PREP10-NEXT: blr
6152 %conv = trunc i64 %str to i16
6153 store i16 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
6157 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6158 define dso_local void @st_0_uint64_t_uint32_t(i64 %ptr, i64 %str) {
6159 ; CHECK-LABEL: st_0_uint64_t_uint32_t:
6160 ; CHECK: # %bb.0: # %entry
6161 ; CHECK-NEXT: stw r4, 0(r3)
6164 %conv = trunc i64 %str to i32
6165 %0 = inttoptr i64 %ptr to ptr
6166 store i32 %conv, ptr %0, align 4
6170 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6171 define dso_local void @st_align16_uint64_t_uint32_t(ptr nocapture %ptr, i64 %str) {
6172 ; CHECK-LABEL: st_align16_uint64_t_uint32_t:
6173 ; CHECK: # %bb.0: # %entry
6174 ; CHECK-NEXT: stw r4, 8(r3)
6177 %conv = trunc i64 %str to i32
6178 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
6179 store i32 %conv, ptr %add.ptr, align 4
6183 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6184 define dso_local void @st_align32_uint64_t_uint32_t(ptr nocapture %ptr, i64 %str) {
6185 ; CHECK-P10-LABEL: st_align32_uint64_t_uint32_t:
6186 ; CHECK-P10: # %bb.0: # %entry
6187 ; CHECK-P10-NEXT: pstw r4, 99999000(r3), 0
6188 ; CHECK-P10-NEXT: blr
6190 ; CHECK-PREP10-LABEL: st_align32_uint64_t_uint32_t:
6191 ; CHECK-PREP10: # %bb.0: # %entry
6192 ; CHECK-PREP10-NEXT: lis r5, 1525
6193 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
6194 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
6195 ; CHECK-PREP10-NEXT: blr
6197 %conv = trunc i64 %str to i32
6198 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
6199 store i32 %conv, ptr %add.ptr, align 4
6203 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6204 define dso_local void @st_align64_uint64_t_uint32_t(ptr nocapture %ptr, i64 %str) {
6205 ; CHECK-P10-LABEL: st_align64_uint64_t_uint32_t:
6206 ; CHECK-P10: # %bb.0: # %entry
6207 ; CHECK-P10-NEXT: pli r5, 244140625
6208 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6209 ; CHECK-P10-NEXT: stwx r4, r3, r5
6210 ; CHECK-P10-NEXT: blr
6212 ; CHECK-PREP10-LABEL: st_align64_uint64_t_uint32_t:
6213 ; CHECK-PREP10: # %bb.0: # %entry
6214 ; CHECK-PREP10-NEXT: lis r5, 3725
6215 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6216 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6217 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
6218 ; CHECK-PREP10-NEXT: blr
6220 %conv = trunc i64 %str to i32
6221 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
6222 store i32 %conv, ptr %add.ptr, align 4
6226 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6227 define dso_local void @st_reg_uint64_t_uint32_t(ptr nocapture %ptr, i64 %off, i64 %str) {
6228 ; CHECK-LABEL: st_reg_uint64_t_uint32_t:
6229 ; CHECK: # %bb.0: # %entry
6230 ; CHECK-NEXT: stwx r5, r3, r4
6233 %conv = trunc i64 %str to i32
6234 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
6235 store i32 %conv, ptr %add.ptr, align 4
6239 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6240 define dso_local void @st_or1_uint64_t_uint32_t(i64 %ptr, i8 zeroext %off, i64 %str) {
6241 ; CHECK-LABEL: st_or1_uint64_t_uint32_t:
6242 ; CHECK: # %bb.0: # %entry
6243 ; CHECK-NEXT: or r3, r4, r3
6244 ; CHECK-NEXT: stw r5, 0(r3)
6247 %conv = trunc i64 %str to i32
6248 %conv1 = zext i8 %off to i64
6249 %or = or i64 %conv1, %ptr
6250 %0 = inttoptr i64 %or to ptr
6251 store i32 %conv, ptr %0, align 4
6255 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6256 define dso_local void @st_or2_uint64_t_uint32_t(i64 %ptr, i8 zeroext %off, i64 %str) {
6257 ; CHECK-LABEL: st_or2_uint64_t_uint32_t:
6258 ; CHECK: # %bb.0: # %entry
6259 ; CHECK-NEXT: rldicr r3, r3, 0, 51
6260 ; CHECK-NEXT: stwx r5, r3, r4
6263 %and = and i64 %ptr, -4096
6264 %conv = trunc i64 %str to i32
6265 %conv1 = zext i8 %off to i64
6266 %or = or i64 %and, %conv1
6267 %0 = inttoptr i64 %or to ptr
6268 store i32 %conv, ptr %0, align 4
6272 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6273 define dso_local void @st_not_disjoint16_uint64_t_uint32_t(i64 %ptr, i64 %str) {
6274 ; CHECK-LABEL: st_not_disjoint16_uint64_t_uint32_t:
6275 ; CHECK: # %bb.0: # %entry
6276 ; CHECK-NEXT: ori r3, r3, 6
6277 ; CHECK-NEXT: stw r4, 0(r3)
6280 %conv = trunc i64 %str to i32
6281 %or = or i64 %ptr, 6
6282 %0 = inttoptr i64 %or to ptr
6283 store i32 %conv, ptr %0, align 4
6287 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6288 define dso_local void @st_disjoint_align16_uint64_t_uint32_t(i64 %ptr, i64 %str) {
6289 ; CHECK-LABEL: st_disjoint_align16_uint64_t_uint32_t:
6290 ; CHECK: # %bb.0: # %entry
6291 ; CHECK-NEXT: rldicr r3, r3, 0, 51
6292 ; CHECK-NEXT: stw r4, 24(r3)
6295 %and = and i64 %ptr, -4096
6296 %conv = trunc i64 %str to i32
6297 %or = or i64 %and, 24
6298 %0 = inttoptr i64 %or to ptr
6299 store i32 %conv, ptr %0, align 8
6303 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6304 define dso_local void @st_not_disjoint32_uint64_t_uint32_t(i64 %ptr, i64 %str) {
6305 ; CHECK-LABEL: st_not_disjoint32_uint64_t_uint32_t:
6306 ; CHECK: # %bb.0: # %entry
6307 ; CHECK-NEXT: ori r3, r3, 34463
6308 ; CHECK-NEXT: oris r3, r3, 1
6309 ; CHECK-NEXT: stw r4, 0(r3)
6312 %conv = trunc i64 %str to i32
6313 %or = or i64 %ptr, 99999
6314 %0 = inttoptr i64 %or to ptr
6315 store i32 %conv, ptr %0, align 4
6319 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6320 define dso_local void @st_disjoint_align32_uint64_t_uint32_t(i64 %ptr, i64 %str) {
6321 ; CHECK-P10-LABEL: st_disjoint_align32_uint64_t_uint32_t:
6322 ; CHECK-P10: # %bb.0: # %entry
6323 ; CHECK-P10-NEXT: lis r5, -15264
6324 ; CHECK-P10-NEXT: and r3, r3, r5
6325 ; CHECK-P10-NEXT: pstw r4, 999990000(r3), 0
6326 ; CHECK-P10-NEXT: blr
6328 ; CHECK-P9-LABEL: st_disjoint_align32_uint64_t_uint32_t:
6329 ; CHECK-P9: # %bb.0: # %entry
6330 ; CHECK-P9-NEXT: lis r5, -15264
6331 ; CHECK-P9-NEXT: and r3, r3, r5
6332 ; CHECK-P9-NEXT: lis r5, 15258
6333 ; CHECK-P9-NEXT: ori r5, r5, 41712
6334 ; CHECK-P9-NEXT: stwx r4, r3, r5
6335 ; CHECK-P9-NEXT: blr
6337 ; CHECK-P8-LABEL: st_disjoint_align32_uint64_t_uint32_t:
6338 ; CHECK-P8: # %bb.0: # %entry
6339 ; CHECK-P8-NEXT: lis r5, -15264
6340 ; CHECK-P8-NEXT: lis r6, 15258
6341 ; CHECK-P8-NEXT: and r3, r3, r5
6342 ; CHECK-P8-NEXT: ori r5, r6, 41712
6343 ; CHECK-P8-NEXT: stwx r4, r3, r5
6344 ; CHECK-P8-NEXT: blr
6346 %and = and i64 %ptr, -1000341504
6347 %conv = trunc i64 %str to i32
6348 %or = or i64 %and, 999990000
6349 %0 = inttoptr i64 %or to ptr
6350 store i32 %conv, ptr %0, align 16
6354 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6355 define dso_local void @st_not_disjoint64_uint64_t_uint32_t(i64 %ptr, i64 %str) {
6356 ; CHECK-P10-LABEL: st_not_disjoint64_uint64_t_uint32_t:
6357 ; CHECK-P10: # %bb.0: # %entry
6358 ; CHECK-P10-NEXT: pli r5, 232
6359 ; CHECK-P10-NEXT: pli r6, 3567587329
6360 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
6361 ; CHECK-P10-NEXT: or r3, r3, r6
6362 ; CHECK-P10-NEXT: stw r4, 0(r3)
6363 ; CHECK-P10-NEXT: blr
6365 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint64_t_uint32_t:
6366 ; CHECK-PREP10: # %bb.0: # %entry
6367 ; CHECK-PREP10-NEXT: li r5, 29
6368 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
6369 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
6370 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
6371 ; CHECK-PREP10-NEXT: or r3, r3, r5
6372 ; CHECK-PREP10-NEXT: stw r4, 0(r3)
6373 ; CHECK-PREP10-NEXT: blr
6375 %conv = trunc i64 %str to i32
6376 %or = or i64 %ptr, 1000000000001
6377 %0 = inttoptr i64 %or to ptr
6378 store i32 %conv, ptr %0, align 4
6382 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6383 define dso_local void @st_disjoint_align64_uint64_t_uint32_t(i64 %ptr, i64 %str) {
6384 ; CHECK-P10-LABEL: st_disjoint_align64_uint64_t_uint32_t:
6385 ; CHECK-P10: # %bb.0: # %entry
6386 ; CHECK-P10-NEXT: pli r5, 244140625
6387 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
6388 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6389 ; CHECK-P10-NEXT: stwx r4, r3, r5
6390 ; CHECK-P10-NEXT: blr
6392 ; CHECK-PREP10-LABEL: st_disjoint_align64_uint64_t_uint32_t:
6393 ; CHECK-PREP10: # %bb.0: # %entry
6394 ; CHECK-PREP10-NEXT: lis r5, 3725
6395 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
6396 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6397 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6398 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
6399 ; CHECK-PREP10-NEXT: blr
6401 %and = and i64 %ptr, -1099511627776
6402 %conv = trunc i64 %str to i32
6403 %or = or i64 %and, 1000000000000
6404 %0 = inttoptr i64 %or to ptr
6405 store i32 %conv, ptr %0, align 4096
6409 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6410 define dso_local void @st_cst_align16_uint64_t_uint32_t(i64 %str) {
6411 ; CHECK-LABEL: st_cst_align16_uint64_t_uint32_t:
6412 ; CHECK: # %bb.0: # %entry
6413 ; CHECK-NEXT: stw r3, 4080(0)
6416 %conv = trunc i64 %str to i32
6417 store i32 %conv, ptr inttoptr (i64 4080 to ptr), align 16
6421 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6422 define dso_local void @st_cst_align32_uint64_t_uint32_t(i64 %str) {
6423 ; CHECK-LABEL: st_cst_align32_uint64_t_uint32_t:
6424 ; CHECK: # %bb.0: # %entry
6425 ; CHECK-NEXT: lis r4, 153
6426 ; CHECK-NEXT: stw r3, -27108(r4)
6429 %conv = trunc i64 %str to i32
6430 store i32 %conv, ptr inttoptr (i64 9999900 to ptr), align 4
6434 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6435 define dso_local void @st_cst_align64_uint64_t_uint32_t(i64 %str) {
6436 ; CHECK-P10-LABEL: st_cst_align64_uint64_t_uint32_t:
6437 ; CHECK-P10: # %bb.0: # %entry
6438 ; CHECK-P10-NEXT: pli r4, 244140625
6439 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6440 ; CHECK-P10-NEXT: stw r3, 0(r4)
6441 ; CHECK-P10-NEXT: blr
6443 ; CHECK-PREP10-LABEL: st_cst_align64_uint64_t_uint32_t:
6444 ; CHECK-PREP10: # %bb.0: # %entry
6445 ; CHECK-PREP10-NEXT: lis r4, 3725
6446 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
6447 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
6448 ; CHECK-PREP10-NEXT: stw r3, 0(r4)
6449 ; CHECK-PREP10-NEXT: blr
6451 %conv = trunc i64 %str to i32
6452 store i32 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
6456 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6457 define dso_local void @st_0_uint64_t_uint64_t(i64 %ptr, i64 %str) {
6458 ; CHECK-LABEL: st_0_uint64_t_uint64_t:
6459 ; CHECK: # %bb.0: # %entry
6460 ; CHECK-NEXT: std r4, 0(r3)
6463 %0 = inttoptr i64 %ptr to ptr
6464 store i64 %str, ptr %0, align 8
6468 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6469 define dso_local void @st_align16_uint64_t_uint64_t(ptr nocapture %ptr, i64 %str) {
6470 ; CHECK-LABEL: st_align16_uint64_t_uint64_t:
6471 ; CHECK: # %bb.0: # %entry
6472 ; CHECK-NEXT: std r4, 8(r3)
6475 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
6476 store i64 %str, ptr %add.ptr, align 8
6480 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6481 define dso_local void @st_align32_uint64_t_uint64_t(ptr nocapture %ptr, i64 %str) {
6482 ; CHECK-P10-LABEL: st_align32_uint64_t_uint64_t:
6483 ; CHECK-P10: # %bb.0: # %entry
6484 ; CHECK-P10-NEXT: pstd r4, 99999000(r3), 0
6485 ; CHECK-P10-NEXT: blr
6487 ; CHECK-PREP10-LABEL: st_align32_uint64_t_uint64_t:
6488 ; CHECK-PREP10: # %bb.0: # %entry
6489 ; CHECK-PREP10-NEXT: lis r5, 1525
6490 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
6491 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
6492 ; CHECK-PREP10-NEXT: blr
6494 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
6495 store i64 %str, ptr %add.ptr, align 8
6499 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6500 define dso_local void @st_align64_uint64_t_uint64_t(ptr nocapture %ptr, i64 %str) {
6501 ; CHECK-P10-LABEL: st_align64_uint64_t_uint64_t:
6502 ; CHECK-P10: # %bb.0: # %entry
6503 ; CHECK-P10-NEXT: pli r5, 244140625
6504 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6505 ; CHECK-P10-NEXT: stdx r4, r3, r5
6506 ; CHECK-P10-NEXT: blr
6508 ; CHECK-PREP10-LABEL: st_align64_uint64_t_uint64_t:
6509 ; CHECK-PREP10: # %bb.0: # %entry
6510 ; CHECK-PREP10-NEXT: lis r5, 3725
6511 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6512 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6513 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
6514 ; CHECK-PREP10-NEXT: blr
6516 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
6517 store i64 %str, ptr %add.ptr, align 8
6521 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6522 define dso_local void @st_reg_uint64_t_uint64_t(ptr nocapture %ptr, i64 %off, i64 %str) {
6523 ; CHECK-LABEL: st_reg_uint64_t_uint64_t:
6524 ; CHECK: # %bb.0: # %entry
6525 ; CHECK-NEXT: stdx r5, r3, r4
6528 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
6529 store i64 %str, ptr %add.ptr, align 8
6533 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6534 define dso_local void @st_or1_uint64_t_uint64_t(i64 %ptr, i8 zeroext %off, i64 %str) {
6535 ; CHECK-LABEL: st_or1_uint64_t_uint64_t:
6536 ; CHECK: # %bb.0: # %entry
6537 ; CHECK-NEXT: or r3, r4, r3
6538 ; CHECK-NEXT: std r5, 0(r3)
6541 %conv = zext i8 %off to i64
6542 %or = or i64 %conv, %ptr
6543 %0 = inttoptr i64 %or to ptr
6544 store i64 %str, ptr %0, align 8
6548 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6549 define dso_local void @st_or2_uint64_t_uint64_t(i64 %ptr, i8 zeroext %off, i64 %str) {
6550 ; CHECK-LABEL: st_or2_uint64_t_uint64_t:
6551 ; CHECK: # %bb.0: # %entry
6552 ; CHECK-NEXT: rldicr r3, r3, 0, 51
6553 ; CHECK-NEXT: stdx r5, r3, r4
6556 %and = and i64 %ptr, -4096
6557 %conv = zext i8 %off to i64
6558 %or = or i64 %and, %conv
6559 %0 = inttoptr i64 %or to ptr
6560 store i64 %str, ptr %0, align 8
6564 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6565 define dso_local void @st_not_disjoint16_uint64_t_uint64_t(i64 %ptr, i64 %str) {
6566 ; CHECK-LABEL: st_not_disjoint16_uint64_t_uint64_t:
6567 ; CHECK: # %bb.0: # %entry
6568 ; CHECK-NEXT: ori r3, r3, 6
6569 ; CHECK-NEXT: std r4, 0(r3)
6572 %or = or i64 %ptr, 6
6573 %0 = inttoptr i64 %or to ptr
6574 store i64 %str, ptr %0, align 8
6578 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6579 define dso_local void @st_disjoint_align16_uint64_t_uint64_t(i64 %ptr, i64 %str) {
6580 ; CHECK-LABEL: st_disjoint_align16_uint64_t_uint64_t:
6581 ; CHECK: # %bb.0: # %entry
6582 ; CHECK-NEXT: rldicr r3, r3, 0, 51
6583 ; CHECK-NEXT: std r4, 24(r3)
6586 %and = and i64 %ptr, -4096
6587 %or = or i64 %and, 24
6588 %0 = inttoptr i64 %or to ptr
6589 store i64 %str, ptr %0, align 8
6593 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6594 define dso_local void @st_not_disjoint32_uint64_t_uint64_t(i64 %ptr, i64 %str) {
6595 ; CHECK-LABEL: st_not_disjoint32_uint64_t_uint64_t:
6596 ; CHECK: # %bb.0: # %entry
6597 ; CHECK-NEXT: ori r3, r3, 34463
6598 ; CHECK-NEXT: oris r3, r3, 1
6599 ; CHECK-NEXT: std r4, 0(r3)
6602 %or = or i64 %ptr, 99999
6603 %0 = inttoptr i64 %or to ptr
6604 store i64 %str, ptr %0, align 8
6608 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6609 define dso_local void @st_disjoint_align32_uint64_t_uint64_t(i64 %ptr, i64 %str) {
6610 ; CHECK-P10-LABEL: st_disjoint_align32_uint64_t_uint64_t:
6611 ; CHECK-P10: # %bb.0: # %entry
6612 ; CHECK-P10-NEXT: lis r5, -15264
6613 ; CHECK-P10-NEXT: and r3, r3, r5
6614 ; CHECK-P10-NEXT: pstd r4, 999990000(r3), 0
6615 ; CHECK-P10-NEXT: blr
6617 ; CHECK-P9-LABEL: st_disjoint_align32_uint64_t_uint64_t:
6618 ; CHECK-P9: # %bb.0: # %entry
6619 ; CHECK-P9-NEXT: lis r5, -15264
6620 ; CHECK-P9-NEXT: and r3, r3, r5
6621 ; CHECK-P9-NEXT: lis r5, 15258
6622 ; CHECK-P9-NEXT: ori r5, r5, 41712
6623 ; CHECK-P9-NEXT: stdx r4, r3, r5
6624 ; CHECK-P9-NEXT: blr
6626 ; CHECK-P8-LABEL: st_disjoint_align32_uint64_t_uint64_t:
6627 ; CHECK-P8: # %bb.0: # %entry
6628 ; CHECK-P8-NEXT: lis r5, -15264
6629 ; CHECK-P8-NEXT: lis r6, 15258
6630 ; CHECK-P8-NEXT: and r3, r3, r5
6631 ; CHECK-P8-NEXT: ori r5, r6, 41712
6632 ; CHECK-P8-NEXT: stdx r4, r3, r5
6633 ; CHECK-P8-NEXT: blr
6635 %and = and i64 %ptr, -1000341504
6636 %or = or i64 %and, 999990000
6637 %0 = inttoptr i64 %or to ptr
6638 store i64 %str, ptr %0, align 16
6642 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6643 define dso_local void @st_not_disjoint64_uint64_t_uint64_t(i64 %ptr, i64 %str) {
6644 ; CHECK-P10-LABEL: st_not_disjoint64_uint64_t_uint64_t:
6645 ; CHECK-P10: # %bb.0: # %entry
6646 ; CHECK-P10-NEXT: pli r5, 232
6647 ; CHECK-P10-NEXT: pli r6, 3567587329
6648 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
6649 ; CHECK-P10-NEXT: or r3, r3, r6
6650 ; CHECK-P10-NEXT: std r4, 0(r3)
6651 ; CHECK-P10-NEXT: blr
6653 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint64_t_uint64_t:
6654 ; CHECK-PREP10: # %bb.0: # %entry
6655 ; CHECK-PREP10-NEXT: li r5, 29
6656 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
6657 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
6658 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
6659 ; CHECK-PREP10-NEXT: or r3, r3, r5
6660 ; CHECK-PREP10-NEXT: std r4, 0(r3)
6661 ; CHECK-PREP10-NEXT: blr
6663 %or = or i64 %ptr, 1000000000001
6664 %0 = inttoptr i64 %or to ptr
6665 store i64 %str, ptr %0, align 8
6669 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6670 define dso_local void @st_disjoint_align64_uint64_t_uint64_t(i64 %ptr, i64 %str) {
6671 ; CHECK-P10-LABEL: st_disjoint_align64_uint64_t_uint64_t:
6672 ; CHECK-P10: # %bb.0: # %entry
6673 ; CHECK-P10-NEXT: pli r5, 244140625
6674 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
6675 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6676 ; CHECK-P10-NEXT: stdx r4, r3, r5
6677 ; CHECK-P10-NEXT: blr
6679 ; CHECK-PREP10-LABEL: st_disjoint_align64_uint64_t_uint64_t:
6680 ; CHECK-PREP10: # %bb.0: # %entry
6681 ; CHECK-PREP10-NEXT: lis r5, 3725
6682 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
6683 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6684 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6685 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
6686 ; CHECK-PREP10-NEXT: blr
6688 %and = and i64 %ptr, -1099511627776
6689 %or = or i64 %and, 1000000000000
6690 %0 = inttoptr i64 %or to ptr
6691 store i64 %str, ptr %0, align 4096
6695 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6696 define dso_local void @st_cst_align16_uint64_t_uint64_t(i64 %str) {
6697 ; CHECK-LABEL: st_cst_align16_uint64_t_uint64_t:
6698 ; CHECK: # %bb.0: # %entry
6699 ; CHECK-NEXT: std r3, 4080(0)
6702 store i64 %str, ptr inttoptr (i64 4080 to ptr), align 16
6706 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6707 define dso_local void @st_cst_align32_uint64_t_uint64_t(i64 %str) {
6708 ; CHECK-LABEL: st_cst_align32_uint64_t_uint64_t:
6709 ; CHECK: # %bb.0: # %entry
6710 ; CHECK-NEXT: lis r4, 153
6711 ; CHECK-NEXT: std r3, -27108(r4)
6714 store i64 %str, ptr inttoptr (i64 9999900 to ptr), align 8
6718 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6719 define dso_local void @st_cst_align64_uint64_t_uint64_t(i64 %str) {
6720 ; CHECK-P10-LABEL: st_cst_align64_uint64_t_uint64_t:
6721 ; CHECK-P10: # %bb.0: # %entry
6722 ; CHECK-P10-NEXT: pli r4, 244140625
6723 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6724 ; CHECK-P10-NEXT: std r3, 0(r4)
6725 ; CHECK-P10-NEXT: blr
6727 ; CHECK-PREP10-LABEL: st_cst_align64_uint64_t_uint64_t:
6728 ; CHECK-PREP10: # %bb.0: # %entry
6729 ; CHECK-PREP10-NEXT: lis r4, 3725
6730 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
6731 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
6732 ; CHECK-PREP10-NEXT: std r3, 0(r4)
6733 ; CHECK-PREP10-NEXT: blr
6735 store i64 %str, ptr inttoptr (i64 1000000000000 to ptr), align 4096
6739 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6740 define dso_local void @st_0_uint64_t_float(i64 %ptr, i64 %str) {
6741 ; CHECK-LABEL: st_0_uint64_t_float:
6742 ; CHECK: # %bb.0: # %entry
6743 ; CHECK-NEXT: mtfprd f0, r4
6744 ; CHECK-NEXT: xscvuxdsp f0, f0
6745 ; CHECK-NEXT: stfs f0, 0(r3)
6748 %conv = uitofp i64 %str to float
6749 %0 = inttoptr i64 %ptr to ptr
6750 store float %conv, ptr %0, align 4
6754 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6755 define dso_local void @st_align16_uint64_t_float(ptr nocapture %ptr, i64 %str) {
6756 ; CHECK-LABEL: st_align16_uint64_t_float:
6757 ; CHECK: # %bb.0: # %entry
6758 ; CHECK-NEXT: mtfprd f0, r4
6759 ; CHECK-NEXT: xscvuxdsp f0, f0
6760 ; CHECK-NEXT: stfs f0, 8(r3)
6763 %conv = uitofp i64 %str to float
6764 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
6765 store float %conv, ptr %add.ptr, align 4
6769 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6770 define dso_local void @st_align32_uint64_t_float(ptr nocapture %ptr, i64 %str) {
6771 ; CHECK-P10-LABEL: st_align32_uint64_t_float:
6772 ; CHECK-P10: # %bb.0: # %entry
6773 ; CHECK-P10-NEXT: mtfprd f0, r4
6774 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
6775 ; CHECK-P10-NEXT: pstfs f0, 99999000(r3), 0
6776 ; CHECK-P10-NEXT: blr
6778 ; CHECK-P9-LABEL: st_align32_uint64_t_float:
6779 ; CHECK-P9: # %bb.0: # %entry
6780 ; CHECK-P9-NEXT: mtfprd f0, r4
6781 ; CHECK-P9-NEXT: lis r4, 1525
6782 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
6783 ; CHECK-P9-NEXT: ori r4, r4, 56600
6784 ; CHECK-P9-NEXT: stfsx f0, r3, r4
6785 ; CHECK-P9-NEXT: blr
6787 ; CHECK-P8-LABEL: st_align32_uint64_t_float:
6788 ; CHECK-P8: # %bb.0: # %entry
6789 ; CHECK-P8-NEXT: mtfprd f0, r4
6790 ; CHECK-P8-NEXT: lis r4, 1525
6791 ; CHECK-P8-NEXT: ori r4, r4, 56600
6792 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
6793 ; CHECK-P8-NEXT: stfsx f0, r3, r4
6794 ; CHECK-P8-NEXT: blr
6796 %conv = uitofp i64 %str to float
6797 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
6798 store float %conv, ptr %add.ptr, align 4
6802 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6803 define dso_local void @st_align64_uint64_t_float(ptr nocapture %ptr, i64 %str) {
6804 ; CHECK-P10-LABEL: st_align64_uint64_t_float:
6805 ; CHECK-P10: # %bb.0: # %entry
6806 ; CHECK-P10-NEXT: mtfprd f0, r4
6807 ; CHECK-P10-NEXT: pli r4, 244140625
6808 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6809 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
6810 ; CHECK-P10-NEXT: stfsx f0, r3, r4
6811 ; CHECK-P10-NEXT: blr
6813 ; CHECK-P9-LABEL: st_align64_uint64_t_float:
6814 ; CHECK-P9: # %bb.0: # %entry
6815 ; CHECK-P9-NEXT: mtfprd f0, r4
6816 ; CHECK-P9-NEXT: lis r4, 3725
6817 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
6818 ; CHECK-P9-NEXT: ori r4, r4, 19025
6819 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
6820 ; CHECK-P9-NEXT: stfsx f0, r3, r4
6821 ; CHECK-P9-NEXT: blr
6823 ; CHECK-P8-LABEL: st_align64_uint64_t_float:
6824 ; CHECK-P8: # %bb.0: # %entry
6825 ; CHECK-P8-NEXT: mtfprd f0, r4
6826 ; CHECK-P8-NEXT: lis r4, 3725
6827 ; CHECK-P8-NEXT: ori r4, r4, 19025
6828 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
6829 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
6830 ; CHECK-P8-NEXT: stfsx f0, r3, r4
6831 ; CHECK-P8-NEXT: blr
6833 %conv = uitofp i64 %str to float
6834 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
6835 store float %conv, ptr %add.ptr, align 4
6839 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6840 define dso_local void @st_reg_uint64_t_float(ptr nocapture %ptr, i64 %off, i64 %str) {
6841 ; CHECK-LABEL: st_reg_uint64_t_float:
6842 ; CHECK: # %bb.0: # %entry
6843 ; CHECK-NEXT: mtfprd f0, r5
6844 ; CHECK-NEXT: xscvuxdsp f0, f0
6845 ; CHECK-NEXT: stfsx f0, r3, r4
6848 %conv = uitofp i64 %str to float
6849 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
6850 store float %conv, ptr %add.ptr, align 4
6854 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6855 define dso_local void @st_or1_uint64_t_float(i64 %ptr, i8 zeroext %off, i64 %str) {
6856 ; CHECK-LABEL: st_or1_uint64_t_float:
6857 ; CHECK: # %bb.0: # %entry
6858 ; CHECK-NEXT: mtfprd f0, r5
6859 ; CHECK-NEXT: or r3, r4, r3
6860 ; CHECK-NEXT: xscvuxdsp f0, f0
6861 ; CHECK-NEXT: stfs f0, 0(r3)
6864 %conv = uitofp i64 %str to float
6865 %conv1 = zext i8 %off to i64
6866 %or = or i64 %conv1, %ptr
6867 %0 = inttoptr i64 %or to ptr
6868 store float %conv, ptr %0, align 4
6872 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6873 define dso_local void @st_or2_uint64_t_float(i64 %ptr, i8 zeroext %off, i64 %str) {
6874 ; CHECK-LABEL: st_or2_uint64_t_float:
6875 ; CHECK: # %bb.0: # %entry
6876 ; CHECK-NEXT: mtfprd f0, r5
6877 ; CHECK-NEXT: rldicr r3, r3, 0, 51
6878 ; CHECK-NEXT: xscvuxdsp f0, f0
6879 ; CHECK-NEXT: stfsx f0, r3, r4
6882 %and = and i64 %ptr, -4096
6883 %conv = uitofp i64 %str to float
6884 %conv1 = zext i8 %off to i64
6885 %or = or i64 %and, %conv1
6886 %0 = inttoptr i64 %or to ptr
6887 store float %conv, ptr %0, align 4
6891 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6892 define dso_local void @st_not_disjoint16_uint64_t_float(i64 %ptr, i64 %str) {
6893 ; CHECK-LABEL: st_not_disjoint16_uint64_t_float:
6894 ; CHECK: # %bb.0: # %entry
6895 ; CHECK-NEXT: mtfprd f0, r4
6896 ; CHECK-NEXT: ori r3, r3, 6
6897 ; CHECK-NEXT: xscvuxdsp f0, f0
6898 ; CHECK-NEXT: stfs f0, 0(r3)
6901 %conv = uitofp i64 %str to float
6902 %or = or i64 %ptr, 6
6903 %0 = inttoptr i64 %or to ptr
6904 store float %conv, ptr %0, align 4
6908 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6909 define dso_local void @st_disjoint_align16_uint64_t_float(i64 %ptr, i64 %str) {
6910 ; CHECK-LABEL: st_disjoint_align16_uint64_t_float:
6911 ; CHECK: # %bb.0: # %entry
6912 ; CHECK-NEXT: mtfprd f0, r4
6913 ; CHECK-NEXT: rldicr r3, r3, 0, 51
6914 ; CHECK-NEXT: xscvuxdsp f0, f0
6915 ; CHECK-NEXT: stfs f0, 24(r3)
6918 %and = and i64 %ptr, -4096
6919 %conv = uitofp i64 %str to float
6920 %or = or i64 %and, 24
6921 %0 = inttoptr i64 %or to ptr
6922 store float %conv, ptr %0, align 8
6926 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6927 define dso_local void @st_not_disjoint32_uint64_t_float(i64 %ptr, i64 %str) {
6928 ; CHECK-P10-LABEL: st_not_disjoint32_uint64_t_float:
6929 ; CHECK-P10: # %bb.0: # %entry
6930 ; CHECK-P10-NEXT: mtfprd f0, r4
6931 ; CHECK-P10-NEXT: ori r3, r3, 34463
6932 ; CHECK-P10-NEXT: oris r3, r3, 1
6933 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
6934 ; CHECK-P10-NEXT: stfs f0, 0(r3)
6935 ; CHECK-P10-NEXT: blr
6937 ; CHECK-P9-LABEL: st_not_disjoint32_uint64_t_float:
6938 ; CHECK-P9: # %bb.0: # %entry
6939 ; CHECK-P9-NEXT: mtfprd f0, r4
6940 ; CHECK-P9-NEXT: ori r3, r3, 34463
6941 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
6942 ; CHECK-P9-NEXT: oris r3, r3, 1
6943 ; CHECK-P9-NEXT: stfs f0, 0(r3)
6944 ; CHECK-P9-NEXT: blr
6946 ; CHECK-P8-LABEL: st_not_disjoint32_uint64_t_float:
6947 ; CHECK-P8: # %bb.0: # %entry
6948 ; CHECK-P8-NEXT: mtfprd f0, r4
6949 ; CHECK-P8-NEXT: ori r3, r3, 34463
6950 ; CHECK-P8-NEXT: oris r3, r3, 1
6951 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
6952 ; CHECK-P8-NEXT: stfs f0, 0(r3)
6953 ; CHECK-P8-NEXT: blr
6955 %conv = uitofp i64 %str to float
6956 %or = or i64 %ptr, 99999
6957 %0 = inttoptr i64 %or to ptr
6958 store float %conv, ptr %0, align 4
6962 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6963 define dso_local void @st_disjoint_align32_uint64_t_float(i64 %ptr, i64 %str) {
6964 ; CHECK-P10-LABEL: st_disjoint_align32_uint64_t_float:
6965 ; CHECK-P10: # %bb.0: # %entry
6966 ; CHECK-P10-NEXT: mtfprd f0, r4
6967 ; CHECK-P10-NEXT: lis r5, -15264
6968 ; CHECK-P10-NEXT: and r3, r3, r5
6969 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
6970 ; CHECK-P10-NEXT: pstfs f0, 999990000(r3), 0
6971 ; CHECK-P10-NEXT: blr
6973 ; CHECK-P9-LABEL: st_disjoint_align32_uint64_t_float:
6974 ; CHECK-P9: # %bb.0: # %entry
6975 ; CHECK-P9-NEXT: mtfprd f0, r4
6976 ; CHECK-P9-NEXT: lis r5, -15264
6977 ; CHECK-P9-NEXT: lis r4, 15258
6978 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
6979 ; CHECK-P9-NEXT: and r3, r3, r5
6980 ; CHECK-P9-NEXT: ori r4, r4, 41712
6981 ; CHECK-P9-NEXT: stfsx f0, r3, r4
6982 ; CHECK-P9-NEXT: blr
6984 ; CHECK-P8-LABEL: st_disjoint_align32_uint64_t_float:
6985 ; CHECK-P8: # %bb.0: # %entry
6986 ; CHECK-P8-NEXT: mtfprd f0, r4
6987 ; CHECK-P8-NEXT: lis r4, -15264
6988 ; CHECK-P8-NEXT: lis r5, 15258
6989 ; CHECK-P8-NEXT: and r3, r3, r4
6990 ; CHECK-P8-NEXT: ori r4, r5, 41712
6991 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
6992 ; CHECK-P8-NEXT: stfsx f0, r3, r4
6993 ; CHECK-P8-NEXT: blr
6995 %and = and i64 %ptr, -1000341504
6996 %conv = uitofp i64 %str to float
6997 %or = or i64 %and, 999990000
6998 %0 = inttoptr i64 %or to ptr
6999 store float %conv, ptr %0, align 16
7003 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7004 define dso_local void @st_not_disjoint64_uint64_t_float(i64 %ptr, i64 %str) {
7005 ; CHECK-P10-LABEL: st_not_disjoint64_uint64_t_float:
7006 ; CHECK-P10: # %bb.0: # %entry
7007 ; CHECK-P10-NEXT: mtfprd f0, r4
7008 ; CHECK-P10-NEXT: pli r4, 232
7009 ; CHECK-P10-NEXT: pli r5, 3567587329
7010 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
7011 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
7012 ; CHECK-P10-NEXT: or r3, r3, r5
7013 ; CHECK-P10-NEXT: stfs f0, 0(r3)
7014 ; CHECK-P10-NEXT: blr
7016 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint64_t_float:
7017 ; CHECK-PREP10: # %bb.0: # %entry
7018 ; CHECK-PREP10-NEXT: mtfprd f0, r4
7019 ; CHECK-PREP10-NEXT: li r4, 29
7020 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
7021 ; CHECK-PREP10-NEXT: xscvuxdsp f0, f0
7022 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
7023 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
7024 ; CHECK-PREP10-NEXT: or r3, r3, r4
7025 ; CHECK-PREP10-NEXT: stfs f0, 0(r3)
7026 ; CHECK-PREP10-NEXT: blr
7028 %conv = uitofp i64 %str to float
7029 %or = or i64 %ptr, 1000000000001
7030 %0 = inttoptr i64 %or to ptr
7031 store float %conv, ptr %0, align 4
7035 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7036 define dso_local void @st_disjoint_align64_uint64_t_float(i64 %ptr, i64 %str) {
7037 ; CHECK-P10-LABEL: st_disjoint_align64_uint64_t_float:
7038 ; CHECK-P10: # %bb.0: # %entry
7039 ; CHECK-P10-NEXT: mtfprd f0, r4
7040 ; CHECK-P10-NEXT: pli r4, 244140625
7041 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
7042 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7043 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
7044 ; CHECK-P10-NEXT: stfsx f0, r3, r4
7045 ; CHECK-P10-NEXT: blr
7047 ; CHECK-P9-LABEL: st_disjoint_align64_uint64_t_float:
7048 ; CHECK-P9: # %bb.0: # %entry
7049 ; CHECK-P9-NEXT: mtfprd f0, r4
7050 ; CHECK-P9-NEXT: lis r4, 3725
7051 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
7052 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
7053 ; CHECK-P9-NEXT: ori r4, r4, 19025
7054 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
7055 ; CHECK-P9-NEXT: stfsx f0, r3, r4
7056 ; CHECK-P9-NEXT: blr
7058 ; CHECK-P8-LABEL: st_disjoint_align64_uint64_t_float:
7059 ; CHECK-P8: # %bb.0: # %entry
7060 ; CHECK-P8-NEXT: mtfprd f0, r4
7061 ; CHECK-P8-NEXT: lis r5, 3725
7062 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
7063 ; CHECK-P8-NEXT: ori r4, r5, 19025
7064 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
7065 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
7066 ; CHECK-P8-NEXT: stfsx f0, r3, r4
7067 ; CHECK-P8-NEXT: blr
7069 %and = and i64 %ptr, -1099511627776
7070 %conv = uitofp i64 %str to float
7071 %or = or i64 %and, 1000000000000
7072 %0 = inttoptr i64 %or to ptr
7073 store float %conv, ptr %0, align 4096
7077 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7078 define dso_local void @st_cst_align16_uint64_t_float(i64 %str) {
7079 ; CHECK-LABEL: st_cst_align16_uint64_t_float:
7080 ; CHECK: # %bb.0: # %entry
7081 ; CHECK-NEXT: mtfprd f0, r3
7082 ; CHECK-NEXT: xscvuxdsp f0, f0
7083 ; CHECK-NEXT: stfs f0, 4080(0)
7086 %conv = uitofp i64 %str to float
7087 store float %conv, ptr inttoptr (i64 4080 to ptr), align 16
7091 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7092 define dso_local void @st_cst_align32_uint64_t_float(i64 %str) {
7093 ; CHECK-LABEL: st_cst_align32_uint64_t_float:
7094 ; CHECK: # %bb.0: # %entry
7095 ; CHECK-NEXT: mtfprd f0, r3
7096 ; CHECK-NEXT: lis r3, 153
7097 ; CHECK-NEXT: xscvuxdsp f0, f0
7098 ; CHECK-NEXT: stfs f0, -27108(r3)
7101 %conv = uitofp i64 %str to float
7102 store float %conv, ptr inttoptr (i64 9999900 to ptr), align 4
7106 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7107 define dso_local void @st_cst_align64_uint64_t_float(i64 %str) {
7108 ; CHECK-P10-LABEL: st_cst_align64_uint64_t_float:
7109 ; CHECK-P10: # %bb.0: # %entry
7110 ; CHECK-P10-NEXT: mtfprd f0, r3
7111 ; CHECK-P10-NEXT: pli r3, 244140625
7112 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
7113 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
7114 ; CHECK-P10-NEXT: stfs f0, 0(r3)
7115 ; CHECK-P10-NEXT: blr
7117 ; CHECK-P9-LABEL: st_cst_align64_uint64_t_float:
7118 ; CHECK-P9: # %bb.0: # %entry
7119 ; CHECK-P9-NEXT: mtfprd f0, r3
7120 ; CHECK-P9-NEXT: lis r3, 3725
7121 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
7122 ; CHECK-P9-NEXT: ori r3, r3, 19025
7123 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
7124 ; CHECK-P9-NEXT: stfs f0, 0(r3)
7125 ; CHECK-P9-NEXT: blr
7127 ; CHECK-P8-LABEL: st_cst_align64_uint64_t_float:
7128 ; CHECK-P8: # %bb.0: # %entry
7129 ; CHECK-P8-NEXT: mtfprd f0, r3
7130 ; CHECK-P8-NEXT: lis r3, 3725
7131 ; CHECK-P8-NEXT: ori r3, r3, 19025
7132 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
7133 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
7134 ; CHECK-P8-NEXT: stfs f0, 0(r3)
7135 ; CHECK-P8-NEXT: blr
7137 %conv = uitofp i64 %str to float
7138 store float %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
7142 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7143 define dso_local void @st_0_uint64_t_double(i64 %ptr, i64 %str) {
7144 ; CHECK-LABEL: st_0_uint64_t_double:
7145 ; CHECK: # %bb.0: # %entry
7146 ; CHECK-NEXT: mtfprd f0, r4
7147 ; CHECK-NEXT: xscvuxddp f0, f0
7148 ; CHECK-NEXT: stfd f0, 0(r3)
7151 %conv = uitofp i64 %str to double
7152 %0 = inttoptr i64 %ptr to ptr
7153 store double %conv, ptr %0, align 8
7157 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7158 define dso_local void @st_align16_uint64_t_double(ptr nocapture %ptr, i64 %str) {
7159 ; CHECK-LABEL: st_align16_uint64_t_double:
7160 ; CHECK: # %bb.0: # %entry
7161 ; CHECK-NEXT: mtfprd f0, r4
7162 ; CHECK-NEXT: xscvuxddp f0, f0
7163 ; CHECK-NEXT: stfd f0, 8(r3)
7166 %conv = uitofp i64 %str to double
7167 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
7168 store double %conv, ptr %add.ptr, align 8
7172 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7173 define dso_local void @st_align32_uint64_t_double(ptr nocapture %ptr, i64 %str) {
7174 ; CHECK-P10-LABEL: st_align32_uint64_t_double:
7175 ; CHECK-P10: # %bb.0: # %entry
7176 ; CHECK-P10-NEXT: mtfprd f0, r4
7177 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7178 ; CHECK-P10-NEXT: pstfd f0, 99999000(r3), 0
7179 ; CHECK-P10-NEXT: blr
7181 ; CHECK-P9-LABEL: st_align32_uint64_t_double:
7182 ; CHECK-P9: # %bb.0: # %entry
7183 ; CHECK-P9-NEXT: mtfprd f0, r4
7184 ; CHECK-P9-NEXT: lis r4, 1525
7185 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7186 ; CHECK-P9-NEXT: ori r4, r4, 56600
7187 ; CHECK-P9-NEXT: stfdx f0, r3, r4
7188 ; CHECK-P9-NEXT: blr
7190 ; CHECK-P8-LABEL: st_align32_uint64_t_double:
7191 ; CHECK-P8: # %bb.0: # %entry
7192 ; CHECK-P8-NEXT: mtfprd f0, r4
7193 ; CHECK-P8-NEXT: lis r4, 1525
7194 ; CHECK-P8-NEXT: ori r4, r4, 56600
7195 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7196 ; CHECK-P8-NEXT: stfdx f0, r3, r4
7197 ; CHECK-P8-NEXT: blr
7199 %conv = uitofp i64 %str to double
7200 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
7201 store double %conv, ptr %add.ptr, align 8
7205 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7206 define dso_local void @st_align64_uint64_t_double(ptr nocapture %ptr, i64 %str) {
7207 ; CHECK-P10-LABEL: st_align64_uint64_t_double:
7208 ; CHECK-P10: # %bb.0: # %entry
7209 ; CHECK-P10-NEXT: mtfprd f0, r4
7210 ; CHECK-P10-NEXT: pli r4, 244140625
7211 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7212 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7213 ; CHECK-P10-NEXT: stfdx f0, r3, r4
7214 ; CHECK-P10-NEXT: blr
7216 ; CHECK-P9-LABEL: st_align64_uint64_t_double:
7217 ; CHECK-P9: # %bb.0: # %entry
7218 ; CHECK-P9-NEXT: mtfprd f0, r4
7219 ; CHECK-P9-NEXT: lis r4, 3725
7220 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7221 ; CHECK-P9-NEXT: ori r4, r4, 19025
7222 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
7223 ; CHECK-P9-NEXT: stfdx f0, r3, r4
7224 ; CHECK-P9-NEXT: blr
7226 ; CHECK-P8-LABEL: st_align64_uint64_t_double:
7227 ; CHECK-P8: # %bb.0: # %entry
7228 ; CHECK-P8-NEXT: mtfprd f0, r4
7229 ; CHECK-P8-NEXT: lis r4, 3725
7230 ; CHECK-P8-NEXT: ori r4, r4, 19025
7231 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7232 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
7233 ; CHECK-P8-NEXT: stfdx f0, r3, r4
7234 ; CHECK-P8-NEXT: blr
7236 %conv = uitofp i64 %str to double
7237 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
7238 store double %conv, ptr %add.ptr, align 8
7242 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7243 define dso_local void @st_reg_uint64_t_double(ptr nocapture %ptr, i64 %off, i64 %str) {
7244 ; CHECK-LABEL: st_reg_uint64_t_double:
7245 ; CHECK: # %bb.0: # %entry
7246 ; CHECK-NEXT: mtfprd f0, r5
7247 ; CHECK-NEXT: xscvuxddp f0, f0
7248 ; CHECK-NEXT: stfdx f0, r3, r4
7251 %conv = uitofp i64 %str to double
7252 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
7253 store double %conv, ptr %add.ptr, align 8
7257 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7258 define dso_local void @st_or1_uint64_t_double(i64 %ptr, i8 zeroext %off, i64 %str) {
7259 ; CHECK-LABEL: st_or1_uint64_t_double:
7260 ; CHECK: # %bb.0: # %entry
7261 ; CHECK-NEXT: mtfprd f0, r5
7262 ; CHECK-NEXT: or r3, r4, r3
7263 ; CHECK-NEXT: xscvuxddp f0, f0
7264 ; CHECK-NEXT: stfd f0, 0(r3)
7267 %conv = uitofp i64 %str to double
7268 %conv1 = zext i8 %off to i64
7269 %or = or i64 %conv1, %ptr
7270 %0 = inttoptr i64 %or to ptr
7271 store double %conv, ptr %0, align 8
7275 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7276 define dso_local void @st_or2_uint64_t_double(i64 %ptr, i8 zeroext %off, i64 %str) {
7277 ; CHECK-LABEL: st_or2_uint64_t_double:
7278 ; CHECK: # %bb.0: # %entry
7279 ; CHECK-NEXT: mtfprd f0, r5
7280 ; CHECK-NEXT: rldicr r3, r3, 0, 51
7281 ; CHECK-NEXT: xscvuxddp f0, f0
7282 ; CHECK-NEXT: stfdx f0, r3, r4
7285 %and = and i64 %ptr, -4096
7286 %conv = uitofp i64 %str to double
7287 %conv1 = zext i8 %off to i64
7288 %or = or i64 %and, %conv1
7289 %0 = inttoptr i64 %or to ptr
7290 store double %conv, ptr %0, align 8
7294 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7295 define dso_local void @st_not_disjoint16_uint64_t_double(i64 %ptr, i64 %str) {
7296 ; CHECK-LABEL: st_not_disjoint16_uint64_t_double:
7297 ; CHECK: # %bb.0: # %entry
7298 ; CHECK-NEXT: mtfprd f0, r4
7299 ; CHECK-NEXT: ori r3, r3, 6
7300 ; CHECK-NEXT: xscvuxddp f0, f0
7301 ; CHECK-NEXT: stfd f0, 0(r3)
7304 %conv = uitofp i64 %str to double
7305 %or = or i64 %ptr, 6
7306 %0 = inttoptr i64 %or to ptr
7307 store double %conv, ptr %0, align 8
7311 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7312 define dso_local void @st_disjoint_align16_uint64_t_double(i64 %ptr, i64 %str) {
7313 ; CHECK-LABEL: st_disjoint_align16_uint64_t_double:
7314 ; CHECK: # %bb.0: # %entry
7315 ; CHECK-NEXT: mtfprd f0, r4
7316 ; CHECK-NEXT: rldicr r3, r3, 0, 51
7317 ; CHECK-NEXT: xscvuxddp f0, f0
7318 ; CHECK-NEXT: stfd f0, 24(r3)
7321 %and = and i64 %ptr, -4096
7322 %conv = uitofp i64 %str to double
7323 %or = or i64 %and, 24
7324 %0 = inttoptr i64 %or to ptr
7325 store double %conv, ptr %0, align 8
7329 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7330 define dso_local void @st_not_disjoint32_uint64_t_double(i64 %ptr, i64 %str) {
7331 ; CHECK-P10-LABEL: st_not_disjoint32_uint64_t_double:
7332 ; CHECK-P10: # %bb.0: # %entry
7333 ; CHECK-P10-NEXT: mtfprd f0, r4
7334 ; CHECK-P10-NEXT: ori r3, r3, 34463
7335 ; CHECK-P10-NEXT: oris r3, r3, 1
7336 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7337 ; CHECK-P10-NEXT: stfd f0, 0(r3)
7338 ; CHECK-P10-NEXT: blr
7340 ; CHECK-P9-LABEL: st_not_disjoint32_uint64_t_double:
7341 ; CHECK-P9: # %bb.0: # %entry
7342 ; CHECK-P9-NEXT: mtfprd f0, r4
7343 ; CHECK-P9-NEXT: ori r3, r3, 34463
7344 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7345 ; CHECK-P9-NEXT: oris r3, r3, 1
7346 ; CHECK-P9-NEXT: stfd f0, 0(r3)
7347 ; CHECK-P9-NEXT: blr
7349 ; CHECK-P8-LABEL: st_not_disjoint32_uint64_t_double:
7350 ; CHECK-P8: # %bb.0: # %entry
7351 ; CHECK-P8-NEXT: mtfprd f0, r4
7352 ; CHECK-P8-NEXT: ori r3, r3, 34463
7353 ; CHECK-P8-NEXT: oris r3, r3, 1
7354 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7355 ; CHECK-P8-NEXT: stfd f0, 0(r3)
7356 ; CHECK-P8-NEXT: blr
7358 %conv = uitofp i64 %str to double
7359 %or = or i64 %ptr, 99999
7360 %0 = inttoptr i64 %or to ptr
7361 store double %conv, ptr %0, align 8
7365 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7366 define dso_local void @st_disjoint_align32_uint64_t_double(i64 %ptr, i64 %str) {
7367 ; CHECK-P10-LABEL: st_disjoint_align32_uint64_t_double:
7368 ; CHECK-P10: # %bb.0: # %entry
7369 ; CHECK-P10-NEXT: mtfprd f0, r4
7370 ; CHECK-P10-NEXT: lis r5, -15264
7371 ; CHECK-P10-NEXT: and r3, r3, r5
7372 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7373 ; CHECK-P10-NEXT: pstfd f0, 999990000(r3), 0
7374 ; CHECK-P10-NEXT: blr
7376 ; CHECK-P9-LABEL: st_disjoint_align32_uint64_t_double:
7377 ; CHECK-P9: # %bb.0: # %entry
7378 ; CHECK-P9-NEXT: mtfprd f0, r4
7379 ; CHECK-P9-NEXT: lis r5, -15264
7380 ; CHECK-P9-NEXT: lis r4, 15258
7381 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7382 ; CHECK-P9-NEXT: and r3, r3, r5
7383 ; CHECK-P9-NEXT: ori r4, r4, 41712
7384 ; CHECK-P9-NEXT: stfdx f0, r3, r4
7385 ; CHECK-P9-NEXT: blr
7387 ; CHECK-P8-LABEL: st_disjoint_align32_uint64_t_double:
7388 ; CHECK-P8: # %bb.0: # %entry
7389 ; CHECK-P8-NEXT: mtfprd f0, r4
7390 ; CHECK-P8-NEXT: lis r4, -15264
7391 ; CHECK-P8-NEXT: lis r5, 15258
7392 ; CHECK-P8-NEXT: and r3, r3, r4
7393 ; CHECK-P8-NEXT: ori r4, r5, 41712
7394 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7395 ; CHECK-P8-NEXT: stfdx f0, r3, r4
7396 ; CHECK-P8-NEXT: blr
7398 %and = and i64 %ptr, -1000341504
7399 %conv = uitofp i64 %str to double
7400 %or = or i64 %and, 999990000
7401 %0 = inttoptr i64 %or to ptr
7402 store double %conv, ptr %0, align 16
7406 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7407 define dso_local void @st_not_disjoint64_uint64_t_double(i64 %ptr, i64 %str) {
7408 ; CHECK-P10-LABEL: st_not_disjoint64_uint64_t_double:
7409 ; CHECK-P10: # %bb.0: # %entry
7410 ; CHECK-P10-NEXT: mtfprd f0, r4
7411 ; CHECK-P10-NEXT: pli r4, 232
7412 ; CHECK-P10-NEXT: pli r5, 3567587329
7413 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
7414 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7415 ; CHECK-P10-NEXT: or r3, r3, r5
7416 ; CHECK-P10-NEXT: stfd f0, 0(r3)
7417 ; CHECK-P10-NEXT: blr
7419 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint64_t_double:
7420 ; CHECK-PREP10: # %bb.0: # %entry
7421 ; CHECK-PREP10-NEXT: mtfprd f0, r4
7422 ; CHECK-PREP10-NEXT: li r4, 29
7423 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
7424 ; CHECK-PREP10-NEXT: xscvuxddp f0, f0
7425 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
7426 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
7427 ; CHECK-PREP10-NEXT: or r3, r3, r4
7428 ; CHECK-PREP10-NEXT: stfd f0, 0(r3)
7429 ; CHECK-PREP10-NEXT: blr
7431 %conv = uitofp i64 %str to double
7432 %or = or i64 %ptr, 1000000000001
7433 %0 = inttoptr i64 %or to ptr
7434 store double %conv, ptr %0, align 8
7438 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7439 define dso_local void @st_disjoint_align64_uint64_t_double(i64 %ptr, i64 %str) {
7440 ; CHECK-P10-LABEL: st_disjoint_align64_uint64_t_double:
7441 ; CHECK-P10: # %bb.0: # %entry
7442 ; CHECK-P10-NEXT: mtfprd f0, r4
7443 ; CHECK-P10-NEXT: pli r4, 244140625
7444 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
7445 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7446 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7447 ; CHECK-P10-NEXT: stfdx f0, r3, r4
7448 ; CHECK-P10-NEXT: blr
7450 ; CHECK-P9-LABEL: st_disjoint_align64_uint64_t_double:
7451 ; CHECK-P9: # %bb.0: # %entry
7452 ; CHECK-P9-NEXT: mtfprd f0, r4
7453 ; CHECK-P9-NEXT: lis r4, 3725
7454 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
7455 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7456 ; CHECK-P9-NEXT: ori r4, r4, 19025
7457 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
7458 ; CHECK-P9-NEXT: stfdx f0, r3, r4
7459 ; CHECK-P9-NEXT: blr
7461 ; CHECK-P8-LABEL: st_disjoint_align64_uint64_t_double:
7462 ; CHECK-P8: # %bb.0: # %entry
7463 ; CHECK-P8-NEXT: mtfprd f0, r4
7464 ; CHECK-P8-NEXT: lis r5, 3725
7465 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
7466 ; CHECK-P8-NEXT: ori r4, r5, 19025
7467 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7468 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
7469 ; CHECK-P8-NEXT: stfdx f0, r3, r4
7470 ; CHECK-P8-NEXT: blr
7472 %and = and i64 %ptr, -1099511627776
7473 %conv = uitofp i64 %str to double
7474 %or = or i64 %and, 1000000000000
7475 %0 = inttoptr i64 %or to ptr
7476 store double %conv, ptr %0, align 4096
7480 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7481 define dso_local void @st_cst_align16_uint64_t_double(i64 %str) {
7482 ; CHECK-LABEL: st_cst_align16_uint64_t_double:
7483 ; CHECK: # %bb.0: # %entry
7484 ; CHECK-NEXT: mtfprd f0, r3
7485 ; CHECK-NEXT: xscvuxddp f0, f0
7486 ; CHECK-NEXT: stfd f0, 4080(0)
7489 %conv = uitofp i64 %str to double
7490 store double %conv, ptr inttoptr (i64 4080 to ptr), align 16
7494 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7495 define dso_local void @st_cst_align32_uint64_t_double(i64 %str) {
7496 ; CHECK-LABEL: st_cst_align32_uint64_t_double:
7497 ; CHECK: # %bb.0: # %entry
7498 ; CHECK-NEXT: mtfprd f0, r3
7499 ; CHECK-NEXT: lis r3, 153
7500 ; CHECK-NEXT: xscvuxddp f0, f0
7501 ; CHECK-NEXT: stfd f0, -27108(r3)
7504 %conv = uitofp i64 %str to double
7505 store double %conv, ptr inttoptr (i64 9999900 to ptr), align 8
7509 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7510 define dso_local void @st_cst_align64_uint64_t_double(i64 %str) {
7511 ; CHECK-P10-LABEL: st_cst_align64_uint64_t_double:
7512 ; CHECK-P10: # %bb.0: # %entry
7513 ; CHECK-P10-NEXT: mtfprd f0, r3
7514 ; CHECK-P10-NEXT: pli r3, 244140625
7515 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
7516 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7517 ; CHECK-P10-NEXT: stfd f0, 0(r3)
7518 ; CHECK-P10-NEXT: blr
7520 ; CHECK-P9-LABEL: st_cst_align64_uint64_t_double:
7521 ; CHECK-P9: # %bb.0: # %entry
7522 ; CHECK-P9-NEXT: mtfprd f0, r3
7523 ; CHECK-P9-NEXT: lis r3, 3725
7524 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7525 ; CHECK-P9-NEXT: ori r3, r3, 19025
7526 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
7527 ; CHECK-P9-NEXT: stfd f0, 0(r3)
7528 ; CHECK-P9-NEXT: blr
7530 ; CHECK-P8-LABEL: st_cst_align64_uint64_t_double:
7531 ; CHECK-P8: # %bb.0: # %entry
7532 ; CHECK-P8-NEXT: mtfprd f0, r3
7533 ; CHECK-P8-NEXT: lis r3, 3725
7534 ; CHECK-P8-NEXT: ori r3, r3, 19025
7535 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7536 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
7537 ; CHECK-P8-NEXT: stfd f0, 0(r3)
7538 ; CHECK-P8-NEXT: blr
7540 %conv = uitofp i64 %str to double
7541 store double %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
7545 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7546 define dso_local void @st_0_int64_t_float(i64 %ptr, i64 %str) {
7547 ; CHECK-LABEL: st_0_int64_t_float:
7548 ; CHECK: # %bb.0: # %entry
7549 ; CHECK-NEXT: mtfprd f0, r4
7550 ; CHECK-NEXT: xscvsxdsp f0, f0
7551 ; CHECK-NEXT: stfs f0, 0(r3)
7554 %conv = sitofp i64 %str to float
7555 %0 = inttoptr i64 %ptr to ptr
7556 store float %conv, ptr %0, align 4
7560 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7561 define dso_local void @st_align16_int64_t_float(ptr nocapture %ptr, i64 %str) {
7562 ; CHECK-LABEL: st_align16_int64_t_float:
7563 ; CHECK: # %bb.0: # %entry
7564 ; CHECK-NEXT: mtfprd f0, r4
7565 ; CHECK-NEXT: xscvsxdsp f0, f0
7566 ; CHECK-NEXT: stfs f0, 8(r3)
7569 %conv = sitofp i64 %str to float
7570 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
7571 store float %conv, ptr %add.ptr, align 4
7575 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7576 define dso_local void @st_align32_int64_t_float(ptr nocapture %ptr, i64 %str) {
7577 ; CHECK-P10-LABEL: st_align32_int64_t_float:
7578 ; CHECK-P10: # %bb.0: # %entry
7579 ; CHECK-P10-NEXT: mtfprd f0, r4
7580 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
7581 ; CHECK-P10-NEXT: pstfs f0, 99999000(r3), 0
7582 ; CHECK-P10-NEXT: blr
7584 ; CHECK-P9-LABEL: st_align32_int64_t_float:
7585 ; CHECK-P9: # %bb.0: # %entry
7586 ; CHECK-P9-NEXT: mtfprd f0, r4
7587 ; CHECK-P9-NEXT: lis r4, 1525
7588 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
7589 ; CHECK-P9-NEXT: ori r4, r4, 56600
7590 ; CHECK-P9-NEXT: stfsx f0, r3, r4
7591 ; CHECK-P9-NEXT: blr
7593 ; CHECK-P8-LABEL: st_align32_int64_t_float:
7594 ; CHECK-P8: # %bb.0: # %entry
7595 ; CHECK-P8-NEXT: mtfprd f0, r4
7596 ; CHECK-P8-NEXT: lis r4, 1525
7597 ; CHECK-P8-NEXT: ori r4, r4, 56600
7598 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
7599 ; CHECK-P8-NEXT: stfsx f0, r3, r4
7600 ; CHECK-P8-NEXT: blr
7602 %conv = sitofp i64 %str to float
7603 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
7604 store float %conv, ptr %add.ptr, align 4
7608 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7609 define dso_local void @st_align64_int64_t_float(ptr nocapture %ptr, i64 %str) {
7610 ; CHECK-P10-LABEL: st_align64_int64_t_float:
7611 ; CHECK-P10: # %bb.0: # %entry
7612 ; CHECK-P10-NEXT: mtfprd f0, r4
7613 ; CHECK-P10-NEXT: pli r4, 244140625
7614 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7615 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
7616 ; CHECK-P10-NEXT: stfsx f0, r3, r4
7617 ; CHECK-P10-NEXT: blr
7619 ; CHECK-P9-LABEL: st_align64_int64_t_float:
7620 ; CHECK-P9: # %bb.0: # %entry
7621 ; CHECK-P9-NEXT: mtfprd f0, r4
7622 ; CHECK-P9-NEXT: lis r4, 3725
7623 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
7624 ; CHECK-P9-NEXT: ori r4, r4, 19025
7625 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
7626 ; CHECK-P9-NEXT: stfsx f0, r3, r4
7627 ; CHECK-P9-NEXT: blr
7629 ; CHECK-P8-LABEL: st_align64_int64_t_float:
7630 ; CHECK-P8: # %bb.0: # %entry
7631 ; CHECK-P8-NEXT: mtfprd f0, r4
7632 ; CHECK-P8-NEXT: lis r4, 3725
7633 ; CHECK-P8-NEXT: ori r4, r4, 19025
7634 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
7635 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
7636 ; CHECK-P8-NEXT: stfsx f0, r3, r4
7637 ; CHECK-P8-NEXT: blr
7639 %conv = sitofp i64 %str to float
7640 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
7641 store float %conv, ptr %add.ptr, align 4
7645 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7646 define dso_local void @st_reg_int64_t_float(ptr nocapture %ptr, i64 %off, i64 %str) {
7647 ; CHECK-LABEL: st_reg_int64_t_float:
7648 ; CHECK: # %bb.0: # %entry
7649 ; CHECK-NEXT: mtfprd f0, r5
7650 ; CHECK-NEXT: xscvsxdsp f0, f0
7651 ; CHECK-NEXT: stfsx f0, r3, r4
7654 %conv = sitofp i64 %str to float
7655 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
7656 store float %conv, ptr %add.ptr, align 4
7660 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7661 define dso_local void @st_or1_int64_t_float(i64 %ptr, i8 zeroext %off, i64 %str) {
7662 ; CHECK-LABEL: st_or1_int64_t_float:
7663 ; CHECK: # %bb.0: # %entry
7664 ; CHECK-NEXT: mtfprd f0, r5
7665 ; CHECK-NEXT: or r3, r4, r3
7666 ; CHECK-NEXT: xscvsxdsp f0, f0
7667 ; CHECK-NEXT: stfs f0, 0(r3)
7670 %conv = sitofp i64 %str to float
7671 %conv1 = zext i8 %off to i64
7672 %or = or i64 %conv1, %ptr
7673 %0 = inttoptr i64 %or to ptr
7674 store float %conv, ptr %0, align 4
7678 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7679 define dso_local void @st_or2_int64_t_float(i64 %ptr, i8 zeroext %off, i64 %str) {
7680 ; CHECK-LABEL: st_or2_int64_t_float:
7681 ; CHECK: # %bb.0: # %entry
7682 ; CHECK-NEXT: mtfprd f0, r5
7683 ; CHECK-NEXT: rldicr r3, r3, 0, 51
7684 ; CHECK-NEXT: xscvsxdsp f0, f0
7685 ; CHECK-NEXT: stfsx f0, r3, r4
7688 %and = and i64 %ptr, -4096
7689 %conv = sitofp i64 %str to float
7690 %conv1 = zext i8 %off to i64
7691 %or = or i64 %and, %conv1
7692 %0 = inttoptr i64 %or to ptr
7693 store float %conv, ptr %0, align 4
7697 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7698 define dso_local void @st_not_disjoint16_int64_t_float(i64 %ptr, i64 %str) {
7699 ; CHECK-LABEL: st_not_disjoint16_int64_t_float:
7700 ; CHECK: # %bb.0: # %entry
7701 ; CHECK-NEXT: mtfprd f0, r4
7702 ; CHECK-NEXT: ori r3, r3, 6
7703 ; CHECK-NEXT: xscvsxdsp f0, f0
7704 ; CHECK-NEXT: stfs f0, 0(r3)
7707 %conv = sitofp i64 %str to float
7708 %or = or i64 %ptr, 6
7709 %0 = inttoptr i64 %or to ptr
7710 store float %conv, ptr %0, align 4
7714 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7715 define dso_local void @st_disjoint_align16_int64_t_float(i64 %ptr, i64 %str) {
7716 ; CHECK-LABEL: st_disjoint_align16_int64_t_float:
7717 ; CHECK: # %bb.0: # %entry
7718 ; CHECK-NEXT: mtfprd f0, r4
7719 ; CHECK-NEXT: rldicr r3, r3, 0, 51
7720 ; CHECK-NEXT: xscvsxdsp f0, f0
7721 ; CHECK-NEXT: stfs f0, 24(r3)
7724 %and = and i64 %ptr, -4096
7725 %conv = sitofp i64 %str to float
7726 %or = or i64 %and, 24
7727 %0 = inttoptr i64 %or to ptr
7728 store float %conv, ptr %0, align 8
7732 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7733 define dso_local void @st_not_disjoint32_int64_t_float(i64 %ptr, i64 %str) {
7734 ; CHECK-P10-LABEL: st_not_disjoint32_int64_t_float:
7735 ; CHECK-P10: # %bb.0: # %entry
7736 ; CHECK-P10-NEXT: mtfprd f0, r4
7737 ; CHECK-P10-NEXT: ori r3, r3, 34463
7738 ; CHECK-P10-NEXT: oris r3, r3, 1
7739 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
7740 ; CHECK-P10-NEXT: stfs f0, 0(r3)
7741 ; CHECK-P10-NEXT: blr
7743 ; CHECK-P9-LABEL: st_not_disjoint32_int64_t_float:
7744 ; CHECK-P9: # %bb.0: # %entry
7745 ; CHECK-P9-NEXT: mtfprd f0, r4
7746 ; CHECK-P9-NEXT: ori r3, r3, 34463
7747 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
7748 ; CHECK-P9-NEXT: oris r3, r3, 1
7749 ; CHECK-P9-NEXT: stfs f0, 0(r3)
7750 ; CHECK-P9-NEXT: blr
7752 ; CHECK-P8-LABEL: st_not_disjoint32_int64_t_float:
7753 ; CHECK-P8: # %bb.0: # %entry
7754 ; CHECK-P8-NEXT: mtfprd f0, r4
7755 ; CHECK-P8-NEXT: ori r3, r3, 34463
7756 ; CHECK-P8-NEXT: oris r3, r3, 1
7757 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
7758 ; CHECK-P8-NEXT: stfs f0, 0(r3)
7759 ; CHECK-P8-NEXT: blr
7761 %conv = sitofp i64 %str to float
7762 %or = or i64 %ptr, 99999
7763 %0 = inttoptr i64 %or to ptr
7764 store float %conv, ptr %0, align 4
7768 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7769 define dso_local void @st_disjoint_align32_int64_t_float(i64 %ptr, i64 %str) {
7770 ; CHECK-P10-LABEL: st_disjoint_align32_int64_t_float:
7771 ; CHECK-P10: # %bb.0: # %entry
7772 ; CHECK-P10-NEXT: mtfprd f0, r4
7773 ; CHECK-P10-NEXT: lis r5, -15264
7774 ; CHECK-P10-NEXT: and r3, r3, r5
7775 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
7776 ; CHECK-P10-NEXT: pstfs f0, 999990000(r3), 0
7777 ; CHECK-P10-NEXT: blr
7779 ; CHECK-P9-LABEL: st_disjoint_align32_int64_t_float:
7780 ; CHECK-P9: # %bb.0: # %entry
7781 ; CHECK-P9-NEXT: mtfprd f0, r4
7782 ; CHECK-P9-NEXT: lis r5, -15264
7783 ; CHECK-P9-NEXT: lis r4, 15258
7784 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
7785 ; CHECK-P9-NEXT: and r3, r3, r5
7786 ; CHECK-P9-NEXT: ori r4, r4, 41712
7787 ; CHECK-P9-NEXT: stfsx f0, r3, r4
7788 ; CHECK-P9-NEXT: blr
7790 ; CHECK-P8-LABEL: st_disjoint_align32_int64_t_float:
7791 ; CHECK-P8: # %bb.0: # %entry
7792 ; CHECK-P8-NEXT: mtfprd f0, r4
7793 ; CHECK-P8-NEXT: lis r4, -15264
7794 ; CHECK-P8-NEXT: lis r5, 15258
7795 ; CHECK-P8-NEXT: and r3, r3, r4
7796 ; CHECK-P8-NEXT: ori r4, r5, 41712
7797 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
7798 ; CHECK-P8-NEXT: stfsx f0, r3, r4
7799 ; CHECK-P8-NEXT: blr
7801 %and = and i64 %ptr, -1000341504
7802 %conv = sitofp i64 %str to float
7803 %or = or i64 %and, 999990000
7804 %0 = inttoptr i64 %or to ptr
7805 store float %conv, ptr %0, align 16
7809 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7810 define dso_local void @st_not_disjoint64_int64_t_float(i64 %ptr, i64 %str) {
7811 ; CHECK-P10-LABEL: st_not_disjoint64_int64_t_float:
7812 ; CHECK-P10: # %bb.0: # %entry
7813 ; CHECK-P10-NEXT: mtfprd f0, r4
7814 ; CHECK-P10-NEXT: pli r4, 232
7815 ; CHECK-P10-NEXT: pli r5, 3567587329
7816 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
7817 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
7818 ; CHECK-P10-NEXT: or r3, r3, r5
7819 ; CHECK-P10-NEXT: stfs f0, 0(r3)
7820 ; CHECK-P10-NEXT: blr
7822 ; CHECK-PREP10-LABEL: st_not_disjoint64_int64_t_float:
7823 ; CHECK-PREP10: # %bb.0: # %entry
7824 ; CHECK-PREP10-NEXT: mtfprd f0, r4
7825 ; CHECK-PREP10-NEXT: li r4, 29
7826 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
7827 ; CHECK-PREP10-NEXT: xscvsxdsp f0, f0
7828 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
7829 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
7830 ; CHECK-PREP10-NEXT: or r3, r3, r4
7831 ; CHECK-PREP10-NEXT: stfs f0, 0(r3)
7832 ; CHECK-PREP10-NEXT: blr
7834 %conv = sitofp i64 %str to float
7835 %or = or i64 %ptr, 1000000000001
7836 %0 = inttoptr i64 %or to ptr
7837 store float %conv, ptr %0, align 4
7841 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7842 define dso_local void @st_disjoint_align64_int64_t_float(i64 %ptr, i64 %str) {
7843 ; CHECK-P10-LABEL: st_disjoint_align64_int64_t_float:
7844 ; CHECK-P10: # %bb.0: # %entry
7845 ; CHECK-P10-NEXT: mtfprd f0, r4
7846 ; CHECK-P10-NEXT: pli r4, 244140625
7847 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
7848 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7849 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
7850 ; CHECK-P10-NEXT: stfsx f0, r3, r4
7851 ; CHECK-P10-NEXT: blr
7853 ; CHECK-P9-LABEL: st_disjoint_align64_int64_t_float:
7854 ; CHECK-P9: # %bb.0: # %entry
7855 ; CHECK-P9-NEXT: mtfprd f0, r4
7856 ; CHECK-P9-NEXT: lis r4, 3725
7857 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
7858 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
7859 ; CHECK-P9-NEXT: ori r4, r4, 19025
7860 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
7861 ; CHECK-P9-NEXT: stfsx f0, r3, r4
7862 ; CHECK-P9-NEXT: blr
7864 ; CHECK-P8-LABEL: st_disjoint_align64_int64_t_float:
7865 ; CHECK-P8: # %bb.0: # %entry
7866 ; CHECK-P8-NEXT: mtfprd f0, r4
7867 ; CHECK-P8-NEXT: lis r5, 3725
7868 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
7869 ; CHECK-P8-NEXT: ori r4, r5, 19025
7870 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
7871 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
7872 ; CHECK-P8-NEXT: stfsx f0, r3, r4
7873 ; CHECK-P8-NEXT: blr
7875 %and = and i64 %ptr, -1099511627776
7876 %conv = sitofp i64 %str to float
7877 %or = or i64 %and, 1000000000000
7878 %0 = inttoptr i64 %or to ptr
7879 store float %conv, ptr %0, align 4096
7883 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7884 define dso_local void @st_cst_align16_int64_t_float(i64 %str) {
7885 ; CHECK-LABEL: st_cst_align16_int64_t_float:
7886 ; CHECK: # %bb.0: # %entry
7887 ; CHECK-NEXT: mtfprd f0, r3
7888 ; CHECK-NEXT: xscvsxdsp f0, f0
7889 ; CHECK-NEXT: stfs f0, 4080(0)
7892 %conv = sitofp i64 %str to float
7893 store float %conv, ptr inttoptr (i64 4080 to ptr), align 16
7897 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7898 define dso_local void @st_cst_align32_int64_t_float(i64 %str) {
7899 ; CHECK-LABEL: st_cst_align32_int64_t_float:
7900 ; CHECK: # %bb.0: # %entry
7901 ; CHECK-NEXT: mtfprd f0, r3
7902 ; CHECK-NEXT: lis r3, 153
7903 ; CHECK-NEXT: xscvsxdsp f0, f0
7904 ; CHECK-NEXT: stfs f0, -27108(r3)
7907 %conv = sitofp i64 %str to float
7908 store float %conv, ptr inttoptr (i64 9999900 to ptr), align 4
7912 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7913 define dso_local void @st_cst_align64_int64_t_float(i64 %str) {
7914 ; CHECK-P10-LABEL: st_cst_align64_int64_t_float:
7915 ; CHECK-P10: # %bb.0: # %entry
7916 ; CHECK-P10-NEXT: mtfprd f0, r3
7917 ; CHECK-P10-NEXT: pli r3, 244140625
7918 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
7919 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
7920 ; CHECK-P10-NEXT: stfs f0, 0(r3)
7921 ; CHECK-P10-NEXT: blr
7923 ; CHECK-P9-LABEL: st_cst_align64_int64_t_float:
7924 ; CHECK-P9: # %bb.0: # %entry
7925 ; CHECK-P9-NEXT: mtfprd f0, r3
7926 ; CHECK-P9-NEXT: lis r3, 3725
7927 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
7928 ; CHECK-P9-NEXT: ori r3, r3, 19025
7929 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
7930 ; CHECK-P9-NEXT: stfs f0, 0(r3)
7931 ; CHECK-P9-NEXT: blr
7933 ; CHECK-P8-LABEL: st_cst_align64_int64_t_float:
7934 ; CHECK-P8: # %bb.0: # %entry
7935 ; CHECK-P8-NEXT: mtfprd f0, r3
7936 ; CHECK-P8-NEXT: lis r3, 3725
7937 ; CHECK-P8-NEXT: ori r3, r3, 19025
7938 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
7939 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
7940 ; CHECK-P8-NEXT: stfs f0, 0(r3)
7941 ; CHECK-P8-NEXT: blr
7943 %conv = sitofp i64 %str to float
7944 store float %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
7948 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7949 define dso_local void @st_0_int64_t_double(i64 %ptr, i64 %str) {
7950 ; CHECK-LABEL: st_0_int64_t_double:
7951 ; CHECK: # %bb.0: # %entry
7952 ; CHECK-NEXT: mtfprd f0, r4
7953 ; CHECK-NEXT: xscvsxddp f0, f0
7954 ; CHECK-NEXT: stfd f0, 0(r3)
7957 %conv = sitofp i64 %str to double
7958 %0 = inttoptr i64 %ptr to ptr
7959 store double %conv, ptr %0, align 8
7963 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7964 define dso_local void @st_align16_int64_t_double(ptr nocapture %ptr, i64 %str) {
7965 ; CHECK-LABEL: st_align16_int64_t_double:
7966 ; CHECK: # %bb.0: # %entry
7967 ; CHECK-NEXT: mtfprd f0, r4
7968 ; CHECK-NEXT: xscvsxddp f0, f0
7969 ; CHECK-NEXT: stfd f0, 8(r3)
7972 %conv = sitofp i64 %str to double
7973 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
7974 store double %conv, ptr %add.ptr, align 8
7978 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7979 define dso_local void @st_align32_int64_t_double(ptr nocapture %ptr, i64 %str) {
7980 ; CHECK-P10-LABEL: st_align32_int64_t_double:
7981 ; CHECK-P10: # %bb.0: # %entry
7982 ; CHECK-P10-NEXT: mtfprd f0, r4
7983 ; CHECK-P10-NEXT: xscvsxddp f0, f0
7984 ; CHECK-P10-NEXT: pstfd f0, 99999000(r3), 0
7985 ; CHECK-P10-NEXT: blr
7987 ; CHECK-P9-LABEL: st_align32_int64_t_double:
7988 ; CHECK-P9: # %bb.0: # %entry
7989 ; CHECK-P9-NEXT: mtfprd f0, r4
7990 ; CHECK-P9-NEXT: lis r4, 1525
7991 ; CHECK-P9-NEXT: xscvsxddp f0, f0
7992 ; CHECK-P9-NEXT: ori r4, r4, 56600
7993 ; CHECK-P9-NEXT: stfdx f0, r3, r4
7994 ; CHECK-P9-NEXT: blr
7996 ; CHECK-P8-LABEL: st_align32_int64_t_double:
7997 ; CHECK-P8: # %bb.0: # %entry
7998 ; CHECK-P8-NEXT: mtfprd f0, r4
7999 ; CHECK-P8-NEXT: lis r4, 1525
8000 ; CHECK-P8-NEXT: ori r4, r4, 56600
8001 ; CHECK-P8-NEXT: xscvsxddp f0, f0
8002 ; CHECK-P8-NEXT: stfdx f0, r3, r4
8003 ; CHECK-P8-NEXT: blr
8005 %conv = sitofp i64 %str to double
8006 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
8007 store double %conv, ptr %add.ptr, align 8
8011 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8012 define dso_local void @st_align64_int64_t_double(ptr nocapture %ptr, i64 %str) {
8013 ; CHECK-P10-LABEL: st_align64_int64_t_double:
8014 ; CHECK-P10: # %bb.0: # %entry
8015 ; CHECK-P10-NEXT: mtfprd f0, r4
8016 ; CHECK-P10-NEXT: pli r4, 244140625
8017 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
8018 ; CHECK-P10-NEXT: xscvsxddp f0, f0
8019 ; CHECK-P10-NEXT: stfdx f0, r3, r4
8020 ; CHECK-P10-NEXT: blr
8022 ; CHECK-P9-LABEL: st_align64_int64_t_double:
8023 ; CHECK-P9: # %bb.0: # %entry
8024 ; CHECK-P9-NEXT: mtfprd f0, r4
8025 ; CHECK-P9-NEXT: lis r4, 3725
8026 ; CHECK-P9-NEXT: xscvsxddp f0, f0
8027 ; CHECK-P9-NEXT: ori r4, r4, 19025
8028 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
8029 ; CHECK-P9-NEXT: stfdx f0, r3, r4
8030 ; CHECK-P9-NEXT: blr
8032 ; CHECK-P8-LABEL: st_align64_int64_t_double:
8033 ; CHECK-P8: # %bb.0: # %entry
8034 ; CHECK-P8-NEXT: mtfprd f0, r4
8035 ; CHECK-P8-NEXT: lis r4, 3725
8036 ; CHECK-P8-NEXT: ori r4, r4, 19025
8037 ; CHECK-P8-NEXT: xscvsxddp f0, f0
8038 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
8039 ; CHECK-P8-NEXT: stfdx f0, r3, r4
8040 ; CHECK-P8-NEXT: blr
8042 %conv = sitofp i64 %str to double
8043 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
8044 store double %conv, ptr %add.ptr, align 8
8048 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8049 define dso_local void @st_reg_int64_t_double(ptr nocapture %ptr, i64 %off, i64 %str) {
8050 ; CHECK-LABEL: st_reg_int64_t_double:
8051 ; CHECK: # %bb.0: # %entry
8052 ; CHECK-NEXT: mtfprd f0, r5
8053 ; CHECK-NEXT: xscvsxddp f0, f0
8054 ; CHECK-NEXT: stfdx f0, r3, r4
8057 %conv = sitofp i64 %str to double
8058 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
8059 store double %conv, ptr %add.ptr, align 8
8063 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8064 define dso_local void @st_or1_int64_t_double(i64 %ptr, i8 zeroext %off, i64 %str) {
8065 ; CHECK-LABEL: st_or1_int64_t_double:
8066 ; CHECK: # %bb.0: # %entry
8067 ; CHECK-NEXT: mtfprd f0, r5
8068 ; CHECK-NEXT: or r3, r4, r3
8069 ; CHECK-NEXT: xscvsxddp f0, f0
8070 ; CHECK-NEXT: stfd f0, 0(r3)
8073 %conv = sitofp i64 %str to double
8074 %conv1 = zext i8 %off to i64
8075 %or = or i64 %conv1, %ptr
8076 %0 = inttoptr i64 %or to ptr
8077 store double %conv, ptr %0, align 8
8081 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8082 define dso_local void @st_or2_int64_t_double(i64 %ptr, i8 zeroext %off, i64 %str) {
8083 ; CHECK-LABEL: st_or2_int64_t_double:
8084 ; CHECK: # %bb.0: # %entry
8085 ; CHECK-NEXT: mtfprd f0, r5
8086 ; CHECK-NEXT: rldicr r3, r3, 0, 51
8087 ; CHECK-NEXT: xscvsxddp f0, f0
8088 ; CHECK-NEXT: stfdx f0, r3, r4
8091 %and = and i64 %ptr, -4096
8092 %conv = sitofp i64 %str to double
8093 %conv1 = zext i8 %off to i64
8094 %or = or i64 %and, %conv1
8095 %0 = inttoptr i64 %or to ptr
8096 store double %conv, ptr %0, align 8
8100 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8101 define dso_local void @st_not_disjoint16_int64_t_double(i64 %ptr, i64 %str) {
8102 ; CHECK-LABEL: st_not_disjoint16_int64_t_double:
8103 ; CHECK: # %bb.0: # %entry
8104 ; CHECK-NEXT: mtfprd f0, r4
8105 ; CHECK-NEXT: ori r3, r3, 6
8106 ; CHECK-NEXT: xscvsxddp f0, f0
8107 ; CHECK-NEXT: stfd f0, 0(r3)
8110 %conv = sitofp i64 %str to double
8111 %or = or i64 %ptr, 6
8112 %0 = inttoptr i64 %or to ptr
8113 store double %conv, ptr %0, align 8
8117 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8118 define dso_local void @st_disjoint_align16_int64_t_double(i64 %ptr, i64 %str) {
8119 ; CHECK-LABEL: st_disjoint_align16_int64_t_double:
8120 ; CHECK: # %bb.0: # %entry
8121 ; CHECK-NEXT: mtfprd f0, r4
8122 ; CHECK-NEXT: rldicr r3, r3, 0, 51
8123 ; CHECK-NEXT: xscvsxddp f0, f0
8124 ; CHECK-NEXT: stfd f0, 24(r3)
8127 %and = and i64 %ptr, -4096
8128 %conv = sitofp i64 %str to double
8129 %or = or i64 %and, 24
8130 %0 = inttoptr i64 %or to ptr
8131 store double %conv, ptr %0, align 8
8135 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8136 define dso_local void @st_not_disjoint32_int64_t_double(i64 %ptr, i64 %str) {
8137 ; CHECK-P10-LABEL: st_not_disjoint32_int64_t_double:
8138 ; CHECK-P10: # %bb.0: # %entry
8139 ; CHECK-P10-NEXT: mtfprd f0, r4
8140 ; CHECK-P10-NEXT: ori r3, r3, 34463
8141 ; CHECK-P10-NEXT: oris r3, r3, 1
8142 ; CHECK-P10-NEXT: xscvsxddp f0, f0
8143 ; CHECK-P10-NEXT: stfd f0, 0(r3)
8144 ; CHECK-P10-NEXT: blr
8146 ; CHECK-P9-LABEL: st_not_disjoint32_int64_t_double:
8147 ; CHECK-P9: # %bb.0: # %entry
8148 ; CHECK-P9-NEXT: mtfprd f0, r4
8149 ; CHECK-P9-NEXT: ori r3, r3, 34463
8150 ; CHECK-P9-NEXT: xscvsxddp f0, f0
8151 ; CHECK-P9-NEXT: oris r3, r3, 1
8152 ; CHECK-P9-NEXT: stfd f0, 0(r3)
8153 ; CHECK-P9-NEXT: blr
8155 ; CHECK-P8-LABEL: st_not_disjoint32_int64_t_double:
8156 ; CHECK-P8: # %bb.0: # %entry
8157 ; CHECK-P8-NEXT: mtfprd f0, r4
8158 ; CHECK-P8-NEXT: ori r3, r3, 34463
8159 ; CHECK-P8-NEXT: oris r3, r3, 1
8160 ; CHECK-P8-NEXT: xscvsxddp f0, f0
8161 ; CHECK-P8-NEXT: stfd f0, 0(r3)
8162 ; CHECK-P8-NEXT: blr
8164 %conv = sitofp i64 %str to double
8165 %or = or i64 %ptr, 99999
8166 %0 = inttoptr i64 %or to ptr
8167 store double %conv, ptr %0, align 8
8171 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8172 define dso_local void @st_disjoint_align32_int64_t_double(i64 %ptr, i64 %str) {
8173 ; CHECK-P10-LABEL: st_disjoint_align32_int64_t_double:
8174 ; CHECK-P10: # %bb.0: # %entry
8175 ; CHECK-P10-NEXT: mtfprd f0, r4
8176 ; CHECK-P10-NEXT: lis r5, -15264
8177 ; CHECK-P10-NEXT: and r3, r3, r5
8178 ; CHECK-P10-NEXT: xscvsxddp f0, f0
8179 ; CHECK-P10-NEXT: pstfd f0, 999990000(r3), 0
8180 ; CHECK-P10-NEXT: blr
8182 ; CHECK-P9-LABEL: st_disjoint_align32_int64_t_double:
8183 ; CHECK-P9: # %bb.0: # %entry
8184 ; CHECK-P9-NEXT: mtfprd f0, r4
8185 ; CHECK-P9-NEXT: lis r5, -15264
8186 ; CHECK-P9-NEXT: lis r4, 15258
8187 ; CHECK-P9-NEXT: xscvsxddp f0, f0
8188 ; CHECK-P9-NEXT: and r3, r3, r5
8189 ; CHECK-P9-NEXT: ori r4, r4, 41712
8190 ; CHECK-P9-NEXT: stfdx f0, r3, r4
8191 ; CHECK-P9-NEXT: blr
8193 ; CHECK-P8-LABEL: st_disjoint_align32_int64_t_double:
8194 ; CHECK-P8: # %bb.0: # %entry
8195 ; CHECK-P8-NEXT: mtfprd f0, r4
8196 ; CHECK-P8-NEXT: lis r4, -15264
8197 ; CHECK-P8-NEXT: lis r5, 15258
8198 ; CHECK-P8-NEXT: and r3, r3, r4
8199 ; CHECK-P8-NEXT: ori r4, r5, 41712
8200 ; CHECK-P8-NEXT: xscvsxddp f0, f0
8201 ; CHECK-P8-NEXT: stfdx f0, r3, r4
8202 ; CHECK-P8-NEXT: blr
8204 %and = and i64 %ptr, -1000341504
8205 %conv = sitofp i64 %str to double
8206 %or = or i64 %and, 999990000
8207 %0 = inttoptr i64 %or to ptr
8208 store double %conv, ptr %0, align 16
8212 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8213 define dso_local void @st_not_disjoint64_int64_t_double(i64 %ptr, i64 %str) {
8214 ; CHECK-P10-LABEL: st_not_disjoint64_int64_t_double:
8215 ; CHECK-P10: # %bb.0: # %entry
8216 ; CHECK-P10-NEXT: mtfprd f0, r4
8217 ; CHECK-P10-NEXT: pli r4, 232
8218 ; CHECK-P10-NEXT: pli r5, 3567587329
8219 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
8220 ; CHECK-P10-NEXT: xscvsxddp f0, f0
8221 ; CHECK-P10-NEXT: or r3, r3, r5
8222 ; CHECK-P10-NEXT: stfd f0, 0(r3)
8223 ; CHECK-P10-NEXT: blr
8225 ; CHECK-PREP10-LABEL: st_not_disjoint64_int64_t_double:
8226 ; CHECK-PREP10: # %bb.0: # %entry
8227 ; CHECK-PREP10-NEXT: mtfprd f0, r4
8228 ; CHECK-PREP10-NEXT: li r4, 29
8229 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
8230 ; CHECK-PREP10-NEXT: xscvsxddp f0, f0
8231 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
8232 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
8233 ; CHECK-PREP10-NEXT: or r3, r3, r4
8234 ; CHECK-PREP10-NEXT: stfd f0, 0(r3)
8235 ; CHECK-PREP10-NEXT: blr
8237 %conv = sitofp i64 %str to double
8238 %or = or i64 %ptr, 1000000000001
8239 %0 = inttoptr i64 %or to ptr
8240 store double %conv, ptr %0, align 8
8244 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8245 define dso_local void @st_disjoint_align64_int64_t_double(i64 %ptr, i64 %str) {
8246 ; CHECK-P10-LABEL: st_disjoint_align64_int64_t_double:
8247 ; CHECK-P10: # %bb.0: # %entry
8248 ; CHECK-P10-NEXT: mtfprd f0, r4
8249 ; CHECK-P10-NEXT: pli r4, 244140625
8250 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
8251 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
8252 ; CHECK-P10-NEXT: xscvsxddp f0, f0
8253 ; CHECK-P10-NEXT: stfdx f0, r3, r4
8254 ; CHECK-P10-NEXT: blr
8256 ; CHECK-P9-LABEL: st_disjoint_align64_int64_t_double:
8257 ; CHECK-P9: # %bb.0: # %entry
8258 ; CHECK-P9-NEXT: mtfprd f0, r4
8259 ; CHECK-P9-NEXT: lis r4, 3725
8260 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
8261 ; CHECK-P9-NEXT: xscvsxddp f0, f0
8262 ; CHECK-P9-NEXT: ori r4, r4, 19025
8263 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
8264 ; CHECK-P9-NEXT: stfdx f0, r3, r4
8265 ; CHECK-P9-NEXT: blr
8267 ; CHECK-P8-LABEL: st_disjoint_align64_int64_t_double:
8268 ; CHECK-P8: # %bb.0: # %entry
8269 ; CHECK-P8-NEXT: mtfprd f0, r4
8270 ; CHECK-P8-NEXT: lis r5, 3725
8271 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
8272 ; CHECK-P8-NEXT: ori r4, r5, 19025
8273 ; CHECK-P8-NEXT: xscvsxddp f0, f0
8274 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
8275 ; CHECK-P8-NEXT: stfdx f0, r3, r4
8276 ; CHECK-P8-NEXT: blr
8278 %and = and i64 %ptr, -1099511627776
8279 %conv = sitofp i64 %str to double
8280 %or = or i64 %and, 1000000000000
8281 %0 = inttoptr i64 %or to ptr
8282 store double %conv, ptr %0, align 4096
8286 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8287 define dso_local void @st_cst_align16_int64_t_double(i64 %str) {
8288 ; CHECK-LABEL: st_cst_align16_int64_t_double:
8289 ; CHECK: # %bb.0: # %entry
8290 ; CHECK-NEXT: mtfprd f0, r3
8291 ; CHECK-NEXT: xscvsxddp f0, f0
8292 ; CHECK-NEXT: stfd f0, 4080(0)
8295 %conv = sitofp i64 %str to double
8296 store double %conv, ptr inttoptr (i64 4080 to ptr), align 16
8300 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8301 define dso_local void @st_cst_align32_int64_t_double(i64 %str) {
8302 ; CHECK-LABEL: st_cst_align32_int64_t_double:
8303 ; CHECK: # %bb.0: # %entry
8304 ; CHECK-NEXT: mtfprd f0, r3
8305 ; CHECK-NEXT: lis r3, 153
8306 ; CHECK-NEXT: xscvsxddp f0, f0
8307 ; CHECK-NEXT: stfd f0, -27108(r3)
8310 %conv = sitofp i64 %str to double
8311 store double %conv, ptr inttoptr (i64 9999900 to ptr), align 8
8315 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8316 define dso_local void @st_cst_align64_int64_t_double(i64 %str) {
8317 ; CHECK-P10-LABEL: st_cst_align64_int64_t_double:
8318 ; CHECK-P10: # %bb.0: # %entry
8319 ; CHECK-P10-NEXT: mtfprd f0, r3
8320 ; CHECK-P10-NEXT: pli r3, 244140625
8321 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
8322 ; CHECK-P10-NEXT: xscvsxddp f0, f0
8323 ; CHECK-P10-NEXT: stfd f0, 0(r3)
8324 ; CHECK-P10-NEXT: blr
8326 ; CHECK-P9-LABEL: st_cst_align64_int64_t_double:
8327 ; CHECK-P9: # %bb.0: # %entry
8328 ; CHECK-P9-NEXT: mtfprd f0, r3
8329 ; CHECK-P9-NEXT: lis r3, 3725
8330 ; CHECK-P9-NEXT: xscvsxddp f0, f0
8331 ; CHECK-P9-NEXT: ori r3, r3, 19025
8332 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
8333 ; CHECK-P9-NEXT: stfd f0, 0(r3)
8334 ; CHECK-P9-NEXT: blr
8336 ; CHECK-P8-LABEL: st_cst_align64_int64_t_double:
8337 ; CHECK-P8: # %bb.0: # %entry
8338 ; CHECK-P8-NEXT: mtfprd f0, r3
8339 ; CHECK-P8-NEXT: lis r3, 3725
8340 ; CHECK-P8-NEXT: ori r3, r3, 19025
8341 ; CHECK-P8-NEXT: xscvsxddp f0, f0
8342 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
8343 ; CHECK-P8-NEXT: stfd f0, 0(r3)
8344 ; CHECK-P8-NEXT: blr
8346 %conv = sitofp i64 %str to double
8347 store double %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096