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-PREP10-LABEL: ld_disjoint_align32_int64_t_float:
200 ; CHECK-PREP10: # %bb.0: # %entry
201 ; CHECK-PREP10-NEXT: lis r4, -15264
202 ; CHECK-PREP10-NEXT: and r3, r3, r4
203 ; CHECK-PREP10-NEXT: lis r4, 15258
204 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
205 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
206 ; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
207 ; CHECK-PREP10-NEXT: mffprd r3, f0
208 ; CHECK-PREP10-NEXT: blr
210 %and = and i64 %ptr, -1000341504
211 %or = or i64 %and, 999990000
212 %0 = inttoptr i64 %or to ptr
213 %1 = load float, ptr %0, align 16
214 %conv = fptosi float %1 to i64
218 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
219 define dso_local i64 @ld_not_disjoint64_int64_t_float(i64 %ptr) {
220 ; CHECK-P10-LABEL: ld_not_disjoint64_int64_t_float:
221 ; CHECK-P10: # %bb.0: # %entry
222 ; CHECK-P10-NEXT: pli r4, 232
223 ; CHECK-P10-NEXT: pli r5, 3567587329
224 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
225 ; CHECK-P10-NEXT: or r3, r3, r5
226 ; CHECK-P10-NEXT: lfs f0, 0(r3)
227 ; CHECK-P10-NEXT: xscvdpsxds f0, f0
228 ; CHECK-P10-NEXT: mffprd r3, f0
229 ; CHECK-P10-NEXT: blr
231 ; CHECK-PREP10-LABEL: ld_not_disjoint64_int64_t_float:
232 ; CHECK-PREP10: # %bb.0: # %entry
233 ; CHECK-PREP10-NEXT: li r4, 29
234 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
235 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
236 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
237 ; CHECK-PREP10-NEXT: or r3, r3, r4
238 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
239 ; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
240 ; CHECK-PREP10-NEXT: mffprd r3, f0
241 ; CHECK-PREP10-NEXT: blr
243 %or = or i64 %ptr, 1000000000001
244 %0 = inttoptr i64 %or to ptr
245 %1 = load float, ptr %0, align 4
246 %conv = fptosi float %1 to i64
250 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
251 define dso_local i64 @ld_disjoint_align64_int64_t_float(i64 %ptr) {
252 ; CHECK-P10-LABEL: ld_disjoint_align64_int64_t_float:
253 ; CHECK-P10: # %bb.0: # %entry
254 ; CHECK-P10-NEXT: pli r4, 244140625
255 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
256 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
257 ; CHECK-P10-NEXT: lfsx f0, r3, r4
258 ; CHECK-P10-NEXT: xscvdpsxds f0, f0
259 ; CHECK-P10-NEXT: mffprd r3, f0
260 ; CHECK-P10-NEXT: blr
262 ; CHECK-PREP10-LABEL: ld_disjoint_align64_int64_t_float:
263 ; CHECK-PREP10: # %bb.0: # %entry
264 ; CHECK-PREP10-NEXT: lis r4, 3725
265 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
266 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
267 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
268 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
269 ; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
270 ; CHECK-PREP10-NEXT: mffprd r3, f0
271 ; CHECK-PREP10-NEXT: blr
273 %and = and i64 %ptr, -1099511627776
274 %or = or i64 %and, 1000000000000
275 %0 = inttoptr i64 %or to ptr
276 %1 = load float, ptr %0, align 4096
277 %conv = fptosi float %1 to i64
281 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
282 define dso_local i64 @ld_cst_align16_int64_t_float() {
283 ; CHECK-LABEL: ld_cst_align16_int64_t_float:
284 ; CHECK: # %bb.0: # %entry
285 ; CHECK-NEXT: lfs f0, 4080(0)
286 ; CHECK-NEXT: xscvdpsxds f0, f0
287 ; CHECK-NEXT: mffprd r3, f0
290 %0 = load float, ptr inttoptr (i64 4080 to ptr), align 16
291 %conv = fptosi float %0 to i64
295 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
296 define dso_local i64 @ld_cst_align32_int64_t_float() {
297 ; CHECK-LABEL: ld_cst_align32_int64_t_float:
298 ; CHECK: # %bb.0: # %entry
299 ; CHECK-NEXT: lis r3, 153
300 ; CHECK-NEXT: lfs f0, -27108(r3)
301 ; CHECK-NEXT: xscvdpsxds f0, f0
302 ; CHECK-NEXT: mffprd r3, f0
305 %0 = load float, ptr inttoptr (i64 9999900 to ptr), align 4
306 %conv = fptosi float %0 to i64
310 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
311 define dso_local i64 @ld_cst_align64_int64_t_float() {
312 ; CHECK-P10-LABEL: ld_cst_align64_int64_t_float:
313 ; CHECK-P10: # %bb.0: # %entry
314 ; CHECK-P10-NEXT: pli r3, 244140625
315 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
316 ; CHECK-P10-NEXT: lfs f0, 0(r3)
317 ; CHECK-P10-NEXT: xscvdpsxds f0, f0
318 ; CHECK-P10-NEXT: mffprd r3, f0
319 ; CHECK-P10-NEXT: blr
321 ; CHECK-PREP10-LABEL: ld_cst_align64_int64_t_float:
322 ; CHECK-PREP10: # %bb.0: # %entry
323 ; CHECK-PREP10-NEXT: lis r3, 3725
324 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
325 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
326 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
327 ; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
328 ; CHECK-PREP10-NEXT: mffprd r3, f0
329 ; CHECK-PREP10-NEXT: blr
331 %0 = load float, ptr inttoptr (i64 1000000000000 to ptr), align 4096
332 %conv = fptosi float %0 to i64
336 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
337 define dso_local i64 @ld_0_int64_t_double(i64 %ptr) {
338 ; CHECK-LABEL: ld_0_int64_t_double:
339 ; CHECK: # %bb.0: # %entry
340 ; CHECK-NEXT: lfd f0, 0(r3)
341 ; CHECK-NEXT: xscvdpsxds f0, f0
342 ; CHECK-NEXT: mffprd r3, f0
345 %0 = inttoptr i64 %ptr to ptr
346 %1 = load double, ptr %0, align 8
347 %conv = fptosi double %1 to i64
351 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
352 define dso_local i64 @ld_align16_int64_t_double(ptr nocapture readonly %ptr) {
353 ; CHECK-LABEL: ld_align16_int64_t_double:
354 ; CHECK: # %bb.0: # %entry
355 ; CHECK-NEXT: lfd f0, 8(r3)
356 ; CHECK-NEXT: xscvdpsxds f0, f0
357 ; CHECK-NEXT: mffprd r3, f0
360 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
361 %0 = load double, ptr %add.ptr, align 8
362 %conv = fptosi double %0 to i64
366 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
367 define dso_local i64 @ld_align32_int64_t_double(ptr nocapture readonly %ptr) {
368 ; CHECK-P10-LABEL: ld_align32_int64_t_double:
369 ; CHECK-P10: # %bb.0: # %entry
370 ; CHECK-P10-NEXT: plfd f0, 99999000(r3), 0
371 ; CHECK-P10-NEXT: xscvdpsxds f0, f0
372 ; CHECK-P10-NEXT: mffprd r3, f0
373 ; CHECK-P10-NEXT: blr
375 ; CHECK-PREP10-LABEL: ld_align32_int64_t_double:
376 ; CHECK-PREP10: # %bb.0: # %entry
377 ; CHECK-PREP10-NEXT: lis r4, 1525
378 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
379 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
380 ; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
381 ; CHECK-PREP10-NEXT: mffprd r3, f0
382 ; CHECK-PREP10-NEXT: blr
384 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
385 %0 = load double, ptr %add.ptr, align 8
386 %conv = fptosi double %0 to i64
390 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
391 define dso_local i64 @ld_align64_int64_t_double(ptr nocapture readonly %ptr) {
392 ; CHECK-P10-LABEL: ld_align64_int64_t_double:
393 ; CHECK-P10: # %bb.0: # %entry
394 ; CHECK-P10-NEXT: pli r4, 244140625
395 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
396 ; CHECK-P10-NEXT: lfdx f0, r3, r4
397 ; CHECK-P10-NEXT: xscvdpsxds f0, f0
398 ; CHECK-P10-NEXT: mffprd r3, f0
399 ; CHECK-P10-NEXT: blr
401 ; CHECK-PREP10-LABEL: ld_align64_int64_t_double:
402 ; CHECK-PREP10: # %bb.0: # %entry
403 ; CHECK-PREP10-NEXT: lis r4, 3725
404 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
405 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
406 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
407 ; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
408 ; CHECK-PREP10-NEXT: mffprd r3, f0
409 ; CHECK-PREP10-NEXT: blr
411 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
412 %0 = load double, ptr %add.ptr, align 8
413 %conv = fptosi double %0 to i64
417 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
418 define dso_local i64 @ld_reg_int64_t_double(ptr nocapture readonly %ptr, i64 %off) {
419 ; CHECK-LABEL: ld_reg_int64_t_double:
420 ; CHECK: # %bb.0: # %entry
421 ; CHECK-NEXT: lfdx f0, r3, r4
422 ; CHECK-NEXT: xscvdpsxds f0, f0
423 ; CHECK-NEXT: mffprd r3, f0
426 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
427 %0 = load double, ptr %add.ptr, align 8
428 %conv = fptosi double %0 to i64
432 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
433 define dso_local i64 @ld_or_int64_t_double(i64 %ptr, i8 zeroext %off) {
434 ; CHECK-LABEL: ld_or_int64_t_double:
435 ; CHECK: # %bb.0: # %entry
436 ; CHECK-NEXT: or r3, r4, r3
437 ; CHECK-NEXT: lfd f0, 0(r3)
438 ; CHECK-NEXT: xscvdpsxds f0, f0
439 ; CHECK-NEXT: mffprd r3, f0
442 %conv = zext i8 %off to i64
443 %or = or i64 %conv, %ptr
444 %0 = inttoptr i64 %or to ptr
445 %1 = load double, ptr %0, align 8
446 %conv1 = fptosi double %1 to i64
450 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
451 define dso_local i64 @ld_not_disjoint16_int64_t_double(i64 %ptr) {
452 ; CHECK-LABEL: ld_not_disjoint16_int64_t_double:
453 ; CHECK: # %bb.0: # %entry
454 ; CHECK-NEXT: ori r3, r3, 6
455 ; CHECK-NEXT: lfd f0, 0(r3)
456 ; CHECK-NEXT: xscvdpsxds f0, f0
457 ; CHECK-NEXT: mffprd r3, f0
461 %0 = inttoptr i64 %or to ptr
462 %1 = load double, ptr %0, align 8
463 %conv = fptosi double %1 to i64
467 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
468 define dso_local i64 @ld_disjoint_align16_int64_t_double(i64 %ptr) {
469 ; CHECK-LABEL: ld_disjoint_align16_int64_t_double:
470 ; CHECK: # %bb.0: # %entry
471 ; CHECK-NEXT: rldicr r3, r3, 0, 51
472 ; CHECK-NEXT: lfd f0, 24(r3)
473 ; CHECK-NEXT: xscvdpsxds f0, f0
474 ; CHECK-NEXT: mffprd r3, f0
477 %and = and i64 %ptr, -4096
478 %or = or i64 %and, 24
479 %0 = inttoptr i64 %or to ptr
480 %1 = load double, ptr %0, align 8
481 %conv = fptosi double %1 to i64
485 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
486 define dso_local i64 @ld_not_disjoint32_int64_t_double(i64 %ptr) {
487 ; CHECK-LABEL: ld_not_disjoint32_int64_t_double:
488 ; CHECK: # %bb.0: # %entry
489 ; CHECK-NEXT: ori r3, r3, 34463
490 ; CHECK-NEXT: oris r3, r3, 1
491 ; CHECK-NEXT: lfd f0, 0(r3)
492 ; CHECK-NEXT: xscvdpsxds f0, f0
493 ; CHECK-NEXT: mffprd r3, f0
496 %or = or i64 %ptr, 99999
497 %0 = inttoptr i64 %or to ptr
498 %1 = load double, ptr %0, align 8
499 %conv = fptosi double %1 to i64
503 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
504 define dso_local i64 @ld_disjoint_align32_int64_t_double(i64 %ptr) {
505 ; CHECK-P10-LABEL: ld_disjoint_align32_int64_t_double:
506 ; CHECK-P10: # %bb.0: # %entry
507 ; CHECK-P10-NEXT: lis r4, -15264
508 ; CHECK-P10-NEXT: and r3, r3, r4
509 ; CHECK-P10-NEXT: plfd f0, 999990000(r3), 0
510 ; CHECK-P10-NEXT: xscvdpsxds f0, f0
511 ; CHECK-P10-NEXT: mffprd r3, f0
512 ; CHECK-P10-NEXT: blr
514 ; CHECK-PREP10-LABEL: ld_disjoint_align32_int64_t_double:
515 ; CHECK-PREP10: # %bb.0: # %entry
516 ; CHECK-PREP10-NEXT: lis r4, -15264
517 ; CHECK-PREP10-NEXT: and r3, r3, r4
518 ; CHECK-PREP10-NEXT: lis r4, 15258
519 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
520 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
521 ; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
522 ; CHECK-PREP10-NEXT: mffprd r3, f0
523 ; CHECK-PREP10-NEXT: blr
525 %and = and i64 %ptr, -1000341504
526 %or = or i64 %and, 999990000
527 %0 = inttoptr i64 %or to ptr
528 %1 = load double, ptr %0, align 16
529 %conv = fptosi double %1 to i64
533 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
534 define dso_local i64 @ld_not_disjoint64_int64_t_double(i64 %ptr) {
535 ; CHECK-P10-LABEL: ld_not_disjoint64_int64_t_double:
536 ; CHECK-P10: # %bb.0: # %entry
537 ; CHECK-P10-NEXT: pli r4, 232
538 ; CHECK-P10-NEXT: pli r5, 3567587329
539 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
540 ; CHECK-P10-NEXT: or r3, r3, r5
541 ; CHECK-P10-NEXT: lfd f0, 0(r3)
542 ; CHECK-P10-NEXT: xscvdpsxds f0, f0
543 ; CHECK-P10-NEXT: mffprd r3, f0
544 ; CHECK-P10-NEXT: blr
546 ; CHECK-PREP10-LABEL: ld_not_disjoint64_int64_t_double:
547 ; CHECK-PREP10: # %bb.0: # %entry
548 ; CHECK-PREP10-NEXT: li r4, 29
549 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
550 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
551 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
552 ; CHECK-PREP10-NEXT: or r3, r3, r4
553 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
554 ; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
555 ; CHECK-PREP10-NEXT: mffprd r3, f0
556 ; CHECK-PREP10-NEXT: blr
558 %or = or i64 %ptr, 1000000000001
559 %0 = inttoptr i64 %or to ptr
560 %1 = load double, ptr %0, align 8
561 %conv = fptosi double %1 to i64
565 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
566 define dso_local i64 @ld_disjoint_align64_int64_t_double(i64 %ptr) {
567 ; CHECK-P10-LABEL: ld_disjoint_align64_int64_t_double:
568 ; CHECK-P10: # %bb.0: # %entry
569 ; CHECK-P10-NEXT: pli r4, 244140625
570 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
571 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
572 ; CHECK-P10-NEXT: lfdx f0, r3, r4
573 ; CHECK-P10-NEXT: xscvdpsxds f0, f0
574 ; CHECK-P10-NEXT: mffprd r3, f0
575 ; CHECK-P10-NEXT: blr
577 ; CHECK-PREP10-LABEL: ld_disjoint_align64_int64_t_double:
578 ; CHECK-PREP10: # %bb.0: # %entry
579 ; CHECK-PREP10-NEXT: lis r4, 3725
580 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
581 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
582 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
583 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
584 ; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
585 ; CHECK-PREP10-NEXT: mffprd r3, f0
586 ; CHECK-PREP10-NEXT: blr
588 %and = and i64 %ptr, -1099511627776
589 %or = or i64 %and, 1000000000000
590 %0 = inttoptr i64 %or to ptr
591 %1 = load double, ptr %0, align 4096
592 %conv = fptosi double %1 to i64
596 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
597 define dso_local i64 @ld_cst_align16_int64_t_double() {
598 ; CHECK-LABEL: ld_cst_align16_int64_t_double:
599 ; CHECK: # %bb.0: # %entry
600 ; CHECK-NEXT: lfd f0, 4080(0)
601 ; CHECK-NEXT: xscvdpsxds f0, f0
602 ; CHECK-NEXT: mffprd r3, f0
605 %0 = load double, ptr inttoptr (i64 4080 to ptr), align 16
606 %conv = fptosi double %0 to i64
610 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
611 define dso_local i64 @ld_cst_align32_int64_t_double() {
612 ; CHECK-LABEL: ld_cst_align32_int64_t_double:
613 ; CHECK: # %bb.0: # %entry
614 ; CHECK-NEXT: lis r3, 153
615 ; CHECK-NEXT: lfd f0, -27108(r3)
616 ; CHECK-NEXT: xscvdpsxds f0, f0
617 ; CHECK-NEXT: mffprd r3, f0
620 %0 = load double, ptr inttoptr (i64 9999900 to ptr), align 8
621 %conv = fptosi double %0 to i64
625 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
626 define dso_local i64 @ld_cst_align64_int64_t_double() {
627 ; CHECK-P10-LABEL: ld_cst_align64_int64_t_double:
628 ; CHECK-P10: # %bb.0: # %entry
629 ; CHECK-P10-NEXT: pli r3, 244140625
630 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
631 ; CHECK-P10-NEXT: lfd f0, 0(r3)
632 ; CHECK-P10-NEXT: xscvdpsxds f0, f0
633 ; CHECK-P10-NEXT: mffprd r3, f0
634 ; CHECK-P10-NEXT: blr
636 ; CHECK-PREP10-LABEL: ld_cst_align64_int64_t_double:
637 ; CHECK-PREP10: # %bb.0: # %entry
638 ; CHECK-PREP10-NEXT: lis r3, 3725
639 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
640 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
641 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
642 ; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
643 ; CHECK-PREP10-NEXT: mffprd r3, f0
644 ; CHECK-PREP10-NEXT: blr
646 %0 = load double, ptr inttoptr (i64 1000000000000 to ptr), align 4096
647 %conv = fptosi double %0 to i64
651 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
652 define dso_local i64 @ld_0_uint64_t_uint8_t(i64 %ptr) {
653 ; CHECK-LABEL: ld_0_uint64_t_uint8_t:
654 ; CHECK: # %bb.0: # %entry
655 ; CHECK-NEXT: lbz r3, 0(r3)
658 %0 = inttoptr i64 %ptr to ptr
659 %1 = load i8, ptr %0, align 1
660 %conv = zext i8 %1 to i64
664 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
665 define dso_local i64 @ld_unalign16_uint64_t_uint8_t(ptr nocapture readonly %ptr) {
666 ; CHECK-LABEL: ld_unalign16_uint64_t_uint8_t:
667 ; CHECK: # %bb.0: # %entry
668 ; CHECK-NEXT: lbz r3, 1(r3)
671 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1
672 %0 = load i8, ptr %add.ptr, align 1
673 %conv = zext i8 %0 to i64
677 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
678 define dso_local i64 @ld_align16_uint64_t_uint8_t(ptr nocapture readonly %ptr) {
679 ; CHECK-LABEL: ld_align16_uint64_t_uint8_t:
680 ; CHECK: # %bb.0: # %entry
681 ; CHECK-NEXT: lbz r3, 8(r3)
684 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
685 %0 = load i8, ptr %add.ptr, align 1
686 %conv = zext i8 %0 to i64
690 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
691 define dso_local i64 @ld_unalign32_uint64_t_uint8_t(ptr nocapture readonly %ptr) {
692 ; CHECK-P10-LABEL: ld_unalign32_uint64_t_uint8_t:
693 ; CHECK-P10: # %bb.0: # %entry
694 ; CHECK-P10-NEXT: plbz r3, 99999(r3), 0
695 ; CHECK-P10-NEXT: blr
697 ; CHECK-PREP10-LABEL: ld_unalign32_uint64_t_uint8_t:
698 ; CHECK-PREP10: # %bb.0: # %entry
699 ; CHECK-PREP10-NEXT: lis r4, 1
700 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
701 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
702 ; CHECK-PREP10-NEXT: blr
704 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999
705 %0 = load i8, ptr %add.ptr, align 1
706 %conv = zext i8 %0 to i64
710 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
711 define dso_local i64 @ld_align32_uint64_t_uint8_t(ptr nocapture readonly %ptr) {
712 ; CHECK-P10-LABEL: ld_align32_uint64_t_uint8_t:
713 ; CHECK-P10: # %bb.0: # %entry
714 ; CHECK-P10-NEXT: plbz r3, 99999000(r3), 0
715 ; CHECK-P10-NEXT: blr
717 ; CHECK-PREP10-LABEL: ld_align32_uint64_t_uint8_t:
718 ; CHECK-PREP10: # %bb.0: # %entry
719 ; CHECK-PREP10-NEXT: lis r4, 1525
720 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
721 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
722 ; CHECK-PREP10-NEXT: blr
724 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
725 %0 = load i8, ptr %add.ptr, align 1
726 %conv = zext i8 %0 to i64
730 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
731 define dso_local i64 @ld_unalign64_uint64_t_uint8_t(ptr nocapture readonly %ptr) {
732 ; CHECK-P10-LABEL: ld_unalign64_uint64_t_uint8_t:
733 ; CHECK-P10: # %bb.0: # %entry
734 ; CHECK-P10-NEXT: pli r4, 232
735 ; CHECK-P10-NEXT: pli r5, 3567587329
736 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
737 ; CHECK-P10-NEXT: lbzx r3, r3, r5
738 ; CHECK-P10-NEXT: blr
740 ; CHECK-PREP10-LABEL: ld_unalign64_uint64_t_uint8_t:
741 ; CHECK-PREP10: # %bb.0: # %entry
742 ; CHECK-PREP10-NEXT: li r4, 29
743 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
744 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
745 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
746 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
747 ; CHECK-PREP10-NEXT: blr
749 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000001
750 %0 = load i8, ptr %add.ptr, align 1
751 %conv = zext i8 %0 to i64
755 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
756 define dso_local i64 @ld_align64_uint64_t_uint8_t(ptr nocapture readonly %ptr) {
757 ; CHECK-P10-LABEL: ld_align64_uint64_t_uint8_t:
758 ; CHECK-P10: # %bb.0: # %entry
759 ; CHECK-P10-NEXT: pli r4, 244140625
760 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
761 ; CHECK-P10-NEXT: lbzx r3, r3, r4
762 ; CHECK-P10-NEXT: blr
764 ; CHECK-PREP10-LABEL: ld_align64_uint64_t_uint8_t:
765 ; CHECK-PREP10: # %bb.0: # %entry
766 ; CHECK-PREP10-NEXT: lis r4, 3725
767 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
768 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
769 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
770 ; CHECK-PREP10-NEXT: blr
772 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
773 %0 = load i8, ptr %add.ptr, align 1
774 %conv = zext i8 %0 to i64
778 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
779 define dso_local i64 @ld_reg_uint64_t_uint8_t(ptr nocapture readonly %ptr, i64 %off) {
780 ; CHECK-LABEL: ld_reg_uint64_t_uint8_t:
781 ; CHECK: # %bb.0: # %entry
782 ; CHECK-NEXT: lbzx r3, r3, r4
785 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
786 %0 = load i8, ptr %add.ptr, align 1
787 %conv = zext i8 %0 to i64
791 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
792 define dso_local i64 @ld_or_uint64_t_uint8_t(i64 %ptr, i8 zeroext %off) {
793 ; CHECK-LABEL: ld_or_uint64_t_uint8_t:
794 ; CHECK: # %bb.0: # %entry
795 ; CHECK-NEXT: or r3, r4, r3
796 ; CHECK-NEXT: lbz r3, 0(r3)
799 %conv = zext i8 %off to i64
800 %or = or i64 %conv, %ptr
801 %0 = inttoptr i64 %or to ptr
802 %1 = load i8, ptr %0, align 1
803 %conv1 = zext i8 %1 to i64
807 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
808 define dso_local i64 @ld_or2_uint64_t_uint8_t(i64 %ptr, i8 zeroext %off) {
809 ; CHECK-LABEL: ld_or2_uint64_t_uint8_t:
810 ; CHECK: # %bb.0: # %entry
811 ; CHECK-NEXT: rldicr r3, r3, 0, 51
812 ; CHECK-NEXT: lbzx r3, r3, r4
815 %and = and i64 %ptr, -4096
816 %conv = zext i8 %off to i64
817 %or = or i64 %and, %conv
818 %0 = inttoptr i64 %or to ptr
819 %1 = load i8, ptr %0, align 1
820 %conv1 = zext i8 %1 to i64
824 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
825 define dso_local i64 @ld_not_disjoint16_uint64_t_uint8_t(i64 %ptr) {
826 ; CHECK-LABEL: ld_not_disjoint16_uint64_t_uint8_t:
827 ; CHECK: # %bb.0: # %entry
828 ; CHECK-NEXT: ori r3, r3, 6
829 ; CHECK-NEXT: lbz r3, 0(r3)
833 %0 = inttoptr i64 %or to ptr
834 %1 = load i8, ptr %0, align 1
835 %conv = zext i8 %1 to i64
839 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
840 define dso_local i64 @ld_disjoint_unalign16_uint64_t_uint8_t(i64 %ptr) {
841 ; CHECK-LABEL: ld_disjoint_unalign16_uint64_t_uint8_t:
842 ; CHECK: # %bb.0: # %entry
843 ; CHECK-NEXT: rldicr r3, r3, 0, 51
844 ; CHECK-NEXT: lbz r3, 6(r3)
847 %and = and i64 %ptr, -4096
849 %0 = inttoptr i64 %or to ptr
850 %1 = load i8, ptr %0, align 2
851 %conv = zext i8 %1 to i64
855 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
856 define dso_local i64 @ld_disjoint_align16_uint64_t_uint8_t(i64 %ptr) {
857 ; CHECK-LABEL: ld_disjoint_align16_uint64_t_uint8_t:
858 ; CHECK: # %bb.0: # %entry
859 ; CHECK-NEXT: rldicr r3, r3, 0, 51
860 ; CHECK-NEXT: lbz r3, 24(r3)
863 %and = and i64 %ptr, -4096
864 %or = or i64 %and, 24
865 %0 = inttoptr i64 %or to ptr
866 %1 = load i8, ptr %0, align 8
867 %conv = zext i8 %1 to i64
871 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
872 define dso_local i64 @ld_not_disjoint32_uint64_t_uint8_t(i64 %ptr) {
873 ; CHECK-LABEL: ld_not_disjoint32_uint64_t_uint8_t:
874 ; CHECK: # %bb.0: # %entry
875 ; CHECK-NEXT: ori r3, r3, 34463
876 ; CHECK-NEXT: oris r3, r3, 1
877 ; CHECK-NEXT: lbz r3, 0(r3)
880 %or = or i64 %ptr, 99999
881 %0 = inttoptr i64 %or to ptr
882 %1 = load i8, ptr %0, align 1
883 %conv = zext i8 %1 to i64
887 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
888 define dso_local i64 @ld_disjoint_unalign32_uint64_t_uint8_t(i64 %ptr) {
889 ; CHECK-P10-LABEL: ld_disjoint_unalign32_uint64_t_uint8_t:
890 ; CHECK-P10: # %bb.0: # %entry
891 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
892 ; CHECK-P10-NEXT: plbz r3, 99999(r3), 0
893 ; CHECK-P10-NEXT: blr
895 ; CHECK-PREP10-LABEL: ld_disjoint_unalign32_uint64_t_uint8_t:
896 ; CHECK-PREP10: # %bb.0: # %entry
897 ; CHECK-PREP10-NEXT: lis r4, 1
898 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
899 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
900 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
901 ; CHECK-PREP10-NEXT: blr
903 %and = and i64 %ptr, -1048576
904 %or = or i64 %and, 99999
905 %0 = inttoptr i64 %or to ptr
906 %1 = load i8, ptr %0, align 1
907 %conv = zext i8 %1 to i64
911 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
912 define dso_local i64 @ld_disjoint_align32_uint64_t_uint8_t(i64 %ptr) {
913 ; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_uint8_t:
914 ; CHECK-P10: # %bb.0: # %entry
915 ; CHECK-P10-NEXT: lis r4, -15264
916 ; CHECK-P10-NEXT: and r3, r3, r4
917 ; CHECK-P10-NEXT: plbz r3, 999990000(r3), 0
918 ; CHECK-P10-NEXT: blr
920 ; CHECK-PREP10-LABEL: ld_disjoint_align32_uint64_t_uint8_t:
921 ; CHECK-PREP10: # %bb.0: # %entry
922 ; CHECK-PREP10-NEXT: lis r4, -15264
923 ; CHECK-PREP10-NEXT: and r3, r3, r4
924 ; CHECK-PREP10-NEXT: lis r4, 15258
925 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
926 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
927 ; CHECK-PREP10-NEXT: blr
929 %and = and i64 %ptr, -1000341504
930 %or = or i64 %and, 999990000
931 %0 = inttoptr i64 %or to ptr
932 %1 = load i8, ptr %0, align 16
933 %conv = zext i8 %1 to i64
937 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
938 define dso_local i64 @ld_not_disjoint64_uint64_t_uint8_t(i64 %ptr) {
939 ; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_uint8_t:
940 ; CHECK-P10: # %bb.0: # %entry
941 ; CHECK-P10-NEXT: pli r4, 232
942 ; CHECK-P10-NEXT: pli r5, 3567587329
943 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
944 ; CHECK-P10-NEXT: or r3, r3, r5
945 ; CHECK-P10-NEXT: lbz r3, 0(r3)
946 ; CHECK-P10-NEXT: blr
948 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_uint8_t:
949 ; CHECK-PREP10: # %bb.0: # %entry
950 ; CHECK-PREP10-NEXT: li r4, 29
951 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
952 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
953 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
954 ; CHECK-PREP10-NEXT: or r3, r3, r4
955 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
956 ; CHECK-PREP10-NEXT: blr
958 %or = or i64 %ptr, 1000000000001
959 %0 = inttoptr i64 %or to ptr
960 %1 = load i8, ptr %0, align 1
961 %conv = zext i8 %1 to i64
965 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
966 define dso_local i64 @ld_disjoint_unalign64_uint64_t_uint8_t(i64 %ptr) {
967 ; CHECK-P10-LABEL: ld_disjoint_unalign64_uint64_t_uint8_t:
968 ; CHECK-P10: # %bb.0: # %entry
969 ; CHECK-P10-NEXT: pli r4, 232
970 ; CHECK-P10-NEXT: pli r5, 3567587329
971 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
972 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
973 ; CHECK-P10-NEXT: lbzx r3, r3, r5
974 ; CHECK-P10-NEXT: blr
976 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint64_t_uint8_t:
977 ; CHECK-PREP10: # %bb.0: # %entry
978 ; CHECK-PREP10-NEXT: li r4, 29
979 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
980 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
981 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
982 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
983 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
984 ; CHECK-PREP10-NEXT: blr
986 %and = and i64 %ptr, -1099511627776
987 %or = or i64 %and, 1000000000001
988 %0 = inttoptr i64 %or to ptr
989 %1 = load i8, ptr %0, align 1
990 %conv = zext i8 %1 to i64
994 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
995 define dso_local i64 @ld_disjoint_align64_uint64_t_uint8_t(i64 %ptr) {
996 ; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_uint8_t:
997 ; CHECK-P10: # %bb.0: # %entry
998 ; CHECK-P10-NEXT: pli r4, 244140625
999 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
1000 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
1001 ; CHECK-P10-NEXT: lbzx r3, r3, r4
1002 ; CHECK-P10-NEXT: blr
1004 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_uint8_t:
1005 ; CHECK-PREP10: # %bb.0: # %entry
1006 ; CHECK-PREP10-NEXT: lis r4, 3725
1007 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
1008 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
1009 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
1010 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
1011 ; CHECK-PREP10-NEXT: blr
1013 %and = and i64 %ptr, -1099511627776
1014 %or = or i64 %and, 1000000000000
1015 %0 = inttoptr i64 %or to ptr
1016 %1 = load i8, ptr %0, align 4096
1017 %conv = zext i8 %1 to i64
1021 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1022 define dso_local i64 @ld_cst_unalign16_uint64_t_uint8_t() {
1023 ; CHECK-LABEL: ld_cst_unalign16_uint64_t_uint8_t:
1024 ; CHECK: # %bb.0: # %entry
1025 ; CHECK-NEXT: lbz r3, 255(0)
1028 %0 = load i8, ptr inttoptr (i64 255 to ptr), align 1
1029 %conv = zext i8 %0 to i64
1033 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1034 define dso_local i64 @ld_cst_align16_uint64_t_uint8_t() {
1035 ; CHECK-LABEL: ld_cst_align16_uint64_t_uint8_t:
1036 ; CHECK: # %bb.0: # %entry
1037 ; CHECK-NEXT: lbz r3, 4080(0)
1040 %0 = load i8, ptr inttoptr (i64 4080 to ptr), align 16
1041 %conv = zext i8 %0 to i64
1045 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1046 define dso_local i64 @ld_cst_unalign32_uint64_t_uint8_t() {
1047 ; CHECK-LABEL: ld_cst_unalign32_uint64_t_uint8_t:
1048 ; CHECK: # %bb.0: # %entry
1049 ; CHECK-NEXT: lis r3, 2
1050 ; CHECK-NEXT: lbz r3, -31073(r3)
1053 %0 = load i8, ptr inttoptr (i64 99999 to ptr), align 1
1054 %conv = zext i8 %0 to i64
1058 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1059 define dso_local i64 @ld_cst_align32_uint64_t_uint8_t() {
1060 ; CHECK-LABEL: ld_cst_align32_uint64_t_uint8_t:
1061 ; CHECK: # %bb.0: # %entry
1062 ; CHECK-NEXT: lis r3, 153
1063 ; CHECK-NEXT: lbz r3, -27108(r3)
1066 %0 = load i8, ptr inttoptr (i64 9999900 to ptr), align 4
1067 %conv = zext i8 %0 to i64
1071 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1072 define dso_local i64 @ld_cst_unalign64_uint64_t_uint8_t() {
1073 ; CHECK-P10-LABEL: ld_cst_unalign64_uint64_t_uint8_t:
1074 ; CHECK-P10: # %bb.0: # %entry
1075 ; CHECK-P10-NEXT: pli r3, 232
1076 ; CHECK-P10-NEXT: pli r4, 3567587329
1077 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
1078 ; CHECK-P10-NEXT: lbz r3, 0(r4)
1079 ; CHECK-P10-NEXT: blr
1081 ; CHECK-PREP10-LABEL: ld_cst_unalign64_uint64_t_uint8_t:
1082 ; CHECK-PREP10: # %bb.0: # %entry
1083 ; CHECK-PREP10-NEXT: li r3, 29
1084 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
1085 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
1086 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
1087 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
1088 ; CHECK-PREP10-NEXT: blr
1090 %0 = load i8, ptr inttoptr (i64 1000000000001 to ptr), align 1
1091 %conv = zext i8 %0 to i64
1095 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1096 define dso_local i64 @ld_cst_align64_uint64_t_uint8_t() {
1097 ; CHECK-P10-LABEL: ld_cst_align64_uint64_t_uint8_t:
1098 ; CHECK-P10: # %bb.0: # %entry
1099 ; CHECK-P10-NEXT: pli r3, 244140625
1100 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
1101 ; CHECK-P10-NEXT: lbz r3, 0(r3)
1102 ; CHECK-P10-NEXT: blr
1104 ; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_uint8_t:
1105 ; CHECK-PREP10: # %bb.0: # %entry
1106 ; CHECK-PREP10-NEXT: lis r3, 3725
1107 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
1108 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
1109 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
1110 ; CHECK-PREP10-NEXT: blr
1112 %0 = load i8, ptr inttoptr (i64 1000000000000 to ptr), align 4096
1113 %conv = zext i8 %0 to i64
1117 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1118 define dso_local i64 @ld_0_uint64_t_int8_t(i64 %ptr) {
1119 ; CHECK-LABEL: ld_0_uint64_t_int8_t:
1120 ; CHECK: # %bb.0: # %entry
1121 ; CHECK-NEXT: lbz r3, 0(r3)
1122 ; CHECK-NEXT: extsb r3, r3
1125 %0 = inttoptr i64 %ptr to ptr
1126 %1 = load i8, ptr %0, align 1
1127 %conv = sext i8 %1 to i64
1131 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1132 define dso_local i64 @ld_unalign16_uint64_t_int8_t(ptr nocapture readonly %ptr) {
1133 ; CHECK-LABEL: ld_unalign16_uint64_t_int8_t:
1134 ; CHECK: # %bb.0: # %entry
1135 ; CHECK-NEXT: lbz r3, 1(r3)
1136 ; CHECK-NEXT: extsb r3, r3
1139 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1
1140 %0 = load i8, ptr %add.ptr, align 1
1141 %conv = sext i8 %0 to i64
1145 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1146 define dso_local i64 @ld_align16_uint64_t_int8_t(ptr nocapture readonly %ptr) {
1147 ; CHECK-LABEL: ld_align16_uint64_t_int8_t:
1148 ; CHECK: # %bb.0: # %entry
1149 ; CHECK-NEXT: lbz r3, 8(r3)
1150 ; CHECK-NEXT: extsb r3, r3
1153 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
1154 %0 = load i8, ptr %add.ptr, align 1
1155 %conv = sext i8 %0 to i64
1159 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1160 define dso_local i64 @ld_unalign32_uint64_t_int8_t(ptr nocapture readonly %ptr) {
1161 ; CHECK-P10-LABEL: ld_unalign32_uint64_t_int8_t:
1162 ; CHECK-P10: # %bb.0: # %entry
1163 ; CHECK-P10-NEXT: plbz r3, 99999(r3), 0
1164 ; CHECK-P10-NEXT: extsb r3, r3
1165 ; CHECK-P10-NEXT: blr
1167 ; CHECK-PREP10-LABEL: ld_unalign32_uint64_t_int8_t:
1168 ; CHECK-PREP10: # %bb.0: # %entry
1169 ; CHECK-PREP10-NEXT: lis r4, 1
1170 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
1171 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
1172 ; CHECK-PREP10-NEXT: extsb r3, r3
1173 ; CHECK-PREP10-NEXT: blr
1175 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999
1176 %0 = load i8, ptr %add.ptr, align 1
1177 %conv = sext i8 %0 to i64
1181 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1182 define dso_local i64 @ld_align32_uint64_t_int8_t(ptr nocapture readonly %ptr) {
1183 ; CHECK-P10-LABEL: ld_align32_uint64_t_int8_t:
1184 ; CHECK-P10: # %bb.0: # %entry
1185 ; CHECK-P10-NEXT: plbz r3, 99999000(r3), 0
1186 ; CHECK-P10-NEXT: extsb r3, r3
1187 ; CHECK-P10-NEXT: blr
1189 ; CHECK-PREP10-LABEL: ld_align32_uint64_t_int8_t:
1190 ; CHECK-PREP10: # %bb.0: # %entry
1191 ; CHECK-PREP10-NEXT: lis r4, 1525
1192 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
1193 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
1194 ; CHECK-PREP10-NEXT: extsb r3, r3
1195 ; CHECK-PREP10-NEXT: blr
1197 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
1198 %0 = load i8, ptr %add.ptr, align 1
1199 %conv = sext i8 %0 to i64
1203 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1204 define dso_local i64 @ld_unalign64_uint64_t_int8_t(ptr nocapture readonly %ptr) {
1205 ; CHECK-P10-LABEL: ld_unalign64_uint64_t_int8_t:
1206 ; CHECK-P10: # %bb.0: # %entry
1207 ; CHECK-P10-NEXT: pli r4, 232
1208 ; CHECK-P10-NEXT: pli r5, 3567587329
1209 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
1210 ; CHECK-P10-NEXT: lbzx r3, r3, r5
1211 ; CHECK-P10-NEXT: extsb r3, r3
1212 ; CHECK-P10-NEXT: blr
1214 ; CHECK-PREP10-LABEL: ld_unalign64_uint64_t_int8_t:
1215 ; CHECK-PREP10: # %bb.0: # %entry
1216 ; CHECK-PREP10-NEXT: li r4, 29
1217 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
1218 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
1219 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
1220 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
1221 ; CHECK-PREP10-NEXT: extsb r3, r3
1222 ; CHECK-PREP10-NEXT: blr
1224 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000001
1225 %0 = load i8, ptr %add.ptr, align 1
1226 %conv = sext i8 %0 to i64
1230 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1231 define dso_local i64 @ld_align64_uint64_t_int8_t(ptr nocapture readonly %ptr) {
1232 ; CHECK-P10-LABEL: ld_align64_uint64_t_int8_t:
1233 ; CHECK-P10: # %bb.0: # %entry
1234 ; CHECK-P10-NEXT: pli r4, 244140625
1235 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
1236 ; CHECK-P10-NEXT: lbzx r3, r3, r4
1237 ; CHECK-P10-NEXT: extsb r3, r3
1238 ; CHECK-P10-NEXT: blr
1240 ; CHECK-PREP10-LABEL: ld_align64_uint64_t_int8_t:
1241 ; CHECK-PREP10: # %bb.0: # %entry
1242 ; CHECK-PREP10-NEXT: lis r4, 3725
1243 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
1244 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
1245 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
1246 ; CHECK-PREP10-NEXT: extsb r3, r3
1247 ; CHECK-PREP10-NEXT: blr
1249 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
1250 %0 = load i8, ptr %add.ptr, align 1
1251 %conv = sext i8 %0 to i64
1255 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1256 define dso_local i64 @ld_reg_uint64_t_int8_t(ptr nocapture readonly %ptr, i64 %off) {
1257 ; CHECK-LABEL: ld_reg_uint64_t_int8_t:
1258 ; CHECK: # %bb.0: # %entry
1259 ; CHECK-NEXT: lbzx r3, r3, r4
1260 ; CHECK-NEXT: extsb r3, r3
1263 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
1264 %0 = load i8, ptr %add.ptr, align 1
1265 %conv = sext i8 %0 to i64
1269 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1270 define dso_local i64 @ld_or_uint64_t_int8_t(i64 %ptr, i8 zeroext %off) {
1271 ; CHECK-LABEL: ld_or_uint64_t_int8_t:
1272 ; CHECK: # %bb.0: # %entry
1273 ; CHECK-NEXT: or r3, r4, r3
1274 ; CHECK-NEXT: lbz r3, 0(r3)
1275 ; CHECK-NEXT: extsb r3, r3
1278 %conv = zext i8 %off to i64
1279 %or = or i64 %conv, %ptr
1280 %0 = inttoptr i64 %or to ptr
1281 %1 = load i8, ptr %0, align 1
1282 %conv1 = sext i8 %1 to i64
1286 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1287 define dso_local i64 @ld_or2_uint64_t_int8_t(i64 %ptr, i8 zeroext %off) {
1288 ; CHECK-LABEL: ld_or2_uint64_t_int8_t:
1289 ; CHECK: # %bb.0: # %entry
1290 ; CHECK-NEXT: rldicr r3, r3, 0, 51
1291 ; CHECK-NEXT: lbzx r3, r3, r4
1292 ; CHECK-NEXT: extsb r3, r3
1295 %and = and i64 %ptr, -4096
1296 %conv = zext i8 %off to i64
1297 %or = or i64 %and, %conv
1298 %0 = inttoptr i64 %or to ptr
1299 %1 = load i8, ptr %0, align 1
1300 %conv1 = sext i8 %1 to i64
1304 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1305 define dso_local i64 @ld_not_disjoint16_uint64_t_int8_t(i64 %ptr) {
1306 ; CHECK-LABEL: ld_not_disjoint16_uint64_t_int8_t:
1307 ; CHECK: # %bb.0: # %entry
1308 ; CHECK-NEXT: ori r3, r3, 6
1309 ; CHECK-NEXT: lbz r3, 0(r3)
1310 ; CHECK-NEXT: extsb r3, r3
1313 %or = or i64 %ptr, 6
1314 %0 = inttoptr i64 %or to ptr
1315 %1 = load i8, ptr %0, align 1
1316 %conv = sext i8 %1 to i64
1320 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1321 define dso_local i64 @ld_disjoint_unalign16_uint64_t_int8_t(i64 %ptr) {
1322 ; CHECK-LABEL: ld_disjoint_unalign16_uint64_t_int8_t:
1323 ; CHECK: # %bb.0: # %entry
1324 ; CHECK-NEXT: rldicr r3, r3, 0, 51
1325 ; CHECK-NEXT: lbz r3, 6(r3)
1326 ; CHECK-NEXT: extsb r3, r3
1329 %and = and i64 %ptr, -4096
1330 %or = or i64 %and, 6
1331 %0 = inttoptr i64 %or to ptr
1332 %1 = load i8, ptr %0, align 2
1333 %conv = sext i8 %1 to i64
1337 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1338 define dso_local i64 @ld_disjoint_align16_uint64_t_int8_t(i64 %ptr) {
1339 ; CHECK-LABEL: ld_disjoint_align16_uint64_t_int8_t:
1340 ; CHECK: # %bb.0: # %entry
1341 ; CHECK-NEXT: rldicr r3, r3, 0, 51
1342 ; CHECK-NEXT: lbz r3, 24(r3)
1343 ; CHECK-NEXT: extsb r3, r3
1346 %and = and i64 %ptr, -4096
1347 %or = or i64 %and, 24
1348 %0 = inttoptr i64 %or to ptr
1349 %1 = load i8, ptr %0, align 8
1350 %conv = sext i8 %1 to i64
1354 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1355 define dso_local i64 @ld_not_disjoint32_uint64_t_int8_t(i64 %ptr) {
1356 ; CHECK-LABEL: ld_not_disjoint32_uint64_t_int8_t:
1357 ; CHECK: # %bb.0: # %entry
1358 ; CHECK-NEXT: ori r3, r3, 34463
1359 ; CHECK-NEXT: oris r3, r3, 1
1360 ; CHECK-NEXT: lbz r3, 0(r3)
1361 ; CHECK-NEXT: extsb r3, r3
1364 %or = or i64 %ptr, 99999
1365 %0 = inttoptr i64 %or to ptr
1366 %1 = load i8, ptr %0, align 1
1367 %conv = sext i8 %1 to i64
1371 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1372 define dso_local i64 @ld_disjoint_unalign32_uint64_t_int8_t(i64 %ptr) {
1373 ; CHECK-P10-LABEL: ld_disjoint_unalign32_uint64_t_int8_t:
1374 ; CHECK-P10: # %bb.0: # %entry
1375 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
1376 ; CHECK-P10-NEXT: plbz r3, 99999(r3), 0
1377 ; CHECK-P10-NEXT: extsb r3, r3
1378 ; CHECK-P10-NEXT: blr
1380 ; CHECK-PREP10-LABEL: ld_disjoint_unalign32_uint64_t_int8_t:
1381 ; CHECK-PREP10: # %bb.0: # %entry
1382 ; CHECK-PREP10-NEXT: lis r4, 1
1383 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
1384 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
1385 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
1386 ; CHECK-PREP10-NEXT: extsb r3, r3
1387 ; CHECK-PREP10-NEXT: blr
1389 %and = and i64 %ptr, -1048576
1390 %or = or i64 %and, 99999
1391 %0 = inttoptr i64 %or to ptr
1392 %1 = load i8, ptr %0, align 1
1393 %conv = sext i8 %1 to i64
1397 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1398 define dso_local i64 @ld_disjoint_align32_uint64_t_int8_t(i64 %ptr) {
1399 ; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_int8_t:
1400 ; CHECK-P10: # %bb.0: # %entry
1401 ; CHECK-P10-NEXT: lis r4, -15264
1402 ; CHECK-P10-NEXT: and r3, r3, r4
1403 ; CHECK-P10-NEXT: plbz r3, 999990000(r3), 0
1404 ; CHECK-P10-NEXT: extsb r3, r3
1405 ; CHECK-P10-NEXT: blr
1407 ; CHECK-PREP10-LABEL: ld_disjoint_align32_uint64_t_int8_t:
1408 ; CHECK-PREP10: # %bb.0: # %entry
1409 ; CHECK-PREP10-NEXT: lis r4, -15264
1410 ; CHECK-PREP10-NEXT: and r3, r3, r4
1411 ; CHECK-PREP10-NEXT: lis r4, 15258
1412 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
1413 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
1414 ; CHECK-PREP10-NEXT: extsb r3, r3
1415 ; CHECK-PREP10-NEXT: blr
1417 %and = and i64 %ptr, -1000341504
1418 %or = or i64 %and, 999990000
1419 %0 = inttoptr i64 %or to ptr
1420 %1 = load i8, ptr %0, align 16
1421 %conv = sext i8 %1 to i64
1425 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1426 define dso_local i64 @ld_not_disjoint64_uint64_t_int8_t(i64 %ptr) {
1427 ; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_int8_t:
1428 ; CHECK-P10: # %bb.0: # %entry
1429 ; CHECK-P10-NEXT: pli r4, 232
1430 ; CHECK-P10-NEXT: pli r5, 3567587329
1431 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
1432 ; CHECK-P10-NEXT: or r3, r3, r5
1433 ; CHECK-P10-NEXT: lbz r3, 0(r3)
1434 ; CHECK-P10-NEXT: extsb r3, r3
1435 ; CHECK-P10-NEXT: blr
1437 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_int8_t:
1438 ; CHECK-PREP10: # %bb.0: # %entry
1439 ; CHECK-PREP10-NEXT: li r4, 29
1440 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
1441 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
1442 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
1443 ; CHECK-PREP10-NEXT: or r3, r3, r4
1444 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
1445 ; CHECK-PREP10-NEXT: extsb r3, r3
1446 ; CHECK-PREP10-NEXT: blr
1448 %or = or i64 %ptr, 1000000000001
1449 %0 = inttoptr i64 %or to ptr
1450 %1 = load i8, ptr %0, align 1
1451 %conv = sext i8 %1 to i64
1455 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1456 define dso_local i64 @ld_disjoint_unalign64_uint64_t_int8_t(i64 %ptr) {
1457 ; CHECK-P10-LABEL: ld_disjoint_unalign64_uint64_t_int8_t:
1458 ; CHECK-P10: # %bb.0: # %entry
1459 ; CHECK-P10-NEXT: pli r4, 232
1460 ; CHECK-P10-NEXT: pli r5, 3567587329
1461 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
1462 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
1463 ; CHECK-P10-NEXT: lbzx r3, r3, r5
1464 ; CHECK-P10-NEXT: extsb r3, r3
1465 ; CHECK-P10-NEXT: blr
1467 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint64_t_int8_t:
1468 ; CHECK-PREP10: # %bb.0: # %entry
1469 ; CHECK-PREP10-NEXT: li r4, 29
1470 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
1471 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
1472 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
1473 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
1474 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
1475 ; CHECK-PREP10-NEXT: extsb r3, r3
1476 ; CHECK-PREP10-NEXT: blr
1478 %and = and i64 %ptr, -1099511627776
1479 %or = or i64 %and, 1000000000001
1480 %0 = inttoptr i64 %or to ptr
1481 %1 = load i8, ptr %0, align 1
1482 %conv = sext i8 %1 to i64
1486 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1487 define dso_local i64 @ld_disjoint_align64_uint64_t_int8_t(i64 %ptr) {
1488 ; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_int8_t:
1489 ; CHECK-P10: # %bb.0: # %entry
1490 ; CHECK-P10-NEXT: pli r4, 244140625
1491 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
1492 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
1493 ; CHECK-P10-NEXT: lbzx r3, r3, r4
1494 ; CHECK-P10-NEXT: extsb r3, r3
1495 ; CHECK-P10-NEXT: blr
1497 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_int8_t:
1498 ; CHECK-PREP10: # %bb.0: # %entry
1499 ; CHECK-PREP10-NEXT: lis r4, 3725
1500 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
1501 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
1502 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
1503 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
1504 ; CHECK-PREP10-NEXT: extsb r3, r3
1505 ; CHECK-PREP10-NEXT: blr
1507 %and = and i64 %ptr, -1099511627776
1508 %or = or i64 %and, 1000000000000
1509 %0 = inttoptr i64 %or to ptr
1510 %1 = load i8, ptr %0, align 4096
1511 %conv = sext i8 %1 to i64
1515 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1516 define dso_local i64 @ld_cst_unalign16_uint64_t_int8_t() {
1517 ; CHECK-LABEL: ld_cst_unalign16_uint64_t_int8_t:
1518 ; CHECK: # %bb.0: # %entry
1519 ; CHECK-NEXT: lbz r3, 255(0)
1520 ; CHECK-NEXT: extsb r3, r3
1523 %0 = load i8, ptr inttoptr (i64 255 to ptr), align 1
1524 %conv = sext i8 %0 to i64
1528 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1529 define dso_local i64 @ld_cst_align16_uint64_t_int8_t() {
1530 ; CHECK-LABEL: ld_cst_align16_uint64_t_int8_t:
1531 ; CHECK: # %bb.0: # %entry
1532 ; CHECK-NEXT: lbz r3, 4080(0)
1533 ; CHECK-NEXT: extsb r3, r3
1536 %0 = load i8, ptr inttoptr (i64 4080 to ptr), align 16
1537 %conv = sext i8 %0 to i64
1541 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1542 define dso_local i64 @ld_cst_unalign32_uint64_t_int8_t() {
1543 ; CHECK-LABEL: ld_cst_unalign32_uint64_t_int8_t:
1544 ; CHECK: # %bb.0: # %entry
1545 ; CHECK-NEXT: lis r3, 2
1546 ; CHECK-NEXT: lbz r3, -31073(r3)
1547 ; CHECK-NEXT: extsb r3, r3
1550 %0 = load i8, ptr inttoptr (i64 99999 to ptr), align 1
1551 %conv = sext i8 %0 to i64
1555 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1556 define dso_local i64 @ld_cst_align32_uint64_t_int8_t() {
1557 ; CHECK-LABEL: ld_cst_align32_uint64_t_int8_t:
1558 ; CHECK: # %bb.0: # %entry
1559 ; CHECK-NEXT: lis r3, 153
1560 ; CHECK-NEXT: lbz r3, -27108(r3)
1561 ; CHECK-NEXT: extsb r3, r3
1564 %0 = load i8, ptr inttoptr (i64 9999900 to ptr), align 4
1565 %conv = sext i8 %0 to i64
1569 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1570 define dso_local i64 @ld_cst_unalign64_uint64_t_int8_t() {
1571 ; CHECK-P10-LABEL: ld_cst_unalign64_uint64_t_int8_t:
1572 ; CHECK-P10: # %bb.0: # %entry
1573 ; CHECK-P10-NEXT: pli r3, 232
1574 ; CHECK-P10-NEXT: pli r4, 3567587329
1575 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
1576 ; CHECK-P10-NEXT: lbz r3, 0(r4)
1577 ; CHECK-P10-NEXT: extsb r3, r3
1578 ; CHECK-P10-NEXT: blr
1580 ; CHECK-PREP10-LABEL: ld_cst_unalign64_uint64_t_int8_t:
1581 ; CHECK-PREP10: # %bb.0: # %entry
1582 ; CHECK-PREP10-NEXT: li r3, 29
1583 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
1584 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
1585 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
1586 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
1587 ; CHECK-PREP10-NEXT: extsb r3, r3
1588 ; CHECK-PREP10-NEXT: blr
1590 %0 = load i8, ptr inttoptr (i64 1000000000001 to ptr), align 1
1591 %conv = sext i8 %0 to i64
1595 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1596 define dso_local i64 @ld_cst_align64_uint64_t_int8_t() {
1597 ; CHECK-P10-LABEL: ld_cst_align64_uint64_t_int8_t:
1598 ; CHECK-P10: # %bb.0: # %entry
1599 ; CHECK-P10-NEXT: pli r3, 244140625
1600 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
1601 ; CHECK-P10-NEXT: lbz r3, 0(r3)
1602 ; CHECK-P10-NEXT: extsb r3, r3
1603 ; CHECK-P10-NEXT: blr
1605 ; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_int8_t:
1606 ; CHECK-PREP10: # %bb.0: # %entry
1607 ; CHECK-PREP10-NEXT: lis r3, 3725
1608 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
1609 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
1610 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
1611 ; CHECK-PREP10-NEXT: extsb r3, r3
1612 ; CHECK-PREP10-NEXT: blr
1614 %0 = load i8, ptr inttoptr (i64 1000000000000 to ptr), align 4096
1615 %conv = sext i8 %0 to i64
1619 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1620 define dso_local i64 @ld_0_uint64_t_uint16_t(i64 %ptr) {
1621 ; CHECK-LABEL: ld_0_uint64_t_uint16_t:
1622 ; CHECK: # %bb.0: # %entry
1623 ; CHECK-NEXT: lhz r3, 0(r3)
1626 %0 = inttoptr i64 %ptr to ptr
1627 %1 = load i16, ptr %0, align 2
1628 %conv = zext i16 %1 to i64
1632 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1633 define dso_local i64 @ld_unalign16_uint64_t_uint16_t(ptr nocapture readonly %ptr) {
1634 ; CHECK-LABEL: ld_unalign16_uint64_t_uint16_t:
1635 ; CHECK: # %bb.0: # %entry
1636 ; CHECK-NEXT: lhz r3, 1(r3)
1639 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1
1640 %0 = load i16, ptr %add.ptr, align 2
1641 %conv = zext i16 %0 to i64
1645 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1646 define dso_local i64 @ld_align16_uint64_t_uint16_t(ptr nocapture readonly %ptr) {
1647 ; CHECK-LABEL: ld_align16_uint64_t_uint16_t:
1648 ; CHECK: # %bb.0: # %entry
1649 ; CHECK-NEXT: lhz r3, 8(r3)
1652 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
1653 %0 = load i16, ptr %add.ptr, align 2
1654 %conv = zext i16 %0 to i64
1658 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1659 define dso_local i64 @ld_unalign32_uint64_t_uint16_t(ptr nocapture readonly %ptr) {
1660 ; CHECK-P10-LABEL: ld_unalign32_uint64_t_uint16_t:
1661 ; CHECK-P10: # %bb.0: # %entry
1662 ; CHECK-P10-NEXT: plhz r3, 99999(r3), 0
1663 ; CHECK-P10-NEXT: blr
1665 ; CHECK-PREP10-LABEL: ld_unalign32_uint64_t_uint16_t:
1666 ; CHECK-PREP10: # %bb.0: # %entry
1667 ; CHECK-PREP10-NEXT: lis r4, 1
1668 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
1669 ; CHECK-PREP10-NEXT: lhzx r3, r3, r4
1670 ; CHECK-PREP10-NEXT: blr
1672 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999
1673 %0 = load i16, ptr %add.ptr, align 2
1674 %conv = zext i16 %0 to i64
1678 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1679 define dso_local i64 @ld_align32_uint64_t_uint16_t(ptr nocapture readonly %ptr) {
1680 ; CHECK-P10-LABEL: ld_align32_uint64_t_uint16_t:
1681 ; CHECK-P10: # %bb.0: # %entry
1682 ; CHECK-P10-NEXT: plhz r3, 99999000(r3), 0
1683 ; CHECK-P10-NEXT: blr
1685 ; CHECK-PREP10-LABEL: ld_align32_uint64_t_uint16_t:
1686 ; CHECK-PREP10: # %bb.0: # %entry
1687 ; CHECK-PREP10-NEXT: lis r4, 1525
1688 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
1689 ; CHECK-PREP10-NEXT: lhzx r3, r3, r4
1690 ; CHECK-PREP10-NEXT: blr
1692 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
1693 %0 = load i16, ptr %add.ptr, align 2
1694 %conv = zext i16 %0 to i64
1698 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1699 define dso_local i64 @ld_unalign64_uint64_t_uint16_t(ptr nocapture readonly %ptr) {
1700 ; CHECK-P10-LABEL: ld_unalign64_uint64_t_uint16_t:
1701 ; CHECK-P10: # %bb.0: # %entry
1702 ; CHECK-P10-NEXT: pli r4, 232
1703 ; CHECK-P10-NEXT: pli r5, 3567587329
1704 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
1705 ; CHECK-P10-NEXT: lhzx r3, r3, r5
1706 ; CHECK-P10-NEXT: blr
1708 ; CHECK-PREP10-LABEL: ld_unalign64_uint64_t_uint16_t:
1709 ; CHECK-PREP10: # %bb.0: # %entry
1710 ; CHECK-PREP10-NEXT: li r4, 29
1711 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
1712 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
1713 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
1714 ; CHECK-PREP10-NEXT: lhzx r3, r3, r4
1715 ; CHECK-PREP10-NEXT: blr
1717 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000001
1718 %0 = load i16, ptr %add.ptr, align 2
1719 %conv = zext i16 %0 to i64
1723 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1724 define dso_local i64 @ld_align64_uint64_t_uint16_t(ptr nocapture readonly %ptr) {
1725 ; CHECK-P10-LABEL: ld_align64_uint64_t_uint16_t:
1726 ; CHECK-P10: # %bb.0: # %entry
1727 ; CHECK-P10-NEXT: pli r4, 244140625
1728 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
1729 ; CHECK-P10-NEXT: lhzx r3, r3, r4
1730 ; CHECK-P10-NEXT: blr
1732 ; CHECK-PREP10-LABEL: ld_align64_uint64_t_uint16_t:
1733 ; CHECK-PREP10: # %bb.0: # %entry
1734 ; CHECK-PREP10-NEXT: lis r4, 3725
1735 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
1736 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
1737 ; CHECK-PREP10-NEXT: lhzx r3, r3, r4
1738 ; CHECK-PREP10-NEXT: blr
1740 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
1741 %0 = load i16, ptr %add.ptr, align 2
1742 %conv = zext i16 %0 to i64
1746 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1747 define dso_local i64 @ld_reg_uint64_t_uint16_t(ptr nocapture readonly %ptr, i64 %off) {
1748 ; CHECK-LABEL: ld_reg_uint64_t_uint16_t:
1749 ; CHECK: # %bb.0: # %entry
1750 ; CHECK-NEXT: lhzx r3, r3, r4
1753 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
1754 %0 = load i16, ptr %add.ptr, align 2
1755 %conv = zext i16 %0 to i64
1759 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1760 define dso_local i64 @ld_or_uint64_t_uint16_t(i64 %ptr, i8 zeroext %off) {
1761 ; CHECK-LABEL: ld_or_uint64_t_uint16_t:
1762 ; CHECK: # %bb.0: # %entry
1763 ; CHECK-NEXT: or r3, r4, r3
1764 ; CHECK-NEXT: lhz r3, 0(r3)
1767 %conv = zext i8 %off to i64
1768 %or = or i64 %conv, %ptr
1769 %0 = inttoptr i64 %or to ptr
1770 %1 = load i16, ptr %0, align 2
1771 %conv1 = zext i16 %1 to i64
1775 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1776 define dso_local i64 @ld_or2_uint64_t_uint16_t(i64 %ptr, i8 zeroext %off) {
1777 ; CHECK-LABEL: ld_or2_uint64_t_uint16_t:
1778 ; CHECK: # %bb.0: # %entry
1779 ; CHECK-NEXT: rldicr r3, r3, 0, 51
1780 ; CHECK-NEXT: lhzx r3, r3, r4
1783 %and = and i64 %ptr, -4096
1784 %conv = zext i8 %off to i64
1785 %or = or i64 %and, %conv
1786 %0 = inttoptr i64 %or to ptr
1787 %1 = load i16, ptr %0, align 2
1788 %conv1 = zext i16 %1 to i64
1792 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1793 define dso_local i64 @ld_not_disjoint16_uint64_t_uint16_t(i64 %ptr) {
1794 ; CHECK-LABEL: ld_not_disjoint16_uint64_t_uint16_t:
1795 ; CHECK: # %bb.0: # %entry
1796 ; CHECK-NEXT: ori r3, r3, 6
1797 ; CHECK-NEXT: lhz r3, 0(r3)
1800 %or = or i64 %ptr, 6
1801 %0 = inttoptr i64 %or to ptr
1802 %1 = load i16, ptr %0, align 2
1803 %conv = zext i16 %1 to i64
1807 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1808 define dso_local i64 @ld_disjoint_unalign16_uint64_t_uint16_t(i64 %ptr) {
1809 ; CHECK-LABEL: ld_disjoint_unalign16_uint64_t_uint16_t:
1810 ; CHECK: # %bb.0: # %entry
1811 ; CHECK-NEXT: rldicr r3, r3, 0, 51
1812 ; CHECK-NEXT: lhz r3, 6(r3)
1815 %and = and i64 %ptr, -4096
1816 %or = or i64 %and, 6
1817 %0 = inttoptr i64 %or to ptr
1818 %1 = load i16, ptr %0, align 2
1819 %conv = zext i16 %1 to i64
1823 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1824 define dso_local i64 @ld_disjoint_align16_uint64_t_uint16_t(i64 %ptr) {
1825 ; CHECK-LABEL: ld_disjoint_align16_uint64_t_uint16_t:
1826 ; CHECK: # %bb.0: # %entry
1827 ; CHECK-NEXT: rldicr r3, r3, 0, 51
1828 ; CHECK-NEXT: lhz r3, 24(r3)
1831 %and = and i64 %ptr, -4096
1832 %or = or i64 %and, 24
1833 %0 = inttoptr i64 %or to ptr
1834 %1 = load i16, ptr %0, align 8
1835 %conv = zext i16 %1 to i64
1839 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1840 define dso_local i64 @ld_not_disjoint32_uint64_t_uint16_t(i64 %ptr) {
1841 ; CHECK-LABEL: ld_not_disjoint32_uint64_t_uint16_t:
1842 ; CHECK: # %bb.0: # %entry
1843 ; CHECK-NEXT: ori r3, r3, 34463
1844 ; CHECK-NEXT: oris r3, r3, 1
1845 ; CHECK-NEXT: lhz r3, 0(r3)
1848 %or = or i64 %ptr, 99999
1849 %0 = inttoptr i64 %or to ptr
1850 %1 = load i16, ptr %0, align 2
1851 %conv = zext i16 %1 to i64
1855 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1856 define dso_local i64 @ld_disjoint_unalign32_uint64_t_uint16_t(i64 %ptr) {
1857 ; CHECK-P10-LABEL: ld_disjoint_unalign32_uint64_t_uint16_t:
1858 ; CHECK-P10: # %bb.0: # %entry
1859 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
1860 ; CHECK-P10-NEXT: plhz r3, 99999(r3), 0
1861 ; CHECK-P10-NEXT: blr
1863 ; CHECK-PREP10-LABEL: ld_disjoint_unalign32_uint64_t_uint16_t:
1864 ; CHECK-PREP10: # %bb.0: # %entry
1865 ; CHECK-PREP10-NEXT: lis r4, 1
1866 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
1867 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
1868 ; CHECK-PREP10-NEXT: lhzx r3, r3, r4
1869 ; CHECK-PREP10-NEXT: blr
1871 %and = and i64 %ptr, -1048576
1872 %or = or i64 %and, 99999
1873 %0 = inttoptr i64 %or to ptr
1874 %1 = load i16, ptr %0, align 2
1875 %conv = zext i16 %1 to i64
1879 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1880 define dso_local i64 @ld_disjoint_align32_uint64_t_uint16_t(i64 %ptr) {
1881 ; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_uint16_t:
1882 ; CHECK-P10: # %bb.0: # %entry
1883 ; CHECK-P10-NEXT: lis r4, -15264
1884 ; CHECK-P10-NEXT: and r3, r3, r4
1885 ; CHECK-P10-NEXT: plhz r3, 999990000(r3), 0
1886 ; CHECK-P10-NEXT: blr
1888 ; CHECK-PREP10-LABEL: ld_disjoint_align32_uint64_t_uint16_t:
1889 ; CHECK-PREP10: # %bb.0: # %entry
1890 ; CHECK-PREP10-NEXT: lis r4, -15264
1891 ; CHECK-PREP10-NEXT: and r3, r3, r4
1892 ; CHECK-PREP10-NEXT: lis r4, 15258
1893 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
1894 ; CHECK-PREP10-NEXT: lhzx r3, r3, r4
1895 ; CHECK-PREP10-NEXT: blr
1897 %and = and i64 %ptr, -1000341504
1898 %or = or i64 %and, 999990000
1899 %0 = inttoptr i64 %or to ptr
1900 %1 = load i16, ptr %0, align 16
1901 %conv = zext i16 %1 to i64
1905 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1906 define dso_local i64 @ld_not_disjoint64_uint64_t_uint16_t(i64 %ptr) {
1907 ; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_uint16_t:
1908 ; CHECK-P10: # %bb.0: # %entry
1909 ; CHECK-P10-NEXT: pli r4, 232
1910 ; CHECK-P10-NEXT: pli r5, 3567587329
1911 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
1912 ; CHECK-P10-NEXT: or r3, r3, r5
1913 ; CHECK-P10-NEXT: lhz r3, 0(r3)
1914 ; CHECK-P10-NEXT: blr
1916 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_uint16_t:
1917 ; CHECK-PREP10: # %bb.0: # %entry
1918 ; CHECK-PREP10-NEXT: li r4, 29
1919 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
1920 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
1921 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
1922 ; CHECK-PREP10-NEXT: or r3, r3, r4
1923 ; CHECK-PREP10-NEXT: lhz r3, 0(r3)
1924 ; CHECK-PREP10-NEXT: blr
1926 %or = or i64 %ptr, 1000000000001
1927 %0 = inttoptr i64 %or to ptr
1928 %1 = load i16, ptr %0, align 2
1929 %conv = zext i16 %1 to i64
1933 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1934 define dso_local i64 @ld_disjoint_unalign64_uint64_t_uint16_t(i64 %ptr) {
1935 ; CHECK-P10-LABEL: ld_disjoint_unalign64_uint64_t_uint16_t:
1936 ; CHECK-P10: # %bb.0: # %entry
1937 ; CHECK-P10-NEXT: pli r4, 232
1938 ; CHECK-P10-NEXT: pli r5, 3567587329
1939 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
1940 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
1941 ; CHECK-P10-NEXT: lhzx r3, r3, r5
1942 ; CHECK-P10-NEXT: blr
1944 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint64_t_uint16_t:
1945 ; CHECK-PREP10: # %bb.0: # %entry
1946 ; CHECK-PREP10-NEXT: li r4, 29
1947 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
1948 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
1949 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
1950 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
1951 ; CHECK-PREP10-NEXT: lhzx r3, r3, r4
1952 ; CHECK-PREP10-NEXT: blr
1954 %and = and i64 %ptr, -1099511627776
1955 %or = or i64 %and, 1000000000001
1956 %0 = inttoptr i64 %or to ptr
1957 %1 = load i16, ptr %0, align 2
1958 %conv = zext i16 %1 to i64
1962 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1963 define dso_local i64 @ld_disjoint_align64_uint64_t_uint16_t(i64 %ptr) {
1964 ; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_uint16_t:
1965 ; CHECK-P10: # %bb.0: # %entry
1966 ; CHECK-P10-NEXT: pli r4, 244140625
1967 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
1968 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
1969 ; CHECK-P10-NEXT: lhzx r3, r3, r4
1970 ; CHECK-P10-NEXT: blr
1972 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_uint16_t:
1973 ; CHECK-PREP10: # %bb.0: # %entry
1974 ; CHECK-PREP10-NEXT: lis r4, 3725
1975 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
1976 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
1977 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
1978 ; CHECK-PREP10-NEXT: lhzx r3, r3, r4
1979 ; CHECK-PREP10-NEXT: blr
1981 %and = and i64 %ptr, -1099511627776
1982 %or = or i64 %and, 1000000000000
1983 %0 = inttoptr i64 %or to ptr
1984 %1 = load i16, ptr %0, align 4096
1985 %conv = zext i16 %1 to i64
1989 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1990 define dso_local i64 @ld_cst_unalign16_uint64_t_uint16_t() {
1991 ; CHECK-LABEL: ld_cst_unalign16_uint64_t_uint16_t:
1992 ; CHECK: # %bb.0: # %entry
1993 ; CHECK-NEXT: lhz r3, 255(0)
1996 %0 = load i16, ptr inttoptr (i64 255 to ptr), align 2
1997 %conv = zext i16 %0 to i64
2001 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2002 define dso_local i64 @ld_cst_align16_uint64_t_uint16_t() {
2003 ; CHECK-LABEL: ld_cst_align16_uint64_t_uint16_t:
2004 ; CHECK: # %bb.0: # %entry
2005 ; CHECK-NEXT: lhz r3, 4080(0)
2008 %0 = load i16, ptr inttoptr (i64 4080 to ptr), align 16
2009 %conv = zext i16 %0 to i64
2013 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2014 define dso_local i64 @ld_cst_unalign32_uint64_t_uint16_t() {
2015 ; CHECK-LABEL: ld_cst_unalign32_uint64_t_uint16_t:
2016 ; CHECK: # %bb.0: # %entry
2017 ; CHECK-NEXT: lis r3, 2
2018 ; CHECK-NEXT: lhz r3, -31073(r3)
2021 %0 = load i16, ptr inttoptr (i64 99999 to ptr), align 2
2022 %conv = zext i16 %0 to i64
2026 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2027 define dso_local i64 @ld_cst_align32_uint64_t_uint16_t() {
2028 ; CHECK-LABEL: ld_cst_align32_uint64_t_uint16_t:
2029 ; CHECK: # %bb.0: # %entry
2030 ; CHECK-NEXT: lis r3, 153
2031 ; CHECK-NEXT: lhz r3, -27108(r3)
2034 %0 = load i16, ptr inttoptr (i64 9999900 to ptr), align 4
2035 %conv = zext i16 %0 to i64
2039 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2040 define dso_local i64 @ld_cst_unalign64_uint64_t_uint16_t() {
2041 ; CHECK-P10-LABEL: ld_cst_unalign64_uint64_t_uint16_t:
2042 ; CHECK-P10: # %bb.0: # %entry
2043 ; CHECK-P10-NEXT: pli r3, 232
2044 ; CHECK-P10-NEXT: pli r4, 3567587329
2045 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
2046 ; CHECK-P10-NEXT: lhz r3, 0(r4)
2047 ; CHECK-P10-NEXT: blr
2049 ; CHECK-PREP10-LABEL: ld_cst_unalign64_uint64_t_uint16_t:
2050 ; CHECK-PREP10: # %bb.0: # %entry
2051 ; CHECK-PREP10-NEXT: li r3, 29
2052 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
2053 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
2054 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
2055 ; CHECK-PREP10-NEXT: lhz r3, 0(r3)
2056 ; CHECK-PREP10-NEXT: blr
2058 %0 = load i16, ptr inttoptr (i64 1000000000001 to ptr), align 2
2059 %conv = zext i16 %0 to i64
2063 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2064 define dso_local i64 @ld_cst_align64_uint64_t_uint16_t() {
2065 ; CHECK-P10-LABEL: ld_cst_align64_uint64_t_uint16_t:
2066 ; CHECK-P10: # %bb.0: # %entry
2067 ; CHECK-P10-NEXT: pli r3, 244140625
2068 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
2069 ; CHECK-P10-NEXT: lhz r3, 0(r3)
2070 ; CHECK-P10-NEXT: blr
2072 ; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_uint16_t:
2073 ; CHECK-PREP10: # %bb.0: # %entry
2074 ; CHECK-PREP10-NEXT: lis r3, 3725
2075 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
2076 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
2077 ; CHECK-PREP10-NEXT: lhz r3, 0(r3)
2078 ; CHECK-PREP10-NEXT: blr
2080 %0 = load i16, ptr inttoptr (i64 1000000000000 to ptr), align 4096
2081 %conv = zext i16 %0 to i64
2085 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2086 define dso_local i64 @ld_0_uint64_t_int16_t(i64 %ptr) {
2087 ; CHECK-LABEL: ld_0_uint64_t_int16_t:
2088 ; CHECK: # %bb.0: # %entry
2089 ; CHECK-NEXT: lha r3, 0(r3)
2092 %0 = inttoptr i64 %ptr to ptr
2093 %1 = load i16, ptr %0, align 2
2094 %conv = sext i16 %1 to i64
2098 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2099 define dso_local i64 @ld_unalign16_uint64_t_int16_t(ptr nocapture readonly %ptr) {
2100 ; CHECK-LABEL: ld_unalign16_uint64_t_int16_t:
2101 ; CHECK: # %bb.0: # %entry
2102 ; CHECK-NEXT: lha r3, 1(r3)
2105 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1
2106 %0 = load i16, ptr %add.ptr, align 2
2107 %conv = sext i16 %0 to i64
2111 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2112 define dso_local i64 @ld_align16_uint64_t_int16_t(ptr nocapture readonly %ptr) {
2113 ; CHECK-LABEL: ld_align16_uint64_t_int16_t:
2114 ; CHECK: # %bb.0: # %entry
2115 ; CHECK-NEXT: lha r3, 8(r3)
2118 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
2119 %0 = load i16, ptr %add.ptr, align 2
2120 %conv = sext i16 %0 to i64
2124 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2125 define dso_local i64 @ld_unalign32_uint64_t_int16_t(ptr nocapture readonly %ptr) {
2126 ; CHECK-P10-LABEL: ld_unalign32_uint64_t_int16_t:
2127 ; CHECK-P10: # %bb.0: # %entry
2128 ; CHECK-P10-NEXT: plha r3, 99999(r3), 0
2129 ; CHECK-P10-NEXT: blr
2131 ; CHECK-PREP10-LABEL: ld_unalign32_uint64_t_int16_t:
2132 ; CHECK-PREP10: # %bb.0: # %entry
2133 ; CHECK-PREP10-NEXT: lis r4, 1
2134 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
2135 ; CHECK-PREP10-NEXT: lhax r3, r3, r4
2136 ; CHECK-PREP10-NEXT: blr
2138 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999
2139 %0 = load i16, ptr %add.ptr, align 2
2140 %conv = sext i16 %0 to i64
2144 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2145 define dso_local i64 @ld_align32_uint64_t_int16_t(ptr nocapture readonly %ptr) {
2146 ; CHECK-P10-LABEL: ld_align32_uint64_t_int16_t:
2147 ; CHECK-P10: # %bb.0: # %entry
2148 ; CHECK-P10-NEXT: plha r3, 99999000(r3), 0
2149 ; CHECK-P10-NEXT: blr
2151 ; CHECK-PREP10-LABEL: ld_align32_uint64_t_int16_t:
2152 ; CHECK-PREP10: # %bb.0: # %entry
2153 ; CHECK-PREP10-NEXT: lis r4, 1525
2154 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
2155 ; CHECK-PREP10-NEXT: lhax r3, r3, r4
2156 ; CHECK-PREP10-NEXT: blr
2158 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
2159 %0 = load i16, ptr %add.ptr, align 2
2160 %conv = sext i16 %0 to i64
2164 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2165 define dso_local i64 @ld_unalign64_uint64_t_int16_t(ptr nocapture readonly %ptr) {
2166 ; CHECK-P10-LABEL: ld_unalign64_uint64_t_int16_t:
2167 ; CHECK-P10: # %bb.0: # %entry
2168 ; CHECK-P10-NEXT: pli r4, 232
2169 ; CHECK-P10-NEXT: pli r5, 3567587329
2170 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2171 ; CHECK-P10-NEXT: lhax r3, r3, r5
2172 ; CHECK-P10-NEXT: blr
2174 ; CHECK-PREP10-LABEL: ld_unalign64_uint64_t_int16_t:
2175 ; CHECK-PREP10: # %bb.0: # %entry
2176 ; CHECK-PREP10-NEXT: li r4, 29
2177 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2178 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2179 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2180 ; CHECK-PREP10-NEXT: lhax r3, r3, r4
2181 ; CHECK-PREP10-NEXT: blr
2183 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000001
2184 %0 = load i16, ptr %add.ptr, align 2
2185 %conv = sext i16 %0 to i64
2189 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2190 define dso_local i64 @ld_align64_uint64_t_int16_t(ptr nocapture readonly %ptr) {
2191 ; CHECK-P10-LABEL: ld_align64_uint64_t_int16_t:
2192 ; CHECK-P10: # %bb.0: # %entry
2193 ; CHECK-P10-NEXT: pli r4, 244140625
2194 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2195 ; CHECK-P10-NEXT: lhax r3, r3, r4
2196 ; CHECK-P10-NEXT: blr
2198 ; CHECK-PREP10-LABEL: ld_align64_uint64_t_int16_t:
2199 ; CHECK-PREP10: # %bb.0: # %entry
2200 ; CHECK-PREP10-NEXT: lis r4, 3725
2201 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2202 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2203 ; CHECK-PREP10-NEXT: lhax r3, r3, r4
2204 ; CHECK-PREP10-NEXT: blr
2206 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
2207 %0 = load i16, ptr %add.ptr, align 2
2208 %conv = sext i16 %0 to i64
2212 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2213 define dso_local i64 @ld_reg_uint64_t_int16_t(ptr nocapture readonly %ptr, i64 %off) {
2214 ; CHECK-LABEL: ld_reg_uint64_t_int16_t:
2215 ; CHECK: # %bb.0: # %entry
2216 ; CHECK-NEXT: lhax r3, r3, r4
2219 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
2220 %0 = load i16, ptr %add.ptr, align 2
2221 %conv = sext i16 %0 to i64
2225 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2226 define dso_local i64 @ld_or_uint64_t_int16_t(i64 %ptr, i8 zeroext %off) {
2227 ; CHECK-LABEL: ld_or_uint64_t_int16_t:
2228 ; CHECK: # %bb.0: # %entry
2229 ; CHECK-NEXT: or r3, r4, r3
2230 ; CHECK-NEXT: lha r3, 0(r3)
2233 %conv = zext i8 %off to i64
2234 %or = or i64 %conv, %ptr
2235 %0 = inttoptr i64 %or to ptr
2236 %1 = load i16, ptr %0, align 2
2237 %conv1 = sext i16 %1 to i64
2241 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2242 define dso_local i64 @ld_or2_uint64_t_int16_t(i64 %ptr, i8 zeroext %off) {
2243 ; CHECK-LABEL: ld_or2_uint64_t_int16_t:
2244 ; CHECK: # %bb.0: # %entry
2245 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2246 ; CHECK-NEXT: lhax r3, r3, r4
2249 %and = and i64 %ptr, -4096
2250 %conv = zext i8 %off to i64
2251 %or = or i64 %and, %conv
2252 %0 = inttoptr i64 %or to ptr
2253 %1 = load i16, ptr %0, align 2
2254 %conv1 = sext i16 %1 to i64
2258 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2259 define dso_local i64 @ld_not_disjoint16_uint64_t_int16_t(i64 %ptr) {
2260 ; CHECK-LABEL: ld_not_disjoint16_uint64_t_int16_t:
2261 ; CHECK: # %bb.0: # %entry
2262 ; CHECK-NEXT: ori r3, r3, 6
2263 ; CHECK-NEXT: lha r3, 0(r3)
2266 %or = or i64 %ptr, 6
2267 %0 = inttoptr i64 %or to ptr
2268 %1 = load i16, ptr %0, align 2
2269 %conv = sext i16 %1 to i64
2273 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2274 define dso_local i64 @ld_disjoint_unalign16_uint64_t_int16_t(i64 %ptr) {
2275 ; CHECK-LABEL: ld_disjoint_unalign16_uint64_t_int16_t:
2276 ; CHECK: # %bb.0: # %entry
2277 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2278 ; CHECK-NEXT: lha r3, 6(r3)
2281 %and = and i64 %ptr, -4096
2282 %or = or i64 %and, 6
2283 %0 = inttoptr i64 %or to ptr
2284 %1 = load i16, ptr %0, align 2
2285 %conv = sext i16 %1 to i64
2289 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2290 define dso_local i64 @ld_disjoint_align16_uint64_t_int16_t(i64 %ptr) {
2291 ; CHECK-LABEL: ld_disjoint_align16_uint64_t_int16_t:
2292 ; CHECK: # %bb.0: # %entry
2293 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2294 ; CHECK-NEXT: lha r3, 24(r3)
2297 %and = and i64 %ptr, -4096
2298 %or = or i64 %and, 24
2299 %0 = inttoptr i64 %or to ptr
2300 %1 = load i16, ptr %0, align 8
2301 %conv = sext i16 %1 to i64
2305 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2306 define dso_local i64 @ld_not_disjoint32_uint64_t_int16_t(i64 %ptr) {
2307 ; CHECK-LABEL: ld_not_disjoint32_uint64_t_int16_t:
2308 ; CHECK: # %bb.0: # %entry
2309 ; CHECK-NEXT: ori r3, r3, 34463
2310 ; CHECK-NEXT: oris r3, r3, 1
2311 ; CHECK-NEXT: lha r3, 0(r3)
2314 %or = or i64 %ptr, 99999
2315 %0 = inttoptr i64 %or to ptr
2316 %1 = load i16, ptr %0, align 2
2317 %conv = sext i16 %1 to i64
2321 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2322 define dso_local i64 @ld_disjoint_unalign32_uint64_t_int16_t(i64 %ptr) {
2323 ; CHECK-P10-LABEL: ld_disjoint_unalign32_uint64_t_int16_t:
2324 ; CHECK-P10: # %bb.0: # %entry
2325 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
2326 ; CHECK-P10-NEXT: plha r3, 99999(r3), 0
2327 ; CHECK-P10-NEXT: blr
2329 ; CHECK-PREP10-LABEL: ld_disjoint_unalign32_uint64_t_int16_t:
2330 ; CHECK-PREP10: # %bb.0: # %entry
2331 ; CHECK-PREP10-NEXT: lis r4, 1
2332 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
2333 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
2334 ; CHECK-PREP10-NEXT: lhax r3, r3, r4
2335 ; CHECK-PREP10-NEXT: blr
2337 %and = and i64 %ptr, -1048576
2338 %or = or i64 %and, 99999
2339 %0 = inttoptr i64 %or to ptr
2340 %1 = load i16, ptr %0, align 2
2341 %conv = sext i16 %1 to i64
2345 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2346 define dso_local i64 @ld_disjoint_align32_uint64_t_int16_t(i64 %ptr) {
2347 ; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_int16_t:
2348 ; CHECK-P10: # %bb.0: # %entry
2349 ; CHECK-P10-NEXT: lis r4, -15264
2350 ; CHECK-P10-NEXT: and r3, r3, r4
2351 ; CHECK-P10-NEXT: plha r3, 999990000(r3), 0
2352 ; CHECK-P10-NEXT: blr
2354 ; CHECK-PREP10-LABEL: ld_disjoint_align32_uint64_t_int16_t:
2355 ; CHECK-PREP10: # %bb.0: # %entry
2356 ; CHECK-PREP10-NEXT: lis r4, -15264
2357 ; CHECK-PREP10-NEXT: and r3, r3, r4
2358 ; CHECK-PREP10-NEXT: lis r4, 15258
2359 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
2360 ; CHECK-PREP10-NEXT: lhax r3, r3, r4
2361 ; CHECK-PREP10-NEXT: blr
2363 %and = and i64 %ptr, -1000341504
2364 %or = or i64 %and, 999990000
2365 %0 = inttoptr i64 %or to ptr
2366 %1 = load i16, ptr %0, align 16
2367 %conv = sext i16 %1 to i64
2371 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2372 define dso_local i64 @ld_not_disjoint64_uint64_t_int16_t(i64 %ptr) {
2373 ; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_int16_t:
2374 ; CHECK-P10: # %bb.0: # %entry
2375 ; CHECK-P10-NEXT: pli r4, 232
2376 ; CHECK-P10-NEXT: pli r5, 3567587329
2377 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2378 ; CHECK-P10-NEXT: or r3, r3, r5
2379 ; CHECK-P10-NEXT: lha r3, 0(r3)
2380 ; CHECK-P10-NEXT: blr
2382 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_int16_t:
2383 ; CHECK-PREP10: # %bb.0: # %entry
2384 ; CHECK-PREP10-NEXT: li r4, 29
2385 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2386 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2387 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2388 ; CHECK-PREP10-NEXT: or r3, r3, r4
2389 ; CHECK-PREP10-NEXT: lha r3, 0(r3)
2390 ; CHECK-PREP10-NEXT: blr
2392 %or = or i64 %ptr, 1000000000001
2393 %0 = inttoptr i64 %or to ptr
2394 %1 = load i16, ptr %0, align 2
2395 %conv = sext i16 %1 to i64
2399 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2400 define dso_local i64 @ld_disjoint_unalign64_uint64_t_int16_t(i64 %ptr) {
2401 ; CHECK-P10-LABEL: ld_disjoint_unalign64_uint64_t_int16_t:
2402 ; CHECK-P10: # %bb.0: # %entry
2403 ; CHECK-P10-NEXT: pli r4, 232
2404 ; CHECK-P10-NEXT: pli r5, 3567587329
2405 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
2406 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2407 ; CHECK-P10-NEXT: lhax r3, r3, r5
2408 ; CHECK-P10-NEXT: blr
2410 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint64_t_int16_t:
2411 ; CHECK-PREP10: # %bb.0: # %entry
2412 ; CHECK-PREP10-NEXT: li r4, 29
2413 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
2414 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2415 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2416 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2417 ; CHECK-PREP10-NEXT: lhax r3, r3, r4
2418 ; CHECK-PREP10-NEXT: blr
2420 %and = and i64 %ptr, -1099511627776
2421 %or = or i64 %and, 1000000000001
2422 %0 = inttoptr i64 %or to ptr
2423 %1 = load i16, ptr %0, align 2
2424 %conv = sext i16 %1 to i64
2428 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2429 define dso_local i64 @ld_disjoint_align64_uint64_t_int16_t(i64 %ptr) {
2430 ; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_int16_t:
2431 ; CHECK-P10: # %bb.0: # %entry
2432 ; CHECK-P10-NEXT: pli r4, 244140625
2433 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
2434 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2435 ; CHECK-P10-NEXT: lhax r3, r3, r4
2436 ; CHECK-P10-NEXT: blr
2438 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_int16_t:
2439 ; CHECK-PREP10: # %bb.0: # %entry
2440 ; CHECK-PREP10-NEXT: lis r4, 3725
2441 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
2442 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2443 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2444 ; CHECK-PREP10-NEXT: lhax r3, r3, r4
2445 ; CHECK-PREP10-NEXT: blr
2447 %and = and i64 %ptr, -1099511627776
2448 %or = or i64 %and, 1000000000000
2449 %0 = inttoptr i64 %or to ptr
2450 %1 = load i16, ptr %0, align 4096
2451 %conv = sext i16 %1 to i64
2455 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2456 define dso_local i64 @ld_cst_unalign16_uint64_t_int16_t() {
2457 ; CHECK-LABEL: ld_cst_unalign16_uint64_t_int16_t:
2458 ; CHECK: # %bb.0: # %entry
2459 ; CHECK-NEXT: lha r3, 255(0)
2462 %0 = load i16, ptr inttoptr (i64 255 to ptr), align 2
2463 %conv = sext i16 %0 to i64
2467 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2468 define dso_local i64 @ld_cst_align16_uint64_t_int16_t() {
2469 ; CHECK-LABEL: ld_cst_align16_uint64_t_int16_t:
2470 ; CHECK: # %bb.0: # %entry
2471 ; CHECK-NEXT: lha r3, 4080(0)
2474 %0 = load i16, ptr inttoptr (i64 4080 to ptr), align 16
2475 %conv = sext i16 %0 to i64
2479 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2480 define dso_local i64 @ld_cst_unalign32_uint64_t_int16_t() {
2481 ; CHECK-LABEL: ld_cst_unalign32_uint64_t_int16_t:
2482 ; CHECK: # %bb.0: # %entry
2483 ; CHECK-NEXT: lis r3, 2
2484 ; CHECK-NEXT: lha r3, -31073(r3)
2487 %0 = load i16, ptr inttoptr (i64 99999 to ptr), align 2
2488 %conv = sext i16 %0 to i64
2492 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2493 define dso_local i64 @ld_cst_align32_uint64_t_int16_t() {
2494 ; CHECK-LABEL: ld_cst_align32_uint64_t_int16_t:
2495 ; CHECK: # %bb.0: # %entry
2496 ; CHECK-NEXT: lis r3, 153
2497 ; CHECK-NEXT: lha r3, -27108(r3)
2500 %0 = load i16, ptr inttoptr (i64 9999900 to ptr), align 4
2501 %conv = sext i16 %0 to i64
2505 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2506 define dso_local i64 @ld_cst_unalign64_uint64_t_int16_t() {
2507 ; CHECK-P10-LABEL: ld_cst_unalign64_uint64_t_int16_t:
2508 ; CHECK-P10: # %bb.0: # %entry
2509 ; CHECK-P10-NEXT: pli r3, 232
2510 ; CHECK-P10-NEXT: pli r4, 3567587329
2511 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
2512 ; CHECK-P10-NEXT: lha r3, 0(r4)
2513 ; CHECK-P10-NEXT: blr
2515 ; CHECK-PREP10-LABEL: ld_cst_unalign64_uint64_t_int16_t:
2516 ; CHECK-PREP10: # %bb.0: # %entry
2517 ; CHECK-PREP10-NEXT: li r3, 29
2518 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
2519 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
2520 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
2521 ; CHECK-PREP10-NEXT: lha r3, 0(r3)
2522 ; CHECK-PREP10-NEXT: blr
2524 %0 = load i16, ptr inttoptr (i64 1000000000001 to ptr), align 2
2525 %conv = sext i16 %0 to i64
2529 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2530 define dso_local i64 @ld_cst_align64_uint64_t_int16_t() {
2531 ; CHECK-P10-LABEL: ld_cst_align64_uint64_t_int16_t:
2532 ; CHECK-P10: # %bb.0: # %entry
2533 ; CHECK-P10-NEXT: pli r3, 244140625
2534 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
2535 ; CHECK-P10-NEXT: lha r3, 0(r3)
2536 ; CHECK-P10-NEXT: blr
2538 ; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_int16_t:
2539 ; CHECK-PREP10: # %bb.0: # %entry
2540 ; CHECK-PREP10-NEXT: lis r3, 3725
2541 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
2542 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
2543 ; CHECK-PREP10-NEXT: lha r3, 0(r3)
2544 ; CHECK-PREP10-NEXT: blr
2546 %0 = load i16, ptr inttoptr (i64 1000000000000 to ptr), align 4096
2547 %conv = sext i16 %0 to i64
2551 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2552 define dso_local i64 @ld_0_uint64_t_uint32_t(i64 %ptr) {
2553 ; CHECK-LABEL: ld_0_uint64_t_uint32_t:
2554 ; CHECK: # %bb.0: # %entry
2555 ; CHECK-NEXT: lwz r3, 0(r3)
2558 %0 = inttoptr i64 %ptr to ptr
2559 %1 = load i32, ptr %0, align 4
2560 %conv = zext i32 %1 to i64
2564 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2565 define dso_local i64 @ld_unalign16_uint64_t_uint32_t(ptr nocapture readonly %ptr) {
2566 ; CHECK-LABEL: ld_unalign16_uint64_t_uint32_t:
2567 ; CHECK: # %bb.0: # %entry
2568 ; CHECK-NEXT: lwz r3, 1(r3)
2571 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1
2572 %0 = load i32, ptr %add.ptr, align 4
2573 %conv = zext i32 %0 to i64
2577 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2578 define dso_local i64 @ld_align16_uint64_t_uint32_t(ptr nocapture readonly %ptr) {
2579 ; CHECK-LABEL: ld_align16_uint64_t_uint32_t:
2580 ; CHECK: # %bb.0: # %entry
2581 ; CHECK-NEXT: lwz r3, 8(r3)
2584 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
2585 %0 = load i32, ptr %add.ptr, align 4
2586 %conv = zext i32 %0 to i64
2590 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2591 define dso_local i64 @ld_unalign32_uint64_t_uint32_t(ptr nocapture readonly %ptr) {
2592 ; CHECK-P10-LABEL: ld_unalign32_uint64_t_uint32_t:
2593 ; CHECK-P10: # %bb.0: # %entry
2594 ; CHECK-P10-NEXT: plwz r3, 99999(r3), 0
2595 ; CHECK-P10-NEXT: blr
2597 ; CHECK-PREP10-LABEL: ld_unalign32_uint64_t_uint32_t:
2598 ; CHECK-PREP10: # %bb.0: # %entry
2599 ; CHECK-PREP10-NEXT: lis r4, 1
2600 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
2601 ; CHECK-PREP10-NEXT: lwzx r3, r3, r4
2602 ; CHECK-PREP10-NEXT: blr
2604 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999
2605 %0 = load i32, ptr %add.ptr, align 4
2606 %conv = zext i32 %0 to i64
2610 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2611 define dso_local i64 @ld_align32_uint64_t_uint32_t(ptr nocapture readonly %ptr) {
2612 ; CHECK-P10-LABEL: ld_align32_uint64_t_uint32_t:
2613 ; CHECK-P10: # %bb.0: # %entry
2614 ; CHECK-P10-NEXT: plwz r3, 99999000(r3), 0
2615 ; CHECK-P10-NEXT: blr
2617 ; CHECK-PREP10-LABEL: ld_align32_uint64_t_uint32_t:
2618 ; CHECK-PREP10: # %bb.0: # %entry
2619 ; CHECK-PREP10-NEXT: lis r4, 1525
2620 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
2621 ; CHECK-PREP10-NEXT: lwzx r3, r3, r4
2622 ; CHECK-PREP10-NEXT: blr
2624 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
2625 %0 = load i32, ptr %add.ptr, align 4
2626 %conv = zext i32 %0 to i64
2630 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2631 define dso_local i64 @ld_unalign64_uint64_t_uint32_t(ptr nocapture readonly %ptr) {
2632 ; CHECK-P10-LABEL: ld_unalign64_uint64_t_uint32_t:
2633 ; CHECK-P10: # %bb.0: # %entry
2634 ; CHECK-P10-NEXT: pli r4, 232
2635 ; CHECK-P10-NEXT: pli r5, 3567587329
2636 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2637 ; CHECK-P10-NEXT: lwzx r3, r3, r5
2638 ; CHECK-P10-NEXT: blr
2640 ; CHECK-PREP10-LABEL: ld_unalign64_uint64_t_uint32_t:
2641 ; CHECK-PREP10: # %bb.0: # %entry
2642 ; CHECK-PREP10-NEXT: li r4, 29
2643 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2644 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2645 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2646 ; CHECK-PREP10-NEXT: lwzx r3, r3, r4
2647 ; CHECK-PREP10-NEXT: blr
2649 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000001
2650 %0 = load i32, ptr %add.ptr, align 4
2651 %conv = zext i32 %0 to i64
2655 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2656 define dso_local i64 @ld_align64_uint64_t_uint32_t(ptr nocapture readonly %ptr) {
2657 ; CHECK-P10-LABEL: ld_align64_uint64_t_uint32_t:
2658 ; CHECK-P10: # %bb.0: # %entry
2659 ; CHECK-P10-NEXT: pli r4, 244140625
2660 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2661 ; CHECK-P10-NEXT: lwzx r3, r3, r4
2662 ; CHECK-P10-NEXT: blr
2664 ; CHECK-PREP10-LABEL: ld_align64_uint64_t_uint32_t:
2665 ; CHECK-PREP10: # %bb.0: # %entry
2666 ; CHECK-PREP10-NEXT: lis r4, 3725
2667 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2668 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2669 ; CHECK-PREP10-NEXT: lwzx r3, r3, r4
2670 ; CHECK-PREP10-NEXT: blr
2672 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
2673 %0 = load i32, ptr %add.ptr, align 4
2674 %conv = zext i32 %0 to i64
2678 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2679 define dso_local i64 @ld_reg_uint64_t_uint32_t(ptr nocapture readonly %ptr, i64 %off) {
2680 ; CHECK-LABEL: ld_reg_uint64_t_uint32_t:
2681 ; CHECK: # %bb.0: # %entry
2682 ; CHECK-NEXT: lwzx r3, r3, r4
2685 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
2686 %0 = load i32, ptr %add.ptr, align 4
2687 %conv = zext i32 %0 to i64
2691 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2692 define dso_local i64 @ld_or_uint64_t_uint32_t(i64 %ptr, i8 zeroext %off) {
2693 ; CHECK-LABEL: ld_or_uint64_t_uint32_t:
2694 ; CHECK: # %bb.0: # %entry
2695 ; CHECK-NEXT: or r3, r4, r3
2696 ; CHECK-NEXT: lwz r3, 0(r3)
2699 %conv = zext i8 %off to i64
2700 %or = or i64 %conv, %ptr
2701 %0 = inttoptr i64 %or to ptr
2702 %1 = load i32, ptr %0, align 4
2703 %conv1 = zext i32 %1 to i64
2707 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2708 define dso_local i64 @ld_or2_uint64_t_uint32_t(i64 %ptr, i8 zeroext %off) {
2709 ; CHECK-LABEL: ld_or2_uint64_t_uint32_t:
2710 ; CHECK: # %bb.0: # %entry
2711 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2712 ; CHECK-NEXT: lwzx r3, r3, r4
2715 %and = and i64 %ptr, -4096
2716 %conv = zext i8 %off to i64
2717 %or = or i64 %and, %conv
2718 %0 = inttoptr i64 %or to ptr
2719 %1 = load i32, ptr %0, align 4
2720 %conv1 = zext i32 %1 to i64
2724 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2725 define dso_local i64 @ld_not_disjoint16_uint64_t_uint32_t(i64 %ptr) {
2726 ; CHECK-LABEL: ld_not_disjoint16_uint64_t_uint32_t:
2727 ; CHECK: # %bb.0: # %entry
2728 ; CHECK-NEXT: ori r3, r3, 6
2729 ; CHECK-NEXT: lwz r3, 0(r3)
2732 %or = or i64 %ptr, 6
2733 %0 = inttoptr i64 %or to ptr
2734 %1 = load i32, ptr %0, align 4
2735 %conv = zext i32 %1 to i64
2739 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2740 define dso_local i64 @ld_disjoint_unalign16_uint64_t_uint32_t(i64 %ptr) {
2741 ; CHECK-LABEL: ld_disjoint_unalign16_uint64_t_uint32_t:
2742 ; CHECK: # %bb.0: # %entry
2743 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2744 ; CHECK-NEXT: lwz r3, 6(r3)
2747 %and = and i64 %ptr, -4096
2748 %or = or i64 %and, 6
2749 %0 = inttoptr i64 %or to ptr
2750 %1 = load i32, ptr %0, align 4
2751 %conv = zext i32 %1 to i64
2755 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2756 define dso_local i64 @ld_disjoint_align16_uint64_t_uint32_t(i64 %ptr) {
2757 ; CHECK-LABEL: ld_disjoint_align16_uint64_t_uint32_t:
2758 ; CHECK: # %bb.0: # %entry
2759 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2760 ; CHECK-NEXT: lwz r3, 24(r3)
2763 %and = and i64 %ptr, -4096
2764 %or = or i64 %and, 24
2765 %0 = inttoptr i64 %or to ptr
2766 %1 = load i32, ptr %0, align 8
2767 %conv = zext i32 %1 to i64
2771 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2772 define dso_local i64 @ld_not_disjoint32_uint64_t_uint32_t(i64 %ptr) {
2773 ; CHECK-LABEL: ld_not_disjoint32_uint64_t_uint32_t:
2774 ; CHECK: # %bb.0: # %entry
2775 ; CHECK-NEXT: ori r3, r3, 34463
2776 ; CHECK-NEXT: oris r3, r3, 1
2777 ; CHECK-NEXT: lwz r3, 0(r3)
2780 %or = or i64 %ptr, 99999
2781 %0 = inttoptr i64 %or to ptr
2782 %1 = load i32, ptr %0, align 4
2783 %conv = zext i32 %1 to i64
2787 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2788 define dso_local i64 @ld_disjoint_unalign32_uint64_t_uint32_t(i64 %ptr) {
2789 ; CHECK-P10-LABEL: ld_disjoint_unalign32_uint64_t_uint32_t:
2790 ; CHECK-P10: # %bb.0: # %entry
2791 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
2792 ; CHECK-P10-NEXT: plwz r3, 99999(r3), 0
2793 ; CHECK-P10-NEXT: blr
2795 ; CHECK-PREP10-LABEL: ld_disjoint_unalign32_uint64_t_uint32_t:
2796 ; CHECK-PREP10: # %bb.0: # %entry
2797 ; CHECK-PREP10-NEXT: lis r4, 1
2798 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
2799 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
2800 ; CHECK-PREP10-NEXT: lwzx r3, r3, r4
2801 ; CHECK-PREP10-NEXT: blr
2803 %and = and i64 %ptr, -1048576
2804 %or = or i64 %and, 99999
2805 %0 = inttoptr i64 %or to ptr
2806 %1 = load i32, ptr %0, align 4
2807 %conv = zext i32 %1 to i64
2811 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2812 define dso_local i64 @ld_disjoint_align32_uint64_t_uint32_t(i64 %ptr) {
2813 ; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_uint32_t:
2814 ; CHECK-P10: # %bb.0: # %entry
2815 ; CHECK-P10-NEXT: lis r4, -15264
2816 ; CHECK-P10-NEXT: and r3, r3, r4
2817 ; CHECK-P10-NEXT: plwz r3, 999990000(r3), 0
2818 ; CHECK-P10-NEXT: blr
2820 ; CHECK-PREP10-LABEL: ld_disjoint_align32_uint64_t_uint32_t:
2821 ; CHECK-PREP10: # %bb.0: # %entry
2822 ; CHECK-PREP10-NEXT: lis r4, -15264
2823 ; CHECK-PREP10-NEXT: and r3, r3, r4
2824 ; CHECK-PREP10-NEXT: lis r4, 15258
2825 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
2826 ; CHECK-PREP10-NEXT: lwzx r3, r3, r4
2827 ; CHECK-PREP10-NEXT: blr
2829 %and = and i64 %ptr, -1000341504
2830 %or = or i64 %and, 999990000
2831 %0 = inttoptr i64 %or to ptr
2832 %1 = load i32, ptr %0, align 16
2833 %conv = zext i32 %1 to i64
2837 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2838 define dso_local i64 @ld_not_disjoint64_uint64_t_uint32_t(i64 %ptr) {
2839 ; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_uint32_t:
2840 ; CHECK-P10: # %bb.0: # %entry
2841 ; CHECK-P10-NEXT: pli r4, 232
2842 ; CHECK-P10-NEXT: pli r5, 3567587329
2843 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2844 ; CHECK-P10-NEXT: or r3, r3, r5
2845 ; CHECK-P10-NEXT: lwz r3, 0(r3)
2846 ; CHECK-P10-NEXT: blr
2848 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_uint32_t:
2849 ; CHECK-PREP10: # %bb.0: # %entry
2850 ; CHECK-PREP10-NEXT: li r4, 29
2851 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2852 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2853 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2854 ; CHECK-PREP10-NEXT: or r3, r3, r4
2855 ; CHECK-PREP10-NEXT: lwz r3, 0(r3)
2856 ; CHECK-PREP10-NEXT: blr
2858 %or = or i64 %ptr, 1000000000001
2859 %0 = inttoptr i64 %or to ptr
2860 %1 = load i32, ptr %0, align 4
2861 %conv = zext i32 %1 to i64
2865 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2866 define dso_local i64 @ld_disjoint_unalign64_uint64_t_uint32_t(i64 %ptr) {
2867 ; CHECK-P10-LABEL: ld_disjoint_unalign64_uint64_t_uint32_t:
2868 ; CHECK-P10: # %bb.0: # %entry
2869 ; CHECK-P10-NEXT: pli r4, 232
2870 ; CHECK-P10-NEXT: pli r5, 3567587329
2871 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
2872 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2873 ; CHECK-P10-NEXT: lwzx r3, r3, r5
2874 ; CHECK-P10-NEXT: blr
2876 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint64_t_uint32_t:
2877 ; CHECK-PREP10: # %bb.0: # %entry
2878 ; CHECK-PREP10-NEXT: li r4, 29
2879 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
2880 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2881 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2882 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2883 ; CHECK-PREP10-NEXT: lwzx r3, r3, r4
2884 ; CHECK-PREP10-NEXT: blr
2886 %and = and i64 %ptr, -1099511627776
2887 %or = or i64 %and, 1000000000001
2888 %0 = inttoptr i64 %or to ptr
2889 %1 = load i32, ptr %0, align 4
2890 %conv = zext i32 %1 to i64
2894 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2895 define dso_local i64 @ld_disjoint_align64_uint64_t_uint32_t(i64 %ptr) {
2896 ; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_uint32_t:
2897 ; CHECK-P10: # %bb.0: # %entry
2898 ; CHECK-P10-NEXT: pli r4, 244140625
2899 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
2900 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2901 ; CHECK-P10-NEXT: lwzx r3, r3, r4
2902 ; CHECK-P10-NEXT: blr
2904 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_uint32_t:
2905 ; CHECK-PREP10: # %bb.0: # %entry
2906 ; CHECK-PREP10-NEXT: lis r4, 3725
2907 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
2908 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2909 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2910 ; CHECK-PREP10-NEXT: lwzx r3, r3, r4
2911 ; CHECK-PREP10-NEXT: blr
2913 %and = and i64 %ptr, -1099511627776
2914 %or = or i64 %and, 1000000000000
2915 %0 = inttoptr i64 %or to ptr
2916 %1 = load i32, ptr %0, align 4096
2917 %conv = zext i32 %1 to i64
2921 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2922 define dso_local i64 @ld_cst_unalign16_uint64_t_uint32_t() {
2923 ; CHECK-LABEL: ld_cst_unalign16_uint64_t_uint32_t:
2924 ; CHECK: # %bb.0: # %entry
2925 ; CHECK-NEXT: lwz r3, 255(0)
2928 %0 = load i32, ptr inttoptr (i64 255 to ptr), align 4
2929 %conv = zext i32 %0 to i64
2933 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2934 define dso_local i64 @ld_cst_align16_uint64_t_uint32_t() {
2935 ; CHECK-LABEL: ld_cst_align16_uint64_t_uint32_t:
2936 ; CHECK: # %bb.0: # %entry
2937 ; CHECK-NEXT: lwz r3, 4080(0)
2940 %0 = load i32, ptr inttoptr (i64 4080 to ptr), align 16
2941 %conv = zext i32 %0 to i64
2945 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2946 define dso_local i64 @ld_cst_unalign32_uint64_t_uint32_t() {
2947 ; CHECK-LABEL: ld_cst_unalign32_uint64_t_uint32_t:
2948 ; CHECK: # %bb.0: # %entry
2949 ; CHECK-NEXT: lis r3, 2
2950 ; CHECK-NEXT: lwz r3, -31073(r3)
2953 %0 = load i32, ptr inttoptr (i64 99999 to ptr), align 4
2954 %conv = zext i32 %0 to i64
2958 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2959 define dso_local i64 @ld_cst_align32_uint64_t_uint32_t() {
2960 ; CHECK-LABEL: ld_cst_align32_uint64_t_uint32_t:
2961 ; CHECK: # %bb.0: # %entry
2962 ; CHECK-NEXT: lis r3, 153
2963 ; CHECK-NEXT: lwz r3, -27108(r3)
2966 %0 = load i32, ptr inttoptr (i64 9999900 to ptr), align 4
2967 %conv = zext i32 %0 to i64
2971 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2972 define dso_local i64 @ld_cst_unalign64_uint64_t_uint32_t() {
2973 ; CHECK-P10-LABEL: ld_cst_unalign64_uint64_t_uint32_t:
2974 ; CHECK-P10: # %bb.0: # %entry
2975 ; CHECK-P10-NEXT: pli r3, 232
2976 ; CHECK-P10-NEXT: pli r4, 3567587329
2977 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
2978 ; CHECK-P10-NEXT: lwz r3, 0(r4)
2979 ; CHECK-P10-NEXT: blr
2981 ; CHECK-PREP10-LABEL: ld_cst_unalign64_uint64_t_uint32_t:
2982 ; CHECK-PREP10: # %bb.0: # %entry
2983 ; CHECK-PREP10-NEXT: li r3, 29
2984 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
2985 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
2986 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
2987 ; CHECK-PREP10-NEXT: lwz r3, 0(r3)
2988 ; CHECK-PREP10-NEXT: blr
2990 %0 = load i32, ptr inttoptr (i64 1000000000001 to ptr), align 4
2991 %conv = zext i32 %0 to i64
2995 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2996 define dso_local i64 @ld_cst_align64_uint64_t_uint32_t() {
2997 ; CHECK-P10-LABEL: ld_cst_align64_uint64_t_uint32_t:
2998 ; CHECK-P10: # %bb.0: # %entry
2999 ; CHECK-P10-NEXT: pli r3, 244140625
3000 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
3001 ; CHECK-P10-NEXT: lwz r3, 0(r3)
3002 ; CHECK-P10-NEXT: blr
3004 ; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_uint32_t:
3005 ; CHECK-PREP10: # %bb.0: # %entry
3006 ; CHECK-PREP10-NEXT: lis r3, 3725
3007 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
3008 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
3009 ; CHECK-PREP10-NEXT: lwz r3, 0(r3)
3010 ; CHECK-PREP10-NEXT: blr
3012 %0 = load i32, ptr inttoptr (i64 1000000000000 to ptr), align 4096
3013 %conv = zext i32 %0 to i64
3017 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3018 define dso_local i64 @ld_0_uint64_t_int32_t(i64 %ptr) {
3019 ; CHECK-LABEL: ld_0_uint64_t_int32_t:
3020 ; CHECK: # %bb.0: # %entry
3021 ; CHECK-NEXT: lwa r3, 0(r3)
3024 %0 = inttoptr i64 %ptr to ptr
3025 %1 = load i32, ptr %0, align 4
3026 %conv = sext i32 %1 to i64
3030 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3031 define dso_local i64 @ld_unalign16_uint64_t_int32_t(ptr nocapture readonly %ptr) {
3032 ; CHECK-P10-LABEL: ld_unalign16_uint64_t_int32_t:
3033 ; CHECK-P10: # %bb.0: # %entry
3034 ; CHECK-P10-NEXT: plwa r3, 1(r3), 0
3035 ; CHECK-P10-NEXT: blr
3037 ; CHECK-PREP10-LABEL: ld_unalign16_uint64_t_int32_t:
3038 ; CHECK-PREP10: # %bb.0: # %entry
3039 ; CHECK-PREP10-NEXT: li r4, 1
3040 ; CHECK-PREP10-NEXT: lwax r3, r3, r4
3041 ; CHECK-PREP10-NEXT: blr
3043 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1
3044 %0 = load i32, ptr %add.ptr, align 4
3045 %conv = sext i32 %0 to i64
3049 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3050 define dso_local i64 @ld_align16_uint64_t_int32_t(ptr nocapture readonly %ptr) {
3051 ; CHECK-LABEL: ld_align16_uint64_t_int32_t:
3052 ; CHECK: # %bb.0: # %entry
3053 ; CHECK-NEXT: lwa r3, 8(r3)
3056 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
3057 %0 = load i32, ptr %add.ptr, align 4
3058 %conv = sext i32 %0 to i64
3062 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3063 define dso_local i64 @ld_unalign32_uint64_t_int32_t(ptr nocapture readonly %ptr) {
3064 ; CHECK-P10-LABEL: ld_unalign32_uint64_t_int32_t:
3065 ; CHECK-P10: # %bb.0: # %entry
3066 ; CHECK-P10-NEXT: plwa r3, 99999(r3), 0
3067 ; CHECK-P10-NEXT: blr
3069 ; CHECK-PREP10-LABEL: ld_unalign32_uint64_t_int32_t:
3070 ; CHECK-PREP10: # %bb.0: # %entry
3071 ; CHECK-PREP10-NEXT: lis r4, 1
3072 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
3073 ; CHECK-PREP10-NEXT: lwax r3, r3, r4
3074 ; CHECK-PREP10-NEXT: blr
3076 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999
3077 %0 = load i32, ptr %add.ptr, align 4
3078 %conv = sext i32 %0 to i64
3082 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3083 define dso_local i64 @ld_align32_uint64_t_int32_t(ptr nocapture readonly %ptr) {
3084 ; CHECK-P10-LABEL: ld_align32_uint64_t_int32_t:
3085 ; CHECK-P10: # %bb.0: # %entry
3086 ; CHECK-P10-NEXT: plwa r3, 99999000(r3), 0
3087 ; CHECK-P10-NEXT: blr
3089 ; CHECK-PREP10-LABEL: ld_align32_uint64_t_int32_t:
3090 ; CHECK-PREP10: # %bb.0: # %entry
3091 ; CHECK-PREP10-NEXT: lis r4, 1525
3092 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
3093 ; CHECK-PREP10-NEXT: lwax r3, r3, r4
3094 ; CHECK-PREP10-NEXT: blr
3096 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
3097 %0 = load i32, ptr %add.ptr, align 4
3098 %conv = sext i32 %0 to i64
3102 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3103 define dso_local i64 @ld_unalign64_uint64_t_int32_t(ptr nocapture readonly %ptr) {
3104 ; CHECK-P10-LABEL: ld_unalign64_uint64_t_int32_t:
3105 ; CHECK-P10: # %bb.0: # %entry
3106 ; CHECK-P10-NEXT: pli r4, 232
3107 ; CHECK-P10-NEXT: pli r5, 3567587329
3108 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
3109 ; CHECK-P10-NEXT: lwax r3, r3, r5
3110 ; CHECK-P10-NEXT: blr
3112 ; CHECK-PREP10-LABEL: ld_unalign64_uint64_t_int32_t:
3113 ; CHECK-PREP10: # %bb.0: # %entry
3114 ; CHECK-PREP10-NEXT: li r4, 29
3115 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
3116 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
3117 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
3118 ; CHECK-PREP10-NEXT: lwax r3, r3, r4
3119 ; CHECK-PREP10-NEXT: blr
3121 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000001
3122 %0 = load i32, ptr %add.ptr, align 4
3123 %conv = sext i32 %0 to i64
3127 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3128 define dso_local i64 @ld_align64_uint64_t_int32_t(ptr nocapture readonly %ptr) {
3129 ; CHECK-P10-LABEL: ld_align64_uint64_t_int32_t:
3130 ; CHECK-P10: # %bb.0: # %entry
3131 ; CHECK-P10-NEXT: pli r4, 244140625
3132 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
3133 ; CHECK-P10-NEXT: lwax r3, r3, r4
3134 ; CHECK-P10-NEXT: blr
3136 ; CHECK-PREP10-LABEL: ld_align64_uint64_t_int32_t:
3137 ; CHECK-PREP10: # %bb.0: # %entry
3138 ; CHECK-PREP10-NEXT: lis r4, 3725
3139 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
3140 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
3141 ; CHECK-PREP10-NEXT: lwax r3, r3, r4
3142 ; CHECK-PREP10-NEXT: blr
3144 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
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_reg_uint64_t_int32_t(ptr nocapture readonly %ptr, i64 %off) {
3152 ; CHECK-LABEL: ld_reg_uint64_t_int32_t:
3153 ; CHECK: # %bb.0: # %entry
3154 ; CHECK-NEXT: lwax r3, r3, r4
3157 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
3158 %0 = load i32, ptr %add.ptr, align 4
3159 %conv = sext i32 %0 to i64
3163 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3164 define dso_local i64 @ld_or_uint64_t_int32_t(i64 %ptr, i8 zeroext %off) {
3165 ; CHECK-LABEL: ld_or_uint64_t_int32_t:
3166 ; CHECK: # %bb.0: # %entry
3167 ; CHECK-NEXT: or r3, r4, r3
3168 ; CHECK-NEXT: lwa r3, 0(r3)
3171 %conv = zext i8 %off to i64
3172 %or = or i64 %conv, %ptr
3173 %0 = inttoptr i64 %or to ptr
3174 %1 = load i32, ptr %0, align 4
3175 %conv1 = sext i32 %1 to i64
3179 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3180 define dso_local i64 @ld_or2_uint64_t_int32_t(i64 %ptr, i8 zeroext %off) {
3181 ; CHECK-LABEL: ld_or2_uint64_t_int32_t:
3182 ; CHECK: # %bb.0: # %entry
3183 ; CHECK-NEXT: rldicr r3, r3, 0, 51
3184 ; CHECK-NEXT: lwax r3, r3, r4
3187 %and = and i64 %ptr, -4096
3188 %conv = zext i8 %off to i64
3189 %or = or i64 %and, %conv
3190 %0 = inttoptr i64 %or to ptr
3191 %1 = load i32, ptr %0, align 4
3192 %conv1 = sext i32 %1 to i64
3196 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3197 define dso_local i64 @ld_not_disjoint16_uint64_t_int32_t(i64 %ptr) {
3198 ; CHECK-LABEL: ld_not_disjoint16_uint64_t_int32_t:
3199 ; CHECK: # %bb.0: # %entry
3200 ; CHECK-NEXT: ori r3, r3, 6
3201 ; CHECK-NEXT: lwa r3, 0(r3)
3204 %or = or i64 %ptr, 6
3205 %0 = inttoptr i64 %or to ptr
3206 %1 = load i32, ptr %0, align 4
3207 %conv = sext i32 %1 to i64
3211 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3212 define dso_local i64 @ld_disjoint_unalign16_uint64_t_int32_t(i64 %ptr) {
3213 ; CHECK-P10-LABEL: ld_disjoint_unalign16_uint64_t_int32_t:
3214 ; CHECK-P10: # %bb.0: # %entry
3215 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
3216 ; CHECK-P10-NEXT: plwa r3, 6(r3), 0
3217 ; CHECK-P10-NEXT: blr
3219 ; CHECK-PREP10-LABEL: ld_disjoint_unalign16_uint64_t_int32_t:
3220 ; CHECK-PREP10: # %bb.0: # %entry
3221 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 51
3222 ; CHECK-PREP10-NEXT: li r4, 6
3223 ; CHECK-PREP10-NEXT: lwax r3, r3, r4
3224 ; CHECK-PREP10-NEXT: blr
3226 %and = and i64 %ptr, -4096
3227 %or = or i64 %and, 6
3228 %0 = inttoptr i64 %or to ptr
3229 %1 = load i32, ptr %0, align 4
3230 %conv = sext i32 %1 to i64
3234 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3235 define dso_local i64 @ld_disjoint_align16_uint64_t_int32_t(i64 %ptr) {
3236 ; CHECK-LABEL: ld_disjoint_align16_uint64_t_int32_t:
3237 ; CHECK: # %bb.0: # %entry
3238 ; CHECK-NEXT: rldicr r3, r3, 0, 51
3239 ; CHECK-NEXT: lwa r3, 24(r3)
3242 %and = and i64 %ptr, -4096
3243 %or = or i64 %and, 24
3244 %0 = inttoptr i64 %or to ptr
3245 %1 = load i32, ptr %0, align 8
3246 %conv = sext i32 %1 to i64
3250 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3251 define dso_local i64 @ld_not_disjoint32_uint64_t_int32_t(i64 %ptr) {
3252 ; CHECK-LABEL: ld_not_disjoint32_uint64_t_int32_t:
3253 ; CHECK: # %bb.0: # %entry
3254 ; CHECK-NEXT: ori r3, r3, 34463
3255 ; CHECK-NEXT: oris r3, r3, 1
3256 ; CHECK-NEXT: lwa r3, 0(r3)
3259 %or = or i64 %ptr, 99999
3260 %0 = inttoptr i64 %or to ptr
3261 %1 = load i32, ptr %0, align 4
3262 %conv = sext i32 %1 to i64
3266 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3267 define dso_local i64 @ld_disjoint_unalign32_uint64_t_int32_t(i64 %ptr) {
3268 ; CHECK-P10-LABEL: ld_disjoint_unalign32_uint64_t_int32_t:
3269 ; CHECK-P10: # %bb.0: # %entry
3270 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
3271 ; CHECK-P10-NEXT: plwa r3, 99999(r3), 0
3272 ; CHECK-P10-NEXT: blr
3274 ; CHECK-PREP10-LABEL: ld_disjoint_unalign32_uint64_t_int32_t:
3275 ; CHECK-PREP10: # %bb.0: # %entry
3276 ; CHECK-PREP10-NEXT: lis r4, 1
3277 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
3278 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
3279 ; CHECK-PREP10-NEXT: lwax r3, r3, r4
3280 ; CHECK-PREP10-NEXT: blr
3282 %and = and i64 %ptr, -1048576
3283 %or = or i64 %and, 99999
3284 %0 = inttoptr i64 %or to ptr
3285 %1 = load i32, ptr %0, align 4
3286 %conv = sext i32 %1 to i64
3290 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3291 define dso_local i64 @ld_disjoint_align32_uint64_t_int32_t(i64 %ptr) {
3292 ; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_int32_t:
3293 ; CHECK-P10: # %bb.0: # %entry
3294 ; CHECK-P10-NEXT: lis r4, -15264
3295 ; CHECK-P10-NEXT: and r3, r3, r4
3296 ; CHECK-P10-NEXT: plwa r3, 999990000(r3), 0
3297 ; CHECK-P10-NEXT: blr
3299 ; CHECK-PREP10-LABEL: ld_disjoint_align32_uint64_t_int32_t:
3300 ; CHECK-PREP10: # %bb.0: # %entry
3301 ; CHECK-PREP10-NEXT: lis r4, -15264
3302 ; CHECK-PREP10-NEXT: and r3, r3, r4
3303 ; CHECK-PREP10-NEXT: lis r4, 15258
3304 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
3305 ; CHECK-PREP10-NEXT: lwax r3, r3, r4
3306 ; CHECK-PREP10-NEXT: blr
3308 %and = and i64 %ptr, -1000341504
3309 %or = or i64 %and, 999990000
3310 %0 = inttoptr i64 %or to ptr
3311 %1 = load i32, ptr %0, align 16
3312 %conv = sext i32 %1 to i64
3316 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3317 define dso_local i64 @ld_not_disjoint64_uint64_t_int32_t(i64 %ptr) {
3318 ; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_int32_t:
3319 ; CHECK-P10: # %bb.0: # %entry
3320 ; CHECK-P10-NEXT: pli r4, 232
3321 ; CHECK-P10-NEXT: pli r5, 3567587329
3322 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
3323 ; CHECK-P10-NEXT: or r3, r3, r5
3324 ; CHECK-P10-NEXT: lwa r3, 0(r3)
3325 ; CHECK-P10-NEXT: blr
3327 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_int32_t:
3328 ; CHECK-PREP10: # %bb.0: # %entry
3329 ; CHECK-PREP10-NEXT: li r4, 29
3330 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
3331 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
3332 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
3333 ; CHECK-PREP10-NEXT: or r3, r3, r4
3334 ; CHECK-PREP10-NEXT: lwa r3, 0(r3)
3335 ; CHECK-PREP10-NEXT: blr
3337 %or = or i64 %ptr, 1000000000001
3338 %0 = inttoptr i64 %or to ptr
3339 %1 = load i32, ptr %0, align 4
3340 %conv = sext i32 %1 to i64
3344 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3345 define dso_local i64 @ld_disjoint_unalign64_uint64_t_int32_t(i64 %ptr) {
3346 ; CHECK-P10-LABEL: ld_disjoint_unalign64_uint64_t_int32_t:
3347 ; CHECK-P10: # %bb.0: # %entry
3348 ; CHECK-P10-NEXT: pli r4, 232
3349 ; CHECK-P10-NEXT: pli r5, 3567587329
3350 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
3351 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
3352 ; CHECK-P10-NEXT: lwax r3, r3, r5
3353 ; CHECK-P10-NEXT: blr
3355 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint64_t_int32_t:
3356 ; CHECK-PREP10: # %bb.0: # %entry
3357 ; CHECK-PREP10-NEXT: li r4, 29
3358 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
3359 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
3360 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
3361 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
3362 ; CHECK-PREP10-NEXT: lwax r3, r3, r4
3363 ; CHECK-PREP10-NEXT: blr
3365 %and = and i64 %ptr, -1099511627776
3366 %or = or i64 %and, 1000000000001
3367 %0 = inttoptr i64 %or to ptr
3368 %1 = load i32, ptr %0, align 4
3369 %conv = sext i32 %1 to i64
3373 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3374 define dso_local i64 @ld_disjoint_align64_uint64_t_int32_t(i64 %ptr) {
3375 ; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_int32_t:
3376 ; CHECK-P10: # %bb.0: # %entry
3377 ; CHECK-P10-NEXT: pli r4, 244140625
3378 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
3379 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
3380 ; CHECK-P10-NEXT: lwax r3, r3, r4
3381 ; CHECK-P10-NEXT: blr
3383 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_int32_t:
3384 ; CHECK-PREP10: # %bb.0: # %entry
3385 ; CHECK-PREP10-NEXT: lis r4, 3725
3386 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
3387 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
3388 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
3389 ; CHECK-PREP10-NEXT: lwax r3, r3, r4
3390 ; CHECK-PREP10-NEXT: blr
3392 %and = and i64 %ptr, -1099511627776
3393 %or = or i64 %and, 1000000000000
3394 %0 = inttoptr i64 %or to ptr
3395 %1 = load i32, ptr %0, align 4096
3396 %conv = sext i32 %1 to i64
3400 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3401 define dso_local i64 @ld_cst_unalign16_uint64_t_int32_t() {
3402 ; CHECK-LABEL: ld_cst_unalign16_uint64_t_int32_t:
3403 ; CHECK: # %bb.0: # %entry
3404 ; CHECK-NEXT: li r3, 255
3405 ; CHECK-NEXT: lwa r3, 0(r3)
3408 %0 = load i32, ptr inttoptr (i64 255 to ptr), align 4
3409 %conv = sext i32 %0 to i64
3413 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3414 define dso_local i64 @ld_cst_align16_uint64_t_int32_t() {
3415 ; CHECK-LABEL: ld_cst_align16_uint64_t_int32_t:
3416 ; CHECK: # %bb.0: # %entry
3417 ; CHECK-NEXT: lwa r3, 4080(0)
3420 %0 = load i32, ptr inttoptr (i64 4080 to ptr), align 16
3421 %conv = sext i32 %0 to i64
3425 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3426 define dso_local i64 @ld_cst_unalign32_uint64_t_int32_t() {
3427 ; CHECK-P10-LABEL: ld_cst_unalign32_uint64_t_int32_t:
3428 ; CHECK-P10: # %bb.0: # %entry
3429 ; CHECK-P10-NEXT: pli r3, 99999
3430 ; CHECK-P10-NEXT: lwa r3, 0(r3)
3431 ; CHECK-P10-NEXT: blr
3433 ; CHECK-PREP10-LABEL: ld_cst_unalign32_uint64_t_int32_t:
3434 ; CHECK-PREP10: # %bb.0: # %entry
3435 ; CHECK-PREP10-NEXT: lis r3, 1
3436 ; CHECK-PREP10-NEXT: ori r3, r3, 34463
3437 ; CHECK-PREP10-NEXT: lwa r3, 0(r3)
3438 ; CHECK-PREP10-NEXT: blr
3440 %0 = load i32, ptr inttoptr (i64 99999 to ptr), align 4
3441 %conv = sext i32 %0 to i64
3445 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3446 define dso_local i64 @ld_cst_align32_uint64_t_int32_t() {
3447 ; CHECK-LABEL: ld_cst_align32_uint64_t_int32_t:
3448 ; CHECK: # %bb.0: # %entry
3449 ; CHECK-NEXT: lis r3, 153
3450 ; CHECK-NEXT: lwa r3, -27108(r3)
3453 %0 = load i32, ptr inttoptr (i64 9999900 to ptr), align 4
3454 %conv = sext i32 %0 to i64
3458 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3459 define dso_local i64 @ld_cst_unalign64_uint64_t_int32_t() {
3460 ; CHECK-P10-LABEL: ld_cst_unalign64_uint64_t_int32_t:
3461 ; CHECK-P10: # %bb.0: # %entry
3462 ; CHECK-P10-NEXT: pli r3, 232
3463 ; CHECK-P10-NEXT: pli r4, 3567587329
3464 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
3465 ; CHECK-P10-NEXT: lwa r3, 0(r4)
3466 ; CHECK-P10-NEXT: blr
3468 ; CHECK-PREP10-LABEL: ld_cst_unalign64_uint64_t_int32_t:
3469 ; CHECK-PREP10: # %bb.0: # %entry
3470 ; CHECK-PREP10-NEXT: li r3, 29
3471 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
3472 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
3473 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
3474 ; CHECK-PREP10-NEXT: lwa r3, 0(r3)
3475 ; CHECK-PREP10-NEXT: blr
3477 %0 = load i32, ptr inttoptr (i64 1000000000001 to ptr), align 4
3478 %conv = sext i32 %0 to i64
3482 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3483 define dso_local i64 @ld_cst_align64_uint64_t_int32_t() {
3484 ; CHECK-P10-LABEL: ld_cst_align64_uint64_t_int32_t:
3485 ; CHECK-P10: # %bb.0: # %entry
3486 ; CHECK-P10-NEXT: pli r3, 244140625
3487 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
3488 ; CHECK-P10-NEXT: lwa r3, 0(r3)
3489 ; CHECK-P10-NEXT: blr
3491 ; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_int32_t:
3492 ; CHECK-PREP10: # %bb.0: # %entry
3493 ; CHECK-PREP10-NEXT: lis r3, 3725
3494 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
3495 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
3496 ; CHECK-PREP10-NEXT: lwa r3, 0(r3)
3497 ; CHECK-PREP10-NEXT: blr
3499 %0 = load i32, ptr inttoptr (i64 1000000000000 to ptr), align 4096
3500 %conv = sext i32 %0 to i64
3504 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3505 define dso_local i64 @ld_0_uint64_t_uint64_t(i64 %ptr) {
3506 ; CHECK-LABEL: ld_0_uint64_t_uint64_t:
3507 ; CHECK: # %bb.0: # %entry
3508 ; CHECK-NEXT: ld r3, 0(r3)
3511 %0 = inttoptr i64 %ptr to ptr
3512 %1 = load i64, ptr %0, align 8
3516 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3517 define dso_local i64 @ld_unalign16_uint64_t_uint64_t(ptr nocapture readonly %ptr) {
3518 ; CHECK-P10-LABEL: ld_unalign16_uint64_t_uint64_t:
3519 ; CHECK-P10: # %bb.0: # %entry
3520 ; CHECK-P10-NEXT: pld r3, 1(r3), 0
3521 ; CHECK-P10-NEXT: blr
3523 ; CHECK-PREP10-LABEL: ld_unalign16_uint64_t_uint64_t:
3524 ; CHECK-PREP10: # %bb.0: # %entry
3525 ; CHECK-PREP10-NEXT: li r4, 1
3526 ; CHECK-PREP10-NEXT: ldx r3, r3, r4
3527 ; CHECK-PREP10-NEXT: blr
3529 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1
3530 %0 = load i64, ptr %add.ptr, align 8
3534 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3535 define dso_local i64 @ld_align16_uint64_t_uint64_t(ptr nocapture readonly %ptr) {
3536 ; CHECK-LABEL: ld_align16_uint64_t_uint64_t:
3537 ; CHECK: # %bb.0: # %entry
3538 ; CHECK-NEXT: ld r3, 8(r3)
3541 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
3542 %0 = load i64, ptr %add.ptr, align 8
3546 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3547 define dso_local i64 @ld_unalign32_uint64_t_uint64_t(ptr nocapture readonly %ptr) {
3548 ; CHECK-P10-LABEL: ld_unalign32_uint64_t_uint64_t:
3549 ; CHECK-P10: # %bb.0: # %entry
3550 ; CHECK-P10-NEXT: pld r3, 99999(r3), 0
3551 ; CHECK-P10-NEXT: blr
3553 ; CHECK-PREP10-LABEL: ld_unalign32_uint64_t_uint64_t:
3554 ; CHECK-PREP10: # %bb.0: # %entry
3555 ; CHECK-PREP10-NEXT: lis r4, 1
3556 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
3557 ; CHECK-PREP10-NEXT: ldx r3, r3, r4
3558 ; CHECK-PREP10-NEXT: blr
3560 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999
3561 %0 = load i64, ptr %add.ptr, align 8
3565 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3566 define dso_local i64 @ld_align32_uint64_t_uint64_t(ptr nocapture readonly %ptr) {
3567 ; CHECK-P10-LABEL: ld_align32_uint64_t_uint64_t:
3568 ; CHECK-P10: # %bb.0: # %entry
3569 ; CHECK-P10-NEXT: pld r3, 99999000(r3), 0
3570 ; CHECK-P10-NEXT: blr
3572 ; CHECK-PREP10-LABEL: ld_align32_uint64_t_uint64_t:
3573 ; CHECK-PREP10: # %bb.0: # %entry
3574 ; CHECK-PREP10-NEXT: lis r4, 1525
3575 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
3576 ; CHECK-PREP10-NEXT: ldx r3, r3, r4
3577 ; CHECK-PREP10-NEXT: blr
3579 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
3580 %0 = load i64, ptr %add.ptr, align 8
3584 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3585 define dso_local i64 @ld_unalign64_uint64_t_uint64_t(ptr nocapture readonly %ptr) {
3586 ; CHECK-P10-LABEL: ld_unalign64_uint64_t_uint64_t:
3587 ; CHECK-P10: # %bb.0: # %entry
3588 ; CHECK-P10-NEXT: pli r4, 232
3589 ; CHECK-P10-NEXT: pli r5, 3567587329
3590 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
3591 ; CHECK-P10-NEXT: ldx r3, r3, r5
3592 ; CHECK-P10-NEXT: blr
3594 ; CHECK-PREP10-LABEL: ld_unalign64_uint64_t_uint64_t:
3595 ; CHECK-PREP10: # %bb.0: # %entry
3596 ; CHECK-PREP10-NEXT: li r4, 29
3597 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
3598 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
3599 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
3600 ; CHECK-PREP10-NEXT: ldx r3, r3, r4
3601 ; CHECK-PREP10-NEXT: blr
3603 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000001
3604 %0 = load i64, ptr %add.ptr, align 8
3608 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3609 define dso_local i64 @ld_align64_uint64_t_uint64_t(ptr nocapture readonly %ptr) {
3610 ; CHECK-P10-LABEL: ld_align64_uint64_t_uint64_t:
3611 ; CHECK-P10: # %bb.0: # %entry
3612 ; CHECK-P10-NEXT: pli r4, 244140625
3613 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
3614 ; CHECK-P10-NEXT: ldx r3, r3, r4
3615 ; CHECK-P10-NEXT: blr
3617 ; CHECK-PREP10-LABEL: ld_align64_uint64_t_uint64_t:
3618 ; CHECK-PREP10: # %bb.0: # %entry
3619 ; CHECK-PREP10-NEXT: lis r4, 3725
3620 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
3621 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
3622 ; CHECK-PREP10-NEXT: ldx r3, r3, r4
3623 ; CHECK-PREP10-NEXT: blr
3625 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
3626 %0 = load i64, ptr %add.ptr, align 8
3630 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3631 define dso_local i64 @ld_reg_uint64_t_uint64_t(ptr nocapture readonly %ptr, i64 %off) {
3632 ; CHECK-LABEL: ld_reg_uint64_t_uint64_t:
3633 ; CHECK: # %bb.0: # %entry
3634 ; CHECK-NEXT: ldx r3, r3, r4
3637 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
3638 %0 = load i64, ptr %add.ptr, align 8
3642 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3643 define dso_local i64 @ld_or_uint64_t_uint64_t(i64 %ptr, i8 zeroext %off) {
3644 ; CHECK-LABEL: ld_or_uint64_t_uint64_t:
3645 ; CHECK: # %bb.0: # %entry
3646 ; CHECK-NEXT: or r3, r4, r3
3647 ; CHECK-NEXT: ld r3, 0(r3)
3650 %conv = zext i8 %off to i64
3651 %or = or i64 %conv, %ptr
3652 %0 = inttoptr i64 %or to ptr
3653 %1 = load i64, ptr %0, align 8
3657 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3658 define dso_local i64 @ld_or2_uint64_t_uint64_t(i64 %ptr, i8 zeroext %off) {
3659 ; CHECK-LABEL: ld_or2_uint64_t_uint64_t:
3660 ; CHECK: # %bb.0: # %entry
3661 ; CHECK-NEXT: rldicr r3, r3, 0, 51
3662 ; CHECK-NEXT: ldx r3, r3, r4
3665 %and = and i64 %ptr, -4096
3666 %conv = zext i8 %off to i64
3667 %or = or i64 %and, %conv
3668 %0 = inttoptr i64 %or to ptr
3669 %1 = load i64, ptr %0, align 8
3673 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3674 define dso_local i64 @ld_not_disjoint16_uint64_t_uint64_t(i64 %ptr) {
3675 ; CHECK-LABEL: ld_not_disjoint16_uint64_t_uint64_t:
3676 ; CHECK: # %bb.0: # %entry
3677 ; CHECK-NEXT: ori r3, r3, 6
3678 ; CHECK-NEXT: ld r3, 0(r3)
3681 %or = or i64 %ptr, 6
3682 %0 = inttoptr i64 %or to ptr
3683 %1 = load i64, ptr %0, align 8
3687 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3688 define dso_local i64 @ld_disjoint_unalign16_uint64_t_uint64_t(i64 %ptr) {
3689 ; CHECK-P10-LABEL: ld_disjoint_unalign16_uint64_t_uint64_t:
3690 ; CHECK-P10: # %bb.0: # %entry
3691 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
3692 ; CHECK-P10-NEXT: pld r3, 6(r3), 0
3693 ; CHECK-P10-NEXT: blr
3695 ; CHECK-PREP10-LABEL: ld_disjoint_unalign16_uint64_t_uint64_t:
3696 ; CHECK-PREP10: # %bb.0: # %entry
3697 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 51
3698 ; CHECK-PREP10-NEXT: li r4, 6
3699 ; CHECK-PREP10-NEXT: ldx r3, r3, r4
3700 ; CHECK-PREP10-NEXT: blr
3702 %and = and i64 %ptr, -4096
3703 %or = or i64 %and, 6
3704 %0 = inttoptr i64 %or to ptr
3705 %1 = load i64, ptr %0, align 8
3709 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3710 define dso_local i64 @ld_disjoint_align16_uint64_t_uint64_t(i64 %ptr) {
3711 ; CHECK-LABEL: ld_disjoint_align16_uint64_t_uint64_t:
3712 ; CHECK: # %bb.0: # %entry
3713 ; CHECK-NEXT: rldicr r3, r3, 0, 51
3714 ; CHECK-NEXT: ld r3, 24(r3)
3717 %and = and i64 %ptr, -4096
3718 %or = or i64 %and, 24
3719 %0 = inttoptr i64 %or to ptr
3720 %1 = load i64, ptr %0, align 8
3724 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3725 define dso_local i64 @ld_not_disjoint32_uint64_t_uint64_t(i64 %ptr) {
3726 ; CHECK-LABEL: ld_not_disjoint32_uint64_t_uint64_t:
3727 ; CHECK: # %bb.0: # %entry
3728 ; CHECK-NEXT: ori r3, r3, 34463
3729 ; CHECK-NEXT: oris r3, r3, 1
3730 ; CHECK-NEXT: ld r3, 0(r3)
3733 %or = or i64 %ptr, 99999
3734 %0 = inttoptr i64 %or to ptr
3735 %1 = load i64, ptr %0, align 8
3739 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3740 define dso_local i64 @ld_disjoint_unalign32_uint64_t_uint64_t(i64 %ptr) {
3741 ; CHECK-P10-LABEL: ld_disjoint_unalign32_uint64_t_uint64_t:
3742 ; CHECK-P10: # %bb.0: # %entry
3743 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
3744 ; CHECK-P10-NEXT: pld r3, 99999(r3), 0
3745 ; CHECK-P10-NEXT: blr
3747 ; CHECK-PREP10-LABEL: ld_disjoint_unalign32_uint64_t_uint64_t:
3748 ; CHECK-PREP10: # %bb.0: # %entry
3749 ; CHECK-PREP10-NEXT: lis r4, 1
3750 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
3751 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
3752 ; CHECK-PREP10-NEXT: ldx r3, r3, r4
3753 ; CHECK-PREP10-NEXT: blr
3755 %and = and i64 %ptr, -1048576
3756 %or = or i64 %and, 99999
3757 %0 = inttoptr i64 %or to ptr
3758 %1 = load i64, ptr %0, align 8
3762 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3763 define dso_local i64 @ld_disjoint_align32_uint64_t_uint64_t(i64 %ptr) {
3764 ; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_uint64_t:
3765 ; CHECK-P10: # %bb.0: # %entry
3766 ; CHECK-P10-NEXT: lis r4, -15264
3767 ; CHECK-P10-NEXT: and r3, r3, r4
3768 ; CHECK-P10-NEXT: pld r3, 999990000(r3), 0
3769 ; CHECK-P10-NEXT: blr
3771 ; CHECK-PREP10-LABEL: ld_disjoint_align32_uint64_t_uint64_t:
3772 ; CHECK-PREP10: # %bb.0: # %entry
3773 ; CHECK-PREP10-NEXT: lis r4, -15264
3774 ; CHECK-PREP10-NEXT: and r3, r3, r4
3775 ; CHECK-PREP10-NEXT: lis r4, 15258
3776 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
3777 ; CHECK-PREP10-NEXT: ldx r3, r3, r4
3778 ; CHECK-PREP10-NEXT: blr
3780 %and = and i64 %ptr, -1000341504
3781 %or = or i64 %and, 999990000
3782 %0 = inttoptr i64 %or to ptr
3783 %1 = load i64, ptr %0, align 16
3787 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3788 define dso_local i64 @ld_not_disjoint64_uint64_t_uint64_t(i64 %ptr) {
3789 ; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_uint64_t:
3790 ; CHECK-P10: # %bb.0: # %entry
3791 ; CHECK-P10-NEXT: pli r4, 232
3792 ; CHECK-P10-NEXT: pli r5, 3567587329
3793 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
3794 ; CHECK-P10-NEXT: or r3, r3, r5
3795 ; CHECK-P10-NEXT: ld r3, 0(r3)
3796 ; CHECK-P10-NEXT: blr
3798 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_uint64_t:
3799 ; CHECK-PREP10: # %bb.0: # %entry
3800 ; CHECK-PREP10-NEXT: li r4, 29
3801 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
3802 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
3803 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
3804 ; CHECK-PREP10-NEXT: or r3, r3, r4
3805 ; CHECK-PREP10-NEXT: ld r3, 0(r3)
3806 ; CHECK-PREP10-NEXT: blr
3808 %or = or i64 %ptr, 1000000000001
3809 %0 = inttoptr i64 %or to ptr
3810 %1 = load i64, ptr %0, align 8
3814 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3815 define dso_local i64 @ld_disjoint_unalign64_uint64_t_uint64_t(i64 %ptr) {
3816 ; CHECK-P10-LABEL: ld_disjoint_unalign64_uint64_t_uint64_t:
3817 ; CHECK-P10: # %bb.0: # %entry
3818 ; CHECK-P10-NEXT: pli r4, 232
3819 ; CHECK-P10-NEXT: pli r5, 3567587329
3820 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
3821 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
3822 ; CHECK-P10-NEXT: ldx r3, r3, r5
3823 ; CHECK-P10-NEXT: blr
3825 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint64_t_uint64_t:
3826 ; CHECK-PREP10: # %bb.0: # %entry
3827 ; CHECK-PREP10-NEXT: li r4, 29
3828 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
3829 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
3830 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
3831 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
3832 ; CHECK-PREP10-NEXT: ldx r3, r3, r4
3833 ; CHECK-PREP10-NEXT: blr
3835 %and = and i64 %ptr, -1099511627776
3836 %or = or i64 %and, 1000000000001
3837 %0 = inttoptr i64 %or to ptr
3838 %1 = load i64, ptr %0, align 8
3842 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3843 define dso_local i64 @ld_disjoint_align64_uint64_t_uint64_t(i64 %ptr) {
3844 ; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_uint64_t:
3845 ; CHECK-P10: # %bb.0: # %entry
3846 ; CHECK-P10-NEXT: pli r4, 244140625
3847 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
3848 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
3849 ; CHECK-P10-NEXT: ldx r3, r3, r4
3850 ; CHECK-P10-NEXT: blr
3852 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_uint64_t:
3853 ; CHECK-PREP10: # %bb.0: # %entry
3854 ; CHECK-PREP10-NEXT: lis r4, 3725
3855 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
3856 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
3857 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
3858 ; CHECK-PREP10-NEXT: ldx r3, r3, r4
3859 ; CHECK-PREP10-NEXT: blr
3861 %and = and i64 %ptr, -1099511627776
3862 %or = or i64 %and, 1000000000000
3863 %0 = inttoptr i64 %or to ptr
3864 %1 = load i64, ptr %0, align 4096
3868 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3869 define dso_local i64 @ld_cst_unalign16_uint64_t_uint64_t() {
3870 ; CHECK-LABEL: ld_cst_unalign16_uint64_t_uint64_t:
3871 ; CHECK: # %bb.0: # %entry
3872 ; CHECK-NEXT: li r3, 255
3873 ; CHECK-NEXT: ld r3, 0(r3)
3876 %0 = load i64, ptr inttoptr (i64 255 to ptr), align 8
3880 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3881 define dso_local i64 @ld_cst_align16_uint64_t_uint64_t() {
3882 ; CHECK-LABEL: ld_cst_align16_uint64_t_uint64_t:
3883 ; CHECK: # %bb.0: # %entry
3884 ; CHECK-NEXT: ld r3, 4080(0)
3887 %0 = load i64, ptr inttoptr (i64 4080 to ptr), align 16
3891 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3892 define dso_local i64 @ld_cst_unalign32_uint64_t_uint64_t() {
3893 ; CHECK-P10-LABEL: ld_cst_unalign32_uint64_t_uint64_t:
3894 ; CHECK-P10: # %bb.0: # %entry
3895 ; CHECK-P10-NEXT: pli r3, 99999
3896 ; CHECK-P10-NEXT: ld r3, 0(r3)
3897 ; CHECK-P10-NEXT: blr
3899 ; CHECK-PREP10-LABEL: ld_cst_unalign32_uint64_t_uint64_t:
3900 ; CHECK-PREP10: # %bb.0: # %entry
3901 ; CHECK-PREP10-NEXT: lis r3, 1
3902 ; CHECK-PREP10-NEXT: ori r3, r3, 34463
3903 ; CHECK-PREP10-NEXT: ld r3, 0(r3)
3904 ; CHECK-PREP10-NEXT: blr
3906 %0 = load i64, ptr inttoptr (i64 99999 to ptr), align 8
3910 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3911 define dso_local i64 @ld_cst_align32_uint64_t_uint64_t() {
3912 ; CHECK-LABEL: ld_cst_align32_uint64_t_uint64_t:
3913 ; CHECK: # %bb.0: # %entry
3914 ; CHECK-NEXT: lis r3, 153
3915 ; CHECK-NEXT: ld r3, -27108(r3)
3918 %0 = load i64, ptr inttoptr (i64 9999900 to ptr), align 8
3922 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3923 define dso_local i64 @ld_cst_unalign64_uint64_t_uint64_t() {
3924 ; CHECK-P10-LABEL: ld_cst_unalign64_uint64_t_uint64_t:
3925 ; CHECK-P10: # %bb.0: # %entry
3926 ; CHECK-P10-NEXT: pli r3, 232
3927 ; CHECK-P10-NEXT: pli r4, 3567587329
3928 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
3929 ; CHECK-P10-NEXT: ld r3, 0(r4)
3930 ; CHECK-P10-NEXT: blr
3932 ; CHECK-PREP10-LABEL: ld_cst_unalign64_uint64_t_uint64_t:
3933 ; CHECK-PREP10: # %bb.0: # %entry
3934 ; CHECK-PREP10-NEXT: li r3, 29
3935 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
3936 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
3937 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
3938 ; CHECK-PREP10-NEXT: ld r3, 0(r3)
3939 ; CHECK-PREP10-NEXT: blr
3941 %0 = load i64, ptr inttoptr (i64 1000000000001 to ptr), align 8
3945 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3946 define dso_local i64 @ld_cst_align64_uint64_t_uint64_t() {
3947 ; CHECK-P10-LABEL: ld_cst_align64_uint64_t_uint64_t:
3948 ; CHECK-P10: # %bb.0: # %entry
3949 ; CHECK-P10-NEXT: pli r3, 244140625
3950 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
3951 ; CHECK-P10-NEXT: ld r3, 0(r3)
3952 ; CHECK-P10-NEXT: blr
3954 ; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_uint64_t:
3955 ; CHECK-PREP10: # %bb.0: # %entry
3956 ; CHECK-PREP10-NEXT: lis r3, 3725
3957 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
3958 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
3959 ; CHECK-PREP10-NEXT: ld r3, 0(r3)
3960 ; CHECK-PREP10-NEXT: blr
3962 %0 = load i64, ptr inttoptr (i64 1000000000000 to ptr), align 4096
3966 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3967 define dso_local i64 @ld_0_uint64_t_float(i64 %ptr) {
3968 ; CHECK-LABEL: ld_0_uint64_t_float:
3969 ; CHECK: # %bb.0: # %entry
3970 ; CHECK-NEXT: lfs f0, 0(r3)
3971 ; CHECK-NEXT: xscvdpuxds f0, f0
3972 ; CHECK-NEXT: mffprd r3, f0
3975 %0 = inttoptr i64 %ptr to ptr
3976 %1 = load float, ptr %0, align 4
3977 %conv = fptoui float %1 to i64
3981 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3982 define dso_local i64 @ld_unalign16_uint64_t_float(ptr nocapture readonly %ptr) {
3983 ; CHECK-P10-LABEL: ld_unalign16_uint64_t_float:
3984 ; CHECK-P10: # %bb.0: # %entry
3985 ; CHECK-P10-NEXT: plfs f0, 1(r3), 0
3986 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
3987 ; CHECK-P10-NEXT: mffprd r3, f0
3988 ; CHECK-P10-NEXT: blr
3990 ; CHECK-PREP10-LABEL: ld_unalign16_uint64_t_float:
3991 ; CHECK-PREP10: # %bb.0: # %entry
3992 ; CHECK-PREP10-NEXT: lfs f0, 1(r3)
3993 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
3994 ; CHECK-PREP10-NEXT: mffprd r3, f0
3995 ; CHECK-PREP10-NEXT: blr
3997 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1
3998 %0 = load float, ptr %add.ptr, align 4
3999 %conv = fptoui float %0 to i64
4003 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4004 define dso_local i64 @ld_align16_uint64_t_float(ptr nocapture readonly %ptr) {
4005 ; CHECK-LABEL: ld_align16_uint64_t_float:
4006 ; CHECK: # %bb.0: # %entry
4007 ; CHECK-NEXT: lfs f0, 8(r3)
4008 ; CHECK-NEXT: xscvdpuxds f0, f0
4009 ; CHECK-NEXT: mffprd r3, f0
4012 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
4013 %0 = load float, ptr %add.ptr, align 4
4014 %conv = fptoui float %0 to i64
4018 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4019 define dso_local i64 @ld_unalign32_uint64_t_float(ptr nocapture readonly %ptr) {
4020 ; CHECK-P10-LABEL: ld_unalign32_uint64_t_float:
4021 ; CHECK-P10: # %bb.0: # %entry
4022 ; CHECK-P10-NEXT: plfs f0, 99999(r3), 0
4023 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4024 ; CHECK-P10-NEXT: mffprd r3, f0
4025 ; CHECK-P10-NEXT: blr
4027 ; CHECK-PREP10-LABEL: ld_unalign32_uint64_t_float:
4028 ; CHECK-PREP10: # %bb.0: # %entry
4029 ; CHECK-PREP10-NEXT: lis r4, 1
4030 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
4031 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
4032 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4033 ; CHECK-PREP10-NEXT: mffprd r3, f0
4034 ; CHECK-PREP10-NEXT: blr
4036 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999
4037 %0 = load float, ptr %add.ptr, align 4
4038 %conv = fptoui float %0 to i64
4042 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4043 define dso_local i64 @ld_align32_uint64_t_float(ptr nocapture readonly %ptr) {
4044 ; CHECK-P10-LABEL: ld_align32_uint64_t_float:
4045 ; CHECK-P10: # %bb.0: # %entry
4046 ; CHECK-P10-NEXT: plfs f0, 99999000(r3), 0
4047 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4048 ; CHECK-P10-NEXT: mffprd r3, f0
4049 ; CHECK-P10-NEXT: blr
4051 ; CHECK-PREP10-LABEL: ld_align32_uint64_t_float:
4052 ; CHECK-PREP10: # %bb.0: # %entry
4053 ; CHECK-PREP10-NEXT: lis r4, 1525
4054 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
4055 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
4056 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4057 ; CHECK-PREP10-NEXT: mffprd r3, f0
4058 ; CHECK-PREP10-NEXT: blr
4060 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
4061 %0 = load float, ptr %add.ptr, align 4
4062 %conv = fptoui float %0 to i64
4066 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4067 define dso_local i64 @ld_unalign64_uint64_t_float(ptr nocapture readonly %ptr) {
4068 ; CHECK-P10-LABEL: ld_unalign64_uint64_t_float:
4069 ; CHECK-P10: # %bb.0: # %entry
4070 ; CHECK-P10-NEXT: pli r4, 232
4071 ; CHECK-P10-NEXT: pli r5, 3567587329
4072 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
4073 ; CHECK-P10-NEXT: lfsx f0, r3, r5
4074 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4075 ; CHECK-P10-NEXT: mffprd r3, f0
4076 ; CHECK-P10-NEXT: blr
4078 ; CHECK-PREP10-LABEL: ld_unalign64_uint64_t_float:
4079 ; CHECK-PREP10: # %bb.0: # %entry
4080 ; CHECK-PREP10-NEXT: li r4, 29
4081 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
4082 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
4083 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
4084 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
4085 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4086 ; CHECK-PREP10-NEXT: mffprd r3, f0
4087 ; CHECK-PREP10-NEXT: blr
4089 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000001
4090 %0 = load float, ptr %add.ptr, align 4
4091 %conv = fptoui float %0 to i64
4095 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4096 define dso_local i64 @ld_align64_uint64_t_float(ptr nocapture readonly %ptr) {
4097 ; CHECK-P10-LABEL: ld_align64_uint64_t_float:
4098 ; CHECK-P10: # %bb.0: # %entry
4099 ; CHECK-P10-NEXT: pli r4, 244140625
4100 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
4101 ; CHECK-P10-NEXT: lfsx f0, r3, r4
4102 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4103 ; CHECK-P10-NEXT: mffprd r3, f0
4104 ; CHECK-P10-NEXT: blr
4106 ; CHECK-PREP10-LABEL: ld_align64_uint64_t_float:
4107 ; CHECK-PREP10: # %bb.0: # %entry
4108 ; CHECK-PREP10-NEXT: lis r4, 3725
4109 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
4110 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
4111 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
4112 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4113 ; CHECK-PREP10-NEXT: mffprd r3, f0
4114 ; CHECK-PREP10-NEXT: blr
4116 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
4117 %0 = load float, ptr %add.ptr, align 4
4118 %conv = fptoui float %0 to i64
4122 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4123 define dso_local i64 @ld_reg_uint64_t_float(ptr nocapture readonly %ptr, i64 %off) {
4124 ; CHECK-LABEL: ld_reg_uint64_t_float:
4125 ; CHECK: # %bb.0: # %entry
4126 ; CHECK-NEXT: lfsx f0, r3, r4
4127 ; CHECK-NEXT: xscvdpuxds f0, f0
4128 ; CHECK-NEXT: mffprd r3, f0
4131 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
4132 %0 = load float, ptr %add.ptr, align 4
4133 %conv = fptoui float %0 to i64
4137 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4138 define dso_local i64 @ld_or_uint64_t_float(i64 %ptr, i8 zeroext %off) {
4139 ; CHECK-LABEL: ld_or_uint64_t_float:
4140 ; CHECK: # %bb.0: # %entry
4141 ; CHECK-NEXT: or r3, r4, r3
4142 ; CHECK-NEXT: lfs f0, 0(r3)
4143 ; CHECK-NEXT: xscvdpuxds f0, f0
4144 ; CHECK-NEXT: mffprd r3, f0
4147 %conv = zext i8 %off to i64
4148 %or = or i64 %conv, %ptr
4149 %0 = inttoptr i64 %or to ptr
4150 %1 = load float, ptr %0, align 4
4151 %conv1 = fptoui float %1 to i64
4155 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4156 define dso_local i64 @ld_or2_uint64_t_float(i64 %ptr, i8 zeroext %off) {
4157 ; CHECK-LABEL: ld_or2_uint64_t_float:
4158 ; CHECK: # %bb.0: # %entry
4159 ; CHECK-NEXT: rldicr r3, r3, 0, 51
4160 ; CHECK-NEXT: lfsx f0, r3, r4
4161 ; CHECK-NEXT: xscvdpuxds f0, f0
4162 ; CHECK-NEXT: mffprd r3, f0
4165 %and = and i64 %ptr, -4096
4166 %conv = zext i8 %off to i64
4167 %or = or i64 %and, %conv
4168 %0 = inttoptr i64 %or to ptr
4169 %1 = load float, ptr %0, align 4
4170 %conv1 = fptoui float %1 to i64
4174 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4175 define dso_local i64 @ld_not_disjoint16_uint64_t_float(i64 %ptr) {
4176 ; CHECK-LABEL: ld_not_disjoint16_uint64_t_float:
4177 ; CHECK: # %bb.0: # %entry
4178 ; CHECK-NEXT: ori r3, r3, 6
4179 ; CHECK-NEXT: lfs f0, 0(r3)
4180 ; CHECK-NEXT: xscvdpuxds f0, f0
4181 ; CHECK-NEXT: mffprd r3, f0
4184 %or = or i64 %ptr, 6
4185 %0 = inttoptr i64 %or to ptr
4186 %1 = load float, ptr %0, align 4
4187 %conv = fptoui float %1 to i64
4191 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4192 define dso_local i64 @ld_disjoint_unalign16_uint64_t_float(i64 %ptr) {
4193 ; CHECK-P10-LABEL: ld_disjoint_unalign16_uint64_t_float:
4194 ; CHECK-P10: # %bb.0: # %entry
4195 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
4196 ; CHECK-P10-NEXT: plfs f0, 6(r3), 0
4197 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4198 ; CHECK-P10-NEXT: mffprd r3, f0
4199 ; CHECK-P10-NEXT: blr
4201 ; CHECK-PREP10-LABEL: ld_disjoint_unalign16_uint64_t_float:
4202 ; CHECK-PREP10: # %bb.0: # %entry
4203 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 51
4204 ; CHECK-PREP10-NEXT: lfs f0, 6(r3)
4205 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4206 ; CHECK-PREP10-NEXT: mffprd r3, f0
4207 ; CHECK-PREP10-NEXT: blr
4209 %and = and i64 %ptr, -4096
4210 %or = or i64 %and, 6
4211 %0 = inttoptr i64 %or to ptr
4212 %1 = load float, ptr %0, align 4
4213 %conv = fptoui float %1 to i64
4217 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4218 define dso_local i64 @ld_disjoint_align16_uint64_t_float(i64 %ptr) {
4219 ; CHECK-LABEL: ld_disjoint_align16_uint64_t_float:
4220 ; CHECK: # %bb.0: # %entry
4221 ; CHECK-NEXT: rldicr r3, r3, 0, 51
4222 ; CHECK-NEXT: lfs f0, 24(r3)
4223 ; CHECK-NEXT: xscvdpuxds f0, f0
4224 ; CHECK-NEXT: mffprd r3, f0
4227 %and = and i64 %ptr, -4096
4228 %or = or i64 %and, 24
4229 %0 = inttoptr i64 %or to ptr
4230 %1 = load float, ptr %0, align 8
4231 %conv = fptoui float %1 to i64
4235 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4236 define dso_local i64 @ld_not_disjoint32_uint64_t_float(i64 %ptr) {
4237 ; CHECK-LABEL: ld_not_disjoint32_uint64_t_float:
4238 ; CHECK: # %bb.0: # %entry
4239 ; CHECK-NEXT: ori r3, r3, 34463
4240 ; CHECK-NEXT: oris r3, r3, 1
4241 ; CHECK-NEXT: lfs f0, 0(r3)
4242 ; CHECK-NEXT: xscvdpuxds f0, f0
4243 ; CHECK-NEXT: mffprd r3, f0
4246 %or = or i64 %ptr, 99999
4247 %0 = inttoptr i64 %or to ptr
4248 %1 = load float, ptr %0, align 4
4249 %conv = fptoui float %1 to i64
4253 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4254 define dso_local i64 @ld_disjoint_unalign32_uint64_t_float(i64 %ptr) {
4255 ; CHECK-P10-LABEL: ld_disjoint_unalign32_uint64_t_float:
4256 ; CHECK-P10: # %bb.0: # %entry
4257 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
4258 ; CHECK-P10-NEXT: plfs f0, 99999(r3), 0
4259 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4260 ; CHECK-P10-NEXT: mffprd r3, f0
4261 ; CHECK-P10-NEXT: blr
4263 ; CHECK-PREP10-LABEL: ld_disjoint_unalign32_uint64_t_float:
4264 ; CHECK-PREP10: # %bb.0: # %entry
4265 ; CHECK-PREP10-NEXT: lis r4, 1
4266 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
4267 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
4268 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
4269 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4270 ; CHECK-PREP10-NEXT: mffprd r3, f0
4271 ; CHECK-PREP10-NEXT: blr
4273 %and = and i64 %ptr, -1048576
4274 %or = or i64 %and, 99999
4275 %0 = inttoptr i64 %or to ptr
4276 %1 = load float, ptr %0, align 4
4277 %conv = fptoui float %1 to i64
4281 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4282 define dso_local i64 @ld_disjoint_align32_uint64_t_float(i64 %ptr) {
4283 ; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_float:
4284 ; CHECK-P10: # %bb.0: # %entry
4285 ; CHECK-P10-NEXT: lis r4, -15264
4286 ; CHECK-P10-NEXT: and r3, r3, r4
4287 ; CHECK-P10-NEXT: plfs f0, 999990000(r3), 0
4288 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4289 ; CHECK-P10-NEXT: mffprd r3, f0
4290 ; CHECK-P10-NEXT: blr
4292 ; CHECK-PREP10-LABEL: ld_disjoint_align32_uint64_t_float:
4293 ; CHECK-PREP10: # %bb.0: # %entry
4294 ; CHECK-PREP10-NEXT: lis r4, -15264
4295 ; CHECK-PREP10-NEXT: and r3, r3, r4
4296 ; CHECK-PREP10-NEXT: lis r4, 15258
4297 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
4298 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
4299 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4300 ; CHECK-PREP10-NEXT: mffprd r3, f0
4301 ; CHECK-PREP10-NEXT: blr
4303 %and = and i64 %ptr, -1000341504
4304 %or = or i64 %and, 999990000
4305 %0 = inttoptr i64 %or to ptr
4306 %1 = load float, ptr %0, align 16
4307 %conv = fptoui float %1 to i64
4311 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4312 define dso_local i64 @ld_not_disjoint64_uint64_t_float(i64 %ptr) {
4313 ; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_float:
4314 ; CHECK-P10: # %bb.0: # %entry
4315 ; CHECK-P10-NEXT: pli r4, 232
4316 ; CHECK-P10-NEXT: pli r5, 3567587329
4317 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
4318 ; CHECK-P10-NEXT: or r3, r3, r5
4319 ; CHECK-P10-NEXT: lfs f0, 0(r3)
4320 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4321 ; CHECK-P10-NEXT: mffprd r3, f0
4322 ; CHECK-P10-NEXT: blr
4324 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_float:
4325 ; CHECK-PREP10: # %bb.0: # %entry
4326 ; CHECK-PREP10-NEXT: li r4, 29
4327 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
4328 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
4329 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
4330 ; CHECK-PREP10-NEXT: or r3, r3, r4
4331 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
4332 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4333 ; CHECK-PREP10-NEXT: mffprd r3, f0
4334 ; CHECK-PREP10-NEXT: blr
4336 %or = or i64 %ptr, 1000000000001
4337 %0 = inttoptr i64 %or to ptr
4338 %1 = load float, ptr %0, align 4
4339 %conv = fptoui float %1 to i64
4343 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4344 define dso_local i64 @ld_disjoint_unalign64_uint64_t_float(i64 %ptr) {
4345 ; CHECK-P10-LABEL: ld_disjoint_unalign64_uint64_t_float:
4346 ; CHECK-P10: # %bb.0: # %entry
4347 ; CHECK-P10-NEXT: pli r4, 232
4348 ; CHECK-P10-NEXT: pli r5, 3567587329
4349 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
4350 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
4351 ; CHECK-P10-NEXT: lfsx f0, r3, r5
4352 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4353 ; CHECK-P10-NEXT: mffprd r3, f0
4354 ; CHECK-P10-NEXT: blr
4356 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint64_t_float:
4357 ; CHECK-PREP10: # %bb.0: # %entry
4358 ; CHECK-PREP10-NEXT: li r4, 29
4359 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
4360 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
4361 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
4362 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
4363 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
4364 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4365 ; CHECK-PREP10-NEXT: mffprd r3, f0
4366 ; CHECK-PREP10-NEXT: blr
4368 %and = and i64 %ptr, -1099511627776
4369 %or = or i64 %and, 1000000000001
4370 %0 = inttoptr i64 %or to ptr
4371 %1 = load float, ptr %0, align 4
4372 %conv = fptoui float %1 to i64
4376 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4377 define dso_local i64 @ld_disjoint_align64_uint64_t_float(i64 %ptr) {
4378 ; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_float:
4379 ; CHECK-P10: # %bb.0: # %entry
4380 ; CHECK-P10-NEXT: pli r4, 244140625
4381 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
4382 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
4383 ; CHECK-P10-NEXT: lfsx f0, r3, r4
4384 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4385 ; CHECK-P10-NEXT: mffprd r3, f0
4386 ; CHECK-P10-NEXT: blr
4388 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_float:
4389 ; CHECK-PREP10: # %bb.0: # %entry
4390 ; CHECK-PREP10-NEXT: lis r4, 3725
4391 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
4392 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
4393 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
4394 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
4395 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4396 ; CHECK-PREP10-NEXT: mffprd r3, f0
4397 ; CHECK-PREP10-NEXT: blr
4399 %and = and i64 %ptr, -1099511627776
4400 %or = or i64 %and, 1000000000000
4401 %0 = inttoptr i64 %or to ptr
4402 %1 = load float, ptr %0, align 4096
4403 %conv = fptoui float %1 to i64
4407 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4408 define dso_local i64 @ld_cst_unalign16_uint64_t_float() {
4409 ; CHECK-P10-LABEL: ld_cst_unalign16_uint64_t_float:
4410 ; CHECK-P10: # %bb.0: # %entry
4411 ; CHECK-P10-NEXT: li r3, 255
4412 ; CHECK-P10-NEXT: lfs f0, 0(r3)
4413 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4414 ; CHECK-P10-NEXT: mffprd r3, f0
4415 ; CHECK-P10-NEXT: blr
4417 ; CHECK-P9-LABEL: ld_cst_unalign16_uint64_t_float:
4418 ; CHECK-P9: # %bb.0: # %entry
4419 ; CHECK-P9-NEXT: li r3, 255
4420 ; CHECK-P9-NEXT: lfs f0, 0(r3)
4421 ; CHECK-P9-NEXT: xscvdpuxds f0, f0
4422 ; CHECK-P9-NEXT: mffprd r3, f0
4423 ; CHECK-P9-NEXT: blr
4425 ; CHECK-P8-LABEL: ld_cst_unalign16_uint64_t_float:
4426 ; CHECK-P8: # %bb.0: # %entry
4427 ; CHECK-P8-NEXT: lfs f0, 255(0)
4428 ; CHECK-P8-NEXT: xscvdpuxds f0, f0
4429 ; CHECK-P8-NEXT: mffprd r3, f0
4430 ; CHECK-P8-NEXT: blr
4432 %0 = load float, ptr inttoptr (i64 255 to ptr), align 4
4433 %conv = fptoui float %0 to i64
4437 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4438 define dso_local i64 @ld_cst_align16_uint64_t_float() {
4439 ; CHECK-LABEL: ld_cst_align16_uint64_t_float:
4440 ; CHECK: # %bb.0: # %entry
4441 ; CHECK-NEXT: lfs f0, 4080(0)
4442 ; CHECK-NEXT: xscvdpuxds f0, f0
4443 ; CHECK-NEXT: mffprd r3, f0
4446 %0 = load float, ptr inttoptr (i64 4080 to ptr), align 16
4447 %conv = fptoui float %0 to i64
4451 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4452 define dso_local i64 @ld_cst_unalign32_uint64_t_float() {
4453 ; CHECK-P10-LABEL: ld_cst_unalign32_uint64_t_float:
4454 ; CHECK-P10: # %bb.0: # %entry
4455 ; CHECK-P10-NEXT: pli r3, 99999
4456 ; CHECK-P10-NEXT: lfs f0, 0(r3)
4457 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4458 ; CHECK-P10-NEXT: mffprd r3, f0
4459 ; CHECK-P10-NEXT: blr
4461 ; CHECK-P9-LABEL: ld_cst_unalign32_uint64_t_float:
4462 ; CHECK-P9: # %bb.0: # %entry
4463 ; CHECK-P9-NEXT: lis r3, 1
4464 ; CHECK-P9-NEXT: ori r3, r3, 34463
4465 ; CHECK-P9-NEXT: lfs f0, 0(r3)
4466 ; CHECK-P9-NEXT: xscvdpuxds f0, f0
4467 ; CHECK-P9-NEXT: mffprd r3, f0
4468 ; CHECK-P9-NEXT: blr
4470 ; CHECK-P8-LABEL: ld_cst_unalign32_uint64_t_float:
4471 ; CHECK-P8: # %bb.0: # %entry
4472 ; CHECK-P8-NEXT: lis r3, 2
4473 ; CHECK-P8-NEXT: lfs f0, -31073(r3)
4474 ; CHECK-P8-NEXT: xscvdpuxds f0, f0
4475 ; CHECK-P8-NEXT: mffprd r3, f0
4476 ; CHECK-P8-NEXT: blr
4478 %0 = load float, ptr inttoptr (i64 99999 to ptr), align 4
4479 %conv = fptoui float %0 to i64
4483 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4484 define dso_local i64 @ld_cst_align32_uint64_t_float() {
4485 ; CHECK-LABEL: ld_cst_align32_uint64_t_float:
4486 ; CHECK: # %bb.0: # %entry
4487 ; CHECK-NEXT: lis r3, 153
4488 ; CHECK-NEXT: lfs f0, -27108(r3)
4489 ; CHECK-NEXT: xscvdpuxds f0, f0
4490 ; CHECK-NEXT: mffprd r3, f0
4493 %0 = load float, ptr inttoptr (i64 9999900 to ptr), align 4
4494 %conv = fptoui float %0 to i64
4498 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4499 define dso_local i64 @ld_cst_unalign64_uint64_t_float() {
4500 ; CHECK-P10-LABEL: ld_cst_unalign64_uint64_t_float:
4501 ; CHECK-P10: # %bb.0: # %entry
4502 ; CHECK-P10-NEXT: pli r3, 232
4503 ; CHECK-P10-NEXT: pli r4, 3567587329
4504 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
4505 ; CHECK-P10-NEXT: lfs f0, 0(r4)
4506 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4507 ; CHECK-P10-NEXT: mffprd r3, f0
4508 ; CHECK-P10-NEXT: blr
4510 ; CHECK-PREP10-LABEL: ld_cst_unalign64_uint64_t_float:
4511 ; CHECK-PREP10: # %bb.0: # %entry
4512 ; CHECK-PREP10-NEXT: li r3, 29
4513 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
4514 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
4515 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
4516 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
4517 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4518 ; CHECK-PREP10-NEXT: mffprd r3, f0
4519 ; CHECK-PREP10-NEXT: blr
4521 %0 = load float, ptr inttoptr (i64 1000000000001 to ptr), align 4
4522 %conv = fptoui float %0 to i64
4526 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4527 define dso_local i64 @ld_cst_align64_uint64_t_float() {
4528 ; CHECK-P10-LABEL: ld_cst_align64_uint64_t_float:
4529 ; CHECK-P10: # %bb.0: # %entry
4530 ; CHECK-P10-NEXT: pli r3, 244140625
4531 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
4532 ; CHECK-P10-NEXT: lfs f0, 0(r3)
4533 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4534 ; CHECK-P10-NEXT: mffprd r3, f0
4535 ; CHECK-P10-NEXT: blr
4537 ; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_float:
4538 ; CHECK-PREP10: # %bb.0: # %entry
4539 ; CHECK-PREP10-NEXT: lis r3, 3725
4540 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
4541 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
4542 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
4543 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4544 ; CHECK-PREP10-NEXT: mffprd r3, f0
4545 ; CHECK-PREP10-NEXT: blr
4547 %0 = load float, ptr inttoptr (i64 1000000000000 to ptr), align 4096
4548 %conv = fptoui float %0 to i64
4552 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4553 define dso_local i64 @ld_0_uint64_t_double(i64 %ptr) {
4554 ; CHECK-LABEL: ld_0_uint64_t_double:
4555 ; CHECK: # %bb.0: # %entry
4556 ; CHECK-NEXT: lfd f0, 0(r3)
4557 ; CHECK-NEXT: xscvdpuxds f0, f0
4558 ; CHECK-NEXT: mffprd r3, f0
4561 %0 = inttoptr i64 %ptr to ptr
4562 %1 = load double, ptr %0, align 8
4563 %conv = fptoui double %1 to i64
4567 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4568 define dso_local i64 @ld_unalign16_uint64_t_double(ptr nocapture readonly %ptr) {
4569 ; CHECK-P10-LABEL: ld_unalign16_uint64_t_double:
4570 ; CHECK-P10: # %bb.0: # %entry
4571 ; CHECK-P10-NEXT: plfd f0, 1(r3), 0
4572 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4573 ; CHECK-P10-NEXT: mffprd r3, f0
4574 ; CHECK-P10-NEXT: blr
4576 ; CHECK-PREP10-LABEL: ld_unalign16_uint64_t_double:
4577 ; CHECK-PREP10: # %bb.0: # %entry
4578 ; CHECK-PREP10-NEXT: lfd f0, 1(r3)
4579 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4580 ; CHECK-PREP10-NEXT: mffprd r3, f0
4581 ; CHECK-PREP10-NEXT: blr
4583 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1
4584 %0 = load double, ptr %add.ptr, align 8
4585 %conv = fptoui double %0 to i64
4589 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4590 define dso_local i64 @ld_align16_uint64_t_double(ptr nocapture readonly %ptr) {
4591 ; CHECK-LABEL: ld_align16_uint64_t_double:
4592 ; CHECK: # %bb.0: # %entry
4593 ; CHECK-NEXT: lfd f0, 8(r3)
4594 ; CHECK-NEXT: xscvdpuxds f0, f0
4595 ; CHECK-NEXT: mffprd r3, f0
4598 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
4599 %0 = load double, ptr %add.ptr, align 8
4600 %conv = fptoui double %0 to i64
4604 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4605 define dso_local i64 @ld_unalign32_uint64_t_double(ptr nocapture readonly %ptr) {
4606 ; CHECK-P10-LABEL: ld_unalign32_uint64_t_double:
4607 ; CHECK-P10: # %bb.0: # %entry
4608 ; CHECK-P10-NEXT: plfd f0, 99999(r3), 0
4609 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4610 ; CHECK-P10-NEXT: mffprd r3, f0
4611 ; CHECK-P10-NEXT: blr
4613 ; CHECK-PREP10-LABEL: ld_unalign32_uint64_t_double:
4614 ; CHECK-PREP10: # %bb.0: # %entry
4615 ; CHECK-PREP10-NEXT: lis r4, 1
4616 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
4617 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
4618 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4619 ; CHECK-PREP10-NEXT: mffprd r3, f0
4620 ; CHECK-PREP10-NEXT: blr
4622 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999
4623 %0 = load double, ptr %add.ptr, align 8
4624 %conv = fptoui double %0 to i64
4628 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4629 define dso_local i64 @ld_align32_uint64_t_double(ptr nocapture readonly %ptr) {
4630 ; CHECK-P10-LABEL: ld_align32_uint64_t_double:
4631 ; CHECK-P10: # %bb.0: # %entry
4632 ; CHECK-P10-NEXT: plfd f0, 99999000(r3), 0
4633 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4634 ; CHECK-P10-NEXT: mffprd r3, f0
4635 ; CHECK-P10-NEXT: blr
4637 ; CHECK-PREP10-LABEL: ld_align32_uint64_t_double:
4638 ; CHECK-PREP10: # %bb.0: # %entry
4639 ; CHECK-PREP10-NEXT: lis r4, 1525
4640 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
4641 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
4642 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4643 ; CHECK-PREP10-NEXT: mffprd r3, f0
4644 ; CHECK-PREP10-NEXT: blr
4646 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
4647 %0 = load double, ptr %add.ptr, align 8
4648 %conv = fptoui double %0 to i64
4652 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4653 define dso_local i64 @ld_unalign64_uint64_t_double(ptr nocapture readonly %ptr) {
4654 ; CHECK-P10-LABEL: ld_unalign64_uint64_t_double:
4655 ; CHECK-P10: # %bb.0: # %entry
4656 ; CHECK-P10-NEXT: pli r4, 232
4657 ; CHECK-P10-NEXT: pli r5, 3567587329
4658 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
4659 ; CHECK-P10-NEXT: lfdx f0, r3, r5
4660 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4661 ; CHECK-P10-NEXT: mffprd r3, f0
4662 ; CHECK-P10-NEXT: blr
4664 ; CHECK-PREP10-LABEL: ld_unalign64_uint64_t_double:
4665 ; CHECK-PREP10: # %bb.0: # %entry
4666 ; CHECK-PREP10-NEXT: li r4, 29
4667 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
4668 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
4669 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
4670 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
4671 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4672 ; CHECK-PREP10-NEXT: mffprd r3, f0
4673 ; CHECK-PREP10-NEXT: blr
4675 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000001
4676 %0 = load double, ptr %add.ptr, align 8
4677 %conv = fptoui double %0 to i64
4681 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4682 define dso_local i64 @ld_align64_uint64_t_double(ptr nocapture readonly %ptr) {
4683 ; CHECK-P10-LABEL: ld_align64_uint64_t_double:
4684 ; CHECK-P10: # %bb.0: # %entry
4685 ; CHECK-P10-NEXT: pli r4, 244140625
4686 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
4687 ; CHECK-P10-NEXT: lfdx f0, r3, r4
4688 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4689 ; CHECK-P10-NEXT: mffprd r3, f0
4690 ; CHECK-P10-NEXT: blr
4692 ; CHECK-PREP10-LABEL: ld_align64_uint64_t_double:
4693 ; CHECK-PREP10: # %bb.0: # %entry
4694 ; CHECK-PREP10-NEXT: lis r4, 3725
4695 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
4696 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
4697 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
4698 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4699 ; CHECK-PREP10-NEXT: mffprd r3, f0
4700 ; CHECK-PREP10-NEXT: blr
4702 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
4703 %0 = load double, ptr %add.ptr, align 8
4704 %conv = fptoui double %0 to i64
4708 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4709 define dso_local i64 @ld_reg_uint64_t_double(ptr nocapture readonly %ptr, i64 %off) {
4710 ; CHECK-LABEL: ld_reg_uint64_t_double:
4711 ; CHECK: # %bb.0: # %entry
4712 ; CHECK-NEXT: lfdx f0, r3, r4
4713 ; CHECK-NEXT: xscvdpuxds f0, f0
4714 ; CHECK-NEXT: mffprd r3, f0
4717 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
4718 %0 = load double, ptr %add.ptr, align 8
4719 %conv = fptoui double %0 to i64
4723 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4724 define dso_local i64 @ld_or_uint64_t_double(i64 %ptr, i8 zeroext %off) {
4725 ; CHECK-LABEL: ld_or_uint64_t_double:
4726 ; CHECK: # %bb.0: # %entry
4727 ; CHECK-NEXT: or r3, r4, r3
4728 ; CHECK-NEXT: lfd f0, 0(r3)
4729 ; CHECK-NEXT: xscvdpuxds f0, f0
4730 ; CHECK-NEXT: mffprd r3, f0
4733 %conv = zext i8 %off to i64
4734 %or = or i64 %conv, %ptr
4735 %0 = inttoptr i64 %or to ptr
4736 %1 = load double, ptr %0, align 8
4737 %conv1 = fptoui double %1 to i64
4741 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4742 define dso_local i64 @ld_or2_uint64_t_double(i64 %ptr, i8 zeroext %off) {
4743 ; CHECK-LABEL: ld_or2_uint64_t_double:
4744 ; CHECK: # %bb.0: # %entry
4745 ; CHECK-NEXT: rldicr r3, r3, 0, 51
4746 ; CHECK-NEXT: lfdx f0, r3, r4
4747 ; CHECK-NEXT: xscvdpuxds f0, f0
4748 ; CHECK-NEXT: mffprd r3, f0
4751 %and = and i64 %ptr, -4096
4752 %conv = zext i8 %off to i64
4753 %or = or i64 %and, %conv
4754 %0 = inttoptr i64 %or to ptr
4755 %1 = load double, ptr %0, align 8
4756 %conv1 = fptoui double %1 to i64
4760 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4761 define dso_local i64 @ld_not_disjoint16_uint64_t_double(i64 %ptr) {
4762 ; CHECK-LABEL: ld_not_disjoint16_uint64_t_double:
4763 ; CHECK: # %bb.0: # %entry
4764 ; CHECK-NEXT: ori r3, r3, 6
4765 ; CHECK-NEXT: lfd f0, 0(r3)
4766 ; CHECK-NEXT: xscvdpuxds f0, f0
4767 ; CHECK-NEXT: mffprd r3, f0
4770 %or = or i64 %ptr, 6
4771 %0 = inttoptr i64 %or to ptr
4772 %1 = load double, ptr %0, align 8
4773 %conv = fptoui double %1 to i64
4777 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4778 define dso_local i64 @ld_disjoint_unalign16_uint64_t_double(i64 %ptr) {
4779 ; CHECK-P10-LABEL: ld_disjoint_unalign16_uint64_t_double:
4780 ; CHECK-P10: # %bb.0: # %entry
4781 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
4782 ; CHECK-P10-NEXT: plfd f0, 6(r3), 0
4783 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4784 ; CHECK-P10-NEXT: mffprd r3, f0
4785 ; CHECK-P10-NEXT: blr
4787 ; CHECK-PREP10-LABEL: ld_disjoint_unalign16_uint64_t_double:
4788 ; CHECK-PREP10: # %bb.0: # %entry
4789 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 51
4790 ; CHECK-PREP10-NEXT: lfd f0, 6(r3)
4791 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4792 ; CHECK-PREP10-NEXT: mffprd r3, f0
4793 ; CHECK-PREP10-NEXT: blr
4795 %and = and i64 %ptr, -4096
4796 %or = or i64 %and, 6
4797 %0 = inttoptr i64 %or to ptr
4798 %1 = load double, ptr %0, align 8
4799 %conv = fptoui double %1 to i64
4803 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4804 define dso_local i64 @ld_disjoint_align16_uint64_t_double(i64 %ptr) {
4805 ; CHECK-LABEL: ld_disjoint_align16_uint64_t_double:
4806 ; CHECK: # %bb.0: # %entry
4807 ; CHECK-NEXT: rldicr r3, r3, 0, 51
4808 ; CHECK-NEXT: lfd f0, 24(r3)
4809 ; CHECK-NEXT: xscvdpuxds f0, f0
4810 ; CHECK-NEXT: mffprd r3, f0
4813 %and = and i64 %ptr, -4096
4814 %or = or i64 %and, 24
4815 %0 = inttoptr i64 %or to ptr
4816 %1 = load double, ptr %0, align 8
4817 %conv = fptoui double %1 to i64
4821 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4822 define dso_local i64 @ld_not_disjoint32_uint64_t_double(i64 %ptr) {
4823 ; CHECK-LABEL: ld_not_disjoint32_uint64_t_double:
4824 ; CHECK: # %bb.0: # %entry
4825 ; CHECK-NEXT: ori r3, r3, 34463
4826 ; CHECK-NEXT: oris r3, r3, 1
4827 ; CHECK-NEXT: lfd f0, 0(r3)
4828 ; CHECK-NEXT: xscvdpuxds f0, f0
4829 ; CHECK-NEXT: mffprd r3, f0
4832 %or = or i64 %ptr, 99999
4833 %0 = inttoptr i64 %or to ptr
4834 %1 = load double, ptr %0, align 8
4835 %conv = fptoui double %1 to i64
4839 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4840 define dso_local i64 @ld_disjoint_unalign32_uint64_t_double(i64 %ptr) {
4841 ; CHECK-P10-LABEL: ld_disjoint_unalign32_uint64_t_double:
4842 ; CHECK-P10: # %bb.0: # %entry
4843 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
4844 ; CHECK-P10-NEXT: plfd f0, 99999(r3), 0
4845 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4846 ; CHECK-P10-NEXT: mffprd r3, f0
4847 ; CHECK-P10-NEXT: blr
4849 ; CHECK-PREP10-LABEL: ld_disjoint_unalign32_uint64_t_double:
4850 ; CHECK-PREP10: # %bb.0: # %entry
4851 ; CHECK-PREP10-NEXT: lis r4, 1
4852 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
4853 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
4854 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
4855 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4856 ; CHECK-PREP10-NEXT: mffprd r3, f0
4857 ; CHECK-PREP10-NEXT: blr
4859 %and = and i64 %ptr, -1048576
4860 %or = or i64 %and, 99999
4861 %0 = inttoptr i64 %or to ptr
4862 %1 = load double, ptr %0, align 8
4863 %conv = fptoui double %1 to i64
4867 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4868 define dso_local i64 @ld_disjoint_align32_uint64_t_double(i64 %ptr) {
4869 ; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_double:
4870 ; CHECK-P10: # %bb.0: # %entry
4871 ; CHECK-P10-NEXT: lis r4, -15264
4872 ; CHECK-P10-NEXT: and r3, r3, r4
4873 ; CHECK-P10-NEXT: plfd f0, 999990000(r3), 0
4874 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4875 ; CHECK-P10-NEXT: mffprd r3, f0
4876 ; CHECK-P10-NEXT: blr
4878 ; CHECK-PREP10-LABEL: ld_disjoint_align32_uint64_t_double:
4879 ; CHECK-PREP10: # %bb.0: # %entry
4880 ; CHECK-PREP10-NEXT: lis r4, -15264
4881 ; CHECK-PREP10-NEXT: and r3, r3, r4
4882 ; CHECK-PREP10-NEXT: lis r4, 15258
4883 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
4884 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
4885 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4886 ; CHECK-PREP10-NEXT: mffprd r3, f0
4887 ; CHECK-PREP10-NEXT: blr
4889 %and = and i64 %ptr, -1000341504
4890 %or = or i64 %and, 999990000
4891 %0 = inttoptr i64 %or to ptr
4892 %1 = load double, ptr %0, align 16
4893 %conv = fptoui double %1 to i64
4897 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4898 define dso_local i64 @ld_not_disjoint64_uint64_t_double(i64 %ptr) {
4899 ; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_double:
4900 ; CHECK-P10: # %bb.0: # %entry
4901 ; CHECK-P10-NEXT: pli r4, 232
4902 ; CHECK-P10-NEXT: pli r5, 3567587329
4903 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
4904 ; CHECK-P10-NEXT: or r3, r3, r5
4905 ; CHECK-P10-NEXT: lfd f0, 0(r3)
4906 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4907 ; CHECK-P10-NEXT: mffprd r3, f0
4908 ; CHECK-P10-NEXT: blr
4910 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_double:
4911 ; CHECK-PREP10: # %bb.0: # %entry
4912 ; CHECK-PREP10-NEXT: li r4, 29
4913 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
4914 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
4915 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
4916 ; CHECK-PREP10-NEXT: or r3, r3, r4
4917 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
4918 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4919 ; CHECK-PREP10-NEXT: mffprd r3, f0
4920 ; CHECK-PREP10-NEXT: blr
4922 %or = or i64 %ptr, 1000000000001
4923 %0 = inttoptr i64 %or to ptr
4924 %1 = load double, ptr %0, align 8
4925 %conv = fptoui double %1 to i64
4929 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4930 define dso_local i64 @ld_disjoint_unalign64_uint64_t_double(i64 %ptr) {
4931 ; CHECK-P10-LABEL: ld_disjoint_unalign64_uint64_t_double:
4932 ; CHECK-P10: # %bb.0: # %entry
4933 ; CHECK-P10-NEXT: pli r4, 232
4934 ; CHECK-P10-NEXT: pli r5, 3567587329
4935 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
4936 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
4937 ; CHECK-P10-NEXT: lfdx f0, r3, r5
4938 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4939 ; CHECK-P10-NEXT: mffprd r3, f0
4940 ; CHECK-P10-NEXT: blr
4942 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint64_t_double:
4943 ; CHECK-PREP10: # %bb.0: # %entry
4944 ; CHECK-PREP10-NEXT: li r4, 29
4945 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
4946 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
4947 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
4948 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
4949 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
4950 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4951 ; CHECK-PREP10-NEXT: mffprd r3, f0
4952 ; CHECK-PREP10-NEXT: blr
4954 %and = and i64 %ptr, -1099511627776
4955 %or = or i64 %and, 1000000000001
4956 %0 = inttoptr i64 %or to ptr
4957 %1 = load double, ptr %0, align 8
4958 %conv = fptoui double %1 to i64
4962 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4963 define dso_local i64 @ld_disjoint_align64_uint64_t_double(i64 %ptr) {
4964 ; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_double:
4965 ; CHECK-P10: # %bb.0: # %entry
4966 ; CHECK-P10-NEXT: pli r4, 244140625
4967 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
4968 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
4969 ; CHECK-P10-NEXT: lfdx f0, r3, r4
4970 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4971 ; CHECK-P10-NEXT: mffprd r3, f0
4972 ; CHECK-P10-NEXT: blr
4974 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_double:
4975 ; CHECK-PREP10: # %bb.0: # %entry
4976 ; CHECK-PREP10-NEXT: lis r4, 3725
4977 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
4978 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
4979 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
4980 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
4981 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4982 ; CHECK-PREP10-NEXT: mffprd r3, f0
4983 ; CHECK-PREP10-NEXT: blr
4985 %and = and i64 %ptr, -1099511627776
4986 %or = or i64 %and, 1000000000000
4987 %0 = inttoptr i64 %or to ptr
4988 %1 = load double, ptr %0, align 4096
4989 %conv = fptoui double %1 to i64
4993 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4994 define dso_local i64 @ld_cst_unalign16_uint64_t_double() {
4995 ; CHECK-P10-LABEL: ld_cst_unalign16_uint64_t_double:
4996 ; CHECK-P10: # %bb.0: # %entry
4997 ; CHECK-P10-NEXT: li r3, 255
4998 ; CHECK-P10-NEXT: lfd f0, 0(r3)
4999 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
5000 ; CHECK-P10-NEXT: mffprd r3, f0
5001 ; CHECK-P10-NEXT: blr
5003 ; CHECK-P9-LABEL: ld_cst_unalign16_uint64_t_double:
5004 ; CHECK-P9: # %bb.0: # %entry
5005 ; CHECK-P9-NEXT: li r3, 255
5006 ; CHECK-P9-NEXT: lfd f0, 0(r3)
5007 ; CHECK-P9-NEXT: xscvdpuxds f0, f0
5008 ; CHECK-P9-NEXT: mffprd r3, f0
5009 ; CHECK-P9-NEXT: blr
5011 ; CHECK-P8-LABEL: ld_cst_unalign16_uint64_t_double:
5012 ; CHECK-P8: # %bb.0: # %entry
5013 ; CHECK-P8-NEXT: lfd f0, 255(0)
5014 ; CHECK-P8-NEXT: xscvdpuxds f0, f0
5015 ; CHECK-P8-NEXT: mffprd r3, f0
5016 ; CHECK-P8-NEXT: blr
5018 %0 = load double, ptr inttoptr (i64 255 to ptr), align 8
5019 %conv = fptoui double %0 to i64
5023 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5024 define dso_local i64 @ld_cst_align16_uint64_t_double() {
5025 ; CHECK-LABEL: ld_cst_align16_uint64_t_double:
5026 ; CHECK: # %bb.0: # %entry
5027 ; CHECK-NEXT: lfd f0, 4080(0)
5028 ; CHECK-NEXT: xscvdpuxds f0, f0
5029 ; CHECK-NEXT: mffprd r3, f0
5032 %0 = load double, ptr inttoptr (i64 4080 to ptr), align 16
5033 %conv = fptoui double %0 to i64
5037 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5038 define dso_local i64 @ld_cst_unalign32_uint64_t_double() {
5039 ; CHECK-P10-LABEL: ld_cst_unalign32_uint64_t_double:
5040 ; CHECK-P10: # %bb.0: # %entry
5041 ; CHECK-P10-NEXT: pli r3, 99999
5042 ; CHECK-P10-NEXT: lfd f0, 0(r3)
5043 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
5044 ; CHECK-P10-NEXT: mffprd r3, f0
5045 ; CHECK-P10-NEXT: blr
5047 ; CHECK-P9-LABEL: ld_cst_unalign32_uint64_t_double:
5048 ; CHECK-P9: # %bb.0: # %entry
5049 ; CHECK-P9-NEXT: lis r3, 1
5050 ; CHECK-P9-NEXT: ori r3, r3, 34463
5051 ; CHECK-P9-NEXT: lfd f0, 0(r3)
5052 ; CHECK-P9-NEXT: xscvdpuxds f0, f0
5053 ; CHECK-P9-NEXT: mffprd r3, f0
5054 ; CHECK-P9-NEXT: blr
5056 ; CHECK-P8-LABEL: ld_cst_unalign32_uint64_t_double:
5057 ; CHECK-P8: # %bb.0: # %entry
5058 ; CHECK-P8-NEXT: lis r3, 2
5059 ; CHECK-P8-NEXT: lfd f0, -31073(r3)
5060 ; CHECK-P8-NEXT: xscvdpuxds f0, f0
5061 ; CHECK-P8-NEXT: mffprd r3, f0
5062 ; CHECK-P8-NEXT: blr
5064 %0 = load double, ptr inttoptr (i64 99999 to ptr), align 8
5065 %conv = fptoui double %0 to i64
5069 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5070 define dso_local i64 @ld_cst_align32_uint64_t_double() {
5071 ; CHECK-LABEL: ld_cst_align32_uint64_t_double:
5072 ; CHECK: # %bb.0: # %entry
5073 ; CHECK-NEXT: lis r3, 153
5074 ; CHECK-NEXT: lfd f0, -27108(r3)
5075 ; CHECK-NEXT: xscvdpuxds f0, f0
5076 ; CHECK-NEXT: mffprd r3, f0
5079 %0 = load double, ptr inttoptr (i64 9999900 to ptr), align 8
5080 %conv = fptoui double %0 to i64
5084 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5085 define dso_local i64 @ld_cst_unalign64_uint64_t_double() {
5086 ; CHECK-P10-LABEL: ld_cst_unalign64_uint64_t_double:
5087 ; CHECK-P10: # %bb.0: # %entry
5088 ; CHECK-P10-NEXT: pli r3, 232
5089 ; CHECK-P10-NEXT: pli r4, 3567587329
5090 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
5091 ; CHECK-P10-NEXT: lfd f0, 0(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_cst_unalign64_uint64_t_double:
5097 ; CHECK-PREP10: # %bb.0: # %entry
5098 ; CHECK-PREP10-NEXT: li r3, 29
5099 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
5100 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
5101 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
5102 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
5103 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
5104 ; CHECK-PREP10-NEXT: mffprd r3, f0
5105 ; CHECK-PREP10-NEXT: blr
5107 %0 = load double, ptr inttoptr (i64 1000000000001 to ptr), align 8
5108 %conv = fptoui double %0 to i64
5112 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5113 define dso_local i64 @ld_cst_align64_uint64_t_double() {
5114 ; CHECK-P10-LABEL: ld_cst_align64_uint64_t_double:
5115 ; CHECK-P10: # %bb.0: # %entry
5116 ; CHECK-P10-NEXT: pli r3, 244140625
5117 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
5118 ; CHECK-P10-NEXT: lfd f0, 0(r3)
5119 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
5120 ; CHECK-P10-NEXT: mffprd r3, f0
5121 ; CHECK-P10-NEXT: blr
5123 ; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_double:
5124 ; CHECK-PREP10: # %bb.0: # %entry
5125 ; CHECK-PREP10-NEXT: lis r3, 3725
5126 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
5127 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
5128 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
5129 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
5130 ; CHECK-PREP10-NEXT: mffprd r3, f0
5131 ; CHECK-PREP10-NEXT: blr
5133 %0 = load double, ptr inttoptr (i64 1000000000000 to ptr), align 4096
5134 %conv = fptoui double %0 to i64
5138 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5139 define dso_local void @st_0_uint64_t_uint8_t(i64 %ptr, i64 %str) {
5140 ; CHECK-LABEL: st_0_uint64_t_uint8_t:
5141 ; CHECK: # %bb.0: # %entry
5142 ; CHECK-NEXT: stb r4, 0(r3)
5145 %conv = trunc i64 %str to i8
5146 %0 = inttoptr i64 %ptr to ptr
5147 store i8 %conv, ptr %0, align 1
5151 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5152 define dso_local void @st_align16_uint64_t_uint8_t(ptr nocapture %ptr, i64 %str) {
5153 ; CHECK-LABEL: st_align16_uint64_t_uint8_t:
5154 ; CHECK: # %bb.0: # %entry
5155 ; CHECK-NEXT: stb r4, 8(r3)
5158 %conv = trunc i64 %str to i8
5159 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
5160 store i8 %conv, ptr %add.ptr, align 1
5164 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5165 define dso_local void @st_align32_uint64_t_uint8_t(ptr nocapture %ptr, i64 %str) {
5166 ; CHECK-P10-LABEL: st_align32_uint64_t_uint8_t:
5167 ; CHECK-P10: # %bb.0: # %entry
5168 ; CHECK-P10-NEXT: pstb r4, 99999000(r3), 0
5169 ; CHECK-P10-NEXT: blr
5171 ; CHECK-PREP10-LABEL: st_align32_uint64_t_uint8_t:
5172 ; CHECK-PREP10: # %bb.0: # %entry
5173 ; CHECK-PREP10-NEXT: lis r5, 1525
5174 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
5175 ; CHECK-PREP10-NEXT: stbx r4, r3, r5
5176 ; CHECK-PREP10-NEXT: blr
5178 %conv = trunc i64 %str to i8
5179 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
5180 store i8 %conv, ptr %add.ptr, align 1
5184 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5185 define dso_local void @st_align64_uint64_t_uint8_t(ptr nocapture %ptr, i64 %str) {
5186 ; CHECK-P10-LABEL: st_align64_uint64_t_uint8_t:
5187 ; CHECK-P10: # %bb.0: # %entry
5188 ; CHECK-P10-NEXT: pli r5, 244140625
5189 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
5190 ; CHECK-P10-NEXT: stbx r4, r3, r5
5191 ; CHECK-P10-NEXT: blr
5193 ; CHECK-PREP10-LABEL: st_align64_uint64_t_uint8_t:
5194 ; CHECK-PREP10: # %bb.0: # %entry
5195 ; CHECK-PREP10-NEXT: lis r5, 3725
5196 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
5197 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
5198 ; CHECK-PREP10-NEXT: stbx r4, r3, r5
5199 ; CHECK-PREP10-NEXT: blr
5201 %conv = trunc i64 %str to i8
5202 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
5203 store i8 %conv, ptr %add.ptr, align 1
5207 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5208 define dso_local void @st_reg_uint64_t_uint8_t(ptr nocapture %ptr, i64 %off, i64 %str) {
5209 ; CHECK-LABEL: st_reg_uint64_t_uint8_t:
5210 ; CHECK: # %bb.0: # %entry
5211 ; CHECK-NEXT: stbx r5, r3, r4
5214 %conv = trunc i64 %str to i8
5215 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
5216 store i8 %conv, ptr %add.ptr, align 1
5220 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5221 define dso_local void @st_or1_uint64_t_uint8_t(i64 %ptr, i8 zeroext %off, i64 %str) {
5222 ; CHECK-LABEL: st_or1_uint64_t_uint8_t:
5223 ; CHECK: # %bb.0: # %entry
5224 ; CHECK-NEXT: or r3, r4, r3
5225 ; CHECK-NEXT: stb r5, 0(r3)
5228 %conv = trunc i64 %str to i8
5229 %conv1 = zext i8 %off to i64
5230 %or = or i64 %conv1, %ptr
5231 %0 = inttoptr i64 %or to ptr
5232 store i8 %conv, ptr %0, align 1
5236 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5237 define dso_local void @st_or2_uint64_t_uint8_t(i64 %ptr, i8 zeroext %off, i64 %str) {
5238 ; CHECK-LABEL: st_or2_uint64_t_uint8_t:
5239 ; CHECK: # %bb.0: # %entry
5240 ; CHECK-NEXT: rldicr r3, r3, 0, 51
5241 ; CHECK-NEXT: stbx r5, r3, r4
5244 %and = and i64 %ptr, -4096
5245 %conv = trunc i64 %str to i8
5246 %conv1 = zext i8 %off to i64
5247 %or = or i64 %and, %conv1
5248 %0 = inttoptr i64 %or to ptr
5249 store i8 %conv, ptr %0, align 1
5253 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5254 define dso_local void @st_not_disjoint16_uint64_t_uint8_t(i64 %ptr, i64 %str) {
5255 ; CHECK-LABEL: st_not_disjoint16_uint64_t_uint8_t:
5256 ; CHECK: # %bb.0: # %entry
5257 ; CHECK-NEXT: ori r3, r3, 6
5258 ; CHECK-NEXT: stb r4, 0(r3)
5261 %conv = trunc i64 %str to i8
5262 %or = or i64 %ptr, 6
5263 %0 = inttoptr i64 %or to ptr
5264 store i8 %conv, ptr %0, align 1
5268 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5269 define dso_local void @st_disjoint_align16_uint64_t_uint8_t(i64 %ptr, i64 %str) {
5270 ; CHECK-LABEL: st_disjoint_align16_uint64_t_uint8_t:
5271 ; CHECK: # %bb.0: # %entry
5272 ; CHECK-NEXT: rldicr r3, r3, 0, 51
5273 ; CHECK-NEXT: stb r4, 24(r3)
5276 %and = and i64 %ptr, -4096
5277 %conv = trunc i64 %str to i8
5278 %or = or i64 %and, 24
5279 %0 = inttoptr i64 %or to ptr
5280 store i8 %conv, ptr %0, align 8
5284 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5285 define dso_local void @st_not_disjoint32_uint64_t_uint8_t(i64 %ptr, i64 %str) {
5286 ; CHECK-LABEL: st_not_disjoint32_uint64_t_uint8_t:
5287 ; CHECK: # %bb.0: # %entry
5288 ; CHECK-NEXT: ori r3, r3, 34463
5289 ; CHECK-NEXT: oris r3, r3, 1
5290 ; CHECK-NEXT: stb r4, 0(r3)
5293 %conv = trunc i64 %str to i8
5294 %or = or i64 %ptr, 99999
5295 %0 = inttoptr i64 %or to ptr
5296 store i8 %conv, ptr %0, align 1
5300 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5301 define dso_local void @st_disjoint_align32_uint64_t_uint8_t(i64 %ptr, i64 %str) {
5302 ; CHECK-P10-LABEL: st_disjoint_align32_uint64_t_uint8_t:
5303 ; CHECK-P10: # %bb.0: # %entry
5304 ; CHECK-P10-NEXT: lis r5, -15264
5305 ; CHECK-P10-NEXT: and r3, r3, r5
5306 ; CHECK-P10-NEXT: pstb r4, 999990000(r3), 0
5307 ; CHECK-P10-NEXT: blr
5309 ; CHECK-PREP10-LABEL: st_disjoint_align32_uint64_t_uint8_t:
5310 ; CHECK-PREP10: # %bb.0: # %entry
5311 ; CHECK-PREP10-NEXT: lis r5, -15264
5312 ; CHECK-PREP10-NEXT: and r3, r3, r5
5313 ; CHECK-PREP10-NEXT: lis r5, 15258
5314 ; CHECK-PREP10-NEXT: ori r5, r5, 41712
5315 ; CHECK-PREP10-NEXT: stbx r4, r3, r5
5316 ; CHECK-PREP10-NEXT: blr
5318 %and = and i64 %ptr, -1000341504
5319 %conv = trunc i64 %str to i8
5320 %or = or i64 %and, 999990000
5321 %0 = inttoptr i64 %or to ptr
5322 store i8 %conv, ptr %0, align 16
5326 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5327 define dso_local void @st_not_disjoint64_uint64_t_uint8_t(i64 %ptr, i64 %str) {
5328 ; CHECK-P10-LABEL: st_not_disjoint64_uint64_t_uint8_t:
5329 ; CHECK-P10: # %bb.0: # %entry
5330 ; CHECK-P10-NEXT: pli r5, 232
5331 ; CHECK-P10-NEXT: pli r6, 3567587329
5332 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
5333 ; CHECK-P10-NEXT: or r3, r3, r6
5334 ; CHECK-P10-NEXT: stb r4, 0(r3)
5335 ; CHECK-P10-NEXT: blr
5337 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint64_t_uint8_t:
5338 ; CHECK-PREP10: # %bb.0: # %entry
5339 ; CHECK-PREP10-NEXT: li r5, 29
5340 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
5341 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
5342 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
5343 ; CHECK-PREP10-NEXT: or r3, r3, r5
5344 ; CHECK-PREP10-NEXT: stb r4, 0(r3)
5345 ; CHECK-PREP10-NEXT: blr
5347 %conv = trunc i64 %str to i8
5348 %or = or i64 %ptr, 1000000000001
5349 %0 = inttoptr i64 %or to ptr
5350 store i8 %conv, ptr %0, align 1
5354 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5355 define dso_local void @st_disjoint_align64_uint64_t_uint8_t(i64 %ptr, i64 %str) {
5356 ; CHECK-P10-LABEL: st_disjoint_align64_uint64_t_uint8_t:
5357 ; CHECK-P10: # %bb.0: # %entry
5358 ; CHECK-P10-NEXT: pli r5, 244140625
5359 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
5360 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
5361 ; CHECK-P10-NEXT: stbx r4, r3, r5
5362 ; CHECK-P10-NEXT: blr
5364 ; CHECK-PREP10-LABEL: st_disjoint_align64_uint64_t_uint8_t:
5365 ; CHECK-PREP10: # %bb.0: # %entry
5366 ; CHECK-PREP10-NEXT: lis r5, 3725
5367 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
5368 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
5369 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
5370 ; CHECK-PREP10-NEXT: stbx r4, r3, r5
5371 ; CHECK-PREP10-NEXT: blr
5373 %and = and i64 %ptr, -1099511627776
5374 %conv = trunc i64 %str to i8
5375 %or = or i64 %and, 1000000000000
5376 %0 = inttoptr i64 %or to ptr
5377 store i8 %conv, ptr %0, align 4096
5381 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5382 define dso_local void @st_cst_align16_uint64_t_uint8_t(i64 %str) {
5383 ; CHECK-LABEL: st_cst_align16_uint64_t_uint8_t:
5384 ; CHECK: # %bb.0: # %entry
5385 ; CHECK-NEXT: stb r3, 4080(0)
5388 %conv = trunc i64 %str to i8
5389 store i8 %conv, ptr inttoptr (i64 4080 to ptr), align 16
5393 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5394 define dso_local void @st_cst_align32_uint64_t_uint8_t(i64 %str) {
5395 ; CHECK-LABEL: st_cst_align32_uint64_t_uint8_t:
5396 ; CHECK: # %bb.0: # %entry
5397 ; CHECK-NEXT: lis r4, 153
5398 ; CHECK-NEXT: stb r3, -27108(r4)
5401 %conv = trunc i64 %str to i8
5402 store i8 %conv, ptr inttoptr (i64 9999900 to ptr), align 4
5406 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5407 define dso_local void @st_cst_align64_uint64_t_uint8_t(i64 %str) {
5408 ; CHECK-P10-LABEL: st_cst_align64_uint64_t_uint8_t:
5409 ; CHECK-P10: # %bb.0: # %entry
5410 ; CHECK-P10-NEXT: pli r4, 244140625
5411 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5412 ; CHECK-P10-NEXT: stb r3, 0(r4)
5413 ; CHECK-P10-NEXT: blr
5415 ; CHECK-PREP10-LABEL: st_cst_align64_uint64_t_uint8_t:
5416 ; CHECK-PREP10: # %bb.0: # %entry
5417 ; CHECK-PREP10-NEXT: lis r4, 3725
5418 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
5419 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
5420 ; CHECK-PREP10-NEXT: stb r3, 0(r4)
5421 ; CHECK-PREP10-NEXT: blr
5423 %conv = trunc i64 %str to i8
5424 store i8 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
5428 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5429 define dso_local void @st_0_uint64_t_uint16_t(i64 %ptr, i64 %str) {
5430 ; CHECK-LABEL: st_0_uint64_t_uint16_t:
5431 ; CHECK: # %bb.0: # %entry
5432 ; CHECK-NEXT: sth r4, 0(r3)
5435 %conv = trunc i64 %str to i16
5436 %0 = inttoptr i64 %ptr to ptr
5437 store i16 %conv, ptr %0, align 2
5441 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5442 define dso_local void @st_align16_uint64_t_uint16_t(ptr nocapture %ptr, i64 %str) {
5443 ; CHECK-LABEL: st_align16_uint64_t_uint16_t:
5444 ; CHECK: # %bb.0: # %entry
5445 ; CHECK-NEXT: sth r4, 8(r3)
5448 %conv = trunc i64 %str to i16
5449 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
5450 store i16 %conv, ptr %add.ptr, align 2
5454 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5455 define dso_local void @st_align32_uint64_t_uint16_t(ptr nocapture %ptr, i64 %str) {
5456 ; CHECK-P10-LABEL: st_align32_uint64_t_uint16_t:
5457 ; CHECK-P10: # %bb.0: # %entry
5458 ; CHECK-P10-NEXT: psth r4, 99999000(r3), 0
5459 ; CHECK-P10-NEXT: blr
5461 ; CHECK-PREP10-LABEL: st_align32_uint64_t_uint16_t:
5462 ; CHECK-PREP10: # %bb.0: # %entry
5463 ; CHECK-PREP10-NEXT: lis r5, 1525
5464 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
5465 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
5466 ; CHECK-PREP10-NEXT: blr
5468 %conv = trunc i64 %str to i16
5469 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
5470 store i16 %conv, ptr %add.ptr, align 2
5474 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5475 define dso_local void @st_align64_uint64_t_uint16_t(ptr nocapture %ptr, i64 %str) {
5476 ; CHECK-P10-LABEL: st_align64_uint64_t_uint16_t:
5477 ; CHECK-P10: # %bb.0: # %entry
5478 ; CHECK-P10-NEXT: pli r5, 244140625
5479 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
5480 ; CHECK-P10-NEXT: sthx r4, r3, r5
5481 ; CHECK-P10-NEXT: blr
5483 ; CHECK-PREP10-LABEL: st_align64_uint64_t_uint16_t:
5484 ; CHECK-PREP10: # %bb.0: # %entry
5485 ; CHECK-PREP10-NEXT: lis r5, 3725
5486 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
5487 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
5488 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
5489 ; CHECK-PREP10-NEXT: blr
5491 %conv = trunc i64 %str to i16
5492 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
5493 store i16 %conv, ptr %add.ptr, align 2
5497 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5498 define dso_local void @st_reg_uint64_t_uint16_t(ptr nocapture %ptr, i64 %off, i64 %str) {
5499 ; CHECK-LABEL: st_reg_uint64_t_uint16_t:
5500 ; CHECK: # %bb.0: # %entry
5501 ; CHECK-NEXT: sthx r5, r3, r4
5504 %conv = trunc i64 %str to i16
5505 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
5506 store i16 %conv, ptr %add.ptr, align 2
5510 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5511 define dso_local void @st_or1_uint64_t_uint16_t(i64 %ptr, i8 zeroext %off, i64 %str) {
5512 ; CHECK-LABEL: st_or1_uint64_t_uint16_t:
5513 ; CHECK: # %bb.0: # %entry
5514 ; CHECK-NEXT: or r3, r4, r3
5515 ; CHECK-NEXT: sth r5, 0(r3)
5518 %conv = trunc i64 %str to i16
5519 %conv1 = zext i8 %off to i64
5520 %or = or i64 %conv1, %ptr
5521 %0 = inttoptr i64 %or to ptr
5522 store i16 %conv, ptr %0, align 2
5526 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5527 define dso_local void @st_or2_uint64_t_uint16_t(i64 %ptr, i8 zeroext %off, i64 %str) {
5528 ; CHECK-LABEL: st_or2_uint64_t_uint16_t:
5529 ; CHECK: # %bb.0: # %entry
5530 ; CHECK-NEXT: rldicr r3, r3, 0, 51
5531 ; CHECK-NEXT: sthx r5, r3, r4
5534 %and = and i64 %ptr, -4096
5535 %conv = trunc i64 %str to i16
5536 %conv1 = zext i8 %off to i64
5537 %or = or i64 %and, %conv1
5538 %0 = inttoptr i64 %or to ptr
5539 store i16 %conv, ptr %0, align 2
5543 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5544 define dso_local void @st_not_disjoint16_uint64_t_uint16_t(i64 %ptr, i64 %str) {
5545 ; CHECK-LABEL: st_not_disjoint16_uint64_t_uint16_t:
5546 ; CHECK: # %bb.0: # %entry
5547 ; CHECK-NEXT: ori r3, r3, 6
5548 ; CHECK-NEXT: sth r4, 0(r3)
5551 %conv = trunc i64 %str to i16
5552 %or = or i64 %ptr, 6
5553 %0 = inttoptr i64 %or to ptr
5554 store i16 %conv, ptr %0, align 2
5558 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5559 define dso_local void @st_disjoint_align16_uint64_t_uint16_t(i64 %ptr, i64 %str) {
5560 ; CHECK-LABEL: st_disjoint_align16_uint64_t_uint16_t:
5561 ; CHECK: # %bb.0: # %entry
5562 ; CHECK-NEXT: rldicr r3, r3, 0, 51
5563 ; CHECK-NEXT: sth r4, 24(r3)
5566 %and = and i64 %ptr, -4096
5567 %conv = trunc i64 %str to i16
5568 %or = or i64 %and, 24
5569 %0 = inttoptr i64 %or to ptr
5570 store i16 %conv, ptr %0, align 8
5574 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5575 define dso_local void @st_not_disjoint32_uint64_t_uint16_t(i64 %ptr, i64 %str) {
5576 ; CHECK-LABEL: st_not_disjoint32_uint64_t_uint16_t:
5577 ; CHECK: # %bb.0: # %entry
5578 ; CHECK-NEXT: ori r3, r3, 34463
5579 ; CHECK-NEXT: oris r3, r3, 1
5580 ; CHECK-NEXT: sth r4, 0(r3)
5583 %conv = trunc i64 %str to i16
5584 %or = or i64 %ptr, 99999
5585 %0 = inttoptr i64 %or to ptr
5586 store i16 %conv, ptr %0, align 2
5590 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5591 define dso_local void @st_disjoint_align32_uint64_t_uint16_t(i64 %ptr, i64 %str) {
5592 ; CHECK-P10-LABEL: st_disjoint_align32_uint64_t_uint16_t:
5593 ; CHECK-P10: # %bb.0: # %entry
5594 ; CHECK-P10-NEXT: lis r5, -15264
5595 ; CHECK-P10-NEXT: and r3, r3, r5
5596 ; CHECK-P10-NEXT: psth r4, 999990000(r3), 0
5597 ; CHECK-P10-NEXT: blr
5599 ; CHECK-PREP10-LABEL: st_disjoint_align32_uint64_t_uint16_t:
5600 ; CHECK-PREP10: # %bb.0: # %entry
5601 ; CHECK-PREP10-NEXT: lis r5, -15264
5602 ; CHECK-PREP10-NEXT: and r3, r3, r5
5603 ; CHECK-PREP10-NEXT: lis r5, 15258
5604 ; CHECK-PREP10-NEXT: ori r5, r5, 41712
5605 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
5606 ; CHECK-PREP10-NEXT: blr
5608 %and = and i64 %ptr, -1000341504
5609 %conv = trunc i64 %str to i16
5610 %or = or i64 %and, 999990000
5611 %0 = inttoptr i64 %or to ptr
5612 store i16 %conv, ptr %0, align 16
5616 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5617 define dso_local void @st_not_disjoint64_uint64_t_uint16_t(i64 %ptr, i64 %str) {
5618 ; CHECK-P10-LABEL: st_not_disjoint64_uint64_t_uint16_t:
5619 ; CHECK-P10: # %bb.0: # %entry
5620 ; CHECK-P10-NEXT: pli r5, 232
5621 ; CHECK-P10-NEXT: pli r6, 3567587329
5622 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
5623 ; CHECK-P10-NEXT: or r3, r3, r6
5624 ; CHECK-P10-NEXT: sth r4, 0(r3)
5625 ; CHECK-P10-NEXT: blr
5627 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint64_t_uint16_t:
5628 ; CHECK-PREP10: # %bb.0: # %entry
5629 ; CHECK-PREP10-NEXT: li r5, 29
5630 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
5631 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
5632 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
5633 ; CHECK-PREP10-NEXT: or r3, r3, r5
5634 ; CHECK-PREP10-NEXT: sth r4, 0(r3)
5635 ; CHECK-PREP10-NEXT: blr
5637 %conv = trunc i64 %str to i16
5638 %or = or i64 %ptr, 1000000000001
5639 %0 = inttoptr i64 %or to ptr
5640 store i16 %conv, ptr %0, align 2
5644 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5645 define dso_local void @st_disjoint_align64_uint64_t_uint16_t(i64 %ptr, i64 %str) {
5646 ; CHECK-P10-LABEL: st_disjoint_align64_uint64_t_uint16_t:
5647 ; CHECK-P10: # %bb.0: # %entry
5648 ; CHECK-P10-NEXT: pli r5, 244140625
5649 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
5650 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
5651 ; CHECK-P10-NEXT: sthx r4, r3, r5
5652 ; CHECK-P10-NEXT: blr
5654 ; CHECK-PREP10-LABEL: st_disjoint_align64_uint64_t_uint16_t:
5655 ; CHECK-PREP10: # %bb.0: # %entry
5656 ; CHECK-PREP10-NEXT: lis r5, 3725
5657 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
5658 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
5659 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
5660 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
5661 ; CHECK-PREP10-NEXT: blr
5663 %and = and i64 %ptr, -1099511627776
5664 %conv = trunc i64 %str to i16
5665 %or = or i64 %and, 1000000000000
5666 %0 = inttoptr i64 %or to ptr
5667 store i16 %conv, ptr %0, align 4096
5671 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5672 define dso_local void @st_cst_align16_uint64_t_uint16_t(i64 %str) {
5673 ; CHECK-LABEL: st_cst_align16_uint64_t_uint16_t:
5674 ; CHECK: # %bb.0: # %entry
5675 ; CHECK-NEXT: sth r3, 4080(0)
5678 %conv = trunc i64 %str to i16
5679 store i16 %conv, ptr inttoptr (i64 4080 to ptr), align 16
5683 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5684 define dso_local void @st_cst_align32_uint64_t_uint16_t(i64 %str) {
5685 ; CHECK-LABEL: st_cst_align32_uint64_t_uint16_t:
5686 ; CHECK: # %bb.0: # %entry
5687 ; CHECK-NEXT: lis r4, 153
5688 ; CHECK-NEXT: sth r3, -27108(r4)
5691 %conv = trunc i64 %str to i16
5692 store i16 %conv, ptr inttoptr (i64 9999900 to ptr), align 4
5696 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5697 define dso_local void @st_cst_align64_uint64_t_uint16_t(i64 %str) {
5698 ; CHECK-P10-LABEL: st_cst_align64_uint64_t_uint16_t:
5699 ; CHECK-P10: # %bb.0: # %entry
5700 ; CHECK-P10-NEXT: pli r4, 244140625
5701 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5702 ; CHECK-P10-NEXT: sth r3, 0(r4)
5703 ; CHECK-P10-NEXT: blr
5705 ; CHECK-PREP10-LABEL: st_cst_align64_uint64_t_uint16_t:
5706 ; CHECK-PREP10: # %bb.0: # %entry
5707 ; CHECK-PREP10-NEXT: lis r4, 3725
5708 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
5709 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
5710 ; CHECK-PREP10-NEXT: sth r3, 0(r4)
5711 ; CHECK-PREP10-NEXT: blr
5713 %conv = trunc i64 %str to i16
5714 store i16 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
5718 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5719 define dso_local void @st_0_uint64_t_int16_t(i64 %ptr, i64 %str) {
5720 ; CHECK-LABEL: st_0_uint64_t_int16_t:
5721 ; CHECK: # %bb.0: # %entry
5722 ; CHECK-NEXT: sth r4, 0(r3)
5725 %conv = trunc i64 %str to i16
5726 %0 = inttoptr i64 %ptr to ptr
5727 store i16 %conv, ptr %0, align 2
5731 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5732 define dso_local void @st_align16_uint64_t_int16_t(ptr nocapture %ptr, i64 %str) {
5733 ; CHECK-LABEL: st_align16_uint64_t_int16_t:
5734 ; CHECK: # %bb.0: # %entry
5735 ; CHECK-NEXT: sth r4, 8(r3)
5738 %conv = trunc i64 %str to i16
5739 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
5740 store i16 %conv, ptr %add.ptr, align 2
5744 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5745 define dso_local void @st_align32_uint64_t_int16_t(ptr nocapture %ptr, i64 %str) {
5746 ; CHECK-P10-LABEL: st_align32_uint64_t_int16_t:
5747 ; CHECK-P10: # %bb.0: # %entry
5748 ; CHECK-P10-NEXT: psth r4, 99999000(r3), 0
5749 ; CHECK-P10-NEXT: blr
5751 ; CHECK-PREP10-LABEL: st_align32_uint64_t_int16_t:
5752 ; CHECK-PREP10: # %bb.0: # %entry
5753 ; CHECK-PREP10-NEXT: lis r5, 1525
5754 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
5755 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
5756 ; CHECK-PREP10-NEXT: blr
5758 %conv = trunc i64 %str to i16
5759 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
5760 store i16 %conv, ptr %add.ptr, align 2
5764 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5765 define dso_local void @st_align64_uint64_t_int16_t(ptr nocapture %ptr, i64 %str) {
5766 ; CHECK-P10-LABEL: st_align64_uint64_t_int16_t:
5767 ; CHECK-P10: # %bb.0: # %entry
5768 ; CHECK-P10-NEXT: pli r5, 244140625
5769 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
5770 ; CHECK-P10-NEXT: sthx r4, r3, r5
5771 ; CHECK-P10-NEXT: blr
5773 ; CHECK-PREP10-LABEL: st_align64_uint64_t_int16_t:
5774 ; CHECK-PREP10: # %bb.0: # %entry
5775 ; CHECK-PREP10-NEXT: lis r5, 3725
5776 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
5777 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
5778 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
5779 ; CHECK-PREP10-NEXT: blr
5781 %conv = trunc i64 %str to i16
5782 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
5783 store i16 %conv, ptr %add.ptr, align 2
5787 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5788 define dso_local void @st_reg_uint64_t_int16_t(ptr nocapture %ptr, i64 %off, i64 %str) {
5789 ; CHECK-LABEL: st_reg_uint64_t_int16_t:
5790 ; CHECK: # %bb.0: # %entry
5791 ; CHECK-NEXT: sthx r5, r3, r4
5794 %conv = trunc i64 %str to i16
5795 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
5796 store i16 %conv, ptr %add.ptr, align 2
5800 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5801 define dso_local void @st_or1_uint64_t_int16_t(i64 %ptr, i8 zeroext %off, i64 %str) {
5802 ; CHECK-LABEL: st_or1_uint64_t_int16_t:
5803 ; CHECK: # %bb.0: # %entry
5804 ; CHECK-NEXT: or r3, r4, r3
5805 ; CHECK-NEXT: sth r5, 0(r3)
5808 %conv = trunc i64 %str to i16
5809 %conv1 = zext i8 %off to i64
5810 %or = or i64 %conv1, %ptr
5811 %0 = inttoptr i64 %or to ptr
5812 store i16 %conv, ptr %0, align 2
5816 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5817 define dso_local void @st_or2_uint64_t_int16_t(i64 %ptr, i8 zeroext %off, i64 %str) {
5818 ; CHECK-LABEL: st_or2_uint64_t_int16_t:
5819 ; CHECK: # %bb.0: # %entry
5820 ; CHECK-NEXT: rldicr r3, r3, 0, 51
5821 ; CHECK-NEXT: sthx r5, r3, r4
5824 %and = and i64 %ptr, -4096
5825 %conv = trunc i64 %str to i16
5826 %conv1 = zext i8 %off to i64
5827 %or = or i64 %and, %conv1
5828 %0 = inttoptr i64 %or to ptr
5829 store i16 %conv, ptr %0, align 2
5833 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5834 define dso_local void @st_not_disjoint16_uint64_t_int16_t(i64 %ptr, i64 %str) {
5835 ; CHECK-LABEL: st_not_disjoint16_uint64_t_int16_t:
5836 ; CHECK: # %bb.0: # %entry
5837 ; CHECK-NEXT: ori r3, r3, 6
5838 ; CHECK-NEXT: sth r4, 0(r3)
5841 %conv = trunc i64 %str to i16
5842 %or = or i64 %ptr, 6
5843 %0 = inttoptr i64 %or to ptr
5844 store i16 %conv, ptr %0, align 2
5848 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5849 define dso_local void @st_disjoint_align16_uint64_t_int16_t(i64 %ptr, i64 %str) {
5850 ; CHECK-LABEL: st_disjoint_align16_uint64_t_int16_t:
5851 ; CHECK: # %bb.0: # %entry
5852 ; CHECK-NEXT: rldicr r3, r3, 0, 51
5853 ; CHECK-NEXT: sth r4, 24(r3)
5856 %and = and i64 %ptr, -4096
5857 %conv = trunc i64 %str to i16
5858 %or = or i64 %and, 24
5859 %0 = inttoptr i64 %or to ptr
5860 store i16 %conv, ptr %0, align 8
5864 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5865 define dso_local void @st_not_disjoint32_uint64_t_int16_t(i64 %ptr, i64 %str) {
5866 ; CHECK-LABEL: st_not_disjoint32_uint64_t_int16_t:
5867 ; CHECK: # %bb.0: # %entry
5868 ; CHECK-NEXT: ori r3, r3, 34463
5869 ; CHECK-NEXT: oris r3, r3, 1
5870 ; CHECK-NEXT: sth r4, 0(r3)
5873 %conv = trunc i64 %str to i16
5874 %or = or i64 %ptr, 99999
5875 %0 = inttoptr i64 %or to ptr
5876 store i16 %conv, ptr %0, align 2
5880 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5881 define dso_local void @st_disjoint_align32_uint64_t_int16_t(i64 %ptr, i64 %str) {
5882 ; CHECK-P10-LABEL: st_disjoint_align32_uint64_t_int16_t:
5883 ; CHECK-P10: # %bb.0: # %entry
5884 ; CHECK-P10-NEXT: lis r5, -15264
5885 ; CHECK-P10-NEXT: and r3, r3, r5
5886 ; CHECK-P10-NEXT: psth r4, 999990000(r3), 0
5887 ; CHECK-P10-NEXT: blr
5889 ; CHECK-PREP10-LABEL: st_disjoint_align32_uint64_t_int16_t:
5890 ; CHECK-PREP10: # %bb.0: # %entry
5891 ; CHECK-PREP10-NEXT: lis r5, -15264
5892 ; CHECK-PREP10-NEXT: and r3, r3, r5
5893 ; CHECK-PREP10-NEXT: lis r5, 15258
5894 ; CHECK-PREP10-NEXT: ori r5, r5, 41712
5895 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
5896 ; CHECK-PREP10-NEXT: blr
5898 %and = and i64 %ptr, -1000341504
5899 %conv = trunc i64 %str to i16
5900 %or = or i64 %and, 999990000
5901 %0 = inttoptr i64 %or to ptr
5902 store i16 %conv, ptr %0, align 16
5906 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5907 define dso_local void @st_not_disjoint64_uint64_t_int16_t(i64 %ptr, i64 %str) {
5908 ; CHECK-P10-LABEL: st_not_disjoint64_uint64_t_int16_t:
5909 ; CHECK-P10: # %bb.0: # %entry
5910 ; CHECK-P10-NEXT: pli r5, 232
5911 ; CHECK-P10-NEXT: pli r6, 3567587329
5912 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
5913 ; CHECK-P10-NEXT: or r3, r3, r6
5914 ; CHECK-P10-NEXT: sth r4, 0(r3)
5915 ; CHECK-P10-NEXT: blr
5917 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint64_t_int16_t:
5918 ; CHECK-PREP10: # %bb.0: # %entry
5919 ; CHECK-PREP10-NEXT: li r5, 29
5920 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
5921 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
5922 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
5923 ; CHECK-PREP10-NEXT: or r3, r3, r5
5924 ; CHECK-PREP10-NEXT: sth r4, 0(r3)
5925 ; CHECK-PREP10-NEXT: blr
5927 %conv = trunc i64 %str to i16
5928 %or = or i64 %ptr, 1000000000001
5929 %0 = inttoptr i64 %or to ptr
5930 store i16 %conv, ptr %0, align 2
5934 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5935 define dso_local void @st_disjoint_align64_uint64_t_int16_t(i64 %ptr, i64 %str) {
5936 ; CHECK-P10-LABEL: st_disjoint_align64_uint64_t_int16_t:
5937 ; CHECK-P10: # %bb.0: # %entry
5938 ; CHECK-P10-NEXT: pli r5, 244140625
5939 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
5940 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
5941 ; CHECK-P10-NEXT: sthx r4, r3, r5
5942 ; CHECK-P10-NEXT: blr
5944 ; CHECK-PREP10-LABEL: st_disjoint_align64_uint64_t_int16_t:
5945 ; CHECK-PREP10: # %bb.0: # %entry
5946 ; CHECK-PREP10-NEXT: lis r5, 3725
5947 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
5948 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
5949 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
5950 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
5951 ; CHECK-PREP10-NEXT: blr
5953 %and = and i64 %ptr, -1099511627776
5954 %conv = trunc i64 %str to i16
5955 %or = or i64 %and, 1000000000000
5956 %0 = inttoptr i64 %or to ptr
5957 store i16 %conv, ptr %0, align 4096
5961 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5962 define dso_local void @st_cst_align16_uint64_t_int16_t(i64 %str) {
5963 ; CHECK-LABEL: st_cst_align16_uint64_t_int16_t:
5964 ; CHECK: # %bb.0: # %entry
5965 ; CHECK-NEXT: sth r3, 4080(0)
5968 %conv = trunc i64 %str to i16
5969 store i16 %conv, ptr inttoptr (i64 4080 to ptr), align 16
5973 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5974 define dso_local void @st_cst_align32_uint64_t_int16_t(i64 %str) {
5975 ; CHECK-LABEL: st_cst_align32_uint64_t_int16_t:
5976 ; CHECK: # %bb.0: # %entry
5977 ; CHECK-NEXT: lis r4, 153
5978 ; CHECK-NEXT: sth r3, -27108(r4)
5981 %conv = trunc i64 %str to i16
5982 store i16 %conv, ptr inttoptr (i64 9999900 to ptr), align 4
5986 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5987 define dso_local void @st_cst_align64_uint64_t_int16_t(i64 %str) {
5988 ; CHECK-P10-LABEL: st_cst_align64_uint64_t_int16_t:
5989 ; CHECK-P10: # %bb.0: # %entry
5990 ; CHECK-P10-NEXT: pli r4, 244140625
5991 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5992 ; CHECK-P10-NEXT: sth r3, 0(r4)
5993 ; CHECK-P10-NEXT: blr
5995 ; CHECK-PREP10-LABEL: st_cst_align64_uint64_t_int16_t:
5996 ; CHECK-PREP10: # %bb.0: # %entry
5997 ; CHECK-PREP10-NEXT: lis r4, 3725
5998 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
5999 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
6000 ; CHECK-PREP10-NEXT: sth r3, 0(r4)
6001 ; CHECK-PREP10-NEXT: blr
6003 %conv = trunc i64 %str to i16
6004 store i16 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
6008 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6009 define dso_local void @st_0_uint64_t_uint32_t(i64 %ptr, i64 %str) {
6010 ; CHECK-LABEL: st_0_uint64_t_uint32_t:
6011 ; CHECK: # %bb.0: # %entry
6012 ; CHECK-NEXT: stw r4, 0(r3)
6015 %conv = trunc i64 %str to i32
6016 %0 = inttoptr i64 %ptr to ptr
6017 store i32 %conv, ptr %0, align 4
6021 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6022 define dso_local void @st_align16_uint64_t_uint32_t(ptr nocapture %ptr, i64 %str) {
6023 ; CHECK-LABEL: st_align16_uint64_t_uint32_t:
6024 ; CHECK: # %bb.0: # %entry
6025 ; CHECK-NEXT: stw r4, 8(r3)
6028 %conv = trunc i64 %str to i32
6029 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
6030 store i32 %conv, ptr %add.ptr, align 4
6034 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6035 define dso_local void @st_align32_uint64_t_uint32_t(ptr nocapture %ptr, i64 %str) {
6036 ; CHECK-P10-LABEL: st_align32_uint64_t_uint32_t:
6037 ; CHECK-P10: # %bb.0: # %entry
6038 ; CHECK-P10-NEXT: pstw r4, 99999000(r3), 0
6039 ; CHECK-P10-NEXT: blr
6041 ; CHECK-PREP10-LABEL: st_align32_uint64_t_uint32_t:
6042 ; CHECK-PREP10: # %bb.0: # %entry
6043 ; CHECK-PREP10-NEXT: lis r5, 1525
6044 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
6045 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
6046 ; CHECK-PREP10-NEXT: blr
6048 %conv = trunc i64 %str to i32
6049 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
6050 store i32 %conv, ptr %add.ptr, align 4
6054 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6055 define dso_local void @st_align64_uint64_t_uint32_t(ptr nocapture %ptr, i64 %str) {
6056 ; CHECK-P10-LABEL: st_align64_uint64_t_uint32_t:
6057 ; CHECK-P10: # %bb.0: # %entry
6058 ; CHECK-P10-NEXT: pli r5, 244140625
6059 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6060 ; CHECK-P10-NEXT: stwx r4, r3, r5
6061 ; CHECK-P10-NEXT: blr
6063 ; CHECK-PREP10-LABEL: st_align64_uint64_t_uint32_t:
6064 ; CHECK-PREP10: # %bb.0: # %entry
6065 ; CHECK-PREP10-NEXT: lis r5, 3725
6066 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6067 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6068 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
6069 ; CHECK-PREP10-NEXT: blr
6071 %conv = trunc i64 %str to i32
6072 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
6073 store i32 %conv, ptr %add.ptr, align 4
6077 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6078 define dso_local void @st_reg_uint64_t_uint32_t(ptr nocapture %ptr, i64 %off, i64 %str) {
6079 ; CHECK-LABEL: st_reg_uint64_t_uint32_t:
6080 ; CHECK: # %bb.0: # %entry
6081 ; CHECK-NEXT: stwx r5, r3, r4
6084 %conv = trunc i64 %str to i32
6085 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
6086 store i32 %conv, ptr %add.ptr, align 4
6090 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6091 define dso_local void @st_or1_uint64_t_uint32_t(i64 %ptr, i8 zeroext %off, i64 %str) {
6092 ; CHECK-LABEL: st_or1_uint64_t_uint32_t:
6093 ; CHECK: # %bb.0: # %entry
6094 ; CHECK-NEXT: or r3, r4, r3
6095 ; CHECK-NEXT: stw r5, 0(r3)
6098 %conv = trunc i64 %str to i32
6099 %conv1 = zext i8 %off to i64
6100 %or = or i64 %conv1, %ptr
6101 %0 = inttoptr i64 %or to ptr
6102 store i32 %conv, ptr %0, align 4
6106 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6107 define dso_local void @st_or2_uint64_t_uint32_t(i64 %ptr, i8 zeroext %off, i64 %str) {
6108 ; CHECK-LABEL: st_or2_uint64_t_uint32_t:
6109 ; CHECK: # %bb.0: # %entry
6110 ; CHECK-NEXT: rldicr r3, r3, 0, 51
6111 ; CHECK-NEXT: stwx r5, r3, r4
6114 %and = and i64 %ptr, -4096
6115 %conv = trunc i64 %str to i32
6116 %conv1 = zext i8 %off to i64
6117 %or = or i64 %and, %conv1
6118 %0 = inttoptr i64 %or to ptr
6119 store i32 %conv, ptr %0, align 4
6123 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6124 define dso_local void @st_not_disjoint16_uint64_t_uint32_t(i64 %ptr, i64 %str) {
6125 ; CHECK-LABEL: st_not_disjoint16_uint64_t_uint32_t:
6126 ; CHECK: # %bb.0: # %entry
6127 ; CHECK-NEXT: ori r3, r3, 6
6128 ; CHECK-NEXT: stw r4, 0(r3)
6131 %conv = trunc i64 %str to i32
6132 %or = or i64 %ptr, 6
6133 %0 = inttoptr i64 %or to ptr
6134 store i32 %conv, ptr %0, align 4
6138 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6139 define dso_local void @st_disjoint_align16_uint64_t_uint32_t(i64 %ptr, i64 %str) {
6140 ; CHECK-LABEL: st_disjoint_align16_uint64_t_uint32_t:
6141 ; CHECK: # %bb.0: # %entry
6142 ; CHECK-NEXT: rldicr r3, r3, 0, 51
6143 ; CHECK-NEXT: stw r4, 24(r3)
6146 %and = and i64 %ptr, -4096
6147 %conv = trunc i64 %str to i32
6148 %or = or i64 %and, 24
6149 %0 = inttoptr i64 %or to ptr
6150 store i32 %conv, ptr %0, align 8
6154 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6155 define dso_local void @st_not_disjoint32_uint64_t_uint32_t(i64 %ptr, i64 %str) {
6156 ; CHECK-LABEL: st_not_disjoint32_uint64_t_uint32_t:
6157 ; CHECK: # %bb.0: # %entry
6158 ; CHECK-NEXT: ori r3, r3, 34463
6159 ; CHECK-NEXT: oris r3, r3, 1
6160 ; CHECK-NEXT: stw r4, 0(r3)
6163 %conv = trunc i64 %str to i32
6164 %or = or i64 %ptr, 99999
6165 %0 = inttoptr i64 %or 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_disjoint_align32_uint64_t_uint32_t(i64 %ptr, i64 %str) {
6172 ; CHECK-P10-LABEL: st_disjoint_align32_uint64_t_uint32_t:
6173 ; CHECK-P10: # %bb.0: # %entry
6174 ; CHECK-P10-NEXT: lis r5, -15264
6175 ; CHECK-P10-NEXT: and r3, r3, r5
6176 ; CHECK-P10-NEXT: pstw r4, 999990000(r3), 0
6177 ; CHECK-P10-NEXT: blr
6179 ; CHECK-PREP10-LABEL: st_disjoint_align32_uint64_t_uint32_t:
6180 ; CHECK-PREP10: # %bb.0: # %entry
6181 ; CHECK-PREP10-NEXT: lis r5, -15264
6182 ; CHECK-PREP10-NEXT: and r3, r3, r5
6183 ; CHECK-PREP10-NEXT: lis r5, 15258
6184 ; CHECK-PREP10-NEXT: ori r5, r5, 41712
6185 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
6186 ; CHECK-PREP10-NEXT: blr
6188 %and = and i64 %ptr, -1000341504
6189 %conv = trunc i64 %str to i32
6190 %or = or i64 %and, 999990000
6191 %0 = inttoptr i64 %or to ptr
6192 store i32 %conv, ptr %0, align 16
6196 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6197 define dso_local void @st_not_disjoint64_uint64_t_uint32_t(i64 %ptr, i64 %str) {
6198 ; CHECK-P10-LABEL: st_not_disjoint64_uint64_t_uint32_t:
6199 ; CHECK-P10: # %bb.0: # %entry
6200 ; CHECK-P10-NEXT: pli r5, 232
6201 ; CHECK-P10-NEXT: pli r6, 3567587329
6202 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
6203 ; CHECK-P10-NEXT: or r3, r3, r6
6204 ; CHECK-P10-NEXT: stw r4, 0(r3)
6205 ; CHECK-P10-NEXT: blr
6207 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint64_t_uint32_t:
6208 ; CHECK-PREP10: # %bb.0: # %entry
6209 ; CHECK-PREP10-NEXT: li r5, 29
6210 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
6211 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
6212 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
6213 ; CHECK-PREP10-NEXT: or r3, r3, r5
6214 ; CHECK-PREP10-NEXT: stw r4, 0(r3)
6215 ; CHECK-PREP10-NEXT: blr
6217 %conv = trunc i64 %str to i32
6218 %or = or i64 %ptr, 1000000000001
6219 %0 = inttoptr i64 %or to ptr
6220 store i32 %conv, ptr %0, align 4
6224 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6225 define dso_local void @st_disjoint_align64_uint64_t_uint32_t(i64 %ptr, i64 %str) {
6226 ; CHECK-P10-LABEL: st_disjoint_align64_uint64_t_uint32_t:
6227 ; CHECK-P10: # %bb.0: # %entry
6228 ; CHECK-P10-NEXT: pli r5, 244140625
6229 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
6230 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6231 ; CHECK-P10-NEXT: stwx r4, r3, r5
6232 ; CHECK-P10-NEXT: blr
6234 ; CHECK-PREP10-LABEL: st_disjoint_align64_uint64_t_uint32_t:
6235 ; CHECK-PREP10: # %bb.0: # %entry
6236 ; CHECK-PREP10-NEXT: lis r5, 3725
6237 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
6238 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6239 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6240 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
6241 ; CHECK-PREP10-NEXT: blr
6243 %and = and i64 %ptr, -1099511627776
6244 %conv = trunc i64 %str to i32
6245 %or = or i64 %and, 1000000000000
6246 %0 = inttoptr i64 %or to ptr
6247 store i32 %conv, ptr %0, align 4096
6251 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6252 define dso_local void @st_cst_align16_uint64_t_uint32_t(i64 %str) {
6253 ; CHECK-LABEL: st_cst_align16_uint64_t_uint32_t:
6254 ; CHECK: # %bb.0: # %entry
6255 ; CHECK-NEXT: stw r3, 4080(0)
6258 %conv = trunc i64 %str to i32
6259 store i32 %conv, ptr inttoptr (i64 4080 to ptr), align 16
6263 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6264 define dso_local void @st_cst_align32_uint64_t_uint32_t(i64 %str) {
6265 ; CHECK-LABEL: st_cst_align32_uint64_t_uint32_t:
6266 ; CHECK: # %bb.0: # %entry
6267 ; CHECK-NEXT: lis r4, 153
6268 ; CHECK-NEXT: stw r3, -27108(r4)
6271 %conv = trunc i64 %str to i32
6272 store i32 %conv, ptr inttoptr (i64 9999900 to ptr), align 4
6276 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6277 define dso_local void @st_cst_align64_uint64_t_uint32_t(i64 %str) {
6278 ; CHECK-P10-LABEL: st_cst_align64_uint64_t_uint32_t:
6279 ; CHECK-P10: # %bb.0: # %entry
6280 ; CHECK-P10-NEXT: pli r4, 244140625
6281 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6282 ; CHECK-P10-NEXT: stw r3, 0(r4)
6283 ; CHECK-P10-NEXT: blr
6285 ; CHECK-PREP10-LABEL: st_cst_align64_uint64_t_uint32_t:
6286 ; CHECK-PREP10: # %bb.0: # %entry
6287 ; CHECK-PREP10-NEXT: lis r4, 3725
6288 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
6289 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
6290 ; CHECK-PREP10-NEXT: stw r3, 0(r4)
6291 ; CHECK-PREP10-NEXT: blr
6293 %conv = trunc i64 %str to i32
6294 store i32 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
6298 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6299 define dso_local void @st_0_uint64_t_uint64_t(i64 %ptr, i64 %str) {
6300 ; CHECK-LABEL: st_0_uint64_t_uint64_t:
6301 ; CHECK: # %bb.0: # %entry
6302 ; CHECK-NEXT: std r4, 0(r3)
6305 %0 = inttoptr i64 %ptr to ptr
6306 store i64 %str, ptr %0, align 8
6310 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6311 define dso_local void @st_align16_uint64_t_uint64_t(ptr nocapture %ptr, i64 %str) {
6312 ; CHECK-LABEL: st_align16_uint64_t_uint64_t:
6313 ; CHECK: # %bb.0: # %entry
6314 ; CHECK-NEXT: std r4, 8(r3)
6317 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
6318 store i64 %str, ptr %add.ptr, align 8
6322 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6323 define dso_local void @st_align32_uint64_t_uint64_t(ptr nocapture %ptr, i64 %str) {
6324 ; CHECK-P10-LABEL: st_align32_uint64_t_uint64_t:
6325 ; CHECK-P10: # %bb.0: # %entry
6326 ; CHECK-P10-NEXT: pstd r4, 99999000(r3), 0
6327 ; CHECK-P10-NEXT: blr
6329 ; CHECK-PREP10-LABEL: st_align32_uint64_t_uint64_t:
6330 ; CHECK-PREP10: # %bb.0: # %entry
6331 ; CHECK-PREP10-NEXT: lis r5, 1525
6332 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
6333 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
6334 ; CHECK-PREP10-NEXT: blr
6336 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
6337 store i64 %str, ptr %add.ptr, align 8
6341 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6342 define dso_local void @st_align64_uint64_t_uint64_t(ptr nocapture %ptr, i64 %str) {
6343 ; CHECK-P10-LABEL: st_align64_uint64_t_uint64_t:
6344 ; CHECK-P10: # %bb.0: # %entry
6345 ; CHECK-P10-NEXT: pli r5, 244140625
6346 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6347 ; CHECK-P10-NEXT: stdx r4, r3, r5
6348 ; CHECK-P10-NEXT: blr
6350 ; CHECK-PREP10-LABEL: st_align64_uint64_t_uint64_t:
6351 ; CHECK-PREP10: # %bb.0: # %entry
6352 ; CHECK-PREP10-NEXT: lis r5, 3725
6353 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6354 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6355 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
6356 ; CHECK-PREP10-NEXT: blr
6358 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
6359 store i64 %str, ptr %add.ptr, align 8
6363 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6364 define dso_local void @st_reg_uint64_t_uint64_t(ptr nocapture %ptr, i64 %off, i64 %str) {
6365 ; CHECK-LABEL: st_reg_uint64_t_uint64_t:
6366 ; CHECK: # %bb.0: # %entry
6367 ; CHECK-NEXT: stdx r5, r3, r4
6370 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
6371 store i64 %str, ptr %add.ptr, align 8
6375 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6376 define dso_local void @st_or1_uint64_t_uint64_t(i64 %ptr, i8 zeroext %off, i64 %str) {
6377 ; CHECK-LABEL: st_or1_uint64_t_uint64_t:
6378 ; CHECK: # %bb.0: # %entry
6379 ; CHECK-NEXT: or r3, r4, r3
6380 ; CHECK-NEXT: std r5, 0(r3)
6383 %conv = zext i8 %off to i64
6384 %or = or i64 %conv, %ptr
6385 %0 = inttoptr i64 %or to ptr
6386 store i64 %str, ptr %0, align 8
6390 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6391 define dso_local void @st_or2_uint64_t_uint64_t(i64 %ptr, i8 zeroext %off, i64 %str) {
6392 ; CHECK-LABEL: st_or2_uint64_t_uint64_t:
6393 ; CHECK: # %bb.0: # %entry
6394 ; CHECK-NEXT: rldicr r3, r3, 0, 51
6395 ; CHECK-NEXT: stdx r5, r3, r4
6398 %and = and i64 %ptr, -4096
6399 %conv = zext i8 %off to i64
6400 %or = or i64 %and, %conv
6401 %0 = inttoptr i64 %or to ptr
6402 store i64 %str, ptr %0, align 8
6406 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6407 define dso_local void @st_not_disjoint16_uint64_t_uint64_t(i64 %ptr, i64 %str) {
6408 ; CHECK-LABEL: st_not_disjoint16_uint64_t_uint64_t:
6409 ; CHECK: # %bb.0: # %entry
6410 ; CHECK-NEXT: ori r3, r3, 6
6411 ; CHECK-NEXT: std r4, 0(r3)
6414 %or = or i64 %ptr, 6
6415 %0 = inttoptr i64 %or to ptr
6416 store i64 %str, ptr %0, align 8
6420 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6421 define dso_local void @st_disjoint_align16_uint64_t_uint64_t(i64 %ptr, i64 %str) {
6422 ; CHECK-LABEL: st_disjoint_align16_uint64_t_uint64_t:
6423 ; CHECK: # %bb.0: # %entry
6424 ; CHECK-NEXT: rldicr r3, r3, 0, 51
6425 ; CHECK-NEXT: std r4, 24(r3)
6428 %and = and i64 %ptr, -4096
6429 %or = or i64 %and, 24
6430 %0 = inttoptr i64 %or to ptr
6431 store i64 %str, ptr %0, align 8
6435 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6436 define dso_local void @st_not_disjoint32_uint64_t_uint64_t(i64 %ptr, i64 %str) {
6437 ; CHECK-LABEL: st_not_disjoint32_uint64_t_uint64_t:
6438 ; CHECK: # %bb.0: # %entry
6439 ; CHECK-NEXT: ori r3, r3, 34463
6440 ; CHECK-NEXT: oris r3, r3, 1
6441 ; CHECK-NEXT: std r4, 0(r3)
6444 %or = or i64 %ptr, 99999
6445 %0 = inttoptr i64 %or to ptr
6446 store i64 %str, ptr %0, align 8
6450 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6451 define dso_local void @st_disjoint_align32_uint64_t_uint64_t(i64 %ptr, i64 %str) {
6452 ; CHECK-P10-LABEL: st_disjoint_align32_uint64_t_uint64_t:
6453 ; CHECK-P10: # %bb.0: # %entry
6454 ; CHECK-P10-NEXT: lis r5, -15264
6455 ; CHECK-P10-NEXT: and r3, r3, r5
6456 ; CHECK-P10-NEXT: pstd r4, 999990000(r3), 0
6457 ; CHECK-P10-NEXT: blr
6459 ; CHECK-PREP10-LABEL: st_disjoint_align32_uint64_t_uint64_t:
6460 ; CHECK-PREP10: # %bb.0: # %entry
6461 ; CHECK-PREP10-NEXT: lis r5, -15264
6462 ; CHECK-PREP10-NEXT: and r3, r3, r5
6463 ; CHECK-PREP10-NEXT: lis r5, 15258
6464 ; CHECK-PREP10-NEXT: ori r5, r5, 41712
6465 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
6466 ; CHECK-PREP10-NEXT: blr
6468 %and = and i64 %ptr, -1000341504
6469 %or = or i64 %and, 999990000
6470 %0 = inttoptr i64 %or to ptr
6471 store i64 %str, ptr %0, align 16
6475 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6476 define dso_local void @st_not_disjoint64_uint64_t_uint64_t(i64 %ptr, i64 %str) {
6477 ; CHECK-P10-LABEL: st_not_disjoint64_uint64_t_uint64_t:
6478 ; CHECK-P10: # %bb.0: # %entry
6479 ; CHECK-P10-NEXT: pli r5, 232
6480 ; CHECK-P10-NEXT: pli r6, 3567587329
6481 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
6482 ; CHECK-P10-NEXT: or r3, r3, r6
6483 ; CHECK-P10-NEXT: std r4, 0(r3)
6484 ; CHECK-P10-NEXT: blr
6486 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint64_t_uint64_t:
6487 ; CHECK-PREP10: # %bb.0: # %entry
6488 ; CHECK-PREP10-NEXT: li r5, 29
6489 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
6490 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
6491 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
6492 ; CHECK-PREP10-NEXT: or r3, r3, r5
6493 ; CHECK-PREP10-NEXT: std r4, 0(r3)
6494 ; CHECK-PREP10-NEXT: blr
6496 %or = or i64 %ptr, 1000000000001
6497 %0 = inttoptr i64 %or to ptr
6498 store i64 %str, ptr %0, align 8
6502 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6503 define dso_local void @st_disjoint_align64_uint64_t_uint64_t(i64 %ptr, i64 %str) {
6504 ; CHECK-P10-LABEL: st_disjoint_align64_uint64_t_uint64_t:
6505 ; CHECK-P10: # %bb.0: # %entry
6506 ; CHECK-P10-NEXT: pli r5, 244140625
6507 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
6508 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6509 ; CHECK-P10-NEXT: stdx r4, r3, r5
6510 ; CHECK-P10-NEXT: blr
6512 ; CHECK-PREP10-LABEL: st_disjoint_align64_uint64_t_uint64_t:
6513 ; CHECK-PREP10: # %bb.0: # %entry
6514 ; CHECK-PREP10-NEXT: lis r5, 3725
6515 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
6516 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6517 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6518 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
6519 ; CHECK-PREP10-NEXT: blr
6521 %and = and i64 %ptr, -1099511627776
6522 %or = or i64 %and, 1000000000000
6523 %0 = inttoptr i64 %or to ptr
6524 store i64 %str, ptr %0, align 4096
6528 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6529 define dso_local void @st_cst_align16_uint64_t_uint64_t(i64 %str) {
6530 ; CHECK-LABEL: st_cst_align16_uint64_t_uint64_t:
6531 ; CHECK: # %bb.0: # %entry
6532 ; CHECK-NEXT: std r3, 4080(0)
6535 store i64 %str, ptr inttoptr (i64 4080 to ptr), align 16
6539 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6540 define dso_local void @st_cst_align32_uint64_t_uint64_t(i64 %str) {
6541 ; CHECK-LABEL: st_cst_align32_uint64_t_uint64_t:
6542 ; CHECK: # %bb.0: # %entry
6543 ; CHECK-NEXT: lis r4, 153
6544 ; CHECK-NEXT: std r3, -27108(r4)
6547 store i64 %str, ptr inttoptr (i64 9999900 to ptr), align 8
6551 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6552 define dso_local void @st_cst_align64_uint64_t_uint64_t(i64 %str) {
6553 ; CHECK-P10-LABEL: st_cst_align64_uint64_t_uint64_t:
6554 ; CHECK-P10: # %bb.0: # %entry
6555 ; CHECK-P10-NEXT: pli r4, 244140625
6556 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6557 ; CHECK-P10-NEXT: std r3, 0(r4)
6558 ; CHECK-P10-NEXT: blr
6560 ; CHECK-PREP10-LABEL: st_cst_align64_uint64_t_uint64_t:
6561 ; CHECK-PREP10: # %bb.0: # %entry
6562 ; CHECK-PREP10-NEXT: lis r4, 3725
6563 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
6564 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
6565 ; CHECK-PREP10-NEXT: std r3, 0(r4)
6566 ; CHECK-PREP10-NEXT: blr
6568 store i64 %str, ptr inttoptr (i64 1000000000000 to ptr), align 4096
6572 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6573 define dso_local void @st_0_uint64_t_float(i64 %ptr, i64 %str) {
6574 ; CHECK-LABEL: st_0_uint64_t_float:
6575 ; CHECK: # %bb.0: # %entry
6576 ; CHECK-NEXT: mtfprd f0, r4
6577 ; CHECK-NEXT: xscvuxdsp f0, f0
6578 ; CHECK-NEXT: stfs f0, 0(r3)
6581 %conv = uitofp i64 %str to float
6582 %0 = inttoptr i64 %ptr to ptr
6583 store float %conv, ptr %0, align 4
6587 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6588 define dso_local void @st_align16_uint64_t_float(ptr nocapture %ptr, i64 %str) {
6589 ; CHECK-LABEL: st_align16_uint64_t_float:
6590 ; CHECK: # %bb.0: # %entry
6591 ; CHECK-NEXT: mtfprd f0, r4
6592 ; CHECK-NEXT: xscvuxdsp f0, f0
6593 ; CHECK-NEXT: stfs f0, 8(r3)
6596 %conv = uitofp i64 %str to float
6597 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
6598 store float %conv, ptr %add.ptr, align 4
6602 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6603 define dso_local void @st_align32_uint64_t_float(ptr nocapture %ptr, i64 %str) {
6604 ; CHECK-P10-LABEL: st_align32_uint64_t_float:
6605 ; CHECK-P10: # %bb.0: # %entry
6606 ; CHECK-P10-NEXT: mtfprd f0, r4
6607 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
6608 ; CHECK-P10-NEXT: pstfs f0, 99999000(r3), 0
6609 ; CHECK-P10-NEXT: blr
6611 ; CHECK-P9-LABEL: st_align32_uint64_t_float:
6612 ; CHECK-P9: # %bb.0: # %entry
6613 ; CHECK-P9-NEXT: mtfprd f0, r4
6614 ; CHECK-P9-NEXT: lis r4, 1525
6615 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
6616 ; CHECK-P9-NEXT: ori r4, r4, 56600
6617 ; CHECK-P9-NEXT: stfsx f0, r3, r4
6618 ; CHECK-P9-NEXT: blr
6620 ; CHECK-P8-LABEL: st_align32_uint64_t_float:
6621 ; CHECK-P8: # %bb.0: # %entry
6622 ; CHECK-P8-NEXT: mtfprd f0, r4
6623 ; CHECK-P8-NEXT: lis r4, 1525
6624 ; CHECK-P8-NEXT: ori r4, r4, 56600
6625 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
6626 ; CHECK-P8-NEXT: stfsx f0, r3, r4
6627 ; CHECK-P8-NEXT: blr
6629 %conv = uitofp i64 %str to float
6630 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
6631 store float %conv, ptr %add.ptr, align 4
6635 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6636 define dso_local void @st_align64_uint64_t_float(ptr nocapture %ptr, i64 %str) {
6637 ; CHECK-P10-LABEL: st_align64_uint64_t_float:
6638 ; CHECK-P10: # %bb.0: # %entry
6639 ; CHECK-P10-NEXT: mtfprd f0, r4
6640 ; CHECK-P10-NEXT: pli r4, 244140625
6641 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6642 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
6643 ; CHECK-P10-NEXT: stfsx f0, r3, r4
6644 ; CHECK-P10-NEXT: blr
6646 ; CHECK-P9-LABEL: st_align64_uint64_t_float:
6647 ; CHECK-P9: # %bb.0: # %entry
6648 ; CHECK-P9-NEXT: mtfprd f0, r4
6649 ; CHECK-P9-NEXT: lis r4, 3725
6650 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
6651 ; CHECK-P9-NEXT: ori r4, r4, 19025
6652 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
6653 ; CHECK-P9-NEXT: stfsx f0, r3, r4
6654 ; CHECK-P9-NEXT: blr
6656 ; CHECK-P8-LABEL: st_align64_uint64_t_float:
6657 ; CHECK-P8: # %bb.0: # %entry
6658 ; CHECK-P8-NEXT: mtfprd f0, r4
6659 ; CHECK-P8-NEXT: lis r4, 3725
6660 ; CHECK-P8-NEXT: ori r4, r4, 19025
6661 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
6662 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
6663 ; CHECK-P8-NEXT: stfsx f0, r3, r4
6664 ; CHECK-P8-NEXT: blr
6666 %conv = uitofp i64 %str to float
6667 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
6668 store float %conv, ptr %add.ptr, align 4
6672 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6673 define dso_local void @st_reg_uint64_t_float(ptr nocapture %ptr, i64 %off, i64 %str) {
6674 ; CHECK-LABEL: st_reg_uint64_t_float:
6675 ; CHECK: # %bb.0: # %entry
6676 ; CHECK-NEXT: mtfprd f0, r5
6677 ; CHECK-NEXT: xscvuxdsp f0, f0
6678 ; CHECK-NEXT: stfsx f0, r3, r4
6681 %conv = uitofp i64 %str to float
6682 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
6683 store float %conv, ptr %add.ptr, align 4
6687 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6688 define dso_local void @st_or1_uint64_t_float(i64 %ptr, i8 zeroext %off, i64 %str) {
6689 ; CHECK-LABEL: st_or1_uint64_t_float:
6690 ; CHECK: # %bb.0: # %entry
6691 ; CHECK-NEXT: mtfprd f0, r5
6692 ; CHECK-NEXT: or r3, r4, r3
6693 ; CHECK-NEXT: xscvuxdsp f0, f0
6694 ; CHECK-NEXT: stfs f0, 0(r3)
6697 %conv = uitofp i64 %str to float
6698 %conv1 = zext i8 %off to i64
6699 %or = or i64 %conv1, %ptr
6700 %0 = inttoptr i64 %or to ptr
6701 store float %conv, ptr %0, align 4
6705 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6706 define dso_local void @st_or2_uint64_t_float(i64 %ptr, i8 zeroext %off, i64 %str) {
6707 ; CHECK-LABEL: st_or2_uint64_t_float:
6708 ; CHECK: # %bb.0: # %entry
6709 ; CHECK-NEXT: mtfprd f0, r5
6710 ; CHECK-NEXT: rldicr r3, r3, 0, 51
6711 ; CHECK-NEXT: xscvuxdsp f0, f0
6712 ; CHECK-NEXT: stfsx f0, r3, r4
6715 %and = and i64 %ptr, -4096
6716 %conv = uitofp i64 %str to float
6717 %conv1 = zext i8 %off to i64
6718 %or = or i64 %and, %conv1
6719 %0 = inttoptr i64 %or to ptr
6720 store float %conv, ptr %0, align 4
6724 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6725 define dso_local void @st_not_disjoint16_uint64_t_float(i64 %ptr, i64 %str) {
6726 ; CHECK-LABEL: st_not_disjoint16_uint64_t_float:
6727 ; CHECK: # %bb.0: # %entry
6728 ; CHECK-NEXT: mtfprd f0, r4
6729 ; CHECK-NEXT: ori r3, r3, 6
6730 ; CHECK-NEXT: xscvuxdsp f0, f0
6731 ; CHECK-NEXT: stfs f0, 0(r3)
6734 %conv = uitofp i64 %str to float
6735 %or = or i64 %ptr, 6
6736 %0 = inttoptr i64 %or to ptr
6737 store float %conv, ptr %0, align 4
6741 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6742 define dso_local void @st_disjoint_align16_uint64_t_float(i64 %ptr, i64 %str) {
6743 ; CHECK-LABEL: st_disjoint_align16_uint64_t_float:
6744 ; CHECK: # %bb.0: # %entry
6745 ; CHECK-NEXT: mtfprd f0, r4
6746 ; CHECK-NEXT: rldicr r3, r3, 0, 51
6747 ; CHECK-NEXT: xscvuxdsp f0, f0
6748 ; CHECK-NEXT: stfs f0, 24(r3)
6751 %and = and i64 %ptr, -4096
6752 %conv = uitofp i64 %str to float
6753 %or = or i64 %and, 24
6754 %0 = inttoptr i64 %or to ptr
6755 store float %conv, ptr %0, align 8
6759 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6760 define dso_local void @st_not_disjoint32_uint64_t_float(i64 %ptr, i64 %str) {
6761 ; CHECK-P10-LABEL: st_not_disjoint32_uint64_t_float:
6762 ; CHECK-P10: # %bb.0: # %entry
6763 ; CHECK-P10-NEXT: mtfprd f0, r4
6764 ; CHECK-P10-NEXT: ori r3, r3, 34463
6765 ; CHECK-P10-NEXT: oris r3, r3, 1
6766 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
6767 ; CHECK-P10-NEXT: stfs f0, 0(r3)
6768 ; CHECK-P10-NEXT: blr
6770 ; CHECK-P9-LABEL: st_not_disjoint32_uint64_t_float:
6771 ; CHECK-P9: # %bb.0: # %entry
6772 ; CHECK-P9-NEXT: mtfprd f0, r4
6773 ; CHECK-P9-NEXT: ori r3, r3, 34463
6774 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
6775 ; CHECK-P9-NEXT: oris r3, r3, 1
6776 ; CHECK-P9-NEXT: stfs f0, 0(r3)
6777 ; CHECK-P9-NEXT: blr
6779 ; CHECK-P8-LABEL: st_not_disjoint32_uint64_t_float:
6780 ; CHECK-P8: # %bb.0: # %entry
6781 ; CHECK-P8-NEXT: mtfprd f0, r4
6782 ; CHECK-P8-NEXT: ori r3, r3, 34463
6783 ; CHECK-P8-NEXT: oris r3, r3, 1
6784 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
6785 ; CHECK-P8-NEXT: stfs f0, 0(r3)
6786 ; CHECK-P8-NEXT: blr
6788 %conv = uitofp i64 %str to float
6789 %or = or i64 %ptr, 99999
6790 %0 = inttoptr i64 %or to ptr
6791 store float %conv, ptr %0, align 4
6795 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6796 define dso_local void @st_disjoint_align32_uint64_t_float(i64 %ptr, i64 %str) {
6797 ; CHECK-P10-LABEL: st_disjoint_align32_uint64_t_float:
6798 ; CHECK-P10: # %bb.0: # %entry
6799 ; CHECK-P10-NEXT: mtfprd f0, r4
6800 ; CHECK-P10-NEXT: lis r5, -15264
6801 ; CHECK-P10-NEXT: and r3, r3, r5
6802 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
6803 ; CHECK-P10-NEXT: pstfs f0, 999990000(r3), 0
6804 ; CHECK-P10-NEXT: blr
6806 ; CHECK-P9-LABEL: st_disjoint_align32_uint64_t_float:
6807 ; CHECK-P9: # %bb.0: # %entry
6808 ; CHECK-P9-NEXT: mtfprd f0, r4
6809 ; CHECK-P9-NEXT: lis r5, -15264
6810 ; CHECK-P9-NEXT: lis r4, 15258
6811 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
6812 ; CHECK-P9-NEXT: and r3, r3, r5
6813 ; CHECK-P9-NEXT: ori r4, r4, 41712
6814 ; CHECK-P9-NEXT: stfsx f0, r3, r4
6815 ; CHECK-P9-NEXT: blr
6817 ; CHECK-P8-LABEL: st_disjoint_align32_uint64_t_float:
6818 ; CHECK-P8: # %bb.0: # %entry
6819 ; CHECK-P8-NEXT: mtfprd f0, r4
6820 ; CHECK-P8-NEXT: lis r5, -15264
6821 ; CHECK-P8-NEXT: lis r4, 15258
6822 ; CHECK-P8-NEXT: and r3, r3, r5
6823 ; CHECK-P8-NEXT: ori r4, r4, 41712
6824 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
6825 ; CHECK-P8-NEXT: stfsx f0, r3, r4
6826 ; CHECK-P8-NEXT: blr
6828 %and = and i64 %ptr, -1000341504
6829 %conv = uitofp i64 %str to float
6830 %or = or i64 %and, 999990000
6831 %0 = inttoptr i64 %or to ptr
6832 store float %conv, ptr %0, align 16
6836 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6837 define dso_local void @st_not_disjoint64_uint64_t_float(i64 %ptr, i64 %str) {
6838 ; CHECK-P10-LABEL: st_not_disjoint64_uint64_t_float:
6839 ; CHECK-P10: # %bb.0: # %entry
6840 ; CHECK-P10-NEXT: mtfprd f0, r4
6841 ; CHECK-P10-NEXT: pli r4, 232
6842 ; CHECK-P10-NEXT: pli r5, 3567587329
6843 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
6844 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
6845 ; CHECK-P10-NEXT: or r3, r3, r5
6846 ; CHECK-P10-NEXT: stfs f0, 0(r3)
6847 ; CHECK-P10-NEXT: blr
6849 ; CHECK-P9-LABEL: st_not_disjoint64_uint64_t_float:
6850 ; CHECK-P9: # %bb.0: # %entry
6851 ; CHECK-P9-NEXT: mtfprd f0, r4
6852 ; CHECK-P9-NEXT: li r4, 29
6853 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
6854 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
6855 ; CHECK-P9-NEXT: oris r4, r4, 54437
6856 ; CHECK-P9-NEXT: ori r4, r4, 4097
6857 ; CHECK-P9-NEXT: or r3, r3, r4
6858 ; CHECK-P9-NEXT: stfs f0, 0(r3)
6859 ; CHECK-P9-NEXT: blr
6861 ; CHECK-P8-LABEL: st_not_disjoint64_uint64_t_float:
6862 ; CHECK-P8: # %bb.0: # %entry
6863 ; CHECK-P8-NEXT: mtfprd f0, r4
6864 ; CHECK-P8-NEXT: li r4, 29
6865 ; CHECK-P8-NEXT: rldic r4, r4, 35, 24
6866 ; CHECK-P8-NEXT: oris r4, r4, 54437
6867 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
6868 ; CHECK-P8-NEXT: ori r4, r4, 4097
6869 ; CHECK-P8-NEXT: or r3, r3, r4
6870 ; CHECK-P8-NEXT: stfs f0, 0(r3)
6871 ; CHECK-P8-NEXT: blr
6873 %conv = uitofp i64 %str to float
6874 %or = or i64 %ptr, 1000000000001
6875 %0 = inttoptr i64 %or to ptr
6876 store float %conv, ptr %0, align 4
6880 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6881 define dso_local void @st_disjoint_align64_uint64_t_float(i64 %ptr, i64 %str) {
6882 ; CHECK-P10-LABEL: st_disjoint_align64_uint64_t_float:
6883 ; CHECK-P10: # %bb.0: # %entry
6884 ; CHECK-P10-NEXT: mtfprd f0, r4
6885 ; CHECK-P10-NEXT: pli r4, 244140625
6886 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
6887 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6888 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
6889 ; CHECK-P10-NEXT: stfsx f0, r3, r4
6890 ; CHECK-P10-NEXT: blr
6892 ; CHECK-P9-LABEL: st_disjoint_align64_uint64_t_float:
6893 ; CHECK-P9: # %bb.0: # %entry
6894 ; CHECK-P9-NEXT: mtfprd f0, r4
6895 ; CHECK-P9-NEXT: lis r4, 3725
6896 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
6897 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
6898 ; CHECK-P9-NEXT: ori r4, r4, 19025
6899 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
6900 ; CHECK-P9-NEXT: stfsx f0, r3, r4
6901 ; CHECK-P9-NEXT: blr
6903 ; CHECK-P8-LABEL: st_disjoint_align64_uint64_t_float:
6904 ; CHECK-P8: # %bb.0: # %entry
6905 ; CHECK-P8-NEXT: mtfprd f0, r4
6906 ; CHECK-P8-NEXT: lis r4, 3725
6907 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
6908 ; CHECK-P8-NEXT: ori r4, r4, 19025
6909 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
6910 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
6911 ; CHECK-P8-NEXT: stfsx f0, r3, r4
6912 ; CHECK-P8-NEXT: blr
6914 %and = and i64 %ptr, -1099511627776
6915 %conv = uitofp i64 %str to float
6916 %or = or i64 %and, 1000000000000
6917 %0 = inttoptr i64 %or to ptr
6918 store float %conv, ptr %0, align 4096
6922 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6923 define dso_local void @st_cst_align16_uint64_t_float(i64 %str) {
6924 ; CHECK-LABEL: st_cst_align16_uint64_t_float:
6925 ; CHECK: # %bb.0: # %entry
6926 ; CHECK-NEXT: mtfprd f0, r3
6927 ; CHECK-NEXT: xscvuxdsp f0, f0
6928 ; CHECK-NEXT: stfs f0, 4080(0)
6931 %conv = uitofp i64 %str to float
6932 store float %conv, ptr inttoptr (i64 4080 to ptr), align 16
6936 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6937 define dso_local void @st_cst_align32_uint64_t_float(i64 %str) {
6938 ; CHECK-LABEL: st_cst_align32_uint64_t_float:
6939 ; CHECK: # %bb.0: # %entry
6940 ; CHECK-NEXT: mtfprd f0, r3
6941 ; CHECK-NEXT: lis r3, 153
6942 ; CHECK-NEXT: xscvuxdsp f0, f0
6943 ; CHECK-NEXT: stfs f0, -27108(r3)
6946 %conv = uitofp i64 %str to float
6947 store float %conv, ptr inttoptr (i64 9999900 to ptr), align 4
6951 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6952 define dso_local void @st_cst_align64_uint64_t_float(i64 %str) {
6953 ; CHECK-P10-LABEL: st_cst_align64_uint64_t_float:
6954 ; CHECK-P10: # %bb.0: # %entry
6955 ; CHECK-P10-NEXT: mtfprd f0, r3
6956 ; CHECK-P10-NEXT: pli r3, 244140625
6957 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
6958 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
6959 ; CHECK-P10-NEXT: stfs f0, 0(r3)
6960 ; CHECK-P10-NEXT: blr
6962 ; CHECK-P9-LABEL: st_cst_align64_uint64_t_float:
6963 ; CHECK-P9: # %bb.0: # %entry
6964 ; CHECK-P9-NEXT: mtfprd f0, r3
6965 ; CHECK-P9-NEXT: lis r3, 3725
6966 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
6967 ; CHECK-P9-NEXT: ori r3, r3, 19025
6968 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
6969 ; CHECK-P9-NEXT: stfs f0, 0(r3)
6970 ; CHECK-P9-NEXT: blr
6972 ; CHECK-P8-LABEL: st_cst_align64_uint64_t_float:
6973 ; CHECK-P8: # %bb.0: # %entry
6974 ; CHECK-P8-NEXT: mtfprd f0, r3
6975 ; CHECK-P8-NEXT: lis r3, 3725
6976 ; CHECK-P8-NEXT: ori r3, r3, 19025
6977 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
6978 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
6979 ; CHECK-P8-NEXT: stfs f0, 0(r3)
6980 ; CHECK-P8-NEXT: blr
6982 %conv = uitofp i64 %str to float
6983 store float %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
6987 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6988 define dso_local void @st_0_uint64_t_double(i64 %ptr, i64 %str) {
6989 ; CHECK-LABEL: st_0_uint64_t_double:
6990 ; CHECK: # %bb.0: # %entry
6991 ; CHECK-NEXT: mtfprd f0, r4
6992 ; CHECK-NEXT: xscvuxddp f0, f0
6993 ; CHECK-NEXT: stfd f0, 0(r3)
6996 %conv = uitofp i64 %str to double
6997 %0 = inttoptr i64 %ptr to ptr
6998 store double %conv, ptr %0, align 8
7002 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7003 define dso_local void @st_align16_uint64_t_double(ptr nocapture %ptr, i64 %str) {
7004 ; CHECK-LABEL: st_align16_uint64_t_double:
7005 ; CHECK: # %bb.0: # %entry
7006 ; CHECK-NEXT: mtfprd f0, r4
7007 ; CHECK-NEXT: xscvuxddp f0, f0
7008 ; CHECK-NEXT: stfd f0, 8(r3)
7011 %conv = uitofp i64 %str to double
7012 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
7013 store double %conv, ptr %add.ptr, align 8
7017 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7018 define dso_local void @st_align32_uint64_t_double(ptr nocapture %ptr, i64 %str) {
7019 ; CHECK-P10-LABEL: st_align32_uint64_t_double:
7020 ; CHECK-P10: # %bb.0: # %entry
7021 ; CHECK-P10-NEXT: mtfprd f0, r4
7022 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7023 ; CHECK-P10-NEXT: pstfd f0, 99999000(r3), 0
7024 ; CHECK-P10-NEXT: blr
7026 ; CHECK-P9-LABEL: st_align32_uint64_t_double:
7027 ; CHECK-P9: # %bb.0: # %entry
7028 ; CHECK-P9-NEXT: mtfprd f0, r4
7029 ; CHECK-P9-NEXT: lis r4, 1525
7030 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7031 ; CHECK-P9-NEXT: ori r4, r4, 56600
7032 ; CHECK-P9-NEXT: stfdx f0, r3, r4
7033 ; CHECK-P9-NEXT: blr
7035 ; CHECK-P8-LABEL: st_align32_uint64_t_double:
7036 ; CHECK-P8: # %bb.0: # %entry
7037 ; CHECK-P8-NEXT: mtfprd f0, r4
7038 ; CHECK-P8-NEXT: lis r4, 1525
7039 ; CHECK-P8-NEXT: ori r4, r4, 56600
7040 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7041 ; CHECK-P8-NEXT: stfdx f0, r3, r4
7042 ; CHECK-P8-NEXT: blr
7044 %conv = uitofp i64 %str to double
7045 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
7046 store double %conv, ptr %add.ptr, align 8
7050 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7051 define dso_local void @st_align64_uint64_t_double(ptr nocapture %ptr, i64 %str) {
7052 ; CHECK-P10-LABEL: st_align64_uint64_t_double:
7053 ; CHECK-P10: # %bb.0: # %entry
7054 ; CHECK-P10-NEXT: mtfprd f0, r4
7055 ; CHECK-P10-NEXT: pli r4, 244140625
7056 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7057 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7058 ; CHECK-P10-NEXT: stfdx f0, r3, r4
7059 ; CHECK-P10-NEXT: blr
7061 ; CHECK-P9-LABEL: st_align64_uint64_t_double:
7062 ; CHECK-P9: # %bb.0: # %entry
7063 ; CHECK-P9-NEXT: mtfprd f0, r4
7064 ; CHECK-P9-NEXT: lis r4, 3725
7065 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7066 ; CHECK-P9-NEXT: ori r4, r4, 19025
7067 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
7068 ; CHECK-P9-NEXT: stfdx f0, r3, r4
7069 ; CHECK-P9-NEXT: blr
7071 ; CHECK-P8-LABEL: st_align64_uint64_t_double:
7072 ; CHECK-P8: # %bb.0: # %entry
7073 ; CHECK-P8-NEXT: mtfprd f0, r4
7074 ; CHECK-P8-NEXT: lis r4, 3725
7075 ; CHECK-P8-NEXT: ori r4, r4, 19025
7076 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
7077 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7078 ; CHECK-P8-NEXT: stfdx f0, r3, r4
7079 ; CHECK-P8-NEXT: blr
7081 %conv = uitofp i64 %str to double
7082 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
7083 store double %conv, ptr %add.ptr, align 8
7087 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7088 define dso_local void @st_reg_uint64_t_double(ptr nocapture %ptr, i64 %off, i64 %str) {
7089 ; CHECK-LABEL: st_reg_uint64_t_double:
7090 ; CHECK: # %bb.0: # %entry
7091 ; CHECK-NEXT: mtfprd f0, r5
7092 ; CHECK-NEXT: xscvuxddp f0, f0
7093 ; CHECK-NEXT: stfdx f0, r3, r4
7096 %conv = uitofp i64 %str to double
7097 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
7098 store double %conv, ptr %add.ptr, align 8
7102 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7103 define dso_local void @st_or1_uint64_t_double(i64 %ptr, i8 zeroext %off, i64 %str) {
7104 ; CHECK-LABEL: st_or1_uint64_t_double:
7105 ; CHECK: # %bb.0: # %entry
7106 ; CHECK-NEXT: mtfprd f0, r5
7107 ; CHECK-NEXT: or r3, r4, r3
7108 ; CHECK-NEXT: xscvuxddp f0, f0
7109 ; CHECK-NEXT: stfd f0, 0(r3)
7112 %conv = uitofp i64 %str to double
7113 %conv1 = zext i8 %off to i64
7114 %or = or i64 %conv1, %ptr
7115 %0 = inttoptr i64 %or to ptr
7116 store double %conv, ptr %0, align 8
7120 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7121 define dso_local void @st_or2_uint64_t_double(i64 %ptr, i8 zeroext %off, i64 %str) {
7122 ; CHECK-LABEL: st_or2_uint64_t_double:
7123 ; CHECK: # %bb.0: # %entry
7124 ; CHECK-NEXT: mtfprd f0, r5
7125 ; CHECK-NEXT: rldicr r3, r3, 0, 51
7126 ; CHECK-NEXT: xscvuxddp f0, f0
7127 ; CHECK-NEXT: stfdx f0, r3, r4
7130 %and = and i64 %ptr, -4096
7131 %conv = uitofp i64 %str to double
7132 %conv1 = zext i8 %off to i64
7133 %or = or i64 %and, %conv1
7134 %0 = inttoptr i64 %or to ptr
7135 store double %conv, ptr %0, align 8
7139 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7140 define dso_local void @st_not_disjoint16_uint64_t_double(i64 %ptr, i64 %str) {
7141 ; CHECK-LABEL: st_not_disjoint16_uint64_t_double:
7142 ; CHECK: # %bb.0: # %entry
7143 ; CHECK-NEXT: mtfprd f0, r4
7144 ; CHECK-NEXT: ori r3, r3, 6
7145 ; CHECK-NEXT: xscvuxddp f0, f0
7146 ; CHECK-NEXT: stfd f0, 0(r3)
7149 %conv = uitofp i64 %str to double
7150 %or = or i64 %ptr, 6
7151 %0 = inttoptr i64 %or to ptr
7152 store double %conv, ptr %0, align 8
7156 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7157 define dso_local void @st_disjoint_align16_uint64_t_double(i64 %ptr, i64 %str) {
7158 ; CHECK-LABEL: st_disjoint_align16_uint64_t_double:
7159 ; CHECK: # %bb.0: # %entry
7160 ; CHECK-NEXT: mtfprd f0, r4
7161 ; CHECK-NEXT: rldicr r3, r3, 0, 51
7162 ; CHECK-NEXT: xscvuxddp f0, f0
7163 ; CHECK-NEXT: stfd f0, 24(r3)
7166 %and = and i64 %ptr, -4096
7167 %conv = uitofp i64 %str to double
7168 %or = or i64 %and, 24
7169 %0 = inttoptr i64 %or to ptr
7170 store double %conv, ptr %0, align 8
7174 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7175 define dso_local void @st_not_disjoint32_uint64_t_double(i64 %ptr, i64 %str) {
7176 ; CHECK-P10-LABEL: st_not_disjoint32_uint64_t_double:
7177 ; CHECK-P10: # %bb.0: # %entry
7178 ; CHECK-P10-NEXT: mtfprd f0, r4
7179 ; CHECK-P10-NEXT: ori r3, r3, 34463
7180 ; CHECK-P10-NEXT: oris r3, r3, 1
7181 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7182 ; CHECK-P10-NEXT: stfd f0, 0(r3)
7183 ; CHECK-P10-NEXT: blr
7185 ; CHECK-P9-LABEL: st_not_disjoint32_uint64_t_double:
7186 ; CHECK-P9: # %bb.0: # %entry
7187 ; CHECK-P9-NEXT: mtfprd f0, r4
7188 ; CHECK-P9-NEXT: ori r3, r3, 34463
7189 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7190 ; CHECK-P9-NEXT: oris r3, r3, 1
7191 ; CHECK-P9-NEXT: stfd f0, 0(r3)
7192 ; CHECK-P9-NEXT: blr
7194 ; CHECK-P8-LABEL: st_not_disjoint32_uint64_t_double:
7195 ; CHECK-P8: # %bb.0: # %entry
7196 ; CHECK-P8-NEXT: mtfprd f0, r4
7197 ; CHECK-P8-NEXT: ori r3, r3, 34463
7198 ; CHECK-P8-NEXT: oris r3, r3, 1
7199 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7200 ; CHECK-P8-NEXT: stfd f0, 0(r3)
7201 ; CHECK-P8-NEXT: blr
7203 %conv = uitofp i64 %str to double
7204 %or = or i64 %ptr, 99999
7205 %0 = inttoptr i64 %or to ptr
7206 store double %conv, ptr %0, align 8
7210 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7211 define dso_local void @st_disjoint_align32_uint64_t_double(i64 %ptr, i64 %str) {
7212 ; CHECK-P10-LABEL: st_disjoint_align32_uint64_t_double:
7213 ; CHECK-P10: # %bb.0: # %entry
7214 ; CHECK-P10-NEXT: mtfprd f0, r4
7215 ; CHECK-P10-NEXT: lis r5, -15264
7216 ; CHECK-P10-NEXT: and r3, r3, r5
7217 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7218 ; CHECK-P10-NEXT: pstfd f0, 999990000(r3), 0
7219 ; CHECK-P10-NEXT: blr
7221 ; CHECK-P9-LABEL: st_disjoint_align32_uint64_t_double:
7222 ; CHECK-P9: # %bb.0: # %entry
7223 ; CHECK-P9-NEXT: mtfprd f0, r4
7224 ; CHECK-P9-NEXT: lis r5, -15264
7225 ; CHECK-P9-NEXT: lis r4, 15258
7226 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7227 ; CHECK-P9-NEXT: and r3, r3, r5
7228 ; CHECK-P9-NEXT: ori r4, r4, 41712
7229 ; CHECK-P9-NEXT: stfdx f0, r3, r4
7230 ; CHECK-P9-NEXT: blr
7232 ; CHECK-P8-LABEL: st_disjoint_align32_uint64_t_double:
7233 ; CHECK-P8: # %bb.0: # %entry
7234 ; CHECK-P8-NEXT: mtfprd f0, r4
7235 ; CHECK-P8-NEXT: lis r5, -15264
7236 ; CHECK-P8-NEXT: lis r4, 15258
7237 ; CHECK-P8-NEXT: and r3, r3, r5
7238 ; CHECK-P8-NEXT: ori r4, r4, 41712
7239 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7240 ; CHECK-P8-NEXT: stfdx f0, r3, r4
7241 ; CHECK-P8-NEXT: blr
7243 %and = and i64 %ptr, -1000341504
7244 %conv = uitofp i64 %str to double
7245 %or = or i64 %and, 999990000
7246 %0 = inttoptr i64 %or to ptr
7247 store double %conv, ptr %0, align 16
7251 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7252 define dso_local void @st_not_disjoint64_uint64_t_double(i64 %ptr, i64 %str) {
7253 ; CHECK-P10-LABEL: st_not_disjoint64_uint64_t_double:
7254 ; CHECK-P10: # %bb.0: # %entry
7255 ; CHECK-P10-NEXT: mtfprd f0, r4
7256 ; CHECK-P10-NEXT: pli r4, 232
7257 ; CHECK-P10-NEXT: pli r5, 3567587329
7258 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
7259 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7260 ; CHECK-P10-NEXT: or r3, r3, r5
7261 ; CHECK-P10-NEXT: stfd f0, 0(r3)
7262 ; CHECK-P10-NEXT: blr
7264 ; CHECK-P9-LABEL: st_not_disjoint64_uint64_t_double:
7265 ; CHECK-P9: # %bb.0: # %entry
7266 ; CHECK-P9-NEXT: mtfprd f0, r4
7267 ; CHECK-P9-NEXT: li r4, 29
7268 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
7269 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7270 ; CHECK-P9-NEXT: oris r4, r4, 54437
7271 ; CHECK-P9-NEXT: ori r4, r4, 4097
7272 ; CHECK-P9-NEXT: or r3, r3, r4
7273 ; CHECK-P9-NEXT: stfd f0, 0(r3)
7274 ; CHECK-P9-NEXT: blr
7276 ; CHECK-P8-LABEL: st_not_disjoint64_uint64_t_double:
7277 ; CHECK-P8: # %bb.0: # %entry
7278 ; CHECK-P8-NEXT: mtfprd f0, r4
7279 ; CHECK-P8-NEXT: li r4, 29
7280 ; CHECK-P8-NEXT: rldic r4, r4, 35, 24
7281 ; CHECK-P8-NEXT: oris r4, r4, 54437
7282 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7283 ; CHECK-P8-NEXT: ori r4, r4, 4097
7284 ; CHECK-P8-NEXT: or r3, r3, r4
7285 ; CHECK-P8-NEXT: stfd f0, 0(r3)
7286 ; CHECK-P8-NEXT: blr
7288 %conv = uitofp i64 %str to double
7289 %or = or i64 %ptr, 1000000000001
7290 %0 = inttoptr i64 %or to ptr
7291 store double %conv, ptr %0, align 8
7295 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7296 define dso_local void @st_disjoint_align64_uint64_t_double(i64 %ptr, i64 %str) {
7297 ; CHECK-P10-LABEL: st_disjoint_align64_uint64_t_double:
7298 ; CHECK-P10: # %bb.0: # %entry
7299 ; CHECK-P10-NEXT: mtfprd f0, r4
7300 ; CHECK-P10-NEXT: pli r4, 244140625
7301 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
7302 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7303 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7304 ; CHECK-P10-NEXT: stfdx f0, r3, r4
7305 ; CHECK-P10-NEXT: blr
7307 ; CHECK-P9-LABEL: st_disjoint_align64_uint64_t_double:
7308 ; CHECK-P9: # %bb.0: # %entry
7309 ; CHECK-P9-NEXT: mtfprd f0, r4
7310 ; CHECK-P9-NEXT: lis r4, 3725
7311 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
7312 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7313 ; CHECK-P9-NEXT: ori r4, r4, 19025
7314 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
7315 ; CHECK-P9-NEXT: stfdx f0, r3, r4
7316 ; CHECK-P9-NEXT: blr
7318 ; CHECK-P8-LABEL: st_disjoint_align64_uint64_t_double:
7319 ; CHECK-P8: # %bb.0: # %entry
7320 ; CHECK-P8-NEXT: mtfprd f0, r4
7321 ; CHECK-P8-NEXT: lis r4, 3725
7322 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
7323 ; CHECK-P8-NEXT: ori r4, r4, 19025
7324 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
7325 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7326 ; CHECK-P8-NEXT: stfdx f0, r3, r4
7327 ; CHECK-P8-NEXT: blr
7329 %and = and i64 %ptr, -1099511627776
7330 %conv = uitofp i64 %str to double
7331 %or = or i64 %and, 1000000000000
7332 %0 = inttoptr i64 %or to ptr
7333 store double %conv, ptr %0, align 4096
7337 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7338 define dso_local void @st_cst_align16_uint64_t_double(i64 %str) {
7339 ; CHECK-LABEL: st_cst_align16_uint64_t_double:
7340 ; CHECK: # %bb.0: # %entry
7341 ; CHECK-NEXT: mtfprd f0, r3
7342 ; CHECK-NEXT: xscvuxddp f0, f0
7343 ; CHECK-NEXT: stfd f0, 4080(0)
7346 %conv = uitofp i64 %str to double
7347 store double %conv, ptr inttoptr (i64 4080 to ptr), align 16
7351 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7352 define dso_local void @st_cst_align32_uint64_t_double(i64 %str) {
7353 ; CHECK-LABEL: st_cst_align32_uint64_t_double:
7354 ; CHECK: # %bb.0: # %entry
7355 ; CHECK-NEXT: mtfprd f0, r3
7356 ; CHECK-NEXT: lis r3, 153
7357 ; CHECK-NEXT: xscvuxddp f0, f0
7358 ; CHECK-NEXT: stfd f0, -27108(r3)
7361 %conv = uitofp i64 %str to double
7362 store double %conv, ptr inttoptr (i64 9999900 to ptr), align 8
7366 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7367 define dso_local void @st_cst_align64_uint64_t_double(i64 %str) {
7368 ; CHECK-P10-LABEL: st_cst_align64_uint64_t_double:
7369 ; CHECK-P10: # %bb.0: # %entry
7370 ; CHECK-P10-NEXT: mtfprd f0, r3
7371 ; CHECK-P10-NEXT: pli r3, 244140625
7372 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
7373 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7374 ; CHECK-P10-NEXT: stfd f0, 0(r3)
7375 ; CHECK-P10-NEXT: blr
7377 ; CHECK-P9-LABEL: st_cst_align64_uint64_t_double:
7378 ; CHECK-P9: # %bb.0: # %entry
7379 ; CHECK-P9-NEXT: mtfprd f0, r3
7380 ; CHECK-P9-NEXT: lis r3, 3725
7381 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7382 ; CHECK-P9-NEXT: ori r3, r3, 19025
7383 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
7384 ; CHECK-P9-NEXT: stfd f0, 0(r3)
7385 ; CHECK-P9-NEXT: blr
7387 ; CHECK-P8-LABEL: st_cst_align64_uint64_t_double:
7388 ; CHECK-P8: # %bb.0: # %entry
7389 ; CHECK-P8-NEXT: mtfprd f0, r3
7390 ; CHECK-P8-NEXT: lis r3, 3725
7391 ; CHECK-P8-NEXT: ori r3, r3, 19025
7392 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
7393 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7394 ; CHECK-P8-NEXT: stfd f0, 0(r3)
7395 ; CHECK-P8-NEXT: blr
7397 %conv = uitofp i64 %str to double
7398 store double %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
7402 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7403 define dso_local void @st_0_int64_t_float(i64 %ptr, i64 %str) {
7404 ; CHECK-LABEL: st_0_int64_t_float:
7405 ; CHECK: # %bb.0: # %entry
7406 ; CHECK-NEXT: mtfprd f0, r4
7407 ; CHECK-NEXT: xscvsxdsp f0, f0
7408 ; CHECK-NEXT: stfs f0, 0(r3)
7411 %conv = sitofp i64 %str to float
7412 %0 = inttoptr i64 %ptr to ptr
7413 store float %conv, ptr %0, align 4
7417 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7418 define dso_local void @st_align16_int64_t_float(ptr nocapture %ptr, i64 %str) {
7419 ; CHECK-LABEL: st_align16_int64_t_float:
7420 ; CHECK: # %bb.0: # %entry
7421 ; CHECK-NEXT: mtfprd f0, r4
7422 ; CHECK-NEXT: xscvsxdsp f0, f0
7423 ; CHECK-NEXT: stfs f0, 8(r3)
7426 %conv = sitofp i64 %str to float
7427 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
7428 store float %conv, ptr %add.ptr, align 4
7432 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7433 define dso_local void @st_align32_int64_t_float(ptr nocapture %ptr, i64 %str) {
7434 ; CHECK-P10-LABEL: st_align32_int64_t_float:
7435 ; CHECK-P10: # %bb.0: # %entry
7436 ; CHECK-P10-NEXT: mtfprd f0, r4
7437 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
7438 ; CHECK-P10-NEXT: pstfs f0, 99999000(r3), 0
7439 ; CHECK-P10-NEXT: blr
7441 ; CHECK-P9-LABEL: st_align32_int64_t_float:
7442 ; CHECK-P9: # %bb.0: # %entry
7443 ; CHECK-P9-NEXT: mtfprd f0, r4
7444 ; CHECK-P9-NEXT: lis r4, 1525
7445 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
7446 ; CHECK-P9-NEXT: ori r4, r4, 56600
7447 ; CHECK-P9-NEXT: stfsx f0, r3, r4
7448 ; CHECK-P9-NEXT: blr
7450 ; CHECK-P8-LABEL: st_align32_int64_t_float:
7451 ; CHECK-P8: # %bb.0: # %entry
7452 ; CHECK-P8-NEXT: mtfprd f0, r4
7453 ; CHECK-P8-NEXT: lis r4, 1525
7454 ; CHECK-P8-NEXT: ori r4, r4, 56600
7455 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
7456 ; CHECK-P8-NEXT: stfsx f0, r3, r4
7457 ; CHECK-P8-NEXT: blr
7459 %conv = sitofp i64 %str to float
7460 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
7461 store float %conv, ptr %add.ptr, align 4
7465 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7466 define dso_local void @st_align64_int64_t_float(ptr nocapture %ptr, i64 %str) {
7467 ; CHECK-P10-LABEL: st_align64_int64_t_float:
7468 ; CHECK-P10: # %bb.0: # %entry
7469 ; CHECK-P10-NEXT: mtfprd f0, r4
7470 ; CHECK-P10-NEXT: pli r4, 244140625
7471 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7472 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
7473 ; CHECK-P10-NEXT: stfsx f0, r3, r4
7474 ; CHECK-P10-NEXT: blr
7476 ; CHECK-P9-LABEL: st_align64_int64_t_float:
7477 ; CHECK-P9: # %bb.0: # %entry
7478 ; CHECK-P9-NEXT: mtfprd f0, r4
7479 ; CHECK-P9-NEXT: lis r4, 3725
7480 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
7481 ; CHECK-P9-NEXT: ori r4, r4, 19025
7482 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
7483 ; CHECK-P9-NEXT: stfsx f0, r3, r4
7484 ; CHECK-P9-NEXT: blr
7486 ; CHECK-P8-LABEL: st_align64_int64_t_float:
7487 ; CHECK-P8: # %bb.0: # %entry
7488 ; CHECK-P8-NEXT: mtfprd f0, r4
7489 ; CHECK-P8-NEXT: lis r4, 3725
7490 ; CHECK-P8-NEXT: ori r4, r4, 19025
7491 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
7492 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
7493 ; CHECK-P8-NEXT: stfsx f0, r3, r4
7494 ; CHECK-P8-NEXT: blr
7496 %conv = sitofp i64 %str to float
7497 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
7498 store float %conv, ptr %add.ptr, align 4
7502 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7503 define dso_local void @st_reg_int64_t_float(ptr nocapture %ptr, i64 %off, i64 %str) {
7504 ; CHECK-LABEL: st_reg_int64_t_float:
7505 ; CHECK: # %bb.0: # %entry
7506 ; CHECK-NEXT: mtfprd f0, r5
7507 ; CHECK-NEXT: xscvsxdsp f0, f0
7508 ; CHECK-NEXT: stfsx f0, r3, r4
7511 %conv = sitofp i64 %str to float
7512 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
7513 store float %conv, ptr %add.ptr, align 4
7517 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7518 define dso_local void @st_or1_int64_t_float(i64 %ptr, i8 zeroext %off, i64 %str) {
7519 ; CHECK-LABEL: st_or1_int64_t_float:
7520 ; CHECK: # %bb.0: # %entry
7521 ; CHECK-NEXT: mtfprd f0, r5
7522 ; CHECK-NEXT: or r3, r4, r3
7523 ; CHECK-NEXT: xscvsxdsp f0, f0
7524 ; CHECK-NEXT: stfs f0, 0(r3)
7527 %conv = sitofp i64 %str to float
7528 %conv1 = zext i8 %off to i64
7529 %or = or i64 %conv1, %ptr
7530 %0 = inttoptr i64 %or to ptr
7531 store float %conv, ptr %0, align 4
7535 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7536 define dso_local void @st_or2_int64_t_float(i64 %ptr, i8 zeroext %off, i64 %str) {
7537 ; CHECK-LABEL: st_or2_int64_t_float:
7538 ; CHECK: # %bb.0: # %entry
7539 ; CHECK-NEXT: mtfprd f0, r5
7540 ; CHECK-NEXT: rldicr r3, r3, 0, 51
7541 ; CHECK-NEXT: xscvsxdsp f0, f0
7542 ; CHECK-NEXT: stfsx f0, r3, r4
7545 %and = and i64 %ptr, -4096
7546 %conv = sitofp i64 %str to float
7547 %conv1 = zext i8 %off to i64
7548 %or = or i64 %and, %conv1
7549 %0 = inttoptr i64 %or to ptr
7550 store float %conv, ptr %0, align 4
7554 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7555 define dso_local void @st_not_disjoint16_int64_t_float(i64 %ptr, i64 %str) {
7556 ; CHECK-LABEL: st_not_disjoint16_int64_t_float:
7557 ; CHECK: # %bb.0: # %entry
7558 ; CHECK-NEXT: mtfprd f0, r4
7559 ; CHECK-NEXT: ori r3, r3, 6
7560 ; CHECK-NEXT: xscvsxdsp f0, f0
7561 ; CHECK-NEXT: stfs f0, 0(r3)
7564 %conv = sitofp i64 %str to float
7565 %or = or i64 %ptr, 6
7566 %0 = inttoptr i64 %or to ptr
7567 store float %conv, ptr %0, align 4
7571 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7572 define dso_local void @st_disjoint_align16_int64_t_float(i64 %ptr, i64 %str) {
7573 ; CHECK-LABEL: st_disjoint_align16_int64_t_float:
7574 ; CHECK: # %bb.0: # %entry
7575 ; CHECK-NEXT: mtfprd f0, r4
7576 ; CHECK-NEXT: rldicr r3, r3, 0, 51
7577 ; CHECK-NEXT: xscvsxdsp f0, f0
7578 ; CHECK-NEXT: stfs f0, 24(r3)
7581 %and = and i64 %ptr, -4096
7582 %conv = sitofp i64 %str to float
7583 %or = or i64 %and, 24
7584 %0 = inttoptr i64 %or to ptr
7585 store float %conv, ptr %0, align 8
7589 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7590 define dso_local void @st_not_disjoint32_int64_t_float(i64 %ptr, i64 %str) {
7591 ; CHECK-P10-LABEL: st_not_disjoint32_int64_t_float:
7592 ; CHECK-P10: # %bb.0: # %entry
7593 ; CHECK-P10-NEXT: mtfprd f0, r4
7594 ; CHECK-P10-NEXT: ori r3, r3, 34463
7595 ; CHECK-P10-NEXT: oris r3, r3, 1
7596 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
7597 ; CHECK-P10-NEXT: stfs f0, 0(r3)
7598 ; CHECK-P10-NEXT: blr
7600 ; CHECK-P9-LABEL: st_not_disjoint32_int64_t_float:
7601 ; CHECK-P9: # %bb.0: # %entry
7602 ; CHECK-P9-NEXT: mtfprd f0, r4
7603 ; CHECK-P9-NEXT: ori r3, r3, 34463
7604 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
7605 ; CHECK-P9-NEXT: oris r3, r3, 1
7606 ; CHECK-P9-NEXT: stfs f0, 0(r3)
7607 ; CHECK-P9-NEXT: blr
7609 ; CHECK-P8-LABEL: st_not_disjoint32_int64_t_float:
7610 ; CHECK-P8: # %bb.0: # %entry
7611 ; CHECK-P8-NEXT: mtfprd f0, r4
7612 ; CHECK-P8-NEXT: ori r3, r3, 34463
7613 ; CHECK-P8-NEXT: oris r3, r3, 1
7614 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
7615 ; CHECK-P8-NEXT: stfs f0, 0(r3)
7616 ; CHECK-P8-NEXT: blr
7618 %conv = sitofp i64 %str to float
7619 %or = or i64 %ptr, 99999
7620 %0 = inttoptr i64 %or to ptr
7621 store float %conv, ptr %0, align 4
7625 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7626 define dso_local void @st_disjoint_align32_int64_t_float(i64 %ptr, i64 %str) {
7627 ; CHECK-P10-LABEL: st_disjoint_align32_int64_t_float:
7628 ; CHECK-P10: # %bb.0: # %entry
7629 ; CHECK-P10-NEXT: mtfprd f0, r4
7630 ; CHECK-P10-NEXT: lis r5, -15264
7631 ; CHECK-P10-NEXT: and r3, r3, r5
7632 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
7633 ; CHECK-P10-NEXT: pstfs f0, 999990000(r3), 0
7634 ; CHECK-P10-NEXT: blr
7636 ; CHECK-P9-LABEL: st_disjoint_align32_int64_t_float:
7637 ; CHECK-P9: # %bb.0: # %entry
7638 ; CHECK-P9-NEXT: mtfprd f0, r4
7639 ; CHECK-P9-NEXT: lis r5, -15264
7640 ; CHECK-P9-NEXT: lis r4, 15258
7641 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
7642 ; CHECK-P9-NEXT: and r3, r3, r5
7643 ; CHECK-P9-NEXT: ori r4, r4, 41712
7644 ; CHECK-P9-NEXT: stfsx f0, r3, r4
7645 ; CHECK-P9-NEXT: blr
7647 ; CHECK-P8-LABEL: st_disjoint_align32_int64_t_float:
7648 ; CHECK-P8: # %bb.0: # %entry
7649 ; CHECK-P8-NEXT: mtfprd f0, r4
7650 ; CHECK-P8-NEXT: lis r5, -15264
7651 ; CHECK-P8-NEXT: lis r4, 15258
7652 ; CHECK-P8-NEXT: and r3, r3, r5
7653 ; CHECK-P8-NEXT: ori r4, r4, 41712
7654 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
7655 ; CHECK-P8-NEXT: stfsx f0, r3, r4
7656 ; CHECK-P8-NEXT: blr
7658 %and = and i64 %ptr, -1000341504
7659 %conv = sitofp i64 %str to float
7660 %or = or i64 %and, 999990000
7661 %0 = inttoptr i64 %or to ptr
7662 store float %conv, ptr %0, align 16
7666 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7667 define dso_local void @st_not_disjoint64_int64_t_float(i64 %ptr, i64 %str) {
7668 ; CHECK-P10-LABEL: st_not_disjoint64_int64_t_float:
7669 ; CHECK-P10: # %bb.0: # %entry
7670 ; CHECK-P10-NEXT: mtfprd f0, r4
7671 ; CHECK-P10-NEXT: pli r4, 232
7672 ; CHECK-P10-NEXT: pli r5, 3567587329
7673 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
7674 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
7675 ; CHECK-P10-NEXT: or r3, r3, r5
7676 ; CHECK-P10-NEXT: stfs f0, 0(r3)
7677 ; CHECK-P10-NEXT: blr
7679 ; CHECK-P9-LABEL: st_not_disjoint64_int64_t_float:
7680 ; CHECK-P9: # %bb.0: # %entry
7681 ; CHECK-P9-NEXT: mtfprd f0, r4
7682 ; CHECK-P9-NEXT: li r4, 29
7683 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
7684 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
7685 ; CHECK-P9-NEXT: oris r4, r4, 54437
7686 ; CHECK-P9-NEXT: ori r4, r4, 4097
7687 ; CHECK-P9-NEXT: or r3, r3, r4
7688 ; CHECK-P9-NEXT: stfs f0, 0(r3)
7689 ; CHECK-P9-NEXT: blr
7691 ; CHECK-P8-LABEL: st_not_disjoint64_int64_t_float:
7692 ; CHECK-P8: # %bb.0: # %entry
7693 ; CHECK-P8-NEXT: mtfprd f0, r4
7694 ; CHECK-P8-NEXT: li r4, 29
7695 ; CHECK-P8-NEXT: rldic r4, r4, 35, 24
7696 ; CHECK-P8-NEXT: oris r4, r4, 54437
7697 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
7698 ; CHECK-P8-NEXT: ori r4, r4, 4097
7699 ; CHECK-P8-NEXT: or r3, r3, r4
7700 ; CHECK-P8-NEXT: stfs f0, 0(r3)
7701 ; CHECK-P8-NEXT: blr
7703 %conv = sitofp i64 %str to float
7704 %or = or i64 %ptr, 1000000000001
7705 %0 = inttoptr i64 %or to ptr
7706 store float %conv, ptr %0, align 4
7710 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7711 define dso_local void @st_disjoint_align64_int64_t_float(i64 %ptr, i64 %str) {
7712 ; CHECK-P10-LABEL: st_disjoint_align64_int64_t_float:
7713 ; CHECK-P10: # %bb.0: # %entry
7714 ; CHECK-P10-NEXT: mtfprd f0, r4
7715 ; CHECK-P10-NEXT: pli r4, 244140625
7716 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
7717 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7718 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
7719 ; CHECK-P10-NEXT: stfsx f0, r3, r4
7720 ; CHECK-P10-NEXT: blr
7722 ; CHECK-P9-LABEL: st_disjoint_align64_int64_t_float:
7723 ; CHECK-P9: # %bb.0: # %entry
7724 ; CHECK-P9-NEXT: mtfprd f0, r4
7725 ; CHECK-P9-NEXT: lis r4, 3725
7726 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
7727 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
7728 ; CHECK-P9-NEXT: ori r4, r4, 19025
7729 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
7730 ; CHECK-P9-NEXT: stfsx f0, r3, r4
7731 ; CHECK-P9-NEXT: blr
7733 ; CHECK-P8-LABEL: st_disjoint_align64_int64_t_float:
7734 ; CHECK-P8: # %bb.0: # %entry
7735 ; CHECK-P8-NEXT: mtfprd f0, r4
7736 ; CHECK-P8-NEXT: lis r4, 3725
7737 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
7738 ; CHECK-P8-NEXT: ori r4, r4, 19025
7739 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
7740 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
7741 ; CHECK-P8-NEXT: stfsx f0, r3, r4
7742 ; CHECK-P8-NEXT: blr
7744 %and = and i64 %ptr, -1099511627776
7745 %conv = sitofp i64 %str to float
7746 %or = or i64 %and, 1000000000000
7747 %0 = inttoptr i64 %or to ptr
7748 store float %conv, ptr %0, align 4096
7752 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7753 define dso_local void @st_cst_align16_int64_t_float(i64 %str) {
7754 ; CHECK-LABEL: st_cst_align16_int64_t_float:
7755 ; CHECK: # %bb.0: # %entry
7756 ; CHECK-NEXT: mtfprd f0, r3
7757 ; CHECK-NEXT: xscvsxdsp f0, f0
7758 ; CHECK-NEXT: stfs f0, 4080(0)
7761 %conv = sitofp i64 %str to float
7762 store float %conv, ptr inttoptr (i64 4080 to ptr), align 16
7766 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7767 define dso_local void @st_cst_align32_int64_t_float(i64 %str) {
7768 ; CHECK-LABEL: st_cst_align32_int64_t_float:
7769 ; CHECK: # %bb.0: # %entry
7770 ; CHECK-NEXT: mtfprd f0, r3
7771 ; CHECK-NEXT: lis r3, 153
7772 ; CHECK-NEXT: xscvsxdsp f0, f0
7773 ; CHECK-NEXT: stfs f0, -27108(r3)
7776 %conv = sitofp i64 %str to float
7777 store float %conv, ptr inttoptr (i64 9999900 to ptr), align 4
7781 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7782 define dso_local void @st_cst_align64_int64_t_float(i64 %str) {
7783 ; CHECK-P10-LABEL: st_cst_align64_int64_t_float:
7784 ; CHECK-P10: # %bb.0: # %entry
7785 ; CHECK-P10-NEXT: mtfprd f0, r3
7786 ; CHECK-P10-NEXT: pli r3, 244140625
7787 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
7788 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
7789 ; CHECK-P10-NEXT: stfs f0, 0(r3)
7790 ; CHECK-P10-NEXT: blr
7792 ; CHECK-P9-LABEL: st_cst_align64_int64_t_float:
7793 ; CHECK-P9: # %bb.0: # %entry
7794 ; CHECK-P9-NEXT: mtfprd f0, r3
7795 ; CHECK-P9-NEXT: lis r3, 3725
7796 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
7797 ; CHECK-P9-NEXT: ori r3, r3, 19025
7798 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
7799 ; CHECK-P9-NEXT: stfs f0, 0(r3)
7800 ; CHECK-P9-NEXT: blr
7802 ; CHECK-P8-LABEL: st_cst_align64_int64_t_float:
7803 ; CHECK-P8: # %bb.0: # %entry
7804 ; CHECK-P8-NEXT: mtfprd f0, r3
7805 ; CHECK-P8-NEXT: lis r3, 3725
7806 ; CHECK-P8-NEXT: ori r3, r3, 19025
7807 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
7808 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
7809 ; CHECK-P8-NEXT: stfs f0, 0(r3)
7810 ; CHECK-P8-NEXT: blr
7812 %conv = sitofp i64 %str to float
7813 store float %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
7817 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7818 define dso_local void @st_0_int64_t_double(i64 %ptr, i64 %str) {
7819 ; CHECK-LABEL: st_0_int64_t_double:
7820 ; CHECK: # %bb.0: # %entry
7821 ; CHECK-NEXT: mtfprd f0, r4
7822 ; CHECK-NEXT: xscvsxddp f0, f0
7823 ; CHECK-NEXT: stfd f0, 0(r3)
7826 %conv = sitofp i64 %str to double
7827 %0 = inttoptr i64 %ptr to ptr
7828 store double %conv, ptr %0, align 8
7832 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7833 define dso_local void @st_align16_int64_t_double(ptr nocapture %ptr, i64 %str) {
7834 ; CHECK-LABEL: st_align16_int64_t_double:
7835 ; CHECK: # %bb.0: # %entry
7836 ; CHECK-NEXT: mtfprd f0, r4
7837 ; CHECK-NEXT: xscvsxddp f0, f0
7838 ; CHECK-NEXT: stfd f0, 8(r3)
7841 %conv = sitofp i64 %str to double
7842 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
7843 store double %conv, ptr %add.ptr, align 8
7847 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7848 define dso_local void @st_align32_int64_t_double(ptr nocapture %ptr, i64 %str) {
7849 ; CHECK-P10-LABEL: st_align32_int64_t_double:
7850 ; CHECK-P10: # %bb.0: # %entry
7851 ; CHECK-P10-NEXT: mtfprd f0, r4
7852 ; CHECK-P10-NEXT: xscvsxddp f0, f0
7853 ; CHECK-P10-NEXT: pstfd f0, 99999000(r3), 0
7854 ; CHECK-P10-NEXT: blr
7856 ; CHECK-P9-LABEL: st_align32_int64_t_double:
7857 ; CHECK-P9: # %bb.0: # %entry
7858 ; CHECK-P9-NEXT: mtfprd f0, r4
7859 ; CHECK-P9-NEXT: lis r4, 1525
7860 ; CHECK-P9-NEXT: xscvsxddp f0, f0
7861 ; CHECK-P9-NEXT: ori r4, r4, 56600
7862 ; CHECK-P9-NEXT: stfdx f0, r3, r4
7863 ; CHECK-P9-NEXT: blr
7865 ; CHECK-P8-LABEL: st_align32_int64_t_double:
7866 ; CHECK-P8: # %bb.0: # %entry
7867 ; CHECK-P8-NEXT: mtfprd f0, r4
7868 ; CHECK-P8-NEXT: lis r4, 1525
7869 ; CHECK-P8-NEXT: ori r4, r4, 56600
7870 ; CHECK-P8-NEXT: xscvsxddp f0, f0
7871 ; CHECK-P8-NEXT: stfdx f0, r3, r4
7872 ; CHECK-P8-NEXT: blr
7874 %conv = sitofp i64 %str to double
7875 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
7876 store double %conv, ptr %add.ptr, align 8
7880 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7881 define dso_local void @st_align64_int64_t_double(ptr nocapture %ptr, i64 %str) {
7882 ; CHECK-P10-LABEL: st_align64_int64_t_double:
7883 ; CHECK-P10: # %bb.0: # %entry
7884 ; CHECK-P10-NEXT: mtfprd f0, r4
7885 ; CHECK-P10-NEXT: pli r4, 244140625
7886 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7887 ; CHECK-P10-NEXT: xscvsxddp f0, f0
7888 ; CHECK-P10-NEXT: stfdx f0, r3, r4
7889 ; CHECK-P10-NEXT: blr
7891 ; CHECK-P9-LABEL: st_align64_int64_t_double:
7892 ; CHECK-P9: # %bb.0: # %entry
7893 ; CHECK-P9-NEXT: mtfprd f0, r4
7894 ; CHECK-P9-NEXT: lis r4, 3725
7895 ; CHECK-P9-NEXT: xscvsxddp f0, f0
7896 ; CHECK-P9-NEXT: ori r4, r4, 19025
7897 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
7898 ; CHECK-P9-NEXT: stfdx f0, r3, r4
7899 ; CHECK-P9-NEXT: blr
7901 ; CHECK-P8-LABEL: st_align64_int64_t_double:
7902 ; CHECK-P8: # %bb.0: # %entry
7903 ; CHECK-P8-NEXT: mtfprd f0, r4
7904 ; CHECK-P8-NEXT: lis r4, 3725
7905 ; CHECK-P8-NEXT: ori r4, r4, 19025
7906 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
7907 ; CHECK-P8-NEXT: xscvsxddp f0, f0
7908 ; CHECK-P8-NEXT: stfdx f0, r3, r4
7909 ; CHECK-P8-NEXT: blr
7911 %conv = sitofp i64 %str to double
7912 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
7913 store double %conv, ptr %add.ptr, align 8
7917 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7918 define dso_local void @st_reg_int64_t_double(ptr nocapture %ptr, i64 %off, i64 %str) {
7919 ; CHECK-LABEL: st_reg_int64_t_double:
7920 ; CHECK: # %bb.0: # %entry
7921 ; CHECK-NEXT: mtfprd f0, r5
7922 ; CHECK-NEXT: xscvsxddp f0, f0
7923 ; CHECK-NEXT: stfdx f0, r3, r4
7926 %conv = sitofp i64 %str to double
7927 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
7928 store double %conv, ptr %add.ptr, align 8
7932 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7933 define dso_local void @st_or1_int64_t_double(i64 %ptr, i8 zeroext %off, i64 %str) {
7934 ; CHECK-LABEL: st_or1_int64_t_double:
7935 ; CHECK: # %bb.0: # %entry
7936 ; CHECK-NEXT: mtfprd f0, r5
7937 ; CHECK-NEXT: or r3, r4, r3
7938 ; CHECK-NEXT: xscvsxddp f0, f0
7939 ; CHECK-NEXT: stfd f0, 0(r3)
7942 %conv = sitofp i64 %str to double
7943 %conv1 = zext i8 %off to i64
7944 %or = or i64 %conv1, %ptr
7945 %0 = inttoptr i64 %or to ptr
7946 store double %conv, ptr %0, align 8
7950 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7951 define dso_local void @st_or2_int64_t_double(i64 %ptr, i8 zeroext %off, i64 %str) {
7952 ; CHECK-LABEL: st_or2_int64_t_double:
7953 ; CHECK: # %bb.0: # %entry
7954 ; CHECK-NEXT: mtfprd f0, r5
7955 ; CHECK-NEXT: rldicr r3, r3, 0, 51
7956 ; CHECK-NEXT: xscvsxddp f0, f0
7957 ; CHECK-NEXT: stfdx f0, r3, r4
7960 %and = and i64 %ptr, -4096
7961 %conv = sitofp i64 %str to double
7962 %conv1 = zext i8 %off to i64
7963 %or = or i64 %and, %conv1
7964 %0 = inttoptr i64 %or to ptr
7965 store double %conv, ptr %0, align 8
7969 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7970 define dso_local void @st_not_disjoint16_int64_t_double(i64 %ptr, i64 %str) {
7971 ; CHECK-LABEL: st_not_disjoint16_int64_t_double:
7972 ; CHECK: # %bb.0: # %entry
7973 ; CHECK-NEXT: mtfprd f0, r4
7974 ; CHECK-NEXT: ori r3, r3, 6
7975 ; CHECK-NEXT: xscvsxddp f0, f0
7976 ; CHECK-NEXT: stfd f0, 0(r3)
7979 %conv = sitofp i64 %str to double
7980 %or = or i64 %ptr, 6
7981 %0 = inttoptr i64 %or to ptr
7982 store double %conv, ptr %0, align 8
7986 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7987 define dso_local void @st_disjoint_align16_int64_t_double(i64 %ptr, i64 %str) {
7988 ; CHECK-LABEL: st_disjoint_align16_int64_t_double:
7989 ; CHECK: # %bb.0: # %entry
7990 ; CHECK-NEXT: mtfprd f0, r4
7991 ; CHECK-NEXT: rldicr r3, r3, 0, 51
7992 ; CHECK-NEXT: xscvsxddp f0, f0
7993 ; CHECK-NEXT: stfd f0, 24(r3)
7996 %and = and i64 %ptr, -4096
7997 %conv = sitofp i64 %str to double
7998 %or = or i64 %and, 24
7999 %0 = inttoptr i64 %or to ptr
8000 store double %conv, ptr %0, align 8
8004 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8005 define dso_local void @st_not_disjoint32_int64_t_double(i64 %ptr, i64 %str) {
8006 ; CHECK-P10-LABEL: st_not_disjoint32_int64_t_double:
8007 ; CHECK-P10: # %bb.0: # %entry
8008 ; CHECK-P10-NEXT: mtfprd f0, r4
8009 ; CHECK-P10-NEXT: ori r3, r3, 34463
8010 ; CHECK-P10-NEXT: oris r3, r3, 1
8011 ; CHECK-P10-NEXT: xscvsxddp f0, f0
8012 ; CHECK-P10-NEXT: stfd f0, 0(r3)
8013 ; CHECK-P10-NEXT: blr
8015 ; CHECK-P9-LABEL: st_not_disjoint32_int64_t_double:
8016 ; CHECK-P9: # %bb.0: # %entry
8017 ; CHECK-P9-NEXT: mtfprd f0, r4
8018 ; CHECK-P9-NEXT: ori r3, r3, 34463
8019 ; CHECK-P9-NEXT: xscvsxddp f0, f0
8020 ; CHECK-P9-NEXT: oris r3, r3, 1
8021 ; CHECK-P9-NEXT: stfd f0, 0(r3)
8022 ; CHECK-P9-NEXT: blr
8024 ; CHECK-P8-LABEL: st_not_disjoint32_int64_t_double:
8025 ; CHECK-P8: # %bb.0: # %entry
8026 ; CHECK-P8-NEXT: mtfprd f0, r4
8027 ; CHECK-P8-NEXT: ori r3, r3, 34463
8028 ; CHECK-P8-NEXT: oris r3, r3, 1
8029 ; CHECK-P8-NEXT: xscvsxddp f0, f0
8030 ; CHECK-P8-NEXT: stfd f0, 0(r3)
8031 ; CHECK-P8-NEXT: blr
8033 %conv = sitofp i64 %str to double
8034 %or = or i64 %ptr, 99999
8035 %0 = inttoptr i64 %or to ptr
8036 store double %conv, ptr %0, align 8
8040 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8041 define dso_local void @st_disjoint_align32_int64_t_double(i64 %ptr, i64 %str) {
8042 ; CHECK-P10-LABEL: st_disjoint_align32_int64_t_double:
8043 ; CHECK-P10: # %bb.0: # %entry
8044 ; CHECK-P10-NEXT: mtfprd f0, r4
8045 ; CHECK-P10-NEXT: lis r5, -15264
8046 ; CHECK-P10-NEXT: and r3, r3, r5
8047 ; CHECK-P10-NEXT: xscvsxddp f0, f0
8048 ; CHECK-P10-NEXT: pstfd f0, 999990000(r3), 0
8049 ; CHECK-P10-NEXT: blr
8051 ; CHECK-P9-LABEL: st_disjoint_align32_int64_t_double:
8052 ; CHECK-P9: # %bb.0: # %entry
8053 ; CHECK-P9-NEXT: mtfprd f0, r4
8054 ; CHECK-P9-NEXT: lis r5, -15264
8055 ; CHECK-P9-NEXT: lis r4, 15258
8056 ; CHECK-P9-NEXT: xscvsxddp f0, f0
8057 ; CHECK-P9-NEXT: and r3, r3, r5
8058 ; CHECK-P9-NEXT: ori r4, r4, 41712
8059 ; CHECK-P9-NEXT: stfdx f0, r3, r4
8060 ; CHECK-P9-NEXT: blr
8062 ; CHECK-P8-LABEL: st_disjoint_align32_int64_t_double:
8063 ; CHECK-P8: # %bb.0: # %entry
8064 ; CHECK-P8-NEXT: mtfprd f0, r4
8065 ; CHECK-P8-NEXT: lis r5, -15264
8066 ; CHECK-P8-NEXT: lis r4, 15258
8067 ; CHECK-P8-NEXT: and r3, r3, r5
8068 ; CHECK-P8-NEXT: ori r4, r4, 41712
8069 ; CHECK-P8-NEXT: xscvsxddp f0, f0
8070 ; CHECK-P8-NEXT: stfdx f0, r3, r4
8071 ; CHECK-P8-NEXT: blr
8073 %and = and i64 %ptr, -1000341504
8074 %conv = sitofp i64 %str to double
8075 %or = or i64 %and, 999990000
8076 %0 = inttoptr i64 %or to ptr
8077 store double %conv, ptr %0, align 16
8081 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8082 define dso_local void @st_not_disjoint64_int64_t_double(i64 %ptr, i64 %str) {
8083 ; CHECK-P10-LABEL: st_not_disjoint64_int64_t_double:
8084 ; CHECK-P10: # %bb.0: # %entry
8085 ; CHECK-P10-NEXT: mtfprd f0, r4
8086 ; CHECK-P10-NEXT: pli r4, 232
8087 ; CHECK-P10-NEXT: pli r5, 3567587329
8088 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
8089 ; CHECK-P10-NEXT: xscvsxddp f0, f0
8090 ; CHECK-P10-NEXT: or r3, r3, r5
8091 ; CHECK-P10-NEXT: stfd f0, 0(r3)
8092 ; CHECK-P10-NEXT: blr
8094 ; CHECK-P9-LABEL: st_not_disjoint64_int64_t_double:
8095 ; CHECK-P9: # %bb.0: # %entry
8096 ; CHECK-P9-NEXT: mtfprd f0, r4
8097 ; CHECK-P9-NEXT: li r4, 29
8098 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
8099 ; CHECK-P9-NEXT: xscvsxddp f0, f0
8100 ; CHECK-P9-NEXT: oris r4, r4, 54437
8101 ; CHECK-P9-NEXT: ori r4, r4, 4097
8102 ; CHECK-P9-NEXT: or r3, r3, r4
8103 ; CHECK-P9-NEXT: stfd f0, 0(r3)
8104 ; CHECK-P9-NEXT: blr
8106 ; CHECK-P8-LABEL: st_not_disjoint64_int64_t_double:
8107 ; CHECK-P8: # %bb.0: # %entry
8108 ; CHECK-P8-NEXT: mtfprd f0, r4
8109 ; CHECK-P8-NEXT: li r4, 29
8110 ; CHECK-P8-NEXT: rldic r4, r4, 35, 24
8111 ; CHECK-P8-NEXT: oris r4, r4, 54437
8112 ; CHECK-P8-NEXT: xscvsxddp f0, f0
8113 ; CHECK-P8-NEXT: ori r4, r4, 4097
8114 ; CHECK-P8-NEXT: or r3, r3, r4
8115 ; CHECK-P8-NEXT: stfd f0, 0(r3)
8116 ; CHECK-P8-NEXT: blr
8118 %conv = sitofp i64 %str to double
8119 %or = or i64 %ptr, 1000000000001
8120 %0 = inttoptr i64 %or to ptr
8121 store double %conv, ptr %0, align 8
8125 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8126 define dso_local void @st_disjoint_align64_int64_t_double(i64 %ptr, i64 %str) {
8127 ; CHECK-P10-LABEL: st_disjoint_align64_int64_t_double:
8128 ; CHECK-P10: # %bb.0: # %entry
8129 ; CHECK-P10-NEXT: mtfprd f0, r4
8130 ; CHECK-P10-NEXT: pli r4, 244140625
8131 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
8132 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
8133 ; CHECK-P10-NEXT: xscvsxddp f0, f0
8134 ; CHECK-P10-NEXT: stfdx f0, r3, r4
8135 ; CHECK-P10-NEXT: blr
8137 ; CHECK-P9-LABEL: st_disjoint_align64_int64_t_double:
8138 ; CHECK-P9: # %bb.0: # %entry
8139 ; CHECK-P9-NEXT: mtfprd f0, r4
8140 ; CHECK-P9-NEXT: lis r4, 3725
8141 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
8142 ; CHECK-P9-NEXT: xscvsxddp f0, f0
8143 ; CHECK-P9-NEXT: ori r4, r4, 19025
8144 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
8145 ; CHECK-P9-NEXT: stfdx f0, r3, r4
8146 ; CHECK-P9-NEXT: blr
8148 ; CHECK-P8-LABEL: st_disjoint_align64_int64_t_double:
8149 ; CHECK-P8: # %bb.0: # %entry
8150 ; CHECK-P8-NEXT: mtfprd f0, r4
8151 ; CHECK-P8-NEXT: lis r4, 3725
8152 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
8153 ; CHECK-P8-NEXT: ori r4, r4, 19025
8154 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
8155 ; CHECK-P8-NEXT: xscvsxddp f0, f0
8156 ; CHECK-P8-NEXT: stfdx f0, r3, r4
8157 ; CHECK-P8-NEXT: blr
8159 %and = and i64 %ptr, -1099511627776
8160 %conv = sitofp i64 %str to double
8161 %or = or i64 %and, 1000000000000
8162 %0 = inttoptr i64 %or to ptr
8163 store double %conv, ptr %0, align 4096
8167 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8168 define dso_local void @st_cst_align16_int64_t_double(i64 %str) {
8169 ; CHECK-LABEL: st_cst_align16_int64_t_double:
8170 ; CHECK: # %bb.0: # %entry
8171 ; CHECK-NEXT: mtfprd f0, r3
8172 ; CHECK-NEXT: xscvsxddp f0, f0
8173 ; CHECK-NEXT: stfd f0, 4080(0)
8176 %conv = sitofp i64 %str to double
8177 store double %conv, ptr inttoptr (i64 4080 to ptr), align 16
8181 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8182 define dso_local void @st_cst_align32_int64_t_double(i64 %str) {
8183 ; CHECK-LABEL: st_cst_align32_int64_t_double:
8184 ; CHECK: # %bb.0: # %entry
8185 ; CHECK-NEXT: mtfprd f0, r3
8186 ; CHECK-NEXT: lis r3, 153
8187 ; CHECK-NEXT: xscvsxddp f0, f0
8188 ; CHECK-NEXT: stfd f0, -27108(r3)
8191 %conv = sitofp i64 %str to double
8192 store double %conv, ptr inttoptr (i64 9999900 to ptr), align 8
8196 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8197 define dso_local void @st_cst_align64_int64_t_double(i64 %str) {
8198 ; CHECK-P10-LABEL: st_cst_align64_int64_t_double:
8199 ; CHECK-P10: # %bb.0: # %entry
8200 ; CHECK-P10-NEXT: mtfprd f0, r3
8201 ; CHECK-P10-NEXT: pli r3, 244140625
8202 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
8203 ; CHECK-P10-NEXT: xscvsxddp f0, f0
8204 ; CHECK-P10-NEXT: stfd f0, 0(r3)
8205 ; CHECK-P10-NEXT: blr
8207 ; CHECK-P9-LABEL: st_cst_align64_int64_t_double:
8208 ; CHECK-P9: # %bb.0: # %entry
8209 ; CHECK-P9-NEXT: mtfprd f0, r3
8210 ; CHECK-P9-NEXT: lis r3, 3725
8211 ; CHECK-P9-NEXT: xscvsxddp f0, f0
8212 ; CHECK-P9-NEXT: ori r3, r3, 19025
8213 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
8214 ; CHECK-P9-NEXT: stfd f0, 0(r3)
8215 ; CHECK-P9-NEXT: blr
8217 ; CHECK-P8-LABEL: st_cst_align64_int64_t_double:
8218 ; CHECK-P8: # %bb.0: # %entry
8219 ; CHECK-P8-NEXT: mtfprd f0, r3
8220 ; CHECK-P8-NEXT: lis r3, 3725
8221 ; CHECK-P8-NEXT: ori r3, r3, 19025
8222 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
8223 ; CHECK-P8-NEXT: xscvsxddp f0, f0
8224 ; CHECK-P8-NEXT: stfd f0, 0(r3)
8225 ; CHECK-P8-NEXT: blr
8227 %conv = sitofp i64 %str to double
8228 store double %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096