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 float*
31 %1 = load float, float* %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(i8* 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, i8* %ptr, i64 8
46 %0 = bitcast i8* %add.ptr to float*
47 %1 = load float, float* %0, align 4
48 %conv = fptosi float %1 to i64
52 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
53 define dso_local i64 @ld_align32_int64_t_float(i8* nocapture readonly %ptr) {
54 ; CHECK-P10-LABEL: ld_align32_int64_t_float:
55 ; CHECK-P10: # %bb.0: # %entry
56 ; CHECK-P10-NEXT: pli r4, 99999000
57 ; CHECK-P10-NEXT: lfsx f0, r3, r4
58 ; CHECK-P10-NEXT: xscvdpsxds f0, f0
59 ; CHECK-P10-NEXT: mffprd r3, f0
62 ; CHECK-PREP10-LABEL: ld_align32_int64_t_float:
63 ; CHECK-PREP10: # %bb.0: # %entry
64 ; CHECK-PREP10-NEXT: lis r4, 1525
65 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
66 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
67 ; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
68 ; CHECK-PREP10-NEXT: mffprd r3, f0
69 ; CHECK-PREP10-NEXT: blr
71 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
72 %0 = bitcast i8* %add.ptr to float*
73 %1 = load float, float* %0, align 4
74 %conv = fptosi float %1 to i64
78 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
79 define dso_local i64 @ld_align64_int64_t_float(i8* nocapture readonly %ptr) {
80 ; CHECK-P10-LABEL: ld_align64_int64_t_float:
81 ; CHECK-P10: # %bb.0: # %entry
82 ; CHECK-P10-NEXT: pli r4, 244140625
83 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
84 ; CHECK-P10-NEXT: lfsx f0, r3, r4
85 ; CHECK-P10-NEXT: xscvdpsxds f0, f0
86 ; CHECK-P10-NEXT: mffprd r3, f0
89 ; CHECK-PREP10-LABEL: ld_align64_int64_t_float:
90 ; CHECK-PREP10: # %bb.0: # %entry
91 ; CHECK-PREP10-NEXT: lis r4, 3725
92 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
93 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
94 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
95 ; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
96 ; CHECK-PREP10-NEXT: mffprd r3, f0
97 ; CHECK-PREP10-NEXT: blr
99 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
100 %0 = bitcast i8* %add.ptr to float*
101 %1 = load float, float* %0, align 4
102 %conv = fptosi float %1 to i64
106 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
107 define dso_local i64 @ld_reg_int64_t_float(i8* nocapture readonly %ptr, i64 %off) {
108 ; CHECK-LABEL: ld_reg_int64_t_float:
109 ; CHECK: # %bb.0: # %entry
110 ; CHECK-NEXT: lfsx f0, r3, r4
111 ; CHECK-NEXT: xscvdpsxds f0, f0
112 ; CHECK-NEXT: mffprd r3, f0
115 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
116 %0 = bitcast i8* %add.ptr to float*
117 %1 = load float, float* %0, align 4
118 %conv = fptosi float %1 to i64
122 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
123 define dso_local i64 @ld_or_int64_t_float(i64 %ptr, i8 zeroext %off) {
124 ; CHECK-LABEL: ld_or_int64_t_float:
125 ; CHECK: # %bb.0: # %entry
126 ; CHECK-NEXT: or r3, r4, r3
127 ; CHECK-NEXT: lfs f0, 0(r3)
128 ; CHECK-NEXT: xscvdpsxds f0, f0
129 ; CHECK-NEXT: mffprd r3, f0
132 %conv = zext i8 %off to i64
133 %or = or i64 %conv, %ptr
134 %0 = inttoptr i64 %or to float*
135 %1 = load float, float* %0, align 4
136 %conv1 = fptosi float %1 to i64
140 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
141 define dso_local i64 @ld_not_disjoint16_int64_t_float(i64 %ptr) {
142 ; CHECK-LABEL: ld_not_disjoint16_int64_t_float:
143 ; CHECK: # %bb.0: # %entry
144 ; CHECK-NEXT: ori r3, r3, 6
145 ; CHECK-NEXT: lfs f0, 0(r3)
146 ; CHECK-NEXT: xscvdpsxds f0, f0
147 ; CHECK-NEXT: mffprd r3, f0
151 %0 = inttoptr i64 %or to float*
152 %1 = load float, float* %0, align 4
153 %conv = fptosi float %1 to i64
157 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
158 define dso_local i64 @ld_disjoint_align16_int64_t_float(i64 %ptr) {
159 ; CHECK-LABEL: ld_disjoint_align16_int64_t_float:
160 ; CHECK: # %bb.0: # %entry
161 ; CHECK-NEXT: rldicr r3, r3, 0, 51
162 ; CHECK-NEXT: lfs f0, 24(r3)
163 ; CHECK-NEXT: xscvdpsxds f0, f0
164 ; CHECK-NEXT: mffprd r3, f0
167 %and = and i64 %ptr, -4096
168 %or = or i64 %and, 24
169 %0 = inttoptr i64 %or to float*
170 %1 = load float, float* %0, align 8
171 %conv = fptosi float %1 to i64
175 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
176 define dso_local i64 @ld_not_disjoint32_int64_t_float(i64 %ptr) {
177 ; CHECK-LABEL: ld_not_disjoint32_int64_t_float:
178 ; CHECK: # %bb.0: # %entry
179 ; CHECK-NEXT: ori r3, r3, 34463
180 ; CHECK-NEXT: oris r3, r3, 1
181 ; CHECK-NEXT: lfs f0, 0(r3)
182 ; CHECK-NEXT: xscvdpsxds f0, f0
183 ; CHECK-NEXT: mffprd r3, f0
186 %or = or i64 %ptr, 99999
187 %0 = inttoptr i64 %or to float*
188 %1 = load float, float* %0, align 4
189 %conv = fptosi float %1 to i64
193 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
194 define dso_local i64 @ld_disjoint_align32_int64_t_float(i64 %ptr) {
195 ; CHECK-P10-LABEL: ld_disjoint_align32_int64_t_float:
196 ; CHECK-P10: # %bb.0: # %entry
197 ; CHECK-P10-NEXT: lis r4, -15264
198 ; CHECK-P10-NEXT: and r3, r3, r4
199 ; CHECK-P10-NEXT: pli r4, 999990000
200 ; CHECK-P10-NEXT: lfsx f0, r3, r4
201 ; CHECK-P10-NEXT: xscvdpsxds f0, f0
202 ; CHECK-P10-NEXT: mffprd r3, f0
203 ; CHECK-P10-NEXT: blr
205 ; CHECK-P9-LABEL: ld_disjoint_align32_int64_t_float:
206 ; CHECK-P9: # %bb.0: # %entry
207 ; CHECK-P9-NEXT: lis r4, -15264
208 ; CHECK-P9-NEXT: and r3, r3, r4
209 ; CHECK-P9-NEXT: lis r4, 15258
210 ; CHECK-P9-NEXT: ori r4, r4, 41712
211 ; CHECK-P9-NEXT: lfsx f0, r3, r4
212 ; CHECK-P9-NEXT: xscvdpsxds f0, f0
213 ; CHECK-P9-NEXT: mffprd r3, f0
216 ; CHECK-P8-LABEL: ld_disjoint_align32_int64_t_float:
217 ; CHECK-P8: # %bb.0: # %entry
218 ; CHECK-P8-NEXT: lis r4, -15264
219 ; CHECK-P8-NEXT: lis r5, 15258
220 ; CHECK-P8-NEXT: and r3, r3, r4
221 ; CHECK-P8-NEXT: ori r4, r5, 41712
222 ; CHECK-P8-NEXT: lfsx f0, r3, r4
223 ; CHECK-P8-NEXT: xscvdpsxds f0, f0
224 ; CHECK-P8-NEXT: mffprd r3, f0
227 %and = and i64 %ptr, -1000341504
228 %or = or i64 %and, 999990000
229 %0 = inttoptr i64 %or to float*
230 %1 = load float, float* %0, align 16
231 %conv = fptosi float %1 to i64
235 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
236 define dso_local i64 @ld_not_disjoint64_int64_t_float(i64 %ptr) {
237 ; CHECK-P10-LABEL: ld_not_disjoint64_int64_t_float:
238 ; CHECK-P10: # %bb.0: # %entry
239 ; CHECK-P10-NEXT: pli r4, 232
240 ; CHECK-P10-NEXT: pli r5, 3567587329
241 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
242 ; CHECK-P10-NEXT: or r3, r3, r5
243 ; CHECK-P10-NEXT: lfs f0, 0(r3)
244 ; CHECK-P10-NEXT: xscvdpsxds f0, f0
245 ; CHECK-P10-NEXT: mffprd r3, f0
246 ; CHECK-P10-NEXT: blr
248 ; CHECK-PREP10-LABEL: ld_not_disjoint64_int64_t_float:
249 ; CHECK-PREP10: # %bb.0: # %entry
250 ; CHECK-PREP10-NEXT: li r4, 29
251 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
252 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
253 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
254 ; CHECK-PREP10-NEXT: or r3, r3, r4
255 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
256 ; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
257 ; CHECK-PREP10-NEXT: mffprd r3, f0
258 ; CHECK-PREP10-NEXT: blr
260 %or = or i64 %ptr, 1000000000001
261 %0 = inttoptr i64 %or to float*
262 %1 = load float, float* %0, align 4
263 %conv = fptosi float %1 to i64
267 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
268 define dso_local i64 @ld_disjoint_align64_int64_t_float(i64 %ptr) {
269 ; CHECK-P10-LABEL: ld_disjoint_align64_int64_t_float:
270 ; CHECK-P10: # %bb.0: # %entry
271 ; CHECK-P10-NEXT: pli r4, 244140625
272 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
273 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
274 ; CHECK-P10-NEXT: lfsx f0, r3, r4
275 ; CHECK-P10-NEXT: xscvdpsxds f0, f0
276 ; CHECK-P10-NEXT: mffprd r3, f0
277 ; CHECK-P10-NEXT: blr
279 ; CHECK-PREP10-LABEL: ld_disjoint_align64_int64_t_float:
280 ; CHECK-PREP10: # %bb.0: # %entry
281 ; CHECK-PREP10-NEXT: lis r4, 3725
282 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
283 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
284 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
285 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
286 ; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
287 ; CHECK-PREP10-NEXT: mffprd r3, f0
288 ; CHECK-PREP10-NEXT: blr
290 %and = and i64 %ptr, -1099511627776
291 %or = or i64 %and, 1000000000000
292 %0 = inttoptr i64 %or to float*
293 %1 = load float, float* %0, align 4096
294 %conv = fptosi float %1 to i64
298 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
299 define dso_local i64 @ld_cst_align16_int64_t_float() {
300 ; CHECK-LABEL: ld_cst_align16_int64_t_float:
301 ; CHECK: # %bb.0: # %entry
302 ; CHECK-NEXT: lfs f0, 4080(0)
303 ; CHECK-NEXT: xscvdpsxds f0, f0
304 ; CHECK-NEXT: mffprd r3, f0
307 %0 = load float, float* inttoptr (i64 4080 to float*), align 16
308 %conv = fptosi float %0 to i64
312 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
313 define dso_local i64 @ld_cst_align32_int64_t_float() {
314 ; CHECK-LABEL: ld_cst_align32_int64_t_float:
315 ; CHECK: # %bb.0: # %entry
316 ; CHECK-NEXT: lis r3, 153
317 ; CHECK-NEXT: lfs f0, -27108(r3)
318 ; CHECK-NEXT: xscvdpsxds f0, f0
319 ; CHECK-NEXT: mffprd r3, f0
322 %0 = load float, float* inttoptr (i64 9999900 to float*), align 4
323 %conv = fptosi float %0 to i64
327 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
328 define dso_local i64 @ld_cst_align64_int64_t_float() {
329 ; CHECK-P10-LABEL: ld_cst_align64_int64_t_float:
330 ; CHECK-P10: # %bb.0: # %entry
331 ; CHECK-P10-NEXT: pli r3, 244140625
332 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
333 ; CHECK-P10-NEXT: lfs f0, 0(r3)
334 ; CHECK-P10-NEXT: xscvdpsxds f0, f0
335 ; CHECK-P10-NEXT: mffprd r3, f0
336 ; CHECK-P10-NEXT: blr
338 ; CHECK-PREP10-LABEL: ld_cst_align64_int64_t_float:
339 ; CHECK-PREP10: # %bb.0: # %entry
340 ; CHECK-PREP10-NEXT: lis r3, 3725
341 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
342 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
343 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
344 ; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
345 ; CHECK-PREP10-NEXT: mffprd r3, f0
346 ; CHECK-PREP10-NEXT: blr
348 %0 = load float, float* inttoptr (i64 1000000000000 to float*), align 4096
349 %conv = fptosi float %0 to i64
353 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
354 define dso_local i64 @ld_0_int64_t_double(i64 %ptr) {
355 ; CHECK-LABEL: ld_0_int64_t_double:
356 ; CHECK: # %bb.0: # %entry
357 ; CHECK-NEXT: lfd f0, 0(r3)
358 ; CHECK-NEXT: xscvdpsxds f0, f0
359 ; CHECK-NEXT: mffprd r3, f0
362 %0 = inttoptr i64 %ptr to double*
363 %1 = load double, double* %0, align 8
364 %conv = fptosi double %1 to i64
368 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
369 define dso_local i64 @ld_align16_int64_t_double(i8* nocapture readonly %ptr) {
370 ; CHECK-LABEL: ld_align16_int64_t_double:
371 ; CHECK: # %bb.0: # %entry
372 ; CHECK-NEXT: lfd f0, 8(r3)
373 ; CHECK-NEXT: xscvdpsxds f0, f0
374 ; CHECK-NEXT: mffprd r3, f0
377 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
378 %0 = bitcast i8* %add.ptr to double*
379 %1 = load double, double* %0, align 8
380 %conv = fptosi double %1 to i64
384 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
385 define dso_local i64 @ld_align32_int64_t_double(i8* nocapture readonly %ptr) {
386 ; CHECK-P10-LABEL: ld_align32_int64_t_double:
387 ; CHECK-P10: # %bb.0: # %entry
388 ; CHECK-P10-NEXT: pli r4, 99999000
389 ; CHECK-P10-NEXT: lfdx f0, r3, r4
390 ; CHECK-P10-NEXT: xscvdpsxds f0, f0
391 ; CHECK-P10-NEXT: mffprd r3, f0
392 ; CHECK-P10-NEXT: blr
394 ; CHECK-PREP10-LABEL: ld_align32_int64_t_double:
395 ; CHECK-PREP10: # %bb.0: # %entry
396 ; CHECK-PREP10-NEXT: lis r4, 1525
397 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
398 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
399 ; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
400 ; CHECK-PREP10-NEXT: mffprd r3, f0
401 ; CHECK-PREP10-NEXT: blr
403 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
404 %0 = bitcast i8* %add.ptr to double*
405 %1 = load double, double* %0, align 8
406 %conv = fptosi double %1 to i64
410 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
411 define dso_local i64 @ld_align64_int64_t_double(i8* nocapture readonly %ptr) {
412 ; CHECK-P10-LABEL: ld_align64_int64_t_double:
413 ; CHECK-P10: # %bb.0: # %entry
414 ; CHECK-P10-NEXT: pli r4, 244140625
415 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
416 ; CHECK-P10-NEXT: lfdx f0, r3, r4
417 ; CHECK-P10-NEXT: xscvdpsxds f0, f0
418 ; CHECK-P10-NEXT: mffprd r3, f0
419 ; CHECK-P10-NEXT: blr
421 ; CHECK-PREP10-LABEL: ld_align64_int64_t_double:
422 ; CHECK-PREP10: # %bb.0: # %entry
423 ; CHECK-PREP10-NEXT: lis r4, 3725
424 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
425 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
426 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
427 ; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
428 ; CHECK-PREP10-NEXT: mffprd r3, f0
429 ; CHECK-PREP10-NEXT: blr
431 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
432 %0 = bitcast i8* %add.ptr to double*
433 %1 = load double, double* %0, align 8
434 %conv = fptosi double %1 to i64
438 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
439 define dso_local i64 @ld_reg_int64_t_double(i8* nocapture readonly %ptr, i64 %off) {
440 ; CHECK-LABEL: ld_reg_int64_t_double:
441 ; CHECK: # %bb.0: # %entry
442 ; CHECK-NEXT: lfdx f0, r3, r4
443 ; CHECK-NEXT: xscvdpsxds f0, f0
444 ; CHECK-NEXT: mffprd r3, f0
447 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
448 %0 = bitcast i8* %add.ptr to double*
449 %1 = load double, double* %0, align 8
450 %conv = fptosi double %1 to i64
454 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
455 define dso_local i64 @ld_or_int64_t_double(i64 %ptr, i8 zeroext %off) {
456 ; CHECK-LABEL: ld_or_int64_t_double:
457 ; CHECK: # %bb.0: # %entry
458 ; CHECK-NEXT: or r3, r4, r3
459 ; CHECK-NEXT: lfd f0, 0(r3)
460 ; CHECK-NEXT: xscvdpsxds f0, f0
461 ; CHECK-NEXT: mffprd r3, f0
464 %conv = zext i8 %off to i64
465 %or = or i64 %conv, %ptr
466 %0 = inttoptr i64 %or to double*
467 %1 = load double, double* %0, align 8
468 %conv1 = fptosi double %1 to i64
472 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
473 define dso_local i64 @ld_not_disjoint16_int64_t_double(i64 %ptr) {
474 ; CHECK-LABEL: ld_not_disjoint16_int64_t_double:
475 ; CHECK: # %bb.0: # %entry
476 ; CHECK-NEXT: ori r3, r3, 6
477 ; CHECK-NEXT: lfd f0, 0(r3)
478 ; CHECK-NEXT: xscvdpsxds f0, f0
479 ; CHECK-NEXT: mffprd r3, f0
483 %0 = inttoptr i64 %or to double*
484 %1 = load double, double* %0, align 8
485 %conv = fptosi double %1 to i64
489 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
490 define dso_local i64 @ld_disjoint_align16_int64_t_double(i64 %ptr) {
491 ; CHECK-LABEL: ld_disjoint_align16_int64_t_double:
492 ; CHECK: # %bb.0: # %entry
493 ; CHECK-NEXT: rldicr r3, r3, 0, 51
494 ; CHECK-NEXT: lfd f0, 24(r3)
495 ; CHECK-NEXT: xscvdpsxds f0, f0
496 ; CHECK-NEXT: mffprd r3, f0
499 %and = and i64 %ptr, -4096
500 %or = or i64 %and, 24
501 %0 = inttoptr i64 %or to double*
502 %1 = load double, double* %0, align 8
503 %conv = fptosi double %1 to i64
507 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
508 define dso_local i64 @ld_not_disjoint32_int64_t_double(i64 %ptr) {
509 ; CHECK-LABEL: ld_not_disjoint32_int64_t_double:
510 ; CHECK: # %bb.0: # %entry
511 ; CHECK-NEXT: ori r3, r3, 34463
512 ; CHECK-NEXT: oris r3, r3, 1
513 ; CHECK-NEXT: lfd f0, 0(r3)
514 ; CHECK-NEXT: xscvdpsxds f0, f0
515 ; CHECK-NEXT: mffprd r3, f0
518 %or = or i64 %ptr, 99999
519 %0 = inttoptr i64 %or to double*
520 %1 = load double, double* %0, align 8
521 %conv = fptosi double %1 to i64
525 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
526 define dso_local i64 @ld_disjoint_align32_int64_t_double(i64 %ptr) {
527 ; CHECK-P10-LABEL: ld_disjoint_align32_int64_t_double:
528 ; CHECK-P10: # %bb.0: # %entry
529 ; CHECK-P10-NEXT: lis r4, -15264
530 ; CHECK-P10-NEXT: and r3, r3, r4
531 ; CHECK-P10-NEXT: pli r4, 999990000
532 ; CHECK-P10-NEXT: lfdx f0, r3, r4
533 ; CHECK-P10-NEXT: xscvdpsxds f0, f0
534 ; CHECK-P10-NEXT: mffprd r3, f0
535 ; CHECK-P10-NEXT: blr
537 ; CHECK-P9-LABEL: ld_disjoint_align32_int64_t_double:
538 ; CHECK-P9: # %bb.0: # %entry
539 ; CHECK-P9-NEXT: lis r4, -15264
540 ; CHECK-P9-NEXT: and r3, r3, r4
541 ; CHECK-P9-NEXT: lis r4, 15258
542 ; CHECK-P9-NEXT: ori r4, r4, 41712
543 ; CHECK-P9-NEXT: lfdx f0, r3, r4
544 ; CHECK-P9-NEXT: xscvdpsxds f0, f0
545 ; CHECK-P9-NEXT: mffprd r3, f0
548 ; CHECK-P8-LABEL: ld_disjoint_align32_int64_t_double:
549 ; CHECK-P8: # %bb.0: # %entry
550 ; CHECK-P8-NEXT: lis r4, -15264
551 ; CHECK-P8-NEXT: lis r5, 15258
552 ; CHECK-P8-NEXT: and r3, r3, r4
553 ; CHECK-P8-NEXT: ori r4, r5, 41712
554 ; CHECK-P8-NEXT: lfdx f0, r3, r4
555 ; CHECK-P8-NEXT: xscvdpsxds f0, f0
556 ; CHECK-P8-NEXT: mffprd r3, f0
559 %and = and i64 %ptr, -1000341504
560 %or = or i64 %and, 999990000
561 %0 = inttoptr i64 %or to double*
562 %1 = load double, double* %0, align 16
563 %conv = fptosi double %1 to i64
567 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
568 define dso_local i64 @ld_not_disjoint64_int64_t_double(i64 %ptr) {
569 ; CHECK-P10-LABEL: ld_not_disjoint64_int64_t_double:
570 ; CHECK-P10: # %bb.0: # %entry
571 ; CHECK-P10-NEXT: pli r4, 232
572 ; CHECK-P10-NEXT: pli r5, 3567587329
573 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
574 ; CHECK-P10-NEXT: or r3, r3, r5
575 ; CHECK-P10-NEXT: lfd f0, 0(r3)
576 ; CHECK-P10-NEXT: xscvdpsxds f0, f0
577 ; CHECK-P10-NEXT: mffprd r3, f0
578 ; CHECK-P10-NEXT: blr
580 ; CHECK-PREP10-LABEL: ld_not_disjoint64_int64_t_double:
581 ; CHECK-PREP10: # %bb.0: # %entry
582 ; CHECK-PREP10-NEXT: li r4, 29
583 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
584 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
585 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
586 ; CHECK-PREP10-NEXT: or r3, r3, r4
587 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
588 ; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
589 ; CHECK-PREP10-NEXT: mffprd r3, f0
590 ; CHECK-PREP10-NEXT: blr
592 %or = or i64 %ptr, 1000000000001
593 %0 = inttoptr i64 %or to double*
594 %1 = load double, double* %0, align 8
595 %conv = fptosi double %1 to i64
599 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
600 define dso_local i64 @ld_disjoint_align64_int64_t_double(i64 %ptr) {
601 ; CHECK-P10-LABEL: ld_disjoint_align64_int64_t_double:
602 ; CHECK-P10: # %bb.0: # %entry
603 ; CHECK-P10-NEXT: pli r4, 244140625
604 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
605 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
606 ; CHECK-P10-NEXT: lfdx f0, r3, r4
607 ; CHECK-P10-NEXT: xscvdpsxds f0, f0
608 ; CHECK-P10-NEXT: mffprd r3, f0
609 ; CHECK-P10-NEXT: blr
611 ; CHECK-PREP10-LABEL: ld_disjoint_align64_int64_t_double:
612 ; CHECK-PREP10: # %bb.0: # %entry
613 ; CHECK-PREP10-NEXT: lis r4, 3725
614 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
615 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
616 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
617 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
618 ; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
619 ; CHECK-PREP10-NEXT: mffprd r3, f0
620 ; CHECK-PREP10-NEXT: blr
622 %and = and i64 %ptr, -1099511627776
623 %or = or i64 %and, 1000000000000
624 %0 = inttoptr i64 %or to double*
625 %1 = load double, double* %0, align 4096
626 %conv = fptosi double %1 to i64
630 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
631 define dso_local i64 @ld_cst_align16_int64_t_double() {
632 ; CHECK-LABEL: ld_cst_align16_int64_t_double:
633 ; CHECK: # %bb.0: # %entry
634 ; CHECK-NEXT: lfd f0, 4080(0)
635 ; CHECK-NEXT: xscvdpsxds f0, f0
636 ; CHECK-NEXT: mffprd r3, f0
639 %0 = load double, double* inttoptr (i64 4080 to double*), align 16
640 %conv = fptosi double %0 to i64
644 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
645 define dso_local i64 @ld_cst_align32_int64_t_double() {
646 ; CHECK-LABEL: ld_cst_align32_int64_t_double:
647 ; CHECK: # %bb.0: # %entry
648 ; CHECK-NEXT: lis r3, 153
649 ; CHECK-NEXT: lfd f0, -27108(r3)
650 ; CHECK-NEXT: xscvdpsxds f0, f0
651 ; CHECK-NEXT: mffprd r3, f0
654 %0 = load double, double* inttoptr (i64 9999900 to double*), align 8
655 %conv = fptosi double %0 to i64
659 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
660 define dso_local i64 @ld_cst_align64_int64_t_double() {
661 ; CHECK-P10-LABEL: ld_cst_align64_int64_t_double:
662 ; CHECK-P10: # %bb.0: # %entry
663 ; CHECK-P10-NEXT: pli r3, 244140625
664 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
665 ; CHECK-P10-NEXT: lfd f0, 0(r3)
666 ; CHECK-P10-NEXT: xscvdpsxds f0, f0
667 ; CHECK-P10-NEXT: mffprd r3, f0
668 ; CHECK-P10-NEXT: blr
670 ; CHECK-PREP10-LABEL: ld_cst_align64_int64_t_double:
671 ; CHECK-PREP10: # %bb.0: # %entry
672 ; CHECK-PREP10-NEXT: lis r3, 3725
673 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
674 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
675 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
676 ; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
677 ; CHECK-PREP10-NEXT: mffprd r3, f0
678 ; CHECK-PREP10-NEXT: blr
680 %0 = load double, double* inttoptr (i64 1000000000000 to double*), align 4096
681 %conv = fptosi double %0 to i64
685 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
686 define dso_local i64 @ld_0_uint64_t_uint8_t(i64 %ptr) {
687 ; CHECK-LABEL: ld_0_uint64_t_uint8_t:
688 ; CHECK: # %bb.0: # %entry
689 ; CHECK-NEXT: lbz r3, 0(r3)
692 %0 = inttoptr i64 %ptr to i8*
693 %1 = load i8, i8* %0, align 1
694 %conv = zext i8 %1 to i64
698 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
699 define dso_local i64 @ld_unalign16_uint64_t_uint8_t(i8* nocapture readonly %ptr) {
700 ; CHECK-LABEL: ld_unalign16_uint64_t_uint8_t:
701 ; CHECK: # %bb.0: # %entry
702 ; CHECK-NEXT: lbz r3, 1(r3)
705 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1
706 %0 = load i8, i8* %add.ptr, align 1
707 %conv = zext i8 %0 to i64
711 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
712 define dso_local i64 @ld_align16_uint64_t_uint8_t(i8* nocapture readonly %ptr) {
713 ; CHECK-LABEL: ld_align16_uint64_t_uint8_t:
714 ; CHECK: # %bb.0: # %entry
715 ; CHECK-NEXT: lbz r3, 8(r3)
718 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
719 %0 = load i8, i8* %add.ptr, align 1
720 %conv = zext i8 %0 to i64
724 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
725 define dso_local i64 @ld_unalign32_uint64_t_uint8_t(i8* nocapture readonly %ptr) {
726 ; CHECK-P10-LABEL: ld_unalign32_uint64_t_uint8_t:
727 ; CHECK-P10: # %bb.0: # %entry
728 ; CHECK-P10-NEXT: pli r4, 99999
729 ; CHECK-P10-NEXT: lbzx r3, r3, r4
730 ; CHECK-P10-NEXT: blr
732 ; CHECK-PREP10-LABEL: ld_unalign32_uint64_t_uint8_t:
733 ; CHECK-PREP10: # %bb.0: # %entry
734 ; CHECK-PREP10-NEXT: lis r4, 1
735 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
736 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
737 ; CHECK-PREP10-NEXT: blr
739 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999
740 %0 = load i8, i8* %add.ptr, align 1
741 %conv = zext i8 %0 to i64
745 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
746 define dso_local i64 @ld_align32_uint64_t_uint8_t(i8* nocapture readonly %ptr) {
747 ; CHECK-P10-LABEL: ld_align32_uint64_t_uint8_t:
748 ; CHECK-P10: # %bb.0: # %entry
749 ; CHECK-P10-NEXT: pli r4, 99999000
750 ; CHECK-P10-NEXT: lbzx r3, r3, r4
751 ; CHECK-P10-NEXT: blr
753 ; CHECK-PREP10-LABEL: ld_align32_uint64_t_uint8_t:
754 ; CHECK-PREP10: # %bb.0: # %entry
755 ; CHECK-PREP10-NEXT: lis r4, 1525
756 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
757 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
758 ; CHECK-PREP10-NEXT: blr
760 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
761 %0 = load i8, i8* %add.ptr, align 1
762 %conv = zext i8 %0 to i64
766 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
767 define dso_local i64 @ld_unalign64_uint64_t_uint8_t(i8* nocapture readonly %ptr) {
768 ; CHECK-P10-LABEL: ld_unalign64_uint64_t_uint8_t:
769 ; CHECK-P10: # %bb.0: # %entry
770 ; CHECK-P10-NEXT: pli r4, 232
771 ; CHECK-P10-NEXT: pli r5, 3567587329
772 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
773 ; CHECK-P10-NEXT: lbzx r3, r3, r5
774 ; CHECK-P10-NEXT: blr
776 ; CHECK-PREP10-LABEL: ld_unalign64_uint64_t_uint8_t:
777 ; CHECK-PREP10: # %bb.0: # %entry
778 ; CHECK-PREP10-NEXT: li r4, 29
779 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
780 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
781 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
782 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
783 ; CHECK-PREP10-NEXT: blr
785 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
786 %0 = load i8, i8* %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_align64_uint64_t_uint8_t(i8* nocapture readonly %ptr) {
793 ; CHECK-P10-LABEL: ld_align64_uint64_t_uint8_t:
794 ; CHECK-P10: # %bb.0: # %entry
795 ; CHECK-P10-NEXT: pli r4, 244140625
796 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
797 ; CHECK-P10-NEXT: lbzx r3, r3, r4
798 ; CHECK-P10-NEXT: blr
800 ; CHECK-PREP10-LABEL: ld_align64_uint64_t_uint8_t:
801 ; CHECK-PREP10: # %bb.0: # %entry
802 ; CHECK-PREP10-NEXT: lis r4, 3725
803 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
804 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
805 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
806 ; CHECK-PREP10-NEXT: blr
808 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
809 %0 = load i8, i8* %add.ptr, align 1
810 %conv = zext i8 %0 to i64
814 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
815 define dso_local i64 @ld_reg_uint64_t_uint8_t(i8* nocapture readonly %ptr, i64 %off) {
816 ; CHECK-LABEL: ld_reg_uint64_t_uint8_t:
817 ; CHECK: # %bb.0: # %entry
818 ; CHECK-NEXT: lbzx r3, r3, r4
821 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
822 %0 = load i8, i8* %add.ptr, align 1
823 %conv = zext i8 %0 to i64
827 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
828 define dso_local i64 @ld_or_uint64_t_uint8_t(i64 %ptr, i8 zeroext %off) {
829 ; CHECK-LABEL: ld_or_uint64_t_uint8_t:
830 ; CHECK: # %bb.0: # %entry
831 ; CHECK-NEXT: or r3, r4, r3
832 ; CHECK-NEXT: lbz r3, 0(r3)
835 %conv = zext i8 %off to i64
836 %or = or i64 %conv, %ptr
837 %0 = inttoptr i64 %or to i8*
838 %1 = load i8, i8* %0, align 1
839 %conv1 = zext i8 %1 to i64
843 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
844 define dso_local i64 @ld_or2_uint64_t_uint8_t(i64 %ptr, i8 zeroext %off) {
845 ; CHECK-LABEL: ld_or2_uint64_t_uint8_t:
846 ; CHECK: # %bb.0: # %entry
847 ; CHECK-NEXT: rldicr r3, r3, 0, 51
848 ; CHECK-NEXT: lbzx r3, r3, r4
851 %and = and i64 %ptr, -4096
852 %conv = zext i8 %off to i64
853 %or = or i64 %and, %conv
854 %0 = inttoptr i64 %or to i8*
855 %1 = load i8, i8* %0, align 1
856 %conv1 = zext i8 %1 to i64
860 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
861 define dso_local i64 @ld_not_disjoint16_uint64_t_uint8_t(i64 %ptr) {
862 ; CHECK-LABEL: ld_not_disjoint16_uint64_t_uint8_t:
863 ; CHECK: # %bb.0: # %entry
864 ; CHECK-NEXT: ori r3, r3, 6
865 ; CHECK-NEXT: lbz r3, 0(r3)
869 %0 = inttoptr i64 %or to i8*
870 %1 = load i8, i8* %0, align 1
871 %conv = zext i8 %1 to i64
875 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
876 define dso_local i64 @ld_disjoint_unalign16_uint64_t_uint8_t(i64 %ptr) {
877 ; CHECK-LABEL: ld_disjoint_unalign16_uint64_t_uint8_t:
878 ; CHECK: # %bb.0: # %entry
879 ; CHECK-NEXT: rldicr r3, r3, 0, 51
880 ; CHECK-NEXT: lbz r3, 6(r3)
883 %and = and i64 %ptr, -4096
885 %0 = inttoptr i64 %or to i8*
886 %1 = load i8, i8* %0, align 2
887 %conv = zext i8 %1 to i64
891 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
892 define dso_local i64 @ld_disjoint_align16_uint64_t_uint8_t(i64 %ptr) {
893 ; CHECK-LABEL: ld_disjoint_align16_uint64_t_uint8_t:
894 ; CHECK: # %bb.0: # %entry
895 ; CHECK-NEXT: rldicr r3, r3, 0, 51
896 ; CHECK-NEXT: lbz r3, 24(r3)
899 %and = and i64 %ptr, -4096
900 %or = or i64 %and, 24
901 %0 = inttoptr i64 %or to i8*
902 %1 = load i8, i8* %0, align 8
903 %conv = zext i8 %1 to i64
907 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
908 define dso_local i64 @ld_not_disjoint32_uint64_t_uint8_t(i64 %ptr) {
909 ; CHECK-LABEL: ld_not_disjoint32_uint64_t_uint8_t:
910 ; CHECK: # %bb.0: # %entry
911 ; CHECK-NEXT: ori r3, r3, 34463
912 ; CHECK-NEXT: oris r3, r3, 1
913 ; CHECK-NEXT: lbz r3, 0(r3)
916 %or = or i64 %ptr, 99999
917 %0 = inttoptr i64 %or to i8*
918 %1 = load i8, i8* %0, align 1
919 %conv = zext i8 %1 to i64
923 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
924 define dso_local i64 @ld_disjoint_unalign32_uint64_t_uint8_t(i64 %ptr) {
925 ; CHECK-P10-LABEL: ld_disjoint_unalign32_uint64_t_uint8_t:
926 ; CHECK-P10: # %bb.0: # %entry
927 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
928 ; CHECK-P10-NEXT: pli r4, 99999
929 ; CHECK-P10-NEXT: lbzx r3, r3, r4
930 ; CHECK-P10-NEXT: blr
932 ; CHECK-PREP10-LABEL: ld_disjoint_unalign32_uint64_t_uint8_t:
933 ; CHECK-PREP10: # %bb.0: # %entry
934 ; CHECK-PREP10-NEXT: lis r4, 1
935 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
936 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
937 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
938 ; CHECK-PREP10-NEXT: blr
940 %and = and i64 %ptr, -1048576
941 %or = or i64 %and, 99999
942 %0 = inttoptr i64 %or to i8*
943 %1 = load i8, i8* %0, align 1
944 %conv = zext i8 %1 to i64
948 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
949 define dso_local i64 @ld_disjoint_align32_uint64_t_uint8_t(i64 %ptr) {
950 ; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_uint8_t:
951 ; CHECK-P10: # %bb.0: # %entry
952 ; CHECK-P10-NEXT: lis r4, -15264
953 ; CHECK-P10-NEXT: and r3, r3, r4
954 ; CHECK-P10-NEXT: pli r4, 999990000
955 ; CHECK-P10-NEXT: lbzx r3, r3, r4
956 ; CHECK-P10-NEXT: blr
958 ; CHECK-P9-LABEL: ld_disjoint_align32_uint64_t_uint8_t:
959 ; CHECK-P9: # %bb.0: # %entry
960 ; CHECK-P9-NEXT: lis r4, -15264
961 ; CHECK-P9-NEXT: and r3, r3, r4
962 ; CHECK-P9-NEXT: lis r4, 15258
963 ; CHECK-P9-NEXT: ori r4, r4, 41712
964 ; CHECK-P9-NEXT: lbzx r3, r3, r4
967 ; CHECK-P8-LABEL: ld_disjoint_align32_uint64_t_uint8_t:
968 ; CHECK-P8: # %bb.0: # %entry
969 ; CHECK-P8-NEXT: lis r4, -15264
970 ; CHECK-P8-NEXT: lis r5, 15258
971 ; CHECK-P8-NEXT: and r3, r3, r4
972 ; CHECK-P8-NEXT: ori r4, r5, 41712
973 ; CHECK-P8-NEXT: lbzx r3, r3, r4
976 %and = and i64 %ptr, -1000341504
977 %or = or i64 %and, 999990000
978 %0 = inttoptr i64 %or to i8*
979 %1 = load i8, i8* %0, align 16
980 %conv = zext i8 %1 to i64
984 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
985 define dso_local i64 @ld_not_disjoint64_uint64_t_uint8_t(i64 %ptr) {
986 ; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_uint8_t:
987 ; CHECK-P10: # %bb.0: # %entry
988 ; CHECK-P10-NEXT: pli r4, 232
989 ; CHECK-P10-NEXT: pli r5, 3567587329
990 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
991 ; CHECK-P10-NEXT: or r3, r3, r5
992 ; CHECK-P10-NEXT: lbz r3, 0(r3)
993 ; CHECK-P10-NEXT: blr
995 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_uint8_t:
996 ; CHECK-PREP10: # %bb.0: # %entry
997 ; CHECK-PREP10-NEXT: li r4, 29
998 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
999 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
1000 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
1001 ; CHECK-PREP10-NEXT: or r3, r3, r4
1002 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
1003 ; CHECK-PREP10-NEXT: blr
1005 %or = or i64 %ptr, 1000000000001
1006 %0 = inttoptr i64 %or to i8*
1007 %1 = load i8, i8* %0, align 1
1008 %conv = zext i8 %1 to i64
1012 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1013 define dso_local i64 @ld_disjoint_unalign64_uint64_t_uint8_t(i64 %ptr) {
1014 ; CHECK-P10-LABEL: ld_disjoint_unalign64_uint64_t_uint8_t:
1015 ; CHECK-P10: # %bb.0: # %entry
1016 ; CHECK-P10-NEXT: pli r4, 232
1017 ; CHECK-P10-NEXT: pli r5, 3567587329
1018 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
1019 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
1020 ; CHECK-P10-NEXT: lbzx r3, r3, r5
1021 ; CHECK-P10-NEXT: blr
1023 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint64_t_uint8_t:
1024 ; CHECK-PREP10: # %bb.0: # %entry
1025 ; CHECK-PREP10-NEXT: li r4, 29
1026 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
1027 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
1028 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
1029 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
1030 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
1031 ; CHECK-PREP10-NEXT: blr
1033 %and = and i64 %ptr, -1099511627776
1034 %or = or i64 %and, 1000000000001
1035 %0 = inttoptr i64 %or to i8*
1036 %1 = load i8, i8* %0, align 1
1037 %conv = zext i8 %1 to i64
1041 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1042 define dso_local i64 @ld_disjoint_align64_uint64_t_uint8_t(i64 %ptr) {
1043 ; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_uint8_t:
1044 ; CHECK-P10: # %bb.0: # %entry
1045 ; CHECK-P10-NEXT: pli r4, 244140625
1046 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
1047 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
1048 ; CHECK-P10-NEXT: lbzx r3, r3, r4
1049 ; CHECK-P10-NEXT: blr
1051 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_uint8_t:
1052 ; CHECK-PREP10: # %bb.0: # %entry
1053 ; CHECK-PREP10-NEXT: lis r4, 3725
1054 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
1055 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
1056 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
1057 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
1058 ; CHECK-PREP10-NEXT: blr
1060 %and = and i64 %ptr, -1099511627776
1061 %or = or i64 %and, 1000000000000
1062 %0 = inttoptr i64 %or to i8*
1063 %1 = load i8, i8* %0, align 4096
1064 %conv = zext i8 %1 to i64
1068 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1069 define dso_local i64 @ld_cst_unalign16_uint64_t_uint8_t() {
1070 ; CHECK-LABEL: ld_cst_unalign16_uint64_t_uint8_t:
1071 ; CHECK: # %bb.0: # %entry
1072 ; CHECK-NEXT: lbz r3, 255(0)
1075 %0 = load i8, i8* inttoptr (i64 255 to i8*), align 1
1076 %conv = zext i8 %0 to i64
1080 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1081 define dso_local i64 @ld_cst_align16_uint64_t_uint8_t() {
1082 ; CHECK-LABEL: ld_cst_align16_uint64_t_uint8_t:
1083 ; CHECK: # %bb.0: # %entry
1084 ; CHECK-NEXT: lbz r3, 4080(0)
1087 %0 = load i8, i8* inttoptr (i64 4080 to i8*), align 16
1088 %conv = zext i8 %0 to i64
1092 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1093 define dso_local i64 @ld_cst_unalign32_uint64_t_uint8_t() {
1094 ; CHECK-LABEL: ld_cst_unalign32_uint64_t_uint8_t:
1095 ; CHECK: # %bb.0: # %entry
1096 ; CHECK-NEXT: lis r3, 2
1097 ; CHECK-NEXT: lbz r3, -31073(r3)
1100 %0 = load i8, i8* inttoptr (i64 99999 to i8*), align 1
1101 %conv = zext i8 %0 to i64
1105 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1106 define dso_local i64 @ld_cst_align32_uint64_t_uint8_t() {
1107 ; CHECK-LABEL: ld_cst_align32_uint64_t_uint8_t:
1108 ; CHECK: # %bb.0: # %entry
1109 ; CHECK-NEXT: lis r3, 153
1110 ; CHECK-NEXT: lbz r3, -27108(r3)
1113 %0 = load i8, i8* inttoptr (i64 9999900 to i8*), align 4
1114 %conv = zext i8 %0 to i64
1118 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1119 define dso_local i64 @ld_cst_unalign64_uint64_t_uint8_t() {
1120 ; CHECK-P10-LABEL: ld_cst_unalign64_uint64_t_uint8_t:
1121 ; CHECK-P10: # %bb.0: # %entry
1122 ; CHECK-P10-NEXT: pli r3, 232
1123 ; CHECK-P10-NEXT: pli r4, 3567587329
1124 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
1125 ; CHECK-P10-NEXT: lbz r3, 0(r4)
1126 ; CHECK-P10-NEXT: blr
1128 ; CHECK-PREP10-LABEL: ld_cst_unalign64_uint64_t_uint8_t:
1129 ; CHECK-PREP10: # %bb.0: # %entry
1130 ; CHECK-PREP10-NEXT: li r3, 29
1131 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
1132 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
1133 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
1134 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
1135 ; CHECK-PREP10-NEXT: blr
1137 %0 = load i8, i8* inttoptr (i64 1000000000001 to i8*), align 1
1138 %conv = zext i8 %0 to i64
1142 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1143 define dso_local i64 @ld_cst_align64_uint64_t_uint8_t() {
1144 ; CHECK-P10-LABEL: ld_cst_align64_uint64_t_uint8_t:
1145 ; CHECK-P10: # %bb.0: # %entry
1146 ; CHECK-P10-NEXT: pli r3, 244140625
1147 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
1148 ; CHECK-P10-NEXT: lbz r3, 0(r3)
1149 ; CHECK-P10-NEXT: blr
1151 ; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_uint8_t:
1152 ; CHECK-PREP10: # %bb.0: # %entry
1153 ; CHECK-PREP10-NEXT: lis r3, 3725
1154 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
1155 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
1156 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
1157 ; CHECK-PREP10-NEXT: blr
1159 %0 = load i8, i8* inttoptr (i64 1000000000000 to i8*), align 4096
1160 %conv = zext i8 %0 to i64
1164 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1165 define dso_local i64 @ld_0_uint64_t_int8_t(i64 %ptr) {
1166 ; CHECK-LABEL: ld_0_uint64_t_int8_t:
1167 ; CHECK: # %bb.0: # %entry
1168 ; CHECK-NEXT: lbz r3, 0(r3)
1169 ; CHECK-NEXT: extsb r3, r3
1172 %0 = inttoptr i64 %ptr to i8*
1173 %1 = load i8, i8* %0, align 1
1174 %conv = sext i8 %1 to i64
1178 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1179 define dso_local i64 @ld_unalign16_uint64_t_int8_t(i8* nocapture readonly %ptr) {
1180 ; CHECK-LABEL: ld_unalign16_uint64_t_int8_t:
1181 ; CHECK: # %bb.0: # %entry
1182 ; CHECK-NEXT: lbz r3, 1(r3)
1183 ; CHECK-NEXT: extsb r3, r3
1186 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1
1187 %0 = load i8, i8* %add.ptr, align 1
1188 %conv = sext i8 %0 to i64
1192 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1193 define dso_local i64 @ld_align16_uint64_t_int8_t(i8* nocapture readonly %ptr) {
1194 ; CHECK-LABEL: ld_align16_uint64_t_int8_t:
1195 ; CHECK: # %bb.0: # %entry
1196 ; CHECK-NEXT: lbz r3, 8(r3)
1197 ; CHECK-NEXT: extsb r3, r3
1200 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
1201 %0 = load i8, i8* %add.ptr, align 1
1202 %conv = sext i8 %0 to i64
1206 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1207 define dso_local i64 @ld_unalign32_uint64_t_int8_t(i8* nocapture readonly %ptr) {
1208 ; CHECK-P10-LABEL: ld_unalign32_uint64_t_int8_t:
1209 ; CHECK-P10: # %bb.0: # %entry
1210 ; CHECK-P10-NEXT: pli r4, 99999
1211 ; CHECK-P10-NEXT: lbzx r3, r3, r4
1212 ; CHECK-P10-NEXT: extsb r3, r3
1213 ; CHECK-P10-NEXT: blr
1215 ; CHECK-PREP10-LABEL: ld_unalign32_uint64_t_int8_t:
1216 ; CHECK-PREP10: # %bb.0: # %entry
1217 ; CHECK-PREP10-NEXT: lis r4, 1
1218 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
1219 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
1220 ; CHECK-PREP10-NEXT: extsb r3, r3
1221 ; CHECK-PREP10-NEXT: blr
1223 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999
1224 %0 = load i8, i8* %add.ptr, align 1
1225 %conv = sext i8 %0 to i64
1229 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1230 define dso_local i64 @ld_align32_uint64_t_int8_t(i8* nocapture readonly %ptr) {
1231 ; CHECK-P10-LABEL: ld_align32_uint64_t_int8_t:
1232 ; CHECK-P10: # %bb.0: # %entry
1233 ; CHECK-P10-NEXT: pli r4, 99999000
1234 ; CHECK-P10-NEXT: lbzx r3, r3, r4
1235 ; CHECK-P10-NEXT: extsb r3, r3
1236 ; CHECK-P10-NEXT: blr
1238 ; CHECK-PREP10-LABEL: ld_align32_uint64_t_int8_t:
1239 ; CHECK-PREP10: # %bb.0: # %entry
1240 ; CHECK-PREP10-NEXT: lis r4, 1525
1241 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
1242 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
1243 ; CHECK-PREP10-NEXT: extsb r3, r3
1244 ; CHECK-PREP10-NEXT: blr
1246 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
1247 %0 = load i8, i8* %add.ptr, align 1
1248 %conv = sext i8 %0 to i64
1252 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1253 define dso_local i64 @ld_unalign64_uint64_t_int8_t(i8* nocapture readonly %ptr) {
1254 ; CHECK-P10-LABEL: ld_unalign64_uint64_t_int8_t:
1255 ; CHECK-P10: # %bb.0: # %entry
1256 ; CHECK-P10-NEXT: pli r4, 232
1257 ; CHECK-P10-NEXT: pli r5, 3567587329
1258 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
1259 ; CHECK-P10-NEXT: lbzx r3, r3, r5
1260 ; CHECK-P10-NEXT: extsb r3, r3
1261 ; CHECK-P10-NEXT: blr
1263 ; CHECK-PREP10-LABEL: ld_unalign64_uint64_t_int8_t:
1264 ; CHECK-PREP10: # %bb.0: # %entry
1265 ; CHECK-PREP10-NEXT: li r4, 29
1266 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
1267 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
1268 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
1269 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
1270 ; CHECK-PREP10-NEXT: extsb r3, r3
1271 ; CHECK-PREP10-NEXT: blr
1273 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
1274 %0 = load i8, i8* %add.ptr, align 1
1275 %conv = sext i8 %0 to i64
1279 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1280 define dso_local i64 @ld_align64_uint64_t_int8_t(i8* nocapture readonly %ptr) {
1281 ; CHECK-P10-LABEL: ld_align64_uint64_t_int8_t:
1282 ; CHECK-P10: # %bb.0: # %entry
1283 ; CHECK-P10-NEXT: pli r4, 244140625
1284 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
1285 ; CHECK-P10-NEXT: lbzx r3, r3, r4
1286 ; CHECK-P10-NEXT: extsb r3, r3
1287 ; CHECK-P10-NEXT: blr
1289 ; CHECK-PREP10-LABEL: ld_align64_uint64_t_int8_t:
1290 ; CHECK-PREP10: # %bb.0: # %entry
1291 ; CHECK-PREP10-NEXT: lis r4, 3725
1292 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
1293 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
1294 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
1295 ; CHECK-PREP10-NEXT: extsb r3, r3
1296 ; CHECK-PREP10-NEXT: blr
1298 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
1299 %0 = load i8, i8* %add.ptr, align 1
1300 %conv = sext i8 %0 to i64
1304 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1305 define dso_local i64 @ld_reg_uint64_t_int8_t(i8* nocapture readonly %ptr, i64 %off) {
1306 ; CHECK-LABEL: ld_reg_uint64_t_int8_t:
1307 ; CHECK: # %bb.0: # %entry
1308 ; CHECK-NEXT: lbzx r3, r3, r4
1309 ; CHECK-NEXT: extsb r3, r3
1312 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
1313 %0 = load i8, i8* %add.ptr, align 1
1314 %conv = sext i8 %0 to i64
1318 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1319 define dso_local i64 @ld_or_uint64_t_int8_t(i64 %ptr, i8 zeroext %off) {
1320 ; CHECK-LABEL: ld_or_uint64_t_int8_t:
1321 ; CHECK: # %bb.0: # %entry
1322 ; CHECK-NEXT: or r3, r4, r3
1323 ; CHECK-NEXT: lbz r3, 0(r3)
1324 ; CHECK-NEXT: extsb r3, r3
1327 %conv = zext i8 %off to i64
1328 %or = or i64 %conv, %ptr
1329 %0 = inttoptr i64 %or to i8*
1330 %1 = load i8, i8* %0, align 1
1331 %conv1 = sext i8 %1 to i64
1335 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1336 define dso_local i64 @ld_or2_uint64_t_int8_t(i64 %ptr, i8 zeroext %off) {
1337 ; CHECK-LABEL: ld_or2_uint64_t_int8_t:
1338 ; CHECK: # %bb.0: # %entry
1339 ; CHECK-NEXT: rldicr r3, r3, 0, 51
1340 ; CHECK-NEXT: lbzx r3, r3, r4
1341 ; CHECK-NEXT: extsb r3, r3
1344 %and = and i64 %ptr, -4096
1345 %conv = zext i8 %off to i64
1346 %or = or i64 %and, %conv
1347 %0 = inttoptr i64 %or to i8*
1348 %1 = load i8, i8* %0, align 1
1349 %conv1 = sext i8 %1 to i64
1353 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1354 define dso_local i64 @ld_not_disjoint16_uint64_t_int8_t(i64 %ptr) {
1355 ; CHECK-LABEL: ld_not_disjoint16_uint64_t_int8_t:
1356 ; CHECK: # %bb.0: # %entry
1357 ; CHECK-NEXT: ori r3, r3, 6
1358 ; CHECK-NEXT: lbz r3, 0(r3)
1359 ; CHECK-NEXT: extsb r3, r3
1362 %or = or i64 %ptr, 6
1363 %0 = inttoptr i64 %or to i8*
1364 %1 = load i8, i8* %0, align 1
1365 %conv = sext i8 %1 to i64
1369 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1370 define dso_local i64 @ld_disjoint_unalign16_uint64_t_int8_t(i64 %ptr) {
1371 ; CHECK-LABEL: ld_disjoint_unalign16_uint64_t_int8_t:
1372 ; CHECK: # %bb.0: # %entry
1373 ; CHECK-NEXT: rldicr r3, r3, 0, 51
1374 ; CHECK-NEXT: lbz r3, 6(r3)
1375 ; CHECK-NEXT: extsb r3, r3
1378 %and = and i64 %ptr, -4096
1379 %or = or i64 %and, 6
1380 %0 = inttoptr i64 %or to i8*
1381 %1 = load i8, i8* %0, align 2
1382 %conv = sext i8 %1 to i64
1386 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1387 define dso_local i64 @ld_disjoint_align16_uint64_t_int8_t(i64 %ptr) {
1388 ; CHECK-LABEL: ld_disjoint_align16_uint64_t_int8_t:
1389 ; CHECK: # %bb.0: # %entry
1390 ; CHECK-NEXT: rldicr r3, r3, 0, 51
1391 ; CHECK-NEXT: lbz r3, 24(r3)
1392 ; CHECK-NEXT: extsb r3, r3
1395 %and = and i64 %ptr, -4096
1396 %or = or i64 %and, 24
1397 %0 = inttoptr i64 %or to i8*
1398 %1 = load i8, i8* %0, align 8
1399 %conv = sext i8 %1 to i64
1403 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1404 define dso_local i64 @ld_not_disjoint32_uint64_t_int8_t(i64 %ptr) {
1405 ; CHECK-LABEL: ld_not_disjoint32_uint64_t_int8_t:
1406 ; CHECK: # %bb.0: # %entry
1407 ; CHECK-NEXT: ori r3, r3, 34463
1408 ; CHECK-NEXT: oris r3, r3, 1
1409 ; CHECK-NEXT: lbz r3, 0(r3)
1410 ; CHECK-NEXT: extsb r3, r3
1413 %or = or i64 %ptr, 99999
1414 %0 = inttoptr i64 %or to i8*
1415 %1 = load i8, i8* %0, align 1
1416 %conv = sext i8 %1 to i64
1420 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1421 define dso_local i64 @ld_disjoint_unalign32_uint64_t_int8_t(i64 %ptr) {
1422 ; CHECK-P10-LABEL: ld_disjoint_unalign32_uint64_t_int8_t:
1423 ; CHECK-P10: # %bb.0: # %entry
1424 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
1425 ; CHECK-P10-NEXT: pli r4, 99999
1426 ; CHECK-P10-NEXT: lbzx r3, r3, r4
1427 ; CHECK-P10-NEXT: extsb r3, r3
1428 ; CHECK-P10-NEXT: blr
1430 ; CHECK-PREP10-LABEL: ld_disjoint_unalign32_uint64_t_int8_t:
1431 ; CHECK-PREP10: # %bb.0: # %entry
1432 ; CHECK-PREP10-NEXT: lis r4, 1
1433 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
1434 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
1435 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
1436 ; CHECK-PREP10-NEXT: extsb r3, r3
1437 ; CHECK-PREP10-NEXT: blr
1439 %and = and i64 %ptr, -1048576
1440 %or = or i64 %and, 99999
1441 %0 = inttoptr i64 %or to i8*
1442 %1 = load i8, i8* %0, align 1
1443 %conv = sext i8 %1 to i64
1447 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1448 define dso_local i64 @ld_disjoint_align32_uint64_t_int8_t(i64 %ptr) {
1449 ; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_int8_t:
1450 ; CHECK-P10: # %bb.0: # %entry
1451 ; CHECK-P10-NEXT: lis r4, -15264
1452 ; CHECK-P10-NEXT: and r3, r3, r4
1453 ; CHECK-P10-NEXT: pli r4, 999990000
1454 ; CHECK-P10-NEXT: lbzx r3, r3, r4
1455 ; CHECK-P10-NEXT: extsb r3, r3
1456 ; CHECK-P10-NEXT: blr
1458 ; CHECK-P9-LABEL: ld_disjoint_align32_uint64_t_int8_t:
1459 ; CHECK-P9: # %bb.0: # %entry
1460 ; CHECK-P9-NEXT: lis r4, -15264
1461 ; CHECK-P9-NEXT: and r3, r3, r4
1462 ; CHECK-P9-NEXT: lis r4, 15258
1463 ; CHECK-P9-NEXT: ori r4, r4, 41712
1464 ; CHECK-P9-NEXT: lbzx r3, r3, r4
1465 ; CHECK-P9-NEXT: extsb r3, r3
1466 ; CHECK-P9-NEXT: blr
1468 ; CHECK-P8-LABEL: ld_disjoint_align32_uint64_t_int8_t:
1469 ; CHECK-P8: # %bb.0: # %entry
1470 ; CHECK-P8-NEXT: lis r4, -15264
1471 ; CHECK-P8-NEXT: lis r5, 15258
1472 ; CHECK-P8-NEXT: and r3, r3, r4
1473 ; CHECK-P8-NEXT: ori r4, r5, 41712
1474 ; CHECK-P8-NEXT: lbzx r3, r3, r4
1475 ; CHECK-P8-NEXT: extsb r3, r3
1476 ; CHECK-P8-NEXT: blr
1478 %and = and i64 %ptr, -1000341504
1479 %or = or i64 %and, 999990000
1480 %0 = inttoptr i64 %or to i8*
1481 %1 = load i8, i8* %0, align 16
1482 %conv = sext i8 %1 to i64
1486 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1487 define dso_local i64 @ld_not_disjoint64_uint64_t_int8_t(i64 %ptr) {
1488 ; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_int8_t:
1489 ; CHECK-P10: # %bb.0: # %entry
1490 ; CHECK-P10-NEXT: pli r4, 232
1491 ; CHECK-P10-NEXT: pli r5, 3567587329
1492 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
1493 ; CHECK-P10-NEXT: or r3, r3, r5
1494 ; CHECK-P10-NEXT: lbz r3, 0(r3)
1495 ; CHECK-P10-NEXT: extsb r3, r3
1496 ; CHECK-P10-NEXT: blr
1498 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_int8_t:
1499 ; CHECK-PREP10: # %bb.0: # %entry
1500 ; CHECK-PREP10-NEXT: li r4, 29
1501 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
1502 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
1503 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
1504 ; CHECK-PREP10-NEXT: or r3, r3, r4
1505 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
1506 ; CHECK-PREP10-NEXT: extsb r3, r3
1507 ; CHECK-PREP10-NEXT: blr
1509 %or = or i64 %ptr, 1000000000001
1510 %0 = inttoptr i64 %or to i8*
1511 %1 = load i8, i8* %0, align 1
1512 %conv = sext i8 %1 to i64
1516 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1517 define dso_local i64 @ld_disjoint_unalign64_uint64_t_int8_t(i64 %ptr) {
1518 ; CHECK-P10-LABEL: ld_disjoint_unalign64_uint64_t_int8_t:
1519 ; CHECK-P10: # %bb.0: # %entry
1520 ; CHECK-P10-NEXT: pli r4, 232
1521 ; CHECK-P10-NEXT: pli r5, 3567587329
1522 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
1523 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
1524 ; CHECK-P10-NEXT: lbzx r3, r3, r5
1525 ; CHECK-P10-NEXT: extsb r3, r3
1526 ; CHECK-P10-NEXT: blr
1528 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint64_t_int8_t:
1529 ; CHECK-PREP10: # %bb.0: # %entry
1530 ; CHECK-PREP10-NEXT: li r4, 29
1531 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
1532 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
1533 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
1534 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
1535 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
1536 ; CHECK-PREP10-NEXT: extsb r3, r3
1537 ; CHECK-PREP10-NEXT: blr
1539 %and = and i64 %ptr, -1099511627776
1540 %or = or i64 %and, 1000000000001
1541 %0 = inttoptr i64 %or to i8*
1542 %1 = load i8, i8* %0, align 1
1543 %conv = sext i8 %1 to i64
1547 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1548 define dso_local i64 @ld_disjoint_align64_uint64_t_int8_t(i64 %ptr) {
1549 ; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_int8_t:
1550 ; CHECK-P10: # %bb.0: # %entry
1551 ; CHECK-P10-NEXT: pli r4, 244140625
1552 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
1553 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
1554 ; CHECK-P10-NEXT: lbzx r3, r3, r4
1555 ; CHECK-P10-NEXT: extsb r3, r3
1556 ; CHECK-P10-NEXT: blr
1558 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_int8_t:
1559 ; CHECK-PREP10: # %bb.0: # %entry
1560 ; CHECK-PREP10-NEXT: lis r4, 3725
1561 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
1562 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
1563 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
1564 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
1565 ; CHECK-PREP10-NEXT: extsb r3, r3
1566 ; CHECK-PREP10-NEXT: blr
1568 %and = and i64 %ptr, -1099511627776
1569 %or = or i64 %and, 1000000000000
1570 %0 = inttoptr i64 %or to i8*
1571 %1 = load i8, i8* %0, align 4096
1572 %conv = sext i8 %1 to i64
1576 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1577 define dso_local i64 @ld_cst_unalign16_uint64_t_int8_t() {
1578 ; CHECK-LABEL: ld_cst_unalign16_uint64_t_int8_t:
1579 ; CHECK: # %bb.0: # %entry
1580 ; CHECK-NEXT: lbz r3, 255(0)
1581 ; CHECK-NEXT: extsb r3, r3
1584 %0 = load i8, i8* inttoptr (i64 255 to i8*), align 1
1585 %conv = sext i8 %0 to i64
1589 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1590 define dso_local i64 @ld_cst_align16_uint64_t_int8_t() {
1591 ; CHECK-LABEL: ld_cst_align16_uint64_t_int8_t:
1592 ; CHECK: # %bb.0: # %entry
1593 ; CHECK-NEXT: lbz r3, 4080(0)
1594 ; CHECK-NEXT: extsb r3, r3
1597 %0 = load i8, i8* inttoptr (i64 4080 to i8*), align 16
1598 %conv = sext i8 %0 to i64
1602 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1603 define dso_local i64 @ld_cst_unalign32_uint64_t_int8_t() {
1604 ; CHECK-LABEL: ld_cst_unalign32_uint64_t_int8_t:
1605 ; CHECK: # %bb.0: # %entry
1606 ; CHECK-NEXT: lis r3, 2
1607 ; CHECK-NEXT: lbz r3, -31073(r3)
1608 ; CHECK-NEXT: extsb r3, r3
1611 %0 = load i8, i8* inttoptr (i64 99999 to i8*), align 1
1612 %conv = sext i8 %0 to i64
1616 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1617 define dso_local i64 @ld_cst_align32_uint64_t_int8_t() {
1618 ; CHECK-LABEL: ld_cst_align32_uint64_t_int8_t:
1619 ; CHECK: # %bb.0: # %entry
1620 ; CHECK-NEXT: lis r3, 153
1621 ; CHECK-NEXT: lbz r3, -27108(r3)
1622 ; CHECK-NEXT: extsb r3, r3
1625 %0 = load i8, i8* inttoptr (i64 9999900 to i8*), align 4
1626 %conv = sext i8 %0 to i64
1630 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1631 define dso_local i64 @ld_cst_unalign64_uint64_t_int8_t() {
1632 ; CHECK-P10-LABEL: ld_cst_unalign64_uint64_t_int8_t:
1633 ; CHECK-P10: # %bb.0: # %entry
1634 ; CHECK-P10-NEXT: pli r3, 232
1635 ; CHECK-P10-NEXT: pli r4, 3567587329
1636 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
1637 ; CHECK-P10-NEXT: lbz r3, 0(r4)
1638 ; CHECK-P10-NEXT: extsb r3, r3
1639 ; CHECK-P10-NEXT: blr
1641 ; CHECK-PREP10-LABEL: ld_cst_unalign64_uint64_t_int8_t:
1642 ; CHECK-PREP10: # %bb.0: # %entry
1643 ; CHECK-PREP10-NEXT: li r3, 29
1644 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
1645 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
1646 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
1647 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
1648 ; CHECK-PREP10-NEXT: extsb r3, r3
1649 ; CHECK-PREP10-NEXT: blr
1651 %0 = load i8, i8* inttoptr (i64 1000000000001 to i8*), align 1
1652 %conv = sext i8 %0 to i64
1656 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1657 define dso_local i64 @ld_cst_align64_uint64_t_int8_t() {
1658 ; CHECK-P10-LABEL: ld_cst_align64_uint64_t_int8_t:
1659 ; CHECK-P10: # %bb.0: # %entry
1660 ; CHECK-P10-NEXT: pli r3, 244140625
1661 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
1662 ; CHECK-P10-NEXT: lbz r3, 0(r3)
1663 ; CHECK-P10-NEXT: extsb r3, r3
1664 ; CHECK-P10-NEXT: blr
1666 ; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_int8_t:
1667 ; CHECK-PREP10: # %bb.0: # %entry
1668 ; CHECK-PREP10-NEXT: lis r3, 3725
1669 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
1670 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
1671 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
1672 ; CHECK-PREP10-NEXT: extsb r3, r3
1673 ; CHECK-PREP10-NEXT: blr
1675 %0 = load i8, i8* inttoptr (i64 1000000000000 to i8*), align 4096
1676 %conv = sext i8 %0 to i64
1680 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1681 define dso_local i64 @ld_0_uint64_t_uint16_t(i64 %ptr) {
1682 ; CHECK-LABEL: ld_0_uint64_t_uint16_t:
1683 ; CHECK: # %bb.0: # %entry
1684 ; CHECK-NEXT: lhz r3, 0(r3)
1687 %0 = inttoptr i64 %ptr to i16*
1688 %1 = load i16, i16* %0, align 2
1689 %conv = zext i16 %1 to i64
1693 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1694 define dso_local i64 @ld_unalign16_uint64_t_uint16_t(i8* nocapture readonly %ptr) {
1695 ; CHECK-LABEL: ld_unalign16_uint64_t_uint16_t:
1696 ; CHECK: # %bb.0: # %entry
1697 ; CHECK-NEXT: lhz r3, 1(r3)
1700 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1
1701 %0 = bitcast i8* %add.ptr to i16*
1702 %1 = load i16, i16* %0, align 2
1703 %conv = zext i16 %1 to i64
1707 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1708 define dso_local i64 @ld_align16_uint64_t_uint16_t(i8* nocapture readonly %ptr) {
1709 ; CHECK-LABEL: ld_align16_uint64_t_uint16_t:
1710 ; CHECK: # %bb.0: # %entry
1711 ; CHECK-NEXT: lhz r3, 8(r3)
1714 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
1715 %0 = bitcast i8* %add.ptr to i16*
1716 %1 = load i16, i16* %0, align 2
1717 %conv = zext i16 %1 to i64
1721 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1722 define dso_local i64 @ld_unalign32_uint64_t_uint16_t(i8* nocapture readonly %ptr) {
1723 ; CHECK-P10-LABEL: ld_unalign32_uint64_t_uint16_t:
1724 ; CHECK-P10: # %bb.0: # %entry
1725 ; CHECK-P10-NEXT: pli r4, 99999
1726 ; CHECK-P10-NEXT: lhzx r3, r3, r4
1727 ; CHECK-P10-NEXT: blr
1729 ; CHECK-PREP10-LABEL: ld_unalign32_uint64_t_uint16_t:
1730 ; CHECK-PREP10: # %bb.0: # %entry
1731 ; CHECK-PREP10-NEXT: lis r4, 1
1732 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
1733 ; CHECK-PREP10-NEXT: lhzx r3, r3, r4
1734 ; CHECK-PREP10-NEXT: blr
1736 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999
1737 %0 = bitcast i8* %add.ptr to i16*
1738 %1 = load i16, i16* %0, align 2
1739 %conv = zext i16 %1 to i64
1743 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1744 define dso_local i64 @ld_align32_uint64_t_uint16_t(i8* nocapture readonly %ptr) {
1745 ; CHECK-P10-LABEL: ld_align32_uint64_t_uint16_t:
1746 ; CHECK-P10: # %bb.0: # %entry
1747 ; CHECK-P10-NEXT: pli r4, 99999000
1748 ; CHECK-P10-NEXT: lhzx r3, r3, r4
1749 ; CHECK-P10-NEXT: blr
1751 ; CHECK-PREP10-LABEL: ld_align32_uint64_t_uint16_t:
1752 ; CHECK-PREP10: # %bb.0: # %entry
1753 ; CHECK-PREP10-NEXT: lis r4, 1525
1754 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
1755 ; CHECK-PREP10-NEXT: lhzx r3, r3, r4
1756 ; CHECK-PREP10-NEXT: blr
1758 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
1759 %0 = bitcast i8* %add.ptr to i16*
1760 %1 = load i16, i16* %0, align 2
1761 %conv = zext i16 %1 to i64
1765 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1766 define dso_local i64 @ld_unalign64_uint64_t_uint16_t(i8* nocapture readonly %ptr) {
1767 ; CHECK-P10-LABEL: ld_unalign64_uint64_t_uint16_t:
1768 ; CHECK-P10: # %bb.0: # %entry
1769 ; CHECK-P10-NEXT: pli r4, 232
1770 ; CHECK-P10-NEXT: pli r5, 3567587329
1771 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
1772 ; CHECK-P10-NEXT: lhzx r3, r3, r5
1773 ; CHECK-P10-NEXT: blr
1775 ; CHECK-PREP10-LABEL: ld_unalign64_uint64_t_uint16_t:
1776 ; CHECK-PREP10: # %bb.0: # %entry
1777 ; CHECK-PREP10-NEXT: li r4, 29
1778 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
1779 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
1780 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
1781 ; CHECK-PREP10-NEXT: lhzx r3, r3, r4
1782 ; CHECK-PREP10-NEXT: blr
1784 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
1785 %0 = bitcast i8* %add.ptr to i16*
1786 %1 = load i16, i16* %0, align 2
1787 %conv = zext i16 %1 to i64
1791 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1792 define dso_local i64 @ld_align64_uint64_t_uint16_t(i8* nocapture readonly %ptr) {
1793 ; CHECK-P10-LABEL: ld_align64_uint64_t_uint16_t:
1794 ; CHECK-P10: # %bb.0: # %entry
1795 ; CHECK-P10-NEXT: pli r4, 244140625
1796 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
1797 ; CHECK-P10-NEXT: lhzx r3, r3, r4
1798 ; CHECK-P10-NEXT: blr
1800 ; CHECK-PREP10-LABEL: ld_align64_uint64_t_uint16_t:
1801 ; CHECK-PREP10: # %bb.0: # %entry
1802 ; CHECK-PREP10-NEXT: lis r4, 3725
1803 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
1804 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
1805 ; CHECK-PREP10-NEXT: lhzx r3, r3, r4
1806 ; CHECK-PREP10-NEXT: blr
1808 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
1809 %0 = bitcast i8* %add.ptr to i16*
1810 %1 = load i16, i16* %0, align 2
1811 %conv = zext i16 %1 to i64
1815 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1816 define dso_local i64 @ld_reg_uint64_t_uint16_t(i8* nocapture readonly %ptr, i64 %off) {
1817 ; CHECK-LABEL: ld_reg_uint64_t_uint16_t:
1818 ; CHECK: # %bb.0: # %entry
1819 ; CHECK-NEXT: lhzx r3, r3, r4
1822 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
1823 %0 = bitcast i8* %add.ptr to i16*
1824 %1 = load i16, i16* %0, align 2
1825 %conv = zext i16 %1 to i64
1829 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1830 define dso_local i64 @ld_or_uint64_t_uint16_t(i64 %ptr, i8 zeroext %off) {
1831 ; CHECK-LABEL: ld_or_uint64_t_uint16_t:
1832 ; CHECK: # %bb.0: # %entry
1833 ; CHECK-NEXT: or r3, r4, r3
1834 ; CHECK-NEXT: lhz r3, 0(r3)
1837 %conv = zext i8 %off to i64
1838 %or = or i64 %conv, %ptr
1839 %0 = inttoptr i64 %or to i16*
1840 %1 = load i16, i16* %0, align 2
1841 %conv1 = zext i16 %1 to i64
1845 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1846 define dso_local i64 @ld_or2_uint64_t_uint16_t(i64 %ptr, i8 zeroext %off) {
1847 ; CHECK-LABEL: ld_or2_uint64_t_uint16_t:
1848 ; CHECK: # %bb.0: # %entry
1849 ; CHECK-NEXT: rldicr r3, r3, 0, 51
1850 ; CHECK-NEXT: lhzx r3, r3, r4
1853 %and = and i64 %ptr, -4096
1854 %conv = zext i8 %off to i64
1855 %or = or i64 %and, %conv
1856 %0 = inttoptr i64 %or to i16*
1857 %1 = load i16, i16* %0, align 2
1858 %conv1 = zext i16 %1 to i64
1862 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1863 define dso_local i64 @ld_not_disjoint16_uint64_t_uint16_t(i64 %ptr) {
1864 ; CHECK-LABEL: ld_not_disjoint16_uint64_t_uint16_t:
1865 ; CHECK: # %bb.0: # %entry
1866 ; CHECK-NEXT: ori r3, r3, 6
1867 ; CHECK-NEXT: lhz r3, 0(r3)
1870 %or = or i64 %ptr, 6
1871 %0 = inttoptr i64 %or to i16*
1872 %1 = load i16, i16* %0, align 2
1873 %conv = zext i16 %1 to i64
1877 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1878 define dso_local i64 @ld_disjoint_unalign16_uint64_t_uint16_t(i64 %ptr) {
1879 ; CHECK-LABEL: ld_disjoint_unalign16_uint64_t_uint16_t:
1880 ; CHECK: # %bb.0: # %entry
1881 ; CHECK-NEXT: rldicr r3, r3, 0, 51
1882 ; CHECK-NEXT: lhz r3, 6(r3)
1885 %and = and i64 %ptr, -4096
1886 %or = or i64 %and, 6
1887 %0 = inttoptr i64 %or to i16*
1888 %1 = load i16, i16* %0, align 2
1889 %conv = zext i16 %1 to i64
1893 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1894 define dso_local i64 @ld_disjoint_align16_uint64_t_uint16_t(i64 %ptr) {
1895 ; CHECK-LABEL: ld_disjoint_align16_uint64_t_uint16_t:
1896 ; CHECK: # %bb.0: # %entry
1897 ; CHECK-NEXT: rldicr r3, r3, 0, 51
1898 ; CHECK-NEXT: lhz r3, 24(r3)
1901 %and = and i64 %ptr, -4096
1902 %or = or i64 %and, 24
1903 %0 = inttoptr i64 %or to i16*
1904 %1 = load i16, i16* %0, align 8
1905 %conv = zext i16 %1 to i64
1909 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1910 define dso_local i64 @ld_not_disjoint32_uint64_t_uint16_t(i64 %ptr) {
1911 ; CHECK-LABEL: ld_not_disjoint32_uint64_t_uint16_t:
1912 ; CHECK: # %bb.0: # %entry
1913 ; CHECK-NEXT: ori r3, r3, 34463
1914 ; CHECK-NEXT: oris r3, r3, 1
1915 ; CHECK-NEXT: lhz r3, 0(r3)
1918 %or = or i64 %ptr, 99999
1919 %0 = inttoptr i64 %or to i16*
1920 %1 = load i16, i16* %0, align 2
1921 %conv = zext i16 %1 to i64
1925 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1926 define dso_local i64 @ld_disjoint_unalign32_uint64_t_uint16_t(i64 %ptr) {
1927 ; CHECK-P10-LABEL: ld_disjoint_unalign32_uint64_t_uint16_t:
1928 ; CHECK-P10: # %bb.0: # %entry
1929 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
1930 ; CHECK-P10-NEXT: pli r4, 99999
1931 ; CHECK-P10-NEXT: lhzx r3, r3, r4
1932 ; CHECK-P10-NEXT: blr
1934 ; CHECK-PREP10-LABEL: ld_disjoint_unalign32_uint64_t_uint16_t:
1935 ; CHECK-PREP10: # %bb.0: # %entry
1936 ; CHECK-PREP10-NEXT: lis r4, 1
1937 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
1938 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
1939 ; CHECK-PREP10-NEXT: lhzx r3, r3, r4
1940 ; CHECK-PREP10-NEXT: blr
1942 %and = and i64 %ptr, -1048576
1943 %or = or i64 %and, 99999
1944 %0 = inttoptr i64 %or to i16*
1945 %1 = load i16, i16* %0, align 2
1946 %conv = zext i16 %1 to i64
1950 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1951 define dso_local i64 @ld_disjoint_align32_uint64_t_uint16_t(i64 %ptr) {
1952 ; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_uint16_t:
1953 ; CHECK-P10: # %bb.0: # %entry
1954 ; CHECK-P10-NEXT: lis r4, -15264
1955 ; CHECK-P10-NEXT: and r3, r3, r4
1956 ; CHECK-P10-NEXT: pli r4, 999990000
1957 ; CHECK-P10-NEXT: lhzx r3, r3, r4
1958 ; CHECK-P10-NEXT: blr
1960 ; CHECK-P9-LABEL: ld_disjoint_align32_uint64_t_uint16_t:
1961 ; CHECK-P9: # %bb.0: # %entry
1962 ; CHECK-P9-NEXT: lis r4, -15264
1963 ; CHECK-P9-NEXT: and r3, r3, r4
1964 ; CHECK-P9-NEXT: lis r4, 15258
1965 ; CHECK-P9-NEXT: ori r4, r4, 41712
1966 ; CHECK-P9-NEXT: lhzx r3, r3, r4
1967 ; CHECK-P9-NEXT: blr
1969 ; CHECK-P8-LABEL: ld_disjoint_align32_uint64_t_uint16_t:
1970 ; CHECK-P8: # %bb.0: # %entry
1971 ; CHECK-P8-NEXT: lis r4, -15264
1972 ; CHECK-P8-NEXT: lis r5, 15258
1973 ; CHECK-P8-NEXT: and r3, r3, r4
1974 ; CHECK-P8-NEXT: ori r4, r5, 41712
1975 ; CHECK-P8-NEXT: lhzx r3, r3, r4
1976 ; CHECK-P8-NEXT: blr
1978 %and = and i64 %ptr, -1000341504
1979 %or = or i64 %and, 999990000
1980 %0 = inttoptr i64 %or to i16*
1981 %1 = load i16, i16* %0, align 16
1982 %conv = zext i16 %1 to i64
1986 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1987 define dso_local i64 @ld_not_disjoint64_uint64_t_uint16_t(i64 %ptr) {
1988 ; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_uint16_t:
1989 ; CHECK-P10: # %bb.0: # %entry
1990 ; CHECK-P10-NEXT: pli r4, 232
1991 ; CHECK-P10-NEXT: pli r5, 3567587329
1992 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
1993 ; CHECK-P10-NEXT: or r3, r3, r5
1994 ; CHECK-P10-NEXT: lhz r3, 0(r3)
1995 ; CHECK-P10-NEXT: blr
1997 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_uint16_t:
1998 ; CHECK-PREP10: # %bb.0: # %entry
1999 ; CHECK-PREP10-NEXT: li r4, 29
2000 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2001 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2002 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2003 ; CHECK-PREP10-NEXT: or r3, r3, r4
2004 ; CHECK-PREP10-NEXT: lhz r3, 0(r3)
2005 ; CHECK-PREP10-NEXT: blr
2007 %or = or i64 %ptr, 1000000000001
2008 %0 = inttoptr i64 %or to i16*
2009 %1 = load i16, i16* %0, align 2
2010 %conv = zext i16 %1 to i64
2014 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2015 define dso_local i64 @ld_disjoint_unalign64_uint64_t_uint16_t(i64 %ptr) {
2016 ; CHECK-P10-LABEL: ld_disjoint_unalign64_uint64_t_uint16_t:
2017 ; CHECK-P10: # %bb.0: # %entry
2018 ; CHECK-P10-NEXT: pli r4, 232
2019 ; CHECK-P10-NEXT: pli r5, 3567587329
2020 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
2021 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2022 ; CHECK-P10-NEXT: lhzx r3, r3, r5
2023 ; CHECK-P10-NEXT: blr
2025 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint64_t_uint16_t:
2026 ; CHECK-PREP10: # %bb.0: # %entry
2027 ; CHECK-PREP10-NEXT: li r4, 29
2028 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
2029 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2030 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2031 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2032 ; CHECK-PREP10-NEXT: lhzx r3, r3, r4
2033 ; CHECK-PREP10-NEXT: blr
2035 %and = and i64 %ptr, -1099511627776
2036 %or = or i64 %and, 1000000000001
2037 %0 = inttoptr i64 %or to i16*
2038 %1 = load i16, i16* %0, align 2
2039 %conv = zext i16 %1 to i64
2043 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2044 define dso_local i64 @ld_disjoint_align64_uint64_t_uint16_t(i64 %ptr) {
2045 ; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_uint16_t:
2046 ; CHECK-P10: # %bb.0: # %entry
2047 ; CHECK-P10-NEXT: pli r4, 244140625
2048 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
2049 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2050 ; CHECK-P10-NEXT: lhzx r3, r3, r4
2051 ; CHECK-P10-NEXT: blr
2053 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_uint16_t:
2054 ; CHECK-PREP10: # %bb.0: # %entry
2055 ; CHECK-PREP10-NEXT: lis r4, 3725
2056 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
2057 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2058 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2059 ; CHECK-PREP10-NEXT: lhzx r3, r3, r4
2060 ; CHECK-PREP10-NEXT: blr
2062 %and = and i64 %ptr, -1099511627776
2063 %or = or i64 %and, 1000000000000
2064 %0 = inttoptr i64 %or to i16*
2065 %1 = load i16, i16* %0, align 4096
2066 %conv = zext i16 %1 to i64
2070 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2071 define dso_local i64 @ld_cst_unalign16_uint64_t_uint16_t() {
2072 ; CHECK-LABEL: ld_cst_unalign16_uint64_t_uint16_t:
2073 ; CHECK: # %bb.0: # %entry
2074 ; CHECK-NEXT: lhz r3, 255(0)
2077 %0 = load i16, i16* inttoptr (i64 255 to i16*), align 2
2078 %conv = zext i16 %0 to i64
2082 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2083 define dso_local i64 @ld_cst_align16_uint64_t_uint16_t() {
2084 ; CHECK-LABEL: ld_cst_align16_uint64_t_uint16_t:
2085 ; CHECK: # %bb.0: # %entry
2086 ; CHECK-NEXT: lhz r3, 4080(0)
2089 %0 = load i16, i16* inttoptr (i64 4080 to i16*), align 16
2090 %conv = zext i16 %0 to i64
2094 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2095 define dso_local i64 @ld_cst_unalign32_uint64_t_uint16_t() {
2096 ; CHECK-LABEL: ld_cst_unalign32_uint64_t_uint16_t:
2097 ; CHECK: # %bb.0: # %entry
2098 ; CHECK-NEXT: lis r3, 2
2099 ; CHECK-NEXT: lhz r3, -31073(r3)
2102 %0 = load i16, i16* inttoptr (i64 99999 to i16*), align 2
2103 %conv = zext i16 %0 to i64
2107 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2108 define dso_local i64 @ld_cst_align32_uint64_t_uint16_t() {
2109 ; CHECK-LABEL: ld_cst_align32_uint64_t_uint16_t:
2110 ; CHECK: # %bb.0: # %entry
2111 ; CHECK-NEXT: lis r3, 153
2112 ; CHECK-NEXT: lhz r3, -27108(r3)
2115 %0 = load i16, i16* inttoptr (i64 9999900 to i16*), align 4
2116 %conv = zext i16 %0 to i64
2120 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2121 define dso_local i64 @ld_cst_unalign64_uint64_t_uint16_t() {
2122 ; CHECK-P10-LABEL: ld_cst_unalign64_uint64_t_uint16_t:
2123 ; CHECK-P10: # %bb.0: # %entry
2124 ; CHECK-P10-NEXT: pli r3, 232
2125 ; CHECK-P10-NEXT: pli r4, 3567587329
2126 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
2127 ; CHECK-P10-NEXT: lhz r3, 0(r4)
2128 ; CHECK-P10-NEXT: blr
2130 ; CHECK-PREP10-LABEL: ld_cst_unalign64_uint64_t_uint16_t:
2131 ; CHECK-PREP10: # %bb.0: # %entry
2132 ; CHECK-PREP10-NEXT: li r3, 29
2133 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
2134 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
2135 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
2136 ; CHECK-PREP10-NEXT: lhz r3, 0(r3)
2137 ; CHECK-PREP10-NEXT: blr
2139 %0 = load i16, i16* inttoptr (i64 1000000000001 to i16*), align 2
2140 %conv = zext i16 %0 to i64
2144 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2145 define dso_local i64 @ld_cst_align64_uint64_t_uint16_t() {
2146 ; CHECK-P10-LABEL: ld_cst_align64_uint64_t_uint16_t:
2147 ; CHECK-P10: # %bb.0: # %entry
2148 ; CHECK-P10-NEXT: pli r3, 244140625
2149 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
2150 ; CHECK-P10-NEXT: lhz r3, 0(r3)
2151 ; CHECK-P10-NEXT: blr
2153 ; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_uint16_t:
2154 ; CHECK-PREP10: # %bb.0: # %entry
2155 ; CHECK-PREP10-NEXT: lis r3, 3725
2156 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
2157 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
2158 ; CHECK-PREP10-NEXT: lhz r3, 0(r3)
2159 ; CHECK-PREP10-NEXT: blr
2161 %0 = load i16, i16* inttoptr (i64 1000000000000 to i16*), align 4096
2162 %conv = zext i16 %0 to i64
2166 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2167 define dso_local i64 @ld_0_uint64_t_int16_t(i64 %ptr) {
2168 ; CHECK-LABEL: ld_0_uint64_t_int16_t:
2169 ; CHECK: # %bb.0: # %entry
2170 ; CHECK-NEXT: lha r3, 0(r3)
2173 %0 = inttoptr i64 %ptr to i16*
2174 %1 = load i16, i16* %0, align 2
2175 %conv = sext i16 %1 to i64
2179 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2180 define dso_local i64 @ld_unalign16_uint64_t_int16_t(i8* nocapture readonly %ptr) {
2181 ; CHECK-LABEL: ld_unalign16_uint64_t_int16_t:
2182 ; CHECK: # %bb.0: # %entry
2183 ; CHECK-NEXT: lha r3, 1(r3)
2186 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1
2187 %0 = bitcast i8* %add.ptr to i16*
2188 %1 = load i16, i16* %0, align 2
2189 %conv = sext i16 %1 to i64
2193 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2194 define dso_local i64 @ld_align16_uint64_t_int16_t(i8* nocapture readonly %ptr) {
2195 ; CHECK-LABEL: ld_align16_uint64_t_int16_t:
2196 ; CHECK: # %bb.0: # %entry
2197 ; CHECK-NEXT: lha r3, 8(r3)
2200 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
2201 %0 = bitcast i8* %add.ptr to i16*
2202 %1 = load i16, i16* %0, align 2
2203 %conv = sext i16 %1 to i64
2207 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2208 define dso_local i64 @ld_unalign32_uint64_t_int16_t(i8* nocapture readonly %ptr) {
2209 ; CHECK-P10-LABEL: ld_unalign32_uint64_t_int16_t:
2210 ; CHECK-P10: # %bb.0: # %entry
2211 ; CHECK-P10-NEXT: pli r4, 99999
2212 ; CHECK-P10-NEXT: lhax r3, r3, r4
2213 ; CHECK-P10-NEXT: blr
2215 ; CHECK-PREP10-LABEL: ld_unalign32_uint64_t_int16_t:
2216 ; CHECK-PREP10: # %bb.0: # %entry
2217 ; CHECK-PREP10-NEXT: lis r4, 1
2218 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
2219 ; CHECK-PREP10-NEXT: lhax r3, r3, r4
2220 ; CHECK-PREP10-NEXT: blr
2222 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999
2223 %0 = bitcast i8* %add.ptr to i16*
2224 %1 = load i16, i16* %0, align 2
2225 %conv = sext i16 %1 to i64
2229 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2230 define dso_local i64 @ld_align32_uint64_t_int16_t(i8* nocapture readonly %ptr) {
2231 ; CHECK-P10-LABEL: ld_align32_uint64_t_int16_t:
2232 ; CHECK-P10: # %bb.0: # %entry
2233 ; CHECK-P10-NEXT: pli r4, 99999000
2234 ; CHECK-P10-NEXT: lhax r3, r3, r4
2235 ; CHECK-P10-NEXT: blr
2237 ; CHECK-PREP10-LABEL: ld_align32_uint64_t_int16_t:
2238 ; CHECK-PREP10: # %bb.0: # %entry
2239 ; CHECK-PREP10-NEXT: lis r4, 1525
2240 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
2241 ; CHECK-PREP10-NEXT: lhax r3, r3, r4
2242 ; CHECK-PREP10-NEXT: blr
2244 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
2245 %0 = bitcast i8* %add.ptr to i16*
2246 %1 = load i16, i16* %0, align 2
2247 %conv = sext i16 %1 to i64
2251 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2252 define dso_local i64 @ld_unalign64_uint64_t_int16_t(i8* nocapture readonly %ptr) {
2253 ; CHECK-P10-LABEL: ld_unalign64_uint64_t_int16_t:
2254 ; CHECK-P10: # %bb.0: # %entry
2255 ; CHECK-P10-NEXT: pli r4, 232
2256 ; CHECK-P10-NEXT: pli r5, 3567587329
2257 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2258 ; CHECK-P10-NEXT: lhax r3, r3, r5
2259 ; CHECK-P10-NEXT: blr
2261 ; CHECK-PREP10-LABEL: ld_unalign64_uint64_t_int16_t:
2262 ; CHECK-PREP10: # %bb.0: # %entry
2263 ; CHECK-PREP10-NEXT: li r4, 29
2264 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2265 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2266 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2267 ; CHECK-PREP10-NEXT: lhax r3, r3, r4
2268 ; CHECK-PREP10-NEXT: blr
2270 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
2271 %0 = bitcast i8* %add.ptr to i16*
2272 %1 = load i16, i16* %0, align 2
2273 %conv = sext i16 %1 to i64
2277 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2278 define dso_local i64 @ld_align64_uint64_t_int16_t(i8* nocapture readonly %ptr) {
2279 ; CHECK-P10-LABEL: ld_align64_uint64_t_int16_t:
2280 ; CHECK-P10: # %bb.0: # %entry
2281 ; CHECK-P10-NEXT: pli r4, 244140625
2282 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2283 ; CHECK-P10-NEXT: lhax r3, r3, r4
2284 ; CHECK-P10-NEXT: blr
2286 ; CHECK-PREP10-LABEL: ld_align64_uint64_t_int16_t:
2287 ; CHECK-PREP10: # %bb.0: # %entry
2288 ; CHECK-PREP10-NEXT: lis r4, 3725
2289 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2290 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2291 ; CHECK-PREP10-NEXT: lhax r3, r3, r4
2292 ; CHECK-PREP10-NEXT: blr
2294 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
2295 %0 = bitcast i8* %add.ptr to i16*
2296 %1 = load i16, i16* %0, align 2
2297 %conv = sext i16 %1 to i64
2301 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2302 define dso_local i64 @ld_reg_uint64_t_int16_t(i8* nocapture readonly %ptr, i64 %off) {
2303 ; CHECK-LABEL: ld_reg_uint64_t_int16_t:
2304 ; CHECK: # %bb.0: # %entry
2305 ; CHECK-NEXT: lhax r3, r3, r4
2308 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
2309 %0 = bitcast i8* %add.ptr to i16*
2310 %1 = load i16, i16* %0, align 2
2311 %conv = sext i16 %1 to i64
2315 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2316 define dso_local i64 @ld_or_uint64_t_int16_t(i64 %ptr, i8 zeroext %off) {
2317 ; CHECK-LABEL: ld_or_uint64_t_int16_t:
2318 ; CHECK: # %bb.0: # %entry
2319 ; CHECK-NEXT: or r3, r4, r3
2320 ; CHECK-NEXT: lha r3, 0(r3)
2323 %conv = zext i8 %off to i64
2324 %or = or i64 %conv, %ptr
2325 %0 = inttoptr i64 %or to i16*
2326 %1 = load i16, i16* %0, align 2
2327 %conv1 = sext i16 %1 to i64
2331 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2332 define dso_local i64 @ld_or2_uint64_t_int16_t(i64 %ptr, i8 zeroext %off) {
2333 ; CHECK-LABEL: ld_or2_uint64_t_int16_t:
2334 ; CHECK: # %bb.0: # %entry
2335 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2336 ; CHECK-NEXT: lhax r3, r3, r4
2339 %and = and i64 %ptr, -4096
2340 %conv = zext i8 %off to i64
2341 %or = or i64 %and, %conv
2342 %0 = inttoptr i64 %or to i16*
2343 %1 = load i16, i16* %0, align 2
2344 %conv1 = sext i16 %1 to i64
2348 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2349 define dso_local i64 @ld_not_disjoint16_uint64_t_int16_t(i64 %ptr) {
2350 ; CHECK-LABEL: ld_not_disjoint16_uint64_t_int16_t:
2351 ; CHECK: # %bb.0: # %entry
2352 ; CHECK-NEXT: ori r3, r3, 6
2353 ; CHECK-NEXT: lha r3, 0(r3)
2356 %or = or i64 %ptr, 6
2357 %0 = inttoptr i64 %or to i16*
2358 %1 = load i16, i16* %0, align 2
2359 %conv = sext i16 %1 to i64
2363 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2364 define dso_local i64 @ld_disjoint_unalign16_uint64_t_int16_t(i64 %ptr) {
2365 ; CHECK-LABEL: ld_disjoint_unalign16_uint64_t_int16_t:
2366 ; CHECK: # %bb.0: # %entry
2367 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2368 ; CHECK-NEXT: lha r3, 6(r3)
2371 %and = and i64 %ptr, -4096
2372 %or = or i64 %and, 6
2373 %0 = inttoptr i64 %or to i16*
2374 %1 = load i16, i16* %0, align 2
2375 %conv = sext i16 %1 to i64
2379 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2380 define dso_local i64 @ld_disjoint_align16_uint64_t_int16_t(i64 %ptr) {
2381 ; CHECK-LABEL: ld_disjoint_align16_uint64_t_int16_t:
2382 ; CHECK: # %bb.0: # %entry
2383 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2384 ; CHECK-NEXT: lha r3, 24(r3)
2387 %and = and i64 %ptr, -4096
2388 %or = or i64 %and, 24
2389 %0 = inttoptr i64 %or to i16*
2390 %1 = load i16, i16* %0, align 8
2391 %conv = sext i16 %1 to i64
2395 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2396 define dso_local i64 @ld_not_disjoint32_uint64_t_int16_t(i64 %ptr) {
2397 ; CHECK-LABEL: ld_not_disjoint32_uint64_t_int16_t:
2398 ; CHECK: # %bb.0: # %entry
2399 ; CHECK-NEXT: ori r3, r3, 34463
2400 ; CHECK-NEXT: oris r3, r3, 1
2401 ; CHECK-NEXT: lha r3, 0(r3)
2404 %or = or i64 %ptr, 99999
2405 %0 = inttoptr i64 %or to i16*
2406 %1 = load i16, i16* %0, align 2
2407 %conv = sext i16 %1 to i64
2411 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2412 define dso_local i64 @ld_disjoint_unalign32_uint64_t_int16_t(i64 %ptr) {
2413 ; CHECK-P10-LABEL: ld_disjoint_unalign32_uint64_t_int16_t:
2414 ; CHECK-P10: # %bb.0: # %entry
2415 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
2416 ; CHECK-P10-NEXT: pli r4, 99999
2417 ; CHECK-P10-NEXT: lhax r3, r3, r4
2418 ; CHECK-P10-NEXT: blr
2420 ; CHECK-PREP10-LABEL: ld_disjoint_unalign32_uint64_t_int16_t:
2421 ; CHECK-PREP10: # %bb.0: # %entry
2422 ; CHECK-PREP10-NEXT: lis r4, 1
2423 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
2424 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
2425 ; CHECK-PREP10-NEXT: lhax r3, r3, r4
2426 ; CHECK-PREP10-NEXT: blr
2428 %and = and i64 %ptr, -1048576
2429 %or = or i64 %and, 99999
2430 %0 = inttoptr i64 %or to i16*
2431 %1 = load i16, i16* %0, align 2
2432 %conv = sext i16 %1 to i64
2436 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2437 define dso_local i64 @ld_disjoint_align32_uint64_t_int16_t(i64 %ptr) {
2438 ; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_int16_t:
2439 ; CHECK-P10: # %bb.0: # %entry
2440 ; CHECK-P10-NEXT: lis r4, -15264
2441 ; CHECK-P10-NEXT: and r3, r3, r4
2442 ; CHECK-P10-NEXT: pli r4, 999990000
2443 ; CHECK-P10-NEXT: lhax r3, r3, r4
2444 ; CHECK-P10-NEXT: blr
2446 ; CHECK-P9-LABEL: ld_disjoint_align32_uint64_t_int16_t:
2447 ; CHECK-P9: # %bb.0: # %entry
2448 ; CHECK-P9-NEXT: lis r4, -15264
2449 ; CHECK-P9-NEXT: and r3, r3, r4
2450 ; CHECK-P9-NEXT: lis r4, 15258
2451 ; CHECK-P9-NEXT: ori r4, r4, 41712
2452 ; CHECK-P9-NEXT: lhax r3, r3, r4
2453 ; CHECK-P9-NEXT: blr
2455 ; CHECK-P8-LABEL: ld_disjoint_align32_uint64_t_int16_t:
2456 ; CHECK-P8: # %bb.0: # %entry
2457 ; CHECK-P8-NEXT: lis r4, -15264
2458 ; CHECK-P8-NEXT: lis r5, 15258
2459 ; CHECK-P8-NEXT: and r3, r3, r4
2460 ; CHECK-P8-NEXT: ori r4, r5, 41712
2461 ; CHECK-P8-NEXT: lhax r3, r3, r4
2462 ; CHECK-P8-NEXT: blr
2464 %and = and i64 %ptr, -1000341504
2465 %or = or i64 %and, 999990000
2466 %0 = inttoptr i64 %or to i16*
2467 %1 = load i16, i16* %0, align 16
2468 %conv = sext i16 %1 to i64
2472 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2473 define dso_local i64 @ld_not_disjoint64_uint64_t_int16_t(i64 %ptr) {
2474 ; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_int16_t:
2475 ; CHECK-P10: # %bb.0: # %entry
2476 ; CHECK-P10-NEXT: pli r4, 232
2477 ; CHECK-P10-NEXT: pli r5, 3567587329
2478 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2479 ; CHECK-P10-NEXT: or r3, r3, r5
2480 ; CHECK-P10-NEXT: lha r3, 0(r3)
2481 ; CHECK-P10-NEXT: blr
2483 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_int16_t:
2484 ; CHECK-PREP10: # %bb.0: # %entry
2485 ; CHECK-PREP10-NEXT: li r4, 29
2486 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2487 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2488 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2489 ; CHECK-PREP10-NEXT: or r3, r3, r4
2490 ; CHECK-PREP10-NEXT: lha r3, 0(r3)
2491 ; CHECK-PREP10-NEXT: blr
2493 %or = or i64 %ptr, 1000000000001
2494 %0 = inttoptr i64 %or to i16*
2495 %1 = load i16, i16* %0, align 2
2496 %conv = sext i16 %1 to i64
2500 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2501 define dso_local i64 @ld_disjoint_unalign64_uint64_t_int16_t(i64 %ptr) {
2502 ; CHECK-P10-LABEL: ld_disjoint_unalign64_uint64_t_int16_t:
2503 ; CHECK-P10: # %bb.0: # %entry
2504 ; CHECK-P10-NEXT: pli r4, 232
2505 ; CHECK-P10-NEXT: pli r5, 3567587329
2506 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
2507 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2508 ; CHECK-P10-NEXT: lhax r3, r3, r5
2509 ; CHECK-P10-NEXT: blr
2511 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint64_t_int16_t:
2512 ; CHECK-PREP10: # %bb.0: # %entry
2513 ; CHECK-PREP10-NEXT: li r4, 29
2514 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
2515 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2516 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2517 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2518 ; CHECK-PREP10-NEXT: lhax r3, r3, r4
2519 ; CHECK-PREP10-NEXT: blr
2521 %and = and i64 %ptr, -1099511627776
2522 %or = or i64 %and, 1000000000001
2523 %0 = inttoptr i64 %or to i16*
2524 %1 = load i16, i16* %0, align 2
2525 %conv = sext i16 %1 to i64
2529 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2530 define dso_local i64 @ld_disjoint_align64_uint64_t_int16_t(i64 %ptr) {
2531 ; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_int16_t:
2532 ; CHECK-P10: # %bb.0: # %entry
2533 ; CHECK-P10-NEXT: pli r4, 244140625
2534 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
2535 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2536 ; CHECK-P10-NEXT: lhax r3, r3, r4
2537 ; CHECK-P10-NEXT: blr
2539 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_int16_t:
2540 ; CHECK-PREP10: # %bb.0: # %entry
2541 ; CHECK-PREP10-NEXT: lis r4, 3725
2542 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
2543 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2544 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2545 ; CHECK-PREP10-NEXT: lhax r3, r3, r4
2546 ; CHECK-PREP10-NEXT: blr
2548 %and = and i64 %ptr, -1099511627776
2549 %or = or i64 %and, 1000000000000
2550 %0 = inttoptr i64 %or to i16*
2551 %1 = load i16, i16* %0, align 4096
2552 %conv = sext i16 %1 to i64
2556 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2557 define dso_local i64 @ld_cst_unalign16_uint64_t_int16_t() {
2558 ; CHECK-LABEL: ld_cst_unalign16_uint64_t_int16_t:
2559 ; CHECK: # %bb.0: # %entry
2560 ; CHECK-NEXT: lha r3, 255(0)
2563 %0 = load i16, i16* inttoptr (i64 255 to i16*), align 2
2564 %conv = sext i16 %0 to i64
2568 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2569 define dso_local i64 @ld_cst_align16_uint64_t_int16_t() {
2570 ; CHECK-LABEL: ld_cst_align16_uint64_t_int16_t:
2571 ; CHECK: # %bb.0: # %entry
2572 ; CHECK-NEXT: lha r3, 4080(0)
2575 %0 = load i16, i16* inttoptr (i64 4080 to i16*), align 16
2576 %conv = sext i16 %0 to i64
2580 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2581 define dso_local i64 @ld_cst_unalign32_uint64_t_int16_t() {
2582 ; CHECK-LABEL: ld_cst_unalign32_uint64_t_int16_t:
2583 ; CHECK: # %bb.0: # %entry
2584 ; CHECK-NEXT: lis r3, 2
2585 ; CHECK-NEXT: lha r3, -31073(r3)
2588 %0 = load i16, i16* inttoptr (i64 99999 to i16*), align 2
2589 %conv = sext i16 %0 to i64
2593 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2594 define dso_local i64 @ld_cst_align32_uint64_t_int16_t() {
2595 ; CHECK-LABEL: ld_cst_align32_uint64_t_int16_t:
2596 ; CHECK: # %bb.0: # %entry
2597 ; CHECK-NEXT: lis r3, 153
2598 ; CHECK-NEXT: lha r3, -27108(r3)
2601 %0 = load i16, i16* inttoptr (i64 9999900 to i16*), align 4
2602 %conv = sext i16 %0 to i64
2606 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2607 define dso_local i64 @ld_cst_unalign64_uint64_t_int16_t() {
2608 ; CHECK-P10-LABEL: ld_cst_unalign64_uint64_t_int16_t:
2609 ; CHECK-P10: # %bb.0: # %entry
2610 ; CHECK-P10-NEXT: pli r3, 232
2611 ; CHECK-P10-NEXT: pli r4, 3567587329
2612 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
2613 ; CHECK-P10-NEXT: lha r3, 0(r4)
2614 ; CHECK-P10-NEXT: blr
2616 ; CHECK-PREP10-LABEL: ld_cst_unalign64_uint64_t_int16_t:
2617 ; CHECK-PREP10: # %bb.0: # %entry
2618 ; CHECK-PREP10-NEXT: li r3, 29
2619 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
2620 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
2621 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
2622 ; CHECK-PREP10-NEXT: lha r3, 0(r3)
2623 ; CHECK-PREP10-NEXT: blr
2625 %0 = load i16, i16* inttoptr (i64 1000000000001 to i16*), align 2
2626 %conv = sext i16 %0 to i64
2630 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2631 define dso_local i64 @ld_cst_align64_uint64_t_int16_t() {
2632 ; CHECK-P10-LABEL: ld_cst_align64_uint64_t_int16_t:
2633 ; CHECK-P10: # %bb.0: # %entry
2634 ; CHECK-P10-NEXT: pli r3, 244140625
2635 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
2636 ; CHECK-P10-NEXT: lha r3, 0(r3)
2637 ; CHECK-P10-NEXT: blr
2639 ; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_int16_t:
2640 ; CHECK-PREP10: # %bb.0: # %entry
2641 ; CHECK-PREP10-NEXT: lis r3, 3725
2642 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
2643 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
2644 ; CHECK-PREP10-NEXT: lha r3, 0(r3)
2645 ; CHECK-PREP10-NEXT: blr
2647 %0 = load i16, i16* inttoptr (i64 1000000000000 to i16*), align 4096
2648 %conv = sext i16 %0 to i64
2652 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2653 define dso_local i64 @ld_0_uint64_t_uint32_t(i64 %ptr) {
2654 ; CHECK-LABEL: ld_0_uint64_t_uint32_t:
2655 ; CHECK: # %bb.0: # %entry
2656 ; CHECK-NEXT: lwz r3, 0(r3)
2659 %0 = inttoptr i64 %ptr to i32*
2660 %1 = load i32, i32* %0, align 4
2661 %conv = zext i32 %1 to i64
2665 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2666 define dso_local i64 @ld_unalign16_uint64_t_uint32_t(i8* nocapture readonly %ptr) {
2667 ; CHECK-LABEL: ld_unalign16_uint64_t_uint32_t:
2668 ; CHECK: # %bb.0: # %entry
2669 ; CHECK-NEXT: lwz r3, 1(r3)
2672 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1
2673 %0 = bitcast i8* %add.ptr to i32*
2674 %1 = load i32, i32* %0, align 4
2675 %conv = zext i32 %1 to i64
2679 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2680 define dso_local i64 @ld_align16_uint64_t_uint32_t(i8* nocapture readonly %ptr) {
2681 ; CHECK-LABEL: ld_align16_uint64_t_uint32_t:
2682 ; CHECK: # %bb.0: # %entry
2683 ; CHECK-NEXT: lwz r3, 8(r3)
2686 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
2687 %0 = bitcast i8* %add.ptr to i32*
2688 %1 = load i32, i32* %0, align 4
2689 %conv = zext i32 %1 to i64
2693 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2694 define dso_local i64 @ld_unalign32_uint64_t_uint32_t(i8* nocapture readonly %ptr) {
2695 ; CHECK-P10-LABEL: ld_unalign32_uint64_t_uint32_t:
2696 ; CHECK-P10: # %bb.0: # %entry
2697 ; CHECK-P10-NEXT: pli r4, 99999
2698 ; CHECK-P10-NEXT: lwzx r3, r3, r4
2699 ; CHECK-P10-NEXT: blr
2701 ; CHECK-PREP10-LABEL: ld_unalign32_uint64_t_uint32_t:
2702 ; CHECK-PREP10: # %bb.0: # %entry
2703 ; CHECK-PREP10-NEXT: lis r4, 1
2704 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
2705 ; CHECK-PREP10-NEXT: lwzx r3, r3, r4
2706 ; CHECK-PREP10-NEXT: blr
2708 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999
2709 %0 = bitcast i8* %add.ptr to i32*
2710 %1 = load i32, i32* %0, align 4
2711 %conv = zext i32 %1 to i64
2715 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2716 define dso_local i64 @ld_align32_uint64_t_uint32_t(i8* nocapture readonly %ptr) {
2717 ; CHECK-P10-LABEL: ld_align32_uint64_t_uint32_t:
2718 ; CHECK-P10: # %bb.0: # %entry
2719 ; CHECK-P10-NEXT: pli r4, 99999000
2720 ; CHECK-P10-NEXT: lwzx r3, r3, r4
2721 ; CHECK-P10-NEXT: blr
2723 ; CHECK-PREP10-LABEL: ld_align32_uint64_t_uint32_t:
2724 ; CHECK-PREP10: # %bb.0: # %entry
2725 ; CHECK-PREP10-NEXT: lis r4, 1525
2726 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
2727 ; CHECK-PREP10-NEXT: lwzx r3, r3, r4
2728 ; CHECK-PREP10-NEXT: blr
2730 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
2731 %0 = bitcast i8* %add.ptr to i32*
2732 %1 = load i32, i32* %0, align 4
2733 %conv = zext i32 %1 to i64
2737 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2738 define dso_local i64 @ld_unalign64_uint64_t_uint32_t(i8* nocapture readonly %ptr) {
2739 ; CHECK-P10-LABEL: ld_unalign64_uint64_t_uint32_t:
2740 ; CHECK-P10: # %bb.0: # %entry
2741 ; CHECK-P10-NEXT: pli r4, 232
2742 ; CHECK-P10-NEXT: pli r5, 3567587329
2743 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2744 ; CHECK-P10-NEXT: lwzx r3, r3, r5
2745 ; CHECK-P10-NEXT: blr
2747 ; CHECK-PREP10-LABEL: ld_unalign64_uint64_t_uint32_t:
2748 ; CHECK-PREP10: # %bb.0: # %entry
2749 ; CHECK-PREP10-NEXT: li r4, 29
2750 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2751 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2752 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2753 ; CHECK-PREP10-NEXT: lwzx r3, r3, r4
2754 ; CHECK-PREP10-NEXT: blr
2756 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
2757 %0 = bitcast i8* %add.ptr to i32*
2758 %1 = load i32, i32* %0, align 4
2759 %conv = zext i32 %1 to i64
2763 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2764 define dso_local i64 @ld_align64_uint64_t_uint32_t(i8* nocapture readonly %ptr) {
2765 ; CHECK-P10-LABEL: ld_align64_uint64_t_uint32_t:
2766 ; CHECK-P10: # %bb.0: # %entry
2767 ; CHECK-P10-NEXT: pli r4, 244140625
2768 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2769 ; CHECK-P10-NEXT: lwzx r3, r3, r4
2770 ; CHECK-P10-NEXT: blr
2772 ; CHECK-PREP10-LABEL: ld_align64_uint64_t_uint32_t:
2773 ; CHECK-PREP10: # %bb.0: # %entry
2774 ; CHECK-PREP10-NEXT: lis r4, 3725
2775 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2776 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2777 ; CHECK-PREP10-NEXT: lwzx r3, r3, r4
2778 ; CHECK-PREP10-NEXT: blr
2780 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
2781 %0 = bitcast i8* %add.ptr to i32*
2782 %1 = load i32, i32* %0, align 4
2783 %conv = zext i32 %1 to i64
2787 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2788 define dso_local i64 @ld_reg_uint64_t_uint32_t(i8* nocapture readonly %ptr, i64 %off) {
2789 ; CHECK-LABEL: ld_reg_uint64_t_uint32_t:
2790 ; CHECK: # %bb.0: # %entry
2791 ; CHECK-NEXT: lwzx r3, r3, r4
2794 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
2795 %0 = bitcast i8* %add.ptr to i32*
2796 %1 = load i32, i32* %0, align 4
2797 %conv = zext i32 %1 to i64
2801 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2802 define dso_local i64 @ld_or_uint64_t_uint32_t(i64 %ptr, i8 zeroext %off) {
2803 ; CHECK-LABEL: ld_or_uint64_t_uint32_t:
2804 ; CHECK: # %bb.0: # %entry
2805 ; CHECK-NEXT: or r3, r4, r3
2806 ; CHECK-NEXT: lwz r3, 0(r3)
2809 %conv = zext i8 %off to i64
2810 %or = or i64 %conv, %ptr
2811 %0 = inttoptr i64 %or to i32*
2812 %1 = load i32, i32* %0, align 4
2813 %conv1 = zext i32 %1 to i64
2817 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2818 define dso_local i64 @ld_or2_uint64_t_uint32_t(i64 %ptr, i8 zeroext %off) {
2819 ; CHECK-LABEL: ld_or2_uint64_t_uint32_t:
2820 ; CHECK: # %bb.0: # %entry
2821 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2822 ; CHECK-NEXT: lwzx r3, r3, r4
2825 %and = and i64 %ptr, -4096
2826 %conv = zext i8 %off to i64
2827 %or = or i64 %and, %conv
2828 %0 = inttoptr i64 %or to i32*
2829 %1 = load i32, i32* %0, align 4
2830 %conv1 = zext i32 %1 to i64
2834 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2835 define dso_local i64 @ld_not_disjoint16_uint64_t_uint32_t(i64 %ptr) {
2836 ; CHECK-LABEL: ld_not_disjoint16_uint64_t_uint32_t:
2837 ; CHECK: # %bb.0: # %entry
2838 ; CHECK-NEXT: ori r3, r3, 6
2839 ; CHECK-NEXT: lwz r3, 0(r3)
2842 %or = or i64 %ptr, 6
2843 %0 = inttoptr i64 %or to i32*
2844 %1 = load i32, i32* %0, align 4
2845 %conv = zext i32 %1 to i64
2849 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2850 define dso_local i64 @ld_disjoint_unalign16_uint64_t_uint32_t(i64 %ptr) {
2851 ; CHECK-LABEL: ld_disjoint_unalign16_uint64_t_uint32_t:
2852 ; CHECK: # %bb.0: # %entry
2853 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2854 ; CHECK-NEXT: lwz r3, 6(r3)
2857 %and = and i64 %ptr, -4096
2858 %or = or i64 %and, 6
2859 %0 = inttoptr i64 %or to i32*
2860 %1 = load i32, i32* %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_align16_uint64_t_uint32_t(i64 %ptr) {
2867 ; CHECK-LABEL: ld_disjoint_align16_uint64_t_uint32_t:
2868 ; CHECK: # %bb.0: # %entry
2869 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2870 ; CHECK-NEXT: lwz r3, 24(r3)
2873 %and = and i64 %ptr, -4096
2874 %or = or i64 %and, 24
2875 %0 = inttoptr i64 %or to i32*
2876 %1 = load i32, i32* %0, align 8
2877 %conv = zext i32 %1 to i64
2881 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2882 define dso_local i64 @ld_not_disjoint32_uint64_t_uint32_t(i64 %ptr) {
2883 ; CHECK-LABEL: ld_not_disjoint32_uint64_t_uint32_t:
2884 ; CHECK: # %bb.0: # %entry
2885 ; CHECK-NEXT: ori r3, r3, 34463
2886 ; CHECK-NEXT: oris r3, r3, 1
2887 ; CHECK-NEXT: lwz r3, 0(r3)
2890 %or = or i64 %ptr, 99999
2891 %0 = inttoptr i64 %or to i32*
2892 %1 = load i32, i32* %0, align 4
2893 %conv = zext i32 %1 to i64
2897 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2898 define dso_local i64 @ld_disjoint_unalign32_uint64_t_uint32_t(i64 %ptr) {
2899 ; CHECK-P10-LABEL: ld_disjoint_unalign32_uint64_t_uint32_t:
2900 ; CHECK-P10: # %bb.0: # %entry
2901 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
2902 ; CHECK-P10-NEXT: pli r4, 99999
2903 ; CHECK-P10-NEXT: lwzx r3, r3, r4
2904 ; CHECK-P10-NEXT: blr
2906 ; CHECK-PREP10-LABEL: ld_disjoint_unalign32_uint64_t_uint32_t:
2907 ; CHECK-PREP10: # %bb.0: # %entry
2908 ; CHECK-PREP10-NEXT: lis r4, 1
2909 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
2910 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
2911 ; CHECK-PREP10-NEXT: lwzx r3, r3, r4
2912 ; CHECK-PREP10-NEXT: blr
2914 %and = and i64 %ptr, -1048576
2915 %or = or i64 %and, 99999
2916 %0 = inttoptr i64 %or to i32*
2917 %1 = load i32, i32* %0, align 4
2918 %conv = zext i32 %1 to i64
2922 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2923 define dso_local i64 @ld_disjoint_align32_uint64_t_uint32_t(i64 %ptr) {
2924 ; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_uint32_t:
2925 ; CHECK-P10: # %bb.0: # %entry
2926 ; CHECK-P10-NEXT: lis r4, -15264
2927 ; CHECK-P10-NEXT: and r3, r3, r4
2928 ; CHECK-P10-NEXT: pli r4, 999990000
2929 ; CHECK-P10-NEXT: lwzx r3, r3, r4
2930 ; CHECK-P10-NEXT: blr
2932 ; CHECK-P9-LABEL: ld_disjoint_align32_uint64_t_uint32_t:
2933 ; CHECK-P9: # %bb.0: # %entry
2934 ; CHECK-P9-NEXT: lis r4, -15264
2935 ; CHECK-P9-NEXT: and r3, r3, r4
2936 ; CHECK-P9-NEXT: lis r4, 15258
2937 ; CHECK-P9-NEXT: ori r4, r4, 41712
2938 ; CHECK-P9-NEXT: lwzx r3, r3, r4
2939 ; CHECK-P9-NEXT: blr
2941 ; CHECK-P8-LABEL: ld_disjoint_align32_uint64_t_uint32_t:
2942 ; CHECK-P8: # %bb.0: # %entry
2943 ; CHECK-P8-NEXT: lis r4, -15264
2944 ; CHECK-P8-NEXT: lis r5, 15258
2945 ; CHECK-P8-NEXT: and r3, r3, r4
2946 ; CHECK-P8-NEXT: ori r4, r5, 41712
2947 ; CHECK-P8-NEXT: lwzx r3, r3, r4
2948 ; CHECK-P8-NEXT: blr
2950 %and = and i64 %ptr, -1000341504
2951 %or = or i64 %and, 999990000
2952 %0 = inttoptr i64 %or to i32*
2953 %1 = load i32, i32* %0, align 16
2954 %conv = zext i32 %1 to i64
2958 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2959 define dso_local i64 @ld_not_disjoint64_uint64_t_uint32_t(i64 %ptr) {
2960 ; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_uint32_t:
2961 ; CHECK-P10: # %bb.0: # %entry
2962 ; CHECK-P10-NEXT: pli r4, 232
2963 ; CHECK-P10-NEXT: pli r5, 3567587329
2964 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2965 ; CHECK-P10-NEXT: or r3, r3, r5
2966 ; CHECK-P10-NEXT: lwz r3, 0(r3)
2967 ; CHECK-P10-NEXT: blr
2969 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_uint32_t:
2970 ; CHECK-PREP10: # %bb.0: # %entry
2971 ; CHECK-PREP10-NEXT: li r4, 29
2972 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2973 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2974 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2975 ; CHECK-PREP10-NEXT: or r3, r3, r4
2976 ; CHECK-PREP10-NEXT: lwz r3, 0(r3)
2977 ; CHECK-PREP10-NEXT: blr
2979 %or = or i64 %ptr, 1000000000001
2980 %0 = inttoptr i64 %or to i32*
2981 %1 = load i32, i32* %0, align 4
2982 %conv = zext i32 %1 to i64
2986 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2987 define dso_local i64 @ld_disjoint_unalign64_uint64_t_uint32_t(i64 %ptr) {
2988 ; CHECK-P10-LABEL: ld_disjoint_unalign64_uint64_t_uint32_t:
2989 ; CHECK-P10: # %bb.0: # %entry
2990 ; CHECK-P10-NEXT: pli r4, 232
2991 ; CHECK-P10-NEXT: pli r5, 3567587329
2992 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
2993 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2994 ; CHECK-P10-NEXT: lwzx r3, r3, r5
2995 ; CHECK-P10-NEXT: blr
2997 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint64_t_uint32_t:
2998 ; CHECK-PREP10: # %bb.0: # %entry
2999 ; CHECK-PREP10-NEXT: li r4, 29
3000 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
3001 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
3002 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
3003 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
3004 ; CHECK-PREP10-NEXT: lwzx r3, r3, r4
3005 ; CHECK-PREP10-NEXT: blr
3007 %and = and i64 %ptr, -1099511627776
3008 %or = or i64 %and, 1000000000001
3009 %0 = inttoptr i64 %or to i32*
3010 %1 = load i32, i32* %0, align 4
3011 %conv = zext i32 %1 to i64
3015 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3016 define dso_local i64 @ld_disjoint_align64_uint64_t_uint32_t(i64 %ptr) {
3017 ; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_uint32_t:
3018 ; CHECK-P10: # %bb.0: # %entry
3019 ; CHECK-P10-NEXT: pli r4, 244140625
3020 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
3021 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
3022 ; CHECK-P10-NEXT: lwzx r3, r3, r4
3023 ; CHECK-P10-NEXT: blr
3025 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_uint32_t:
3026 ; CHECK-PREP10: # %bb.0: # %entry
3027 ; CHECK-PREP10-NEXT: lis r4, 3725
3028 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
3029 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
3030 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
3031 ; CHECK-PREP10-NEXT: lwzx r3, r3, r4
3032 ; CHECK-PREP10-NEXT: blr
3034 %and = and i64 %ptr, -1099511627776
3035 %or = or i64 %and, 1000000000000
3036 %0 = inttoptr i64 %or to i32*
3037 %1 = load i32, i32* %0, align 4096
3038 %conv = zext i32 %1 to i64
3042 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3043 define dso_local i64 @ld_cst_unalign16_uint64_t_uint32_t() {
3044 ; CHECK-LABEL: ld_cst_unalign16_uint64_t_uint32_t:
3045 ; CHECK: # %bb.0: # %entry
3046 ; CHECK-NEXT: lwz r3, 255(0)
3049 %0 = load i32, i32* inttoptr (i64 255 to i32*), align 4
3050 %conv = zext i32 %0 to i64
3054 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3055 define dso_local i64 @ld_cst_align16_uint64_t_uint32_t() {
3056 ; CHECK-LABEL: ld_cst_align16_uint64_t_uint32_t:
3057 ; CHECK: # %bb.0: # %entry
3058 ; CHECK-NEXT: lwz r3, 4080(0)
3061 %0 = load i32, i32* inttoptr (i64 4080 to i32*), align 16
3062 %conv = zext i32 %0 to i64
3066 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3067 define dso_local i64 @ld_cst_unalign32_uint64_t_uint32_t() {
3068 ; CHECK-LABEL: ld_cst_unalign32_uint64_t_uint32_t:
3069 ; CHECK: # %bb.0: # %entry
3070 ; CHECK-NEXT: lis r3, 2
3071 ; CHECK-NEXT: lwz r3, -31073(r3)
3074 %0 = load i32, i32* inttoptr (i64 99999 to i32*), align 4
3075 %conv = zext i32 %0 to i64
3079 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3080 define dso_local i64 @ld_cst_align32_uint64_t_uint32_t() {
3081 ; CHECK-LABEL: ld_cst_align32_uint64_t_uint32_t:
3082 ; CHECK: # %bb.0: # %entry
3083 ; CHECK-NEXT: lis r3, 153
3084 ; CHECK-NEXT: lwz r3, -27108(r3)
3087 %0 = load i32, i32* inttoptr (i64 9999900 to i32*), align 4
3088 %conv = zext i32 %0 to i64
3092 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3093 define dso_local i64 @ld_cst_unalign64_uint64_t_uint32_t() {
3094 ; CHECK-P10-LABEL: ld_cst_unalign64_uint64_t_uint32_t:
3095 ; CHECK-P10: # %bb.0: # %entry
3096 ; CHECK-P10-NEXT: pli r3, 232
3097 ; CHECK-P10-NEXT: pli r4, 3567587329
3098 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
3099 ; CHECK-P10-NEXT: lwz r3, 0(r4)
3100 ; CHECK-P10-NEXT: blr
3102 ; CHECK-PREP10-LABEL: ld_cst_unalign64_uint64_t_uint32_t:
3103 ; CHECK-PREP10: # %bb.0: # %entry
3104 ; CHECK-PREP10-NEXT: li r3, 29
3105 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
3106 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
3107 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
3108 ; CHECK-PREP10-NEXT: lwz r3, 0(r3)
3109 ; CHECK-PREP10-NEXT: blr
3111 %0 = load i32, i32* inttoptr (i64 1000000000001 to i32*), align 4
3112 %conv = zext i32 %0 to i64
3116 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3117 define dso_local i64 @ld_cst_align64_uint64_t_uint32_t() {
3118 ; CHECK-P10-LABEL: ld_cst_align64_uint64_t_uint32_t:
3119 ; CHECK-P10: # %bb.0: # %entry
3120 ; CHECK-P10-NEXT: pli r3, 244140625
3121 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
3122 ; CHECK-P10-NEXT: lwz r3, 0(r3)
3123 ; CHECK-P10-NEXT: blr
3125 ; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_uint32_t:
3126 ; CHECK-PREP10: # %bb.0: # %entry
3127 ; CHECK-PREP10-NEXT: lis r3, 3725
3128 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
3129 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
3130 ; CHECK-PREP10-NEXT: lwz r3, 0(r3)
3131 ; CHECK-PREP10-NEXT: blr
3133 %0 = load i32, i32* inttoptr (i64 1000000000000 to i32*), align 4096
3134 %conv = zext i32 %0 to i64
3138 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3139 define dso_local i64 @ld_0_uint64_t_int32_t(i64 %ptr) {
3140 ; CHECK-LABEL: ld_0_uint64_t_int32_t:
3141 ; CHECK: # %bb.0: # %entry
3142 ; CHECK-NEXT: lwa r3, 0(r3)
3145 %0 = inttoptr i64 %ptr to i32*
3146 %1 = load i32, i32* %0, align 4
3147 %conv = sext i32 %1 to i64
3151 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3152 define dso_local i64 @ld_unalign16_uint64_t_int32_t(i8* nocapture readonly %ptr) {
3153 ; CHECK-LABEL: ld_unalign16_uint64_t_int32_t:
3154 ; CHECK: # %bb.0: # %entry
3155 ; CHECK-NEXT: li r4, 1
3156 ; CHECK-NEXT: lwax r3, r3, r4
3159 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1
3160 %0 = bitcast i8* %add.ptr to i32*
3161 %1 = load i32, i32* %0, align 4
3162 %conv = sext i32 %1 to i64
3166 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3167 define dso_local i64 @ld_align16_uint64_t_int32_t(i8* nocapture readonly %ptr) {
3168 ; CHECK-LABEL: ld_align16_uint64_t_int32_t:
3169 ; CHECK: # %bb.0: # %entry
3170 ; CHECK-NEXT: lwa r3, 8(r3)
3173 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
3174 %0 = bitcast i8* %add.ptr to i32*
3175 %1 = load i32, i32* %0, align 4
3176 %conv = sext i32 %1 to i64
3180 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3181 define dso_local i64 @ld_unalign32_uint64_t_int32_t(i8* nocapture readonly %ptr) {
3182 ; CHECK-P10-LABEL: ld_unalign32_uint64_t_int32_t:
3183 ; CHECK-P10: # %bb.0: # %entry
3184 ; CHECK-P10-NEXT: pli r4, 99999
3185 ; CHECK-P10-NEXT: lwax r3, r3, r4
3186 ; CHECK-P10-NEXT: blr
3188 ; CHECK-PREP10-LABEL: ld_unalign32_uint64_t_int32_t:
3189 ; CHECK-PREP10: # %bb.0: # %entry
3190 ; CHECK-PREP10-NEXT: lis r4, 1
3191 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
3192 ; CHECK-PREP10-NEXT: lwax r3, r3, r4
3193 ; CHECK-PREP10-NEXT: blr
3195 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999
3196 %0 = bitcast i8* %add.ptr to i32*
3197 %1 = load i32, i32* %0, align 4
3198 %conv = sext i32 %1 to i64
3202 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3203 define dso_local i64 @ld_align32_uint64_t_int32_t(i8* nocapture readonly %ptr) {
3204 ; CHECK-P10-LABEL: ld_align32_uint64_t_int32_t:
3205 ; CHECK-P10: # %bb.0: # %entry
3206 ; CHECK-P10-NEXT: pli r4, 99999000
3207 ; CHECK-P10-NEXT: lwax r3, r3, r4
3208 ; CHECK-P10-NEXT: blr
3210 ; CHECK-PREP10-LABEL: ld_align32_uint64_t_int32_t:
3211 ; CHECK-PREP10: # %bb.0: # %entry
3212 ; CHECK-PREP10-NEXT: lis r4, 1525
3213 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
3214 ; CHECK-PREP10-NEXT: lwax r3, r3, r4
3215 ; CHECK-PREP10-NEXT: blr
3217 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
3218 %0 = bitcast i8* %add.ptr to i32*
3219 %1 = load i32, i32* %0, align 4
3220 %conv = sext i32 %1 to i64
3224 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3225 define dso_local i64 @ld_unalign64_uint64_t_int32_t(i8* nocapture readonly %ptr) {
3226 ; CHECK-P10-LABEL: ld_unalign64_uint64_t_int32_t:
3227 ; CHECK-P10: # %bb.0: # %entry
3228 ; CHECK-P10-NEXT: pli r4, 232
3229 ; CHECK-P10-NEXT: pli r5, 3567587329
3230 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
3231 ; CHECK-P10-NEXT: lwax r3, r3, r5
3232 ; CHECK-P10-NEXT: blr
3234 ; CHECK-PREP10-LABEL: ld_unalign64_uint64_t_int32_t:
3235 ; CHECK-PREP10: # %bb.0: # %entry
3236 ; CHECK-PREP10-NEXT: li r4, 29
3237 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
3238 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
3239 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
3240 ; CHECK-PREP10-NEXT: lwax r3, r3, r4
3241 ; CHECK-PREP10-NEXT: blr
3243 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
3244 %0 = bitcast i8* %add.ptr to i32*
3245 %1 = load i32, i32* %0, align 4
3246 %conv = sext i32 %1 to i64
3250 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3251 define dso_local i64 @ld_align64_uint64_t_int32_t(i8* nocapture readonly %ptr) {
3252 ; CHECK-P10-LABEL: ld_align64_uint64_t_int32_t:
3253 ; CHECK-P10: # %bb.0: # %entry
3254 ; CHECK-P10-NEXT: pli r4, 244140625
3255 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
3256 ; CHECK-P10-NEXT: lwax r3, r3, r4
3257 ; CHECK-P10-NEXT: blr
3259 ; CHECK-PREP10-LABEL: ld_align64_uint64_t_int32_t:
3260 ; CHECK-PREP10: # %bb.0: # %entry
3261 ; CHECK-PREP10-NEXT: lis r4, 3725
3262 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
3263 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
3264 ; CHECK-PREP10-NEXT: lwax r3, r3, r4
3265 ; CHECK-PREP10-NEXT: blr
3267 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
3268 %0 = bitcast i8* %add.ptr to i32*
3269 %1 = load i32, i32* %0, align 4
3270 %conv = sext i32 %1 to i64
3274 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3275 define dso_local i64 @ld_reg_uint64_t_int32_t(i8* nocapture readonly %ptr, i64 %off) {
3276 ; CHECK-LABEL: ld_reg_uint64_t_int32_t:
3277 ; CHECK: # %bb.0: # %entry
3278 ; CHECK-NEXT: lwax r3, r3, r4
3281 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
3282 %0 = bitcast i8* %add.ptr to i32*
3283 %1 = load i32, i32* %0, align 4
3284 %conv = sext i32 %1 to i64
3288 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3289 define dso_local i64 @ld_or_uint64_t_int32_t(i64 %ptr, i8 zeroext %off) {
3290 ; CHECK-LABEL: ld_or_uint64_t_int32_t:
3291 ; CHECK: # %bb.0: # %entry
3292 ; CHECK-NEXT: or r3, r4, r3
3293 ; CHECK-NEXT: lwa r3, 0(r3)
3296 %conv = zext i8 %off to i64
3297 %or = or i64 %conv, %ptr
3298 %0 = inttoptr i64 %or to i32*
3299 %1 = load i32, i32* %0, align 4
3300 %conv1 = sext i32 %1 to i64
3304 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3305 define dso_local i64 @ld_or2_uint64_t_int32_t(i64 %ptr, i8 zeroext %off) {
3306 ; CHECK-LABEL: ld_or2_uint64_t_int32_t:
3307 ; CHECK: # %bb.0: # %entry
3308 ; CHECK-NEXT: rldicr r3, r3, 0, 51
3309 ; CHECK-NEXT: lwax r3, r3, r4
3312 %and = and i64 %ptr, -4096
3313 %conv = zext i8 %off to i64
3314 %or = or i64 %and, %conv
3315 %0 = inttoptr i64 %or to i32*
3316 %1 = load i32, i32* %0, align 4
3317 %conv1 = sext i32 %1 to i64
3321 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3322 define dso_local i64 @ld_not_disjoint16_uint64_t_int32_t(i64 %ptr) {
3323 ; CHECK-LABEL: ld_not_disjoint16_uint64_t_int32_t:
3324 ; CHECK: # %bb.0: # %entry
3325 ; CHECK-NEXT: ori r3, r3, 6
3326 ; CHECK-NEXT: lwa r3, 0(r3)
3329 %or = or i64 %ptr, 6
3330 %0 = inttoptr i64 %or to i32*
3331 %1 = load i32, i32* %0, align 4
3332 %conv = sext i32 %1 to i64
3336 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3337 define dso_local i64 @ld_disjoint_unalign16_uint64_t_int32_t(i64 %ptr) {
3338 ; CHECK-P10-LABEL: ld_disjoint_unalign16_uint64_t_int32_t:
3339 ; CHECK-P10: # %bb.0: # %entry
3340 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
3341 ; CHECK-P10-NEXT: li r4, 6
3342 ; CHECK-P10-NEXT: lwax r3, r3, r4
3343 ; CHECK-P10-NEXT: blr
3345 ; CHECK-P9-LABEL: ld_disjoint_unalign16_uint64_t_int32_t:
3346 ; CHECK-P9: # %bb.0: # %entry
3347 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
3348 ; CHECK-P9-NEXT: li r4, 6
3349 ; CHECK-P9-NEXT: lwax r3, r3, r4
3350 ; CHECK-P9-NEXT: blr
3352 ; CHECK-P8-LABEL: ld_disjoint_unalign16_uint64_t_int32_t:
3353 ; CHECK-P8: # %bb.0: # %entry
3354 ; CHECK-P8-NEXT: li r4, 6
3355 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
3356 ; CHECK-P8-NEXT: lwax r3, r3, r4
3357 ; CHECK-P8-NEXT: blr
3359 %and = and i64 %ptr, -4096
3360 %or = or i64 %and, 6
3361 %0 = inttoptr i64 %or to i32*
3362 %1 = load i32, i32* %0, align 4
3363 %conv = sext i32 %1 to i64
3367 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3368 define dso_local i64 @ld_disjoint_align16_uint64_t_int32_t(i64 %ptr) {
3369 ; CHECK-LABEL: ld_disjoint_align16_uint64_t_int32_t:
3370 ; CHECK: # %bb.0: # %entry
3371 ; CHECK-NEXT: rldicr r3, r3, 0, 51
3372 ; CHECK-NEXT: lwa r3, 24(r3)
3375 %and = and i64 %ptr, -4096
3376 %or = or i64 %and, 24
3377 %0 = inttoptr i64 %or to i32*
3378 %1 = load i32, i32* %0, align 8
3379 %conv = sext i32 %1 to i64
3383 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3384 define dso_local i64 @ld_not_disjoint32_uint64_t_int32_t(i64 %ptr) {
3385 ; CHECK-LABEL: ld_not_disjoint32_uint64_t_int32_t:
3386 ; CHECK: # %bb.0: # %entry
3387 ; CHECK-NEXT: ori r3, r3, 34463
3388 ; CHECK-NEXT: oris r3, r3, 1
3389 ; CHECK-NEXT: lwa r3, 0(r3)
3392 %or = or i64 %ptr, 99999
3393 %0 = inttoptr i64 %or to i32*
3394 %1 = load i32, i32* %0, align 4
3395 %conv = sext i32 %1 to i64
3399 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3400 define dso_local i64 @ld_disjoint_unalign32_uint64_t_int32_t(i64 %ptr) {
3401 ; CHECK-P10-LABEL: ld_disjoint_unalign32_uint64_t_int32_t:
3402 ; CHECK-P10: # %bb.0: # %entry
3403 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
3404 ; CHECK-P10-NEXT: pli r4, 99999
3405 ; CHECK-P10-NEXT: lwax r3, r3, r4
3406 ; CHECK-P10-NEXT: blr
3408 ; CHECK-PREP10-LABEL: ld_disjoint_unalign32_uint64_t_int32_t:
3409 ; CHECK-PREP10: # %bb.0: # %entry
3410 ; CHECK-PREP10-NEXT: lis r4, 1
3411 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
3412 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
3413 ; CHECK-PREP10-NEXT: lwax r3, r3, r4
3414 ; CHECK-PREP10-NEXT: blr
3416 %and = and i64 %ptr, -1048576
3417 %or = or i64 %and, 99999
3418 %0 = inttoptr i64 %or to i32*
3419 %1 = load i32, i32* %0, align 4
3420 %conv = sext i32 %1 to i64
3424 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3425 define dso_local i64 @ld_disjoint_align32_uint64_t_int32_t(i64 %ptr) {
3426 ; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_int32_t:
3427 ; CHECK-P10: # %bb.0: # %entry
3428 ; CHECK-P10-NEXT: lis r4, -15264
3429 ; CHECK-P10-NEXT: and r3, r3, r4
3430 ; CHECK-P10-NEXT: pli r4, 999990000
3431 ; CHECK-P10-NEXT: lwax r3, r3, r4
3432 ; CHECK-P10-NEXT: blr
3434 ; CHECK-P9-LABEL: ld_disjoint_align32_uint64_t_int32_t:
3435 ; CHECK-P9: # %bb.0: # %entry
3436 ; CHECK-P9-NEXT: lis r4, -15264
3437 ; CHECK-P9-NEXT: and r3, r3, r4
3438 ; CHECK-P9-NEXT: lis r4, 15258
3439 ; CHECK-P9-NEXT: ori r4, r4, 41712
3440 ; CHECK-P9-NEXT: lwax r3, r3, r4
3441 ; CHECK-P9-NEXT: blr
3443 ; CHECK-P8-LABEL: ld_disjoint_align32_uint64_t_int32_t:
3444 ; CHECK-P8: # %bb.0: # %entry
3445 ; CHECK-P8-NEXT: lis r4, -15264
3446 ; CHECK-P8-NEXT: lis r5, 15258
3447 ; CHECK-P8-NEXT: and r3, r3, r4
3448 ; CHECK-P8-NEXT: ori r4, r5, 41712
3449 ; CHECK-P8-NEXT: lwax r3, r3, r4
3450 ; CHECK-P8-NEXT: blr
3452 %and = and i64 %ptr, -1000341504
3453 %or = or i64 %and, 999990000
3454 %0 = inttoptr i64 %or to i32*
3455 %1 = load i32, i32* %0, align 16
3456 %conv = sext i32 %1 to i64
3460 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3461 define dso_local i64 @ld_not_disjoint64_uint64_t_int32_t(i64 %ptr) {
3462 ; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_int32_t:
3463 ; CHECK-P10: # %bb.0: # %entry
3464 ; CHECK-P10-NEXT: pli r4, 232
3465 ; CHECK-P10-NEXT: pli r5, 3567587329
3466 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
3467 ; CHECK-P10-NEXT: or r3, r3, r5
3468 ; CHECK-P10-NEXT: lwa r3, 0(r3)
3469 ; CHECK-P10-NEXT: blr
3471 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_int32_t:
3472 ; CHECK-PREP10: # %bb.0: # %entry
3473 ; CHECK-PREP10-NEXT: li r4, 29
3474 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
3475 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
3476 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
3477 ; CHECK-PREP10-NEXT: or r3, r3, r4
3478 ; CHECK-PREP10-NEXT: lwa r3, 0(r3)
3479 ; CHECK-PREP10-NEXT: blr
3481 %or = or i64 %ptr, 1000000000001
3482 %0 = inttoptr i64 %or to i32*
3483 %1 = load i32, i32* %0, align 4
3484 %conv = sext i32 %1 to i64
3488 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3489 define dso_local i64 @ld_disjoint_unalign64_uint64_t_int32_t(i64 %ptr) {
3490 ; CHECK-P10-LABEL: ld_disjoint_unalign64_uint64_t_int32_t:
3491 ; CHECK-P10: # %bb.0: # %entry
3492 ; CHECK-P10-NEXT: pli r4, 232
3493 ; CHECK-P10-NEXT: pli r5, 3567587329
3494 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
3495 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
3496 ; CHECK-P10-NEXT: lwax r3, r3, r5
3497 ; CHECK-P10-NEXT: blr
3499 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint64_t_int32_t:
3500 ; CHECK-PREP10: # %bb.0: # %entry
3501 ; CHECK-PREP10-NEXT: li r4, 29
3502 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
3503 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
3504 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
3505 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
3506 ; CHECK-PREP10-NEXT: lwax r3, r3, r4
3507 ; CHECK-PREP10-NEXT: blr
3509 %and = and i64 %ptr, -1099511627776
3510 %or = or i64 %and, 1000000000001
3511 %0 = inttoptr i64 %or to i32*
3512 %1 = load i32, i32* %0, align 4
3513 %conv = sext i32 %1 to i64
3517 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3518 define dso_local i64 @ld_disjoint_align64_uint64_t_int32_t(i64 %ptr) {
3519 ; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_int32_t:
3520 ; CHECK-P10: # %bb.0: # %entry
3521 ; CHECK-P10-NEXT: pli r4, 244140625
3522 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
3523 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
3524 ; CHECK-P10-NEXT: lwax r3, r3, r4
3525 ; CHECK-P10-NEXT: blr
3527 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_int32_t:
3528 ; CHECK-PREP10: # %bb.0: # %entry
3529 ; CHECK-PREP10-NEXT: lis r4, 3725
3530 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
3531 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
3532 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
3533 ; CHECK-PREP10-NEXT: lwax r3, r3, r4
3534 ; CHECK-PREP10-NEXT: blr
3536 %and = and i64 %ptr, -1099511627776
3537 %or = or i64 %and, 1000000000000
3538 %0 = inttoptr i64 %or to i32*
3539 %1 = load i32, i32* %0, align 4096
3540 %conv = sext i32 %1 to i64
3544 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3545 define dso_local i64 @ld_cst_unalign16_uint64_t_int32_t() {
3546 ; CHECK-LABEL: ld_cst_unalign16_uint64_t_int32_t:
3547 ; CHECK: # %bb.0: # %entry
3548 ; CHECK-NEXT: li r3, 255
3549 ; CHECK-NEXT: lwa r3, 0(r3)
3552 %0 = load i32, i32* inttoptr (i64 255 to i32*), align 4
3553 %conv = sext i32 %0 to i64
3557 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3558 define dso_local i64 @ld_cst_align16_uint64_t_int32_t() {
3559 ; CHECK-LABEL: ld_cst_align16_uint64_t_int32_t:
3560 ; CHECK: # %bb.0: # %entry
3561 ; CHECK-NEXT: lwa r3, 4080(0)
3564 %0 = load i32, i32* inttoptr (i64 4080 to i32*), align 16
3565 %conv = sext i32 %0 to i64
3569 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3570 define dso_local i64 @ld_cst_unalign32_uint64_t_int32_t() {
3571 ; CHECK-P10-LABEL: ld_cst_unalign32_uint64_t_int32_t:
3572 ; CHECK-P10: # %bb.0: # %entry
3573 ; CHECK-P10-NEXT: pli r3, 99999
3574 ; CHECK-P10-NEXT: lwa r3, 0(r3)
3575 ; CHECK-P10-NEXT: blr
3577 ; CHECK-PREP10-LABEL: ld_cst_unalign32_uint64_t_int32_t:
3578 ; CHECK-PREP10: # %bb.0: # %entry
3579 ; CHECK-PREP10-NEXT: lis r3, 1
3580 ; CHECK-PREP10-NEXT: ori r3, r3, 34463
3581 ; CHECK-PREP10-NEXT: lwa r3, 0(r3)
3582 ; CHECK-PREP10-NEXT: blr
3584 %0 = load i32, i32* inttoptr (i64 99999 to i32*), align 4
3585 %conv = sext i32 %0 to i64
3589 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3590 define dso_local i64 @ld_cst_align32_uint64_t_int32_t() {
3591 ; CHECK-LABEL: ld_cst_align32_uint64_t_int32_t:
3592 ; CHECK: # %bb.0: # %entry
3593 ; CHECK-NEXT: lis r3, 153
3594 ; CHECK-NEXT: lwa r3, -27108(r3)
3597 %0 = load i32, i32* inttoptr (i64 9999900 to i32*), align 4
3598 %conv = sext i32 %0 to i64
3602 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3603 define dso_local i64 @ld_cst_unalign64_uint64_t_int32_t() {
3604 ; CHECK-P10-LABEL: ld_cst_unalign64_uint64_t_int32_t:
3605 ; CHECK-P10: # %bb.0: # %entry
3606 ; CHECK-P10-NEXT: pli r3, 232
3607 ; CHECK-P10-NEXT: pli r4, 3567587329
3608 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
3609 ; CHECK-P10-NEXT: lwa r3, 0(r4)
3610 ; CHECK-P10-NEXT: blr
3612 ; CHECK-PREP10-LABEL: ld_cst_unalign64_uint64_t_int32_t:
3613 ; CHECK-PREP10: # %bb.0: # %entry
3614 ; CHECK-PREP10-NEXT: li r3, 29
3615 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
3616 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
3617 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
3618 ; CHECK-PREP10-NEXT: lwa r3, 0(r3)
3619 ; CHECK-PREP10-NEXT: blr
3621 %0 = load i32, i32* inttoptr (i64 1000000000001 to i32*), align 4
3622 %conv = sext i32 %0 to i64
3626 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3627 define dso_local i64 @ld_cst_align64_uint64_t_int32_t() {
3628 ; CHECK-P10-LABEL: ld_cst_align64_uint64_t_int32_t:
3629 ; CHECK-P10: # %bb.0: # %entry
3630 ; CHECK-P10-NEXT: pli r3, 244140625
3631 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
3632 ; CHECK-P10-NEXT: lwa r3, 0(r3)
3633 ; CHECK-P10-NEXT: blr
3635 ; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_int32_t:
3636 ; CHECK-PREP10: # %bb.0: # %entry
3637 ; CHECK-PREP10-NEXT: lis r3, 3725
3638 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
3639 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
3640 ; CHECK-PREP10-NEXT: lwa r3, 0(r3)
3641 ; CHECK-PREP10-NEXT: blr
3643 %0 = load i32, i32* inttoptr (i64 1000000000000 to i32*), align 4096
3644 %conv = sext i32 %0 to i64
3648 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3649 define dso_local i64 @ld_0_uint64_t_uint64_t(i64 %ptr) {
3650 ; CHECK-LABEL: ld_0_uint64_t_uint64_t:
3651 ; CHECK: # %bb.0: # %entry
3652 ; CHECK-NEXT: ld r3, 0(r3)
3655 %0 = inttoptr i64 %ptr to i64*
3656 %1 = load i64, i64* %0, align 8
3660 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3661 define dso_local i64 @ld_unalign16_uint64_t_uint64_t(i8* nocapture readonly %ptr) {
3662 ; CHECK-LABEL: ld_unalign16_uint64_t_uint64_t:
3663 ; CHECK: # %bb.0: # %entry
3664 ; CHECK-NEXT: li r4, 1
3665 ; CHECK-NEXT: ldx r3, r3, r4
3668 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1
3669 %0 = bitcast i8* %add.ptr to i64*
3670 %1 = load i64, i64* %0, align 8
3674 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3675 define dso_local i64 @ld_align16_uint64_t_uint64_t(i8* nocapture readonly %ptr) {
3676 ; CHECK-LABEL: ld_align16_uint64_t_uint64_t:
3677 ; CHECK: # %bb.0: # %entry
3678 ; CHECK-NEXT: ld r3, 8(r3)
3681 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
3682 %0 = bitcast i8* %add.ptr to i64*
3683 %1 = load i64, i64* %0, align 8
3687 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3688 define dso_local i64 @ld_unalign32_uint64_t_uint64_t(i8* nocapture readonly %ptr) {
3689 ; CHECK-P10-LABEL: ld_unalign32_uint64_t_uint64_t:
3690 ; CHECK-P10: # %bb.0: # %entry
3691 ; CHECK-P10-NEXT: pli r4, 99999
3692 ; CHECK-P10-NEXT: ldx r3, r3, r4
3693 ; CHECK-P10-NEXT: blr
3695 ; CHECK-PREP10-LABEL: ld_unalign32_uint64_t_uint64_t:
3696 ; CHECK-PREP10: # %bb.0: # %entry
3697 ; CHECK-PREP10-NEXT: lis r4, 1
3698 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
3699 ; CHECK-PREP10-NEXT: ldx r3, r3, r4
3700 ; CHECK-PREP10-NEXT: blr
3702 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999
3703 %0 = bitcast i8* %add.ptr to i64*
3704 %1 = load i64, i64* %0, align 8
3708 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3709 define dso_local i64 @ld_align32_uint64_t_uint64_t(i8* nocapture readonly %ptr) {
3710 ; CHECK-P10-LABEL: ld_align32_uint64_t_uint64_t:
3711 ; CHECK-P10: # %bb.0: # %entry
3712 ; CHECK-P10-NEXT: pli r4, 99999000
3713 ; CHECK-P10-NEXT: ldx r3, r3, r4
3714 ; CHECK-P10-NEXT: blr
3716 ; CHECK-PREP10-LABEL: ld_align32_uint64_t_uint64_t:
3717 ; CHECK-PREP10: # %bb.0: # %entry
3718 ; CHECK-PREP10-NEXT: lis r4, 1525
3719 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
3720 ; CHECK-PREP10-NEXT: ldx r3, r3, r4
3721 ; CHECK-PREP10-NEXT: blr
3723 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
3724 %0 = bitcast i8* %add.ptr to i64*
3725 %1 = load i64, i64* %0, align 8
3729 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3730 define dso_local i64 @ld_unalign64_uint64_t_uint64_t(i8* nocapture readonly %ptr) {
3731 ; CHECK-P10-LABEL: ld_unalign64_uint64_t_uint64_t:
3732 ; CHECK-P10: # %bb.0: # %entry
3733 ; CHECK-P10-NEXT: pli r4, 232
3734 ; CHECK-P10-NEXT: pli r5, 3567587329
3735 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
3736 ; CHECK-P10-NEXT: ldx r3, r3, r5
3737 ; CHECK-P10-NEXT: blr
3739 ; CHECK-PREP10-LABEL: ld_unalign64_uint64_t_uint64_t:
3740 ; CHECK-PREP10: # %bb.0: # %entry
3741 ; CHECK-PREP10-NEXT: li r4, 29
3742 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
3743 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
3744 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
3745 ; CHECK-PREP10-NEXT: ldx r3, r3, r4
3746 ; CHECK-PREP10-NEXT: blr
3748 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
3749 %0 = bitcast i8* %add.ptr to i64*
3750 %1 = load i64, i64* %0, align 8
3754 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3755 define dso_local i64 @ld_align64_uint64_t_uint64_t(i8* nocapture readonly %ptr) {
3756 ; CHECK-P10-LABEL: ld_align64_uint64_t_uint64_t:
3757 ; CHECK-P10: # %bb.0: # %entry
3758 ; CHECK-P10-NEXT: pli r4, 244140625
3759 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
3760 ; CHECK-P10-NEXT: ldx r3, r3, r4
3761 ; CHECK-P10-NEXT: blr
3763 ; CHECK-PREP10-LABEL: ld_align64_uint64_t_uint64_t:
3764 ; CHECK-PREP10: # %bb.0: # %entry
3765 ; CHECK-PREP10-NEXT: lis r4, 3725
3766 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
3767 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
3768 ; CHECK-PREP10-NEXT: ldx r3, r3, r4
3769 ; CHECK-PREP10-NEXT: blr
3771 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
3772 %0 = bitcast i8* %add.ptr to i64*
3773 %1 = load i64, i64* %0, align 8
3777 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3778 define dso_local i64 @ld_reg_uint64_t_uint64_t(i8* nocapture readonly %ptr, i64 %off) {
3779 ; CHECK-LABEL: ld_reg_uint64_t_uint64_t:
3780 ; CHECK: # %bb.0: # %entry
3781 ; CHECK-NEXT: ldx r3, r3, r4
3784 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
3785 %0 = bitcast i8* %add.ptr to i64*
3786 %1 = load i64, i64* %0, align 8
3790 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3791 define dso_local i64 @ld_or_uint64_t_uint64_t(i64 %ptr, i8 zeroext %off) {
3792 ; CHECK-LABEL: ld_or_uint64_t_uint64_t:
3793 ; CHECK: # %bb.0: # %entry
3794 ; CHECK-NEXT: or r3, r4, r3
3795 ; CHECK-NEXT: ld r3, 0(r3)
3798 %conv = zext i8 %off to i64
3799 %or = or i64 %conv, %ptr
3800 %0 = inttoptr i64 %or to i64*
3801 %1 = load i64, i64* %0, align 8
3805 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3806 define dso_local i64 @ld_or2_uint64_t_uint64_t(i64 %ptr, i8 zeroext %off) {
3807 ; CHECK-LABEL: ld_or2_uint64_t_uint64_t:
3808 ; CHECK: # %bb.0: # %entry
3809 ; CHECK-NEXT: rldicr r3, r3, 0, 51
3810 ; CHECK-NEXT: ldx r3, r3, r4
3813 %and = and i64 %ptr, -4096
3814 %conv = zext i8 %off to i64
3815 %or = or i64 %and, %conv
3816 %0 = inttoptr i64 %or to i64*
3817 %1 = load i64, i64* %0, align 8
3821 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3822 define dso_local i64 @ld_not_disjoint16_uint64_t_uint64_t(i64 %ptr) {
3823 ; CHECK-LABEL: ld_not_disjoint16_uint64_t_uint64_t:
3824 ; CHECK: # %bb.0: # %entry
3825 ; CHECK-NEXT: ori r3, r3, 6
3826 ; CHECK-NEXT: ld r3, 0(r3)
3829 %or = or i64 %ptr, 6
3830 %0 = inttoptr i64 %or to i64*
3831 %1 = load i64, i64* %0, align 8
3835 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3836 define dso_local i64 @ld_disjoint_unalign16_uint64_t_uint64_t(i64 %ptr) {
3837 ; CHECK-P10-LABEL: ld_disjoint_unalign16_uint64_t_uint64_t:
3838 ; CHECK-P10: # %bb.0: # %entry
3839 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
3840 ; CHECK-P10-NEXT: li r4, 6
3841 ; CHECK-P10-NEXT: ldx r3, r3, r4
3842 ; CHECK-P10-NEXT: blr
3844 ; CHECK-P9-LABEL: ld_disjoint_unalign16_uint64_t_uint64_t:
3845 ; CHECK-P9: # %bb.0: # %entry
3846 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
3847 ; CHECK-P9-NEXT: li r4, 6
3848 ; CHECK-P9-NEXT: ldx r3, r3, r4
3849 ; CHECK-P9-NEXT: blr
3851 ; CHECK-P8-LABEL: ld_disjoint_unalign16_uint64_t_uint64_t:
3852 ; CHECK-P8: # %bb.0: # %entry
3853 ; CHECK-P8-NEXT: li r4, 6
3854 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
3855 ; CHECK-P8-NEXT: ldx r3, r3, r4
3856 ; CHECK-P8-NEXT: blr
3858 %and = and i64 %ptr, -4096
3859 %or = or i64 %and, 6
3860 %0 = inttoptr i64 %or to i64*
3861 %1 = load i64, i64* %0, align 8
3865 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3866 define dso_local i64 @ld_disjoint_align16_uint64_t_uint64_t(i64 %ptr) {
3867 ; CHECK-LABEL: ld_disjoint_align16_uint64_t_uint64_t:
3868 ; CHECK: # %bb.0: # %entry
3869 ; CHECK-NEXT: rldicr r3, r3, 0, 51
3870 ; CHECK-NEXT: ld r3, 24(r3)
3873 %and = and i64 %ptr, -4096
3874 %or = or i64 %and, 24
3875 %0 = inttoptr i64 %or to i64*
3876 %1 = load i64, i64* %0, align 8
3880 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3881 define dso_local i64 @ld_not_disjoint32_uint64_t_uint64_t(i64 %ptr) {
3882 ; CHECK-LABEL: ld_not_disjoint32_uint64_t_uint64_t:
3883 ; CHECK: # %bb.0: # %entry
3884 ; CHECK-NEXT: ori r3, r3, 34463
3885 ; CHECK-NEXT: oris r3, r3, 1
3886 ; CHECK-NEXT: ld r3, 0(r3)
3889 %or = or i64 %ptr, 99999
3890 %0 = inttoptr i64 %or to i64*
3891 %1 = load i64, i64* %0, align 8
3895 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3896 define dso_local i64 @ld_disjoint_unalign32_uint64_t_uint64_t(i64 %ptr) {
3897 ; CHECK-P10-LABEL: ld_disjoint_unalign32_uint64_t_uint64_t:
3898 ; CHECK-P10: # %bb.0: # %entry
3899 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
3900 ; CHECK-P10-NEXT: pli r4, 99999
3901 ; CHECK-P10-NEXT: ldx r3, r3, r4
3902 ; CHECK-P10-NEXT: blr
3904 ; CHECK-PREP10-LABEL: ld_disjoint_unalign32_uint64_t_uint64_t:
3905 ; CHECK-PREP10: # %bb.0: # %entry
3906 ; CHECK-PREP10-NEXT: lis r4, 1
3907 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
3908 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
3909 ; CHECK-PREP10-NEXT: ldx r3, r3, r4
3910 ; CHECK-PREP10-NEXT: blr
3912 %and = and i64 %ptr, -1048576
3913 %or = or i64 %and, 99999
3914 %0 = inttoptr i64 %or to i64*
3915 %1 = load i64, i64* %0, align 8
3919 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3920 define dso_local i64 @ld_disjoint_align32_uint64_t_uint64_t(i64 %ptr) {
3921 ; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_uint64_t:
3922 ; CHECK-P10: # %bb.0: # %entry
3923 ; CHECK-P10-NEXT: lis r4, -15264
3924 ; CHECK-P10-NEXT: and r3, r3, r4
3925 ; CHECK-P10-NEXT: pli r4, 999990000
3926 ; CHECK-P10-NEXT: ldx r3, r3, r4
3927 ; CHECK-P10-NEXT: blr
3929 ; CHECK-P9-LABEL: ld_disjoint_align32_uint64_t_uint64_t:
3930 ; CHECK-P9: # %bb.0: # %entry
3931 ; CHECK-P9-NEXT: lis r4, -15264
3932 ; CHECK-P9-NEXT: and r3, r3, r4
3933 ; CHECK-P9-NEXT: lis r4, 15258
3934 ; CHECK-P9-NEXT: ori r4, r4, 41712
3935 ; CHECK-P9-NEXT: ldx r3, r3, r4
3936 ; CHECK-P9-NEXT: blr
3938 ; CHECK-P8-LABEL: ld_disjoint_align32_uint64_t_uint64_t:
3939 ; CHECK-P8: # %bb.0: # %entry
3940 ; CHECK-P8-NEXT: lis r4, -15264
3941 ; CHECK-P8-NEXT: lis r5, 15258
3942 ; CHECK-P8-NEXT: and r3, r3, r4
3943 ; CHECK-P8-NEXT: ori r4, r5, 41712
3944 ; CHECK-P8-NEXT: ldx r3, r3, r4
3945 ; CHECK-P8-NEXT: blr
3947 %and = and i64 %ptr, -1000341504
3948 %or = or i64 %and, 999990000
3949 %0 = inttoptr i64 %or to i64*
3950 %1 = load i64, i64* %0, align 16
3954 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3955 define dso_local i64 @ld_not_disjoint64_uint64_t_uint64_t(i64 %ptr) {
3956 ; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_uint64_t:
3957 ; CHECK-P10: # %bb.0: # %entry
3958 ; CHECK-P10-NEXT: pli r4, 232
3959 ; CHECK-P10-NEXT: pli r5, 3567587329
3960 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
3961 ; CHECK-P10-NEXT: or r3, r3, r5
3962 ; CHECK-P10-NEXT: ld r3, 0(r3)
3963 ; CHECK-P10-NEXT: blr
3965 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_uint64_t:
3966 ; CHECK-PREP10: # %bb.0: # %entry
3967 ; CHECK-PREP10-NEXT: li r4, 29
3968 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
3969 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
3970 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
3971 ; CHECK-PREP10-NEXT: or r3, r3, r4
3972 ; CHECK-PREP10-NEXT: ld r3, 0(r3)
3973 ; CHECK-PREP10-NEXT: blr
3975 %or = or i64 %ptr, 1000000000001
3976 %0 = inttoptr i64 %or to i64*
3977 %1 = load i64, i64* %0, align 8
3981 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3982 define dso_local i64 @ld_disjoint_unalign64_uint64_t_uint64_t(i64 %ptr) {
3983 ; CHECK-P10-LABEL: ld_disjoint_unalign64_uint64_t_uint64_t:
3984 ; CHECK-P10: # %bb.0: # %entry
3985 ; CHECK-P10-NEXT: pli r4, 232
3986 ; CHECK-P10-NEXT: pli r5, 3567587329
3987 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
3988 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
3989 ; CHECK-P10-NEXT: ldx r3, r3, r5
3990 ; CHECK-P10-NEXT: blr
3992 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint64_t_uint64_t:
3993 ; CHECK-PREP10: # %bb.0: # %entry
3994 ; CHECK-PREP10-NEXT: li r4, 29
3995 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
3996 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
3997 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
3998 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
3999 ; CHECK-PREP10-NEXT: ldx r3, r3, r4
4000 ; CHECK-PREP10-NEXT: blr
4002 %and = and i64 %ptr, -1099511627776
4003 %or = or i64 %and, 1000000000001
4004 %0 = inttoptr i64 %or to i64*
4005 %1 = load i64, i64* %0, align 8
4009 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4010 define dso_local i64 @ld_disjoint_align64_uint64_t_uint64_t(i64 %ptr) {
4011 ; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_uint64_t:
4012 ; CHECK-P10: # %bb.0: # %entry
4013 ; CHECK-P10-NEXT: pli r4, 244140625
4014 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
4015 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
4016 ; CHECK-P10-NEXT: ldx r3, r3, r4
4017 ; CHECK-P10-NEXT: blr
4019 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_uint64_t:
4020 ; CHECK-PREP10: # %bb.0: # %entry
4021 ; CHECK-PREP10-NEXT: lis r4, 3725
4022 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
4023 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
4024 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
4025 ; CHECK-PREP10-NEXT: ldx r3, r3, r4
4026 ; CHECK-PREP10-NEXT: blr
4028 %and = and i64 %ptr, -1099511627776
4029 %or = or i64 %and, 1000000000000
4030 %0 = inttoptr i64 %or to i64*
4031 %1 = load i64, i64* %0, align 4096
4035 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4036 define dso_local i64 @ld_cst_unalign16_uint64_t_uint64_t() {
4037 ; CHECK-LABEL: ld_cst_unalign16_uint64_t_uint64_t:
4038 ; CHECK: # %bb.0: # %entry
4039 ; CHECK-NEXT: li r3, 255
4040 ; CHECK-NEXT: ld r3, 0(r3)
4043 %0 = load i64, i64* inttoptr (i64 255 to i64*), align 8
4047 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4048 define dso_local i64 @ld_cst_align16_uint64_t_uint64_t() {
4049 ; CHECK-LABEL: ld_cst_align16_uint64_t_uint64_t:
4050 ; CHECK: # %bb.0: # %entry
4051 ; CHECK-NEXT: ld r3, 4080(0)
4054 %0 = load i64, i64* inttoptr (i64 4080 to i64*), align 16
4058 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4059 define dso_local i64 @ld_cst_unalign32_uint64_t_uint64_t() {
4060 ; CHECK-P10-LABEL: ld_cst_unalign32_uint64_t_uint64_t:
4061 ; CHECK-P10: # %bb.0: # %entry
4062 ; CHECK-P10-NEXT: pli r3, 99999
4063 ; CHECK-P10-NEXT: ld r3, 0(r3)
4064 ; CHECK-P10-NEXT: blr
4066 ; CHECK-PREP10-LABEL: ld_cst_unalign32_uint64_t_uint64_t:
4067 ; CHECK-PREP10: # %bb.0: # %entry
4068 ; CHECK-PREP10-NEXT: lis r3, 1
4069 ; CHECK-PREP10-NEXT: ori r3, r3, 34463
4070 ; CHECK-PREP10-NEXT: ld r3, 0(r3)
4071 ; CHECK-PREP10-NEXT: blr
4073 %0 = load i64, i64* inttoptr (i64 99999 to i64*), align 8
4077 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4078 define dso_local i64 @ld_cst_align32_uint64_t_uint64_t() {
4079 ; CHECK-LABEL: ld_cst_align32_uint64_t_uint64_t:
4080 ; CHECK: # %bb.0: # %entry
4081 ; CHECK-NEXT: lis r3, 153
4082 ; CHECK-NEXT: ld r3, -27108(r3)
4085 %0 = load i64, i64* inttoptr (i64 9999900 to i64*), align 8
4089 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4090 define dso_local i64 @ld_cst_unalign64_uint64_t_uint64_t() {
4091 ; CHECK-P10-LABEL: ld_cst_unalign64_uint64_t_uint64_t:
4092 ; CHECK-P10: # %bb.0: # %entry
4093 ; CHECK-P10-NEXT: pli r3, 232
4094 ; CHECK-P10-NEXT: pli r4, 3567587329
4095 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
4096 ; CHECK-P10-NEXT: ld r3, 0(r4)
4097 ; CHECK-P10-NEXT: blr
4099 ; CHECK-PREP10-LABEL: ld_cst_unalign64_uint64_t_uint64_t:
4100 ; CHECK-PREP10: # %bb.0: # %entry
4101 ; CHECK-PREP10-NEXT: li r3, 29
4102 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
4103 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
4104 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
4105 ; CHECK-PREP10-NEXT: ld r3, 0(r3)
4106 ; CHECK-PREP10-NEXT: blr
4108 %0 = load i64, i64* inttoptr (i64 1000000000001 to i64*), align 8
4112 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4113 define dso_local i64 @ld_cst_align64_uint64_t_uint64_t() {
4114 ; CHECK-P10-LABEL: ld_cst_align64_uint64_t_uint64_t:
4115 ; CHECK-P10: # %bb.0: # %entry
4116 ; CHECK-P10-NEXT: pli r3, 244140625
4117 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
4118 ; CHECK-P10-NEXT: ld r3, 0(r3)
4119 ; CHECK-P10-NEXT: blr
4121 ; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_uint64_t:
4122 ; CHECK-PREP10: # %bb.0: # %entry
4123 ; CHECK-PREP10-NEXT: lis r3, 3725
4124 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
4125 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
4126 ; CHECK-PREP10-NEXT: ld r3, 0(r3)
4127 ; CHECK-PREP10-NEXT: blr
4129 %0 = load i64, i64* inttoptr (i64 1000000000000 to i64*), align 4096
4133 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4134 define dso_local i64 @ld_0_uint64_t_float(i64 %ptr) {
4135 ; CHECK-LABEL: ld_0_uint64_t_float:
4136 ; CHECK: # %bb.0: # %entry
4137 ; CHECK-NEXT: lfs f0, 0(r3)
4138 ; CHECK-NEXT: xscvdpuxds f0, f0
4139 ; CHECK-NEXT: mffprd r3, f0
4142 %0 = inttoptr i64 %ptr to float*
4143 %1 = load float, float* %0, align 4
4144 %conv = fptoui float %1 to i64
4148 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4149 define dso_local i64 @ld_unalign16_uint64_t_float(i8* nocapture readonly %ptr) {
4150 ; CHECK-LABEL: ld_unalign16_uint64_t_float:
4151 ; CHECK: # %bb.0: # %entry
4152 ; CHECK-NEXT: lfs f0, 1(r3)
4153 ; CHECK-NEXT: xscvdpuxds f0, f0
4154 ; CHECK-NEXT: mffprd r3, f0
4157 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1
4158 %0 = bitcast i8* %add.ptr to float*
4159 %1 = load float, float* %0, align 4
4160 %conv = fptoui float %1 to i64
4164 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4165 define dso_local i64 @ld_align16_uint64_t_float(i8* nocapture readonly %ptr) {
4166 ; CHECK-LABEL: ld_align16_uint64_t_float:
4167 ; CHECK: # %bb.0: # %entry
4168 ; CHECK-NEXT: lfs f0, 8(r3)
4169 ; CHECK-NEXT: xscvdpuxds f0, f0
4170 ; CHECK-NEXT: mffprd r3, f0
4173 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
4174 %0 = bitcast i8* %add.ptr to float*
4175 %1 = load float, float* %0, align 4
4176 %conv = fptoui float %1 to i64
4180 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4181 define dso_local i64 @ld_unalign32_uint64_t_float(i8* nocapture readonly %ptr) {
4182 ; CHECK-P10-LABEL: ld_unalign32_uint64_t_float:
4183 ; CHECK-P10: # %bb.0: # %entry
4184 ; CHECK-P10-NEXT: pli r4, 99999
4185 ; CHECK-P10-NEXT: lfsx f0, r3, r4
4186 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4187 ; CHECK-P10-NEXT: mffprd r3, f0
4188 ; CHECK-P10-NEXT: blr
4190 ; CHECK-PREP10-LABEL: ld_unalign32_uint64_t_float:
4191 ; CHECK-PREP10: # %bb.0: # %entry
4192 ; CHECK-PREP10-NEXT: lis r4, 1
4193 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
4194 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
4195 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4196 ; CHECK-PREP10-NEXT: mffprd r3, f0
4197 ; CHECK-PREP10-NEXT: blr
4199 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999
4200 %0 = bitcast i8* %add.ptr to float*
4201 %1 = load float, float* %0, align 4
4202 %conv = fptoui float %1 to i64
4206 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4207 define dso_local i64 @ld_align32_uint64_t_float(i8* nocapture readonly %ptr) {
4208 ; CHECK-P10-LABEL: ld_align32_uint64_t_float:
4209 ; CHECK-P10: # %bb.0: # %entry
4210 ; CHECK-P10-NEXT: pli r4, 99999000
4211 ; CHECK-P10-NEXT: lfsx f0, r3, r4
4212 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4213 ; CHECK-P10-NEXT: mffprd r3, f0
4214 ; CHECK-P10-NEXT: blr
4216 ; CHECK-PREP10-LABEL: ld_align32_uint64_t_float:
4217 ; CHECK-PREP10: # %bb.0: # %entry
4218 ; CHECK-PREP10-NEXT: lis r4, 1525
4219 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
4220 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
4221 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4222 ; CHECK-PREP10-NEXT: mffprd r3, f0
4223 ; CHECK-PREP10-NEXT: blr
4225 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
4226 %0 = bitcast i8* %add.ptr to float*
4227 %1 = load float, float* %0, align 4
4228 %conv = fptoui float %1 to i64
4232 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4233 define dso_local i64 @ld_unalign64_uint64_t_float(i8* nocapture readonly %ptr) {
4234 ; CHECK-P10-LABEL: ld_unalign64_uint64_t_float:
4235 ; CHECK-P10: # %bb.0: # %entry
4236 ; CHECK-P10-NEXT: pli r4, 232
4237 ; CHECK-P10-NEXT: pli r5, 3567587329
4238 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
4239 ; CHECK-P10-NEXT: lfsx f0, r3, r5
4240 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4241 ; CHECK-P10-NEXT: mffprd r3, f0
4242 ; CHECK-P10-NEXT: blr
4244 ; CHECK-PREP10-LABEL: ld_unalign64_uint64_t_float:
4245 ; CHECK-PREP10: # %bb.0: # %entry
4246 ; CHECK-PREP10-NEXT: li r4, 29
4247 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
4248 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
4249 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
4250 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
4251 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4252 ; CHECK-PREP10-NEXT: mffprd r3, f0
4253 ; CHECK-PREP10-NEXT: blr
4255 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
4256 %0 = bitcast i8* %add.ptr to float*
4257 %1 = load float, float* %0, align 4
4258 %conv = fptoui float %1 to i64
4262 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4263 define dso_local i64 @ld_align64_uint64_t_float(i8* nocapture readonly %ptr) {
4264 ; CHECK-P10-LABEL: ld_align64_uint64_t_float:
4265 ; CHECK-P10: # %bb.0: # %entry
4266 ; CHECK-P10-NEXT: pli r4, 244140625
4267 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
4268 ; CHECK-P10-NEXT: lfsx f0, r3, r4
4269 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4270 ; CHECK-P10-NEXT: mffprd r3, f0
4271 ; CHECK-P10-NEXT: blr
4273 ; CHECK-PREP10-LABEL: ld_align64_uint64_t_float:
4274 ; CHECK-PREP10: # %bb.0: # %entry
4275 ; CHECK-PREP10-NEXT: lis r4, 3725
4276 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
4277 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
4278 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
4279 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4280 ; CHECK-PREP10-NEXT: mffprd r3, f0
4281 ; CHECK-PREP10-NEXT: blr
4283 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
4284 %0 = bitcast i8* %add.ptr to float*
4285 %1 = load float, float* %0, align 4
4286 %conv = fptoui float %1 to i64
4290 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4291 define dso_local i64 @ld_reg_uint64_t_float(i8* nocapture readonly %ptr, i64 %off) {
4292 ; CHECK-LABEL: ld_reg_uint64_t_float:
4293 ; CHECK: # %bb.0: # %entry
4294 ; CHECK-NEXT: lfsx f0, r3, r4
4295 ; CHECK-NEXT: xscvdpuxds f0, f0
4296 ; CHECK-NEXT: mffprd r3, f0
4299 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
4300 %0 = bitcast i8* %add.ptr to float*
4301 %1 = load float, float* %0, align 4
4302 %conv = fptoui float %1 to i64
4306 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4307 define dso_local i64 @ld_or_uint64_t_float(i64 %ptr, i8 zeroext %off) {
4308 ; CHECK-LABEL: ld_or_uint64_t_float:
4309 ; CHECK: # %bb.0: # %entry
4310 ; CHECK-NEXT: or r3, r4, r3
4311 ; CHECK-NEXT: lfs f0, 0(r3)
4312 ; CHECK-NEXT: xscvdpuxds f0, f0
4313 ; CHECK-NEXT: mffprd r3, f0
4316 %conv = zext i8 %off to i64
4317 %or = or i64 %conv, %ptr
4318 %0 = inttoptr i64 %or to float*
4319 %1 = load float, float* %0, align 4
4320 %conv1 = fptoui float %1 to i64
4324 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4325 define dso_local i64 @ld_or2_uint64_t_float(i64 %ptr, i8 zeroext %off) {
4326 ; CHECK-LABEL: ld_or2_uint64_t_float:
4327 ; CHECK: # %bb.0: # %entry
4328 ; CHECK-NEXT: rldicr r3, r3, 0, 51
4329 ; CHECK-NEXT: lfsx f0, r3, r4
4330 ; CHECK-NEXT: xscvdpuxds f0, f0
4331 ; CHECK-NEXT: mffprd r3, f0
4334 %and = and i64 %ptr, -4096
4335 %conv = zext i8 %off to i64
4336 %or = or i64 %and, %conv
4337 %0 = inttoptr i64 %or to float*
4338 %1 = load float, float* %0, align 4
4339 %conv1 = fptoui float %1 to i64
4343 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4344 define dso_local i64 @ld_not_disjoint16_uint64_t_float(i64 %ptr) {
4345 ; CHECK-LABEL: ld_not_disjoint16_uint64_t_float:
4346 ; CHECK: # %bb.0: # %entry
4347 ; CHECK-NEXT: ori r3, r3, 6
4348 ; CHECK-NEXT: lfs f0, 0(r3)
4349 ; CHECK-NEXT: xscvdpuxds f0, f0
4350 ; CHECK-NEXT: mffprd r3, f0
4353 %or = or i64 %ptr, 6
4354 %0 = inttoptr i64 %or to float*
4355 %1 = load float, float* %0, align 4
4356 %conv = fptoui float %1 to i64
4360 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4361 define dso_local i64 @ld_disjoint_unalign16_uint64_t_float(i64 %ptr) {
4362 ; CHECK-LABEL: ld_disjoint_unalign16_uint64_t_float:
4363 ; CHECK: # %bb.0: # %entry
4364 ; CHECK-NEXT: rldicr r3, r3, 0, 51
4365 ; CHECK-NEXT: lfs f0, 6(r3)
4366 ; CHECK-NEXT: xscvdpuxds f0, f0
4367 ; CHECK-NEXT: mffprd r3, f0
4370 %and = and i64 %ptr, -4096
4371 %or = or i64 %and, 6
4372 %0 = inttoptr i64 %or to float*
4373 %1 = load float, float* %0, align 4
4374 %conv = fptoui float %1 to i64
4378 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4379 define dso_local i64 @ld_disjoint_align16_uint64_t_float(i64 %ptr) {
4380 ; CHECK-LABEL: ld_disjoint_align16_uint64_t_float:
4381 ; CHECK: # %bb.0: # %entry
4382 ; CHECK-NEXT: rldicr r3, r3, 0, 51
4383 ; CHECK-NEXT: lfs f0, 24(r3)
4384 ; CHECK-NEXT: xscvdpuxds f0, f0
4385 ; CHECK-NEXT: mffprd r3, f0
4388 %and = and i64 %ptr, -4096
4389 %or = or i64 %and, 24
4390 %0 = inttoptr i64 %or to float*
4391 %1 = load float, float* %0, align 8
4392 %conv = fptoui float %1 to i64
4396 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4397 define dso_local i64 @ld_not_disjoint32_uint64_t_float(i64 %ptr) {
4398 ; CHECK-LABEL: ld_not_disjoint32_uint64_t_float:
4399 ; CHECK: # %bb.0: # %entry
4400 ; CHECK-NEXT: ori r3, r3, 34463
4401 ; CHECK-NEXT: oris r3, r3, 1
4402 ; CHECK-NEXT: lfs f0, 0(r3)
4403 ; CHECK-NEXT: xscvdpuxds f0, f0
4404 ; CHECK-NEXT: mffprd r3, f0
4407 %or = or i64 %ptr, 99999
4408 %0 = inttoptr i64 %or to float*
4409 %1 = load float, float* %0, align 4
4410 %conv = fptoui float %1 to i64
4414 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4415 define dso_local i64 @ld_disjoint_unalign32_uint64_t_float(i64 %ptr) {
4416 ; CHECK-P10-LABEL: ld_disjoint_unalign32_uint64_t_float:
4417 ; CHECK-P10: # %bb.0: # %entry
4418 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
4419 ; CHECK-P10-NEXT: pli r4, 99999
4420 ; CHECK-P10-NEXT: lfsx f0, r3, r4
4421 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4422 ; CHECK-P10-NEXT: mffprd r3, f0
4423 ; CHECK-P10-NEXT: blr
4425 ; CHECK-PREP10-LABEL: ld_disjoint_unalign32_uint64_t_float:
4426 ; CHECK-PREP10: # %bb.0: # %entry
4427 ; CHECK-PREP10-NEXT: lis r4, 1
4428 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
4429 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
4430 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
4431 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4432 ; CHECK-PREP10-NEXT: mffprd r3, f0
4433 ; CHECK-PREP10-NEXT: blr
4435 %and = and i64 %ptr, -1048576
4436 %or = or i64 %and, 99999
4437 %0 = inttoptr i64 %or to float*
4438 %1 = load float, float* %0, align 4
4439 %conv = fptoui float %1 to i64
4443 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4444 define dso_local i64 @ld_disjoint_align32_uint64_t_float(i64 %ptr) {
4445 ; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_float:
4446 ; CHECK-P10: # %bb.0: # %entry
4447 ; CHECK-P10-NEXT: lis r4, -15264
4448 ; CHECK-P10-NEXT: and r3, r3, r4
4449 ; CHECK-P10-NEXT: pli r4, 999990000
4450 ; CHECK-P10-NEXT: lfsx f0, r3, r4
4451 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4452 ; CHECK-P10-NEXT: mffprd r3, f0
4453 ; CHECK-P10-NEXT: blr
4455 ; CHECK-P9-LABEL: ld_disjoint_align32_uint64_t_float:
4456 ; CHECK-P9: # %bb.0: # %entry
4457 ; CHECK-P9-NEXT: lis r4, -15264
4458 ; CHECK-P9-NEXT: and r3, r3, r4
4459 ; CHECK-P9-NEXT: lis r4, 15258
4460 ; CHECK-P9-NEXT: ori r4, r4, 41712
4461 ; CHECK-P9-NEXT: lfsx f0, r3, r4
4462 ; CHECK-P9-NEXT: xscvdpuxds f0, f0
4463 ; CHECK-P9-NEXT: mffprd r3, f0
4464 ; CHECK-P9-NEXT: blr
4466 ; CHECK-P8-LABEL: ld_disjoint_align32_uint64_t_float:
4467 ; CHECK-P8: # %bb.0: # %entry
4468 ; CHECK-P8-NEXT: lis r4, -15264
4469 ; CHECK-P8-NEXT: lis r5, 15258
4470 ; CHECK-P8-NEXT: and r3, r3, r4
4471 ; CHECK-P8-NEXT: ori r4, r5, 41712
4472 ; CHECK-P8-NEXT: lfsx f0, r3, r4
4473 ; CHECK-P8-NEXT: xscvdpuxds f0, f0
4474 ; CHECK-P8-NEXT: mffprd r3, f0
4475 ; CHECK-P8-NEXT: blr
4477 %and = and i64 %ptr, -1000341504
4478 %or = or i64 %and, 999990000
4479 %0 = inttoptr i64 %or to float*
4480 %1 = load float, float* %0, align 16
4481 %conv = fptoui float %1 to i64
4485 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4486 define dso_local i64 @ld_not_disjoint64_uint64_t_float(i64 %ptr) {
4487 ; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_float:
4488 ; CHECK-P10: # %bb.0: # %entry
4489 ; CHECK-P10-NEXT: pli r4, 232
4490 ; CHECK-P10-NEXT: pli r5, 3567587329
4491 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
4492 ; CHECK-P10-NEXT: or r3, r3, r5
4493 ; CHECK-P10-NEXT: lfs f0, 0(r3)
4494 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4495 ; CHECK-P10-NEXT: mffprd r3, f0
4496 ; CHECK-P10-NEXT: blr
4498 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_float:
4499 ; CHECK-PREP10: # %bb.0: # %entry
4500 ; CHECK-PREP10-NEXT: li r4, 29
4501 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
4502 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
4503 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
4504 ; CHECK-PREP10-NEXT: or r3, r3, r4
4505 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
4506 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4507 ; CHECK-PREP10-NEXT: mffprd r3, f0
4508 ; CHECK-PREP10-NEXT: blr
4510 %or = or i64 %ptr, 1000000000001
4511 %0 = inttoptr i64 %or to float*
4512 %1 = load float, float* %0, align 4
4513 %conv = fptoui float %1 to i64
4517 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4518 define dso_local i64 @ld_disjoint_unalign64_uint64_t_float(i64 %ptr) {
4519 ; CHECK-P10-LABEL: ld_disjoint_unalign64_uint64_t_float:
4520 ; CHECK-P10: # %bb.0: # %entry
4521 ; CHECK-P10-NEXT: pli r4, 232
4522 ; CHECK-P10-NEXT: pli r5, 3567587329
4523 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
4524 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
4525 ; CHECK-P10-NEXT: lfsx f0, r3, r5
4526 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4527 ; CHECK-P10-NEXT: mffprd r3, f0
4528 ; CHECK-P10-NEXT: blr
4530 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint64_t_float:
4531 ; CHECK-PREP10: # %bb.0: # %entry
4532 ; CHECK-PREP10-NEXT: li r4, 29
4533 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
4534 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
4535 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
4536 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
4537 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
4538 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4539 ; CHECK-PREP10-NEXT: mffprd r3, f0
4540 ; CHECK-PREP10-NEXT: blr
4542 %and = and i64 %ptr, -1099511627776
4543 %or = or i64 %and, 1000000000001
4544 %0 = inttoptr i64 %or to float*
4545 %1 = load float, float* %0, align 4
4546 %conv = fptoui float %1 to i64
4550 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4551 define dso_local i64 @ld_disjoint_align64_uint64_t_float(i64 %ptr) {
4552 ; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_float:
4553 ; CHECK-P10: # %bb.0: # %entry
4554 ; CHECK-P10-NEXT: pli r4, 244140625
4555 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
4556 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
4557 ; CHECK-P10-NEXT: lfsx f0, r3, r4
4558 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4559 ; CHECK-P10-NEXT: mffprd r3, f0
4560 ; CHECK-P10-NEXT: blr
4562 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_float:
4563 ; CHECK-PREP10: # %bb.0: # %entry
4564 ; CHECK-PREP10-NEXT: lis r4, 3725
4565 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
4566 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
4567 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
4568 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
4569 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4570 ; CHECK-PREP10-NEXT: mffprd r3, f0
4571 ; CHECK-PREP10-NEXT: blr
4573 %and = and i64 %ptr, -1099511627776
4574 %or = or i64 %and, 1000000000000
4575 %0 = inttoptr i64 %or to float*
4576 %1 = load float, float* %0, align 4096
4577 %conv = fptoui float %1 to i64
4581 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4582 define dso_local i64 @ld_cst_unalign16_uint64_t_float() {
4583 ; CHECK-P10-LABEL: ld_cst_unalign16_uint64_t_float:
4584 ; CHECK-P10: # %bb.0: # %entry
4585 ; CHECK-P10-NEXT: li r3, 255
4586 ; CHECK-P10-NEXT: lfs f0, 0(r3)
4587 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4588 ; CHECK-P10-NEXT: mffprd r3, f0
4589 ; CHECK-P10-NEXT: blr
4591 ; CHECK-P9-LABEL: ld_cst_unalign16_uint64_t_float:
4592 ; CHECK-P9: # %bb.0: # %entry
4593 ; CHECK-P9-NEXT: li r3, 255
4594 ; CHECK-P9-NEXT: lfs f0, 0(r3)
4595 ; CHECK-P9-NEXT: xscvdpuxds f0, f0
4596 ; CHECK-P9-NEXT: mffprd r3, f0
4597 ; CHECK-P9-NEXT: blr
4599 ; CHECK-P8-LABEL: ld_cst_unalign16_uint64_t_float:
4600 ; CHECK-P8: # %bb.0: # %entry
4601 ; CHECK-P8-NEXT: lfs f0, 255(0)
4602 ; CHECK-P8-NEXT: xscvdpuxds f0, f0
4603 ; CHECK-P8-NEXT: mffprd r3, f0
4604 ; CHECK-P8-NEXT: blr
4606 %0 = load float, float* inttoptr (i64 255 to float*), align 4
4607 %conv = fptoui float %0 to i64
4611 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4612 define dso_local i64 @ld_cst_align16_uint64_t_float() {
4613 ; CHECK-LABEL: ld_cst_align16_uint64_t_float:
4614 ; CHECK: # %bb.0: # %entry
4615 ; CHECK-NEXT: lfs f0, 4080(0)
4616 ; CHECK-NEXT: xscvdpuxds f0, f0
4617 ; CHECK-NEXT: mffprd r3, f0
4620 %0 = load float, float* inttoptr (i64 4080 to float*), align 16
4621 %conv = fptoui float %0 to i64
4625 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4626 define dso_local i64 @ld_cst_unalign32_uint64_t_float() {
4627 ; CHECK-P10-LABEL: ld_cst_unalign32_uint64_t_float:
4628 ; CHECK-P10: # %bb.0: # %entry
4629 ; CHECK-P10-NEXT: pli r3, 99999
4630 ; CHECK-P10-NEXT: lfs f0, 0(r3)
4631 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4632 ; CHECK-P10-NEXT: mffprd r3, f0
4633 ; CHECK-P10-NEXT: blr
4635 ; CHECK-P9-LABEL: ld_cst_unalign32_uint64_t_float:
4636 ; CHECK-P9: # %bb.0: # %entry
4637 ; CHECK-P9-NEXT: lis r3, 1
4638 ; CHECK-P9-NEXT: ori r3, r3, 34463
4639 ; CHECK-P9-NEXT: lfs f0, 0(r3)
4640 ; CHECK-P9-NEXT: xscvdpuxds f0, f0
4641 ; CHECK-P9-NEXT: mffprd r3, f0
4642 ; CHECK-P9-NEXT: blr
4644 ; CHECK-P8-LABEL: ld_cst_unalign32_uint64_t_float:
4645 ; CHECK-P8: # %bb.0: # %entry
4646 ; CHECK-P8-NEXT: lis r3, 2
4647 ; CHECK-P8-NEXT: lfs f0, -31073(r3)
4648 ; CHECK-P8-NEXT: xscvdpuxds f0, f0
4649 ; CHECK-P8-NEXT: mffprd r3, f0
4650 ; CHECK-P8-NEXT: blr
4652 %0 = load float, float* inttoptr (i64 99999 to float*), align 4
4653 %conv = fptoui float %0 to i64
4657 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4658 define dso_local i64 @ld_cst_align32_uint64_t_float() {
4659 ; CHECK-LABEL: ld_cst_align32_uint64_t_float:
4660 ; CHECK: # %bb.0: # %entry
4661 ; CHECK-NEXT: lis r3, 153
4662 ; CHECK-NEXT: lfs f0, -27108(r3)
4663 ; CHECK-NEXT: xscvdpuxds f0, f0
4664 ; CHECK-NEXT: mffprd r3, f0
4667 %0 = load float, float* inttoptr (i64 9999900 to float*), align 4
4668 %conv = fptoui float %0 to i64
4672 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4673 define dso_local i64 @ld_cst_unalign64_uint64_t_float() {
4674 ; CHECK-P10-LABEL: ld_cst_unalign64_uint64_t_float:
4675 ; CHECK-P10: # %bb.0: # %entry
4676 ; CHECK-P10-NEXT: pli r3, 232
4677 ; CHECK-P10-NEXT: pli r4, 3567587329
4678 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
4679 ; CHECK-P10-NEXT: lfs f0, 0(r4)
4680 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4681 ; CHECK-P10-NEXT: mffprd r3, f0
4682 ; CHECK-P10-NEXT: blr
4684 ; CHECK-PREP10-LABEL: ld_cst_unalign64_uint64_t_float:
4685 ; CHECK-PREP10: # %bb.0: # %entry
4686 ; CHECK-PREP10-NEXT: li r3, 29
4687 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
4688 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
4689 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
4690 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
4691 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4692 ; CHECK-PREP10-NEXT: mffprd r3, f0
4693 ; CHECK-PREP10-NEXT: blr
4695 %0 = load float, float* inttoptr (i64 1000000000001 to float*), align 4
4696 %conv = fptoui float %0 to i64
4700 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4701 define dso_local i64 @ld_cst_align64_uint64_t_float() {
4702 ; CHECK-P10-LABEL: ld_cst_align64_uint64_t_float:
4703 ; CHECK-P10: # %bb.0: # %entry
4704 ; CHECK-P10-NEXT: pli r3, 244140625
4705 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
4706 ; CHECK-P10-NEXT: lfs f0, 0(r3)
4707 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4708 ; CHECK-P10-NEXT: mffprd r3, f0
4709 ; CHECK-P10-NEXT: blr
4711 ; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_float:
4712 ; CHECK-PREP10: # %bb.0: # %entry
4713 ; CHECK-PREP10-NEXT: lis r3, 3725
4714 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
4715 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
4716 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
4717 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4718 ; CHECK-PREP10-NEXT: mffprd r3, f0
4719 ; CHECK-PREP10-NEXT: blr
4721 %0 = load float, float* inttoptr (i64 1000000000000 to float*), align 4096
4722 %conv = fptoui float %0 to i64
4726 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4727 define dso_local i64 @ld_0_uint64_t_double(i64 %ptr) {
4728 ; CHECK-LABEL: ld_0_uint64_t_double:
4729 ; CHECK: # %bb.0: # %entry
4730 ; CHECK-NEXT: lfd f0, 0(r3)
4731 ; CHECK-NEXT: xscvdpuxds f0, f0
4732 ; CHECK-NEXT: mffprd r3, f0
4735 %0 = inttoptr i64 %ptr to double*
4736 %1 = load double, double* %0, align 8
4737 %conv = fptoui double %1 to i64
4741 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4742 define dso_local i64 @ld_unalign16_uint64_t_double(i8* nocapture readonly %ptr) {
4743 ; CHECK-LABEL: ld_unalign16_uint64_t_double:
4744 ; CHECK: # %bb.0: # %entry
4745 ; CHECK-NEXT: lfd f0, 1(r3)
4746 ; CHECK-NEXT: xscvdpuxds f0, f0
4747 ; CHECK-NEXT: mffprd r3, f0
4750 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1
4751 %0 = bitcast i8* %add.ptr to double*
4752 %1 = load double, double* %0, align 8
4753 %conv = fptoui double %1 to i64
4757 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4758 define dso_local i64 @ld_align16_uint64_t_double(i8* nocapture readonly %ptr) {
4759 ; CHECK-LABEL: ld_align16_uint64_t_double:
4760 ; CHECK: # %bb.0: # %entry
4761 ; CHECK-NEXT: lfd f0, 8(r3)
4762 ; CHECK-NEXT: xscvdpuxds f0, f0
4763 ; CHECK-NEXT: mffprd r3, f0
4766 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
4767 %0 = bitcast i8* %add.ptr to double*
4768 %1 = load double, double* %0, align 8
4769 %conv = fptoui double %1 to i64
4773 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4774 define dso_local i64 @ld_unalign32_uint64_t_double(i8* nocapture readonly %ptr) {
4775 ; CHECK-P10-LABEL: ld_unalign32_uint64_t_double:
4776 ; CHECK-P10: # %bb.0: # %entry
4777 ; CHECK-P10-NEXT: pli r4, 99999
4778 ; CHECK-P10-NEXT: lfdx f0, r3, r4
4779 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4780 ; CHECK-P10-NEXT: mffprd r3, f0
4781 ; CHECK-P10-NEXT: blr
4783 ; CHECK-PREP10-LABEL: ld_unalign32_uint64_t_double:
4784 ; CHECK-PREP10: # %bb.0: # %entry
4785 ; CHECK-PREP10-NEXT: lis r4, 1
4786 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
4787 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
4788 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4789 ; CHECK-PREP10-NEXT: mffprd r3, f0
4790 ; CHECK-PREP10-NEXT: blr
4792 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999
4793 %0 = bitcast i8* %add.ptr to double*
4794 %1 = load double, double* %0, align 8
4795 %conv = fptoui double %1 to i64
4799 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4800 define dso_local i64 @ld_align32_uint64_t_double(i8* nocapture readonly %ptr) {
4801 ; CHECK-P10-LABEL: ld_align32_uint64_t_double:
4802 ; CHECK-P10: # %bb.0: # %entry
4803 ; CHECK-P10-NEXT: pli r4, 99999000
4804 ; CHECK-P10-NEXT: lfdx f0, r3, r4
4805 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4806 ; CHECK-P10-NEXT: mffprd r3, f0
4807 ; CHECK-P10-NEXT: blr
4809 ; CHECK-PREP10-LABEL: ld_align32_uint64_t_double:
4810 ; CHECK-PREP10: # %bb.0: # %entry
4811 ; CHECK-PREP10-NEXT: lis r4, 1525
4812 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
4813 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
4814 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4815 ; CHECK-PREP10-NEXT: mffprd r3, f0
4816 ; CHECK-PREP10-NEXT: blr
4818 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
4819 %0 = bitcast i8* %add.ptr to double*
4820 %1 = load double, double* %0, align 8
4821 %conv = fptoui double %1 to i64
4825 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4826 define dso_local i64 @ld_unalign64_uint64_t_double(i8* nocapture readonly %ptr) {
4827 ; CHECK-P10-LABEL: ld_unalign64_uint64_t_double:
4828 ; CHECK-P10: # %bb.0: # %entry
4829 ; CHECK-P10-NEXT: pli r4, 232
4830 ; CHECK-P10-NEXT: pli r5, 3567587329
4831 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
4832 ; CHECK-P10-NEXT: lfdx f0, r3, r5
4833 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4834 ; CHECK-P10-NEXT: mffprd r3, f0
4835 ; CHECK-P10-NEXT: blr
4837 ; CHECK-PREP10-LABEL: ld_unalign64_uint64_t_double:
4838 ; CHECK-PREP10: # %bb.0: # %entry
4839 ; CHECK-PREP10-NEXT: li r4, 29
4840 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
4841 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
4842 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
4843 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
4844 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4845 ; CHECK-PREP10-NEXT: mffprd r3, f0
4846 ; CHECK-PREP10-NEXT: blr
4848 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
4849 %0 = bitcast i8* %add.ptr to double*
4850 %1 = load double, double* %0, align 8
4851 %conv = fptoui double %1 to i64
4855 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4856 define dso_local i64 @ld_align64_uint64_t_double(i8* nocapture readonly %ptr) {
4857 ; CHECK-P10-LABEL: ld_align64_uint64_t_double:
4858 ; CHECK-P10: # %bb.0: # %entry
4859 ; CHECK-P10-NEXT: pli r4, 244140625
4860 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
4861 ; CHECK-P10-NEXT: lfdx f0, r3, r4
4862 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
4863 ; CHECK-P10-NEXT: mffprd r3, f0
4864 ; CHECK-P10-NEXT: blr
4866 ; CHECK-PREP10-LABEL: ld_align64_uint64_t_double:
4867 ; CHECK-PREP10: # %bb.0: # %entry
4868 ; CHECK-PREP10-NEXT: lis r4, 3725
4869 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
4870 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
4871 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
4872 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
4873 ; CHECK-PREP10-NEXT: mffprd r3, f0
4874 ; CHECK-PREP10-NEXT: blr
4876 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
4877 %0 = bitcast i8* %add.ptr to double*
4878 %1 = load double, double* %0, align 8
4879 %conv = fptoui double %1 to i64
4883 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4884 define dso_local i64 @ld_reg_uint64_t_double(i8* nocapture readonly %ptr, i64 %off) {
4885 ; CHECK-LABEL: ld_reg_uint64_t_double:
4886 ; CHECK: # %bb.0: # %entry
4887 ; CHECK-NEXT: lfdx f0, r3, r4
4888 ; CHECK-NEXT: xscvdpuxds f0, f0
4889 ; CHECK-NEXT: mffprd r3, f0
4892 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
4893 %0 = bitcast i8* %add.ptr to double*
4894 %1 = load double, double* %0, align 8
4895 %conv = fptoui double %1 to i64
4899 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4900 define dso_local i64 @ld_or_uint64_t_double(i64 %ptr, i8 zeroext %off) {
4901 ; CHECK-LABEL: ld_or_uint64_t_double:
4902 ; CHECK: # %bb.0: # %entry
4903 ; CHECK-NEXT: or r3, r4, r3
4904 ; CHECK-NEXT: lfd f0, 0(r3)
4905 ; CHECK-NEXT: xscvdpuxds f0, f0
4906 ; CHECK-NEXT: mffprd r3, f0
4909 %conv = zext i8 %off to i64
4910 %or = or i64 %conv, %ptr
4911 %0 = inttoptr i64 %or to double*
4912 %1 = load double, double* %0, align 8
4913 %conv1 = fptoui double %1 to i64
4917 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4918 define dso_local i64 @ld_or2_uint64_t_double(i64 %ptr, i8 zeroext %off) {
4919 ; CHECK-LABEL: ld_or2_uint64_t_double:
4920 ; CHECK: # %bb.0: # %entry
4921 ; CHECK-NEXT: rldicr r3, r3, 0, 51
4922 ; CHECK-NEXT: lfdx f0, r3, r4
4923 ; CHECK-NEXT: xscvdpuxds f0, f0
4924 ; CHECK-NEXT: mffprd r3, f0
4927 %and = and i64 %ptr, -4096
4928 %conv = zext i8 %off to i64
4929 %or = or i64 %and, %conv
4930 %0 = inttoptr i64 %or to double*
4931 %1 = load double, double* %0, align 8
4932 %conv1 = fptoui double %1 to i64
4936 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4937 define dso_local i64 @ld_not_disjoint16_uint64_t_double(i64 %ptr) {
4938 ; CHECK-LABEL: ld_not_disjoint16_uint64_t_double:
4939 ; CHECK: # %bb.0: # %entry
4940 ; CHECK-NEXT: ori r3, r3, 6
4941 ; CHECK-NEXT: lfd f0, 0(r3)
4942 ; CHECK-NEXT: xscvdpuxds f0, f0
4943 ; CHECK-NEXT: mffprd r3, f0
4946 %or = or i64 %ptr, 6
4947 %0 = inttoptr i64 %or to double*
4948 %1 = load double, double* %0, align 8
4949 %conv = fptoui double %1 to i64
4953 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4954 define dso_local i64 @ld_disjoint_unalign16_uint64_t_double(i64 %ptr) {
4955 ; CHECK-LABEL: ld_disjoint_unalign16_uint64_t_double:
4956 ; CHECK: # %bb.0: # %entry
4957 ; CHECK-NEXT: rldicr r3, r3, 0, 51
4958 ; CHECK-NEXT: lfd f0, 6(r3)
4959 ; CHECK-NEXT: xscvdpuxds f0, f0
4960 ; CHECK-NEXT: mffprd r3, f0
4963 %and = and i64 %ptr, -4096
4964 %or = or i64 %and, 6
4965 %0 = inttoptr i64 %or to double*
4966 %1 = load double, double* %0, align 8
4967 %conv = fptoui double %1 to i64
4971 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4972 define dso_local i64 @ld_disjoint_align16_uint64_t_double(i64 %ptr) {
4973 ; CHECK-LABEL: ld_disjoint_align16_uint64_t_double:
4974 ; CHECK: # %bb.0: # %entry
4975 ; CHECK-NEXT: rldicr r3, r3, 0, 51
4976 ; CHECK-NEXT: lfd f0, 24(r3)
4977 ; CHECK-NEXT: xscvdpuxds f0, f0
4978 ; CHECK-NEXT: mffprd r3, f0
4981 %and = and i64 %ptr, -4096
4982 %or = or i64 %and, 24
4983 %0 = inttoptr i64 %or to double*
4984 %1 = load double, double* %0, align 8
4985 %conv = fptoui double %1 to i64
4989 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4990 define dso_local i64 @ld_not_disjoint32_uint64_t_double(i64 %ptr) {
4991 ; CHECK-LABEL: ld_not_disjoint32_uint64_t_double:
4992 ; CHECK: # %bb.0: # %entry
4993 ; CHECK-NEXT: ori r3, r3, 34463
4994 ; CHECK-NEXT: oris r3, r3, 1
4995 ; CHECK-NEXT: lfd f0, 0(r3)
4996 ; CHECK-NEXT: xscvdpuxds f0, f0
4997 ; CHECK-NEXT: mffprd r3, f0
5000 %or = or i64 %ptr, 99999
5001 %0 = inttoptr i64 %or to double*
5002 %1 = load double, double* %0, align 8
5003 %conv = fptoui double %1 to i64
5007 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5008 define dso_local i64 @ld_disjoint_unalign32_uint64_t_double(i64 %ptr) {
5009 ; CHECK-P10-LABEL: ld_disjoint_unalign32_uint64_t_double:
5010 ; CHECK-P10: # %bb.0: # %entry
5011 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
5012 ; CHECK-P10-NEXT: pli r4, 99999
5013 ; CHECK-P10-NEXT: lfdx f0, r3, r4
5014 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
5015 ; CHECK-P10-NEXT: mffprd r3, f0
5016 ; CHECK-P10-NEXT: blr
5018 ; CHECK-PREP10-LABEL: ld_disjoint_unalign32_uint64_t_double:
5019 ; CHECK-PREP10: # %bb.0: # %entry
5020 ; CHECK-PREP10-NEXT: lis r4, 1
5021 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
5022 ; CHECK-PREP10-NEXT: ori r4, r4, 34463
5023 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
5024 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
5025 ; CHECK-PREP10-NEXT: mffprd r3, f0
5026 ; CHECK-PREP10-NEXT: blr
5028 %and = and i64 %ptr, -1048576
5029 %or = or i64 %and, 99999
5030 %0 = inttoptr i64 %or to double*
5031 %1 = load double, double* %0, align 8
5032 %conv = fptoui double %1 to i64
5036 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5037 define dso_local i64 @ld_disjoint_align32_uint64_t_double(i64 %ptr) {
5038 ; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_double:
5039 ; CHECK-P10: # %bb.0: # %entry
5040 ; CHECK-P10-NEXT: lis r4, -15264
5041 ; CHECK-P10-NEXT: and r3, r3, r4
5042 ; CHECK-P10-NEXT: pli r4, 999990000
5043 ; CHECK-P10-NEXT: lfdx f0, r3, r4
5044 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
5045 ; CHECK-P10-NEXT: mffprd r3, f0
5046 ; CHECK-P10-NEXT: blr
5048 ; CHECK-P9-LABEL: ld_disjoint_align32_uint64_t_double:
5049 ; CHECK-P9: # %bb.0: # %entry
5050 ; CHECK-P9-NEXT: lis r4, -15264
5051 ; CHECK-P9-NEXT: and r3, r3, r4
5052 ; CHECK-P9-NEXT: lis r4, 15258
5053 ; CHECK-P9-NEXT: ori r4, r4, 41712
5054 ; CHECK-P9-NEXT: lfdx f0, r3, r4
5055 ; CHECK-P9-NEXT: xscvdpuxds f0, f0
5056 ; CHECK-P9-NEXT: mffprd r3, f0
5057 ; CHECK-P9-NEXT: blr
5059 ; CHECK-P8-LABEL: ld_disjoint_align32_uint64_t_double:
5060 ; CHECK-P8: # %bb.0: # %entry
5061 ; CHECK-P8-NEXT: lis r4, -15264
5062 ; CHECK-P8-NEXT: lis r5, 15258
5063 ; CHECK-P8-NEXT: and r3, r3, r4
5064 ; CHECK-P8-NEXT: ori r4, r5, 41712
5065 ; CHECK-P8-NEXT: lfdx f0, r3, r4
5066 ; CHECK-P8-NEXT: xscvdpuxds f0, f0
5067 ; CHECK-P8-NEXT: mffprd r3, f0
5068 ; CHECK-P8-NEXT: blr
5070 %and = and i64 %ptr, -1000341504
5071 %or = or i64 %and, 999990000
5072 %0 = inttoptr i64 %or to double*
5073 %1 = load double, double* %0, align 16
5074 %conv = fptoui double %1 to i64
5078 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5079 define dso_local i64 @ld_not_disjoint64_uint64_t_double(i64 %ptr) {
5080 ; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_double:
5081 ; CHECK-P10: # %bb.0: # %entry
5082 ; CHECK-P10-NEXT: pli r4, 232
5083 ; CHECK-P10-NEXT: pli r5, 3567587329
5084 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
5085 ; CHECK-P10-NEXT: or r3, r3, r5
5086 ; CHECK-P10-NEXT: lfd f0, 0(r3)
5087 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
5088 ; CHECK-P10-NEXT: mffprd r3, f0
5089 ; CHECK-P10-NEXT: blr
5091 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_double:
5092 ; CHECK-PREP10: # %bb.0: # %entry
5093 ; CHECK-PREP10-NEXT: li r4, 29
5094 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
5095 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
5096 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
5097 ; CHECK-PREP10-NEXT: or r3, r3, r4
5098 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
5099 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
5100 ; CHECK-PREP10-NEXT: mffprd r3, f0
5101 ; CHECK-PREP10-NEXT: blr
5103 %or = or i64 %ptr, 1000000000001
5104 %0 = inttoptr i64 %or to double*
5105 %1 = load double, double* %0, align 8
5106 %conv = fptoui double %1 to i64
5110 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5111 define dso_local i64 @ld_disjoint_unalign64_uint64_t_double(i64 %ptr) {
5112 ; CHECK-P10-LABEL: ld_disjoint_unalign64_uint64_t_double:
5113 ; CHECK-P10: # %bb.0: # %entry
5114 ; CHECK-P10-NEXT: pli r4, 232
5115 ; CHECK-P10-NEXT: pli r5, 3567587329
5116 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
5117 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
5118 ; CHECK-P10-NEXT: lfdx f0, r3, r5
5119 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
5120 ; CHECK-P10-NEXT: mffprd r3, f0
5121 ; CHECK-P10-NEXT: blr
5123 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint64_t_double:
5124 ; CHECK-PREP10: # %bb.0: # %entry
5125 ; CHECK-PREP10-NEXT: li r4, 29
5126 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
5127 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
5128 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
5129 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
5130 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
5131 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
5132 ; CHECK-PREP10-NEXT: mffprd r3, f0
5133 ; CHECK-PREP10-NEXT: blr
5135 %and = and i64 %ptr, -1099511627776
5136 %or = or i64 %and, 1000000000001
5137 %0 = inttoptr i64 %or to double*
5138 %1 = load double, double* %0, align 8
5139 %conv = fptoui double %1 to i64
5143 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5144 define dso_local i64 @ld_disjoint_align64_uint64_t_double(i64 %ptr) {
5145 ; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_double:
5146 ; CHECK-P10: # %bb.0: # %entry
5147 ; CHECK-P10-NEXT: pli r4, 244140625
5148 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
5149 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5150 ; CHECK-P10-NEXT: lfdx f0, r3, r4
5151 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
5152 ; CHECK-P10-NEXT: mffprd r3, f0
5153 ; CHECK-P10-NEXT: blr
5155 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_double:
5156 ; CHECK-PREP10: # %bb.0: # %entry
5157 ; CHECK-PREP10-NEXT: lis r4, 3725
5158 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
5159 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
5160 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
5161 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
5162 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
5163 ; CHECK-PREP10-NEXT: mffprd r3, f0
5164 ; CHECK-PREP10-NEXT: blr
5166 %and = and i64 %ptr, -1099511627776
5167 %or = or i64 %and, 1000000000000
5168 %0 = inttoptr i64 %or to double*
5169 %1 = load double, double* %0, align 4096
5170 %conv = fptoui double %1 to i64
5174 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5175 define dso_local i64 @ld_cst_unalign16_uint64_t_double() {
5176 ; CHECK-P10-LABEL: ld_cst_unalign16_uint64_t_double:
5177 ; CHECK-P10: # %bb.0: # %entry
5178 ; CHECK-P10-NEXT: li r3, 255
5179 ; CHECK-P10-NEXT: lfd f0, 0(r3)
5180 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
5181 ; CHECK-P10-NEXT: mffprd r3, f0
5182 ; CHECK-P10-NEXT: blr
5184 ; CHECK-P9-LABEL: ld_cst_unalign16_uint64_t_double:
5185 ; CHECK-P9: # %bb.0: # %entry
5186 ; CHECK-P9-NEXT: li r3, 255
5187 ; CHECK-P9-NEXT: lfd f0, 0(r3)
5188 ; CHECK-P9-NEXT: xscvdpuxds f0, f0
5189 ; CHECK-P9-NEXT: mffprd r3, f0
5190 ; CHECK-P9-NEXT: blr
5192 ; CHECK-P8-LABEL: ld_cst_unalign16_uint64_t_double:
5193 ; CHECK-P8: # %bb.0: # %entry
5194 ; CHECK-P8-NEXT: lfd f0, 255(0)
5195 ; CHECK-P8-NEXT: xscvdpuxds f0, f0
5196 ; CHECK-P8-NEXT: mffprd r3, f0
5197 ; CHECK-P8-NEXT: blr
5199 %0 = load double, double* inttoptr (i64 255 to double*), align 8
5200 %conv = fptoui double %0 to i64
5204 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5205 define dso_local i64 @ld_cst_align16_uint64_t_double() {
5206 ; CHECK-LABEL: ld_cst_align16_uint64_t_double:
5207 ; CHECK: # %bb.0: # %entry
5208 ; CHECK-NEXT: lfd f0, 4080(0)
5209 ; CHECK-NEXT: xscvdpuxds f0, f0
5210 ; CHECK-NEXT: mffprd r3, f0
5213 %0 = load double, double* inttoptr (i64 4080 to double*), align 16
5214 %conv = fptoui double %0 to i64
5218 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5219 define dso_local i64 @ld_cst_unalign32_uint64_t_double() {
5220 ; CHECK-P10-LABEL: ld_cst_unalign32_uint64_t_double:
5221 ; CHECK-P10: # %bb.0: # %entry
5222 ; CHECK-P10-NEXT: pli r3, 99999
5223 ; CHECK-P10-NEXT: lfd f0, 0(r3)
5224 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
5225 ; CHECK-P10-NEXT: mffprd r3, f0
5226 ; CHECK-P10-NEXT: blr
5228 ; CHECK-P9-LABEL: ld_cst_unalign32_uint64_t_double:
5229 ; CHECK-P9: # %bb.0: # %entry
5230 ; CHECK-P9-NEXT: lis r3, 1
5231 ; CHECK-P9-NEXT: ori r3, r3, 34463
5232 ; CHECK-P9-NEXT: lfd f0, 0(r3)
5233 ; CHECK-P9-NEXT: xscvdpuxds f0, f0
5234 ; CHECK-P9-NEXT: mffprd r3, f0
5235 ; CHECK-P9-NEXT: blr
5237 ; CHECK-P8-LABEL: ld_cst_unalign32_uint64_t_double:
5238 ; CHECK-P8: # %bb.0: # %entry
5239 ; CHECK-P8-NEXT: lis r3, 2
5240 ; CHECK-P8-NEXT: lfd f0, -31073(r3)
5241 ; CHECK-P8-NEXT: xscvdpuxds f0, f0
5242 ; CHECK-P8-NEXT: mffprd r3, f0
5243 ; CHECK-P8-NEXT: blr
5245 %0 = load double, double* inttoptr (i64 99999 to double*), align 8
5246 %conv = fptoui double %0 to i64
5250 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5251 define dso_local i64 @ld_cst_align32_uint64_t_double() {
5252 ; CHECK-LABEL: ld_cst_align32_uint64_t_double:
5253 ; CHECK: # %bb.0: # %entry
5254 ; CHECK-NEXT: lis r3, 153
5255 ; CHECK-NEXT: lfd f0, -27108(r3)
5256 ; CHECK-NEXT: xscvdpuxds f0, f0
5257 ; CHECK-NEXT: mffprd r3, f0
5260 %0 = load double, double* inttoptr (i64 9999900 to double*), align 8
5261 %conv = fptoui double %0 to i64
5265 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5266 define dso_local i64 @ld_cst_unalign64_uint64_t_double() {
5267 ; CHECK-P10-LABEL: ld_cst_unalign64_uint64_t_double:
5268 ; CHECK-P10: # %bb.0: # %entry
5269 ; CHECK-P10-NEXT: pli r3, 232
5270 ; CHECK-P10-NEXT: pli r4, 3567587329
5271 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
5272 ; CHECK-P10-NEXT: lfd f0, 0(r4)
5273 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
5274 ; CHECK-P10-NEXT: mffprd r3, f0
5275 ; CHECK-P10-NEXT: blr
5277 ; CHECK-PREP10-LABEL: ld_cst_unalign64_uint64_t_double:
5278 ; CHECK-PREP10: # %bb.0: # %entry
5279 ; CHECK-PREP10-NEXT: li r3, 29
5280 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
5281 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
5282 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
5283 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
5284 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
5285 ; CHECK-PREP10-NEXT: mffprd r3, f0
5286 ; CHECK-PREP10-NEXT: blr
5288 %0 = load double, double* inttoptr (i64 1000000000001 to double*), align 8
5289 %conv = fptoui double %0 to i64
5293 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5294 define dso_local i64 @ld_cst_align64_uint64_t_double() {
5295 ; CHECK-P10-LABEL: ld_cst_align64_uint64_t_double:
5296 ; CHECK-P10: # %bb.0: # %entry
5297 ; CHECK-P10-NEXT: pli r3, 244140625
5298 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
5299 ; CHECK-P10-NEXT: lfd f0, 0(r3)
5300 ; CHECK-P10-NEXT: xscvdpuxds f0, f0
5301 ; CHECK-P10-NEXT: mffprd r3, f0
5302 ; CHECK-P10-NEXT: blr
5304 ; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_double:
5305 ; CHECK-PREP10: # %bb.0: # %entry
5306 ; CHECK-PREP10-NEXT: lis r3, 3725
5307 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
5308 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
5309 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
5310 ; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
5311 ; CHECK-PREP10-NEXT: mffprd r3, f0
5312 ; CHECK-PREP10-NEXT: blr
5314 %0 = load double, double* inttoptr (i64 1000000000000 to double*), align 4096
5315 %conv = fptoui double %0 to i64
5319 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5320 define dso_local void @st_0_uint64_t_uint8_t(i64 %ptr, i64 %str) {
5321 ; CHECK-LABEL: st_0_uint64_t_uint8_t:
5322 ; CHECK: # %bb.0: # %entry
5323 ; CHECK-NEXT: stb r4, 0(r3)
5326 %conv = trunc i64 %str to i8
5327 %0 = inttoptr i64 %ptr to i8*
5328 store i8 %conv, i8* %0, align 1
5332 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5333 define dso_local void @st_align16_uint64_t_uint8_t(i8* nocapture %ptr, i64 %str) {
5334 ; CHECK-LABEL: st_align16_uint64_t_uint8_t:
5335 ; CHECK: # %bb.0: # %entry
5336 ; CHECK-NEXT: stb r4, 8(r3)
5339 %conv = trunc i64 %str to i8
5340 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
5341 store i8 %conv, i8* %add.ptr, align 1
5345 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5346 define dso_local void @st_align32_uint64_t_uint8_t(i8* nocapture %ptr, i64 %str) {
5347 ; CHECK-P10-LABEL: st_align32_uint64_t_uint8_t:
5348 ; CHECK-P10: # %bb.0: # %entry
5349 ; CHECK-P10-NEXT: pli r5, 99999000
5350 ; CHECK-P10-NEXT: stbx r4, r3, r5
5351 ; CHECK-P10-NEXT: blr
5353 ; CHECK-PREP10-LABEL: st_align32_uint64_t_uint8_t:
5354 ; CHECK-PREP10: # %bb.0: # %entry
5355 ; CHECK-PREP10-NEXT: lis r5, 1525
5356 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
5357 ; CHECK-PREP10-NEXT: stbx r4, r3, r5
5358 ; CHECK-PREP10-NEXT: blr
5360 %conv = trunc i64 %str to i8
5361 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
5362 store i8 %conv, i8* %add.ptr, align 1
5366 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5367 define dso_local void @st_align64_uint64_t_uint8_t(i8* nocapture %ptr, i64 %str) {
5368 ; CHECK-P10-LABEL: st_align64_uint64_t_uint8_t:
5369 ; CHECK-P10: # %bb.0: # %entry
5370 ; CHECK-P10-NEXT: pli r5, 244140625
5371 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
5372 ; CHECK-P10-NEXT: stbx r4, r3, r5
5373 ; CHECK-P10-NEXT: blr
5375 ; CHECK-PREP10-LABEL: st_align64_uint64_t_uint8_t:
5376 ; CHECK-PREP10: # %bb.0: # %entry
5377 ; CHECK-PREP10-NEXT: lis r5, 3725
5378 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
5379 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
5380 ; CHECK-PREP10-NEXT: stbx r4, r3, r5
5381 ; CHECK-PREP10-NEXT: blr
5383 %conv = trunc i64 %str to i8
5384 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
5385 store i8 %conv, i8* %add.ptr, align 1
5389 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5390 define dso_local void @st_reg_uint64_t_uint8_t(i8* nocapture %ptr, i64 %off, i64 %str) {
5391 ; CHECK-LABEL: st_reg_uint64_t_uint8_t:
5392 ; CHECK: # %bb.0: # %entry
5393 ; CHECK-NEXT: stbx r5, r3, r4
5396 %conv = trunc i64 %str to i8
5397 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
5398 store i8 %conv, i8* %add.ptr, align 1
5402 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5403 define dso_local void @st_or1_uint64_t_uint8_t(i64 %ptr, i8 zeroext %off, i64 %str) {
5404 ; CHECK-LABEL: st_or1_uint64_t_uint8_t:
5405 ; CHECK: # %bb.0: # %entry
5406 ; CHECK-NEXT: or r3, r4, r3
5407 ; CHECK-NEXT: stb r5, 0(r3)
5410 %conv = trunc i64 %str to i8
5411 %conv1 = zext i8 %off to i64
5412 %or = or i64 %conv1, %ptr
5413 %0 = inttoptr i64 %or to i8*
5414 store i8 %conv, i8* %0, align 1
5418 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5419 define dso_local void @st_or2_uint64_t_uint8_t(i64 %ptr, i8 zeroext %off, i64 %str) {
5420 ; CHECK-LABEL: st_or2_uint64_t_uint8_t:
5421 ; CHECK: # %bb.0: # %entry
5422 ; CHECK-NEXT: rldicr r3, r3, 0, 51
5423 ; CHECK-NEXT: stbx r5, r3, r4
5426 %and = and i64 %ptr, -4096
5427 %conv = trunc i64 %str to i8
5428 %conv1 = zext i8 %off to i64
5429 %or = or i64 %and, %conv1
5430 %0 = inttoptr i64 %or to i8*
5431 store i8 %conv, i8* %0, align 1
5435 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5436 define dso_local void @st_not_disjoint16_uint64_t_uint8_t(i64 %ptr, i64 %str) {
5437 ; CHECK-LABEL: st_not_disjoint16_uint64_t_uint8_t:
5438 ; CHECK: # %bb.0: # %entry
5439 ; CHECK-NEXT: ori r3, r3, 6
5440 ; CHECK-NEXT: stb r4, 0(r3)
5443 %conv = trunc i64 %str to i8
5444 %or = or i64 %ptr, 6
5445 %0 = inttoptr i64 %or to i8*
5446 store i8 %conv, i8* %0, align 1
5450 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5451 define dso_local void @st_disjoint_align16_uint64_t_uint8_t(i64 %ptr, i64 %str) {
5452 ; CHECK-LABEL: st_disjoint_align16_uint64_t_uint8_t:
5453 ; CHECK: # %bb.0: # %entry
5454 ; CHECK-NEXT: rldicr r3, r3, 0, 51
5455 ; CHECK-NEXT: stb r4, 24(r3)
5458 %and = and i64 %ptr, -4096
5459 %conv = trunc i64 %str to i8
5460 %or = or i64 %and, 24
5461 %0 = inttoptr i64 %or to i8*
5462 store i8 %conv, i8* %0, align 8
5466 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5467 define dso_local void @st_not_disjoint32_uint64_t_uint8_t(i64 %ptr, i64 %str) {
5468 ; CHECK-LABEL: st_not_disjoint32_uint64_t_uint8_t:
5469 ; CHECK: # %bb.0: # %entry
5470 ; CHECK-NEXT: ori r3, r3, 34463
5471 ; CHECK-NEXT: oris r3, r3, 1
5472 ; CHECK-NEXT: stb r4, 0(r3)
5475 %conv = trunc i64 %str to i8
5476 %or = or i64 %ptr, 99999
5477 %0 = inttoptr i64 %or to i8*
5478 store i8 %conv, i8* %0, align 1
5482 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5483 define dso_local void @st_disjoint_align32_uint64_t_uint8_t(i64 %ptr, i64 %str) {
5484 ; CHECK-P10-LABEL: st_disjoint_align32_uint64_t_uint8_t:
5485 ; CHECK-P10: # %bb.0: # %entry
5486 ; CHECK-P10-NEXT: lis r5, -15264
5487 ; CHECK-P10-NEXT: and r3, r3, r5
5488 ; CHECK-P10-NEXT: pli r5, 999990000
5489 ; CHECK-P10-NEXT: stbx r4, r3, r5
5490 ; CHECK-P10-NEXT: blr
5492 ; CHECK-P9-LABEL: st_disjoint_align32_uint64_t_uint8_t:
5493 ; CHECK-P9: # %bb.0: # %entry
5494 ; CHECK-P9-NEXT: lis r5, -15264
5495 ; CHECK-P9-NEXT: and r3, r3, r5
5496 ; CHECK-P9-NEXT: lis r5, 15258
5497 ; CHECK-P9-NEXT: ori r5, r5, 41712
5498 ; CHECK-P9-NEXT: stbx r4, r3, r5
5499 ; CHECK-P9-NEXT: blr
5501 ; CHECK-P8-LABEL: st_disjoint_align32_uint64_t_uint8_t:
5502 ; CHECK-P8: # %bb.0: # %entry
5503 ; CHECK-P8-NEXT: lis r5, -15264
5504 ; CHECK-P8-NEXT: lis r6, 15258
5505 ; CHECK-P8-NEXT: and r3, r3, r5
5506 ; CHECK-P8-NEXT: ori r5, r6, 41712
5507 ; CHECK-P8-NEXT: stbx r4, r3, r5
5508 ; CHECK-P8-NEXT: blr
5510 %and = and i64 %ptr, -1000341504
5511 %conv = trunc i64 %str to i8
5512 %or = or i64 %and, 999990000
5513 %0 = inttoptr i64 %or to i8*
5514 store i8 %conv, i8* %0, align 16
5518 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5519 define dso_local void @st_not_disjoint64_uint64_t_uint8_t(i64 %ptr, i64 %str) {
5520 ; CHECK-P10-LABEL: st_not_disjoint64_uint64_t_uint8_t:
5521 ; CHECK-P10: # %bb.0: # %entry
5522 ; CHECK-P10-NEXT: pli r5, 232
5523 ; CHECK-P10-NEXT: pli r6, 3567587329
5524 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
5525 ; CHECK-P10-NEXT: or r3, r3, r6
5526 ; CHECK-P10-NEXT: stb r4, 0(r3)
5527 ; CHECK-P10-NEXT: blr
5529 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint64_t_uint8_t:
5530 ; CHECK-PREP10: # %bb.0: # %entry
5531 ; CHECK-PREP10-NEXT: li r5, 29
5532 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
5533 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
5534 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
5535 ; CHECK-PREP10-NEXT: or r3, r3, r5
5536 ; CHECK-PREP10-NEXT: stb r4, 0(r3)
5537 ; CHECK-PREP10-NEXT: blr
5539 %conv = trunc i64 %str to i8
5540 %or = or i64 %ptr, 1000000000001
5541 %0 = inttoptr i64 %or to i8*
5542 store i8 %conv, i8* %0, align 1
5546 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5547 define dso_local void @st_disjoint_align64_uint64_t_uint8_t(i64 %ptr, i64 %str) {
5548 ; CHECK-P10-LABEL: st_disjoint_align64_uint64_t_uint8_t:
5549 ; CHECK-P10: # %bb.0: # %entry
5550 ; CHECK-P10-NEXT: pli r5, 244140625
5551 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
5552 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
5553 ; CHECK-P10-NEXT: stbx r4, r3, r5
5554 ; CHECK-P10-NEXT: blr
5556 ; CHECK-PREP10-LABEL: st_disjoint_align64_uint64_t_uint8_t:
5557 ; CHECK-PREP10: # %bb.0: # %entry
5558 ; CHECK-PREP10-NEXT: lis r5, 3725
5559 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
5560 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
5561 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
5562 ; CHECK-PREP10-NEXT: stbx r4, r3, r5
5563 ; CHECK-PREP10-NEXT: blr
5565 %and = and i64 %ptr, -1099511627776
5566 %conv = trunc i64 %str to i8
5567 %or = or i64 %and, 1000000000000
5568 %0 = inttoptr i64 %or to i8*
5569 store i8 %conv, i8* %0, align 4096
5573 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5574 define dso_local void @st_cst_align16_uint64_t_uint8_t(i64 %str) {
5575 ; CHECK-LABEL: st_cst_align16_uint64_t_uint8_t:
5576 ; CHECK: # %bb.0: # %entry
5577 ; CHECK-NEXT: stb r3, 4080(0)
5580 %conv = trunc i64 %str to i8
5581 store i8 %conv, i8* inttoptr (i64 4080 to i8*), align 16
5585 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5586 define dso_local void @st_cst_align32_uint64_t_uint8_t(i64 %str) {
5587 ; CHECK-LABEL: st_cst_align32_uint64_t_uint8_t:
5588 ; CHECK: # %bb.0: # %entry
5589 ; CHECK-NEXT: lis r4, 153
5590 ; CHECK-NEXT: stb r3, -27108(r4)
5593 %conv = trunc i64 %str to i8
5594 store i8 %conv, i8* inttoptr (i64 9999900 to i8*), align 4
5598 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5599 define dso_local void @st_cst_align64_uint64_t_uint8_t(i64 %str) {
5600 ; CHECK-P10-LABEL: st_cst_align64_uint64_t_uint8_t:
5601 ; CHECK-P10: # %bb.0: # %entry
5602 ; CHECK-P10-NEXT: pli r4, 244140625
5603 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5604 ; CHECK-P10-NEXT: stb r3, 0(r4)
5605 ; CHECK-P10-NEXT: blr
5607 ; CHECK-PREP10-LABEL: st_cst_align64_uint64_t_uint8_t:
5608 ; CHECK-PREP10: # %bb.0: # %entry
5609 ; CHECK-PREP10-NEXT: lis r4, 3725
5610 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
5611 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
5612 ; CHECK-PREP10-NEXT: stb r3, 0(r4)
5613 ; CHECK-PREP10-NEXT: blr
5615 %conv = trunc i64 %str to i8
5616 store i8 %conv, i8* inttoptr (i64 1000000000000 to i8*), align 4096
5620 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5621 define dso_local void @st_0_uint64_t_uint16_t(i64 %ptr, i64 %str) {
5622 ; CHECK-LABEL: st_0_uint64_t_uint16_t:
5623 ; CHECK: # %bb.0: # %entry
5624 ; CHECK-NEXT: sth r4, 0(r3)
5627 %conv = trunc i64 %str to i16
5628 %0 = inttoptr i64 %ptr to i16*
5629 store i16 %conv, i16* %0, align 2
5633 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5634 define dso_local void @st_align16_uint64_t_uint16_t(i8* nocapture %ptr, i64 %str) {
5635 ; CHECK-LABEL: st_align16_uint64_t_uint16_t:
5636 ; CHECK: # %bb.0: # %entry
5637 ; CHECK-NEXT: sth r4, 8(r3)
5640 %conv = trunc i64 %str to i16
5641 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
5642 %0 = bitcast i8* %add.ptr to i16*
5643 store i16 %conv, i16* %0, align 2
5647 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5648 define dso_local void @st_align32_uint64_t_uint16_t(i8* nocapture %ptr, i64 %str) {
5649 ; CHECK-P10-LABEL: st_align32_uint64_t_uint16_t:
5650 ; CHECK-P10: # %bb.0: # %entry
5651 ; CHECK-P10-NEXT: pli r5, 99999000
5652 ; CHECK-P10-NEXT: sthx r4, r3, r5
5653 ; CHECK-P10-NEXT: blr
5655 ; CHECK-PREP10-LABEL: st_align32_uint64_t_uint16_t:
5656 ; CHECK-PREP10: # %bb.0: # %entry
5657 ; CHECK-PREP10-NEXT: lis r5, 1525
5658 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
5659 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
5660 ; CHECK-PREP10-NEXT: blr
5662 %conv = trunc i64 %str to i16
5663 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
5664 %0 = bitcast i8* %add.ptr to i16*
5665 store i16 %conv, i16* %0, align 2
5669 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5670 define dso_local void @st_align64_uint64_t_uint16_t(i8* nocapture %ptr, i64 %str) {
5671 ; CHECK-P10-LABEL: st_align64_uint64_t_uint16_t:
5672 ; CHECK-P10: # %bb.0: # %entry
5673 ; CHECK-P10-NEXT: pli r5, 244140625
5674 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
5675 ; CHECK-P10-NEXT: sthx r4, r3, r5
5676 ; CHECK-P10-NEXT: blr
5678 ; CHECK-PREP10-LABEL: st_align64_uint64_t_uint16_t:
5679 ; CHECK-PREP10: # %bb.0: # %entry
5680 ; CHECK-PREP10-NEXT: lis r5, 3725
5681 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
5682 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
5683 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
5684 ; CHECK-PREP10-NEXT: blr
5686 %conv = trunc i64 %str to i16
5687 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
5688 %0 = bitcast i8* %add.ptr to i16*
5689 store i16 %conv, i16* %0, align 2
5693 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5694 define dso_local void @st_reg_uint64_t_uint16_t(i8* nocapture %ptr, i64 %off, i64 %str) {
5695 ; CHECK-LABEL: st_reg_uint64_t_uint16_t:
5696 ; CHECK: # %bb.0: # %entry
5697 ; CHECK-NEXT: sthx r5, r3, r4
5700 %conv = trunc i64 %str to i16
5701 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
5702 %0 = bitcast i8* %add.ptr to i16*
5703 store i16 %conv, i16* %0, align 2
5707 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5708 define dso_local void @st_or1_uint64_t_uint16_t(i64 %ptr, i8 zeroext %off, i64 %str) {
5709 ; CHECK-LABEL: st_or1_uint64_t_uint16_t:
5710 ; CHECK: # %bb.0: # %entry
5711 ; CHECK-NEXT: or r3, r4, r3
5712 ; CHECK-NEXT: sth r5, 0(r3)
5715 %conv = trunc i64 %str to i16
5716 %conv1 = zext i8 %off to i64
5717 %or = or i64 %conv1, %ptr
5718 %0 = inttoptr i64 %or to i16*
5719 store i16 %conv, i16* %0, align 2
5723 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5724 define dso_local void @st_or2_uint64_t_uint16_t(i64 %ptr, i8 zeroext %off, i64 %str) {
5725 ; CHECK-LABEL: st_or2_uint64_t_uint16_t:
5726 ; CHECK: # %bb.0: # %entry
5727 ; CHECK-NEXT: rldicr r3, r3, 0, 51
5728 ; CHECK-NEXT: sthx r5, r3, r4
5731 %and = and i64 %ptr, -4096
5732 %conv = trunc i64 %str to i16
5733 %conv1 = zext i8 %off to i64
5734 %or = or i64 %and, %conv1
5735 %0 = inttoptr i64 %or to i16*
5736 store i16 %conv, i16* %0, align 2
5740 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5741 define dso_local void @st_not_disjoint16_uint64_t_uint16_t(i64 %ptr, i64 %str) {
5742 ; CHECK-LABEL: st_not_disjoint16_uint64_t_uint16_t:
5743 ; CHECK: # %bb.0: # %entry
5744 ; CHECK-NEXT: ori r3, r3, 6
5745 ; CHECK-NEXT: sth r4, 0(r3)
5748 %conv = trunc i64 %str to i16
5749 %or = or i64 %ptr, 6
5750 %0 = inttoptr i64 %or to i16*
5751 store i16 %conv, i16* %0, align 2
5755 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5756 define dso_local void @st_disjoint_align16_uint64_t_uint16_t(i64 %ptr, i64 %str) {
5757 ; CHECK-LABEL: st_disjoint_align16_uint64_t_uint16_t:
5758 ; CHECK: # %bb.0: # %entry
5759 ; CHECK-NEXT: rldicr r3, r3, 0, 51
5760 ; CHECK-NEXT: sth r4, 24(r3)
5763 %and = and i64 %ptr, -4096
5764 %conv = trunc i64 %str to i16
5765 %or = or i64 %and, 24
5766 %0 = inttoptr i64 %or to i16*
5767 store i16 %conv, i16* %0, align 8
5771 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5772 define dso_local void @st_not_disjoint32_uint64_t_uint16_t(i64 %ptr, i64 %str) {
5773 ; CHECK-LABEL: st_not_disjoint32_uint64_t_uint16_t:
5774 ; CHECK: # %bb.0: # %entry
5775 ; CHECK-NEXT: ori r3, r3, 34463
5776 ; CHECK-NEXT: oris r3, r3, 1
5777 ; CHECK-NEXT: sth r4, 0(r3)
5780 %conv = trunc i64 %str to i16
5781 %or = or i64 %ptr, 99999
5782 %0 = inttoptr i64 %or to i16*
5783 store i16 %conv, i16* %0, align 2
5787 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5788 define dso_local void @st_disjoint_align32_uint64_t_uint16_t(i64 %ptr, i64 %str) {
5789 ; CHECK-P10-LABEL: st_disjoint_align32_uint64_t_uint16_t:
5790 ; CHECK-P10: # %bb.0: # %entry
5791 ; CHECK-P10-NEXT: lis r5, -15264
5792 ; CHECK-P10-NEXT: and r3, r3, r5
5793 ; CHECK-P10-NEXT: pli r5, 999990000
5794 ; CHECK-P10-NEXT: sthx r4, r3, r5
5795 ; CHECK-P10-NEXT: blr
5797 ; CHECK-P9-LABEL: st_disjoint_align32_uint64_t_uint16_t:
5798 ; CHECK-P9: # %bb.0: # %entry
5799 ; CHECK-P9-NEXT: lis r5, -15264
5800 ; CHECK-P9-NEXT: and r3, r3, r5
5801 ; CHECK-P9-NEXT: lis r5, 15258
5802 ; CHECK-P9-NEXT: ori r5, r5, 41712
5803 ; CHECK-P9-NEXT: sthx r4, r3, r5
5804 ; CHECK-P9-NEXT: blr
5806 ; CHECK-P8-LABEL: st_disjoint_align32_uint64_t_uint16_t:
5807 ; CHECK-P8: # %bb.0: # %entry
5808 ; CHECK-P8-NEXT: lis r5, -15264
5809 ; CHECK-P8-NEXT: lis r6, 15258
5810 ; CHECK-P8-NEXT: and r3, r3, r5
5811 ; CHECK-P8-NEXT: ori r5, r6, 41712
5812 ; CHECK-P8-NEXT: sthx r4, r3, r5
5813 ; CHECK-P8-NEXT: blr
5815 %and = and i64 %ptr, -1000341504
5816 %conv = trunc i64 %str to i16
5817 %or = or i64 %and, 999990000
5818 %0 = inttoptr i64 %or to i16*
5819 store i16 %conv, i16* %0, align 16
5823 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5824 define dso_local void @st_not_disjoint64_uint64_t_uint16_t(i64 %ptr, i64 %str) {
5825 ; CHECK-P10-LABEL: st_not_disjoint64_uint64_t_uint16_t:
5826 ; CHECK-P10: # %bb.0: # %entry
5827 ; CHECK-P10-NEXT: pli r5, 232
5828 ; CHECK-P10-NEXT: pli r6, 3567587329
5829 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
5830 ; CHECK-P10-NEXT: or r3, r3, r6
5831 ; CHECK-P10-NEXT: sth r4, 0(r3)
5832 ; CHECK-P10-NEXT: blr
5834 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint64_t_uint16_t:
5835 ; CHECK-PREP10: # %bb.0: # %entry
5836 ; CHECK-PREP10-NEXT: li r5, 29
5837 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
5838 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
5839 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
5840 ; CHECK-PREP10-NEXT: or r3, r3, r5
5841 ; CHECK-PREP10-NEXT: sth r4, 0(r3)
5842 ; CHECK-PREP10-NEXT: blr
5844 %conv = trunc i64 %str to i16
5845 %or = or i64 %ptr, 1000000000001
5846 %0 = inttoptr i64 %or to i16*
5847 store i16 %conv, i16* %0, align 2
5851 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5852 define dso_local void @st_disjoint_align64_uint64_t_uint16_t(i64 %ptr, i64 %str) {
5853 ; CHECK-P10-LABEL: st_disjoint_align64_uint64_t_uint16_t:
5854 ; CHECK-P10: # %bb.0: # %entry
5855 ; CHECK-P10-NEXT: pli r5, 244140625
5856 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
5857 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
5858 ; CHECK-P10-NEXT: sthx r4, r3, r5
5859 ; CHECK-P10-NEXT: blr
5861 ; CHECK-PREP10-LABEL: st_disjoint_align64_uint64_t_uint16_t:
5862 ; CHECK-PREP10: # %bb.0: # %entry
5863 ; CHECK-PREP10-NEXT: lis r5, 3725
5864 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
5865 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
5866 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
5867 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
5868 ; CHECK-PREP10-NEXT: blr
5870 %and = and i64 %ptr, -1099511627776
5871 %conv = trunc i64 %str to i16
5872 %or = or i64 %and, 1000000000000
5873 %0 = inttoptr i64 %or to i16*
5874 store i16 %conv, i16* %0, align 4096
5878 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5879 define dso_local void @st_cst_align16_uint64_t_uint16_t(i64 %str) {
5880 ; CHECK-LABEL: st_cst_align16_uint64_t_uint16_t:
5881 ; CHECK: # %bb.0: # %entry
5882 ; CHECK-NEXT: sth r3, 4080(0)
5885 %conv = trunc i64 %str to i16
5886 store i16 %conv, i16* inttoptr (i64 4080 to i16*), align 16
5890 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5891 define dso_local void @st_cst_align32_uint64_t_uint16_t(i64 %str) {
5892 ; CHECK-LABEL: st_cst_align32_uint64_t_uint16_t:
5893 ; CHECK: # %bb.0: # %entry
5894 ; CHECK-NEXT: lis r4, 153
5895 ; CHECK-NEXT: sth r3, -27108(r4)
5898 %conv = trunc i64 %str to i16
5899 store i16 %conv, i16* inttoptr (i64 9999900 to i16*), align 4
5903 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5904 define dso_local void @st_cst_align64_uint64_t_uint16_t(i64 %str) {
5905 ; CHECK-P10-LABEL: st_cst_align64_uint64_t_uint16_t:
5906 ; CHECK-P10: # %bb.0: # %entry
5907 ; CHECK-P10-NEXT: pli r4, 244140625
5908 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5909 ; CHECK-P10-NEXT: sth r3, 0(r4)
5910 ; CHECK-P10-NEXT: blr
5912 ; CHECK-PREP10-LABEL: st_cst_align64_uint64_t_uint16_t:
5913 ; CHECK-PREP10: # %bb.0: # %entry
5914 ; CHECK-PREP10-NEXT: lis r4, 3725
5915 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
5916 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
5917 ; CHECK-PREP10-NEXT: sth r3, 0(r4)
5918 ; CHECK-PREP10-NEXT: blr
5920 %conv = trunc i64 %str to i16
5921 store i16 %conv, i16* inttoptr (i64 1000000000000 to i16*), align 4096
5925 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5926 define dso_local void @st_0_uint64_t_int16_t(i64 %ptr, i64 %str) {
5927 ; CHECK-LABEL: st_0_uint64_t_int16_t:
5928 ; CHECK: # %bb.0: # %entry
5929 ; CHECK-NEXT: sth r4, 0(r3)
5932 %conv = trunc i64 %str to i16
5933 %0 = inttoptr i64 %ptr to i16*
5934 store i16 %conv, i16* %0, align 2
5938 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5939 define dso_local void @st_align16_uint64_t_int16_t(i8* nocapture %ptr, i64 %str) {
5940 ; CHECK-LABEL: st_align16_uint64_t_int16_t:
5941 ; CHECK: # %bb.0: # %entry
5942 ; CHECK-NEXT: sth r4, 8(r3)
5945 %conv = trunc i64 %str to i16
5946 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
5947 %0 = bitcast i8* %add.ptr to i16*
5948 store i16 %conv, i16* %0, align 2
5952 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5953 define dso_local void @st_align32_uint64_t_int16_t(i8* nocapture %ptr, i64 %str) {
5954 ; CHECK-P10-LABEL: st_align32_uint64_t_int16_t:
5955 ; CHECK-P10: # %bb.0: # %entry
5956 ; CHECK-P10-NEXT: pli r5, 99999000
5957 ; CHECK-P10-NEXT: sthx r4, r3, r5
5958 ; CHECK-P10-NEXT: blr
5960 ; CHECK-PREP10-LABEL: st_align32_uint64_t_int16_t:
5961 ; CHECK-PREP10: # %bb.0: # %entry
5962 ; CHECK-PREP10-NEXT: lis r5, 1525
5963 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
5964 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
5965 ; CHECK-PREP10-NEXT: blr
5967 %conv = trunc i64 %str to i16
5968 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
5969 %0 = bitcast i8* %add.ptr to i16*
5970 store i16 %conv, i16* %0, align 2
5974 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5975 define dso_local void @st_align64_uint64_t_int16_t(i8* nocapture %ptr, i64 %str) {
5976 ; CHECK-P10-LABEL: st_align64_uint64_t_int16_t:
5977 ; CHECK-P10: # %bb.0: # %entry
5978 ; CHECK-P10-NEXT: pli r5, 244140625
5979 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
5980 ; CHECK-P10-NEXT: sthx r4, r3, r5
5981 ; CHECK-P10-NEXT: blr
5983 ; CHECK-PREP10-LABEL: st_align64_uint64_t_int16_t:
5984 ; CHECK-PREP10: # %bb.0: # %entry
5985 ; CHECK-PREP10-NEXT: lis r5, 3725
5986 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
5987 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
5988 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
5989 ; CHECK-PREP10-NEXT: blr
5991 %conv = trunc i64 %str to i16
5992 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
5993 %0 = bitcast i8* %add.ptr to i16*
5994 store i16 %conv, i16* %0, align 2
5998 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5999 define dso_local void @st_reg_uint64_t_int16_t(i8* nocapture %ptr, i64 %off, i64 %str) {
6000 ; CHECK-LABEL: st_reg_uint64_t_int16_t:
6001 ; CHECK: # %bb.0: # %entry
6002 ; CHECK-NEXT: sthx r5, r3, r4
6005 %conv = trunc i64 %str to i16
6006 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
6007 %0 = bitcast i8* %add.ptr to i16*
6008 store i16 %conv, i16* %0, align 2
6012 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6013 define dso_local void @st_or1_uint64_t_int16_t(i64 %ptr, i8 zeroext %off, i64 %str) {
6014 ; CHECK-LABEL: st_or1_uint64_t_int16_t:
6015 ; CHECK: # %bb.0: # %entry
6016 ; CHECK-NEXT: or r3, r4, r3
6017 ; CHECK-NEXT: sth r5, 0(r3)
6020 %conv = trunc i64 %str to i16
6021 %conv1 = zext i8 %off to i64
6022 %or = or i64 %conv1, %ptr
6023 %0 = inttoptr i64 %or to i16*
6024 store i16 %conv, i16* %0, align 2
6028 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6029 define dso_local void @st_or2_uint64_t_int16_t(i64 %ptr, i8 zeroext %off, i64 %str) {
6030 ; CHECK-LABEL: st_or2_uint64_t_int16_t:
6031 ; CHECK: # %bb.0: # %entry
6032 ; CHECK-NEXT: rldicr r3, r3, 0, 51
6033 ; CHECK-NEXT: sthx r5, r3, r4
6036 %and = and i64 %ptr, -4096
6037 %conv = trunc i64 %str to i16
6038 %conv1 = zext i8 %off to i64
6039 %or = or i64 %and, %conv1
6040 %0 = inttoptr i64 %or to i16*
6041 store i16 %conv, i16* %0, align 2
6045 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6046 define dso_local void @st_not_disjoint16_uint64_t_int16_t(i64 %ptr, i64 %str) {
6047 ; CHECK-LABEL: st_not_disjoint16_uint64_t_int16_t:
6048 ; CHECK: # %bb.0: # %entry
6049 ; CHECK-NEXT: ori r3, r3, 6
6050 ; CHECK-NEXT: sth r4, 0(r3)
6053 %conv = trunc i64 %str to i16
6054 %or = or i64 %ptr, 6
6055 %0 = inttoptr i64 %or to i16*
6056 store i16 %conv, i16* %0, align 2
6060 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6061 define dso_local void @st_disjoint_align16_uint64_t_int16_t(i64 %ptr, i64 %str) {
6062 ; CHECK-LABEL: st_disjoint_align16_uint64_t_int16_t:
6063 ; CHECK: # %bb.0: # %entry
6064 ; CHECK-NEXT: rldicr r3, r3, 0, 51
6065 ; CHECK-NEXT: sth r4, 24(r3)
6068 %and = and i64 %ptr, -4096
6069 %conv = trunc i64 %str to i16
6070 %or = or i64 %and, 24
6071 %0 = inttoptr i64 %or to i16*
6072 store i16 %conv, i16* %0, align 8
6076 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6077 define dso_local void @st_not_disjoint32_uint64_t_int16_t(i64 %ptr, i64 %str) {
6078 ; CHECK-LABEL: st_not_disjoint32_uint64_t_int16_t:
6079 ; CHECK: # %bb.0: # %entry
6080 ; CHECK-NEXT: ori r3, r3, 34463
6081 ; CHECK-NEXT: oris r3, r3, 1
6082 ; CHECK-NEXT: sth r4, 0(r3)
6085 %conv = trunc i64 %str to i16
6086 %or = or i64 %ptr, 99999
6087 %0 = inttoptr i64 %or to i16*
6088 store i16 %conv, i16* %0, align 2
6092 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6093 define dso_local void @st_disjoint_align32_uint64_t_int16_t(i64 %ptr, i64 %str) {
6094 ; CHECK-P10-LABEL: st_disjoint_align32_uint64_t_int16_t:
6095 ; CHECK-P10: # %bb.0: # %entry
6096 ; CHECK-P10-NEXT: lis r5, -15264
6097 ; CHECK-P10-NEXT: and r3, r3, r5
6098 ; CHECK-P10-NEXT: pli r5, 999990000
6099 ; CHECK-P10-NEXT: sthx r4, r3, r5
6100 ; CHECK-P10-NEXT: blr
6102 ; CHECK-P9-LABEL: st_disjoint_align32_uint64_t_int16_t:
6103 ; CHECK-P9: # %bb.0: # %entry
6104 ; CHECK-P9-NEXT: lis r5, -15264
6105 ; CHECK-P9-NEXT: and r3, r3, r5
6106 ; CHECK-P9-NEXT: lis r5, 15258
6107 ; CHECK-P9-NEXT: ori r5, r5, 41712
6108 ; CHECK-P9-NEXT: sthx r4, r3, r5
6109 ; CHECK-P9-NEXT: blr
6111 ; CHECK-P8-LABEL: st_disjoint_align32_uint64_t_int16_t:
6112 ; CHECK-P8: # %bb.0: # %entry
6113 ; CHECK-P8-NEXT: lis r5, -15264
6114 ; CHECK-P8-NEXT: lis r6, 15258
6115 ; CHECK-P8-NEXT: and r3, r3, r5
6116 ; CHECK-P8-NEXT: ori r5, r6, 41712
6117 ; CHECK-P8-NEXT: sthx r4, r3, r5
6118 ; CHECK-P8-NEXT: blr
6120 %and = and i64 %ptr, -1000341504
6121 %conv = trunc i64 %str to i16
6122 %or = or i64 %and, 999990000
6123 %0 = inttoptr i64 %or to i16*
6124 store i16 %conv, i16* %0, align 16
6128 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6129 define dso_local void @st_not_disjoint64_uint64_t_int16_t(i64 %ptr, i64 %str) {
6130 ; CHECK-P10-LABEL: st_not_disjoint64_uint64_t_int16_t:
6131 ; CHECK-P10: # %bb.0: # %entry
6132 ; CHECK-P10-NEXT: pli r5, 232
6133 ; CHECK-P10-NEXT: pli r6, 3567587329
6134 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
6135 ; CHECK-P10-NEXT: or r3, r3, r6
6136 ; CHECK-P10-NEXT: sth r4, 0(r3)
6137 ; CHECK-P10-NEXT: blr
6139 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint64_t_int16_t:
6140 ; CHECK-PREP10: # %bb.0: # %entry
6141 ; CHECK-PREP10-NEXT: li r5, 29
6142 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
6143 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
6144 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
6145 ; CHECK-PREP10-NEXT: or r3, r3, r5
6146 ; CHECK-PREP10-NEXT: sth r4, 0(r3)
6147 ; CHECK-PREP10-NEXT: blr
6149 %conv = trunc i64 %str to i16
6150 %or = or i64 %ptr, 1000000000001
6151 %0 = inttoptr i64 %or to i16*
6152 store i16 %conv, i16* %0, align 2
6156 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6157 define dso_local void @st_disjoint_align64_uint64_t_int16_t(i64 %ptr, i64 %str) {
6158 ; CHECK-P10-LABEL: st_disjoint_align64_uint64_t_int16_t:
6159 ; CHECK-P10: # %bb.0: # %entry
6160 ; CHECK-P10-NEXT: pli r5, 244140625
6161 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
6162 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6163 ; CHECK-P10-NEXT: sthx r4, r3, r5
6164 ; CHECK-P10-NEXT: blr
6166 ; CHECK-PREP10-LABEL: st_disjoint_align64_uint64_t_int16_t:
6167 ; CHECK-PREP10: # %bb.0: # %entry
6168 ; CHECK-PREP10-NEXT: lis r5, 3725
6169 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
6170 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6171 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6172 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
6173 ; CHECK-PREP10-NEXT: blr
6175 %and = and i64 %ptr, -1099511627776
6176 %conv = trunc i64 %str to i16
6177 %or = or i64 %and, 1000000000000
6178 %0 = inttoptr i64 %or to i16*
6179 store i16 %conv, i16* %0, align 4096
6183 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6184 define dso_local void @st_cst_align16_uint64_t_int16_t(i64 %str) {
6185 ; CHECK-LABEL: st_cst_align16_uint64_t_int16_t:
6186 ; CHECK: # %bb.0: # %entry
6187 ; CHECK-NEXT: sth r3, 4080(0)
6190 %conv = trunc i64 %str to i16
6191 store i16 %conv, i16* inttoptr (i64 4080 to i16*), align 16
6195 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6196 define dso_local void @st_cst_align32_uint64_t_int16_t(i64 %str) {
6197 ; CHECK-LABEL: st_cst_align32_uint64_t_int16_t:
6198 ; CHECK: # %bb.0: # %entry
6199 ; CHECK-NEXT: lis r4, 153
6200 ; CHECK-NEXT: sth r3, -27108(r4)
6203 %conv = trunc i64 %str to i16
6204 store i16 %conv, i16* inttoptr (i64 9999900 to i16*), align 4
6208 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6209 define dso_local void @st_cst_align64_uint64_t_int16_t(i64 %str) {
6210 ; CHECK-P10-LABEL: st_cst_align64_uint64_t_int16_t:
6211 ; CHECK-P10: # %bb.0: # %entry
6212 ; CHECK-P10-NEXT: pli r4, 244140625
6213 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6214 ; CHECK-P10-NEXT: sth r3, 0(r4)
6215 ; CHECK-P10-NEXT: blr
6217 ; CHECK-PREP10-LABEL: st_cst_align64_uint64_t_int16_t:
6218 ; CHECK-PREP10: # %bb.0: # %entry
6219 ; CHECK-PREP10-NEXT: lis r4, 3725
6220 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
6221 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
6222 ; CHECK-PREP10-NEXT: sth r3, 0(r4)
6223 ; CHECK-PREP10-NEXT: blr
6225 %conv = trunc i64 %str to i16
6226 store i16 %conv, i16* inttoptr (i64 1000000000000 to i16*), align 4096
6230 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6231 define dso_local void @st_0_uint64_t_uint32_t(i64 %ptr, i64 %str) {
6232 ; CHECK-LABEL: st_0_uint64_t_uint32_t:
6233 ; CHECK: # %bb.0: # %entry
6234 ; CHECK-NEXT: stw r4, 0(r3)
6237 %conv = trunc i64 %str to i32
6238 %0 = inttoptr i64 %ptr to i32*
6239 store i32 %conv, i32* %0, align 4
6243 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6244 define dso_local void @st_align16_uint64_t_uint32_t(i8* nocapture %ptr, i64 %str) {
6245 ; CHECK-LABEL: st_align16_uint64_t_uint32_t:
6246 ; CHECK: # %bb.0: # %entry
6247 ; CHECK-NEXT: stw r4, 8(r3)
6250 %conv = trunc i64 %str to i32
6251 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
6252 %0 = bitcast i8* %add.ptr to i32*
6253 store i32 %conv, i32* %0, align 4
6257 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6258 define dso_local void @st_align32_uint64_t_uint32_t(i8* nocapture %ptr, i64 %str) {
6259 ; CHECK-P10-LABEL: st_align32_uint64_t_uint32_t:
6260 ; CHECK-P10: # %bb.0: # %entry
6261 ; CHECK-P10-NEXT: pli r5, 99999000
6262 ; CHECK-P10-NEXT: stwx r4, r3, r5
6263 ; CHECK-P10-NEXT: blr
6265 ; CHECK-PREP10-LABEL: st_align32_uint64_t_uint32_t:
6266 ; CHECK-PREP10: # %bb.0: # %entry
6267 ; CHECK-PREP10-NEXT: lis r5, 1525
6268 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
6269 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
6270 ; CHECK-PREP10-NEXT: blr
6272 %conv = trunc i64 %str to i32
6273 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
6274 %0 = bitcast i8* %add.ptr to i32*
6275 store i32 %conv, i32* %0, align 4
6279 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6280 define dso_local void @st_align64_uint64_t_uint32_t(i8* nocapture %ptr, i64 %str) {
6281 ; CHECK-P10-LABEL: st_align64_uint64_t_uint32_t:
6282 ; CHECK-P10: # %bb.0: # %entry
6283 ; CHECK-P10-NEXT: pli r5, 244140625
6284 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6285 ; CHECK-P10-NEXT: stwx r4, r3, r5
6286 ; CHECK-P10-NEXT: blr
6288 ; CHECK-PREP10-LABEL: st_align64_uint64_t_uint32_t:
6289 ; CHECK-PREP10: # %bb.0: # %entry
6290 ; CHECK-PREP10-NEXT: lis r5, 3725
6291 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6292 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6293 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
6294 ; CHECK-PREP10-NEXT: blr
6296 %conv = trunc i64 %str to i32
6297 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
6298 %0 = bitcast i8* %add.ptr to i32*
6299 store i32 %conv, i32* %0, align 4
6303 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6304 define dso_local void @st_reg_uint64_t_uint32_t(i8* nocapture %ptr, i64 %off, i64 %str) {
6305 ; CHECK-LABEL: st_reg_uint64_t_uint32_t:
6306 ; CHECK: # %bb.0: # %entry
6307 ; CHECK-NEXT: stwx r5, r3, r4
6310 %conv = trunc i64 %str to i32
6311 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
6312 %0 = bitcast i8* %add.ptr to i32*
6313 store i32 %conv, i32* %0, align 4
6317 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6318 define dso_local void @st_or1_uint64_t_uint32_t(i64 %ptr, i8 zeroext %off, i64 %str) {
6319 ; CHECK-LABEL: st_or1_uint64_t_uint32_t:
6320 ; CHECK: # %bb.0: # %entry
6321 ; CHECK-NEXT: or r3, r4, r3
6322 ; CHECK-NEXT: stw r5, 0(r3)
6325 %conv = trunc i64 %str to i32
6326 %conv1 = zext i8 %off to i64
6327 %or = or i64 %conv1, %ptr
6328 %0 = inttoptr i64 %or to i32*
6329 store i32 %conv, i32* %0, align 4
6333 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6334 define dso_local void @st_or2_uint64_t_uint32_t(i64 %ptr, i8 zeroext %off, i64 %str) {
6335 ; CHECK-LABEL: st_or2_uint64_t_uint32_t:
6336 ; CHECK: # %bb.0: # %entry
6337 ; CHECK-NEXT: rldicr r3, r3, 0, 51
6338 ; CHECK-NEXT: stwx r5, r3, r4
6341 %and = and i64 %ptr, -4096
6342 %conv = trunc i64 %str to i32
6343 %conv1 = zext i8 %off to i64
6344 %or = or i64 %and, %conv1
6345 %0 = inttoptr i64 %or to i32*
6346 store i32 %conv, i32* %0, align 4
6350 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6351 define dso_local void @st_not_disjoint16_uint64_t_uint32_t(i64 %ptr, i64 %str) {
6352 ; CHECK-LABEL: st_not_disjoint16_uint64_t_uint32_t:
6353 ; CHECK: # %bb.0: # %entry
6354 ; CHECK-NEXT: ori r3, r3, 6
6355 ; CHECK-NEXT: stw r4, 0(r3)
6358 %conv = trunc i64 %str to i32
6359 %or = or i64 %ptr, 6
6360 %0 = inttoptr i64 %or to i32*
6361 store i32 %conv, i32* %0, align 4
6365 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6366 define dso_local void @st_disjoint_align16_uint64_t_uint32_t(i64 %ptr, i64 %str) {
6367 ; CHECK-LABEL: st_disjoint_align16_uint64_t_uint32_t:
6368 ; CHECK: # %bb.0: # %entry
6369 ; CHECK-NEXT: rldicr r3, r3, 0, 51
6370 ; CHECK-NEXT: stw r4, 24(r3)
6373 %and = and i64 %ptr, -4096
6374 %conv = trunc i64 %str to i32
6375 %or = or i64 %and, 24
6376 %0 = inttoptr i64 %or to i32*
6377 store i32 %conv, i32* %0, align 8
6381 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6382 define dso_local void @st_not_disjoint32_uint64_t_uint32_t(i64 %ptr, i64 %str) {
6383 ; CHECK-LABEL: st_not_disjoint32_uint64_t_uint32_t:
6384 ; CHECK: # %bb.0: # %entry
6385 ; CHECK-NEXT: ori r3, r3, 34463
6386 ; CHECK-NEXT: oris r3, r3, 1
6387 ; CHECK-NEXT: stw r4, 0(r3)
6390 %conv = trunc i64 %str to i32
6391 %or = or i64 %ptr, 99999
6392 %0 = inttoptr i64 %or to i32*
6393 store i32 %conv, i32* %0, align 4
6397 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6398 define dso_local void @st_disjoint_align32_uint64_t_uint32_t(i64 %ptr, i64 %str) {
6399 ; CHECK-P10-LABEL: st_disjoint_align32_uint64_t_uint32_t:
6400 ; CHECK-P10: # %bb.0: # %entry
6401 ; CHECK-P10-NEXT: lis r5, -15264
6402 ; CHECK-P10-NEXT: and r3, r3, r5
6403 ; CHECK-P10-NEXT: pli r5, 999990000
6404 ; CHECK-P10-NEXT: stwx r4, r3, r5
6405 ; CHECK-P10-NEXT: blr
6407 ; CHECK-P9-LABEL: st_disjoint_align32_uint64_t_uint32_t:
6408 ; CHECK-P9: # %bb.0: # %entry
6409 ; CHECK-P9-NEXT: lis r5, -15264
6410 ; CHECK-P9-NEXT: and r3, r3, r5
6411 ; CHECK-P9-NEXT: lis r5, 15258
6412 ; CHECK-P9-NEXT: ori r5, r5, 41712
6413 ; CHECK-P9-NEXT: stwx r4, r3, r5
6414 ; CHECK-P9-NEXT: blr
6416 ; CHECK-P8-LABEL: st_disjoint_align32_uint64_t_uint32_t:
6417 ; CHECK-P8: # %bb.0: # %entry
6418 ; CHECK-P8-NEXT: lis r5, -15264
6419 ; CHECK-P8-NEXT: lis r6, 15258
6420 ; CHECK-P8-NEXT: and r3, r3, r5
6421 ; CHECK-P8-NEXT: ori r5, r6, 41712
6422 ; CHECK-P8-NEXT: stwx r4, r3, r5
6423 ; CHECK-P8-NEXT: blr
6425 %and = and i64 %ptr, -1000341504
6426 %conv = trunc i64 %str to i32
6427 %or = or i64 %and, 999990000
6428 %0 = inttoptr i64 %or to i32*
6429 store i32 %conv, i32* %0, align 16
6433 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6434 define dso_local void @st_not_disjoint64_uint64_t_uint32_t(i64 %ptr, i64 %str) {
6435 ; CHECK-P10-LABEL: st_not_disjoint64_uint64_t_uint32_t:
6436 ; CHECK-P10: # %bb.0: # %entry
6437 ; CHECK-P10-NEXT: pli r5, 232
6438 ; CHECK-P10-NEXT: pli r6, 3567587329
6439 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
6440 ; CHECK-P10-NEXT: or r3, r3, r6
6441 ; CHECK-P10-NEXT: stw r4, 0(r3)
6442 ; CHECK-P10-NEXT: blr
6444 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint64_t_uint32_t:
6445 ; CHECK-PREP10: # %bb.0: # %entry
6446 ; CHECK-PREP10-NEXT: li r5, 29
6447 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
6448 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
6449 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
6450 ; CHECK-PREP10-NEXT: or r3, r3, r5
6451 ; CHECK-PREP10-NEXT: stw r4, 0(r3)
6452 ; CHECK-PREP10-NEXT: blr
6454 %conv = trunc i64 %str to i32
6455 %or = or i64 %ptr, 1000000000001
6456 %0 = inttoptr i64 %or to i32*
6457 store i32 %conv, i32* %0, align 4
6461 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6462 define dso_local void @st_disjoint_align64_uint64_t_uint32_t(i64 %ptr, i64 %str) {
6463 ; CHECK-P10-LABEL: st_disjoint_align64_uint64_t_uint32_t:
6464 ; CHECK-P10: # %bb.0: # %entry
6465 ; CHECK-P10-NEXT: pli r5, 244140625
6466 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
6467 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6468 ; CHECK-P10-NEXT: stwx r4, r3, r5
6469 ; CHECK-P10-NEXT: blr
6471 ; CHECK-PREP10-LABEL: st_disjoint_align64_uint64_t_uint32_t:
6472 ; CHECK-PREP10: # %bb.0: # %entry
6473 ; CHECK-PREP10-NEXT: lis r5, 3725
6474 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
6475 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6476 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6477 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
6478 ; CHECK-PREP10-NEXT: blr
6480 %and = and i64 %ptr, -1099511627776
6481 %conv = trunc i64 %str to i32
6482 %or = or i64 %and, 1000000000000
6483 %0 = inttoptr i64 %or to i32*
6484 store i32 %conv, i32* %0, align 4096
6488 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6489 define dso_local void @st_cst_align16_uint64_t_uint32_t(i64 %str) {
6490 ; CHECK-LABEL: st_cst_align16_uint64_t_uint32_t:
6491 ; CHECK: # %bb.0: # %entry
6492 ; CHECK-NEXT: stw r3, 4080(0)
6495 %conv = trunc i64 %str to i32
6496 store i32 %conv, i32* inttoptr (i64 4080 to i32*), align 16
6500 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6501 define dso_local void @st_cst_align32_uint64_t_uint32_t(i64 %str) {
6502 ; CHECK-LABEL: st_cst_align32_uint64_t_uint32_t:
6503 ; CHECK: # %bb.0: # %entry
6504 ; CHECK-NEXT: lis r4, 153
6505 ; CHECK-NEXT: stw r3, -27108(r4)
6508 %conv = trunc i64 %str to i32
6509 store i32 %conv, i32* inttoptr (i64 9999900 to i32*), align 4
6513 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6514 define dso_local void @st_cst_align64_uint64_t_uint32_t(i64 %str) {
6515 ; CHECK-P10-LABEL: st_cst_align64_uint64_t_uint32_t:
6516 ; CHECK-P10: # %bb.0: # %entry
6517 ; CHECK-P10-NEXT: pli r4, 244140625
6518 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6519 ; CHECK-P10-NEXT: stw r3, 0(r4)
6520 ; CHECK-P10-NEXT: blr
6522 ; CHECK-PREP10-LABEL: st_cst_align64_uint64_t_uint32_t:
6523 ; CHECK-PREP10: # %bb.0: # %entry
6524 ; CHECK-PREP10-NEXT: lis r4, 3725
6525 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
6526 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
6527 ; CHECK-PREP10-NEXT: stw r3, 0(r4)
6528 ; CHECK-PREP10-NEXT: blr
6530 %conv = trunc i64 %str to i32
6531 store i32 %conv, i32* inttoptr (i64 1000000000000 to i32*), align 4096
6535 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6536 define dso_local void @st_0_uint64_t_uint64_t(i64 %ptr, i64 %str) {
6537 ; CHECK-LABEL: st_0_uint64_t_uint64_t:
6538 ; CHECK: # %bb.0: # %entry
6539 ; CHECK-NEXT: std r4, 0(r3)
6542 %0 = inttoptr i64 %ptr to i64*
6543 store i64 %str, i64* %0, align 8
6547 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6548 define dso_local void @st_align16_uint64_t_uint64_t(i8* nocapture %ptr, i64 %str) {
6549 ; CHECK-LABEL: st_align16_uint64_t_uint64_t:
6550 ; CHECK: # %bb.0: # %entry
6551 ; CHECK-NEXT: std r4, 8(r3)
6554 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
6555 %0 = bitcast i8* %add.ptr to i64*
6556 store i64 %str, i64* %0, align 8
6560 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6561 define dso_local void @st_align32_uint64_t_uint64_t(i8* nocapture %ptr, i64 %str) {
6562 ; CHECK-P10-LABEL: st_align32_uint64_t_uint64_t:
6563 ; CHECK-P10: # %bb.0: # %entry
6564 ; CHECK-P10-NEXT: pli r5, 99999000
6565 ; CHECK-P10-NEXT: stdx r4, r3, r5
6566 ; CHECK-P10-NEXT: blr
6568 ; CHECK-PREP10-LABEL: st_align32_uint64_t_uint64_t:
6569 ; CHECK-PREP10: # %bb.0: # %entry
6570 ; CHECK-PREP10-NEXT: lis r5, 1525
6571 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
6572 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
6573 ; CHECK-PREP10-NEXT: blr
6575 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
6576 %0 = bitcast i8* %add.ptr to i64*
6577 store i64 %str, i64* %0, align 8
6581 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6582 define dso_local void @st_align64_uint64_t_uint64_t(i8* nocapture %ptr, i64 %str) {
6583 ; CHECK-P10-LABEL: st_align64_uint64_t_uint64_t:
6584 ; CHECK-P10: # %bb.0: # %entry
6585 ; CHECK-P10-NEXT: pli r5, 244140625
6586 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6587 ; CHECK-P10-NEXT: stdx r4, r3, r5
6588 ; CHECK-P10-NEXT: blr
6590 ; CHECK-PREP10-LABEL: st_align64_uint64_t_uint64_t:
6591 ; CHECK-PREP10: # %bb.0: # %entry
6592 ; CHECK-PREP10-NEXT: lis r5, 3725
6593 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6594 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6595 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
6596 ; CHECK-PREP10-NEXT: blr
6598 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
6599 %0 = bitcast i8* %add.ptr to i64*
6600 store i64 %str, i64* %0, align 8
6604 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6605 define dso_local void @st_reg_uint64_t_uint64_t(i8* nocapture %ptr, i64 %off, i64 %str) {
6606 ; CHECK-LABEL: st_reg_uint64_t_uint64_t:
6607 ; CHECK: # %bb.0: # %entry
6608 ; CHECK-NEXT: stdx r5, r3, r4
6611 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
6612 %0 = bitcast i8* %add.ptr to i64*
6613 store i64 %str, i64* %0, align 8
6617 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6618 define dso_local void @st_or1_uint64_t_uint64_t(i64 %ptr, i8 zeroext %off, i64 %str) {
6619 ; CHECK-LABEL: st_or1_uint64_t_uint64_t:
6620 ; CHECK: # %bb.0: # %entry
6621 ; CHECK-NEXT: or r3, r4, r3
6622 ; CHECK-NEXT: std r5, 0(r3)
6625 %conv = zext i8 %off to i64
6626 %or = or i64 %conv, %ptr
6627 %0 = inttoptr i64 %or to i64*
6628 store i64 %str, i64* %0, align 8
6632 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6633 define dso_local void @st_or2_uint64_t_uint64_t(i64 %ptr, i8 zeroext %off, i64 %str) {
6634 ; CHECK-LABEL: st_or2_uint64_t_uint64_t:
6635 ; CHECK: # %bb.0: # %entry
6636 ; CHECK-NEXT: rldicr r3, r3, 0, 51
6637 ; CHECK-NEXT: stdx r5, r3, r4
6640 %and = and i64 %ptr, -4096
6641 %conv = zext i8 %off to i64
6642 %or = or i64 %and, %conv
6643 %0 = inttoptr i64 %or to i64*
6644 store i64 %str, i64* %0, align 8
6648 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6649 define dso_local void @st_not_disjoint16_uint64_t_uint64_t(i64 %ptr, i64 %str) {
6650 ; CHECK-LABEL: st_not_disjoint16_uint64_t_uint64_t:
6651 ; CHECK: # %bb.0: # %entry
6652 ; CHECK-NEXT: ori r3, r3, 6
6653 ; CHECK-NEXT: std r4, 0(r3)
6656 %or = or i64 %ptr, 6
6657 %0 = inttoptr i64 %or to i64*
6658 store i64 %str, i64* %0, align 8
6662 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6663 define dso_local void @st_disjoint_align16_uint64_t_uint64_t(i64 %ptr, i64 %str) {
6664 ; CHECK-LABEL: st_disjoint_align16_uint64_t_uint64_t:
6665 ; CHECK: # %bb.0: # %entry
6666 ; CHECK-NEXT: rldicr r3, r3, 0, 51
6667 ; CHECK-NEXT: std r4, 24(r3)
6670 %and = and i64 %ptr, -4096
6671 %or = or i64 %and, 24
6672 %0 = inttoptr i64 %or to i64*
6673 store i64 %str, i64* %0, align 8
6677 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6678 define dso_local void @st_not_disjoint32_uint64_t_uint64_t(i64 %ptr, i64 %str) {
6679 ; CHECK-LABEL: st_not_disjoint32_uint64_t_uint64_t:
6680 ; CHECK: # %bb.0: # %entry
6681 ; CHECK-NEXT: ori r3, r3, 34463
6682 ; CHECK-NEXT: oris r3, r3, 1
6683 ; CHECK-NEXT: std r4, 0(r3)
6686 %or = or i64 %ptr, 99999
6687 %0 = inttoptr i64 %or to i64*
6688 store i64 %str, i64* %0, align 8
6692 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6693 define dso_local void @st_disjoint_align32_uint64_t_uint64_t(i64 %ptr, i64 %str) {
6694 ; CHECK-P10-LABEL: st_disjoint_align32_uint64_t_uint64_t:
6695 ; CHECK-P10: # %bb.0: # %entry
6696 ; CHECK-P10-NEXT: lis r5, -15264
6697 ; CHECK-P10-NEXT: and r3, r3, r5
6698 ; CHECK-P10-NEXT: pli r5, 999990000
6699 ; CHECK-P10-NEXT: stdx r4, r3, r5
6700 ; CHECK-P10-NEXT: blr
6702 ; CHECK-P9-LABEL: st_disjoint_align32_uint64_t_uint64_t:
6703 ; CHECK-P9: # %bb.0: # %entry
6704 ; CHECK-P9-NEXT: lis r5, -15264
6705 ; CHECK-P9-NEXT: and r3, r3, r5
6706 ; CHECK-P9-NEXT: lis r5, 15258
6707 ; CHECK-P9-NEXT: ori r5, r5, 41712
6708 ; CHECK-P9-NEXT: stdx r4, r3, r5
6709 ; CHECK-P9-NEXT: blr
6711 ; CHECK-P8-LABEL: st_disjoint_align32_uint64_t_uint64_t:
6712 ; CHECK-P8: # %bb.0: # %entry
6713 ; CHECK-P8-NEXT: lis r5, -15264
6714 ; CHECK-P8-NEXT: lis r6, 15258
6715 ; CHECK-P8-NEXT: and r3, r3, r5
6716 ; CHECK-P8-NEXT: ori r5, r6, 41712
6717 ; CHECK-P8-NEXT: stdx r4, r3, r5
6718 ; CHECK-P8-NEXT: blr
6720 %and = and i64 %ptr, -1000341504
6721 %or = or i64 %and, 999990000
6722 %0 = inttoptr i64 %or to i64*
6723 store i64 %str, i64* %0, align 16
6727 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6728 define dso_local void @st_not_disjoint64_uint64_t_uint64_t(i64 %ptr, i64 %str) {
6729 ; CHECK-P10-LABEL: st_not_disjoint64_uint64_t_uint64_t:
6730 ; CHECK-P10: # %bb.0: # %entry
6731 ; CHECK-P10-NEXT: pli r5, 232
6732 ; CHECK-P10-NEXT: pli r6, 3567587329
6733 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
6734 ; CHECK-P10-NEXT: or r3, r3, r6
6735 ; CHECK-P10-NEXT: std r4, 0(r3)
6736 ; CHECK-P10-NEXT: blr
6738 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint64_t_uint64_t:
6739 ; CHECK-PREP10: # %bb.0: # %entry
6740 ; CHECK-PREP10-NEXT: li r5, 29
6741 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
6742 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
6743 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
6744 ; CHECK-PREP10-NEXT: or r3, r3, r5
6745 ; CHECK-PREP10-NEXT: std r4, 0(r3)
6746 ; CHECK-PREP10-NEXT: blr
6748 %or = or i64 %ptr, 1000000000001
6749 %0 = inttoptr i64 %or to i64*
6750 store i64 %str, i64* %0, align 8
6754 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6755 define dso_local void @st_disjoint_align64_uint64_t_uint64_t(i64 %ptr, i64 %str) {
6756 ; CHECK-P10-LABEL: st_disjoint_align64_uint64_t_uint64_t:
6757 ; CHECK-P10: # %bb.0: # %entry
6758 ; CHECK-P10-NEXT: pli r5, 244140625
6759 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
6760 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6761 ; CHECK-P10-NEXT: stdx r4, r3, r5
6762 ; CHECK-P10-NEXT: blr
6764 ; CHECK-PREP10-LABEL: st_disjoint_align64_uint64_t_uint64_t:
6765 ; CHECK-PREP10: # %bb.0: # %entry
6766 ; CHECK-PREP10-NEXT: lis r5, 3725
6767 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
6768 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6769 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6770 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
6771 ; CHECK-PREP10-NEXT: blr
6773 %and = and i64 %ptr, -1099511627776
6774 %or = or i64 %and, 1000000000000
6775 %0 = inttoptr i64 %or to i64*
6776 store i64 %str, i64* %0, align 4096
6780 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6781 define dso_local void @st_cst_align16_uint64_t_uint64_t(i64 %str) {
6782 ; CHECK-LABEL: st_cst_align16_uint64_t_uint64_t:
6783 ; CHECK: # %bb.0: # %entry
6784 ; CHECK-NEXT: std r3, 4080(0)
6787 store i64 %str, i64* inttoptr (i64 4080 to i64*), align 16
6791 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6792 define dso_local void @st_cst_align32_uint64_t_uint64_t(i64 %str) {
6793 ; CHECK-LABEL: st_cst_align32_uint64_t_uint64_t:
6794 ; CHECK: # %bb.0: # %entry
6795 ; CHECK-NEXT: lis r4, 153
6796 ; CHECK-NEXT: std r3, -27108(r4)
6799 store i64 %str, i64* inttoptr (i64 9999900 to i64*), align 8
6803 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6804 define dso_local void @st_cst_align64_uint64_t_uint64_t(i64 %str) {
6805 ; CHECK-P10-LABEL: st_cst_align64_uint64_t_uint64_t:
6806 ; CHECK-P10: # %bb.0: # %entry
6807 ; CHECK-P10-NEXT: pli r4, 244140625
6808 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6809 ; CHECK-P10-NEXT: std r3, 0(r4)
6810 ; CHECK-P10-NEXT: blr
6812 ; CHECK-PREP10-LABEL: st_cst_align64_uint64_t_uint64_t:
6813 ; CHECK-PREP10: # %bb.0: # %entry
6814 ; CHECK-PREP10-NEXT: lis r4, 3725
6815 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
6816 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
6817 ; CHECK-PREP10-NEXT: std r3, 0(r4)
6818 ; CHECK-PREP10-NEXT: blr
6820 store i64 %str, i64* inttoptr (i64 1000000000000 to i64*), align 4096
6824 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6825 define dso_local void @st_0_uint64_t_float(i64 %ptr, i64 %str) {
6826 ; CHECK-LABEL: st_0_uint64_t_float:
6827 ; CHECK: # %bb.0: # %entry
6828 ; CHECK-NEXT: mtfprd f0, r4
6829 ; CHECK-NEXT: xscvuxdsp f0, f0
6830 ; CHECK-NEXT: stfs f0, 0(r3)
6833 %conv = uitofp i64 %str to float
6834 %0 = inttoptr i64 %ptr to float*
6835 store float %conv, float* %0, align 4
6839 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6840 define dso_local void @st_align16_uint64_t_float(i8* nocapture %ptr, i64 %str) {
6841 ; CHECK-LABEL: st_align16_uint64_t_float:
6842 ; CHECK: # %bb.0: # %entry
6843 ; CHECK-NEXT: mtfprd f0, r4
6844 ; CHECK-NEXT: xscvuxdsp f0, f0
6845 ; CHECK-NEXT: stfs f0, 8(r3)
6848 %conv = uitofp i64 %str to float
6849 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
6850 %0 = bitcast i8* %add.ptr to float*
6851 store float %conv, float* %0, align 4
6855 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6856 define dso_local void @st_align32_uint64_t_float(i8* nocapture %ptr, i64 %str) {
6857 ; CHECK-P10-LABEL: st_align32_uint64_t_float:
6858 ; CHECK-P10: # %bb.0: # %entry
6859 ; CHECK-P10-NEXT: mtfprd f0, r4
6860 ; CHECK-P10-NEXT: pli r4, 99999000
6861 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
6862 ; CHECK-P10-NEXT: stfsx f0, r3, r4
6863 ; CHECK-P10-NEXT: blr
6865 ; CHECK-P9-LABEL: st_align32_uint64_t_float:
6866 ; CHECK-P9: # %bb.0: # %entry
6867 ; CHECK-P9-NEXT: mtfprd f0, r4
6868 ; CHECK-P9-NEXT: lis r4, 1525
6869 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
6870 ; CHECK-P9-NEXT: ori r4, r4, 56600
6871 ; CHECK-P9-NEXT: stfsx f0, r3, r4
6872 ; CHECK-P9-NEXT: blr
6874 ; CHECK-P8-LABEL: st_align32_uint64_t_float:
6875 ; CHECK-P8: # %bb.0: # %entry
6876 ; CHECK-P8-NEXT: mtfprd f0, r4
6877 ; CHECK-P8-NEXT: lis r4, 1525
6878 ; CHECK-P8-NEXT: ori r4, r4, 56600
6879 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
6880 ; CHECK-P8-NEXT: stfsx f0, r3, r4
6881 ; CHECK-P8-NEXT: blr
6883 %conv = uitofp i64 %str to float
6884 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
6885 %0 = bitcast i8* %add.ptr to float*
6886 store float %conv, float* %0, align 4
6890 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6891 define dso_local void @st_align64_uint64_t_float(i8* nocapture %ptr, i64 %str) {
6892 ; CHECK-P10-LABEL: st_align64_uint64_t_float:
6893 ; CHECK-P10: # %bb.0: # %entry
6894 ; CHECK-P10-NEXT: mtfprd f0, r4
6895 ; CHECK-P10-NEXT: pli r4, 244140625
6896 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6897 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
6898 ; CHECK-P10-NEXT: stfsx f0, r3, r4
6899 ; CHECK-P10-NEXT: blr
6901 ; CHECK-P9-LABEL: st_align64_uint64_t_float:
6902 ; CHECK-P9: # %bb.0: # %entry
6903 ; CHECK-P9-NEXT: mtfprd f0, r4
6904 ; CHECK-P9-NEXT: lis r4, 3725
6905 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
6906 ; CHECK-P9-NEXT: ori r4, r4, 19025
6907 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
6908 ; CHECK-P9-NEXT: stfsx f0, r3, r4
6909 ; CHECK-P9-NEXT: blr
6911 ; CHECK-P8-LABEL: st_align64_uint64_t_float:
6912 ; CHECK-P8: # %bb.0: # %entry
6913 ; CHECK-P8-NEXT: mtfprd f0, r4
6914 ; CHECK-P8-NEXT: lis r4, 3725
6915 ; CHECK-P8-NEXT: ori r4, r4, 19025
6916 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
6917 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
6918 ; CHECK-P8-NEXT: stfsx f0, r3, r4
6919 ; CHECK-P8-NEXT: blr
6921 %conv = uitofp i64 %str to float
6922 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
6923 %0 = bitcast i8* %add.ptr to float*
6924 store float %conv, float* %0, align 4
6928 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6929 define dso_local void @st_reg_uint64_t_float(i8* nocapture %ptr, i64 %off, i64 %str) {
6930 ; CHECK-LABEL: st_reg_uint64_t_float:
6931 ; CHECK: # %bb.0: # %entry
6932 ; CHECK-NEXT: mtfprd f0, r5
6933 ; CHECK-NEXT: xscvuxdsp f0, f0
6934 ; CHECK-NEXT: stfsx f0, r3, r4
6937 %conv = uitofp i64 %str to float
6938 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
6939 %0 = bitcast i8* %add.ptr to float*
6940 store float %conv, float* %0, align 4
6944 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6945 define dso_local void @st_or1_uint64_t_float(i64 %ptr, i8 zeroext %off, i64 %str) {
6946 ; CHECK-LABEL: st_or1_uint64_t_float:
6947 ; CHECK: # %bb.0: # %entry
6948 ; CHECK-NEXT: mtfprd f0, r5
6949 ; CHECK-NEXT: or r3, r4, r3
6950 ; CHECK-NEXT: xscvuxdsp f0, f0
6951 ; CHECK-NEXT: stfs f0, 0(r3)
6954 %conv = uitofp i64 %str to float
6955 %conv1 = zext i8 %off to i64
6956 %or = or i64 %conv1, %ptr
6957 %0 = inttoptr i64 %or to float*
6958 store float %conv, float* %0, align 4
6962 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6963 define dso_local void @st_or2_uint64_t_float(i64 %ptr, i8 zeroext %off, i64 %str) {
6964 ; CHECK-LABEL: st_or2_uint64_t_float:
6965 ; CHECK: # %bb.0: # %entry
6966 ; CHECK-NEXT: mtfprd f0, r5
6967 ; CHECK-NEXT: rldicr r3, r3, 0, 51
6968 ; CHECK-NEXT: xscvuxdsp f0, f0
6969 ; CHECK-NEXT: stfsx f0, r3, r4
6972 %and = and i64 %ptr, -4096
6973 %conv = uitofp i64 %str to float
6974 %conv1 = zext i8 %off to i64
6975 %or = or i64 %and, %conv1
6976 %0 = inttoptr i64 %or to float*
6977 store float %conv, float* %0, align 4
6981 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6982 define dso_local void @st_not_disjoint16_uint64_t_float(i64 %ptr, i64 %str) {
6983 ; CHECK-LABEL: st_not_disjoint16_uint64_t_float:
6984 ; CHECK: # %bb.0: # %entry
6985 ; CHECK-NEXT: mtfprd f0, r4
6986 ; CHECK-NEXT: ori r3, r3, 6
6987 ; CHECK-NEXT: xscvuxdsp f0, f0
6988 ; CHECK-NEXT: stfs f0, 0(r3)
6991 %conv = uitofp i64 %str to float
6992 %or = or i64 %ptr, 6
6993 %0 = inttoptr i64 %or to float*
6994 store float %conv, float* %0, align 4
6998 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6999 define dso_local void @st_disjoint_align16_uint64_t_float(i64 %ptr, i64 %str) {
7000 ; CHECK-LABEL: st_disjoint_align16_uint64_t_float:
7001 ; CHECK: # %bb.0: # %entry
7002 ; CHECK-NEXT: mtfprd f0, r4
7003 ; CHECK-NEXT: rldicr r3, r3, 0, 51
7004 ; CHECK-NEXT: xscvuxdsp f0, f0
7005 ; CHECK-NEXT: stfs f0, 24(r3)
7008 %and = and i64 %ptr, -4096
7009 %conv = uitofp i64 %str to float
7010 %or = or i64 %and, 24
7011 %0 = inttoptr i64 %or to float*
7012 store float %conv, float* %0, align 8
7016 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7017 define dso_local void @st_not_disjoint32_uint64_t_float(i64 %ptr, i64 %str) {
7018 ; CHECK-P10-LABEL: st_not_disjoint32_uint64_t_float:
7019 ; CHECK-P10: # %bb.0: # %entry
7020 ; CHECK-P10-NEXT: mtfprd f0, r4
7021 ; CHECK-P10-NEXT: ori r3, r3, 34463
7022 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
7023 ; CHECK-P10-NEXT: oris r3, r3, 1
7024 ; CHECK-P10-NEXT: stfs f0, 0(r3)
7025 ; CHECK-P10-NEXT: blr
7027 ; CHECK-P9-LABEL: st_not_disjoint32_uint64_t_float:
7028 ; CHECK-P9: # %bb.0: # %entry
7029 ; CHECK-P9-NEXT: mtfprd f0, r4
7030 ; CHECK-P9-NEXT: ori r3, r3, 34463
7031 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
7032 ; CHECK-P9-NEXT: oris r3, r3, 1
7033 ; CHECK-P9-NEXT: stfs f0, 0(r3)
7034 ; CHECK-P9-NEXT: blr
7036 ; CHECK-P8-LABEL: st_not_disjoint32_uint64_t_float:
7037 ; CHECK-P8: # %bb.0: # %entry
7038 ; CHECK-P8-NEXT: mtfprd f0, r4
7039 ; CHECK-P8-NEXT: ori r3, r3, 34463
7040 ; CHECK-P8-NEXT: oris r3, r3, 1
7041 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
7042 ; CHECK-P8-NEXT: stfs f0, 0(r3)
7043 ; CHECK-P8-NEXT: blr
7045 %conv = uitofp i64 %str to float
7046 %or = or i64 %ptr, 99999
7047 %0 = inttoptr i64 %or to float*
7048 store float %conv, float* %0, align 4
7052 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7053 define dso_local void @st_disjoint_align32_uint64_t_float(i64 %ptr, i64 %str) {
7054 ; CHECK-P10-LABEL: st_disjoint_align32_uint64_t_float:
7055 ; CHECK-P10: # %bb.0: # %entry
7056 ; CHECK-P10-NEXT: mtfprd f0, r4
7057 ; CHECK-P10-NEXT: lis r5, -15264
7058 ; CHECK-P10-NEXT: pli r4, 999990000
7059 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
7060 ; CHECK-P10-NEXT: and r3, r3, r5
7061 ; CHECK-P10-NEXT: stfsx f0, r3, r4
7062 ; CHECK-P10-NEXT: blr
7064 ; CHECK-P9-LABEL: st_disjoint_align32_uint64_t_float:
7065 ; CHECK-P9: # %bb.0: # %entry
7066 ; CHECK-P9-NEXT: mtfprd f0, r4
7067 ; CHECK-P9-NEXT: lis r5, -15264
7068 ; CHECK-P9-NEXT: lis r4, 15258
7069 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
7070 ; CHECK-P9-NEXT: and r3, r3, r5
7071 ; CHECK-P9-NEXT: ori r4, r4, 41712
7072 ; CHECK-P9-NEXT: stfsx f0, r3, r4
7073 ; CHECK-P9-NEXT: blr
7075 ; CHECK-P8-LABEL: st_disjoint_align32_uint64_t_float:
7076 ; CHECK-P8: # %bb.0: # %entry
7077 ; CHECK-P8-NEXT: mtfprd f0, r4
7078 ; CHECK-P8-NEXT: lis r4, -15264
7079 ; CHECK-P8-NEXT: lis r5, 15258
7080 ; CHECK-P8-NEXT: and r3, r3, r4
7081 ; CHECK-P8-NEXT: ori r4, r5, 41712
7082 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
7083 ; CHECK-P8-NEXT: stfsx f0, r3, r4
7084 ; CHECK-P8-NEXT: blr
7086 %and = and i64 %ptr, -1000341504
7087 %conv = uitofp i64 %str to float
7088 %or = or i64 %and, 999990000
7089 %0 = inttoptr i64 %or to float*
7090 store float %conv, float* %0, align 16
7094 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7095 define dso_local void @st_not_disjoint64_uint64_t_float(i64 %ptr, i64 %str) {
7096 ; CHECK-P10-LABEL: st_not_disjoint64_uint64_t_float:
7097 ; CHECK-P10: # %bb.0: # %entry
7098 ; CHECK-P10-NEXT: mtfprd f0, r4
7099 ; CHECK-P10-NEXT: pli r4, 232
7100 ; CHECK-P10-NEXT: pli r5, 3567587329
7101 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
7102 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
7103 ; CHECK-P10-NEXT: or r3, r3, r5
7104 ; CHECK-P10-NEXT: stfs f0, 0(r3)
7105 ; CHECK-P10-NEXT: blr
7107 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint64_t_float:
7108 ; CHECK-PREP10: # %bb.0: # %entry
7109 ; CHECK-PREP10-NEXT: mtfprd f0, r4
7110 ; CHECK-PREP10-NEXT: li r4, 29
7111 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
7112 ; CHECK-PREP10-NEXT: xscvuxdsp f0, f0
7113 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
7114 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
7115 ; CHECK-PREP10-NEXT: or r3, r3, r4
7116 ; CHECK-PREP10-NEXT: stfs f0, 0(r3)
7117 ; CHECK-PREP10-NEXT: blr
7119 %conv = uitofp i64 %str to float
7120 %or = or i64 %ptr, 1000000000001
7121 %0 = inttoptr i64 %or to float*
7122 store float %conv, float* %0, align 4
7126 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7127 define dso_local void @st_disjoint_align64_uint64_t_float(i64 %ptr, i64 %str) {
7128 ; CHECK-P10-LABEL: st_disjoint_align64_uint64_t_float:
7129 ; CHECK-P10: # %bb.0: # %entry
7130 ; CHECK-P10-NEXT: mtfprd f0, r4
7131 ; CHECK-P10-NEXT: pli r4, 244140625
7132 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
7133 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7134 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
7135 ; CHECK-P10-NEXT: stfsx f0, r3, r4
7136 ; CHECK-P10-NEXT: blr
7138 ; CHECK-P9-LABEL: st_disjoint_align64_uint64_t_float:
7139 ; CHECK-P9: # %bb.0: # %entry
7140 ; CHECK-P9-NEXT: mtfprd f0, r4
7141 ; CHECK-P9-NEXT: lis r4, 3725
7142 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
7143 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
7144 ; CHECK-P9-NEXT: ori r4, r4, 19025
7145 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
7146 ; CHECK-P9-NEXT: stfsx f0, r3, r4
7147 ; CHECK-P9-NEXT: blr
7149 ; CHECK-P8-LABEL: st_disjoint_align64_uint64_t_float:
7150 ; CHECK-P8: # %bb.0: # %entry
7151 ; CHECK-P8-NEXT: mtfprd f0, r4
7152 ; CHECK-P8-NEXT: lis r5, 3725
7153 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
7154 ; CHECK-P8-NEXT: ori r4, r5, 19025
7155 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
7156 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
7157 ; CHECK-P8-NEXT: stfsx f0, r3, r4
7158 ; CHECK-P8-NEXT: blr
7160 %and = and i64 %ptr, -1099511627776
7161 %conv = uitofp i64 %str to float
7162 %or = or i64 %and, 1000000000000
7163 %0 = inttoptr i64 %or to float*
7164 store float %conv, float* %0, align 4096
7168 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7169 define dso_local void @st_cst_align16_uint64_t_float(i64 %str) {
7170 ; CHECK-LABEL: st_cst_align16_uint64_t_float:
7171 ; CHECK: # %bb.0: # %entry
7172 ; CHECK-NEXT: mtfprd f0, r3
7173 ; CHECK-NEXT: xscvuxdsp f0, f0
7174 ; CHECK-NEXT: stfs f0, 4080(0)
7177 %conv = uitofp i64 %str to float
7178 store float %conv, float* inttoptr (i64 4080 to float*), align 16
7182 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7183 define dso_local void @st_cst_align32_uint64_t_float(i64 %str) {
7184 ; CHECK-LABEL: st_cst_align32_uint64_t_float:
7185 ; CHECK: # %bb.0: # %entry
7186 ; CHECK-NEXT: mtfprd f0, r3
7187 ; CHECK-NEXT: lis r3, 153
7188 ; CHECK-NEXT: xscvuxdsp f0, f0
7189 ; CHECK-NEXT: stfs f0, -27108(r3)
7192 %conv = uitofp i64 %str to float
7193 store float %conv, float* inttoptr (i64 9999900 to float*), align 4
7197 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7198 define dso_local void @st_cst_align64_uint64_t_float(i64 %str) {
7199 ; CHECK-P10-LABEL: st_cst_align64_uint64_t_float:
7200 ; CHECK-P10: # %bb.0: # %entry
7201 ; CHECK-P10-NEXT: mtfprd f0, r3
7202 ; CHECK-P10-NEXT: pli r3, 244140625
7203 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
7204 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
7205 ; CHECK-P10-NEXT: stfs f0, 0(r3)
7206 ; CHECK-P10-NEXT: blr
7208 ; CHECK-P9-LABEL: st_cst_align64_uint64_t_float:
7209 ; CHECK-P9: # %bb.0: # %entry
7210 ; CHECK-P9-NEXT: mtfprd f0, r3
7211 ; CHECK-P9-NEXT: lis r3, 3725
7212 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
7213 ; CHECK-P9-NEXT: ori r3, r3, 19025
7214 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
7215 ; CHECK-P9-NEXT: stfs f0, 0(r3)
7216 ; CHECK-P9-NEXT: blr
7218 ; CHECK-P8-LABEL: st_cst_align64_uint64_t_float:
7219 ; CHECK-P8: # %bb.0: # %entry
7220 ; CHECK-P8-NEXT: mtfprd f0, r3
7221 ; CHECK-P8-NEXT: lis r3, 3725
7222 ; CHECK-P8-NEXT: ori r3, r3, 19025
7223 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
7224 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
7225 ; CHECK-P8-NEXT: stfs f0, 0(r3)
7226 ; CHECK-P8-NEXT: blr
7228 %conv = uitofp i64 %str to float
7229 store float %conv, float* inttoptr (i64 1000000000000 to float*), align 4096
7233 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7234 define dso_local void @st_0_uint64_t_double(i64 %ptr, i64 %str) {
7235 ; CHECK-LABEL: st_0_uint64_t_double:
7236 ; CHECK: # %bb.0: # %entry
7237 ; CHECK-NEXT: mtfprd f0, r4
7238 ; CHECK-NEXT: xscvuxddp f0, f0
7239 ; CHECK-NEXT: stfd f0, 0(r3)
7242 %conv = uitofp i64 %str to double
7243 %0 = inttoptr i64 %ptr to double*
7244 store double %conv, double* %0, align 8
7248 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7249 define dso_local void @st_align16_uint64_t_double(i8* nocapture %ptr, i64 %str) {
7250 ; CHECK-LABEL: st_align16_uint64_t_double:
7251 ; CHECK: # %bb.0: # %entry
7252 ; CHECK-NEXT: mtfprd f0, r4
7253 ; CHECK-NEXT: xscvuxddp f0, f0
7254 ; CHECK-NEXT: stfd f0, 8(r3)
7257 %conv = uitofp i64 %str to double
7258 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
7259 %0 = bitcast i8* %add.ptr to double*
7260 store double %conv, double* %0, align 8
7264 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7265 define dso_local void @st_align32_uint64_t_double(i8* nocapture %ptr, i64 %str) {
7266 ; CHECK-P10-LABEL: st_align32_uint64_t_double:
7267 ; CHECK-P10: # %bb.0: # %entry
7268 ; CHECK-P10-NEXT: mtfprd f0, r4
7269 ; CHECK-P10-NEXT: pli r4, 99999000
7270 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7271 ; CHECK-P10-NEXT: stfdx f0, r3, r4
7272 ; CHECK-P10-NEXT: blr
7274 ; CHECK-P9-LABEL: st_align32_uint64_t_double:
7275 ; CHECK-P9: # %bb.0: # %entry
7276 ; CHECK-P9-NEXT: mtfprd f0, r4
7277 ; CHECK-P9-NEXT: lis r4, 1525
7278 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7279 ; CHECK-P9-NEXT: ori r4, r4, 56600
7280 ; CHECK-P9-NEXT: stfdx f0, r3, r4
7281 ; CHECK-P9-NEXT: blr
7283 ; CHECK-P8-LABEL: st_align32_uint64_t_double:
7284 ; CHECK-P8: # %bb.0: # %entry
7285 ; CHECK-P8-NEXT: mtfprd f0, r4
7286 ; CHECK-P8-NEXT: lis r4, 1525
7287 ; CHECK-P8-NEXT: ori r4, r4, 56600
7288 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7289 ; CHECK-P8-NEXT: stfdx f0, r3, r4
7290 ; CHECK-P8-NEXT: blr
7292 %conv = uitofp i64 %str to double
7293 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
7294 %0 = bitcast i8* %add.ptr to double*
7295 store double %conv, double* %0, align 8
7299 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7300 define dso_local void @st_align64_uint64_t_double(i8* nocapture %ptr, i64 %str) {
7301 ; CHECK-P10-LABEL: st_align64_uint64_t_double:
7302 ; CHECK-P10: # %bb.0: # %entry
7303 ; CHECK-P10-NEXT: mtfprd f0, r4
7304 ; CHECK-P10-NEXT: pli r4, 244140625
7305 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7306 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7307 ; CHECK-P10-NEXT: stfdx f0, r3, r4
7308 ; CHECK-P10-NEXT: blr
7310 ; CHECK-P9-LABEL: st_align64_uint64_t_double:
7311 ; CHECK-P9: # %bb.0: # %entry
7312 ; CHECK-P9-NEXT: mtfprd f0, r4
7313 ; CHECK-P9-NEXT: lis r4, 3725
7314 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7315 ; CHECK-P9-NEXT: ori r4, r4, 19025
7316 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
7317 ; CHECK-P9-NEXT: stfdx f0, r3, r4
7318 ; CHECK-P9-NEXT: blr
7320 ; CHECK-P8-LABEL: st_align64_uint64_t_double:
7321 ; CHECK-P8: # %bb.0: # %entry
7322 ; CHECK-P8-NEXT: mtfprd f0, r4
7323 ; CHECK-P8-NEXT: lis r4, 3725
7324 ; CHECK-P8-NEXT: ori r4, r4, 19025
7325 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7326 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
7327 ; CHECK-P8-NEXT: stfdx f0, r3, r4
7328 ; CHECK-P8-NEXT: blr
7330 %conv = uitofp i64 %str to double
7331 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
7332 %0 = bitcast i8* %add.ptr to double*
7333 store double %conv, double* %0, align 8
7337 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7338 define dso_local void @st_reg_uint64_t_double(i8* nocapture %ptr, i64 %off, i64 %str) {
7339 ; CHECK-LABEL: st_reg_uint64_t_double:
7340 ; CHECK: # %bb.0: # %entry
7341 ; CHECK-NEXT: mtfprd f0, r5
7342 ; CHECK-NEXT: xscvuxddp f0, f0
7343 ; CHECK-NEXT: stfdx f0, r3, r4
7346 %conv = uitofp i64 %str to double
7347 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
7348 %0 = bitcast i8* %add.ptr to double*
7349 store double %conv, double* %0, align 8
7353 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7354 define dso_local void @st_or1_uint64_t_double(i64 %ptr, i8 zeroext %off, i64 %str) {
7355 ; CHECK-LABEL: st_or1_uint64_t_double:
7356 ; CHECK: # %bb.0: # %entry
7357 ; CHECK-NEXT: mtfprd f0, r5
7358 ; CHECK-NEXT: or r3, r4, r3
7359 ; CHECK-NEXT: xscvuxddp f0, f0
7360 ; CHECK-NEXT: stfd f0, 0(r3)
7363 %conv = uitofp i64 %str to double
7364 %conv1 = zext i8 %off to i64
7365 %or = or i64 %conv1, %ptr
7366 %0 = inttoptr i64 %or to double*
7367 store double %conv, double* %0, align 8
7371 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7372 define dso_local void @st_or2_uint64_t_double(i64 %ptr, i8 zeroext %off, i64 %str) {
7373 ; CHECK-LABEL: st_or2_uint64_t_double:
7374 ; CHECK: # %bb.0: # %entry
7375 ; CHECK-NEXT: mtfprd f0, r5
7376 ; CHECK-NEXT: rldicr r3, r3, 0, 51
7377 ; CHECK-NEXT: xscvuxddp f0, f0
7378 ; CHECK-NEXT: stfdx f0, r3, r4
7381 %and = and i64 %ptr, -4096
7382 %conv = uitofp i64 %str to double
7383 %conv1 = zext i8 %off to i64
7384 %or = or i64 %and, %conv1
7385 %0 = inttoptr i64 %or to double*
7386 store double %conv, double* %0, align 8
7390 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7391 define dso_local void @st_not_disjoint16_uint64_t_double(i64 %ptr, i64 %str) {
7392 ; CHECK-LABEL: st_not_disjoint16_uint64_t_double:
7393 ; CHECK: # %bb.0: # %entry
7394 ; CHECK-NEXT: mtfprd f0, r4
7395 ; CHECK-NEXT: ori r3, r3, 6
7396 ; CHECK-NEXT: xscvuxddp f0, f0
7397 ; CHECK-NEXT: stfd f0, 0(r3)
7400 %conv = uitofp i64 %str to double
7401 %or = or i64 %ptr, 6
7402 %0 = inttoptr i64 %or to double*
7403 store double %conv, double* %0, align 8
7407 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7408 define dso_local void @st_disjoint_align16_uint64_t_double(i64 %ptr, i64 %str) {
7409 ; CHECK-LABEL: st_disjoint_align16_uint64_t_double:
7410 ; CHECK: # %bb.0: # %entry
7411 ; CHECK-NEXT: mtfprd f0, r4
7412 ; CHECK-NEXT: rldicr r3, r3, 0, 51
7413 ; CHECK-NEXT: xscvuxddp f0, f0
7414 ; CHECK-NEXT: stfd f0, 24(r3)
7417 %and = and i64 %ptr, -4096
7418 %conv = uitofp i64 %str to double
7419 %or = or i64 %and, 24
7420 %0 = inttoptr i64 %or to double*
7421 store double %conv, double* %0, align 8
7425 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7426 define dso_local void @st_not_disjoint32_uint64_t_double(i64 %ptr, i64 %str) {
7427 ; CHECK-P10-LABEL: st_not_disjoint32_uint64_t_double:
7428 ; CHECK-P10: # %bb.0: # %entry
7429 ; CHECK-P10-NEXT: mtfprd f0, r4
7430 ; CHECK-P10-NEXT: ori r3, r3, 34463
7431 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7432 ; CHECK-P10-NEXT: oris r3, r3, 1
7433 ; CHECK-P10-NEXT: stfd f0, 0(r3)
7434 ; CHECK-P10-NEXT: blr
7436 ; CHECK-P9-LABEL: st_not_disjoint32_uint64_t_double:
7437 ; CHECK-P9: # %bb.0: # %entry
7438 ; CHECK-P9-NEXT: mtfprd f0, r4
7439 ; CHECK-P9-NEXT: ori r3, r3, 34463
7440 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7441 ; CHECK-P9-NEXT: oris r3, r3, 1
7442 ; CHECK-P9-NEXT: stfd f0, 0(r3)
7443 ; CHECK-P9-NEXT: blr
7445 ; CHECK-P8-LABEL: st_not_disjoint32_uint64_t_double:
7446 ; CHECK-P8: # %bb.0: # %entry
7447 ; CHECK-P8-NEXT: mtfprd f0, r4
7448 ; CHECK-P8-NEXT: ori r3, r3, 34463
7449 ; CHECK-P8-NEXT: oris r3, r3, 1
7450 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7451 ; CHECK-P8-NEXT: stfd f0, 0(r3)
7452 ; CHECK-P8-NEXT: blr
7454 %conv = uitofp i64 %str to double
7455 %or = or i64 %ptr, 99999
7456 %0 = inttoptr i64 %or to double*
7457 store double %conv, double* %0, align 8
7461 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7462 define dso_local void @st_disjoint_align32_uint64_t_double(i64 %ptr, i64 %str) {
7463 ; CHECK-P10-LABEL: st_disjoint_align32_uint64_t_double:
7464 ; CHECK-P10: # %bb.0: # %entry
7465 ; CHECK-P10-NEXT: mtfprd f0, r4
7466 ; CHECK-P10-NEXT: lis r5, -15264
7467 ; CHECK-P10-NEXT: pli r4, 999990000
7468 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7469 ; CHECK-P10-NEXT: and r3, r3, r5
7470 ; CHECK-P10-NEXT: stfdx f0, r3, r4
7471 ; CHECK-P10-NEXT: blr
7473 ; CHECK-P9-LABEL: st_disjoint_align32_uint64_t_double:
7474 ; CHECK-P9: # %bb.0: # %entry
7475 ; CHECK-P9-NEXT: mtfprd f0, r4
7476 ; CHECK-P9-NEXT: lis r5, -15264
7477 ; CHECK-P9-NEXT: lis r4, 15258
7478 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7479 ; CHECK-P9-NEXT: and r3, r3, r5
7480 ; CHECK-P9-NEXT: ori r4, r4, 41712
7481 ; CHECK-P9-NEXT: stfdx f0, r3, r4
7482 ; CHECK-P9-NEXT: blr
7484 ; CHECK-P8-LABEL: st_disjoint_align32_uint64_t_double:
7485 ; CHECK-P8: # %bb.0: # %entry
7486 ; CHECK-P8-NEXT: mtfprd f0, r4
7487 ; CHECK-P8-NEXT: lis r4, -15264
7488 ; CHECK-P8-NEXT: lis r5, 15258
7489 ; CHECK-P8-NEXT: and r3, r3, r4
7490 ; CHECK-P8-NEXT: ori r4, r5, 41712
7491 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7492 ; CHECK-P8-NEXT: stfdx f0, r3, r4
7493 ; CHECK-P8-NEXT: blr
7495 %and = and i64 %ptr, -1000341504
7496 %conv = uitofp i64 %str to double
7497 %or = or i64 %and, 999990000
7498 %0 = inttoptr i64 %or to double*
7499 store double %conv, double* %0, align 16
7503 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7504 define dso_local void @st_not_disjoint64_uint64_t_double(i64 %ptr, i64 %str) {
7505 ; CHECK-P10-LABEL: st_not_disjoint64_uint64_t_double:
7506 ; CHECK-P10: # %bb.0: # %entry
7507 ; CHECK-P10-NEXT: mtfprd f0, r4
7508 ; CHECK-P10-NEXT: pli r4, 232
7509 ; CHECK-P10-NEXT: pli r5, 3567587329
7510 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
7511 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7512 ; CHECK-P10-NEXT: or r3, r3, r5
7513 ; CHECK-P10-NEXT: stfd f0, 0(r3)
7514 ; CHECK-P10-NEXT: blr
7516 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint64_t_double:
7517 ; CHECK-PREP10: # %bb.0: # %entry
7518 ; CHECK-PREP10-NEXT: mtfprd f0, r4
7519 ; CHECK-PREP10-NEXT: li r4, 29
7520 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
7521 ; CHECK-PREP10-NEXT: xscvuxddp f0, f0
7522 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
7523 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
7524 ; CHECK-PREP10-NEXT: or r3, r3, r4
7525 ; CHECK-PREP10-NEXT: stfd f0, 0(r3)
7526 ; CHECK-PREP10-NEXT: blr
7528 %conv = uitofp i64 %str to double
7529 %or = or i64 %ptr, 1000000000001
7530 %0 = inttoptr i64 %or to double*
7531 store double %conv, double* %0, align 8
7535 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7536 define dso_local void @st_disjoint_align64_uint64_t_double(i64 %ptr, i64 %str) {
7537 ; CHECK-P10-LABEL: st_disjoint_align64_uint64_t_double:
7538 ; CHECK-P10: # %bb.0: # %entry
7539 ; CHECK-P10-NEXT: mtfprd f0, r4
7540 ; CHECK-P10-NEXT: pli r4, 244140625
7541 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
7542 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7543 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7544 ; CHECK-P10-NEXT: stfdx f0, r3, r4
7545 ; CHECK-P10-NEXT: blr
7547 ; CHECK-P9-LABEL: st_disjoint_align64_uint64_t_double:
7548 ; CHECK-P9: # %bb.0: # %entry
7549 ; CHECK-P9-NEXT: mtfprd f0, r4
7550 ; CHECK-P9-NEXT: lis r4, 3725
7551 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
7552 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7553 ; CHECK-P9-NEXT: ori r4, r4, 19025
7554 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
7555 ; CHECK-P9-NEXT: stfdx f0, r3, r4
7556 ; CHECK-P9-NEXT: blr
7558 ; CHECK-P8-LABEL: st_disjoint_align64_uint64_t_double:
7559 ; CHECK-P8: # %bb.0: # %entry
7560 ; CHECK-P8-NEXT: mtfprd f0, r4
7561 ; CHECK-P8-NEXT: lis r5, 3725
7562 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
7563 ; CHECK-P8-NEXT: ori r4, r5, 19025
7564 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7565 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
7566 ; CHECK-P8-NEXT: stfdx f0, r3, r4
7567 ; CHECK-P8-NEXT: blr
7569 %and = and i64 %ptr, -1099511627776
7570 %conv = uitofp i64 %str to double
7571 %or = or i64 %and, 1000000000000
7572 %0 = inttoptr i64 %or to double*
7573 store double %conv, double* %0, align 4096
7577 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7578 define dso_local void @st_cst_align16_uint64_t_double(i64 %str) {
7579 ; CHECK-LABEL: st_cst_align16_uint64_t_double:
7580 ; CHECK: # %bb.0: # %entry
7581 ; CHECK-NEXT: mtfprd f0, r3
7582 ; CHECK-NEXT: xscvuxddp f0, f0
7583 ; CHECK-NEXT: stfd f0, 4080(0)
7586 %conv = uitofp i64 %str to double
7587 store double %conv, double* inttoptr (i64 4080 to double*), align 16
7591 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7592 define dso_local void @st_cst_align32_uint64_t_double(i64 %str) {
7593 ; CHECK-LABEL: st_cst_align32_uint64_t_double:
7594 ; CHECK: # %bb.0: # %entry
7595 ; CHECK-NEXT: mtfprd f0, r3
7596 ; CHECK-NEXT: lis r3, 153
7597 ; CHECK-NEXT: xscvuxddp f0, f0
7598 ; CHECK-NEXT: stfd f0, -27108(r3)
7601 %conv = uitofp i64 %str to double
7602 store double %conv, double* inttoptr (i64 9999900 to double*), align 8
7606 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7607 define dso_local void @st_cst_align64_uint64_t_double(i64 %str) {
7608 ; CHECK-P10-LABEL: st_cst_align64_uint64_t_double:
7609 ; CHECK-P10: # %bb.0: # %entry
7610 ; CHECK-P10-NEXT: mtfprd f0, r3
7611 ; CHECK-P10-NEXT: pli r3, 244140625
7612 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
7613 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7614 ; CHECK-P10-NEXT: stfd f0, 0(r3)
7615 ; CHECK-P10-NEXT: blr
7617 ; CHECK-P9-LABEL: st_cst_align64_uint64_t_double:
7618 ; CHECK-P9: # %bb.0: # %entry
7619 ; CHECK-P9-NEXT: mtfprd f0, r3
7620 ; CHECK-P9-NEXT: lis r3, 3725
7621 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7622 ; CHECK-P9-NEXT: ori r3, r3, 19025
7623 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
7624 ; CHECK-P9-NEXT: stfd f0, 0(r3)
7625 ; CHECK-P9-NEXT: blr
7627 ; CHECK-P8-LABEL: st_cst_align64_uint64_t_double:
7628 ; CHECK-P8: # %bb.0: # %entry
7629 ; CHECK-P8-NEXT: mtfprd f0, r3
7630 ; CHECK-P8-NEXT: lis r3, 3725
7631 ; CHECK-P8-NEXT: ori r3, r3, 19025
7632 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7633 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
7634 ; CHECK-P8-NEXT: stfd f0, 0(r3)
7635 ; CHECK-P8-NEXT: blr
7637 %conv = uitofp i64 %str to double
7638 store double %conv, double* inttoptr (i64 1000000000000 to double*), align 4096
7642 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7643 define dso_local void @st_0_int64_t_float(i64 %ptr, i64 %str) {
7644 ; CHECK-LABEL: st_0_int64_t_float:
7645 ; CHECK: # %bb.0: # %entry
7646 ; CHECK-NEXT: mtfprd f0, r4
7647 ; CHECK-NEXT: xscvsxdsp f0, f0
7648 ; CHECK-NEXT: stfs f0, 0(r3)
7651 %conv = sitofp i64 %str to float
7652 %0 = inttoptr i64 %ptr to float*
7653 store float %conv, float* %0, align 4
7657 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7658 define dso_local void @st_align16_int64_t_float(i8* nocapture %ptr, i64 %str) {
7659 ; CHECK-LABEL: st_align16_int64_t_float:
7660 ; CHECK: # %bb.0: # %entry
7661 ; CHECK-NEXT: mtfprd f0, r4
7662 ; CHECK-NEXT: xscvsxdsp f0, f0
7663 ; CHECK-NEXT: stfs f0, 8(r3)
7666 %conv = sitofp i64 %str to float
7667 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
7668 %0 = bitcast i8* %add.ptr to float*
7669 store float %conv, float* %0, align 4
7673 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7674 define dso_local void @st_align32_int64_t_float(i8* nocapture %ptr, i64 %str) {
7675 ; CHECK-P10-LABEL: st_align32_int64_t_float:
7676 ; CHECK-P10: # %bb.0: # %entry
7677 ; CHECK-P10-NEXT: mtfprd f0, r4
7678 ; CHECK-P10-NEXT: pli r4, 99999000
7679 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
7680 ; CHECK-P10-NEXT: stfsx f0, r3, r4
7681 ; CHECK-P10-NEXT: blr
7683 ; CHECK-P9-LABEL: st_align32_int64_t_float:
7684 ; CHECK-P9: # %bb.0: # %entry
7685 ; CHECK-P9-NEXT: mtfprd f0, r4
7686 ; CHECK-P9-NEXT: lis r4, 1525
7687 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
7688 ; CHECK-P9-NEXT: ori r4, r4, 56600
7689 ; CHECK-P9-NEXT: stfsx f0, r3, r4
7690 ; CHECK-P9-NEXT: blr
7692 ; CHECK-P8-LABEL: st_align32_int64_t_float:
7693 ; CHECK-P8: # %bb.0: # %entry
7694 ; CHECK-P8-NEXT: mtfprd f0, r4
7695 ; CHECK-P8-NEXT: lis r4, 1525
7696 ; CHECK-P8-NEXT: ori r4, r4, 56600
7697 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
7698 ; CHECK-P8-NEXT: stfsx f0, r3, r4
7699 ; CHECK-P8-NEXT: blr
7701 %conv = sitofp i64 %str to float
7702 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
7703 %0 = bitcast i8* %add.ptr to float*
7704 store float %conv, float* %0, align 4
7708 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7709 define dso_local void @st_align64_int64_t_float(i8* nocapture %ptr, i64 %str) {
7710 ; CHECK-P10-LABEL: st_align64_int64_t_float:
7711 ; CHECK-P10: # %bb.0: # %entry
7712 ; CHECK-P10-NEXT: mtfprd f0, r4
7713 ; CHECK-P10-NEXT: pli r4, 244140625
7714 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7715 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
7716 ; CHECK-P10-NEXT: stfsx f0, r3, r4
7717 ; CHECK-P10-NEXT: blr
7719 ; CHECK-P9-LABEL: st_align64_int64_t_float:
7720 ; CHECK-P9: # %bb.0: # %entry
7721 ; CHECK-P9-NEXT: mtfprd f0, r4
7722 ; CHECK-P9-NEXT: lis r4, 3725
7723 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
7724 ; CHECK-P9-NEXT: ori r4, r4, 19025
7725 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
7726 ; CHECK-P9-NEXT: stfsx f0, r3, r4
7727 ; CHECK-P9-NEXT: blr
7729 ; CHECK-P8-LABEL: st_align64_int64_t_float:
7730 ; CHECK-P8: # %bb.0: # %entry
7731 ; CHECK-P8-NEXT: mtfprd f0, r4
7732 ; CHECK-P8-NEXT: lis r4, 3725
7733 ; CHECK-P8-NEXT: ori r4, r4, 19025
7734 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
7735 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
7736 ; CHECK-P8-NEXT: stfsx f0, r3, r4
7737 ; CHECK-P8-NEXT: blr
7739 %conv = sitofp i64 %str to float
7740 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
7741 %0 = bitcast i8* %add.ptr to float*
7742 store float %conv, float* %0, align 4
7746 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7747 define dso_local void @st_reg_int64_t_float(i8* nocapture %ptr, i64 %off, i64 %str) {
7748 ; CHECK-LABEL: st_reg_int64_t_float:
7749 ; CHECK: # %bb.0: # %entry
7750 ; CHECK-NEXT: mtfprd f0, r5
7751 ; CHECK-NEXT: xscvsxdsp f0, f0
7752 ; CHECK-NEXT: stfsx f0, r3, r4
7755 %conv = sitofp i64 %str to float
7756 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
7757 %0 = bitcast i8* %add.ptr to float*
7758 store float %conv, float* %0, align 4
7762 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7763 define dso_local void @st_or1_int64_t_float(i64 %ptr, i8 zeroext %off, i64 %str) {
7764 ; CHECK-LABEL: st_or1_int64_t_float:
7765 ; CHECK: # %bb.0: # %entry
7766 ; CHECK-NEXT: mtfprd f0, r5
7767 ; CHECK-NEXT: or r3, r4, r3
7768 ; CHECK-NEXT: xscvsxdsp f0, f0
7769 ; CHECK-NEXT: stfs f0, 0(r3)
7772 %conv = sitofp i64 %str to float
7773 %conv1 = zext i8 %off to i64
7774 %or = or i64 %conv1, %ptr
7775 %0 = inttoptr i64 %or to float*
7776 store float %conv, float* %0, align 4
7780 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7781 define dso_local void @st_or2_int64_t_float(i64 %ptr, i8 zeroext %off, i64 %str) {
7782 ; CHECK-LABEL: st_or2_int64_t_float:
7783 ; CHECK: # %bb.0: # %entry
7784 ; CHECK-NEXT: mtfprd f0, r5
7785 ; CHECK-NEXT: rldicr r3, r3, 0, 51
7786 ; CHECK-NEXT: xscvsxdsp f0, f0
7787 ; CHECK-NEXT: stfsx f0, r3, r4
7790 %and = and i64 %ptr, -4096
7791 %conv = sitofp i64 %str to float
7792 %conv1 = zext i8 %off to i64
7793 %or = or i64 %and, %conv1
7794 %0 = inttoptr i64 %or to float*
7795 store float %conv, float* %0, align 4
7799 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7800 define dso_local void @st_not_disjoint16_int64_t_float(i64 %ptr, i64 %str) {
7801 ; CHECK-LABEL: st_not_disjoint16_int64_t_float:
7802 ; CHECK: # %bb.0: # %entry
7803 ; CHECK-NEXT: mtfprd f0, r4
7804 ; CHECK-NEXT: ori r3, r3, 6
7805 ; CHECK-NEXT: xscvsxdsp f0, f0
7806 ; CHECK-NEXT: stfs f0, 0(r3)
7809 %conv = sitofp i64 %str to float
7810 %or = or i64 %ptr, 6
7811 %0 = inttoptr i64 %or to float*
7812 store float %conv, float* %0, align 4
7816 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7817 define dso_local void @st_disjoint_align16_int64_t_float(i64 %ptr, i64 %str) {
7818 ; CHECK-LABEL: st_disjoint_align16_int64_t_float:
7819 ; CHECK: # %bb.0: # %entry
7820 ; CHECK-NEXT: mtfprd f0, r4
7821 ; CHECK-NEXT: rldicr r3, r3, 0, 51
7822 ; CHECK-NEXT: xscvsxdsp f0, f0
7823 ; CHECK-NEXT: stfs f0, 24(r3)
7826 %and = and i64 %ptr, -4096
7827 %conv = sitofp i64 %str to float
7828 %or = or i64 %and, 24
7829 %0 = inttoptr i64 %or to float*
7830 store float %conv, float* %0, align 8
7834 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7835 define dso_local void @st_not_disjoint32_int64_t_float(i64 %ptr, i64 %str) {
7836 ; CHECK-P10-LABEL: st_not_disjoint32_int64_t_float:
7837 ; CHECK-P10: # %bb.0: # %entry
7838 ; CHECK-P10-NEXT: mtfprd f0, r4
7839 ; CHECK-P10-NEXT: ori r3, r3, 34463
7840 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
7841 ; CHECK-P10-NEXT: oris r3, r3, 1
7842 ; CHECK-P10-NEXT: stfs f0, 0(r3)
7843 ; CHECK-P10-NEXT: blr
7845 ; CHECK-P9-LABEL: st_not_disjoint32_int64_t_float:
7846 ; CHECK-P9: # %bb.0: # %entry
7847 ; CHECK-P9-NEXT: mtfprd f0, r4
7848 ; CHECK-P9-NEXT: ori r3, r3, 34463
7849 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
7850 ; CHECK-P9-NEXT: oris r3, r3, 1
7851 ; CHECK-P9-NEXT: stfs f0, 0(r3)
7852 ; CHECK-P9-NEXT: blr
7854 ; CHECK-P8-LABEL: st_not_disjoint32_int64_t_float:
7855 ; CHECK-P8: # %bb.0: # %entry
7856 ; CHECK-P8-NEXT: mtfprd f0, r4
7857 ; CHECK-P8-NEXT: ori r3, r3, 34463
7858 ; CHECK-P8-NEXT: oris r3, r3, 1
7859 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
7860 ; CHECK-P8-NEXT: stfs f0, 0(r3)
7861 ; CHECK-P8-NEXT: blr
7863 %conv = sitofp i64 %str to float
7864 %or = or i64 %ptr, 99999
7865 %0 = inttoptr i64 %or to float*
7866 store float %conv, float* %0, align 4
7870 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7871 define dso_local void @st_disjoint_align32_int64_t_float(i64 %ptr, i64 %str) {
7872 ; CHECK-P10-LABEL: st_disjoint_align32_int64_t_float:
7873 ; CHECK-P10: # %bb.0: # %entry
7874 ; CHECK-P10-NEXT: mtfprd f0, r4
7875 ; CHECK-P10-NEXT: lis r5, -15264
7876 ; CHECK-P10-NEXT: pli r4, 999990000
7877 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
7878 ; CHECK-P10-NEXT: and r3, r3, r5
7879 ; CHECK-P10-NEXT: stfsx f0, r3, r4
7880 ; CHECK-P10-NEXT: blr
7882 ; CHECK-P9-LABEL: st_disjoint_align32_int64_t_float:
7883 ; CHECK-P9: # %bb.0: # %entry
7884 ; CHECK-P9-NEXT: mtfprd f0, r4
7885 ; CHECK-P9-NEXT: lis r5, -15264
7886 ; CHECK-P9-NEXT: lis r4, 15258
7887 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
7888 ; CHECK-P9-NEXT: and r3, r3, r5
7889 ; CHECK-P9-NEXT: ori r4, r4, 41712
7890 ; CHECK-P9-NEXT: stfsx f0, r3, r4
7891 ; CHECK-P9-NEXT: blr
7893 ; CHECK-P8-LABEL: st_disjoint_align32_int64_t_float:
7894 ; CHECK-P8: # %bb.0: # %entry
7895 ; CHECK-P8-NEXT: mtfprd f0, r4
7896 ; CHECK-P8-NEXT: lis r4, -15264
7897 ; CHECK-P8-NEXT: lis r5, 15258
7898 ; CHECK-P8-NEXT: and r3, r3, r4
7899 ; CHECK-P8-NEXT: ori r4, r5, 41712
7900 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
7901 ; CHECK-P8-NEXT: stfsx f0, r3, r4
7902 ; CHECK-P8-NEXT: blr
7904 %and = and i64 %ptr, -1000341504
7905 %conv = sitofp i64 %str to float
7906 %or = or i64 %and, 999990000
7907 %0 = inttoptr i64 %or to float*
7908 store float %conv, float* %0, align 16
7912 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7913 define dso_local void @st_not_disjoint64_int64_t_float(i64 %ptr, i64 %str) {
7914 ; CHECK-P10-LABEL: st_not_disjoint64_int64_t_float:
7915 ; CHECK-P10: # %bb.0: # %entry
7916 ; CHECK-P10-NEXT: mtfprd f0, r4
7917 ; CHECK-P10-NEXT: pli r4, 232
7918 ; CHECK-P10-NEXT: pli r5, 3567587329
7919 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
7920 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
7921 ; CHECK-P10-NEXT: or r3, r3, r5
7922 ; CHECK-P10-NEXT: stfs f0, 0(r3)
7923 ; CHECK-P10-NEXT: blr
7925 ; CHECK-PREP10-LABEL: st_not_disjoint64_int64_t_float:
7926 ; CHECK-PREP10: # %bb.0: # %entry
7927 ; CHECK-PREP10-NEXT: mtfprd f0, r4
7928 ; CHECK-PREP10-NEXT: li r4, 29
7929 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
7930 ; CHECK-PREP10-NEXT: xscvsxdsp f0, f0
7931 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
7932 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
7933 ; CHECK-PREP10-NEXT: or r3, r3, r4
7934 ; CHECK-PREP10-NEXT: stfs f0, 0(r3)
7935 ; CHECK-PREP10-NEXT: blr
7937 %conv = sitofp i64 %str to float
7938 %or = or i64 %ptr, 1000000000001
7939 %0 = inttoptr i64 %or to float*
7940 store float %conv, float* %0, align 4
7944 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7945 define dso_local void @st_disjoint_align64_int64_t_float(i64 %ptr, i64 %str) {
7946 ; CHECK-P10-LABEL: st_disjoint_align64_int64_t_float:
7947 ; CHECK-P10: # %bb.0: # %entry
7948 ; CHECK-P10-NEXT: mtfprd f0, r4
7949 ; CHECK-P10-NEXT: pli r4, 244140625
7950 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
7951 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7952 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
7953 ; CHECK-P10-NEXT: stfsx f0, r3, r4
7954 ; CHECK-P10-NEXT: blr
7956 ; CHECK-P9-LABEL: st_disjoint_align64_int64_t_float:
7957 ; CHECK-P9: # %bb.0: # %entry
7958 ; CHECK-P9-NEXT: mtfprd f0, r4
7959 ; CHECK-P9-NEXT: lis r4, 3725
7960 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
7961 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
7962 ; CHECK-P9-NEXT: ori r4, r4, 19025
7963 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
7964 ; CHECK-P9-NEXT: stfsx f0, r3, r4
7965 ; CHECK-P9-NEXT: blr
7967 ; CHECK-P8-LABEL: st_disjoint_align64_int64_t_float:
7968 ; CHECK-P8: # %bb.0: # %entry
7969 ; CHECK-P8-NEXT: mtfprd f0, r4
7970 ; CHECK-P8-NEXT: lis r5, 3725
7971 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
7972 ; CHECK-P8-NEXT: ori r4, r5, 19025
7973 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
7974 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
7975 ; CHECK-P8-NEXT: stfsx f0, r3, r4
7976 ; CHECK-P8-NEXT: blr
7978 %and = and i64 %ptr, -1099511627776
7979 %conv = sitofp i64 %str to float
7980 %or = or i64 %and, 1000000000000
7981 %0 = inttoptr i64 %or to float*
7982 store float %conv, float* %0, align 4096
7986 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7987 define dso_local void @st_cst_align16_int64_t_float(i64 %str) {
7988 ; CHECK-LABEL: st_cst_align16_int64_t_float:
7989 ; CHECK: # %bb.0: # %entry
7990 ; CHECK-NEXT: mtfprd f0, r3
7991 ; CHECK-NEXT: xscvsxdsp f0, f0
7992 ; CHECK-NEXT: stfs f0, 4080(0)
7995 %conv = sitofp i64 %str to float
7996 store float %conv, float* inttoptr (i64 4080 to float*), align 16
8000 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8001 define dso_local void @st_cst_align32_int64_t_float(i64 %str) {
8002 ; CHECK-LABEL: st_cst_align32_int64_t_float:
8003 ; CHECK: # %bb.0: # %entry
8004 ; CHECK-NEXT: mtfprd f0, r3
8005 ; CHECK-NEXT: lis r3, 153
8006 ; CHECK-NEXT: xscvsxdsp f0, f0
8007 ; CHECK-NEXT: stfs f0, -27108(r3)
8010 %conv = sitofp i64 %str to float
8011 store float %conv, float* inttoptr (i64 9999900 to float*), align 4
8015 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8016 define dso_local void @st_cst_align64_int64_t_float(i64 %str) {
8017 ; CHECK-P10-LABEL: st_cst_align64_int64_t_float:
8018 ; CHECK-P10: # %bb.0: # %entry
8019 ; CHECK-P10-NEXT: mtfprd f0, r3
8020 ; CHECK-P10-NEXT: pli r3, 244140625
8021 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
8022 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
8023 ; CHECK-P10-NEXT: stfs f0, 0(r3)
8024 ; CHECK-P10-NEXT: blr
8026 ; CHECK-P9-LABEL: st_cst_align64_int64_t_float:
8027 ; CHECK-P9: # %bb.0: # %entry
8028 ; CHECK-P9-NEXT: mtfprd f0, r3
8029 ; CHECK-P9-NEXT: lis r3, 3725
8030 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
8031 ; CHECK-P9-NEXT: ori r3, r3, 19025
8032 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
8033 ; CHECK-P9-NEXT: stfs f0, 0(r3)
8034 ; CHECK-P9-NEXT: blr
8036 ; CHECK-P8-LABEL: st_cst_align64_int64_t_float:
8037 ; CHECK-P8: # %bb.0: # %entry
8038 ; CHECK-P8-NEXT: mtfprd f0, r3
8039 ; CHECK-P8-NEXT: lis r3, 3725
8040 ; CHECK-P8-NEXT: ori r3, r3, 19025
8041 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
8042 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
8043 ; CHECK-P8-NEXT: stfs f0, 0(r3)
8044 ; CHECK-P8-NEXT: blr
8046 %conv = sitofp i64 %str to float
8047 store float %conv, float* inttoptr (i64 1000000000000 to float*), align 4096
8051 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8052 define dso_local void @st_0_int64_t_double(i64 %ptr, i64 %str) {
8053 ; CHECK-LABEL: st_0_int64_t_double:
8054 ; CHECK: # %bb.0: # %entry
8055 ; CHECK-NEXT: mtfprd f0, r4
8056 ; CHECK-NEXT: xscvsxddp f0, f0
8057 ; CHECK-NEXT: stfd f0, 0(r3)
8060 %conv = sitofp i64 %str to double
8061 %0 = inttoptr i64 %ptr to double*
8062 store double %conv, double* %0, align 8
8066 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8067 define dso_local void @st_align16_int64_t_double(i8* nocapture %ptr, i64 %str) {
8068 ; CHECK-LABEL: st_align16_int64_t_double:
8069 ; CHECK: # %bb.0: # %entry
8070 ; CHECK-NEXT: mtfprd f0, r4
8071 ; CHECK-NEXT: xscvsxddp f0, f0
8072 ; CHECK-NEXT: stfd f0, 8(r3)
8075 %conv = sitofp i64 %str to double
8076 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
8077 %0 = bitcast i8* %add.ptr to double*
8078 store double %conv, double* %0, align 8
8082 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8083 define dso_local void @st_align32_int64_t_double(i8* nocapture %ptr, i64 %str) {
8084 ; CHECK-P10-LABEL: st_align32_int64_t_double:
8085 ; CHECK-P10: # %bb.0: # %entry
8086 ; CHECK-P10-NEXT: mtfprd f0, r4
8087 ; CHECK-P10-NEXT: pli r4, 99999000
8088 ; CHECK-P10-NEXT: xscvsxddp f0, f0
8089 ; CHECK-P10-NEXT: stfdx f0, r3, r4
8090 ; CHECK-P10-NEXT: blr
8092 ; CHECK-P9-LABEL: st_align32_int64_t_double:
8093 ; CHECK-P9: # %bb.0: # %entry
8094 ; CHECK-P9-NEXT: mtfprd f0, r4
8095 ; CHECK-P9-NEXT: lis r4, 1525
8096 ; CHECK-P9-NEXT: xscvsxddp f0, f0
8097 ; CHECK-P9-NEXT: ori r4, r4, 56600
8098 ; CHECK-P9-NEXT: stfdx f0, r3, r4
8099 ; CHECK-P9-NEXT: blr
8101 ; CHECK-P8-LABEL: st_align32_int64_t_double:
8102 ; CHECK-P8: # %bb.0: # %entry
8103 ; CHECK-P8-NEXT: mtfprd f0, r4
8104 ; CHECK-P8-NEXT: lis r4, 1525
8105 ; CHECK-P8-NEXT: ori r4, r4, 56600
8106 ; CHECK-P8-NEXT: xscvsxddp f0, f0
8107 ; CHECK-P8-NEXT: stfdx f0, r3, r4
8108 ; CHECK-P8-NEXT: blr
8110 %conv = sitofp i64 %str to double
8111 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
8112 %0 = bitcast i8* %add.ptr to double*
8113 store double %conv, double* %0, align 8
8117 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8118 define dso_local void @st_align64_int64_t_double(i8* nocapture %ptr, i64 %str) {
8119 ; CHECK-P10-LABEL: st_align64_int64_t_double:
8120 ; CHECK-P10: # %bb.0: # %entry
8121 ; CHECK-P10-NEXT: mtfprd f0, r4
8122 ; CHECK-P10-NEXT: pli r4, 244140625
8123 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
8124 ; CHECK-P10-NEXT: xscvsxddp f0, f0
8125 ; CHECK-P10-NEXT: stfdx f0, r3, r4
8126 ; CHECK-P10-NEXT: blr
8128 ; CHECK-P9-LABEL: st_align64_int64_t_double:
8129 ; CHECK-P9: # %bb.0: # %entry
8130 ; CHECK-P9-NEXT: mtfprd f0, r4
8131 ; CHECK-P9-NEXT: lis r4, 3725
8132 ; CHECK-P9-NEXT: xscvsxddp f0, f0
8133 ; CHECK-P9-NEXT: ori r4, r4, 19025
8134 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
8135 ; CHECK-P9-NEXT: stfdx f0, r3, r4
8136 ; CHECK-P9-NEXT: blr
8138 ; CHECK-P8-LABEL: st_align64_int64_t_double:
8139 ; CHECK-P8: # %bb.0: # %entry
8140 ; CHECK-P8-NEXT: mtfprd f0, r4
8141 ; CHECK-P8-NEXT: lis r4, 3725
8142 ; CHECK-P8-NEXT: ori r4, r4, 19025
8143 ; CHECK-P8-NEXT: xscvsxddp f0, f0
8144 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
8145 ; CHECK-P8-NEXT: stfdx f0, r3, r4
8146 ; CHECK-P8-NEXT: blr
8148 %conv = sitofp i64 %str to double
8149 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
8150 %0 = bitcast i8* %add.ptr to double*
8151 store double %conv, double* %0, align 8
8155 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8156 define dso_local void @st_reg_int64_t_double(i8* nocapture %ptr, i64 %off, i64 %str) {
8157 ; CHECK-LABEL: st_reg_int64_t_double:
8158 ; CHECK: # %bb.0: # %entry
8159 ; CHECK-NEXT: mtfprd f0, r5
8160 ; CHECK-NEXT: xscvsxddp f0, f0
8161 ; CHECK-NEXT: stfdx f0, r3, r4
8164 %conv = sitofp i64 %str to double
8165 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
8166 %0 = bitcast i8* %add.ptr to double*
8167 store double %conv, double* %0, align 8
8171 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8172 define dso_local void @st_or1_int64_t_double(i64 %ptr, i8 zeroext %off, i64 %str) {
8173 ; CHECK-LABEL: st_or1_int64_t_double:
8174 ; CHECK: # %bb.0: # %entry
8175 ; CHECK-NEXT: mtfprd f0, r5
8176 ; CHECK-NEXT: or r3, r4, r3
8177 ; CHECK-NEXT: xscvsxddp f0, f0
8178 ; CHECK-NEXT: stfd f0, 0(r3)
8181 %conv = sitofp i64 %str to double
8182 %conv1 = zext i8 %off to i64
8183 %or = or i64 %conv1, %ptr
8184 %0 = inttoptr i64 %or to double*
8185 store double %conv, double* %0, align 8
8189 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8190 define dso_local void @st_or2_int64_t_double(i64 %ptr, i8 zeroext %off, i64 %str) {
8191 ; CHECK-LABEL: st_or2_int64_t_double:
8192 ; CHECK: # %bb.0: # %entry
8193 ; CHECK-NEXT: mtfprd f0, r5
8194 ; CHECK-NEXT: rldicr r3, r3, 0, 51
8195 ; CHECK-NEXT: xscvsxddp f0, f0
8196 ; CHECK-NEXT: stfdx f0, r3, r4
8199 %and = and i64 %ptr, -4096
8200 %conv = sitofp i64 %str to double
8201 %conv1 = zext i8 %off to i64
8202 %or = or i64 %and, %conv1
8203 %0 = inttoptr i64 %or to double*
8204 store double %conv, double* %0, align 8
8208 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8209 define dso_local void @st_not_disjoint16_int64_t_double(i64 %ptr, i64 %str) {
8210 ; CHECK-LABEL: st_not_disjoint16_int64_t_double:
8211 ; CHECK: # %bb.0: # %entry
8212 ; CHECK-NEXT: mtfprd f0, r4
8213 ; CHECK-NEXT: ori r3, r3, 6
8214 ; CHECK-NEXT: xscvsxddp f0, f0
8215 ; CHECK-NEXT: stfd f0, 0(r3)
8218 %conv = sitofp i64 %str to double
8219 %or = or i64 %ptr, 6
8220 %0 = inttoptr i64 %or to double*
8221 store double %conv, double* %0, align 8
8225 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8226 define dso_local void @st_disjoint_align16_int64_t_double(i64 %ptr, i64 %str) {
8227 ; CHECK-LABEL: st_disjoint_align16_int64_t_double:
8228 ; CHECK: # %bb.0: # %entry
8229 ; CHECK-NEXT: mtfprd f0, r4
8230 ; CHECK-NEXT: rldicr r3, r3, 0, 51
8231 ; CHECK-NEXT: xscvsxddp f0, f0
8232 ; CHECK-NEXT: stfd f0, 24(r3)
8235 %and = and i64 %ptr, -4096
8236 %conv = sitofp i64 %str to double
8237 %or = or i64 %and, 24
8238 %0 = inttoptr i64 %or to double*
8239 store double %conv, double* %0, align 8
8243 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8244 define dso_local void @st_not_disjoint32_int64_t_double(i64 %ptr, i64 %str) {
8245 ; CHECK-P10-LABEL: st_not_disjoint32_int64_t_double:
8246 ; CHECK-P10: # %bb.0: # %entry
8247 ; CHECK-P10-NEXT: mtfprd f0, r4
8248 ; CHECK-P10-NEXT: ori r3, r3, 34463
8249 ; CHECK-P10-NEXT: xscvsxddp f0, f0
8250 ; CHECK-P10-NEXT: oris r3, r3, 1
8251 ; CHECK-P10-NEXT: stfd f0, 0(r3)
8252 ; CHECK-P10-NEXT: blr
8254 ; CHECK-P9-LABEL: st_not_disjoint32_int64_t_double:
8255 ; CHECK-P9: # %bb.0: # %entry
8256 ; CHECK-P9-NEXT: mtfprd f0, r4
8257 ; CHECK-P9-NEXT: ori r3, r3, 34463
8258 ; CHECK-P9-NEXT: xscvsxddp f0, f0
8259 ; CHECK-P9-NEXT: oris r3, r3, 1
8260 ; CHECK-P9-NEXT: stfd f0, 0(r3)
8261 ; CHECK-P9-NEXT: blr
8263 ; CHECK-P8-LABEL: st_not_disjoint32_int64_t_double:
8264 ; CHECK-P8: # %bb.0: # %entry
8265 ; CHECK-P8-NEXT: mtfprd f0, r4
8266 ; CHECK-P8-NEXT: ori r3, r3, 34463
8267 ; CHECK-P8-NEXT: oris r3, r3, 1
8268 ; CHECK-P8-NEXT: xscvsxddp f0, f0
8269 ; CHECK-P8-NEXT: stfd f0, 0(r3)
8270 ; CHECK-P8-NEXT: blr
8272 %conv = sitofp i64 %str to double
8273 %or = or i64 %ptr, 99999
8274 %0 = inttoptr i64 %or to double*
8275 store double %conv, double* %0, align 8
8279 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8280 define dso_local void @st_disjoint_align32_int64_t_double(i64 %ptr, i64 %str) {
8281 ; CHECK-P10-LABEL: st_disjoint_align32_int64_t_double:
8282 ; CHECK-P10: # %bb.0: # %entry
8283 ; CHECK-P10-NEXT: mtfprd f0, r4
8284 ; CHECK-P10-NEXT: lis r5, -15264
8285 ; CHECK-P10-NEXT: pli r4, 999990000
8286 ; CHECK-P10-NEXT: xscvsxddp f0, f0
8287 ; CHECK-P10-NEXT: and r3, r3, r5
8288 ; CHECK-P10-NEXT: stfdx f0, r3, r4
8289 ; CHECK-P10-NEXT: blr
8291 ; CHECK-P9-LABEL: st_disjoint_align32_int64_t_double:
8292 ; CHECK-P9: # %bb.0: # %entry
8293 ; CHECK-P9-NEXT: mtfprd f0, r4
8294 ; CHECK-P9-NEXT: lis r5, -15264
8295 ; CHECK-P9-NEXT: lis r4, 15258
8296 ; CHECK-P9-NEXT: xscvsxddp f0, f0
8297 ; CHECK-P9-NEXT: and r3, r3, r5
8298 ; CHECK-P9-NEXT: ori r4, r4, 41712
8299 ; CHECK-P9-NEXT: stfdx f0, r3, r4
8300 ; CHECK-P9-NEXT: blr
8302 ; CHECK-P8-LABEL: st_disjoint_align32_int64_t_double:
8303 ; CHECK-P8: # %bb.0: # %entry
8304 ; CHECK-P8-NEXT: mtfprd f0, r4
8305 ; CHECK-P8-NEXT: lis r4, -15264
8306 ; CHECK-P8-NEXT: lis r5, 15258
8307 ; CHECK-P8-NEXT: and r3, r3, r4
8308 ; CHECK-P8-NEXT: ori r4, r5, 41712
8309 ; CHECK-P8-NEXT: xscvsxddp f0, f0
8310 ; CHECK-P8-NEXT: stfdx f0, r3, r4
8311 ; CHECK-P8-NEXT: blr
8313 %and = and i64 %ptr, -1000341504
8314 %conv = sitofp i64 %str to double
8315 %or = or i64 %and, 999990000
8316 %0 = inttoptr i64 %or to double*
8317 store double %conv, double* %0, align 16
8321 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8322 define dso_local void @st_not_disjoint64_int64_t_double(i64 %ptr, i64 %str) {
8323 ; CHECK-P10-LABEL: st_not_disjoint64_int64_t_double:
8324 ; CHECK-P10: # %bb.0: # %entry
8325 ; CHECK-P10-NEXT: mtfprd f0, r4
8326 ; CHECK-P10-NEXT: pli r4, 232
8327 ; CHECK-P10-NEXT: pli r5, 3567587329
8328 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
8329 ; CHECK-P10-NEXT: xscvsxddp f0, f0
8330 ; CHECK-P10-NEXT: or r3, r3, r5
8331 ; CHECK-P10-NEXT: stfd f0, 0(r3)
8332 ; CHECK-P10-NEXT: blr
8334 ; CHECK-PREP10-LABEL: st_not_disjoint64_int64_t_double:
8335 ; CHECK-PREP10: # %bb.0: # %entry
8336 ; CHECK-PREP10-NEXT: mtfprd f0, r4
8337 ; CHECK-PREP10-NEXT: li r4, 29
8338 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
8339 ; CHECK-PREP10-NEXT: xscvsxddp f0, f0
8340 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
8341 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
8342 ; CHECK-PREP10-NEXT: or r3, r3, r4
8343 ; CHECK-PREP10-NEXT: stfd f0, 0(r3)
8344 ; CHECK-PREP10-NEXT: blr
8346 %conv = sitofp i64 %str to double
8347 %or = or i64 %ptr, 1000000000001
8348 %0 = inttoptr i64 %or to double*
8349 store double %conv, double* %0, align 8
8353 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8354 define dso_local void @st_disjoint_align64_int64_t_double(i64 %ptr, i64 %str) {
8355 ; CHECK-P10-LABEL: st_disjoint_align64_int64_t_double:
8356 ; CHECK-P10: # %bb.0: # %entry
8357 ; CHECK-P10-NEXT: mtfprd f0, r4
8358 ; CHECK-P10-NEXT: pli r4, 244140625
8359 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
8360 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
8361 ; CHECK-P10-NEXT: xscvsxddp f0, f0
8362 ; CHECK-P10-NEXT: stfdx f0, r3, r4
8363 ; CHECK-P10-NEXT: blr
8365 ; CHECK-P9-LABEL: st_disjoint_align64_int64_t_double:
8366 ; CHECK-P9: # %bb.0: # %entry
8367 ; CHECK-P9-NEXT: mtfprd f0, r4
8368 ; CHECK-P9-NEXT: lis r4, 3725
8369 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
8370 ; CHECK-P9-NEXT: xscvsxddp f0, f0
8371 ; CHECK-P9-NEXT: ori r4, r4, 19025
8372 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
8373 ; CHECK-P9-NEXT: stfdx f0, r3, r4
8374 ; CHECK-P9-NEXT: blr
8376 ; CHECK-P8-LABEL: st_disjoint_align64_int64_t_double:
8377 ; CHECK-P8: # %bb.0: # %entry
8378 ; CHECK-P8-NEXT: mtfprd f0, r4
8379 ; CHECK-P8-NEXT: lis r5, 3725
8380 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
8381 ; CHECK-P8-NEXT: ori r4, r5, 19025
8382 ; CHECK-P8-NEXT: xscvsxddp f0, f0
8383 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
8384 ; CHECK-P8-NEXT: stfdx f0, r3, r4
8385 ; CHECK-P8-NEXT: blr
8387 %and = and i64 %ptr, -1099511627776
8388 %conv = sitofp i64 %str to double
8389 %or = or i64 %and, 1000000000000
8390 %0 = inttoptr i64 %or to double*
8391 store double %conv, double* %0, align 4096
8395 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8396 define dso_local void @st_cst_align16_int64_t_double(i64 %str) {
8397 ; CHECK-LABEL: st_cst_align16_int64_t_double:
8398 ; CHECK: # %bb.0: # %entry
8399 ; CHECK-NEXT: mtfprd f0, r3
8400 ; CHECK-NEXT: xscvsxddp f0, f0
8401 ; CHECK-NEXT: stfd f0, 4080(0)
8404 %conv = sitofp i64 %str to double
8405 store double %conv, double* inttoptr (i64 4080 to double*), align 16
8409 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8410 define dso_local void @st_cst_align32_int64_t_double(i64 %str) {
8411 ; CHECK-LABEL: st_cst_align32_int64_t_double:
8412 ; CHECK: # %bb.0: # %entry
8413 ; CHECK-NEXT: mtfprd f0, r3
8414 ; CHECK-NEXT: lis r3, 153
8415 ; CHECK-NEXT: xscvsxddp f0, f0
8416 ; CHECK-NEXT: stfd f0, -27108(r3)
8419 %conv = sitofp i64 %str to double
8420 store double %conv, double* inttoptr (i64 9999900 to double*), align 8
8424 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8425 define dso_local void @st_cst_align64_int64_t_double(i64 %str) {
8426 ; CHECK-P10-LABEL: st_cst_align64_int64_t_double:
8427 ; CHECK-P10: # %bb.0: # %entry
8428 ; CHECK-P10-NEXT: mtfprd f0, r3
8429 ; CHECK-P10-NEXT: pli r3, 244140625
8430 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
8431 ; CHECK-P10-NEXT: xscvsxddp f0, f0
8432 ; CHECK-P10-NEXT: stfd f0, 0(r3)
8433 ; CHECK-P10-NEXT: blr
8435 ; CHECK-P9-LABEL: st_cst_align64_int64_t_double:
8436 ; CHECK-P9: # %bb.0: # %entry
8437 ; CHECK-P9-NEXT: mtfprd f0, r3
8438 ; CHECK-P9-NEXT: lis r3, 3725
8439 ; CHECK-P9-NEXT: xscvsxddp f0, f0
8440 ; CHECK-P9-NEXT: ori r3, r3, 19025
8441 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
8442 ; CHECK-P9-NEXT: stfd f0, 0(r3)
8443 ; CHECK-P9-NEXT: blr
8445 ; CHECK-P8-LABEL: st_cst_align64_int64_t_double:
8446 ; CHECK-P8: # %bb.0: # %entry
8447 ; CHECK-P8-NEXT: mtfprd f0, r3
8448 ; CHECK-P8-NEXT: lis r3, 3725
8449 ; CHECK-P8-NEXT: ori r3, r3, 19025
8450 ; CHECK-P8-NEXT: xscvsxddp f0, f0
8451 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
8452 ; CHECK-P8-NEXT: stfd f0, 0(r3)
8453 ; CHECK-P8-NEXT: blr
8455 %conv = sitofp i64 %str to double
8456 store double %conv, double* inttoptr (i64 1000000000000 to double*), align 4096