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,CHECK-LE,CHECK-P10-LE
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,CHECK-BE,CHECK-P10-BE
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,CHECK-LE,CHECK-P9-LE
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,CHECK-BE,CHECK-P9-BE
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,CHECK-LE,CHECK-P8-LE
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,CHECK-BE,CHECK-P8-BE
21 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
22 define dso_local signext i32 @ld_0_int32_t_int8_t(i64 %ptr) {
23 ; CHECK-LABEL: ld_0_int32_t_int8_t:
24 ; CHECK: # %bb.0: # %entry
25 ; CHECK-NEXT: lbz r3, 0(r3)
26 ; CHECK-NEXT: extsb r3, r3
29 %0 = inttoptr i64 %ptr to ptr
30 %1 = load i8, ptr %0, align 1
31 %conv = sext i8 %1 to i32
35 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
36 define dso_local signext i32 @ld_align16_int32_t_int8_t(ptr nocapture readonly %ptr) {
37 ; CHECK-LABEL: ld_align16_int32_t_int8_t:
38 ; CHECK: # %bb.0: # %entry
39 ; CHECK-NEXT: lbz r3, 8(r3)
40 ; CHECK-NEXT: extsb r3, r3
43 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
44 %0 = load i8, ptr %add.ptr, align 1
45 %conv = sext i8 %0 to i32
49 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
50 define dso_local signext i32 @ld_align32_int32_t_int8_t(ptr nocapture readonly %ptr) {
51 ; CHECK-P10-LABEL: ld_align32_int32_t_int8_t:
52 ; CHECK-P10: # %bb.0: # %entry
53 ; CHECK-P10-NEXT: plbz r3, 99999000(r3), 0
54 ; CHECK-P10-NEXT: extsb r3, r3
57 ; CHECK-PREP10-LABEL: ld_align32_int32_t_int8_t:
58 ; CHECK-PREP10: # %bb.0: # %entry
59 ; CHECK-PREP10-NEXT: lis r4, 1525
60 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
61 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
62 ; CHECK-PREP10-NEXT: extsb r3, r3
63 ; CHECK-PREP10-NEXT: blr
65 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
66 %0 = load i8, ptr %add.ptr, align 1
67 %conv = sext i8 %0 to i32
71 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
72 define dso_local signext i32 @ld_align64_int32_t_int8_t(ptr nocapture readonly %ptr) {
73 ; CHECK-P10-LABEL: ld_align64_int32_t_int8_t:
74 ; CHECK-P10: # %bb.0: # %entry
75 ; CHECK-P10-NEXT: pli r4, 244140625
76 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
77 ; CHECK-P10-NEXT: lbzx r3, r3, r4
78 ; CHECK-P10-NEXT: extsb r3, r3
81 ; CHECK-PREP10-LABEL: ld_align64_int32_t_int8_t:
82 ; CHECK-PREP10: # %bb.0: # %entry
83 ; CHECK-PREP10-NEXT: lis r4, 3725
84 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
85 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
86 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
87 ; CHECK-PREP10-NEXT: extsb r3, r3
88 ; CHECK-PREP10-NEXT: blr
90 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
91 %0 = load i8, ptr %add.ptr, align 1
92 %conv = sext i8 %0 to i32
96 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
97 define dso_local signext i32 @ld_reg_int32_t_int8_t(ptr nocapture readonly %ptr, i64 %off) {
98 ; CHECK-LABEL: ld_reg_int32_t_int8_t:
99 ; CHECK: # %bb.0: # %entry
100 ; CHECK-NEXT: lbzx r3, r3, r4
101 ; CHECK-NEXT: extsb r3, r3
104 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
105 %0 = load i8, ptr %add.ptr, align 1
106 %conv = sext i8 %0 to i32
110 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
111 define dso_local signext i32 @ld_or_int32_t_int8_t(i64 %ptr, i8 zeroext %off) {
112 ; CHECK-LABEL: ld_or_int32_t_int8_t:
113 ; CHECK: # %bb.0: # %entry
114 ; CHECK-NEXT: or r3, r4, r3
115 ; CHECK-NEXT: lbz r3, 0(r3)
116 ; CHECK-NEXT: extsb r3, r3
119 %conv = zext i8 %off to i64
120 %or = or i64 %conv, %ptr
121 %0 = inttoptr i64 %or to ptr
122 %1 = load i8, ptr %0, align 1
123 %conv1 = sext i8 %1 to i32
127 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
128 define dso_local signext i32 @ld_or2_int32_t_int8_t(i64 %ptr, i8 zeroext %off) {
129 ; CHECK-LABEL: ld_or2_int32_t_int8_t:
130 ; CHECK: # %bb.0: # %entry
131 ; CHECK-NEXT: rldicr r3, r3, 0, 51
132 ; CHECK-NEXT: lbzx r3, r3, r4
133 ; CHECK-NEXT: extsb r3, r3
136 %and = and i64 %ptr, -4096
137 %conv = zext i8 %off to i64
138 %or = or i64 %and, %conv
139 %0 = inttoptr i64 %or to ptr
140 %1 = load i8, ptr %0, align 1
141 %conv1 = sext i8 %1 to i32
145 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
146 define dso_local signext i32 @ld_not_disjoint16_int32_t_int8_t(i64 %ptr) {
147 ; CHECK-LABEL: ld_not_disjoint16_int32_t_int8_t:
148 ; CHECK: # %bb.0: # %entry
149 ; CHECK-NEXT: ori r3, r3, 6
150 ; CHECK-NEXT: lbz r3, 0(r3)
151 ; CHECK-NEXT: extsb r3, r3
155 %0 = inttoptr i64 %or to ptr
156 %1 = load i8, ptr %0, align 1
157 %conv = sext i8 %1 to i32
161 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
162 define dso_local signext i32 @ld_disjoint_align16_int32_t_int8_t(i64 %ptr) {
163 ; CHECK-LABEL: ld_disjoint_align16_int32_t_int8_t:
164 ; CHECK: # %bb.0: # %entry
165 ; CHECK-NEXT: rldicr r3, r3, 0, 51
166 ; CHECK-NEXT: lbz r3, 24(r3)
167 ; CHECK-NEXT: extsb r3, r3
170 %and = and i64 %ptr, -4096
171 %or = or i64 %and, 24
172 %0 = inttoptr i64 %or to ptr
173 %1 = load i8, ptr %0, align 8
174 %conv = sext i8 %1 to i32
178 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
179 define dso_local signext i32 @ld_not_disjoint32_int32_t_int8_t(i64 %ptr) {
180 ; CHECK-LABEL: ld_not_disjoint32_int32_t_int8_t:
181 ; CHECK: # %bb.0: # %entry
182 ; CHECK-NEXT: ori r3, r3, 34463
183 ; CHECK-NEXT: oris r3, r3, 1
184 ; CHECK-NEXT: lbz r3, 0(r3)
185 ; CHECK-NEXT: extsb r3, r3
188 %or = or i64 %ptr, 99999
189 %0 = inttoptr i64 %or to ptr
190 %1 = load i8, ptr %0, align 1
191 %conv = sext i8 %1 to i32
195 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
196 define dso_local signext i32 @ld_disjoint_align32_int32_t_int8_t(i64 %ptr) {
197 ; CHECK-P10-LABEL: ld_disjoint_align32_int32_t_int8_t:
198 ; CHECK-P10: # %bb.0: # %entry
199 ; CHECK-P10-NEXT: lis r4, -15264
200 ; CHECK-P10-NEXT: and r3, r3, r4
201 ; CHECK-P10-NEXT: plbz r3, 999990000(r3), 0
202 ; CHECK-P10-NEXT: extsb r3, r3
203 ; CHECK-P10-NEXT: blr
205 ; CHECK-PREP10-LABEL: ld_disjoint_align32_int32_t_int8_t:
206 ; CHECK-PREP10: # %bb.0: # %entry
207 ; CHECK-PREP10-NEXT: lis r4, -15264
208 ; CHECK-PREP10-NEXT: and r3, r3, r4
209 ; CHECK-PREP10-NEXT: lis r4, 15258
210 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
211 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
212 ; CHECK-PREP10-NEXT: extsb r3, r3
213 ; CHECK-PREP10-NEXT: blr
215 %and = and i64 %ptr, -1000341504
216 %or = or i64 %and, 999990000
217 %0 = inttoptr i64 %or to ptr
218 %1 = load i8, ptr %0, align 16
219 %conv = sext i8 %1 to i32
223 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
224 define dso_local signext i32 @ld_not_disjoint64_int32_t_int8_t(i64 %ptr) {
225 ; CHECK-P10-LABEL: ld_not_disjoint64_int32_t_int8_t:
226 ; CHECK-P10: # %bb.0: # %entry
227 ; CHECK-P10-NEXT: pli r4, 232
228 ; CHECK-P10-NEXT: pli r5, 3567587329
229 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
230 ; CHECK-P10-NEXT: or r3, r3, r5
231 ; CHECK-P10-NEXT: lbz r3, 0(r3)
232 ; CHECK-P10-NEXT: extsb r3, r3
233 ; CHECK-P10-NEXT: blr
235 ; CHECK-PREP10-LABEL: ld_not_disjoint64_int32_t_int8_t:
236 ; CHECK-PREP10: # %bb.0: # %entry
237 ; CHECK-PREP10-NEXT: li r4, 29
238 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
239 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
240 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
241 ; CHECK-PREP10-NEXT: or r3, r3, r4
242 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
243 ; CHECK-PREP10-NEXT: extsb r3, r3
244 ; CHECK-PREP10-NEXT: blr
246 %or = or i64 %ptr, 1000000000001
247 %0 = inttoptr i64 %or to ptr
248 %1 = load i8, ptr %0, align 1
249 %conv = sext i8 %1 to i32
253 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
254 define dso_local signext i32 @ld_disjoint_align64_int32_t_int8_t(i64 %ptr) {
255 ; CHECK-P10-LABEL: ld_disjoint_align64_int32_t_int8_t:
256 ; CHECK-P10: # %bb.0: # %entry
257 ; CHECK-P10-NEXT: pli r4, 244140625
258 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
259 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
260 ; CHECK-P10-NEXT: lbzx r3, r3, r4
261 ; CHECK-P10-NEXT: extsb r3, r3
262 ; CHECK-P10-NEXT: blr
264 ; CHECK-PREP10-LABEL: ld_disjoint_align64_int32_t_int8_t:
265 ; CHECK-PREP10: # %bb.0: # %entry
266 ; CHECK-PREP10-NEXT: lis r4, 3725
267 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
268 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
269 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
270 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
271 ; CHECK-PREP10-NEXT: extsb r3, r3
272 ; CHECK-PREP10-NEXT: blr
274 %and = and i64 %ptr, -1099511627776
275 %or = or i64 %and, 1000000000000
276 %0 = inttoptr i64 %or to ptr
277 %1 = load i8, ptr %0, align 4096
278 %conv = sext i8 %1 to i32
282 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
283 define dso_local signext i32 @ld_cst_align16_int32_t_int8_t() {
284 ; CHECK-LABEL: ld_cst_align16_int32_t_int8_t:
285 ; CHECK: # %bb.0: # %entry
286 ; CHECK-NEXT: lbz r3, 4080(0)
287 ; CHECK-NEXT: extsb r3, r3
290 %0 = load i8, ptr inttoptr (i64 4080 to ptr), align 16
291 %conv = sext i8 %0 to i32
295 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
296 define dso_local signext i32 @ld_cst_align32_int32_t_int8_t() {
297 ; CHECK-LABEL: ld_cst_align32_int32_t_int8_t:
298 ; CHECK: # %bb.0: # %entry
299 ; CHECK-NEXT: lis r3, 153
300 ; CHECK-NEXT: lbz r3, -27108(r3)
301 ; CHECK-NEXT: extsb r3, r3
304 %0 = load i8, ptr inttoptr (i64 9999900 to ptr), align 4
305 %conv = sext i8 %0 to i32
309 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
310 define dso_local signext i32 @ld_cst_align64_int32_t_int8_t() {
311 ; CHECK-P10-LABEL: ld_cst_align64_int32_t_int8_t:
312 ; CHECK-P10: # %bb.0: # %entry
313 ; CHECK-P10-NEXT: pli r3, 244140625
314 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
315 ; CHECK-P10-NEXT: lbz r3, 0(r3)
316 ; CHECK-P10-NEXT: extsb r3, r3
317 ; CHECK-P10-NEXT: blr
319 ; CHECK-PREP10-LABEL: ld_cst_align64_int32_t_int8_t:
320 ; CHECK-PREP10: # %bb.0: # %entry
321 ; CHECK-PREP10-NEXT: lis r3, 3725
322 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
323 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
324 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
325 ; CHECK-PREP10-NEXT: extsb r3, r3
326 ; CHECK-PREP10-NEXT: blr
328 %0 = load i8, ptr inttoptr (i64 1000000000000 to ptr), align 4096
329 %conv = sext i8 %0 to i32
333 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
334 define dso_local signext i32 @ld_0_int32_t_int16_t(i64 %ptr) {
335 ; CHECK-LABEL: ld_0_int32_t_int16_t:
336 ; CHECK: # %bb.0: # %entry
337 ; CHECK-NEXT: lha r3, 0(r3)
340 %0 = inttoptr i64 %ptr to ptr
341 %1 = load i16, ptr %0, align 2
342 %conv = sext i16 %1 to i32
346 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
347 define dso_local signext i32 @ld_align16_int32_t_int16_t(ptr nocapture readonly %ptr) {
348 ; CHECK-LABEL: ld_align16_int32_t_int16_t:
349 ; CHECK: # %bb.0: # %entry
350 ; CHECK-NEXT: lha r3, 8(r3)
353 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
354 %0 = load i16, ptr %add.ptr, align 2
355 %conv = sext i16 %0 to i32
359 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
360 define dso_local signext i32 @ld_align32_int32_t_int16_t(ptr nocapture readonly %ptr) {
361 ; CHECK-P10-LABEL: ld_align32_int32_t_int16_t:
362 ; CHECK-P10: # %bb.0: # %entry
363 ; CHECK-P10-NEXT: plha r3, 99999000(r3), 0
364 ; CHECK-P10-NEXT: blr
366 ; CHECK-PREP10-LABEL: ld_align32_int32_t_int16_t:
367 ; CHECK-PREP10: # %bb.0: # %entry
368 ; CHECK-PREP10-NEXT: lis r4, 1525
369 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
370 ; CHECK-PREP10-NEXT: lhax r3, r3, r4
371 ; CHECK-PREP10-NEXT: blr
373 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
374 %0 = load i16, ptr %add.ptr, align 2
375 %conv = sext i16 %0 to i32
379 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
380 define dso_local signext i32 @ld_align64_int32_t_int16_t(ptr nocapture readonly %ptr) {
381 ; CHECK-P10-LABEL: ld_align64_int32_t_int16_t:
382 ; CHECK-P10: # %bb.0: # %entry
383 ; CHECK-P10-NEXT: pli r4, 244140625
384 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
385 ; CHECK-P10-NEXT: lhax r3, r3, r4
386 ; CHECK-P10-NEXT: blr
388 ; CHECK-PREP10-LABEL: ld_align64_int32_t_int16_t:
389 ; CHECK-PREP10: # %bb.0: # %entry
390 ; CHECK-PREP10-NEXT: lis r4, 3725
391 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
392 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
393 ; CHECK-PREP10-NEXT: lhax r3, r3, r4
394 ; CHECK-PREP10-NEXT: blr
396 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
397 %0 = load i16, ptr %add.ptr, align 2
398 %conv = sext i16 %0 to i32
402 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
403 define dso_local signext i32 @ld_reg_int32_t_int16_t(ptr nocapture readonly %ptr, i64 %off) {
404 ; CHECK-LABEL: ld_reg_int32_t_int16_t:
405 ; CHECK: # %bb.0: # %entry
406 ; CHECK-NEXT: lhax r3, r3, r4
409 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
410 %0 = load i16, ptr %add.ptr, align 2
411 %conv = sext i16 %0 to i32
415 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
416 define dso_local signext i32 @ld_or_int32_t_int16_t(i64 %ptr, i8 zeroext %off) {
417 ; CHECK-LABEL: ld_or_int32_t_int16_t:
418 ; CHECK: # %bb.0: # %entry
419 ; CHECK-NEXT: or r3, r4, r3
420 ; CHECK-NEXT: lha r3, 0(r3)
423 %conv = zext i8 %off to i64
424 %or = or i64 %conv, %ptr
425 %0 = inttoptr i64 %or to ptr
426 %1 = load i16, ptr %0, align 2
427 %conv1 = sext i16 %1 to i32
431 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
432 define dso_local signext i32 @ld_or2_int32_t_int16_t(i64 %ptr, i8 zeroext %off) {
433 ; CHECK-LABEL: ld_or2_int32_t_int16_t:
434 ; CHECK: # %bb.0: # %entry
435 ; CHECK-NEXT: rldicr r3, r3, 0, 51
436 ; CHECK-NEXT: lhax r3, r3, r4
439 %and = and i64 %ptr, -4096
440 %conv = zext i8 %off to i64
441 %or = or i64 %and, %conv
442 %0 = inttoptr i64 %or to ptr
443 %1 = load i16, ptr %0, align 2
444 %conv1 = sext i16 %1 to i32
448 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
449 define dso_local signext i32 @ld_not_disjoint16_int32_t_int16_t(i64 %ptr) {
450 ; CHECK-LABEL: ld_not_disjoint16_int32_t_int16_t:
451 ; CHECK: # %bb.0: # %entry
452 ; CHECK-NEXT: ori r3, r3, 6
453 ; CHECK-NEXT: lha r3, 0(r3)
457 %0 = inttoptr i64 %or to ptr
458 %1 = load i16, ptr %0, align 2
459 %conv = sext i16 %1 to i32
463 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
464 define dso_local signext i32 @ld_disjoint_align16_int32_t_int16_t(i64 %ptr) {
465 ; CHECK-LABEL: ld_disjoint_align16_int32_t_int16_t:
466 ; CHECK: # %bb.0: # %entry
467 ; CHECK-NEXT: rldicr r3, r3, 0, 51
468 ; CHECK-NEXT: lha r3, 24(r3)
471 %and = and i64 %ptr, -4096
472 %or = or i64 %and, 24
473 %0 = inttoptr i64 %or to ptr
474 %1 = load i16, ptr %0, align 8
475 %conv = sext i16 %1 to i32
479 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
480 define dso_local signext i32 @ld_not_disjoint32_int32_t_int16_t(i64 %ptr) {
481 ; CHECK-LABEL: ld_not_disjoint32_int32_t_int16_t:
482 ; CHECK: # %bb.0: # %entry
483 ; CHECK-NEXT: ori r3, r3, 34463
484 ; CHECK-NEXT: oris r3, r3, 1
485 ; CHECK-NEXT: lha r3, 0(r3)
488 %or = or i64 %ptr, 99999
489 %0 = inttoptr i64 %or to ptr
490 %1 = load i16, ptr %0, align 2
491 %conv = sext i16 %1 to i32
495 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
496 define dso_local signext i32 @ld_disjoint_align32_int32_t_int16_t(i64 %ptr) {
497 ; CHECK-P10-LABEL: ld_disjoint_align32_int32_t_int16_t:
498 ; CHECK-P10: # %bb.0: # %entry
499 ; CHECK-P10-NEXT: lis r4, -15264
500 ; CHECK-P10-NEXT: and r3, r3, r4
501 ; CHECK-P10-NEXT: plha r3, 999990000(r3), 0
502 ; CHECK-P10-NEXT: blr
504 ; CHECK-PREP10-LABEL: ld_disjoint_align32_int32_t_int16_t:
505 ; CHECK-PREP10: # %bb.0: # %entry
506 ; CHECK-PREP10-NEXT: lis r4, -15264
507 ; CHECK-PREP10-NEXT: and r3, r3, r4
508 ; CHECK-PREP10-NEXT: lis r4, 15258
509 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
510 ; CHECK-PREP10-NEXT: lhax r3, r3, r4
511 ; CHECK-PREP10-NEXT: blr
513 %and = and i64 %ptr, -1000341504
514 %or = or i64 %and, 999990000
515 %0 = inttoptr i64 %or to ptr
516 %1 = load i16, ptr %0, align 16
517 %conv = sext i16 %1 to i32
521 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
522 define dso_local signext i32 @ld_not_disjoint64_int32_t_int16_t(i64 %ptr) {
523 ; CHECK-P10-LABEL: ld_not_disjoint64_int32_t_int16_t:
524 ; CHECK-P10: # %bb.0: # %entry
525 ; CHECK-P10-NEXT: pli r4, 232
526 ; CHECK-P10-NEXT: pli r5, 3567587329
527 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
528 ; CHECK-P10-NEXT: or r3, r3, r5
529 ; CHECK-P10-NEXT: lha r3, 0(r3)
530 ; CHECK-P10-NEXT: blr
532 ; CHECK-PREP10-LABEL: ld_not_disjoint64_int32_t_int16_t:
533 ; CHECK-PREP10: # %bb.0: # %entry
534 ; CHECK-PREP10-NEXT: li r4, 29
535 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
536 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
537 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
538 ; CHECK-PREP10-NEXT: or r3, r3, r4
539 ; CHECK-PREP10-NEXT: lha r3, 0(r3)
540 ; CHECK-PREP10-NEXT: blr
542 %or = or i64 %ptr, 1000000000001
543 %0 = inttoptr i64 %or to ptr
544 %1 = load i16, ptr %0, align 2
545 %conv = sext i16 %1 to i32
549 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
550 define dso_local signext i32 @ld_disjoint_align64_int32_t_int16_t(i64 %ptr) {
551 ; CHECK-P10-LABEL: ld_disjoint_align64_int32_t_int16_t:
552 ; CHECK-P10: # %bb.0: # %entry
553 ; CHECK-P10-NEXT: pli r4, 244140625
554 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
555 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
556 ; CHECK-P10-NEXT: lhax r3, r3, r4
557 ; CHECK-P10-NEXT: blr
559 ; CHECK-PREP10-LABEL: ld_disjoint_align64_int32_t_int16_t:
560 ; CHECK-PREP10: # %bb.0: # %entry
561 ; CHECK-PREP10-NEXT: lis r4, 3725
562 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
563 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
564 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
565 ; CHECK-PREP10-NEXT: lhax r3, r3, r4
566 ; CHECK-PREP10-NEXT: blr
568 %and = and i64 %ptr, -1099511627776
569 %or = or i64 %and, 1000000000000
570 %0 = inttoptr i64 %or to ptr
571 %1 = load i16, ptr %0, align 4096
572 %conv = sext i16 %1 to i32
576 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
577 define dso_local signext i32 @ld_cst_align16_int32_t_int16_t() {
578 ; CHECK-LABEL: ld_cst_align16_int32_t_int16_t:
579 ; CHECK: # %bb.0: # %entry
580 ; CHECK-NEXT: lha r3, 4080(0)
583 %0 = load i16, ptr inttoptr (i64 4080 to ptr), align 16
584 %conv = sext i16 %0 to i32
588 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
589 define dso_local signext i32 @ld_cst_align32_int32_t_int16_t() {
590 ; CHECK-LABEL: ld_cst_align32_int32_t_int16_t:
591 ; CHECK: # %bb.0: # %entry
592 ; CHECK-NEXT: lis r3, 153
593 ; CHECK-NEXT: lha r3, -27108(r3)
596 %0 = load i16, ptr inttoptr (i64 9999900 to ptr), align 4
597 %conv = sext i16 %0 to i32
601 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
602 define dso_local signext i32 @ld_cst_align64_int32_t_int16_t() {
603 ; CHECK-P10-LABEL: ld_cst_align64_int32_t_int16_t:
604 ; CHECK-P10: # %bb.0: # %entry
605 ; CHECK-P10-NEXT: pli r3, 244140625
606 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
607 ; CHECK-P10-NEXT: lha r3, 0(r3)
608 ; CHECK-P10-NEXT: blr
610 ; CHECK-PREP10-LABEL: ld_cst_align64_int32_t_int16_t:
611 ; CHECK-PREP10: # %bb.0: # %entry
612 ; CHECK-PREP10-NEXT: lis r3, 3725
613 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
614 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
615 ; CHECK-PREP10-NEXT: lha r3, 0(r3)
616 ; CHECK-PREP10-NEXT: blr
618 %0 = load i16, ptr inttoptr (i64 1000000000000 to ptr), align 4096
619 %conv = sext i16 %0 to i32
623 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
624 define dso_local signext i32 @ld_0_int32_t_uint32_t(i64 %ptr) {
625 ; CHECK-LABEL: ld_0_int32_t_uint32_t:
626 ; CHECK: # %bb.0: # %entry
627 ; CHECK-NEXT: lwa r3, 0(r3)
630 %0 = inttoptr i64 %ptr to ptr
631 %1 = load i32, ptr %0, align 4
635 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
636 define dso_local signext i32 @ld_align16_int32_t_uint32_t(ptr nocapture readonly %ptr) {
637 ; CHECK-LABEL: ld_align16_int32_t_uint32_t:
638 ; CHECK: # %bb.0: # %entry
639 ; CHECK-NEXT: lwa r3, 8(r3)
642 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
643 %0 = load i32, ptr %add.ptr, align 4
647 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
648 define dso_local signext i32 @ld_align32_int32_t_uint32_t(ptr nocapture readonly %ptr) {
649 ; CHECK-P10-LABEL: ld_align32_int32_t_uint32_t:
650 ; CHECK-P10: # %bb.0: # %entry
651 ; CHECK-P10-NEXT: plwa r3, 99999000(r3), 0
652 ; CHECK-P10-NEXT: blr
654 ; CHECK-PREP10-LABEL: ld_align32_int32_t_uint32_t:
655 ; CHECK-PREP10: # %bb.0: # %entry
656 ; CHECK-PREP10-NEXT: lis r4, 1525
657 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
658 ; CHECK-PREP10-NEXT: lwax r3, r3, r4
659 ; CHECK-PREP10-NEXT: blr
661 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
662 %0 = load i32, ptr %add.ptr, align 4
666 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
667 define dso_local signext i32 @ld_align64_int32_t_uint32_t(ptr nocapture readonly %ptr) {
668 ; CHECK-P10-LABEL: ld_align64_int32_t_uint32_t:
669 ; CHECK-P10: # %bb.0: # %entry
670 ; CHECK-P10-NEXT: pli r4, 244140625
671 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
672 ; CHECK-P10-NEXT: lwax r3, r3, r4
673 ; CHECK-P10-NEXT: blr
675 ; CHECK-PREP10-LABEL: ld_align64_int32_t_uint32_t:
676 ; CHECK-PREP10: # %bb.0: # %entry
677 ; CHECK-PREP10-NEXT: lis r4, 3725
678 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
679 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
680 ; CHECK-PREP10-NEXT: lwax r3, r3, r4
681 ; CHECK-PREP10-NEXT: blr
683 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
684 %0 = load i32, ptr %add.ptr, align 4
688 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
689 define dso_local signext i32 @ld_reg_int32_t_uint32_t(ptr nocapture readonly %ptr, i64 %off) {
690 ; CHECK-LABEL: ld_reg_int32_t_uint32_t:
691 ; CHECK: # %bb.0: # %entry
692 ; CHECK-NEXT: lwax r3, r3, r4
695 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
696 %0 = load i32, ptr %add.ptr, align 4
700 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
701 define dso_local signext i32 @ld_or_int32_t_uint32_t(i64 %ptr, i8 zeroext %off) {
702 ; CHECK-LABEL: ld_or_int32_t_uint32_t:
703 ; CHECK: # %bb.0: # %entry
704 ; CHECK-NEXT: or r3, r4, r3
705 ; CHECK-NEXT: lwa r3, 0(r3)
708 %conv = zext i8 %off to i64
709 %or = or i64 %conv, %ptr
710 %0 = inttoptr i64 %or to ptr
711 %1 = load i32, ptr %0, align 4
715 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
716 define dso_local signext i32 @ld_or2_int32_t_uint32_t(i64 %ptr, i8 zeroext %off) {
717 ; CHECK-LABEL: ld_or2_int32_t_uint32_t:
718 ; CHECK: # %bb.0: # %entry
719 ; CHECK-NEXT: rldicr r3, r3, 0, 51
720 ; CHECK-NEXT: lwax r3, r3, r4
723 %and = and i64 %ptr, -4096
724 %conv = zext i8 %off to i64
725 %or = or i64 %and, %conv
726 %0 = inttoptr i64 %or to ptr
727 %1 = load i32, ptr %0, align 4
731 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
732 define dso_local signext i32 @ld_not_disjoint16_int32_t_uint32_t(i64 %ptr) {
733 ; CHECK-LABEL: ld_not_disjoint16_int32_t_uint32_t:
734 ; CHECK: # %bb.0: # %entry
735 ; CHECK-NEXT: ori r3, r3, 6
736 ; CHECK-NEXT: lwa r3, 0(r3)
740 %0 = inttoptr i64 %or to ptr
741 %1 = load i32, ptr %0, align 4
745 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
746 define dso_local signext i32 @ld_disjoint_unalign16_int32_t_uint32_t(i64 %ptr) {
747 ; CHECK-P10-LABEL: ld_disjoint_unalign16_int32_t_uint32_t:
748 ; CHECK-P10: # %bb.0: # %entry
749 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
750 ; CHECK-P10-NEXT: plwa r3, 6(r3), 0
751 ; CHECK-P10-NEXT: blr
753 ; CHECK-PREP10-LABEL: ld_disjoint_unalign16_int32_t_uint32_t:
754 ; CHECK-PREP10: # %bb.0: # %entry
755 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 51
756 ; CHECK-PREP10-NEXT: li r4, 6
757 ; CHECK-PREP10-NEXT: lwax r3, r3, r4
758 ; CHECK-PREP10-NEXT: blr
760 %and = and i64 %ptr, -4096
762 %0 = inttoptr i64 %or to ptr
763 %1 = load i32, ptr %0, align 4
767 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
768 define dso_local signext i32 @ld_disjoint_align16_int32_t_uint32_t(i64 %ptr) {
769 ; CHECK-LABEL: ld_disjoint_align16_int32_t_uint32_t:
770 ; CHECK: # %bb.0: # %entry
771 ; CHECK-NEXT: rldicr r3, r3, 0, 51
772 ; CHECK-NEXT: lwa r3, 24(r3)
775 %and = and i64 %ptr, -4096
776 %or = or i64 %and, 24
777 %0 = inttoptr i64 %or to ptr
778 %1 = load i32, ptr %0, align 8
782 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
783 define dso_local signext i32 @ld_not_disjoint32_int32_t_uint32_t(i64 %ptr) {
784 ; CHECK-LABEL: ld_not_disjoint32_int32_t_uint32_t:
785 ; CHECK: # %bb.0: # %entry
786 ; CHECK-NEXT: ori r3, r3, 34463
787 ; CHECK-NEXT: oris r3, r3, 1
788 ; CHECK-NEXT: lwa r3, 0(r3)
791 %or = or i64 %ptr, 99999
792 %0 = inttoptr i64 %or to ptr
793 %1 = load i32, ptr %0, align 4
797 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
798 define dso_local signext i32 @ld_disjoint_align32_int32_t_uint32_t(i64 %ptr) {
799 ; CHECK-P10-LABEL: ld_disjoint_align32_int32_t_uint32_t:
800 ; CHECK-P10: # %bb.0: # %entry
801 ; CHECK-P10-NEXT: lis r4, -15264
802 ; CHECK-P10-NEXT: and r3, r3, r4
803 ; CHECK-P10-NEXT: plwa r3, 999990000(r3), 0
804 ; CHECK-P10-NEXT: blr
806 ; CHECK-PREP10-LABEL: ld_disjoint_align32_int32_t_uint32_t:
807 ; CHECK-PREP10: # %bb.0: # %entry
808 ; CHECK-PREP10-NEXT: lis r4, -15264
809 ; CHECK-PREP10-NEXT: and r3, r3, r4
810 ; CHECK-PREP10-NEXT: lis r4, 15258
811 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
812 ; CHECK-PREP10-NEXT: lwax r3, r3, r4
813 ; CHECK-PREP10-NEXT: blr
815 %and = and i64 %ptr, -1000341504
816 %or = or i64 %and, 999990000
817 %0 = inttoptr i64 %or to ptr
818 %1 = load i32, ptr %0, align 16
822 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
823 define dso_local signext i32 @ld_not_disjoint64_int32_t_uint32_t(i64 %ptr) {
824 ; CHECK-P10-LABEL: ld_not_disjoint64_int32_t_uint32_t:
825 ; CHECK-P10: # %bb.0: # %entry
826 ; CHECK-P10-NEXT: pli r4, 232
827 ; CHECK-P10-NEXT: pli r5, 3567587329
828 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
829 ; CHECK-P10-NEXT: or r3, r3, r5
830 ; CHECK-P10-NEXT: lwa r3, 0(r3)
831 ; CHECK-P10-NEXT: blr
833 ; CHECK-PREP10-LABEL: ld_not_disjoint64_int32_t_uint32_t:
834 ; CHECK-PREP10: # %bb.0: # %entry
835 ; CHECK-PREP10-NEXT: li r4, 29
836 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
837 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
838 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
839 ; CHECK-PREP10-NEXT: or r3, r3, r4
840 ; CHECK-PREP10-NEXT: lwa r3, 0(r3)
841 ; CHECK-PREP10-NEXT: blr
843 %or = or i64 %ptr, 1000000000001
844 %0 = inttoptr i64 %or to ptr
845 %1 = load i32, ptr %0, align 4
849 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
850 define dso_local signext i32 @ld_disjoint_align64_int32_t_uint32_t(i64 %ptr) {
851 ; CHECK-P10-LABEL: ld_disjoint_align64_int32_t_uint32_t:
852 ; CHECK-P10: # %bb.0: # %entry
853 ; CHECK-P10-NEXT: pli r4, 244140625
854 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
855 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
856 ; CHECK-P10-NEXT: lwax r3, r3, r4
857 ; CHECK-P10-NEXT: blr
859 ; CHECK-PREP10-LABEL: ld_disjoint_align64_int32_t_uint32_t:
860 ; CHECK-PREP10: # %bb.0: # %entry
861 ; CHECK-PREP10-NEXT: lis r4, 3725
862 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
863 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
864 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
865 ; CHECK-PREP10-NEXT: lwax r3, r3, r4
866 ; CHECK-PREP10-NEXT: blr
868 %and = and i64 %ptr, -1099511627776
869 %or = or i64 %and, 1000000000000
870 %0 = inttoptr i64 %or to ptr
871 %1 = load i32, ptr %0, align 4096
875 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
876 define dso_local signext i32 @ld_cst_align16_int32_t_uint32_t() {
877 ; CHECK-LABEL: ld_cst_align16_int32_t_uint32_t:
878 ; CHECK: # %bb.0: # %entry
879 ; CHECK-NEXT: lwa r3, 4080(0)
882 %0 = load i32, ptr inttoptr (i64 4080 to ptr), align 16
886 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
887 define dso_local signext i32 @ld_cst_align32_int32_t_uint32_t() {
888 ; CHECK-LABEL: ld_cst_align32_int32_t_uint32_t:
889 ; CHECK: # %bb.0: # %entry
890 ; CHECK-NEXT: lis r3, 153
891 ; CHECK-NEXT: lwa r3, -27108(r3)
894 %0 = load i32, ptr inttoptr (i64 9999900 to ptr), align 4
898 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
899 define dso_local signext i32 @ld_cst_align64_int32_t_uint32_t() {
900 ; CHECK-P10-LABEL: ld_cst_align64_int32_t_uint32_t:
901 ; CHECK-P10: # %bb.0: # %entry
902 ; CHECK-P10-NEXT: pli r3, 244140625
903 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
904 ; CHECK-P10-NEXT: lwa r3, 0(r3)
905 ; CHECK-P10-NEXT: blr
907 ; CHECK-PREP10-LABEL: ld_cst_align64_int32_t_uint32_t:
908 ; CHECK-PREP10: # %bb.0: # %entry
909 ; CHECK-PREP10-NEXT: lis r3, 3725
910 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
911 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
912 ; CHECK-PREP10-NEXT: lwa r3, 0(r3)
913 ; CHECK-PREP10-NEXT: blr
915 %0 = load i32, ptr inttoptr (i64 1000000000000 to ptr), align 4096
919 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
920 define dso_local signext i32 @ld_0_int32_t_uint64_t(i64 %ptr) {
921 ; CHECK-LE-LABEL: ld_0_int32_t_uint64_t:
922 ; CHECK-LE: # %bb.0: # %entry
923 ; CHECK-LE-NEXT: lwa r3, 0(r3)
926 ; CHECK-BE-LABEL: ld_0_int32_t_uint64_t:
927 ; CHECK-BE: # %bb.0: # %entry
928 ; CHECK-BE-NEXT: lwa r3, 4(r3)
931 %0 = inttoptr i64 %ptr to ptr
932 %1 = load i64, ptr %0, align 8
933 %conv = trunc i64 %1 to i32
937 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
938 define dso_local signext i32 @ld_unalign16_int32_t_uint64_t(ptr nocapture readonly %ptr) {
939 ; CHECK-P10-LE-LABEL: ld_unalign16_int32_t_uint64_t:
940 ; CHECK-P10-LE: # %bb.0: # %entry
941 ; CHECK-P10-LE-NEXT: plwa r3, 1(r3), 0
942 ; CHECK-P10-LE-NEXT: blr
944 ; CHECK-P10-BE-LABEL: ld_unalign16_int32_t_uint64_t:
945 ; CHECK-P10-BE: # %bb.0: # %entry
946 ; CHECK-P10-BE-NEXT: plwa r3, 5(r3), 0
947 ; CHECK-P10-BE-NEXT: blr
949 ; CHECK-P9-LE-LABEL: ld_unalign16_int32_t_uint64_t:
950 ; CHECK-P9-LE: # %bb.0: # %entry
951 ; CHECK-P9-LE-NEXT: li r4, 1
952 ; CHECK-P9-LE-NEXT: lwax r3, r3, r4
953 ; CHECK-P9-LE-NEXT: blr
955 ; CHECK-P9-BE-LABEL: ld_unalign16_int32_t_uint64_t:
956 ; CHECK-P9-BE: # %bb.0: # %entry
957 ; CHECK-P9-BE-NEXT: li r4, 5
958 ; CHECK-P9-BE-NEXT: lwax r3, r3, r4
959 ; CHECK-P9-BE-NEXT: blr
961 ; CHECK-P8-LE-LABEL: ld_unalign16_int32_t_uint64_t:
962 ; CHECK-P8-LE: # %bb.0: # %entry
963 ; CHECK-P8-LE-NEXT: li r4, 1
964 ; CHECK-P8-LE-NEXT: lwax r3, r3, r4
965 ; CHECK-P8-LE-NEXT: blr
967 ; CHECK-P8-BE-LABEL: ld_unalign16_int32_t_uint64_t:
968 ; CHECK-P8-BE: # %bb.0: # %entry
969 ; CHECK-P8-BE-NEXT: li r4, 5
970 ; CHECK-P8-BE-NEXT: lwax r3, r3, r4
971 ; CHECK-P8-BE-NEXT: blr
973 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1
974 %0 = load i64, ptr %add.ptr, align 8
975 %conv = trunc i64 %0 to i32
979 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
980 define dso_local signext i32 @ld_align16_int32_t_uint64_t(ptr nocapture readonly %ptr) {
981 ; CHECK-LE-LABEL: ld_align16_int32_t_uint64_t:
982 ; CHECK-LE: # %bb.0: # %entry
983 ; CHECK-LE-NEXT: lwa r3, 8(r3)
986 ; CHECK-BE-LABEL: ld_align16_int32_t_uint64_t:
987 ; CHECK-BE: # %bb.0: # %entry
988 ; CHECK-BE-NEXT: lwa r3, 12(r3)
991 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
992 %0 = load i64, ptr %add.ptr, align 8
993 %conv = trunc i64 %0 to i32
997 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
998 define dso_local signext i32 @ld_align32_int32_t_uint64_t(ptr nocapture readonly %ptr) {
999 ; CHECK-P10-LE-LABEL: ld_align32_int32_t_uint64_t:
1000 ; CHECK-P10-LE: # %bb.0: # %entry
1001 ; CHECK-P10-LE-NEXT: plwa r3, 99999000(r3), 0
1002 ; CHECK-P10-LE-NEXT: blr
1004 ; CHECK-P10-BE-LABEL: ld_align32_int32_t_uint64_t:
1005 ; CHECK-P10-BE: # %bb.0: # %entry
1006 ; CHECK-P10-BE-NEXT: plwa r3, 99999004(r3), 0
1007 ; CHECK-P10-BE-NEXT: blr
1009 ; CHECK-P9-LE-LABEL: ld_align32_int32_t_uint64_t:
1010 ; CHECK-P9-LE: # %bb.0: # %entry
1011 ; CHECK-P9-LE-NEXT: lis r4, 1525
1012 ; CHECK-P9-LE-NEXT: ori r4, r4, 56600
1013 ; CHECK-P9-LE-NEXT: lwax r3, r3, r4
1014 ; CHECK-P9-LE-NEXT: blr
1016 ; CHECK-P9-BE-LABEL: ld_align32_int32_t_uint64_t:
1017 ; CHECK-P9-BE: # %bb.0: # %entry
1018 ; CHECK-P9-BE-NEXT: lis r4, 1525
1019 ; CHECK-P9-BE-NEXT: ori r4, r4, 56604
1020 ; CHECK-P9-BE-NEXT: lwax r3, r3, r4
1021 ; CHECK-P9-BE-NEXT: blr
1023 ; CHECK-P8-LE-LABEL: ld_align32_int32_t_uint64_t:
1024 ; CHECK-P8-LE: # %bb.0: # %entry
1025 ; CHECK-P8-LE-NEXT: lis r4, 1525
1026 ; CHECK-P8-LE-NEXT: ori r4, r4, 56600
1027 ; CHECK-P8-LE-NEXT: lwax r3, r3, r4
1028 ; CHECK-P8-LE-NEXT: blr
1030 ; CHECK-P8-BE-LABEL: ld_align32_int32_t_uint64_t:
1031 ; CHECK-P8-BE: # %bb.0: # %entry
1032 ; CHECK-P8-BE-NEXT: lis r4, 1525
1033 ; CHECK-P8-BE-NEXT: ori r4, r4, 56604
1034 ; CHECK-P8-BE-NEXT: lwax r3, r3, r4
1035 ; CHECK-P8-BE-NEXT: blr
1037 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
1038 %0 = load i64, ptr %add.ptr, align 8
1039 %conv = trunc i64 %0 to i32
1043 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1044 define dso_local signext i32 @ld_align64_int32_t_uint64_t(ptr nocapture readonly %ptr) {
1045 ; CHECK-P10-LE-LABEL: ld_align64_int32_t_uint64_t:
1046 ; CHECK-P10-LE: # %bb.0: # %entry
1047 ; CHECK-P10-LE-NEXT: pli r4, 244140625
1048 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
1049 ; CHECK-P10-LE-NEXT: lwax r3, r3, r4
1050 ; CHECK-P10-LE-NEXT: blr
1052 ; CHECK-P10-BE-LABEL: ld_align64_int32_t_uint64_t:
1053 ; CHECK-P10-BE: # %bb.0: # %entry
1054 ; CHECK-P10-BE-NEXT: pli r4, 232
1055 ; CHECK-P10-BE-NEXT: pli r5, 3567587332
1056 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
1057 ; CHECK-P10-BE-NEXT: lwax r3, r3, r5
1058 ; CHECK-P10-BE-NEXT: blr
1060 ; CHECK-P9-LE-LABEL: ld_align64_int32_t_uint64_t:
1061 ; CHECK-P9-LE: # %bb.0: # %entry
1062 ; CHECK-P9-LE-NEXT: lis r4, 3725
1063 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
1064 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
1065 ; CHECK-P9-LE-NEXT: lwax r3, r3, r4
1066 ; CHECK-P9-LE-NEXT: blr
1068 ; CHECK-P9-BE-LABEL: ld_align64_int32_t_uint64_t:
1069 ; CHECK-P9-BE: # %bb.0: # %entry
1070 ; CHECK-P9-BE-NEXT: li r4, 29
1071 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
1072 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
1073 ; CHECK-P9-BE-NEXT: ori r4, r4, 4100
1074 ; CHECK-P9-BE-NEXT: lwax r3, r3, r4
1075 ; CHECK-P9-BE-NEXT: blr
1077 ; CHECK-P8-LE-LABEL: ld_align64_int32_t_uint64_t:
1078 ; CHECK-P8-LE: # %bb.0: # %entry
1079 ; CHECK-P8-LE-NEXT: lis r4, 3725
1080 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
1081 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
1082 ; CHECK-P8-LE-NEXT: lwax r3, r3, r4
1083 ; CHECK-P8-LE-NEXT: blr
1085 ; CHECK-P8-BE-LABEL: ld_align64_int32_t_uint64_t:
1086 ; CHECK-P8-BE: # %bb.0: # %entry
1087 ; CHECK-P8-BE-NEXT: li r4, 29
1088 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
1089 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
1090 ; CHECK-P8-BE-NEXT: ori r4, r4, 4100
1091 ; CHECK-P8-BE-NEXT: lwax r3, r3, r4
1092 ; CHECK-P8-BE-NEXT: blr
1094 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
1095 %0 = load i64, ptr %add.ptr, align 8
1096 %conv = trunc i64 %0 to i32
1100 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1101 define dso_local signext i32 @ld_reg_int32_t_uint64_t(ptr nocapture readonly %ptr, i64 %off) {
1102 ; CHECK-LE-LABEL: ld_reg_int32_t_uint64_t:
1103 ; CHECK-LE: # %bb.0: # %entry
1104 ; CHECK-LE-NEXT: lwax r3, r3, r4
1105 ; CHECK-LE-NEXT: blr
1107 ; CHECK-BE-LABEL: ld_reg_int32_t_uint64_t:
1108 ; CHECK-BE: # %bb.0: # %entry
1109 ; CHECK-BE-NEXT: add r3, r3, r4
1110 ; CHECK-BE-NEXT: lwa r3, 4(r3)
1111 ; CHECK-BE-NEXT: blr
1113 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
1114 %0 = load i64, ptr %add.ptr, align 8
1115 %conv = trunc i64 %0 to i32
1119 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1120 define dso_local signext i32 @ld_or_int32_t_uint64_t(i64 %ptr, i8 zeroext %off) {
1121 ; CHECK-LE-LABEL: ld_or_int32_t_uint64_t:
1122 ; CHECK-LE: # %bb.0: # %entry
1123 ; CHECK-LE-NEXT: or r3, r4, r3
1124 ; CHECK-LE-NEXT: lwa r3, 0(r3)
1125 ; CHECK-LE-NEXT: blr
1127 ; CHECK-BE-LABEL: ld_or_int32_t_uint64_t:
1128 ; CHECK-BE: # %bb.0: # %entry
1129 ; CHECK-BE-NEXT: or r3, r4, r3
1130 ; CHECK-BE-NEXT: lwa r3, 4(r3)
1131 ; CHECK-BE-NEXT: blr
1133 %conv = zext i8 %off to i64
1134 %or = or i64 %conv, %ptr
1135 %0 = inttoptr i64 %or to ptr
1136 %1 = load i64, ptr %0, align 8
1137 %conv1 = trunc i64 %1 to i32
1141 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1142 define dso_local signext i32 @ld_or2_int32_t_uint64_t(i64 %ptr, i8 zeroext %off) {
1143 ; CHECK-LE-LABEL: ld_or2_int32_t_uint64_t:
1144 ; CHECK-LE: # %bb.0: # %entry
1145 ; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
1146 ; CHECK-LE-NEXT: lwax r3, r3, r4
1147 ; CHECK-LE-NEXT: blr
1149 ; CHECK-BE-LABEL: ld_or2_int32_t_uint64_t:
1150 ; CHECK-BE: # %bb.0: # %entry
1151 ; CHECK-BE-NEXT: rotldi r3, r3, 52
1152 ; CHECK-BE-NEXT: rldimi r4, r3, 12, 0
1153 ; CHECK-BE-NEXT: lwa r3, 4(r4)
1154 ; CHECK-BE-NEXT: blr
1156 %and = and i64 %ptr, -4096
1157 %conv = zext i8 %off to i64
1158 %or = or i64 %and, %conv
1159 %0 = inttoptr i64 %or to ptr
1160 %1 = load i64, ptr %0, align 8
1161 %conv1 = trunc i64 %1 to i32
1165 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1166 define dso_local signext i32 @ld_not_disjoint16_int32_t_uint64_t(i64 %ptr) {
1167 ; CHECK-LE-LABEL: ld_not_disjoint16_int32_t_uint64_t:
1168 ; CHECK-LE: # %bb.0: # %entry
1169 ; CHECK-LE-NEXT: ori r3, r3, 6
1170 ; CHECK-LE-NEXT: lwa r3, 0(r3)
1171 ; CHECK-LE-NEXT: blr
1173 ; CHECK-BE-LABEL: ld_not_disjoint16_int32_t_uint64_t:
1174 ; CHECK-BE: # %bb.0: # %entry
1175 ; CHECK-BE-NEXT: ori r3, r3, 6
1176 ; CHECK-BE-NEXT: lwa r3, 4(r3)
1177 ; CHECK-BE-NEXT: blr
1179 %or = or i64 %ptr, 6
1180 %0 = inttoptr i64 %or to ptr
1181 %1 = load i64, ptr %0, align 8
1182 %conv = trunc i64 %1 to i32
1186 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1187 define dso_local signext i32 @ld_disjoint_unalign16_int32_t_uint64_t(i64 %ptr) {
1188 ; CHECK-P10-LE-LABEL: ld_disjoint_unalign16_int32_t_uint64_t:
1189 ; CHECK-P10-LE: # %bb.0: # %entry
1190 ; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 51
1191 ; CHECK-P10-LE-NEXT: plwa r3, 6(r3), 0
1192 ; CHECK-P10-LE-NEXT: blr
1194 ; CHECK-P10-BE-LABEL: ld_disjoint_unalign16_int32_t_uint64_t:
1195 ; CHECK-P10-BE: # %bb.0: # %entry
1196 ; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 51
1197 ; CHECK-P10-BE-NEXT: plwa r3, 10(r3), 0
1198 ; CHECK-P10-BE-NEXT: blr
1200 ; CHECK-P9-LE-LABEL: ld_disjoint_unalign16_int32_t_uint64_t:
1201 ; CHECK-P9-LE: # %bb.0: # %entry
1202 ; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 51
1203 ; CHECK-P9-LE-NEXT: li r4, 6
1204 ; CHECK-P9-LE-NEXT: lwax r3, r3, r4
1205 ; CHECK-P9-LE-NEXT: blr
1207 ; CHECK-P9-BE-LABEL: ld_disjoint_unalign16_int32_t_uint64_t:
1208 ; CHECK-P9-BE: # %bb.0: # %entry
1209 ; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 51
1210 ; CHECK-P9-BE-NEXT: li r4, 10
1211 ; CHECK-P9-BE-NEXT: lwax r3, r3, r4
1212 ; CHECK-P9-BE-NEXT: blr
1214 ; CHECK-P8-LE-LABEL: ld_disjoint_unalign16_int32_t_uint64_t:
1215 ; CHECK-P8-LE: # %bb.0: # %entry
1216 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 51
1217 ; CHECK-P8-LE-NEXT: li r4, 6
1218 ; CHECK-P8-LE-NEXT: lwax r3, r3, r4
1219 ; CHECK-P8-LE-NEXT: blr
1221 ; CHECK-P8-BE-LABEL: ld_disjoint_unalign16_int32_t_uint64_t:
1222 ; CHECK-P8-BE: # %bb.0: # %entry
1223 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 51
1224 ; CHECK-P8-BE-NEXT: li r4, 10
1225 ; CHECK-P8-BE-NEXT: lwax r3, r3, r4
1226 ; CHECK-P8-BE-NEXT: blr
1228 %and = and i64 %ptr, -4096
1229 %or = or i64 %and, 6
1230 %0 = inttoptr i64 %or to ptr
1231 %1 = load i64, ptr %0, align 8
1232 %conv = trunc i64 %1 to i32
1236 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1237 define dso_local signext i32 @ld_disjoint_align16_int32_t_uint64_t(i64 %ptr) {
1238 ; CHECK-LE-LABEL: ld_disjoint_align16_int32_t_uint64_t:
1239 ; CHECK-LE: # %bb.0: # %entry
1240 ; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
1241 ; CHECK-LE-NEXT: lwa r3, 24(r3)
1242 ; CHECK-LE-NEXT: blr
1244 ; CHECK-BE-LABEL: ld_disjoint_align16_int32_t_uint64_t:
1245 ; CHECK-BE: # %bb.0: # %entry
1246 ; CHECK-BE-NEXT: rldicr r3, r3, 0, 51
1247 ; CHECK-BE-NEXT: lwa r3, 28(r3)
1248 ; CHECK-BE-NEXT: blr
1250 %and = and i64 %ptr, -4096
1251 %or = or i64 %and, 24
1252 %0 = inttoptr i64 %or to ptr
1253 %1 = load i64, ptr %0, align 8
1254 %conv = trunc i64 %1 to i32
1258 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1259 define dso_local signext i32 @ld_not_disjoint32_int32_t_uint64_t(i64 %ptr) {
1260 ; CHECK-LE-LABEL: ld_not_disjoint32_int32_t_uint64_t:
1261 ; CHECK-LE: # %bb.0: # %entry
1262 ; CHECK-LE-NEXT: ori r3, r3, 34463
1263 ; CHECK-LE-NEXT: oris r3, r3, 1
1264 ; CHECK-LE-NEXT: lwa r3, 0(r3)
1265 ; CHECK-LE-NEXT: blr
1267 ; CHECK-BE-LABEL: ld_not_disjoint32_int32_t_uint64_t:
1268 ; CHECK-BE: # %bb.0: # %entry
1269 ; CHECK-BE-NEXT: ori r3, r3, 34463
1270 ; CHECK-BE-NEXT: oris r3, r3, 1
1271 ; CHECK-BE-NEXT: lwa r3, 4(r3)
1272 ; CHECK-BE-NEXT: blr
1274 %or = or i64 %ptr, 99999
1275 %0 = inttoptr i64 %or to ptr
1276 %1 = load i64, ptr %0, align 8
1277 %conv = trunc i64 %1 to i32
1281 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1282 define dso_local signext i32 @ld_disjoint_align32_int32_t_uint64_t(i64 %ptr) {
1283 ; CHECK-P10-LE-LABEL: ld_disjoint_align32_int32_t_uint64_t:
1284 ; CHECK-P10-LE: # %bb.0: # %entry
1285 ; CHECK-P10-LE-NEXT: lis r4, -15264
1286 ; CHECK-P10-LE-NEXT: and r3, r3, r4
1287 ; CHECK-P10-LE-NEXT: plwa r3, 999990000(r3), 0
1288 ; CHECK-P10-LE-NEXT: blr
1290 ; CHECK-P10-BE-LABEL: ld_disjoint_align32_int32_t_uint64_t:
1291 ; CHECK-P10-BE: # %bb.0: # %entry
1292 ; CHECK-P10-BE-NEXT: lis r4, -15264
1293 ; CHECK-P10-BE-NEXT: and r3, r3, r4
1294 ; CHECK-P10-BE-NEXT: plwa r3, 999990004(r3), 0
1295 ; CHECK-P10-BE-NEXT: blr
1297 ; CHECK-P9-LE-LABEL: ld_disjoint_align32_int32_t_uint64_t:
1298 ; CHECK-P9-LE: # %bb.0: # %entry
1299 ; CHECK-P9-LE-NEXT: lis r4, -15264
1300 ; CHECK-P9-LE-NEXT: and r3, r3, r4
1301 ; CHECK-P9-LE-NEXT: lis r4, 15258
1302 ; CHECK-P9-LE-NEXT: ori r4, r4, 41712
1303 ; CHECK-P9-LE-NEXT: lwax r3, r3, r4
1304 ; CHECK-P9-LE-NEXT: blr
1306 ; CHECK-P9-BE-LABEL: ld_disjoint_align32_int32_t_uint64_t:
1307 ; CHECK-P9-BE: # %bb.0: # %entry
1308 ; CHECK-P9-BE-NEXT: lis r4, -15264
1309 ; CHECK-P9-BE-NEXT: and r3, r3, r4
1310 ; CHECK-P9-BE-NEXT: lis r4, 15258
1311 ; CHECK-P9-BE-NEXT: ori r4, r4, 41716
1312 ; CHECK-P9-BE-NEXT: lwax r3, r3, r4
1313 ; CHECK-P9-BE-NEXT: blr
1315 ; CHECK-P8-LE-LABEL: ld_disjoint_align32_int32_t_uint64_t:
1316 ; CHECK-P8-LE: # %bb.0: # %entry
1317 ; CHECK-P8-LE-NEXT: lis r4, -15264
1318 ; CHECK-P8-LE-NEXT: and r3, r3, r4
1319 ; CHECK-P8-LE-NEXT: lis r4, 15258
1320 ; CHECK-P8-LE-NEXT: ori r4, r4, 41712
1321 ; CHECK-P8-LE-NEXT: lwax r3, r3, r4
1322 ; CHECK-P8-LE-NEXT: blr
1324 ; CHECK-P8-BE-LABEL: ld_disjoint_align32_int32_t_uint64_t:
1325 ; CHECK-P8-BE: # %bb.0: # %entry
1326 ; CHECK-P8-BE-NEXT: lis r4, -15264
1327 ; CHECK-P8-BE-NEXT: and r3, r3, r4
1328 ; CHECK-P8-BE-NEXT: lis r4, 15258
1329 ; CHECK-P8-BE-NEXT: ori r4, r4, 41716
1330 ; CHECK-P8-BE-NEXT: lwax r3, r3, r4
1331 ; CHECK-P8-BE-NEXT: blr
1333 %and = and i64 %ptr, -1000341504
1334 %or = or i64 %and, 999990000
1335 %0 = inttoptr i64 %or to ptr
1336 %1 = load i64, ptr %0, align 16
1337 %conv = trunc i64 %1 to i32
1341 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1342 define dso_local signext i32 @ld_not_disjoint64_int32_t_uint64_t(i64 %ptr) {
1343 ; CHECK-P10-LE-LABEL: ld_not_disjoint64_int32_t_uint64_t:
1344 ; CHECK-P10-LE: # %bb.0: # %entry
1345 ; CHECK-P10-LE-NEXT: pli r4, 232
1346 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
1347 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
1348 ; CHECK-P10-LE-NEXT: or r3, r3, r5
1349 ; CHECK-P10-LE-NEXT: lwa r3, 0(r3)
1350 ; CHECK-P10-LE-NEXT: blr
1352 ; CHECK-P10-BE-LABEL: ld_not_disjoint64_int32_t_uint64_t:
1353 ; CHECK-P10-BE: # %bb.0: # %entry
1354 ; CHECK-P10-BE-NEXT: pli r4, 232
1355 ; CHECK-P10-BE-NEXT: pli r5, 3567587329
1356 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
1357 ; CHECK-P10-BE-NEXT: or r3, r3, r5
1358 ; CHECK-P10-BE-NEXT: lwa r3, 4(r3)
1359 ; CHECK-P10-BE-NEXT: blr
1361 ; CHECK-P9-LE-LABEL: ld_not_disjoint64_int32_t_uint64_t:
1362 ; CHECK-P9-LE: # %bb.0: # %entry
1363 ; CHECK-P9-LE-NEXT: li r4, 29
1364 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
1365 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
1366 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
1367 ; CHECK-P9-LE-NEXT: or r3, r3, r4
1368 ; CHECK-P9-LE-NEXT: lwa r3, 0(r3)
1369 ; CHECK-P9-LE-NEXT: blr
1371 ; CHECK-P9-BE-LABEL: ld_not_disjoint64_int32_t_uint64_t:
1372 ; CHECK-P9-BE: # %bb.0: # %entry
1373 ; CHECK-P9-BE-NEXT: li r4, 29
1374 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
1375 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
1376 ; CHECK-P9-BE-NEXT: ori r4, r4, 4097
1377 ; CHECK-P9-BE-NEXT: or r3, r3, r4
1378 ; CHECK-P9-BE-NEXT: lwa r3, 4(r3)
1379 ; CHECK-P9-BE-NEXT: blr
1381 ; CHECK-P8-LE-LABEL: ld_not_disjoint64_int32_t_uint64_t:
1382 ; CHECK-P8-LE: # %bb.0: # %entry
1383 ; CHECK-P8-LE-NEXT: li r4, 29
1384 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
1385 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
1386 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
1387 ; CHECK-P8-LE-NEXT: or r3, r3, r4
1388 ; CHECK-P8-LE-NEXT: lwa r3, 0(r3)
1389 ; CHECK-P8-LE-NEXT: blr
1391 ; CHECK-P8-BE-LABEL: ld_not_disjoint64_int32_t_uint64_t:
1392 ; CHECK-P8-BE: # %bb.0: # %entry
1393 ; CHECK-P8-BE-NEXT: li r4, 29
1394 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
1395 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
1396 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
1397 ; CHECK-P8-BE-NEXT: or r3, r3, r4
1398 ; CHECK-P8-BE-NEXT: lwa r3, 4(r3)
1399 ; CHECK-P8-BE-NEXT: blr
1401 %or = or i64 %ptr, 1000000000001
1402 %0 = inttoptr i64 %or to ptr
1403 %1 = load i64, ptr %0, align 8
1404 %conv = trunc i64 %1 to i32
1408 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1409 define dso_local signext i32 @ld_disjoint_align64_int32_t_uint64_t(i64 %ptr) {
1410 ; CHECK-P10-LE-LABEL: ld_disjoint_align64_int32_t_uint64_t:
1411 ; CHECK-P10-LE: # %bb.0: # %entry
1412 ; CHECK-P10-LE-NEXT: pli r4, 244140625
1413 ; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
1414 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
1415 ; CHECK-P10-LE-NEXT: lwax r3, r3, r4
1416 ; CHECK-P10-LE-NEXT: blr
1418 ; CHECK-P10-BE-LABEL: ld_disjoint_align64_int32_t_uint64_t:
1419 ; CHECK-P10-BE: # %bb.0: # %entry
1420 ; CHECK-P10-BE-NEXT: pli r4, 232
1421 ; CHECK-P10-BE-NEXT: pli r5, 3567587332
1422 ; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
1423 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
1424 ; CHECK-P10-BE-NEXT: lwax r3, r3, r5
1425 ; CHECK-P10-BE-NEXT: blr
1427 ; CHECK-P9-LE-LABEL: ld_disjoint_align64_int32_t_uint64_t:
1428 ; CHECK-P9-LE: # %bb.0: # %entry
1429 ; CHECK-P9-LE-NEXT: lis r4, 3725
1430 ; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
1431 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
1432 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
1433 ; CHECK-P9-LE-NEXT: lwax r3, r3, r4
1434 ; CHECK-P9-LE-NEXT: blr
1436 ; CHECK-P9-BE-LABEL: ld_disjoint_align64_int32_t_uint64_t:
1437 ; CHECK-P9-BE: # %bb.0: # %entry
1438 ; CHECK-P9-BE-NEXT: li r4, 29
1439 ; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
1440 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
1441 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
1442 ; CHECK-P9-BE-NEXT: ori r4, r4, 4100
1443 ; CHECK-P9-BE-NEXT: lwax r3, r3, r4
1444 ; CHECK-P9-BE-NEXT: blr
1446 ; CHECK-P8-LE-LABEL: ld_disjoint_align64_int32_t_uint64_t:
1447 ; CHECK-P8-LE: # %bb.0: # %entry
1448 ; CHECK-P8-LE-NEXT: lis r4, 3725
1449 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
1450 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
1451 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
1452 ; CHECK-P8-LE-NEXT: lwax r3, r3, r4
1453 ; CHECK-P8-LE-NEXT: blr
1455 ; CHECK-P8-BE-LABEL: ld_disjoint_align64_int32_t_uint64_t:
1456 ; CHECK-P8-BE: # %bb.0: # %entry
1457 ; CHECK-P8-BE-NEXT: li r4, 29
1458 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
1459 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
1460 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
1461 ; CHECK-P8-BE-NEXT: ori r4, r4, 4100
1462 ; CHECK-P8-BE-NEXT: lwax r3, r3, r4
1463 ; CHECK-P8-BE-NEXT: blr
1465 %and = and i64 %ptr, -1099511627776
1466 %or = or i64 %and, 1000000000000
1467 %0 = inttoptr i64 %or to ptr
1468 %1 = load i64, ptr %0, align 4096
1469 %conv = trunc i64 %1 to i32
1473 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1474 define dso_local signext i32 @ld_cst_align16_int32_t_uint64_t() {
1475 ; CHECK-LE-LABEL: ld_cst_align16_int32_t_uint64_t:
1476 ; CHECK-LE: # %bb.0: # %entry
1477 ; CHECK-LE-NEXT: lwa r3, 4080(0)
1478 ; CHECK-LE-NEXT: blr
1480 ; CHECK-BE-LABEL: ld_cst_align16_int32_t_uint64_t:
1481 ; CHECK-BE: # %bb.0: # %entry
1482 ; CHECK-BE-NEXT: lwa r3, 4084(0)
1483 ; CHECK-BE-NEXT: blr
1485 %0 = load i64, ptr inttoptr (i64 4080 to ptr), align 16
1486 %conv = trunc i64 %0 to i32
1490 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1491 define dso_local signext i32 @ld_cst_align32_int32_t_uint64_t() {
1492 ; CHECK-LE-LABEL: ld_cst_align32_int32_t_uint64_t:
1493 ; CHECK-LE: # %bb.0: # %entry
1494 ; CHECK-LE-NEXT: lis r3, 153
1495 ; CHECK-LE-NEXT: lwa r3, -27108(r3)
1496 ; CHECK-LE-NEXT: blr
1498 ; CHECK-BE-LABEL: ld_cst_align32_int32_t_uint64_t:
1499 ; CHECK-BE: # %bb.0: # %entry
1500 ; CHECK-BE-NEXT: lis r3, 153
1501 ; CHECK-BE-NEXT: lwa r3, -27104(r3)
1502 ; CHECK-BE-NEXT: blr
1504 %0 = load i64, ptr inttoptr (i64 9999900 to ptr), align 8
1505 %conv = trunc i64 %0 to i32
1509 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1510 define dso_local signext i32 @ld_cst_align64_int32_t_uint64_t() {
1511 ; CHECK-P10-LE-LABEL: ld_cst_align64_int32_t_uint64_t:
1512 ; CHECK-P10-LE: # %bb.0: # %entry
1513 ; CHECK-P10-LE-NEXT: pli r3, 244140625
1514 ; CHECK-P10-LE-NEXT: rldic r3, r3, 12, 24
1515 ; CHECK-P10-LE-NEXT: lwa r3, 0(r3)
1516 ; CHECK-P10-LE-NEXT: blr
1518 ; CHECK-P10-BE-LABEL: ld_cst_align64_int32_t_uint64_t:
1519 ; CHECK-P10-BE: # %bb.0: # %entry
1520 ; CHECK-P10-BE-NEXT: pli r3, 232
1521 ; CHECK-P10-BE-NEXT: pli r4, 3567587332
1522 ; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
1523 ; CHECK-P10-BE-NEXT: lwa r3, 0(r4)
1524 ; CHECK-P10-BE-NEXT: blr
1526 ; CHECK-P9-LE-LABEL: ld_cst_align64_int32_t_uint64_t:
1527 ; CHECK-P9-LE: # %bb.0: # %entry
1528 ; CHECK-P9-LE-NEXT: lis r3, 3725
1529 ; CHECK-P9-LE-NEXT: ori r3, r3, 19025
1530 ; CHECK-P9-LE-NEXT: rldic r3, r3, 12, 24
1531 ; CHECK-P9-LE-NEXT: lwa r3, 0(r3)
1532 ; CHECK-P9-LE-NEXT: blr
1534 ; CHECK-P9-BE-LABEL: ld_cst_align64_int32_t_uint64_t:
1535 ; CHECK-P9-BE: # %bb.0: # %entry
1536 ; CHECK-P9-BE-NEXT: li r3, 29
1537 ; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
1538 ; CHECK-P9-BE-NEXT: oris r3, r3, 54437
1539 ; CHECK-P9-BE-NEXT: ori r3, r3, 4100
1540 ; CHECK-P9-BE-NEXT: lwa r3, 0(r3)
1541 ; CHECK-P9-BE-NEXT: blr
1543 ; CHECK-P8-LE-LABEL: ld_cst_align64_int32_t_uint64_t:
1544 ; CHECK-P8-LE: # %bb.0: # %entry
1545 ; CHECK-P8-LE-NEXT: lis r3, 3725
1546 ; CHECK-P8-LE-NEXT: ori r3, r3, 19025
1547 ; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
1548 ; CHECK-P8-LE-NEXT: lwa r3, 0(r3)
1549 ; CHECK-P8-LE-NEXT: blr
1551 ; CHECK-P8-BE-LABEL: ld_cst_align64_int32_t_uint64_t:
1552 ; CHECK-P8-BE: # %bb.0: # %entry
1553 ; CHECK-P8-BE-NEXT: li r3, 29
1554 ; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
1555 ; CHECK-P8-BE-NEXT: oris r3, r3, 54437
1556 ; CHECK-P8-BE-NEXT: ori r3, r3, 4100
1557 ; CHECK-P8-BE-NEXT: lwa r3, 0(r3)
1558 ; CHECK-P8-BE-NEXT: blr
1560 %0 = load i64, ptr inttoptr (i64 1000000000000 to ptr), align 4096
1561 %conv = trunc i64 %0 to i32
1565 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1566 define dso_local signext i32 @ld_0_int32_t_float(i64 %ptr) {
1567 ; CHECK-LABEL: ld_0_int32_t_float:
1568 ; CHECK: # %bb.0: # %entry
1569 ; CHECK-NEXT: lfs f0, 0(r3)
1570 ; CHECK-NEXT: xscvdpsxws f0, f0
1571 ; CHECK-NEXT: mffprwz r3, f0
1572 ; CHECK-NEXT: extsw r3, r3
1575 %0 = inttoptr i64 %ptr to ptr
1576 %1 = load float, ptr %0, align 4
1577 %conv = fptosi float %1 to i32
1581 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1582 define dso_local signext i32 @ld_align16_int32_t_float(ptr nocapture readonly %ptr) {
1583 ; CHECK-LABEL: ld_align16_int32_t_float:
1584 ; CHECK: # %bb.0: # %entry
1585 ; CHECK-NEXT: lfs f0, 8(r3)
1586 ; CHECK-NEXT: xscvdpsxws f0, f0
1587 ; CHECK-NEXT: mffprwz r3, f0
1588 ; CHECK-NEXT: extsw r3, r3
1591 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
1592 %0 = load float, ptr %add.ptr, align 4
1593 %conv = fptosi float %0 to i32
1597 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1598 define dso_local signext i32 @ld_align32_int32_t_float(ptr nocapture readonly %ptr) {
1599 ; CHECK-P10-LABEL: ld_align32_int32_t_float:
1600 ; CHECK-P10: # %bb.0: # %entry
1601 ; CHECK-P10-NEXT: plfs f0, 99999000(r3), 0
1602 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
1603 ; CHECK-P10-NEXT: mffprwz r3, f0
1604 ; CHECK-P10-NEXT: extsw r3, r3
1605 ; CHECK-P10-NEXT: blr
1607 ; CHECK-PREP10-LABEL: ld_align32_int32_t_float:
1608 ; CHECK-PREP10: # %bb.0: # %entry
1609 ; CHECK-PREP10-NEXT: lis r4, 1525
1610 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
1611 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
1612 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
1613 ; CHECK-PREP10-NEXT: mffprwz r3, f0
1614 ; CHECK-PREP10-NEXT: extsw r3, r3
1615 ; CHECK-PREP10-NEXT: blr
1617 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
1618 %0 = load float, ptr %add.ptr, align 4
1619 %conv = fptosi float %0 to i32
1623 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1624 define dso_local signext i32 @ld_align64_int32_t_float(ptr nocapture readonly %ptr) {
1625 ; CHECK-P10-LABEL: ld_align64_int32_t_float:
1626 ; CHECK-P10: # %bb.0: # %entry
1627 ; CHECK-P10-NEXT: pli r4, 244140625
1628 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
1629 ; CHECK-P10-NEXT: lfsx f0, r3, r4
1630 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
1631 ; CHECK-P10-NEXT: mffprwz r3, f0
1632 ; CHECK-P10-NEXT: extsw r3, r3
1633 ; CHECK-P10-NEXT: blr
1635 ; CHECK-PREP10-LABEL: ld_align64_int32_t_float:
1636 ; CHECK-PREP10: # %bb.0: # %entry
1637 ; CHECK-PREP10-NEXT: lis r4, 3725
1638 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
1639 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
1640 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
1641 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
1642 ; CHECK-PREP10-NEXT: mffprwz r3, f0
1643 ; CHECK-PREP10-NEXT: extsw r3, r3
1644 ; CHECK-PREP10-NEXT: blr
1646 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
1647 %0 = load float, ptr %add.ptr, align 4
1648 %conv = fptosi float %0 to i32
1652 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1653 define dso_local signext i32 @ld_reg_int32_t_float(ptr nocapture readonly %ptr, i64 %off) {
1654 ; CHECK-LABEL: ld_reg_int32_t_float:
1655 ; CHECK: # %bb.0: # %entry
1656 ; CHECK-NEXT: lfsx f0, r3, r4
1657 ; CHECK-NEXT: xscvdpsxws f0, f0
1658 ; CHECK-NEXT: mffprwz r3, f0
1659 ; CHECK-NEXT: extsw r3, r3
1662 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
1663 %0 = load float, ptr %add.ptr, align 4
1664 %conv = fptosi float %0 to i32
1668 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1669 define dso_local signext i32 @ld_or_int32_t_float(i64 %ptr, i8 zeroext %off) {
1670 ; CHECK-LABEL: ld_or_int32_t_float:
1671 ; CHECK: # %bb.0: # %entry
1672 ; CHECK-NEXT: or r3, r4, r3
1673 ; CHECK-NEXT: lfs f0, 0(r3)
1674 ; CHECK-NEXT: xscvdpsxws f0, f0
1675 ; CHECK-NEXT: mffprwz r3, f0
1676 ; CHECK-NEXT: extsw r3, r3
1679 %conv = zext i8 %off to i64
1680 %or = or i64 %conv, %ptr
1681 %0 = inttoptr i64 %or to ptr
1682 %1 = load float, ptr %0, align 4
1683 %conv1 = fptosi float %1 to i32
1687 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1688 define dso_local signext i32 @ld_or2_int32_t_float(i64 %ptr, i8 zeroext %off) {
1689 ; CHECK-LABEL: ld_or2_int32_t_float:
1690 ; CHECK: # %bb.0: # %entry
1691 ; CHECK-NEXT: rldicr r3, r3, 0, 51
1692 ; CHECK-NEXT: lfsx f0, r3, r4
1693 ; CHECK-NEXT: xscvdpsxws f0, f0
1694 ; CHECK-NEXT: mffprwz r3, f0
1695 ; CHECK-NEXT: extsw r3, r3
1698 %and = and i64 %ptr, -4096
1699 %conv = zext i8 %off to i64
1700 %or = or i64 %and, %conv
1701 %0 = inttoptr i64 %or to ptr
1702 %1 = load float, ptr %0, align 4
1703 %conv1 = fptosi float %1 to i32
1707 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1708 define dso_local signext i32 @ld_not_disjoint16_int32_t_float(i64 %ptr) {
1709 ; CHECK-LABEL: ld_not_disjoint16_int32_t_float:
1710 ; CHECK: # %bb.0: # %entry
1711 ; CHECK-NEXT: ori r3, r3, 6
1712 ; CHECK-NEXT: lfs f0, 0(r3)
1713 ; CHECK-NEXT: xscvdpsxws f0, f0
1714 ; CHECK-NEXT: mffprwz r3, f0
1715 ; CHECK-NEXT: extsw r3, r3
1718 %or = or i64 %ptr, 6
1719 %0 = inttoptr i64 %or to ptr
1720 %1 = load float, ptr %0, align 4
1721 %conv = fptosi float %1 to i32
1725 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1726 define dso_local signext i32 @ld_disjoint_align16_int32_t_float(i64 %ptr) {
1727 ; CHECK-LABEL: ld_disjoint_align16_int32_t_float:
1728 ; CHECK: # %bb.0: # %entry
1729 ; CHECK-NEXT: rldicr r3, r3, 0, 51
1730 ; CHECK-NEXT: lfs f0, 24(r3)
1731 ; CHECK-NEXT: xscvdpsxws f0, f0
1732 ; CHECK-NEXT: mffprwz r3, f0
1733 ; CHECK-NEXT: extsw r3, r3
1736 %and = and i64 %ptr, -4096
1737 %or = or i64 %and, 24
1738 %0 = inttoptr i64 %or to ptr
1739 %1 = load float, ptr %0, align 8
1740 %conv = fptosi float %1 to i32
1744 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1745 define dso_local signext i32 @ld_not_disjoint32_int32_t_float(i64 %ptr) {
1746 ; CHECK-LABEL: ld_not_disjoint32_int32_t_float:
1747 ; CHECK: # %bb.0: # %entry
1748 ; CHECK-NEXT: ori r3, r3, 34463
1749 ; CHECK-NEXT: oris r3, r3, 1
1750 ; CHECK-NEXT: lfs f0, 0(r3)
1751 ; CHECK-NEXT: xscvdpsxws f0, f0
1752 ; CHECK-NEXT: mffprwz r3, f0
1753 ; CHECK-NEXT: extsw r3, r3
1756 %or = or i64 %ptr, 99999
1757 %0 = inttoptr i64 %or to ptr
1758 %1 = load float, ptr %0, align 4
1759 %conv = fptosi float %1 to i32
1763 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1764 define dso_local signext i32 @ld_disjoint_align32_int32_t_float(i64 %ptr) {
1765 ; CHECK-P10-LABEL: ld_disjoint_align32_int32_t_float:
1766 ; CHECK-P10: # %bb.0: # %entry
1767 ; CHECK-P10-NEXT: lis r4, -15264
1768 ; CHECK-P10-NEXT: and r3, r3, r4
1769 ; CHECK-P10-NEXT: plfs f0, 999990000(r3), 0
1770 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
1771 ; CHECK-P10-NEXT: mffprwz r3, f0
1772 ; CHECK-P10-NEXT: extsw r3, r3
1773 ; CHECK-P10-NEXT: blr
1775 ; CHECK-PREP10-LABEL: ld_disjoint_align32_int32_t_float:
1776 ; CHECK-PREP10: # %bb.0: # %entry
1777 ; CHECK-PREP10-NEXT: lis r4, -15264
1778 ; CHECK-PREP10-NEXT: and r3, r3, r4
1779 ; CHECK-PREP10-NEXT: lis r4, 15258
1780 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
1781 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
1782 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
1783 ; CHECK-PREP10-NEXT: mffprwz r3, f0
1784 ; CHECK-PREP10-NEXT: extsw r3, r3
1785 ; CHECK-PREP10-NEXT: blr
1787 %and = and i64 %ptr, -1000341504
1788 %or = or i64 %and, 999990000
1789 %0 = inttoptr i64 %or to ptr
1790 %1 = load float, ptr %0, align 16
1791 %conv = fptosi float %1 to i32
1795 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1796 define dso_local signext i32 @ld_not_disjoint64_int32_t_float(i64 %ptr) {
1797 ; CHECK-P10-LABEL: ld_not_disjoint64_int32_t_float:
1798 ; CHECK-P10: # %bb.0: # %entry
1799 ; CHECK-P10-NEXT: pli r4, 232
1800 ; CHECK-P10-NEXT: pli r5, 3567587329
1801 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
1802 ; CHECK-P10-NEXT: or r3, r3, r5
1803 ; CHECK-P10-NEXT: lfs f0, 0(r3)
1804 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
1805 ; CHECK-P10-NEXT: mffprwz r3, f0
1806 ; CHECK-P10-NEXT: extsw r3, r3
1807 ; CHECK-P10-NEXT: blr
1809 ; CHECK-PREP10-LABEL: ld_not_disjoint64_int32_t_float:
1810 ; CHECK-PREP10: # %bb.0: # %entry
1811 ; CHECK-PREP10-NEXT: li r4, 29
1812 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
1813 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
1814 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
1815 ; CHECK-PREP10-NEXT: or r3, r3, r4
1816 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
1817 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
1818 ; CHECK-PREP10-NEXT: mffprwz r3, f0
1819 ; CHECK-PREP10-NEXT: extsw r3, r3
1820 ; CHECK-PREP10-NEXT: blr
1822 %or = or i64 %ptr, 1000000000001
1823 %0 = inttoptr i64 %or to ptr
1824 %1 = load float, ptr %0, align 4
1825 %conv = fptosi float %1 to i32
1829 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1830 define dso_local signext i32 @ld_disjoint_align64_int32_t_float(i64 %ptr) {
1831 ; CHECK-P10-LABEL: ld_disjoint_align64_int32_t_float:
1832 ; CHECK-P10: # %bb.0: # %entry
1833 ; CHECK-P10-NEXT: pli r4, 244140625
1834 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
1835 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
1836 ; CHECK-P10-NEXT: lfsx f0, r3, r4
1837 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
1838 ; CHECK-P10-NEXT: mffprwz r3, f0
1839 ; CHECK-P10-NEXT: extsw r3, r3
1840 ; CHECK-P10-NEXT: blr
1842 ; CHECK-PREP10-LABEL: ld_disjoint_align64_int32_t_float:
1843 ; CHECK-PREP10: # %bb.0: # %entry
1844 ; CHECK-PREP10-NEXT: lis r4, 3725
1845 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
1846 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
1847 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
1848 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
1849 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
1850 ; CHECK-PREP10-NEXT: mffprwz r3, f0
1851 ; CHECK-PREP10-NEXT: extsw r3, r3
1852 ; CHECK-PREP10-NEXT: blr
1854 %and = and i64 %ptr, -1099511627776
1855 %or = or i64 %and, 1000000000000
1856 %0 = inttoptr i64 %or to ptr
1857 %1 = load float, ptr %0, align 4096
1858 %conv = fptosi float %1 to i32
1862 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1863 define dso_local signext i32 @ld_cst_align16_int32_t_float() {
1864 ; CHECK-LABEL: ld_cst_align16_int32_t_float:
1865 ; CHECK: # %bb.0: # %entry
1866 ; CHECK-NEXT: lfs f0, 4080(0)
1867 ; CHECK-NEXT: xscvdpsxws f0, f0
1868 ; CHECK-NEXT: mffprwz r3, f0
1869 ; CHECK-NEXT: extsw r3, r3
1872 %0 = load float, ptr inttoptr (i64 4080 to ptr), align 16
1873 %conv = fptosi float %0 to i32
1877 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1878 define dso_local signext i32 @ld_cst_align32_int32_t_float() {
1879 ; CHECK-LABEL: ld_cst_align32_int32_t_float:
1880 ; CHECK: # %bb.0: # %entry
1881 ; CHECK-NEXT: lis r3, 153
1882 ; CHECK-NEXT: lfs f0, -27108(r3)
1883 ; CHECK-NEXT: xscvdpsxws f0, f0
1884 ; CHECK-NEXT: mffprwz r3, f0
1885 ; CHECK-NEXT: extsw r3, r3
1888 %0 = load float, ptr inttoptr (i64 9999900 to ptr), align 4
1889 %conv = fptosi float %0 to i32
1893 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1894 define dso_local signext i32 @ld_cst_align64_int32_t_float() {
1895 ; CHECK-P10-LABEL: ld_cst_align64_int32_t_float:
1896 ; CHECK-P10: # %bb.0: # %entry
1897 ; CHECK-P10-NEXT: pli r3, 244140625
1898 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
1899 ; CHECK-P10-NEXT: lfs f0, 0(r3)
1900 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
1901 ; CHECK-P10-NEXT: mffprwz r3, f0
1902 ; CHECK-P10-NEXT: extsw r3, r3
1903 ; CHECK-P10-NEXT: blr
1905 ; CHECK-PREP10-LABEL: ld_cst_align64_int32_t_float:
1906 ; CHECK-PREP10: # %bb.0: # %entry
1907 ; CHECK-PREP10-NEXT: lis r3, 3725
1908 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
1909 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
1910 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
1911 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
1912 ; CHECK-PREP10-NEXT: mffprwz r3, f0
1913 ; CHECK-PREP10-NEXT: extsw r3, r3
1914 ; CHECK-PREP10-NEXT: blr
1916 %0 = load float, ptr inttoptr (i64 1000000000000 to ptr), align 4096
1917 %conv = fptosi float %0 to i32
1921 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1922 define dso_local signext i32 @ld_0_int32_t_double(i64 %ptr) {
1923 ; CHECK-LABEL: ld_0_int32_t_double:
1924 ; CHECK: # %bb.0: # %entry
1925 ; CHECK-NEXT: lfd f0, 0(r3)
1926 ; CHECK-NEXT: xscvdpsxws f0, f0
1927 ; CHECK-NEXT: mffprwz r3, f0
1928 ; CHECK-NEXT: extsw r3, r3
1931 %0 = inttoptr i64 %ptr to ptr
1932 %1 = load double, ptr %0, align 8
1933 %conv = fptosi double %1 to i32
1937 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1938 define dso_local signext i32 @ld_align16_int32_t_double(ptr nocapture readonly %ptr) {
1939 ; CHECK-LABEL: ld_align16_int32_t_double:
1940 ; CHECK: # %bb.0: # %entry
1941 ; CHECK-NEXT: lfd f0, 8(r3)
1942 ; CHECK-NEXT: xscvdpsxws f0, f0
1943 ; CHECK-NEXT: mffprwz r3, f0
1944 ; CHECK-NEXT: extsw r3, r3
1947 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
1948 %0 = load double, ptr %add.ptr, align 8
1949 %conv = fptosi double %0 to i32
1953 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1954 define dso_local signext i32 @ld_align32_int32_t_double(ptr nocapture readonly %ptr) {
1955 ; CHECK-P10-LABEL: ld_align32_int32_t_double:
1956 ; CHECK-P10: # %bb.0: # %entry
1957 ; CHECK-P10-NEXT: plfd f0, 99999000(r3), 0
1958 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
1959 ; CHECK-P10-NEXT: mffprwz r3, f0
1960 ; CHECK-P10-NEXT: extsw r3, r3
1961 ; CHECK-P10-NEXT: blr
1963 ; CHECK-PREP10-LABEL: ld_align32_int32_t_double:
1964 ; CHECK-PREP10: # %bb.0: # %entry
1965 ; CHECK-PREP10-NEXT: lis r4, 1525
1966 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
1967 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
1968 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
1969 ; CHECK-PREP10-NEXT: mffprwz r3, f0
1970 ; CHECK-PREP10-NEXT: extsw r3, r3
1971 ; CHECK-PREP10-NEXT: blr
1973 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
1974 %0 = load double, ptr %add.ptr, align 8
1975 %conv = fptosi double %0 to i32
1979 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1980 define dso_local signext i32 @ld_align64_int32_t_double(ptr nocapture readonly %ptr) {
1981 ; CHECK-P10-LABEL: ld_align64_int32_t_double:
1982 ; CHECK-P10: # %bb.0: # %entry
1983 ; CHECK-P10-NEXT: pli r4, 244140625
1984 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
1985 ; CHECK-P10-NEXT: lfdx f0, r3, r4
1986 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
1987 ; CHECK-P10-NEXT: mffprwz r3, f0
1988 ; CHECK-P10-NEXT: extsw r3, r3
1989 ; CHECK-P10-NEXT: blr
1991 ; CHECK-PREP10-LABEL: ld_align64_int32_t_double:
1992 ; CHECK-PREP10: # %bb.0: # %entry
1993 ; CHECK-PREP10-NEXT: lis r4, 3725
1994 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
1995 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
1996 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
1997 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
1998 ; CHECK-PREP10-NEXT: mffprwz r3, f0
1999 ; CHECK-PREP10-NEXT: extsw r3, r3
2000 ; CHECK-PREP10-NEXT: blr
2002 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
2003 %0 = load double, ptr %add.ptr, align 8
2004 %conv = fptosi double %0 to i32
2008 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2009 define dso_local signext i32 @ld_reg_int32_t_double(ptr nocapture readonly %ptr, i64 %off) {
2010 ; CHECK-LABEL: ld_reg_int32_t_double:
2011 ; CHECK: # %bb.0: # %entry
2012 ; CHECK-NEXT: lfdx f0, r3, r4
2013 ; CHECK-NEXT: xscvdpsxws f0, f0
2014 ; CHECK-NEXT: mffprwz r3, f0
2015 ; CHECK-NEXT: extsw r3, r3
2018 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
2019 %0 = load double, ptr %add.ptr, align 8
2020 %conv = fptosi double %0 to i32
2024 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2025 define dso_local signext i32 @ld_or_int32_t_double(i64 %ptr, i8 zeroext %off) {
2026 ; CHECK-LABEL: ld_or_int32_t_double:
2027 ; CHECK: # %bb.0: # %entry
2028 ; CHECK-NEXT: or r3, r4, r3
2029 ; CHECK-NEXT: lfd f0, 0(r3)
2030 ; CHECK-NEXT: xscvdpsxws f0, f0
2031 ; CHECK-NEXT: mffprwz r3, f0
2032 ; CHECK-NEXT: extsw r3, r3
2035 %conv = zext i8 %off to i64
2036 %or = or i64 %conv, %ptr
2037 %0 = inttoptr i64 %or to ptr
2038 %1 = load double, ptr %0, align 8
2039 %conv1 = fptosi double %1 to i32
2043 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2044 define dso_local signext i32 @ld_or2_int32_t_double(i64 %ptr, i8 zeroext %off) {
2045 ; CHECK-LABEL: ld_or2_int32_t_double:
2046 ; CHECK: # %bb.0: # %entry
2047 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2048 ; CHECK-NEXT: lfdx f0, r3, r4
2049 ; CHECK-NEXT: xscvdpsxws f0, f0
2050 ; CHECK-NEXT: mffprwz r3, f0
2051 ; CHECK-NEXT: extsw r3, r3
2054 %and = and i64 %ptr, -4096
2055 %conv = zext i8 %off to i64
2056 %or = or i64 %and, %conv
2057 %0 = inttoptr i64 %or to ptr
2058 %1 = load double, ptr %0, align 8
2059 %conv1 = fptosi double %1 to i32
2063 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2064 define dso_local signext i32 @ld_not_disjoint16_int32_t_double(i64 %ptr) {
2065 ; CHECK-LABEL: ld_not_disjoint16_int32_t_double:
2066 ; CHECK: # %bb.0: # %entry
2067 ; CHECK-NEXT: ori r3, r3, 6
2068 ; CHECK-NEXT: lfd f0, 0(r3)
2069 ; CHECK-NEXT: xscvdpsxws f0, f0
2070 ; CHECK-NEXT: mffprwz r3, f0
2071 ; CHECK-NEXT: extsw r3, r3
2074 %or = or i64 %ptr, 6
2075 %0 = inttoptr i64 %or to ptr
2076 %1 = load double, ptr %0, align 8
2077 %conv = fptosi double %1 to i32
2081 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2082 define dso_local signext i32 @ld_disjoint_align16_int32_t_double(i64 %ptr) {
2083 ; CHECK-LABEL: ld_disjoint_align16_int32_t_double:
2084 ; CHECK: # %bb.0: # %entry
2085 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2086 ; CHECK-NEXT: lfd f0, 24(r3)
2087 ; CHECK-NEXT: xscvdpsxws f0, f0
2088 ; CHECK-NEXT: mffprwz r3, f0
2089 ; CHECK-NEXT: extsw r3, r3
2092 %and = and i64 %ptr, -4096
2093 %or = or i64 %and, 24
2094 %0 = inttoptr i64 %or to ptr
2095 %1 = load double, ptr %0, align 8
2096 %conv = fptosi double %1 to i32
2100 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2101 define dso_local signext i32 @ld_not_disjoint32_int32_t_double(i64 %ptr) {
2102 ; CHECK-LABEL: ld_not_disjoint32_int32_t_double:
2103 ; CHECK: # %bb.0: # %entry
2104 ; CHECK-NEXT: ori r3, r3, 34463
2105 ; CHECK-NEXT: oris r3, r3, 1
2106 ; CHECK-NEXT: lfd f0, 0(r3)
2107 ; CHECK-NEXT: xscvdpsxws f0, f0
2108 ; CHECK-NEXT: mffprwz r3, f0
2109 ; CHECK-NEXT: extsw r3, r3
2112 %or = or i64 %ptr, 99999
2113 %0 = inttoptr i64 %or to ptr
2114 %1 = load double, ptr %0, align 8
2115 %conv = fptosi double %1 to i32
2119 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2120 define dso_local signext i32 @ld_disjoint_align32_int32_t_double(i64 %ptr) {
2121 ; CHECK-P10-LABEL: ld_disjoint_align32_int32_t_double:
2122 ; CHECK-P10: # %bb.0: # %entry
2123 ; CHECK-P10-NEXT: lis r4, -15264
2124 ; CHECK-P10-NEXT: and r3, r3, r4
2125 ; CHECK-P10-NEXT: plfd f0, 999990000(r3), 0
2126 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2127 ; CHECK-P10-NEXT: mffprwz r3, f0
2128 ; CHECK-P10-NEXT: extsw r3, r3
2129 ; CHECK-P10-NEXT: blr
2131 ; CHECK-PREP10-LABEL: ld_disjoint_align32_int32_t_double:
2132 ; CHECK-PREP10: # %bb.0: # %entry
2133 ; CHECK-PREP10-NEXT: lis r4, -15264
2134 ; CHECK-PREP10-NEXT: and r3, r3, r4
2135 ; CHECK-PREP10-NEXT: lis r4, 15258
2136 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
2137 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
2138 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2139 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2140 ; CHECK-PREP10-NEXT: extsw r3, r3
2141 ; CHECK-PREP10-NEXT: blr
2143 %and = and i64 %ptr, -1000341504
2144 %or = or i64 %and, 999990000
2145 %0 = inttoptr i64 %or to ptr
2146 %1 = load double, ptr %0, align 16
2147 %conv = fptosi double %1 to i32
2151 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2152 define dso_local signext i32 @ld_not_disjoint64_int32_t_double(i64 %ptr) {
2153 ; CHECK-P10-LABEL: ld_not_disjoint64_int32_t_double:
2154 ; CHECK-P10: # %bb.0: # %entry
2155 ; CHECK-P10-NEXT: pli r4, 232
2156 ; CHECK-P10-NEXT: pli r5, 3567587329
2157 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2158 ; CHECK-P10-NEXT: or r3, r3, r5
2159 ; CHECK-P10-NEXT: lfd f0, 0(r3)
2160 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2161 ; CHECK-P10-NEXT: mffprwz r3, f0
2162 ; CHECK-P10-NEXT: extsw r3, r3
2163 ; CHECK-P10-NEXT: blr
2165 ; CHECK-PREP10-LABEL: ld_not_disjoint64_int32_t_double:
2166 ; CHECK-PREP10: # %bb.0: # %entry
2167 ; CHECK-PREP10-NEXT: li r4, 29
2168 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2169 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2170 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2171 ; CHECK-PREP10-NEXT: or r3, r3, r4
2172 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
2173 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2174 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2175 ; CHECK-PREP10-NEXT: extsw r3, r3
2176 ; CHECK-PREP10-NEXT: blr
2178 %or = or i64 %ptr, 1000000000001
2179 %0 = inttoptr i64 %or to ptr
2180 %1 = load double, ptr %0, align 8
2181 %conv = fptosi double %1 to i32
2185 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2186 define dso_local signext i32 @ld_disjoint_align64_int32_t_double(i64 %ptr) {
2187 ; CHECK-P10-LABEL: ld_disjoint_align64_int32_t_double:
2188 ; CHECK-P10: # %bb.0: # %entry
2189 ; CHECK-P10-NEXT: pli r4, 244140625
2190 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
2191 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2192 ; CHECK-P10-NEXT: lfdx f0, r3, r4
2193 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2194 ; CHECK-P10-NEXT: mffprwz r3, f0
2195 ; CHECK-P10-NEXT: extsw r3, r3
2196 ; CHECK-P10-NEXT: blr
2198 ; CHECK-PREP10-LABEL: ld_disjoint_align64_int32_t_double:
2199 ; CHECK-PREP10: # %bb.0: # %entry
2200 ; CHECK-PREP10-NEXT: lis r4, 3725
2201 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
2202 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2203 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2204 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
2205 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2206 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2207 ; CHECK-PREP10-NEXT: extsw r3, r3
2208 ; CHECK-PREP10-NEXT: blr
2210 %and = and i64 %ptr, -1099511627776
2211 %or = or i64 %and, 1000000000000
2212 %0 = inttoptr i64 %or to ptr
2213 %1 = load double, ptr %0, align 4096
2214 %conv = fptosi double %1 to i32
2218 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2219 define dso_local signext i32 @ld_cst_align16_int32_t_double() {
2220 ; CHECK-LABEL: ld_cst_align16_int32_t_double:
2221 ; CHECK: # %bb.0: # %entry
2222 ; CHECK-NEXT: lfd f0, 4080(0)
2223 ; CHECK-NEXT: xscvdpsxws f0, f0
2224 ; CHECK-NEXT: mffprwz r3, f0
2225 ; CHECK-NEXT: extsw r3, r3
2228 %0 = load double, ptr inttoptr (i64 4080 to ptr), align 16
2229 %conv = fptosi double %0 to i32
2233 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2234 define dso_local signext i32 @ld_cst_align32_int32_t_double() {
2235 ; CHECK-LABEL: ld_cst_align32_int32_t_double:
2236 ; CHECK: # %bb.0: # %entry
2237 ; CHECK-NEXT: lis r3, 153
2238 ; CHECK-NEXT: lfd f0, -27108(r3)
2239 ; CHECK-NEXT: xscvdpsxws f0, f0
2240 ; CHECK-NEXT: mffprwz r3, f0
2241 ; CHECK-NEXT: extsw r3, r3
2244 %0 = load double, ptr inttoptr (i64 9999900 to ptr), align 8
2245 %conv = fptosi double %0 to i32
2249 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2250 define dso_local signext i32 @ld_cst_align64_int32_t_double() {
2251 ; CHECK-P10-LABEL: ld_cst_align64_int32_t_double:
2252 ; CHECK-P10: # %bb.0: # %entry
2253 ; CHECK-P10-NEXT: pli r3, 244140625
2254 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
2255 ; CHECK-P10-NEXT: lfd f0, 0(r3)
2256 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2257 ; CHECK-P10-NEXT: mffprwz r3, f0
2258 ; CHECK-P10-NEXT: extsw r3, r3
2259 ; CHECK-P10-NEXT: blr
2261 ; CHECK-PREP10-LABEL: ld_cst_align64_int32_t_double:
2262 ; CHECK-PREP10: # %bb.0: # %entry
2263 ; CHECK-PREP10-NEXT: lis r3, 3725
2264 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
2265 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
2266 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
2267 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2268 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2269 ; CHECK-PREP10-NEXT: extsw r3, r3
2270 ; CHECK-PREP10-NEXT: blr
2272 %0 = load double, ptr inttoptr (i64 1000000000000 to ptr), align 4096
2273 %conv = fptosi double %0 to i32
2277 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2278 define dso_local zeroext i32 @ld_0_uint32_t_uint8_t(i64 %ptr) {
2279 ; CHECK-LABEL: ld_0_uint32_t_uint8_t:
2280 ; CHECK: # %bb.0: # %entry
2281 ; CHECK-NEXT: lbz r3, 0(r3)
2284 %0 = inttoptr i64 %ptr to ptr
2285 %1 = load i8, ptr %0, align 1
2286 %conv = zext i8 %1 to i32
2290 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2291 define dso_local zeroext i32 @ld_align16_uint32_t_uint8_t(ptr nocapture readonly %ptr) {
2292 ; CHECK-LABEL: ld_align16_uint32_t_uint8_t:
2293 ; CHECK: # %bb.0: # %entry
2294 ; CHECK-NEXT: lbz r3, 8(r3)
2297 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
2298 %0 = load i8, ptr %add.ptr, align 1
2299 %conv = zext i8 %0 to i32
2303 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2304 define dso_local zeroext i32 @ld_align32_uint32_t_uint8_t(ptr nocapture readonly %ptr) {
2305 ; CHECK-P10-LABEL: ld_align32_uint32_t_uint8_t:
2306 ; CHECK-P10: # %bb.0: # %entry
2307 ; CHECK-P10-NEXT: plbz r3, 99999000(r3), 0
2308 ; CHECK-P10-NEXT: blr
2310 ; CHECK-PREP10-LABEL: ld_align32_uint32_t_uint8_t:
2311 ; CHECK-PREP10: # %bb.0: # %entry
2312 ; CHECK-PREP10-NEXT: lis r4, 1525
2313 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
2314 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
2315 ; CHECK-PREP10-NEXT: blr
2317 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
2318 %0 = load i8, ptr %add.ptr, align 1
2319 %conv = zext i8 %0 to i32
2323 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2324 define dso_local zeroext i32 @ld_align64_uint32_t_uint8_t(ptr nocapture readonly %ptr) {
2325 ; CHECK-P10-LABEL: ld_align64_uint32_t_uint8_t:
2326 ; CHECK-P10: # %bb.0: # %entry
2327 ; CHECK-P10-NEXT: pli r4, 244140625
2328 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2329 ; CHECK-P10-NEXT: lbzx r3, r3, r4
2330 ; CHECK-P10-NEXT: blr
2332 ; CHECK-PREP10-LABEL: ld_align64_uint32_t_uint8_t:
2333 ; CHECK-PREP10: # %bb.0: # %entry
2334 ; CHECK-PREP10-NEXT: lis r4, 3725
2335 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2336 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2337 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
2338 ; CHECK-PREP10-NEXT: blr
2340 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
2341 %0 = load i8, ptr %add.ptr, align 1
2342 %conv = zext i8 %0 to i32
2346 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2347 define dso_local zeroext i32 @ld_reg_uint32_t_uint8_t(ptr nocapture readonly %ptr, i64 %off) {
2348 ; CHECK-LABEL: ld_reg_uint32_t_uint8_t:
2349 ; CHECK: # %bb.0: # %entry
2350 ; CHECK-NEXT: lbzx r3, r3, r4
2353 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
2354 %0 = load i8, ptr %add.ptr, align 1
2355 %conv = zext i8 %0 to i32
2359 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2360 define dso_local zeroext i32 @ld_or_uint32_t_uint8_t(i64 %ptr, i8 zeroext %off) {
2361 ; CHECK-LABEL: ld_or_uint32_t_uint8_t:
2362 ; CHECK: # %bb.0: # %entry
2363 ; CHECK-NEXT: or r3, r4, r3
2364 ; CHECK-NEXT: lbz r3, 0(r3)
2367 %conv = zext i8 %off to i64
2368 %or = or i64 %conv, %ptr
2369 %0 = inttoptr i64 %or to ptr
2370 %1 = load i8, ptr %0, align 1
2371 %conv1 = zext i8 %1 to i32
2375 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2376 define dso_local zeroext i32 @ld_not_disjoint16_uint32_t_uint8_t(i64 %ptr) {
2377 ; CHECK-LABEL: ld_not_disjoint16_uint32_t_uint8_t:
2378 ; CHECK: # %bb.0: # %entry
2379 ; CHECK-NEXT: ori r3, r3, 6
2380 ; CHECK-NEXT: lbz r3, 0(r3)
2383 %or = or i64 %ptr, 6
2384 %0 = inttoptr i64 %or to ptr
2385 %1 = load i8, ptr %0, align 1
2386 %conv = zext i8 %1 to i32
2390 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2391 define dso_local zeroext i32 @ld_disjoint_align16_uint32_t_uint8_t(i64 %ptr) {
2392 ; CHECK-LABEL: ld_disjoint_align16_uint32_t_uint8_t:
2393 ; CHECK: # %bb.0: # %entry
2394 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2395 ; CHECK-NEXT: lbz r3, 24(r3)
2398 %and = and i64 %ptr, -4096
2399 %or = or i64 %and, 24
2400 %0 = inttoptr i64 %or to ptr
2401 %1 = load i8, ptr %0, align 8
2402 %conv = zext i8 %1 to i32
2406 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2407 define dso_local zeroext i32 @ld_not_disjoint32_uint32_t_uint8_t(i64 %ptr) {
2408 ; CHECK-LABEL: ld_not_disjoint32_uint32_t_uint8_t:
2409 ; CHECK: # %bb.0: # %entry
2410 ; CHECK-NEXT: ori r3, r3, 34463
2411 ; CHECK-NEXT: oris r3, r3, 1
2412 ; CHECK-NEXT: lbz r3, 0(r3)
2415 %or = or i64 %ptr, 99999
2416 %0 = inttoptr i64 %or to ptr
2417 %1 = load i8, ptr %0, align 1
2418 %conv = zext i8 %1 to i32
2422 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2423 define dso_local zeroext i32 @ld_disjoint_align32_uint32_t_uint8_t(i64 %ptr) {
2424 ; CHECK-P10-LABEL: ld_disjoint_align32_uint32_t_uint8_t:
2425 ; CHECK-P10: # %bb.0: # %entry
2426 ; CHECK-P10-NEXT: lis r4, -15264
2427 ; CHECK-P10-NEXT: and r3, r3, r4
2428 ; CHECK-P10-NEXT: plbz r3, 999990000(r3), 0
2429 ; CHECK-P10-NEXT: blr
2431 ; CHECK-PREP10-LABEL: ld_disjoint_align32_uint32_t_uint8_t:
2432 ; CHECK-PREP10: # %bb.0: # %entry
2433 ; CHECK-PREP10-NEXT: lis r4, -15264
2434 ; CHECK-PREP10-NEXT: and r3, r3, r4
2435 ; CHECK-PREP10-NEXT: lis r4, 15258
2436 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
2437 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
2438 ; CHECK-PREP10-NEXT: blr
2440 %and = and i64 %ptr, -1000341504
2441 %or = or i64 %and, 999990000
2442 %0 = inttoptr i64 %or to ptr
2443 %1 = load i8, ptr %0, align 16
2444 %conv = zext i8 %1 to i32
2448 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2449 define dso_local zeroext i32 @ld_not_disjoint64_uint32_t_uint8_t(i64 %ptr) {
2450 ; CHECK-P10-LABEL: ld_not_disjoint64_uint32_t_uint8_t:
2451 ; CHECK-P10: # %bb.0: # %entry
2452 ; CHECK-P10-NEXT: pli r4, 232
2453 ; CHECK-P10-NEXT: pli r5, 3567587329
2454 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2455 ; CHECK-P10-NEXT: or r3, r3, r5
2456 ; CHECK-P10-NEXT: lbz r3, 0(r3)
2457 ; CHECK-P10-NEXT: blr
2459 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint32_t_uint8_t:
2460 ; CHECK-PREP10: # %bb.0: # %entry
2461 ; CHECK-PREP10-NEXT: li r4, 29
2462 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2463 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2464 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2465 ; CHECK-PREP10-NEXT: or r3, r3, r4
2466 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
2467 ; CHECK-PREP10-NEXT: blr
2469 %or = or i64 %ptr, 1000000000001
2470 %0 = inttoptr i64 %or to ptr
2471 %1 = load i8, ptr %0, align 1
2472 %conv = zext i8 %1 to i32
2476 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2477 define dso_local zeroext i32 @ld_disjoint_align64_uint32_t_uint8_t(i64 %ptr) {
2478 ; CHECK-P10-LABEL: ld_disjoint_align64_uint32_t_uint8_t:
2479 ; CHECK-P10: # %bb.0: # %entry
2480 ; CHECK-P10-NEXT: pli r4, 244140625
2481 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
2482 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2483 ; CHECK-P10-NEXT: lbzx r3, r3, r4
2484 ; CHECK-P10-NEXT: blr
2486 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint32_t_uint8_t:
2487 ; CHECK-PREP10: # %bb.0: # %entry
2488 ; CHECK-PREP10-NEXT: lis r4, 3725
2489 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
2490 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2491 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2492 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
2493 ; CHECK-PREP10-NEXT: blr
2495 %and = and i64 %ptr, -1099511627776
2496 %or = or i64 %and, 1000000000000
2497 %0 = inttoptr i64 %or to ptr
2498 %1 = load i8, ptr %0, align 4096
2499 %conv = zext i8 %1 to i32
2503 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2504 define dso_local zeroext i32 @ld_cst_align16_uint32_t_uint8_t() {
2505 ; CHECK-LABEL: ld_cst_align16_uint32_t_uint8_t:
2506 ; CHECK: # %bb.0: # %entry
2507 ; CHECK-NEXT: lbz r3, 4080(0)
2510 %0 = load i8, ptr inttoptr (i64 4080 to ptr), align 16
2511 %conv = zext i8 %0 to i32
2515 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2516 define dso_local zeroext i32 @ld_cst_align32_uint32_t_uint8_t() {
2517 ; CHECK-LABEL: ld_cst_align32_uint32_t_uint8_t:
2518 ; CHECK: # %bb.0: # %entry
2519 ; CHECK-NEXT: lis r3, 153
2520 ; CHECK-NEXT: lbz r3, -27108(r3)
2523 %0 = load i8, ptr inttoptr (i64 9999900 to ptr), align 4
2524 %conv = zext i8 %0 to i32
2528 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2529 define dso_local zeroext i32 @ld_cst_align64_uint32_t_uint8_t() {
2530 ; CHECK-P10-LABEL: ld_cst_align64_uint32_t_uint8_t:
2531 ; CHECK-P10: # %bb.0: # %entry
2532 ; CHECK-P10-NEXT: pli r3, 244140625
2533 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
2534 ; CHECK-P10-NEXT: lbz r3, 0(r3)
2535 ; CHECK-P10-NEXT: blr
2537 ; CHECK-PREP10-LABEL: ld_cst_align64_uint32_t_uint8_t:
2538 ; CHECK-PREP10: # %bb.0: # %entry
2539 ; CHECK-PREP10-NEXT: lis r3, 3725
2540 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
2541 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
2542 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
2543 ; CHECK-PREP10-NEXT: blr
2545 %0 = load i8, ptr inttoptr (i64 1000000000000 to ptr), align 4096
2546 %conv = zext i8 %0 to i32
2550 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2551 define dso_local zeroext i32 @ld_0_uint32_t_int8_t(i64 %ptr) {
2552 ; CHECK-LABEL: ld_0_uint32_t_int8_t:
2553 ; CHECK: # %bb.0: # %entry
2554 ; CHECK-NEXT: lbz r3, 0(r3)
2555 ; CHECK-NEXT: extsb r3, r3
2556 ; CHECK-NEXT: clrldi r3, r3, 32
2559 %0 = inttoptr i64 %ptr to ptr
2560 %1 = load i8, ptr %0, align 1
2561 %conv = sext i8 %1 to i32
2565 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2566 define dso_local zeroext i32 @ld_align16_uint32_t_int8_t(ptr nocapture readonly %ptr) {
2567 ; CHECK-LABEL: ld_align16_uint32_t_int8_t:
2568 ; CHECK: # %bb.0: # %entry
2569 ; CHECK-NEXT: lbz r3, 8(r3)
2570 ; CHECK-NEXT: extsb r3, r3
2571 ; CHECK-NEXT: clrldi r3, r3, 32
2574 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
2575 %0 = load i8, ptr %add.ptr, align 1
2576 %conv = sext i8 %0 to i32
2580 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2581 define dso_local zeroext i32 @ld_align32_uint32_t_int8_t(ptr nocapture readonly %ptr) {
2582 ; CHECK-P10-LABEL: ld_align32_uint32_t_int8_t:
2583 ; CHECK-P10: # %bb.0: # %entry
2584 ; CHECK-P10-NEXT: plbz r3, 99999000(r3), 0
2585 ; CHECK-P10-NEXT: extsb r3, r3
2586 ; CHECK-P10-NEXT: clrldi r3, r3, 32
2587 ; CHECK-P10-NEXT: blr
2589 ; CHECK-PREP10-LABEL: ld_align32_uint32_t_int8_t:
2590 ; CHECK-PREP10: # %bb.0: # %entry
2591 ; CHECK-PREP10-NEXT: lis r4, 1525
2592 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
2593 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
2594 ; CHECK-PREP10-NEXT: extsb r3, r3
2595 ; CHECK-PREP10-NEXT: clrldi r3, r3, 32
2596 ; CHECK-PREP10-NEXT: blr
2598 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
2599 %0 = load i8, ptr %add.ptr, align 1
2600 %conv = sext i8 %0 to i32
2604 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2605 define dso_local zeroext i32 @ld_align64_uint32_t_int8_t(ptr nocapture readonly %ptr) {
2606 ; CHECK-P10-LABEL: ld_align64_uint32_t_int8_t:
2607 ; CHECK-P10: # %bb.0: # %entry
2608 ; CHECK-P10-NEXT: pli r4, 244140625
2609 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2610 ; CHECK-P10-NEXT: lbzx r3, r3, r4
2611 ; CHECK-P10-NEXT: extsb r3, r3
2612 ; CHECK-P10-NEXT: clrldi r3, r3, 32
2613 ; CHECK-P10-NEXT: blr
2615 ; CHECK-PREP10-LABEL: ld_align64_uint32_t_int8_t:
2616 ; CHECK-PREP10: # %bb.0: # %entry
2617 ; CHECK-PREP10-NEXT: lis r4, 3725
2618 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2619 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2620 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
2621 ; CHECK-PREP10-NEXT: extsb r3, r3
2622 ; CHECK-PREP10-NEXT: clrldi r3, r3, 32
2623 ; CHECK-PREP10-NEXT: blr
2625 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
2626 %0 = load i8, ptr %add.ptr, align 1
2627 %conv = sext i8 %0 to i32
2631 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2632 define dso_local zeroext i32 @ld_reg_uint32_t_int8_t(ptr nocapture readonly %ptr, i64 %off) {
2633 ; CHECK-LABEL: ld_reg_uint32_t_int8_t:
2634 ; CHECK: # %bb.0: # %entry
2635 ; CHECK-NEXT: lbzx r3, r3, r4
2636 ; CHECK-NEXT: extsb r3, r3
2637 ; CHECK-NEXT: clrldi r3, r3, 32
2640 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
2641 %0 = load i8, ptr %add.ptr, align 1
2642 %conv = sext i8 %0 to i32
2646 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2647 define dso_local zeroext i32 @ld_or_uint32_t_int8_t(i64 %ptr, i8 zeroext %off) {
2648 ; CHECK-LABEL: ld_or_uint32_t_int8_t:
2649 ; CHECK: # %bb.0: # %entry
2650 ; CHECK-NEXT: or r3, r4, r3
2651 ; CHECK-NEXT: lbz r3, 0(r3)
2652 ; CHECK-NEXT: extsb r3, r3
2653 ; CHECK-NEXT: clrldi r3, r3, 32
2656 %conv = zext i8 %off to i64
2657 %or = or i64 %conv, %ptr
2658 %0 = inttoptr i64 %or to ptr
2659 %1 = load i8, ptr %0, align 1
2660 %conv1 = sext i8 %1 to i32
2664 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2665 define dso_local zeroext i32 @ld_not_disjoint16_uint32_t_int8_t(i64 %ptr) {
2666 ; CHECK-LABEL: ld_not_disjoint16_uint32_t_int8_t:
2667 ; CHECK: # %bb.0: # %entry
2668 ; CHECK-NEXT: ori r3, r3, 6
2669 ; CHECK-NEXT: lbz r3, 0(r3)
2670 ; CHECK-NEXT: extsb r3, r3
2671 ; CHECK-NEXT: clrldi r3, r3, 32
2674 %or = or i64 %ptr, 6
2675 %0 = inttoptr i64 %or to ptr
2676 %1 = load i8, ptr %0, align 1
2677 %conv = sext i8 %1 to i32
2681 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2682 define dso_local zeroext i32 @ld_disjoint_align16_uint32_t_int8_t(i64 %ptr) {
2683 ; CHECK-LABEL: ld_disjoint_align16_uint32_t_int8_t:
2684 ; CHECK: # %bb.0: # %entry
2685 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2686 ; CHECK-NEXT: lbz r3, 24(r3)
2687 ; CHECK-NEXT: extsb r3, r3
2688 ; CHECK-NEXT: clrldi r3, r3, 32
2691 %and = and i64 %ptr, -4096
2692 %or = or i64 %and, 24
2693 %0 = inttoptr i64 %or to ptr
2694 %1 = load i8, ptr %0, align 8
2695 %conv = sext i8 %1 to i32
2699 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2700 define dso_local zeroext i32 @ld_not_disjoint32_uint32_t_int8_t(i64 %ptr) {
2701 ; CHECK-LABEL: ld_not_disjoint32_uint32_t_int8_t:
2702 ; CHECK: # %bb.0: # %entry
2703 ; CHECK-NEXT: ori r3, r3, 34463
2704 ; CHECK-NEXT: oris r3, r3, 1
2705 ; CHECK-NEXT: lbz r3, 0(r3)
2706 ; CHECK-NEXT: extsb r3, r3
2707 ; CHECK-NEXT: clrldi r3, r3, 32
2710 %or = or i64 %ptr, 99999
2711 %0 = inttoptr i64 %or to ptr
2712 %1 = load i8, ptr %0, align 1
2713 %conv = sext i8 %1 to i32
2717 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2718 define dso_local zeroext i32 @ld_disjoint_align32_uint32_t_int8_t(i64 %ptr) {
2719 ; CHECK-P10-LABEL: ld_disjoint_align32_uint32_t_int8_t:
2720 ; CHECK-P10: # %bb.0: # %entry
2721 ; CHECK-P10-NEXT: lis r4, -15264
2722 ; CHECK-P10-NEXT: and r3, r3, r4
2723 ; CHECK-P10-NEXT: plbz r3, 999990000(r3), 0
2724 ; CHECK-P10-NEXT: extsb r3, r3
2725 ; CHECK-P10-NEXT: clrldi r3, r3, 32
2726 ; CHECK-P10-NEXT: blr
2728 ; CHECK-PREP10-LABEL: ld_disjoint_align32_uint32_t_int8_t:
2729 ; CHECK-PREP10: # %bb.0: # %entry
2730 ; CHECK-PREP10-NEXT: lis r4, -15264
2731 ; CHECK-PREP10-NEXT: and r3, r3, r4
2732 ; CHECK-PREP10-NEXT: lis r4, 15258
2733 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
2734 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
2735 ; CHECK-PREP10-NEXT: extsb r3, r3
2736 ; CHECK-PREP10-NEXT: clrldi r3, r3, 32
2737 ; CHECK-PREP10-NEXT: blr
2739 %and = and i64 %ptr, -1000341504
2740 %or = or i64 %and, 999990000
2741 %0 = inttoptr i64 %or to ptr
2742 %1 = load i8, ptr %0, align 16
2743 %conv = sext i8 %1 to i32
2747 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2748 define dso_local zeroext i32 @ld_not_disjoint64_uint32_t_int8_t(i64 %ptr) {
2749 ; CHECK-P10-LABEL: ld_not_disjoint64_uint32_t_int8_t:
2750 ; CHECK-P10: # %bb.0: # %entry
2751 ; CHECK-P10-NEXT: pli r4, 232
2752 ; CHECK-P10-NEXT: pli r5, 3567587329
2753 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2754 ; CHECK-P10-NEXT: or r3, r3, r5
2755 ; CHECK-P10-NEXT: lbz r3, 0(r3)
2756 ; CHECK-P10-NEXT: extsb r3, r3
2757 ; CHECK-P10-NEXT: clrldi r3, r3, 32
2758 ; CHECK-P10-NEXT: blr
2760 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint32_t_int8_t:
2761 ; CHECK-PREP10: # %bb.0: # %entry
2762 ; CHECK-PREP10-NEXT: li r4, 29
2763 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2764 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2765 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2766 ; CHECK-PREP10-NEXT: or r3, r3, r4
2767 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
2768 ; CHECK-PREP10-NEXT: extsb r3, r3
2769 ; CHECK-PREP10-NEXT: clrldi r3, r3, 32
2770 ; CHECK-PREP10-NEXT: blr
2772 %or = or i64 %ptr, 1000000000001
2773 %0 = inttoptr i64 %or to ptr
2774 %1 = load i8, ptr %0, align 1
2775 %conv = sext i8 %1 to i32
2779 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2780 define dso_local zeroext i32 @ld_disjoint_align64_uint32_t_int8_t(i64 %ptr) {
2781 ; CHECK-P10-LABEL: ld_disjoint_align64_uint32_t_int8_t:
2782 ; CHECK-P10: # %bb.0: # %entry
2783 ; CHECK-P10-NEXT: pli r4, 244140625
2784 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
2785 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2786 ; CHECK-P10-NEXT: lbzx r3, r3, r4
2787 ; CHECK-P10-NEXT: extsb r3, r3
2788 ; CHECK-P10-NEXT: clrldi r3, r3, 32
2789 ; CHECK-P10-NEXT: blr
2791 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint32_t_int8_t:
2792 ; CHECK-PREP10: # %bb.0: # %entry
2793 ; CHECK-PREP10-NEXT: lis r4, 3725
2794 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
2795 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2796 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2797 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
2798 ; CHECK-PREP10-NEXT: extsb r3, r3
2799 ; CHECK-PREP10-NEXT: clrldi r3, r3, 32
2800 ; CHECK-PREP10-NEXT: blr
2802 %and = and i64 %ptr, -1099511627776
2803 %or = or i64 %and, 1000000000000
2804 %0 = inttoptr i64 %or to ptr
2805 %1 = load i8, ptr %0, align 4096
2806 %conv = sext i8 %1 to i32
2810 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2811 define dso_local zeroext i32 @ld_cst_align16_uint32_t_int8_t() {
2812 ; CHECK-LABEL: ld_cst_align16_uint32_t_int8_t:
2813 ; CHECK: # %bb.0: # %entry
2814 ; CHECK-NEXT: lbz r3, 4080(0)
2815 ; CHECK-NEXT: extsb r3, r3
2816 ; CHECK-NEXT: clrldi r3, r3, 32
2819 %0 = load i8, ptr inttoptr (i64 4080 to ptr), align 16
2820 %conv = sext i8 %0 to i32
2824 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2825 define dso_local zeroext i32 @ld_cst_align32_uint32_t_int8_t() {
2826 ; CHECK-LABEL: ld_cst_align32_uint32_t_int8_t:
2827 ; CHECK: # %bb.0: # %entry
2828 ; CHECK-NEXT: lis r3, 153
2829 ; CHECK-NEXT: lbz r3, -27108(r3)
2830 ; CHECK-NEXT: extsb r3, r3
2831 ; CHECK-NEXT: clrldi r3, r3, 32
2834 %0 = load i8, ptr inttoptr (i64 9999900 to ptr), align 4
2835 %conv = sext i8 %0 to i32
2839 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2840 define dso_local zeroext i32 @ld_cst_align64_uint32_t_int8_t() {
2841 ; CHECK-P10-LABEL: ld_cst_align64_uint32_t_int8_t:
2842 ; CHECK-P10: # %bb.0: # %entry
2843 ; CHECK-P10-NEXT: pli r3, 244140625
2844 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
2845 ; CHECK-P10-NEXT: lbz r3, 0(r3)
2846 ; CHECK-P10-NEXT: extsb r3, r3
2847 ; CHECK-P10-NEXT: clrldi r3, r3, 32
2848 ; CHECK-P10-NEXT: blr
2850 ; CHECK-PREP10-LABEL: ld_cst_align64_uint32_t_int8_t:
2851 ; CHECK-PREP10: # %bb.0: # %entry
2852 ; CHECK-PREP10-NEXT: lis r3, 3725
2853 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
2854 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
2855 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
2856 ; CHECK-PREP10-NEXT: extsb r3, r3
2857 ; CHECK-PREP10-NEXT: clrldi r3, r3, 32
2858 ; CHECK-PREP10-NEXT: blr
2860 %0 = load i8, ptr inttoptr (i64 1000000000000 to ptr), align 4096
2861 %conv = sext i8 %0 to i32
2865 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2866 define dso_local zeroext i32 @ld_0_uint32_t_uint16_t(i64 %ptr) {
2867 ; CHECK-LABEL: ld_0_uint32_t_uint16_t:
2868 ; CHECK: # %bb.0: # %entry
2869 ; CHECK-NEXT: lhz r3, 0(r3)
2872 %0 = inttoptr i64 %ptr to ptr
2873 %1 = load i16, ptr %0, align 2
2874 %conv = zext i16 %1 to i32
2878 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2879 define dso_local zeroext i32 @ld_align16_uint32_t_uint16_t(ptr nocapture readonly %ptr) {
2880 ; CHECK-LABEL: ld_align16_uint32_t_uint16_t:
2881 ; CHECK: # %bb.0: # %entry
2882 ; CHECK-NEXT: lhz r3, 8(r3)
2885 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
2886 %0 = load i16, ptr %add.ptr, align 2
2887 %conv = zext i16 %0 to i32
2891 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2892 define dso_local zeroext i32 @ld_align32_uint32_t_uint16_t(ptr nocapture readonly %ptr) {
2893 ; CHECK-P10-LABEL: ld_align32_uint32_t_uint16_t:
2894 ; CHECK-P10: # %bb.0: # %entry
2895 ; CHECK-P10-NEXT: plhz r3, 99999000(r3), 0
2896 ; CHECK-P10-NEXT: blr
2898 ; CHECK-PREP10-LABEL: ld_align32_uint32_t_uint16_t:
2899 ; CHECK-PREP10: # %bb.0: # %entry
2900 ; CHECK-PREP10-NEXT: lis r4, 1525
2901 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
2902 ; CHECK-PREP10-NEXT: lhzx r3, r3, r4
2903 ; CHECK-PREP10-NEXT: blr
2905 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
2906 %0 = load i16, ptr %add.ptr, align 2
2907 %conv = zext i16 %0 to i32
2911 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2912 define dso_local zeroext i32 @ld_align64_uint32_t_uint16_t(ptr nocapture readonly %ptr) {
2913 ; CHECK-P10-LABEL: ld_align64_uint32_t_uint16_t:
2914 ; CHECK-P10: # %bb.0: # %entry
2915 ; CHECK-P10-NEXT: pli r4, 244140625
2916 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2917 ; CHECK-P10-NEXT: lhzx r3, r3, r4
2918 ; CHECK-P10-NEXT: blr
2920 ; CHECK-PREP10-LABEL: ld_align64_uint32_t_uint16_t:
2921 ; CHECK-PREP10: # %bb.0: # %entry
2922 ; CHECK-PREP10-NEXT: lis r4, 3725
2923 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2924 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2925 ; CHECK-PREP10-NEXT: lhzx r3, r3, r4
2926 ; CHECK-PREP10-NEXT: blr
2928 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
2929 %0 = load i16, ptr %add.ptr, align 2
2930 %conv = zext i16 %0 to i32
2934 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2935 define dso_local zeroext i32 @ld_reg_uint32_t_uint16_t(ptr nocapture readonly %ptr, i64 %off) {
2936 ; CHECK-LABEL: ld_reg_uint32_t_uint16_t:
2937 ; CHECK: # %bb.0: # %entry
2938 ; CHECK-NEXT: lhzx r3, r3, r4
2941 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
2942 %0 = load i16, ptr %add.ptr, align 2
2943 %conv = zext i16 %0 to i32
2947 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2948 define dso_local zeroext i32 @ld_or_uint32_t_uint16_t(i64 %ptr, i8 zeroext %off) {
2949 ; CHECK-LABEL: ld_or_uint32_t_uint16_t:
2950 ; CHECK: # %bb.0: # %entry
2951 ; CHECK-NEXT: or r3, r4, r3
2952 ; CHECK-NEXT: lhz r3, 0(r3)
2955 %conv = zext i8 %off to i64
2956 %or = or i64 %conv, %ptr
2957 %0 = inttoptr i64 %or to ptr
2958 %1 = load i16, ptr %0, align 2
2959 %conv1 = zext i16 %1 to i32
2963 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2964 define dso_local zeroext i32 @ld_not_disjoint16_uint32_t_uint16_t(i64 %ptr) {
2965 ; CHECK-LABEL: ld_not_disjoint16_uint32_t_uint16_t:
2966 ; CHECK: # %bb.0: # %entry
2967 ; CHECK-NEXT: ori r3, r3, 6
2968 ; CHECK-NEXT: lhz r3, 0(r3)
2971 %or = or i64 %ptr, 6
2972 %0 = inttoptr i64 %or to ptr
2973 %1 = load i16, ptr %0, align 2
2974 %conv = zext i16 %1 to i32
2978 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2979 define dso_local zeroext i32 @ld_disjoint_align16_uint32_t_uint16_t(i64 %ptr) {
2980 ; CHECK-LABEL: ld_disjoint_align16_uint32_t_uint16_t:
2981 ; CHECK: # %bb.0: # %entry
2982 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2983 ; CHECK-NEXT: lhz r3, 24(r3)
2986 %and = and i64 %ptr, -4096
2987 %or = or i64 %and, 24
2988 %0 = inttoptr i64 %or to ptr
2989 %1 = load i16, ptr %0, align 8
2990 %conv = zext i16 %1 to i32
2994 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2995 define dso_local zeroext i32 @ld_not_disjoint32_uint32_t_uint16_t(i64 %ptr) {
2996 ; CHECK-LABEL: ld_not_disjoint32_uint32_t_uint16_t:
2997 ; CHECK: # %bb.0: # %entry
2998 ; CHECK-NEXT: ori r3, r3, 34463
2999 ; CHECK-NEXT: oris r3, r3, 1
3000 ; CHECK-NEXT: lhz r3, 0(r3)
3003 %or = or i64 %ptr, 99999
3004 %0 = inttoptr i64 %or to ptr
3005 %1 = load i16, ptr %0, align 2
3006 %conv = zext i16 %1 to i32
3010 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3011 define dso_local zeroext i32 @ld_disjoint_align32_uint32_t_uint16_t(i64 %ptr) {
3012 ; CHECK-P10-LABEL: ld_disjoint_align32_uint32_t_uint16_t:
3013 ; CHECK-P10: # %bb.0: # %entry
3014 ; CHECK-P10-NEXT: lis r4, -15264
3015 ; CHECK-P10-NEXT: and r3, r3, r4
3016 ; CHECK-P10-NEXT: plhz r3, 999990000(r3), 0
3017 ; CHECK-P10-NEXT: blr
3019 ; CHECK-PREP10-LABEL: ld_disjoint_align32_uint32_t_uint16_t:
3020 ; CHECK-PREP10: # %bb.0: # %entry
3021 ; CHECK-PREP10-NEXT: lis r4, -15264
3022 ; CHECK-PREP10-NEXT: and r3, r3, r4
3023 ; CHECK-PREP10-NEXT: lis r4, 15258
3024 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
3025 ; CHECK-PREP10-NEXT: lhzx r3, r3, r4
3026 ; CHECK-PREP10-NEXT: blr
3028 %and = and i64 %ptr, -1000341504
3029 %or = or i64 %and, 999990000
3030 %0 = inttoptr i64 %or to ptr
3031 %1 = load i16, ptr %0, align 16
3032 %conv = zext i16 %1 to i32
3036 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3037 define dso_local zeroext i32 @ld_not_disjoint64_uint32_t_uint16_t(i64 %ptr) {
3038 ; CHECK-P10-LABEL: ld_not_disjoint64_uint32_t_uint16_t:
3039 ; CHECK-P10: # %bb.0: # %entry
3040 ; CHECK-P10-NEXT: pli r4, 232
3041 ; CHECK-P10-NEXT: pli r5, 3567587329
3042 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
3043 ; CHECK-P10-NEXT: or r3, r3, r5
3044 ; CHECK-P10-NEXT: lhz r3, 0(r3)
3045 ; CHECK-P10-NEXT: blr
3047 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint32_t_uint16_t:
3048 ; CHECK-PREP10: # %bb.0: # %entry
3049 ; CHECK-PREP10-NEXT: li r4, 29
3050 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
3051 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
3052 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
3053 ; CHECK-PREP10-NEXT: or r3, r3, r4
3054 ; CHECK-PREP10-NEXT: lhz r3, 0(r3)
3055 ; CHECK-PREP10-NEXT: blr
3057 %or = or i64 %ptr, 1000000000001
3058 %0 = inttoptr i64 %or to ptr
3059 %1 = load i16, ptr %0, align 2
3060 %conv = zext i16 %1 to i32
3064 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3065 define dso_local zeroext i32 @ld_disjoint_align64_uint32_t_uint16_t(i64 %ptr) {
3066 ; CHECK-P10-LABEL: ld_disjoint_align64_uint32_t_uint16_t:
3067 ; CHECK-P10: # %bb.0: # %entry
3068 ; CHECK-P10-NEXT: pli r4, 244140625
3069 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
3070 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
3071 ; CHECK-P10-NEXT: lhzx r3, r3, r4
3072 ; CHECK-P10-NEXT: blr
3074 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint32_t_uint16_t:
3075 ; CHECK-PREP10: # %bb.0: # %entry
3076 ; CHECK-PREP10-NEXT: lis r4, 3725
3077 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
3078 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
3079 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
3080 ; CHECK-PREP10-NEXT: lhzx r3, r3, r4
3081 ; CHECK-PREP10-NEXT: blr
3083 %and = and i64 %ptr, -1099511627776
3084 %or = or i64 %and, 1000000000000
3085 %0 = inttoptr i64 %or to ptr
3086 %1 = load i16, ptr %0, align 4096
3087 %conv = zext i16 %1 to i32
3091 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3092 define dso_local zeroext i32 @ld_cst_align16_uint32_t_uint16_t() {
3093 ; CHECK-LABEL: ld_cst_align16_uint32_t_uint16_t:
3094 ; CHECK: # %bb.0: # %entry
3095 ; CHECK-NEXT: lhz r3, 4080(0)
3098 %0 = load i16, ptr inttoptr (i64 4080 to ptr), align 16
3099 %conv = zext i16 %0 to i32
3103 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3104 define dso_local zeroext i32 @ld_cst_align32_uint32_t_uint16_t() {
3105 ; CHECK-LABEL: ld_cst_align32_uint32_t_uint16_t:
3106 ; CHECK: # %bb.0: # %entry
3107 ; CHECK-NEXT: lis r3, 153
3108 ; CHECK-NEXT: lhz r3, -27108(r3)
3111 %0 = load i16, ptr inttoptr (i64 9999900 to ptr), align 4
3112 %conv = zext i16 %0 to i32
3116 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3117 define dso_local zeroext i32 @ld_cst_align64_uint32_t_uint16_t() {
3118 ; CHECK-P10-LABEL: ld_cst_align64_uint32_t_uint16_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: lhz r3, 0(r3)
3123 ; CHECK-P10-NEXT: blr
3125 ; CHECK-PREP10-LABEL: ld_cst_align64_uint32_t_uint16_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: lhz r3, 0(r3)
3131 ; CHECK-PREP10-NEXT: blr
3133 %0 = load i16, ptr inttoptr (i64 1000000000000 to ptr), align 4096
3134 %conv = zext i16 %0 to i32
3138 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3139 define dso_local zeroext i32 @ld_0_uint32_t_int16_t(i64 %ptr) {
3140 ; CHECK-LABEL: ld_0_uint32_t_int16_t:
3141 ; CHECK: # %bb.0: # %entry
3142 ; CHECK-NEXT: lha r3, 0(r3)
3143 ; CHECK-NEXT: clrldi r3, r3, 32
3146 %0 = inttoptr i64 %ptr to ptr
3147 %1 = load i16, ptr %0, align 2
3148 %conv = sext i16 %1 to i32
3152 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3153 define dso_local zeroext i32 @ld_align16_uint32_t_int16_t(ptr nocapture readonly %ptr) {
3154 ; CHECK-LABEL: ld_align16_uint32_t_int16_t:
3155 ; CHECK: # %bb.0: # %entry
3156 ; CHECK-NEXT: lha r3, 8(r3)
3157 ; CHECK-NEXT: clrldi r3, r3, 32
3160 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
3161 %0 = load i16, ptr %add.ptr, align 2
3162 %conv = sext i16 %0 to i32
3166 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3167 define dso_local zeroext i32 @ld_align32_uint32_t_int16_t(ptr nocapture readonly %ptr) {
3168 ; CHECK-P10-LABEL: ld_align32_uint32_t_int16_t:
3169 ; CHECK-P10: # %bb.0: # %entry
3170 ; CHECK-P10-NEXT: plha r3, 99999000(r3), 0
3171 ; CHECK-P10-NEXT: clrldi r3, r3, 32
3172 ; CHECK-P10-NEXT: blr
3174 ; CHECK-PREP10-LABEL: ld_align32_uint32_t_int16_t:
3175 ; CHECK-PREP10: # %bb.0: # %entry
3176 ; CHECK-PREP10-NEXT: lis r4, 1525
3177 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
3178 ; CHECK-PREP10-NEXT: lhax r3, r3, r4
3179 ; CHECK-PREP10-NEXT: clrldi r3, r3, 32
3180 ; CHECK-PREP10-NEXT: blr
3182 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
3183 %0 = load i16, ptr %add.ptr, align 2
3184 %conv = sext i16 %0 to i32
3188 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3189 define dso_local zeroext i32 @ld_align64_uint32_t_int16_t(ptr nocapture readonly %ptr) {
3190 ; CHECK-P10-LABEL: ld_align64_uint32_t_int16_t:
3191 ; CHECK-P10: # %bb.0: # %entry
3192 ; CHECK-P10-NEXT: pli r4, 244140625
3193 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
3194 ; CHECK-P10-NEXT: lhax r3, r3, r4
3195 ; CHECK-P10-NEXT: clrldi r3, r3, 32
3196 ; CHECK-P10-NEXT: blr
3198 ; CHECK-PREP10-LABEL: ld_align64_uint32_t_int16_t:
3199 ; CHECK-PREP10: # %bb.0: # %entry
3200 ; CHECK-PREP10-NEXT: lis r4, 3725
3201 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
3202 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
3203 ; CHECK-PREP10-NEXT: lhax r3, r3, r4
3204 ; CHECK-PREP10-NEXT: clrldi r3, r3, 32
3205 ; CHECK-PREP10-NEXT: blr
3207 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
3208 %0 = load i16, ptr %add.ptr, align 2
3209 %conv = sext i16 %0 to i32
3213 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3214 define dso_local zeroext i32 @ld_reg_uint32_t_int16_t(ptr nocapture readonly %ptr, i64 %off) {
3215 ; CHECK-LABEL: ld_reg_uint32_t_int16_t:
3216 ; CHECK: # %bb.0: # %entry
3217 ; CHECK-NEXT: lhax r3, r3, r4
3218 ; CHECK-NEXT: clrldi r3, r3, 32
3221 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
3222 %0 = load i16, ptr %add.ptr, align 2
3223 %conv = sext i16 %0 to i32
3227 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3228 define dso_local zeroext i32 @ld_or_uint32_t_int16_t(i64 %ptr, i8 zeroext %off) {
3229 ; CHECK-LABEL: ld_or_uint32_t_int16_t:
3230 ; CHECK: # %bb.0: # %entry
3231 ; CHECK-NEXT: or r3, r4, r3
3232 ; CHECK-NEXT: lha r3, 0(r3)
3233 ; CHECK-NEXT: clrldi r3, r3, 32
3236 %conv = zext i8 %off to i64
3237 %or = or i64 %conv, %ptr
3238 %0 = inttoptr i64 %or to ptr
3239 %1 = load i16, ptr %0, align 2
3240 %conv1 = sext i16 %1 to i32
3244 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3245 define dso_local zeroext i32 @ld_not_disjoint16_uint32_t_int16_t(i64 %ptr) {
3246 ; CHECK-LABEL: ld_not_disjoint16_uint32_t_int16_t:
3247 ; CHECK: # %bb.0: # %entry
3248 ; CHECK-NEXT: ori r3, r3, 6
3249 ; CHECK-NEXT: lha r3, 0(r3)
3250 ; CHECK-NEXT: clrldi r3, r3, 32
3253 %or = or i64 %ptr, 6
3254 %0 = inttoptr i64 %or to ptr
3255 %1 = load i16, ptr %0, align 2
3256 %conv = sext i16 %1 to i32
3260 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3261 define dso_local zeroext i32 @ld_disjoint_align16_uint32_t_int16_t(i64 %ptr) {
3262 ; CHECK-LABEL: ld_disjoint_align16_uint32_t_int16_t:
3263 ; CHECK: # %bb.0: # %entry
3264 ; CHECK-NEXT: rldicr r3, r3, 0, 51
3265 ; CHECK-NEXT: lha r3, 24(r3)
3266 ; CHECK-NEXT: clrldi r3, r3, 32
3269 %and = and i64 %ptr, -4096
3270 %or = or i64 %and, 24
3271 %0 = inttoptr i64 %or to ptr
3272 %1 = load i16, ptr %0, align 8
3273 %conv = sext i16 %1 to i32
3277 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3278 define dso_local zeroext i32 @ld_not_disjoint32_uint32_t_int16_t(i64 %ptr) {
3279 ; CHECK-LABEL: ld_not_disjoint32_uint32_t_int16_t:
3280 ; CHECK: # %bb.0: # %entry
3281 ; CHECK-NEXT: ori r3, r3, 34463
3282 ; CHECK-NEXT: oris r3, r3, 1
3283 ; CHECK-NEXT: lha r3, 0(r3)
3284 ; CHECK-NEXT: clrldi r3, r3, 32
3287 %or = or i64 %ptr, 99999
3288 %0 = inttoptr i64 %or to ptr
3289 %1 = load i16, ptr %0, align 2
3290 %conv = sext i16 %1 to i32
3294 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3295 define dso_local zeroext i32 @ld_disjoint_align32_uint32_t_int16_t(i64 %ptr) {
3296 ; CHECK-P10-LABEL: ld_disjoint_align32_uint32_t_int16_t:
3297 ; CHECK-P10: # %bb.0: # %entry
3298 ; CHECK-P10-NEXT: lis r4, -15264
3299 ; CHECK-P10-NEXT: and r3, r3, r4
3300 ; CHECK-P10-NEXT: plha r3, 999990000(r3), 0
3301 ; CHECK-P10-NEXT: clrldi r3, r3, 32
3302 ; CHECK-P10-NEXT: blr
3304 ; CHECK-PREP10-LABEL: ld_disjoint_align32_uint32_t_int16_t:
3305 ; CHECK-PREP10: # %bb.0: # %entry
3306 ; CHECK-PREP10-NEXT: lis r4, -15264
3307 ; CHECK-PREP10-NEXT: and r3, r3, r4
3308 ; CHECK-PREP10-NEXT: lis r4, 15258
3309 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
3310 ; CHECK-PREP10-NEXT: lhax r3, r3, r4
3311 ; CHECK-PREP10-NEXT: clrldi r3, r3, 32
3312 ; CHECK-PREP10-NEXT: blr
3314 %and = and i64 %ptr, -1000341504
3315 %or = or i64 %and, 999990000
3316 %0 = inttoptr i64 %or to ptr
3317 %1 = load i16, ptr %0, align 16
3318 %conv = sext i16 %1 to i32
3322 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3323 define dso_local zeroext i32 @ld_not_disjoint64_uint32_t_int16_t(i64 %ptr) {
3324 ; CHECK-P10-LABEL: ld_not_disjoint64_uint32_t_int16_t:
3325 ; CHECK-P10: # %bb.0: # %entry
3326 ; CHECK-P10-NEXT: pli r4, 232
3327 ; CHECK-P10-NEXT: pli r5, 3567587329
3328 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
3329 ; CHECK-P10-NEXT: or r3, r3, r5
3330 ; CHECK-P10-NEXT: lha r3, 0(r3)
3331 ; CHECK-P10-NEXT: clrldi r3, r3, 32
3332 ; CHECK-P10-NEXT: blr
3334 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint32_t_int16_t:
3335 ; CHECK-PREP10: # %bb.0: # %entry
3336 ; CHECK-PREP10-NEXT: li r4, 29
3337 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
3338 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
3339 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
3340 ; CHECK-PREP10-NEXT: or r3, r3, r4
3341 ; CHECK-PREP10-NEXT: lha r3, 0(r3)
3342 ; CHECK-PREP10-NEXT: clrldi r3, r3, 32
3343 ; CHECK-PREP10-NEXT: blr
3345 %or = or i64 %ptr, 1000000000001
3346 %0 = inttoptr i64 %or to ptr
3347 %1 = load i16, ptr %0, align 2
3348 %conv = sext i16 %1 to i32
3352 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3353 define dso_local zeroext i32 @ld_disjoint_align64_uint32_t_int16_t(i64 %ptr) {
3354 ; CHECK-P10-LABEL: ld_disjoint_align64_uint32_t_int16_t:
3355 ; CHECK-P10: # %bb.0: # %entry
3356 ; CHECK-P10-NEXT: pli r4, 244140625
3357 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
3358 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
3359 ; CHECK-P10-NEXT: lhax r3, r3, r4
3360 ; CHECK-P10-NEXT: clrldi r3, r3, 32
3361 ; CHECK-P10-NEXT: blr
3363 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint32_t_int16_t:
3364 ; CHECK-PREP10: # %bb.0: # %entry
3365 ; CHECK-PREP10-NEXT: lis r4, 3725
3366 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
3367 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
3368 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
3369 ; CHECK-PREP10-NEXT: lhax r3, r3, r4
3370 ; CHECK-PREP10-NEXT: clrldi r3, r3, 32
3371 ; CHECK-PREP10-NEXT: blr
3373 %and = and i64 %ptr, -1099511627776
3374 %or = or i64 %and, 1000000000000
3375 %0 = inttoptr i64 %or to ptr
3376 %1 = load i16, ptr %0, align 4096
3377 %conv = sext i16 %1 to i32
3381 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3382 define dso_local zeroext i32 @ld_cst_align16_uint32_t_int16_t() {
3383 ; CHECK-LABEL: ld_cst_align16_uint32_t_int16_t:
3384 ; CHECK: # %bb.0: # %entry
3385 ; CHECK-NEXT: lha r3, 4080(0)
3386 ; CHECK-NEXT: clrldi r3, r3, 32
3389 %0 = load i16, ptr inttoptr (i64 4080 to ptr), align 16
3390 %conv = sext i16 %0 to i32
3394 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3395 define dso_local zeroext i32 @ld_cst_align32_uint32_t_int16_t() {
3396 ; CHECK-LABEL: ld_cst_align32_uint32_t_int16_t:
3397 ; CHECK: # %bb.0: # %entry
3398 ; CHECK-NEXT: lis r3, 153
3399 ; CHECK-NEXT: lha r3, -27108(r3)
3400 ; CHECK-NEXT: clrldi r3, r3, 32
3403 %0 = load i16, ptr inttoptr (i64 9999900 to ptr), align 4
3404 %conv = sext i16 %0 to i32
3408 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3409 define dso_local zeroext i32 @ld_cst_align64_uint32_t_int16_t() {
3410 ; CHECK-P10-LABEL: ld_cst_align64_uint32_t_int16_t:
3411 ; CHECK-P10: # %bb.0: # %entry
3412 ; CHECK-P10-NEXT: pli r3, 244140625
3413 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
3414 ; CHECK-P10-NEXT: lha r3, 0(r3)
3415 ; CHECK-P10-NEXT: clrldi r3, r3, 32
3416 ; CHECK-P10-NEXT: blr
3418 ; CHECK-PREP10-LABEL: ld_cst_align64_uint32_t_int16_t:
3419 ; CHECK-PREP10: # %bb.0: # %entry
3420 ; CHECK-PREP10-NEXT: lis r3, 3725
3421 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
3422 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
3423 ; CHECK-PREP10-NEXT: lha r3, 0(r3)
3424 ; CHECK-PREP10-NEXT: clrldi r3, r3, 32
3425 ; CHECK-PREP10-NEXT: blr
3427 %0 = load i16, ptr inttoptr (i64 1000000000000 to ptr), align 4096
3428 %conv = sext i16 %0 to i32
3432 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3433 define dso_local zeroext i32 @ld_0_uint32_t_uint32_t(i64 %ptr) {
3434 ; CHECK-LABEL: ld_0_uint32_t_uint32_t:
3435 ; CHECK: # %bb.0: # %entry
3436 ; CHECK-NEXT: lwz r3, 0(r3)
3439 %0 = inttoptr i64 %ptr to ptr
3440 %1 = load i32, ptr %0, align 4
3444 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3445 define dso_local zeroext i32 @ld_align16_uint32_t_uint32_t(ptr nocapture readonly %ptr) {
3446 ; CHECK-LABEL: ld_align16_uint32_t_uint32_t:
3447 ; CHECK: # %bb.0: # %entry
3448 ; CHECK-NEXT: lwz r3, 8(r3)
3451 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
3452 %0 = load i32, ptr %add.ptr, align 4
3456 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3457 define dso_local zeroext i32 @ld_align32_uint32_t_uint32_t(ptr nocapture readonly %ptr) {
3458 ; CHECK-P10-LABEL: ld_align32_uint32_t_uint32_t:
3459 ; CHECK-P10: # %bb.0: # %entry
3460 ; CHECK-P10-NEXT: plwz r3, 99999000(r3), 0
3461 ; CHECK-P10-NEXT: blr
3463 ; CHECK-PREP10-LABEL: ld_align32_uint32_t_uint32_t:
3464 ; CHECK-PREP10: # %bb.0: # %entry
3465 ; CHECK-PREP10-NEXT: lis r4, 1525
3466 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
3467 ; CHECK-PREP10-NEXT: lwzx r3, r3, r4
3468 ; CHECK-PREP10-NEXT: blr
3470 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
3471 %0 = load i32, ptr %add.ptr, align 4
3475 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3476 define dso_local zeroext i32 @ld_align64_uint32_t_uint32_t(ptr nocapture readonly %ptr) {
3477 ; CHECK-P10-LABEL: ld_align64_uint32_t_uint32_t:
3478 ; CHECK-P10: # %bb.0: # %entry
3479 ; CHECK-P10-NEXT: pli r4, 244140625
3480 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
3481 ; CHECK-P10-NEXT: lwzx r3, r3, r4
3482 ; CHECK-P10-NEXT: blr
3484 ; CHECK-PREP10-LABEL: ld_align64_uint32_t_uint32_t:
3485 ; CHECK-PREP10: # %bb.0: # %entry
3486 ; CHECK-PREP10-NEXT: lis r4, 3725
3487 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
3488 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
3489 ; CHECK-PREP10-NEXT: lwzx r3, r3, r4
3490 ; CHECK-PREP10-NEXT: blr
3492 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
3493 %0 = load i32, ptr %add.ptr, align 4
3497 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3498 define dso_local zeroext i32 @ld_reg_uint32_t_uint32_t(ptr nocapture readonly %ptr, i64 %off) {
3499 ; CHECK-LABEL: ld_reg_uint32_t_uint32_t:
3500 ; CHECK: # %bb.0: # %entry
3501 ; CHECK-NEXT: lwzx r3, r3, r4
3504 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
3505 %0 = load i32, ptr %add.ptr, align 4
3509 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3510 define dso_local zeroext i32 @ld_or_uint32_t_uint32_t(i64 %ptr, i8 zeroext %off) {
3511 ; CHECK-LABEL: ld_or_uint32_t_uint32_t:
3512 ; CHECK: # %bb.0: # %entry
3513 ; CHECK-NEXT: or r3, r4, r3
3514 ; CHECK-NEXT: lwz r3, 0(r3)
3517 %conv = zext i8 %off to i64
3518 %or = or i64 %conv, %ptr
3519 %0 = inttoptr i64 %or to ptr
3520 %1 = load i32, ptr %0, align 4
3524 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3525 define dso_local zeroext i32 @ld_not_disjoint16_uint32_t_uint32_t(i64 %ptr) {
3526 ; CHECK-LABEL: ld_not_disjoint16_uint32_t_uint32_t:
3527 ; CHECK: # %bb.0: # %entry
3528 ; CHECK-NEXT: ori r3, r3, 6
3529 ; CHECK-NEXT: lwz r3, 0(r3)
3532 %or = or i64 %ptr, 6
3533 %0 = inttoptr i64 %or to ptr
3534 %1 = load i32, ptr %0, align 4
3538 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3539 define dso_local zeroext i32 @ld_disjoint_align16_uint32_t_uint32_t(i64 %ptr) {
3540 ; CHECK-LABEL: ld_disjoint_align16_uint32_t_uint32_t:
3541 ; CHECK: # %bb.0: # %entry
3542 ; CHECK-NEXT: rldicr r3, r3, 0, 51
3543 ; CHECK-NEXT: lwz r3, 24(r3)
3546 %and = and i64 %ptr, -4096
3547 %or = or i64 %and, 24
3548 %0 = inttoptr i64 %or to ptr
3549 %1 = load i32, ptr %0, align 8
3553 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3554 define dso_local zeroext i32 @ld_not_disjoint32_uint32_t_uint32_t(i64 %ptr) {
3555 ; CHECK-LABEL: ld_not_disjoint32_uint32_t_uint32_t:
3556 ; CHECK: # %bb.0: # %entry
3557 ; CHECK-NEXT: ori r3, r3, 34463
3558 ; CHECK-NEXT: oris r3, r3, 1
3559 ; CHECK-NEXT: lwz r3, 0(r3)
3562 %or = or i64 %ptr, 99999
3563 %0 = inttoptr i64 %or to ptr
3564 %1 = load i32, ptr %0, align 4
3568 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3569 define dso_local zeroext i32 @ld_disjoint_align32_uint32_t_uint32_t(i64 %ptr) {
3570 ; CHECK-P10-LABEL: ld_disjoint_align32_uint32_t_uint32_t:
3571 ; CHECK-P10: # %bb.0: # %entry
3572 ; CHECK-P10-NEXT: lis r4, -15264
3573 ; CHECK-P10-NEXT: and r3, r3, r4
3574 ; CHECK-P10-NEXT: plwz r3, 999990000(r3), 0
3575 ; CHECK-P10-NEXT: blr
3577 ; CHECK-PREP10-LABEL: ld_disjoint_align32_uint32_t_uint32_t:
3578 ; CHECK-PREP10: # %bb.0: # %entry
3579 ; CHECK-PREP10-NEXT: lis r4, -15264
3580 ; CHECK-PREP10-NEXT: and r3, r3, r4
3581 ; CHECK-PREP10-NEXT: lis r4, 15258
3582 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
3583 ; CHECK-PREP10-NEXT: lwzx r3, r3, r4
3584 ; CHECK-PREP10-NEXT: blr
3586 %and = and i64 %ptr, -1000341504
3587 %or = or i64 %and, 999990000
3588 %0 = inttoptr i64 %or to ptr
3589 %1 = load i32, ptr %0, align 16
3593 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3594 define dso_local zeroext i32 @ld_not_disjoint64_uint32_t_uint32_t(i64 %ptr) {
3595 ; CHECK-P10-LABEL: ld_not_disjoint64_uint32_t_uint32_t:
3596 ; CHECK-P10: # %bb.0: # %entry
3597 ; CHECK-P10-NEXT: pli r4, 232
3598 ; CHECK-P10-NEXT: pli r5, 3567587329
3599 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
3600 ; CHECK-P10-NEXT: or r3, r3, r5
3601 ; CHECK-P10-NEXT: lwz r3, 0(r3)
3602 ; CHECK-P10-NEXT: blr
3604 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint32_t_uint32_t:
3605 ; CHECK-PREP10: # %bb.0: # %entry
3606 ; CHECK-PREP10-NEXT: li r4, 29
3607 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
3608 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
3609 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
3610 ; CHECK-PREP10-NEXT: or r3, r3, r4
3611 ; CHECK-PREP10-NEXT: lwz r3, 0(r3)
3612 ; CHECK-PREP10-NEXT: blr
3614 %or = or i64 %ptr, 1000000000001
3615 %0 = inttoptr i64 %or to ptr
3616 %1 = load i32, ptr %0, align 4
3620 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3621 define dso_local zeroext i32 @ld_disjoint_align64_uint32_t_uint32_t(i64 %ptr) {
3622 ; CHECK-P10-LABEL: ld_disjoint_align64_uint32_t_uint32_t:
3623 ; CHECK-P10: # %bb.0: # %entry
3624 ; CHECK-P10-NEXT: pli r4, 244140625
3625 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
3626 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
3627 ; CHECK-P10-NEXT: lwzx r3, r3, r4
3628 ; CHECK-P10-NEXT: blr
3630 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint32_t_uint32_t:
3631 ; CHECK-PREP10: # %bb.0: # %entry
3632 ; CHECK-PREP10-NEXT: lis r4, 3725
3633 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
3634 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
3635 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
3636 ; CHECK-PREP10-NEXT: lwzx r3, r3, r4
3637 ; CHECK-PREP10-NEXT: blr
3639 %and = and i64 %ptr, -1099511627776
3640 %or = or i64 %and, 1000000000000
3641 %0 = inttoptr i64 %or to ptr
3642 %1 = load i32, ptr %0, align 4096
3646 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3647 define dso_local zeroext i32 @ld_cst_align16_uint32_t_uint32_t() {
3648 ; CHECK-LABEL: ld_cst_align16_uint32_t_uint32_t:
3649 ; CHECK: # %bb.0: # %entry
3650 ; CHECK-NEXT: lwz r3, 4080(0)
3653 %0 = load i32, ptr inttoptr (i64 4080 to ptr), align 16
3657 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3658 define dso_local zeroext i32 @ld_cst_align32_uint32_t_uint32_t() {
3659 ; CHECK-LABEL: ld_cst_align32_uint32_t_uint32_t:
3660 ; CHECK: # %bb.0: # %entry
3661 ; CHECK-NEXT: lis r3, 153
3662 ; CHECK-NEXT: lwz r3, -27108(r3)
3665 %0 = load i32, ptr inttoptr (i64 9999900 to ptr), align 4
3669 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3670 define dso_local zeroext i32 @ld_cst_align64_uint32_t_uint32_t() {
3671 ; CHECK-P10-LABEL: ld_cst_align64_uint32_t_uint32_t:
3672 ; CHECK-P10: # %bb.0: # %entry
3673 ; CHECK-P10-NEXT: pli r3, 244140625
3674 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
3675 ; CHECK-P10-NEXT: lwz r3, 0(r3)
3676 ; CHECK-P10-NEXT: blr
3678 ; CHECK-PREP10-LABEL: ld_cst_align64_uint32_t_uint32_t:
3679 ; CHECK-PREP10: # %bb.0: # %entry
3680 ; CHECK-PREP10-NEXT: lis r3, 3725
3681 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
3682 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
3683 ; CHECK-PREP10-NEXT: lwz r3, 0(r3)
3684 ; CHECK-PREP10-NEXT: blr
3686 %0 = load i32, ptr inttoptr (i64 1000000000000 to ptr), align 4096
3690 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3691 define dso_local zeroext i32 @ld_0_uint32_t_uint64_t(i64 %ptr) {
3692 ; CHECK-LE-LABEL: ld_0_uint32_t_uint64_t:
3693 ; CHECK-LE: # %bb.0: # %entry
3694 ; CHECK-LE-NEXT: lwz r3, 0(r3)
3695 ; CHECK-LE-NEXT: blr
3697 ; CHECK-BE-LABEL: ld_0_uint32_t_uint64_t:
3698 ; CHECK-BE: # %bb.0: # %entry
3699 ; CHECK-BE-NEXT: lwz r3, 4(r3)
3700 ; CHECK-BE-NEXT: blr
3702 %0 = inttoptr i64 %ptr to ptr
3703 %1 = load i64, ptr %0, align 8
3704 %conv = trunc i64 %1 to i32
3708 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3709 define dso_local zeroext i32 @ld_align16_uint32_t_uint64_t(ptr nocapture readonly %ptr) {
3710 ; CHECK-LE-LABEL: ld_align16_uint32_t_uint64_t:
3711 ; CHECK-LE: # %bb.0: # %entry
3712 ; CHECK-LE-NEXT: lwz r3, 8(r3)
3713 ; CHECK-LE-NEXT: blr
3715 ; CHECK-BE-LABEL: ld_align16_uint32_t_uint64_t:
3716 ; CHECK-BE: # %bb.0: # %entry
3717 ; CHECK-BE-NEXT: lwz r3, 12(r3)
3718 ; CHECK-BE-NEXT: blr
3720 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
3721 %0 = load i64, ptr %add.ptr, align 8
3722 %conv = trunc i64 %0 to i32
3726 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3727 define dso_local zeroext i32 @ld_align32_uint32_t_uint64_t(ptr nocapture readonly %ptr) {
3728 ; CHECK-P10-LE-LABEL: ld_align32_uint32_t_uint64_t:
3729 ; CHECK-P10-LE: # %bb.0: # %entry
3730 ; CHECK-P10-LE-NEXT: plwz r3, 99999000(r3), 0
3731 ; CHECK-P10-LE-NEXT: blr
3733 ; CHECK-P10-BE-LABEL: ld_align32_uint32_t_uint64_t:
3734 ; CHECK-P10-BE: # %bb.0: # %entry
3735 ; CHECK-P10-BE-NEXT: plwz r3, 99999004(r3), 0
3736 ; CHECK-P10-BE-NEXT: blr
3738 ; CHECK-P9-LE-LABEL: ld_align32_uint32_t_uint64_t:
3739 ; CHECK-P9-LE: # %bb.0: # %entry
3740 ; CHECK-P9-LE-NEXT: lis r4, 1525
3741 ; CHECK-P9-LE-NEXT: ori r4, r4, 56600
3742 ; CHECK-P9-LE-NEXT: lwzx r3, r3, r4
3743 ; CHECK-P9-LE-NEXT: blr
3745 ; CHECK-P9-BE-LABEL: ld_align32_uint32_t_uint64_t:
3746 ; CHECK-P9-BE: # %bb.0: # %entry
3747 ; CHECK-P9-BE-NEXT: lis r4, 1525
3748 ; CHECK-P9-BE-NEXT: ori r4, r4, 56604
3749 ; CHECK-P9-BE-NEXT: lwzx r3, r3, r4
3750 ; CHECK-P9-BE-NEXT: blr
3752 ; CHECK-P8-LE-LABEL: ld_align32_uint32_t_uint64_t:
3753 ; CHECK-P8-LE: # %bb.0: # %entry
3754 ; CHECK-P8-LE-NEXT: lis r4, 1525
3755 ; CHECK-P8-LE-NEXT: ori r4, r4, 56600
3756 ; CHECK-P8-LE-NEXT: lwzx r3, r3, r4
3757 ; CHECK-P8-LE-NEXT: blr
3759 ; CHECK-P8-BE-LABEL: ld_align32_uint32_t_uint64_t:
3760 ; CHECK-P8-BE: # %bb.0: # %entry
3761 ; CHECK-P8-BE-NEXT: lis r4, 1525
3762 ; CHECK-P8-BE-NEXT: ori r4, r4, 56604
3763 ; CHECK-P8-BE-NEXT: lwzx r3, r3, r4
3764 ; CHECK-P8-BE-NEXT: blr
3766 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
3767 %0 = load i64, ptr %add.ptr, align 8
3768 %conv = trunc i64 %0 to i32
3772 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3773 define dso_local zeroext i32 @ld_align64_uint32_t_uint64_t(ptr nocapture readonly %ptr) {
3774 ; CHECK-P10-LE-LABEL: ld_align64_uint32_t_uint64_t:
3775 ; CHECK-P10-LE: # %bb.0: # %entry
3776 ; CHECK-P10-LE-NEXT: pli r4, 244140625
3777 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
3778 ; CHECK-P10-LE-NEXT: lwzx r3, r3, r4
3779 ; CHECK-P10-LE-NEXT: blr
3781 ; CHECK-P10-BE-LABEL: ld_align64_uint32_t_uint64_t:
3782 ; CHECK-P10-BE: # %bb.0: # %entry
3783 ; CHECK-P10-BE-NEXT: pli r4, 232
3784 ; CHECK-P10-BE-NEXT: pli r5, 3567587332
3785 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
3786 ; CHECK-P10-BE-NEXT: lwzx r3, r3, r5
3787 ; CHECK-P10-BE-NEXT: blr
3789 ; CHECK-P9-LE-LABEL: ld_align64_uint32_t_uint64_t:
3790 ; CHECK-P9-LE: # %bb.0: # %entry
3791 ; CHECK-P9-LE-NEXT: lis r4, 3725
3792 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
3793 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
3794 ; CHECK-P9-LE-NEXT: lwzx r3, r3, r4
3795 ; CHECK-P9-LE-NEXT: blr
3797 ; CHECK-P9-BE-LABEL: ld_align64_uint32_t_uint64_t:
3798 ; CHECK-P9-BE: # %bb.0: # %entry
3799 ; CHECK-P9-BE-NEXT: li r4, 29
3800 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
3801 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
3802 ; CHECK-P9-BE-NEXT: ori r4, r4, 4100
3803 ; CHECK-P9-BE-NEXT: lwzx r3, r3, r4
3804 ; CHECK-P9-BE-NEXT: blr
3806 ; CHECK-P8-LE-LABEL: ld_align64_uint32_t_uint64_t:
3807 ; CHECK-P8-LE: # %bb.0: # %entry
3808 ; CHECK-P8-LE-NEXT: lis r4, 3725
3809 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
3810 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
3811 ; CHECK-P8-LE-NEXT: lwzx r3, r3, r4
3812 ; CHECK-P8-LE-NEXT: blr
3814 ; CHECK-P8-BE-LABEL: ld_align64_uint32_t_uint64_t:
3815 ; CHECK-P8-BE: # %bb.0: # %entry
3816 ; CHECK-P8-BE-NEXT: li r4, 29
3817 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
3818 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
3819 ; CHECK-P8-BE-NEXT: ori r4, r4, 4100
3820 ; CHECK-P8-BE-NEXT: lwzx r3, r3, r4
3821 ; CHECK-P8-BE-NEXT: blr
3823 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
3824 %0 = load i64, ptr %add.ptr, align 8
3825 %conv = trunc i64 %0 to i32
3829 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3830 define dso_local zeroext i32 @ld_reg_uint32_t_uint64_t(ptr nocapture readonly %ptr, i64 %off) {
3831 ; CHECK-LE-LABEL: ld_reg_uint32_t_uint64_t:
3832 ; CHECK-LE: # %bb.0: # %entry
3833 ; CHECK-LE-NEXT: lwzx r3, r3, r4
3834 ; CHECK-LE-NEXT: blr
3836 ; CHECK-BE-LABEL: ld_reg_uint32_t_uint64_t:
3837 ; CHECK-BE: # %bb.0: # %entry
3838 ; CHECK-BE-NEXT: add r3, r3, r4
3839 ; CHECK-BE-NEXT: lwz r3, 4(r3)
3840 ; CHECK-BE-NEXT: blr
3842 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
3843 %0 = load i64, ptr %add.ptr, align 8
3844 %conv = trunc i64 %0 to i32
3848 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3849 define dso_local zeroext i32 @ld_or_uint32_t_uint64_t(i64 %ptr, i8 zeroext %off) {
3850 ; CHECK-LE-LABEL: ld_or_uint32_t_uint64_t:
3851 ; CHECK-LE: # %bb.0: # %entry
3852 ; CHECK-LE-NEXT: or r3, r4, r3
3853 ; CHECK-LE-NEXT: lwz r3, 0(r3)
3854 ; CHECK-LE-NEXT: blr
3856 ; CHECK-BE-LABEL: ld_or_uint32_t_uint64_t:
3857 ; CHECK-BE: # %bb.0: # %entry
3858 ; CHECK-BE-NEXT: or r3, r4, r3
3859 ; CHECK-BE-NEXT: lwz r3, 4(r3)
3860 ; CHECK-BE-NEXT: blr
3862 %conv = zext i8 %off to i64
3863 %or = or i64 %conv, %ptr
3864 %0 = inttoptr i64 %or to ptr
3865 %1 = load i64, ptr %0, align 8
3866 %conv1 = trunc i64 %1 to i32
3870 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3871 define dso_local zeroext i32 @ld_not_disjoint16_uint32_t_uint64_t(i64 %ptr) {
3872 ; CHECK-LE-LABEL: ld_not_disjoint16_uint32_t_uint64_t:
3873 ; CHECK-LE: # %bb.0: # %entry
3874 ; CHECK-LE-NEXT: ori r3, r3, 6
3875 ; CHECK-LE-NEXT: lwz r3, 0(r3)
3876 ; CHECK-LE-NEXT: blr
3878 ; CHECK-BE-LABEL: ld_not_disjoint16_uint32_t_uint64_t:
3879 ; CHECK-BE: # %bb.0: # %entry
3880 ; CHECK-BE-NEXT: ori r3, r3, 6
3881 ; CHECK-BE-NEXT: lwz r3, 4(r3)
3882 ; CHECK-BE-NEXT: blr
3884 %or = or i64 %ptr, 6
3885 %0 = inttoptr i64 %or to ptr
3886 %1 = load i64, ptr %0, align 8
3887 %conv = trunc i64 %1 to i32
3891 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3892 define dso_local zeroext i32 @ld_disjoint_align16_uint32_t_uint64_t(i64 %ptr) {
3893 ; CHECK-LE-LABEL: ld_disjoint_align16_uint32_t_uint64_t:
3894 ; CHECK-LE: # %bb.0: # %entry
3895 ; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
3896 ; CHECK-LE-NEXT: lwz r3, 24(r3)
3897 ; CHECK-LE-NEXT: blr
3899 ; CHECK-BE-LABEL: ld_disjoint_align16_uint32_t_uint64_t:
3900 ; CHECK-BE: # %bb.0: # %entry
3901 ; CHECK-BE-NEXT: rldicr r3, r3, 0, 51
3902 ; CHECK-BE-NEXT: lwz r3, 28(r3)
3903 ; CHECK-BE-NEXT: blr
3905 %and = and i64 %ptr, -4096
3906 %or = or i64 %and, 24
3907 %0 = inttoptr i64 %or to ptr
3908 %1 = load i64, ptr %0, align 8
3909 %conv = trunc i64 %1 to i32
3913 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3914 define dso_local zeroext i32 @ld_not_disjoint32_uint32_t_uint64_t(i64 %ptr) {
3915 ; CHECK-LE-LABEL: ld_not_disjoint32_uint32_t_uint64_t:
3916 ; CHECK-LE: # %bb.0: # %entry
3917 ; CHECK-LE-NEXT: ori r3, r3, 34463
3918 ; CHECK-LE-NEXT: oris r3, r3, 1
3919 ; CHECK-LE-NEXT: lwz r3, 0(r3)
3920 ; CHECK-LE-NEXT: blr
3922 ; CHECK-BE-LABEL: ld_not_disjoint32_uint32_t_uint64_t:
3923 ; CHECK-BE: # %bb.0: # %entry
3924 ; CHECK-BE-NEXT: ori r3, r3, 34463
3925 ; CHECK-BE-NEXT: oris r3, r3, 1
3926 ; CHECK-BE-NEXT: lwz r3, 4(r3)
3927 ; CHECK-BE-NEXT: blr
3929 %or = or i64 %ptr, 99999
3930 %0 = inttoptr i64 %or to ptr
3931 %1 = load i64, ptr %0, align 8
3932 %conv = trunc i64 %1 to i32
3936 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3937 define dso_local zeroext i32 @ld_disjoint_align32_uint32_t_uint64_t(i64 %ptr) {
3938 ; CHECK-P10-LE-LABEL: ld_disjoint_align32_uint32_t_uint64_t:
3939 ; CHECK-P10-LE: # %bb.0: # %entry
3940 ; CHECK-P10-LE-NEXT: lis r4, -15264
3941 ; CHECK-P10-LE-NEXT: and r3, r3, r4
3942 ; CHECK-P10-LE-NEXT: plwz r3, 999990000(r3), 0
3943 ; CHECK-P10-LE-NEXT: blr
3945 ; CHECK-P10-BE-LABEL: ld_disjoint_align32_uint32_t_uint64_t:
3946 ; CHECK-P10-BE: # %bb.0: # %entry
3947 ; CHECK-P10-BE-NEXT: lis r4, -15264
3948 ; CHECK-P10-BE-NEXT: and r3, r3, r4
3949 ; CHECK-P10-BE-NEXT: plwz r3, 999990004(r3), 0
3950 ; CHECK-P10-BE-NEXT: blr
3952 ; CHECK-P9-LE-LABEL: ld_disjoint_align32_uint32_t_uint64_t:
3953 ; CHECK-P9-LE: # %bb.0: # %entry
3954 ; CHECK-P9-LE-NEXT: lis r4, -15264
3955 ; CHECK-P9-LE-NEXT: and r3, r3, r4
3956 ; CHECK-P9-LE-NEXT: lis r4, 15258
3957 ; CHECK-P9-LE-NEXT: ori r4, r4, 41712
3958 ; CHECK-P9-LE-NEXT: lwzx r3, r3, r4
3959 ; CHECK-P9-LE-NEXT: blr
3961 ; CHECK-P9-BE-LABEL: ld_disjoint_align32_uint32_t_uint64_t:
3962 ; CHECK-P9-BE: # %bb.0: # %entry
3963 ; CHECK-P9-BE-NEXT: lis r4, -15264
3964 ; CHECK-P9-BE-NEXT: and r3, r3, r4
3965 ; CHECK-P9-BE-NEXT: lis r4, 15258
3966 ; CHECK-P9-BE-NEXT: ori r4, r4, 41716
3967 ; CHECK-P9-BE-NEXT: lwzx r3, r3, r4
3968 ; CHECK-P9-BE-NEXT: blr
3970 ; CHECK-P8-LE-LABEL: ld_disjoint_align32_uint32_t_uint64_t:
3971 ; CHECK-P8-LE: # %bb.0: # %entry
3972 ; CHECK-P8-LE-NEXT: lis r4, -15264
3973 ; CHECK-P8-LE-NEXT: and r3, r3, r4
3974 ; CHECK-P8-LE-NEXT: lis r4, 15258
3975 ; CHECK-P8-LE-NEXT: ori r4, r4, 41712
3976 ; CHECK-P8-LE-NEXT: lwzx r3, r3, r4
3977 ; CHECK-P8-LE-NEXT: blr
3979 ; CHECK-P8-BE-LABEL: ld_disjoint_align32_uint32_t_uint64_t:
3980 ; CHECK-P8-BE: # %bb.0: # %entry
3981 ; CHECK-P8-BE-NEXT: lis r4, -15264
3982 ; CHECK-P8-BE-NEXT: and r3, r3, r4
3983 ; CHECK-P8-BE-NEXT: lis r4, 15258
3984 ; CHECK-P8-BE-NEXT: ori r4, r4, 41716
3985 ; CHECK-P8-BE-NEXT: lwzx r3, r3, r4
3986 ; CHECK-P8-BE-NEXT: blr
3988 %and = and i64 %ptr, -1000341504
3989 %or = or i64 %and, 999990000
3990 %0 = inttoptr i64 %or to ptr
3991 %1 = load i64, ptr %0, align 16
3992 %conv = trunc i64 %1 to i32
3996 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3997 define dso_local zeroext i32 @ld_not_disjoint64_uint32_t_uint64_t(i64 %ptr) {
3998 ; CHECK-P10-LE-LABEL: ld_not_disjoint64_uint32_t_uint64_t:
3999 ; CHECK-P10-LE: # %bb.0: # %entry
4000 ; CHECK-P10-LE-NEXT: pli r4, 232
4001 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
4002 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
4003 ; CHECK-P10-LE-NEXT: or r3, r3, r5
4004 ; CHECK-P10-LE-NEXT: lwz r3, 0(r3)
4005 ; CHECK-P10-LE-NEXT: blr
4007 ; CHECK-P10-BE-LABEL: ld_not_disjoint64_uint32_t_uint64_t:
4008 ; CHECK-P10-BE: # %bb.0: # %entry
4009 ; CHECK-P10-BE-NEXT: pli r4, 232
4010 ; CHECK-P10-BE-NEXT: pli r5, 3567587329
4011 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
4012 ; CHECK-P10-BE-NEXT: or r3, r3, r5
4013 ; CHECK-P10-BE-NEXT: lwz r3, 4(r3)
4014 ; CHECK-P10-BE-NEXT: blr
4016 ; CHECK-P9-LE-LABEL: ld_not_disjoint64_uint32_t_uint64_t:
4017 ; CHECK-P9-LE: # %bb.0: # %entry
4018 ; CHECK-P9-LE-NEXT: li r4, 29
4019 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
4020 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
4021 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
4022 ; CHECK-P9-LE-NEXT: or r3, r3, r4
4023 ; CHECK-P9-LE-NEXT: lwz r3, 0(r3)
4024 ; CHECK-P9-LE-NEXT: blr
4026 ; CHECK-P9-BE-LABEL: ld_not_disjoint64_uint32_t_uint64_t:
4027 ; CHECK-P9-BE: # %bb.0: # %entry
4028 ; CHECK-P9-BE-NEXT: li r4, 29
4029 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
4030 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
4031 ; CHECK-P9-BE-NEXT: ori r4, r4, 4097
4032 ; CHECK-P9-BE-NEXT: or r3, r3, r4
4033 ; CHECK-P9-BE-NEXT: lwz r3, 4(r3)
4034 ; CHECK-P9-BE-NEXT: blr
4036 ; CHECK-P8-LE-LABEL: ld_not_disjoint64_uint32_t_uint64_t:
4037 ; CHECK-P8-LE: # %bb.0: # %entry
4038 ; CHECK-P8-LE-NEXT: li r4, 29
4039 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
4040 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
4041 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
4042 ; CHECK-P8-LE-NEXT: or r3, r3, r4
4043 ; CHECK-P8-LE-NEXT: lwz r3, 0(r3)
4044 ; CHECK-P8-LE-NEXT: blr
4046 ; CHECK-P8-BE-LABEL: ld_not_disjoint64_uint32_t_uint64_t:
4047 ; CHECK-P8-BE: # %bb.0: # %entry
4048 ; CHECK-P8-BE-NEXT: li r4, 29
4049 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
4050 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
4051 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
4052 ; CHECK-P8-BE-NEXT: or r3, r3, r4
4053 ; CHECK-P8-BE-NEXT: lwz r3, 4(r3)
4054 ; CHECK-P8-BE-NEXT: blr
4056 %or = or i64 %ptr, 1000000000001
4057 %0 = inttoptr i64 %or to ptr
4058 %1 = load i64, ptr %0, align 8
4059 %conv = trunc i64 %1 to i32
4063 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4064 define dso_local zeroext i32 @ld_disjoint_align64_uint32_t_uint64_t(i64 %ptr) {
4065 ; CHECK-P10-LE-LABEL: ld_disjoint_align64_uint32_t_uint64_t:
4066 ; CHECK-P10-LE: # %bb.0: # %entry
4067 ; CHECK-P10-LE-NEXT: pli r4, 244140625
4068 ; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
4069 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
4070 ; CHECK-P10-LE-NEXT: lwzx r3, r3, r4
4071 ; CHECK-P10-LE-NEXT: blr
4073 ; CHECK-P10-BE-LABEL: ld_disjoint_align64_uint32_t_uint64_t:
4074 ; CHECK-P10-BE: # %bb.0: # %entry
4075 ; CHECK-P10-BE-NEXT: pli r4, 232
4076 ; CHECK-P10-BE-NEXT: pli r5, 3567587332
4077 ; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
4078 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
4079 ; CHECK-P10-BE-NEXT: lwzx r3, r3, r5
4080 ; CHECK-P10-BE-NEXT: blr
4082 ; CHECK-P9-LE-LABEL: ld_disjoint_align64_uint32_t_uint64_t:
4083 ; CHECK-P9-LE: # %bb.0: # %entry
4084 ; CHECK-P9-LE-NEXT: lis r4, 3725
4085 ; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
4086 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
4087 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
4088 ; CHECK-P9-LE-NEXT: lwzx r3, r3, r4
4089 ; CHECK-P9-LE-NEXT: blr
4091 ; CHECK-P9-BE-LABEL: ld_disjoint_align64_uint32_t_uint64_t:
4092 ; CHECK-P9-BE: # %bb.0: # %entry
4093 ; CHECK-P9-BE-NEXT: li r4, 29
4094 ; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
4095 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
4096 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
4097 ; CHECK-P9-BE-NEXT: ori r4, r4, 4100
4098 ; CHECK-P9-BE-NEXT: lwzx r3, r3, r4
4099 ; CHECK-P9-BE-NEXT: blr
4101 ; CHECK-P8-LE-LABEL: ld_disjoint_align64_uint32_t_uint64_t:
4102 ; CHECK-P8-LE: # %bb.0: # %entry
4103 ; CHECK-P8-LE-NEXT: lis r4, 3725
4104 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
4105 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
4106 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
4107 ; CHECK-P8-LE-NEXT: lwzx r3, r3, r4
4108 ; CHECK-P8-LE-NEXT: blr
4110 ; CHECK-P8-BE-LABEL: ld_disjoint_align64_uint32_t_uint64_t:
4111 ; CHECK-P8-BE: # %bb.0: # %entry
4112 ; CHECK-P8-BE-NEXT: li r4, 29
4113 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
4114 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
4115 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
4116 ; CHECK-P8-BE-NEXT: ori r4, r4, 4100
4117 ; CHECK-P8-BE-NEXT: lwzx r3, r3, r4
4118 ; CHECK-P8-BE-NEXT: blr
4120 %and = and i64 %ptr, -1099511627776
4121 %or = or i64 %and, 1000000000000
4122 %0 = inttoptr i64 %or to ptr
4123 %1 = load i64, ptr %0, align 4096
4124 %conv = trunc i64 %1 to i32
4128 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4129 define dso_local zeroext i32 @ld_cst_align16_uint32_t_uint64_t() {
4130 ; CHECK-LE-LABEL: ld_cst_align16_uint32_t_uint64_t:
4131 ; CHECK-LE: # %bb.0: # %entry
4132 ; CHECK-LE-NEXT: lwz r3, 4080(0)
4133 ; CHECK-LE-NEXT: blr
4135 ; CHECK-BE-LABEL: ld_cst_align16_uint32_t_uint64_t:
4136 ; CHECK-BE: # %bb.0: # %entry
4137 ; CHECK-BE-NEXT: lwz r3, 4084(0)
4138 ; CHECK-BE-NEXT: blr
4140 %0 = load i64, ptr inttoptr (i64 4080 to ptr), align 16
4141 %conv = trunc i64 %0 to i32
4145 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4146 define dso_local zeroext i32 @ld_cst_align32_uint32_t_uint64_t() {
4147 ; CHECK-LE-LABEL: ld_cst_align32_uint32_t_uint64_t:
4148 ; CHECK-LE: # %bb.0: # %entry
4149 ; CHECK-LE-NEXT: lis r3, 153
4150 ; CHECK-LE-NEXT: lwz r3, -27108(r3)
4151 ; CHECK-LE-NEXT: blr
4153 ; CHECK-BE-LABEL: ld_cst_align32_uint32_t_uint64_t:
4154 ; CHECK-BE: # %bb.0: # %entry
4155 ; CHECK-BE-NEXT: lis r3, 153
4156 ; CHECK-BE-NEXT: lwz r3, -27104(r3)
4157 ; CHECK-BE-NEXT: blr
4159 %0 = load i64, ptr inttoptr (i64 9999900 to ptr), align 8
4160 %conv = trunc i64 %0 to i32
4164 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4165 define dso_local zeroext i32 @ld_cst_align64_uint32_t_uint64_t() {
4166 ; CHECK-P10-LE-LABEL: ld_cst_align64_uint32_t_uint64_t:
4167 ; CHECK-P10-LE: # %bb.0: # %entry
4168 ; CHECK-P10-LE-NEXT: pli r3, 244140625
4169 ; CHECK-P10-LE-NEXT: rldic r3, r3, 12, 24
4170 ; CHECK-P10-LE-NEXT: lwz r3, 0(r3)
4171 ; CHECK-P10-LE-NEXT: blr
4173 ; CHECK-P10-BE-LABEL: ld_cst_align64_uint32_t_uint64_t:
4174 ; CHECK-P10-BE: # %bb.0: # %entry
4175 ; CHECK-P10-BE-NEXT: pli r3, 232
4176 ; CHECK-P10-BE-NEXT: pli r4, 3567587332
4177 ; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
4178 ; CHECK-P10-BE-NEXT: lwz r3, 0(r4)
4179 ; CHECK-P10-BE-NEXT: blr
4181 ; CHECK-P9-LE-LABEL: ld_cst_align64_uint32_t_uint64_t:
4182 ; CHECK-P9-LE: # %bb.0: # %entry
4183 ; CHECK-P9-LE-NEXT: lis r3, 3725
4184 ; CHECK-P9-LE-NEXT: ori r3, r3, 19025
4185 ; CHECK-P9-LE-NEXT: rldic r3, r3, 12, 24
4186 ; CHECK-P9-LE-NEXT: lwz r3, 0(r3)
4187 ; CHECK-P9-LE-NEXT: blr
4189 ; CHECK-P9-BE-LABEL: ld_cst_align64_uint32_t_uint64_t:
4190 ; CHECK-P9-BE: # %bb.0: # %entry
4191 ; CHECK-P9-BE-NEXT: li r3, 29
4192 ; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
4193 ; CHECK-P9-BE-NEXT: oris r3, r3, 54437
4194 ; CHECK-P9-BE-NEXT: ori r3, r3, 4100
4195 ; CHECK-P9-BE-NEXT: lwz r3, 0(r3)
4196 ; CHECK-P9-BE-NEXT: blr
4198 ; CHECK-P8-LE-LABEL: ld_cst_align64_uint32_t_uint64_t:
4199 ; CHECK-P8-LE: # %bb.0: # %entry
4200 ; CHECK-P8-LE-NEXT: lis r3, 3725
4201 ; CHECK-P8-LE-NEXT: ori r3, r3, 19025
4202 ; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
4203 ; CHECK-P8-LE-NEXT: lwz r3, 0(r3)
4204 ; CHECK-P8-LE-NEXT: blr
4206 ; CHECK-P8-BE-LABEL: ld_cst_align64_uint32_t_uint64_t:
4207 ; CHECK-P8-BE: # %bb.0: # %entry
4208 ; CHECK-P8-BE-NEXT: li r3, 29
4209 ; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
4210 ; CHECK-P8-BE-NEXT: oris r3, r3, 54437
4211 ; CHECK-P8-BE-NEXT: ori r3, r3, 4100
4212 ; CHECK-P8-BE-NEXT: lwz r3, 0(r3)
4213 ; CHECK-P8-BE-NEXT: blr
4215 %0 = load i64, ptr inttoptr (i64 1000000000000 to ptr), align 4096
4216 %conv = trunc i64 %0 to i32
4220 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4221 define dso_local zeroext i32 @ld_0_uint32_t_float(i64 %ptr) {
4222 ; CHECK-LABEL: ld_0_uint32_t_float:
4223 ; CHECK: # %bb.0: # %entry
4224 ; CHECK-NEXT: lfs f0, 0(r3)
4225 ; CHECK-NEXT: xscvdpuxws f0, f0
4226 ; CHECK-NEXT: mffprwz r3, f0
4229 %0 = inttoptr i64 %ptr to ptr
4230 %1 = load float, ptr %0, align 4
4231 %conv = fptoui float %1 to i32
4235 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4236 define dso_local zeroext i32 @ld_align16_uint32_t_float(ptr nocapture readonly %ptr) {
4237 ; CHECK-LABEL: ld_align16_uint32_t_float:
4238 ; CHECK: # %bb.0: # %entry
4239 ; CHECK-NEXT: lfs f0, 8(r3)
4240 ; CHECK-NEXT: xscvdpuxws f0, f0
4241 ; CHECK-NEXT: mffprwz r3, f0
4244 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
4245 %0 = load float, ptr %add.ptr, align 4
4246 %conv = fptoui float %0 to i32
4250 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4251 define dso_local zeroext i32 @ld_align32_uint32_t_float(ptr nocapture readonly %ptr) {
4252 ; CHECK-P10-LABEL: ld_align32_uint32_t_float:
4253 ; CHECK-P10: # %bb.0: # %entry
4254 ; CHECK-P10-NEXT: plfs f0, 99999000(r3), 0
4255 ; CHECK-P10-NEXT: xscvdpuxws f0, f0
4256 ; CHECK-P10-NEXT: mffprwz r3, f0
4257 ; CHECK-P10-NEXT: blr
4259 ; CHECK-PREP10-LABEL: ld_align32_uint32_t_float:
4260 ; CHECK-PREP10: # %bb.0: # %entry
4261 ; CHECK-PREP10-NEXT: lis r4, 1525
4262 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
4263 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
4264 ; CHECK-PREP10-NEXT: xscvdpuxws f0, f0
4265 ; CHECK-PREP10-NEXT: mffprwz r3, f0
4266 ; CHECK-PREP10-NEXT: blr
4268 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
4269 %0 = load float, ptr %add.ptr, align 4
4270 %conv = fptoui float %0 to i32
4274 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4275 define dso_local zeroext i32 @ld_align64_uint32_t_float(ptr nocapture readonly %ptr) {
4276 ; CHECK-P10-LABEL: ld_align64_uint32_t_float:
4277 ; CHECK-P10: # %bb.0: # %entry
4278 ; CHECK-P10-NEXT: pli r4, 244140625
4279 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
4280 ; CHECK-P10-NEXT: lfsx f0, r3, r4
4281 ; CHECK-P10-NEXT: xscvdpuxws f0, f0
4282 ; CHECK-P10-NEXT: mffprwz r3, f0
4283 ; CHECK-P10-NEXT: blr
4285 ; CHECK-PREP10-LABEL: ld_align64_uint32_t_float:
4286 ; CHECK-PREP10: # %bb.0: # %entry
4287 ; CHECK-PREP10-NEXT: lis r4, 3725
4288 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
4289 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
4290 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
4291 ; CHECK-PREP10-NEXT: xscvdpuxws f0, f0
4292 ; CHECK-PREP10-NEXT: mffprwz r3, f0
4293 ; CHECK-PREP10-NEXT: blr
4295 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
4296 %0 = load float, ptr %add.ptr, align 4
4297 %conv = fptoui float %0 to i32
4301 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4302 define dso_local zeroext i32 @ld_reg_uint32_t_float(ptr nocapture readonly %ptr, i64 %off) {
4303 ; CHECK-LABEL: ld_reg_uint32_t_float:
4304 ; CHECK: # %bb.0: # %entry
4305 ; CHECK-NEXT: lfsx f0, r3, r4
4306 ; CHECK-NEXT: xscvdpuxws f0, f0
4307 ; CHECK-NEXT: mffprwz r3, f0
4310 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
4311 %0 = load float, ptr %add.ptr, align 4
4312 %conv = fptoui float %0 to i32
4316 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4317 define dso_local zeroext i32 @ld_or_uint32_t_float(i64 %ptr, i8 zeroext %off) {
4318 ; CHECK-LABEL: ld_or_uint32_t_float:
4319 ; CHECK: # %bb.0: # %entry
4320 ; CHECK-NEXT: or r3, r4, r3
4321 ; CHECK-NEXT: lfs f0, 0(r3)
4322 ; CHECK-NEXT: xscvdpuxws f0, f0
4323 ; CHECK-NEXT: mffprwz r3, f0
4326 %conv = zext i8 %off to i64
4327 %or = or i64 %conv, %ptr
4328 %0 = inttoptr i64 %or to ptr
4329 %1 = load float, ptr %0, align 4
4330 %conv1 = fptoui float %1 to i32
4334 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4335 define dso_local zeroext i32 @ld_not_disjoint16_uint32_t_float(i64 %ptr) {
4336 ; CHECK-LABEL: ld_not_disjoint16_uint32_t_float:
4337 ; CHECK: # %bb.0: # %entry
4338 ; CHECK-NEXT: ori r3, r3, 6
4339 ; CHECK-NEXT: lfs f0, 0(r3)
4340 ; CHECK-NEXT: xscvdpuxws f0, f0
4341 ; CHECK-NEXT: mffprwz r3, f0
4344 %or = or i64 %ptr, 6
4345 %0 = inttoptr i64 %or to ptr
4346 %1 = load float, ptr %0, align 4
4347 %conv = fptoui float %1 to i32
4351 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4352 define dso_local zeroext i32 @ld_disjoint_align16_uint32_t_float(i64 %ptr) {
4353 ; CHECK-LABEL: ld_disjoint_align16_uint32_t_float:
4354 ; CHECK: # %bb.0: # %entry
4355 ; CHECK-NEXT: rldicr r3, r3, 0, 51
4356 ; CHECK-NEXT: lfs f0, 24(r3)
4357 ; CHECK-NEXT: xscvdpuxws f0, f0
4358 ; CHECK-NEXT: mffprwz r3, f0
4361 %and = and i64 %ptr, -4096
4362 %or = or i64 %and, 24
4363 %0 = inttoptr i64 %or to ptr
4364 %1 = load float, ptr %0, align 8
4365 %conv = fptoui float %1 to i32
4369 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4370 define dso_local zeroext i32 @ld_not_disjoint32_uint32_t_float(i64 %ptr) {
4371 ; CHECK-LABEL: ld_not_disjoint32_uint32_t_float:
4372 ; CHECK: # %bb.0: # %entry
4373 ; CHECK-NEXT: ori r3, r3, 34463
4374 ; CHECK-NEXT: oris r3, r3, 1
4375 ; CHECK-NEXT: lfs f0, 0(r3)
4376 ; CHECK-NEXT: xscvdpuxws f0, f0
4377 ; CHECK-NEXT: mffprwz r3, f0
4380 %or = or i64 %ptr, 99999
4381 %0 = inttoptr i64 %or to ptr
4382 %1 = load float, ptr %0, align 4
4383 %conv = fptoui float %1 to i32
4387 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4388 define dso_local zeroext i32 @ld_disjoint_align32_uint32_t_float(i64 %ptr) {
4389 ; CHECK-P10-LABEL: ld_disjoint_align32_uint32_t_float:
4390 ; CHECK-P10: # %bb.0: # %entry
4391 ; CHECK-P10-NEXT: lis r4, -15264
4392 ; CHECK-P10-NEXT: and r3, r3, r4
4393 ; CHECK-P10-NEXT: plfs f0, 999990000(r3), 0
4394 ; CHECK-P10-NEXT: xscvdpuxws f0, f0
4395 ; CHECK-P10-NEXT: mffprwz r3, f0
4396 ; CHECK-P10-NEXT: blr
4398 ; CHECK-PREP10-LABEL: ld_disjoint_align32_uint32_t_float:
4399 ; CHECK-PREP10: # %bb.0: # %entry
4400 ; CHECK-PREP10-NEXT: lis r4, -15264
4401 ; CHECK-PREP10-NEXT: and r3, r3, r4
4402 ; CHECK-PREP10-NEXT: lis r4, 15258
4403 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
4404 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
4405 ; CHECK-PREP10-NEXT: xscvdpuxws f0, f0
4406 ; CHECK-PREP10-NEXT: mffprwz r3, f0
4407 ; CHECK-PREP10-NEXT: blr
4409 %and = and i64 %ptr, -1000341504
4410 %or = or i64 %and, 999990000
4411 %0 = inttoptr i64 %or to ptr
4412 %1 = load float, ptr %0, align 16
4413 %conv = fptoui float %1 to i32
4417 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4418 define dso_local zeroext i32 @ld_not_disjoint64_uint32_t_float(i64 %ptr) {
4419 ; CHECK-P10-LABEL: ld_not_disjoint64_uint32_t_float:
4420 ; CHECK-P10: # %bb.0: # %entry
4421 ; CHECK-P10-NEXT: pli r4, 232
4422 ; CHECK-P10-NEXT: pli r5, 3567587329
4423 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
4424 ; CHECK-P10-NEXT: or r3, r3, r5
4425 ; CHECK-P10-NEXT: lfs f0, 0(r3)
4426 ; CHECK-P10-NEXT: xscvdpuxws f0, f0
4427 ; CHECK-P10-NEXT: mffprwz r3, f0
4428 ; CHECK-P10-NEXT: blr
4430 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint32_t_float:
4431 ; CHECK-PREP10: # %bb.0: # %entry
4432 ; CHECK-PREP10-NEXT: li r4, 29
4433 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
4434 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
4435 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
4436 ; CHECK-PREP10-NEXT: or r3, r3, r4
4437 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
4438 ; CHECK-PREP10-NEXT: xscvdpuxws f0, f0
4439 ; CHECK-PREP10-NEXT: mffprwz r3, f0
4440 ; CHECK-PREP10-NEXT: blr
4442 %or = or i64 %ptr, 1000000000001
4443 %0 = inttoptr i64 %or to ptr
4444 %1 = load float, ptr %0, align 4
4445 %conv = fptoui float %1 to i32
4449 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4450 define dso_local zeroext i32 @ld_disjoint_align64_uint32_t_float(i64 %ptr) {
4451 ; CHECK-P10-LABEL: ld_disjoint_align64_uint32_t_float:
4452 ; CHECK-P10: # %bb.0: # %entry
4453 ; CHECK-P10-NEXT: pli r4, 244140625
4454 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
4455 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
4456 ; CHECK-P10-NEXT: lfsx f0, r3, r4
4457 ; CHECK-P10-NEXT: xscvdpuxws f0, f0
4458 ; CHECK-P10-NEXT: mffprwz r3, f0
4459 ; CHECK-P10-NEXT: blr
4461 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint32_t_float:
4462 ; CHECK-PREP10: # %bb.0: # %entry
4463 ; CHECK-PREP10-NEXT: lis r4, 3725
4464 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
4465 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
4466 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
4467 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
4468 ; CHECK-PREP10-NEXT: xscvdpuxws f0, f0
4469 ; CHECK-PREP10-NEXT: mffprwz r3, f0
4470 ; CHECK-PREP10-NEXT: blr
4472 %and = and i64 %ptr, -1099511627776
4473 %or = or i64 %and, 1000000000000
4474 %0 = inttoptr i64 %or to ptr
4475 %1 = load float, ptr %0, align 4096
4476 %conv = fptoui float %1 to i32
4480 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4481 define dso_local zeroext i32 @ld_cst_align16_uint32_t_float() {
4482 ; CHECK-LABEL: ld_cst_align16_uint32_t_float:
4483 ; CHECK: # %bb.0: # %entry
4484 ; CHECK-NEXT: lfs f0, 4080(0)
4485 ; CHECK-NEXT: xscvdpuxws f0, f0
4486 ; CHECK-NEXT: mffprwz r3, f0
4489 %0 = load float, ptr inttoptr (i64 4080 to ptr), align 16
4490 %conv = fptoui float %0 to i32
4494 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4495 define dso_local zeroext i32 @ld_cst_align32_uint32_t_float() {
4496 ; CHECK-LABEL: ld_cst_align32_uint32_t_float:
4497 ; CHECK: # %bb.0: # %entry
4498 ; CHECK-NEXT: lis r3, 153
4499 ; CHECK-NEXT: lfs f0, -27108(r3)
4500 ; CHECK-NEXT: xscvdpuxws f0, f0
4501 ; CHECK-NEXT: mffprwz r3, f0
4504 %0 = load float, ptr inttoptr (i64 9999900 to ptr), align 4
4505 %conv = fptoui float %0 to i32
4509 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4510 define dso_local zeroext i32 @ld_cst_align64_uint32_t_float() {
4511 ; CHECK-P10-LABEL: ld_cst_align64_uint32_t_float:
4512 ; CHECK-P10: # %bb.0: # %entry
4513 ; CHECK-P10-NEXT: pli r3, 244140625
4514 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
4515 ; CHECK-P10-NEXT: lfs f0, 0(r3)
4516 ; CHECK-P10-NEXT: xscvdpuxws f0, f0
4517 ; CHECK-P10-NEXT: mffprwz r3, f0
4518 ; CHECK-P10-NEXT: blr
4520 ; CHECK-PREP10-LABEL: ld_cst_align64_uint32_t_float:
4521 ; CHECK-PREP10: # %bb.0: # %entry
4522 ; CHECK-PREP10-NEXT: lis r3, 3725
4523 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
4524 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
4525 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
4526 ; CHECK-PREP10-NEXT: xscvdpuxws f0, f0
4527 ; CHECK-PREP10-NEXT: mffprwz r3, f0
4528 ; CHECK-PREP10-NEXT: blr
4530 %0 = load float, ptr inttoptr (i64 1000000000000 to ptr), align 4096
4531 %conv = fptoui float %0 to i32
4535 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4536 define dso_local zeroext i32 @ld_0_uint32_t_double(i64 %ptr) {
4537 ; CHECK-LABEL: ld_0_uint32_t_double:
4538 ; CHECK: # %bb.0: # %entry
4539 ; CHECK-NEXT: lfd f0, 0(r3)
4540 ; CHECK-NEXT: xscvdpuxws f0, f0
4541 ; CHECK-NEXT: mffprwz r3, f0
4544 %0 = inttoptr i64 %ptr to ptr
4545 %1 = load double, ptr %0, align 8
4546 %conv = fptoui double %1 to i32
4550 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4551 define dso_local zeroext i32 @ld_align16_uint32_t_double(ptr nocapture readonly %ptr) {
4552 ; CHECK-LABEL: ld_align16_uint32_t_double:
4553 ; CHECK: # %bb.0: # %entry
4554 ; CHECK-NEXT: lfd f0, 8(r3)
4555 ; CHECK-NEXT: xscvdpuxws f0, f0
4556 ; CHECK-NEXT: mffprwz r3, f0
4559 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
4560 %0 = load double, ptr %add.ptr, align 8
4561 %conv = fptoui double %0 to i32
4565 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4566 define dso_local zeroext i32 @ld_align32_uint32_t_double(ptr nocapture readonly %ptr) {
4567 ; CHECK-P10-LABEL: ld_align32_uint32_t_double:
4568 ; CHECK-P10: # %bb.0: # %entry
4569 ; CHECK-P10-NEXT: plfd f0, 99999000(r3), 0
4570 ; CHECK-P10-NEXT: xscvdpuxws f0, f0
4571 ; CHECK-P10-NEXT: mffprwz r3, f0
4572 ; CHECK-P10-NEXT: blr
4574 ; CHECK-PREP10-LABEL: ld_align32_uint32_t_double:
4575 ; CHECK-PREP10: # %bb.0: # %entry
4576 ; CHECK-PREP10-NEXT: lis r4, 1525
4577 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
4578 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
4579 ; CHECK-PREP10-NEXT: xscvdpuxws f0, f0
4580 ; CHECK-PREP10-NEXT: mffprwz r3, f0
4581 ; CHECK-PREP10-NEXT: blr
4583 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
4584 %0 = load double, ptr %add.ptr, align 8
4585 %conv = fptoui double %0 to i32
4589 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4590 define dso_local zeroext i32 @ld_align64_uint32_t_double(ptr nocapture readonly %ptr) {
4591 ; CHECK-P10-LABEL: ld_align64_uint32_t_double:
4592 ; CHECK-P10: # %bb.0: # %entry
4593 ; CHECK-P10-NEXT: pli r4, 244140625
4594 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
4595 ; CHECK-P10-NEXT: lfdx f0, r3, r4
4596 ; CHECK-P10-NEXT: xscvdpuxws f0, f0
4597 ; CHECK-P10-NEXT: mffprwz r3, f0
4598 ; CHECK-P10-NEXT: blr
4600 ; CHECK-PREP10-LABEL: ld_align64_uint32_t_double:
4601 ; CHECK-PREP10: # %bb.0: # %entry
4602 ; CHECK-PREP10-NEXT: lis r4, 3725
4603 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
4604 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
4605 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
4606 ; CHECK-PREP10-NEXT: xscvdpuxws f0, f0
4607 ; CHECK-PREP10-NEXT: mffprwz r3, f0
4608 ; CHECK-PREP10-NEXT: blr
4610 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
4611 %0 = load double, ptr %add.ptr, align 8
4612 %conv = fptoui double %0 to i32
4616 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4617 define dso_local zeroext i32 @ld_reg_uint32_t_double(ptr nocapture readonly %ptr, i64 %off) {
4618 ; CHECK-LABEL: ld_reg_uint32_t_double:
4619 ; CHECK: # %bb.0: # %entry
4620 ; CHECK-NEXT: lfdx f0, r3, r4
4621 ; CHECK-NEXT: xscvdpuxws f0, f0
4622 ; CHECK-NEXT: mffprwz r3, f0
4625 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
4626 %0 = load double, ptr %add.ptr, align 8
4627 %conv = fptoui double %0 to i32
4631 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4632 define dso_local zeroext i32 @ld_or_uint32_t_double(i64 %ptr, i8 zeroext %off) {
4633 ; CHECK-LABEL: ld_or_uint32_t_double:
4634 ; CHECK: # %bb.0: # %entry
4635 ; CHECK-NEXT: or r3, r4, r3
4636 ; CHECK-NEXT: lfd f0, 0(r3)
4637 ; CHECK-NEXT: xscvdpuxws f0, f0
4638 ; CHECK-NEXT: mffprwz r3, f0
4641 %conv = zext i8 %off to i64
4642 %or = or i64 %conv, %ptr
4643 %0 = inttoptr i64 %or to ptr
4644 %1 = load double, ptr %0, align 8
4645 %conv1 = fptoui double %1 to i32
4649 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4650 define dso_local zeroext i32 @ld_not_disjoint16_uint32_t_double(i64 %ptr) {
4651 ; CHECK-LABEL: ld_not_disjoint16_uint32_t_double:
4652 ; CHECK: # %bb.0: # %entry
4653 ; CHECK-NEXT: ori r3, r3, 6
4654 ; CHECK-NEXT: lfd f0, 0(r3)
4655 ; CHECK-NEXT: xscvdpuxws f0, f0
4656 ; CHECK-NEXT: mffprwz r3, f0
4659 %or = or i64 %ptr, 6
4660 %0 = inttoptr i64 %or to ptr
4661 %1 = load double, ptr %0, align 8
4662 %conv = fptoui double %1 to i32
4666 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4667 define dso_local zeroext i32 @ld_disjoint_align16_uint32_t_double(i64 %ptr) {
4668 ; CHECK-LABEL: ld_disjoint_align16_uint32_t_double:
4669 ; CHECK: # %bb.0: # %entry
4670 ; CHECK-NEXT: rldicr r3, r3, 0, 51
4671 ; CHECK-NEXT: lfd f0, 24(r3)
4672 ; CHECK-NEXT: xscvdpuxws f0, f0
4673 ; CHECK-NEXT: mffprwz r3, f0
4676 %and = and i64 %ptr, -4096
4677 %or = or i64 %and, 24
4678 %0 = inttoptr i64 %or to ptr
4679 %1 = load double, ptr %0, align 8
4680 %conv = fptoui double %1 to i32
4684 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4685 define dso_local zeroext i32 @ld_not_disjoint32_uint32_t_double(i64 %ptr) {
4686 ; CHECK-LABEL: ld_not_disjoint32_uint32_t_double:
4687 ; CHECK: # %bb.0: # %entry
4688 ; CHECK-NEXT: ori r3, r3, 34463
4689 ; CHECK-NEXT: oris r3, r3, 1
4690 ; CHECK-NEXT: lfd f0, 0(r3)
4691 ; CHECK-NEXT: xscvdpuxws f0, f0
4692 ; CHECK-NEXT: mffprwz r3, f0
4695 %or = or i64 %ptr, 99999
4696 %0 = inttoptr i64 %or to ptr
4697 %1 = load double, ptr %0, align 8
4698 %conv = fptoui double %1 to i32
4702 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4703 define dso_local zeroext i32 @ld_disjoint_align32_uint32_t_double(i64 %ptr) {
4704 ; CHECK-P10-LABEL: ld_disjoint_align32_uint32_t_double:
4705 ; CHECK-P10: # %bb.0: # %entry
4706 ; CHECK-P10-NEXT: lis r4, -15264
4707 ; CHECK-P10-NEXT: and r3, r3, r4
4708 ; CHECK-P10-NEXT: plfd f0, 999990000(r3), 0
4709 ; CHECK-P10-NEXT: xscvdpuxws f0, f0
4710 ; CHECK-P10-NEXT: mffprwz r3, f0
4711 ; CHECK-P10-NEXT: blr
4713 ; CHECK-PREP10-LABEL: ld_disjoint_align32_uint32_t_double:
4714 ; CHECK-PREP10: # %bb.0: # %entry
4715 ; CHECK-PREP10-NEXT: lis r4, -15264
4716 ; CHECK-PREP10-NEXT: and r3, r3, r4
4717 ; CHECK-PREP10-NEXT: lis r4, 15258
4718 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
4719 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
4720 ; CHECK-PREP10-NEXT: xscvdpuxws f0, f0
4721 ; CHECK-PREP10-NEXT: mffprwz r3, f0
4722 ; CHECK-PREP10-NEXT: blr
4724 %and = and i64 %ptr, -1000341504
4725 %or = or i64 %and, 999990000
4726 %0 = inttoptr i64 %or to ptr
4727 %1 = load double, ptr %0, align 16
4728 %conv = fptoui double %1 to i32
4732 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4733 define dso_local zeroext i32 @ld_not_disjoint64_uint32_t_double(i64 %ptr) {
4734 ; CHECK-P10-LABEL: ld_not_disjoint64_uint32_t_double:
4735 ; CHECK-P10: # %bb.0: # %entry
4736 ; CHECK-P10-NEXT: pli r4, 232
4737 ; CHECK-P10-NEXT: pli r5, 3567587329
4738 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
4739 ; CHECK-P10-NEXT: or r3, r3, r5
4740 ; CHECK-P10-NEXT: lfd f0, 0(r3)
4741 ; CHECK-P10-NEXT: xscvdpuxws f0, f0
4742 ; CHECK-P10-NEXT: mffprwz r3, f0
4743 ; CHECK-P10-NEXT: blr
4745 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint32_t_double:
4746 ; CHECK-PREP10: # %bb.0: # %entry
4747 ; CHECK-PREP10-NEXT: li r4, 29
4748 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
4749 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
4750 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
4751 ; CHECK-PREP10-NEXT: or r3, r3, r4
4752 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
4753 ; CHECK-PREP10-NEXT: xscvdpuxws f0, f0
4754 ; CHECK-PREP10-NEXT: mffprwz r3, f0
4755 ; CHECK-PREP10-NEXT: blr
4757 %or = or i64 %ptr, 1000000000001
4758 %0 = inttoptr i64 %or to ptr
4759 %1 = load double, ptr %0, align 8
4760 %conv = fptoui double %1 to i32
4764 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4765 define dso_local zeroext i32 @ld_disjoint_align64_uint32_t_double(i64 %ptr) {
4766 ; CHECK-P10-LABEL: ld_disjoint_align64_uint32_t_double:
4767 ; CHECK-P10: # %bb.0: # %entry
4768 ; CHECK-P10-NEXT: pli r4, 244140625
4769 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
4770 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
4771 ; CHECK-P10-NEXT: lfdx f0, r3, r4
4772 ; CHECK-P10-NEXT: xscvdpuxws f0, f0
4773 ; CHECK-P10-NEXT: mffprwz r3, f0
4774 ; CHECK-P10-NEXT: blr
4776 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint32_t_double:
4777 ; CHECK-PREP10: # %bb.0: # %entry
4778 ; CHECK-PREP10-NEXT: lis r4, 3725
4779 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
4780 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
4781 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
4782 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
4783 ; CHECK-PREP10-NEXT: xscvdpuxws f0, f0
4784 ; CHECK-PREP10-NEXT: mffprwz r3, f0
4785 ; CHECK-PREP10-NEXT: blr
4787 %and = and i64 %ptr, -1099511627776
4788 %or = or i64 %and, 1000000000000
4789 %0 = inttoptr i64 %or to ptr
4790 %1 = load double, ptr %0, align 4096
4791 %conv = fptoui double %1 to i32
4795 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4796 define dso_local zeroext i32 @ld_cst_align16_uint32_t_double() {
4797 ; CHECK-LABEL: ld_cst_align16_uint32_t_double:
4798 ; CHECK: # %bb.0: # %entry
4799 ; CHECK-NEXT: lfd f0, 4080(0)
4800 ; CHECK-NEXT: xscvdpuxws f0, f0
4801 ; CHECK-NEXT: mffprwz r3, f0
4804 %0 = load double, ptr inttoptr (i64 4080 to ptr), align 16
4805 %conv = fptoui double %0 to i32
4809 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4810 define dso_local zeroext i32 @ld_cst_align32_uint32_t_double() {
4811 ; CHECK-LABEL: ld_cst_align32_uint32_t_double:
4812 ; CHECK: # %bb.0: # %entry
4813 ; CHECK-NEXT: lis r3, 153
4814 ; CHECK-NEXT: lfd f0, -27108(r3)
4815 ; CHECK-NEXT: xscvdpuxws f0, f0
4816 ; CHECK-NEXT: mffprwz r3, f0
4819 %0 = load double, ptr inttoptr (i64 9999900 to ptr), align 8
4820 %conv = fptoui double %0 to i32
4824 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4825 define dso_local zeroext i32 @ld_cst_align64_uint32_t_double() {
4826 ; CHECK-P10-LABEL: ld_cst_align64_uint32_t_double:
4827 ; CHECK-P10: # %bb.0: # %entry
4828 ; CHECK-P10-NEXT: pli r3, 244140625
4829 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
4830 ; CHECK-P10-NEXT: lfd f0, 0(r3)
4831 ; CHECK-P10-NEXT: xscvdpuxws f0, f0
4832 ; CHECK-P10-NEXT: mffprwz r3, f0
4833 ; CHECK-P10-NEXT: blr
4835 ; CHECK-PREP10-LABEL: ld_cst_align64_uint32_t_double:
4836 ; CHECK-PREP10: # %bb.0: # %entry
4837 ; CHECK-PREP10-NEXT: lis r3, 3725
4838 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
4839 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
4840 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
4841 ; CHECK-PREP10-NEXT: xscvdpuxws f0, f0
4842 ; CHECK-PREP10-NEXT: mffprwz r3, f0
4843 ; CHECK-PREP10-NEXT: blr
4845 %0 = load double, ptr inttoptr (i64 1000000000000 to ptr), align 4096
4846 %conv = fptoui double %0 to i32
4850 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4851 define dso_local void @st_0_uint32_t_uint8_t(i64 %ptr, i32 zeroext %str) {
4852 ; CHECK-LABEL: st_0_uint32_t_uint8_t:
4853 ; CHECK: # %bb.0: # %entry
4854 ; CHECK-NEXT: stb r4, 0(r3)
4857 %conv = trunc i32 %str to i8
4858 %0 = inttoptr i64 %ptr to ptr
4859 store i8 %conv, ptr %0, align 1
4863 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4864 define dso_local void @st_align16_uint32_t_uint8_t(ptr nocapture %ptr, i32 zeroext %str) {
4865 ; CHECK-LABEL: st_align16_uint32_t_uint8_t:
4866 ; CHECK: # %bb.0: # %entry
4867 ; CHECK-NEXT: stb r4, 8(r3)
4870 %conv = trunc i32 %str to i8
4871 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
4872 store i8 %conv, ptr %add.ptr, align 1
4876 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4877 define dso_local void @st_align32_uint32_t_uint8_t(ptr nocapture %ptr, i32 zeroext %str) {
4878 ; CHECK-P10-LABEL: st_align32_uint32_t_uint8_t:
4879 ; CHECK-P10: # %bb.0: # %entry
4880 ; CHECK-P10-NEXT: pstb r4, 99999000(r3), 0
4881 ; CHECK-P10-NEXT: blr
4883 ; CHECK-PREP10-LABEL: st_align32_uint32_t_uint8_t:
4884 ; CHECK-PREP10: # %bb.0: # %entry
4885 ; CHECK-PREP10-NEXT: lis r5, 1525
4886 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
4887 ; CHECK-PREP10-NEXT: stbx r4, r3, r5
4888 ; CHECK-PREP10-NEXT: blr
4890 %conv = trunc i32 %str to i8
4891 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
4892 store i8 %conv, ptr %add.ptr, align 1
4896 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4897 define dso_local void @st_align64_uint32_t_uint8_t(ptr nocapture %ptr, i32 zeroext %str) {
4898 ; CHECK-P10-LABEL: st_align64_uint32_t_uint8_t:
4899 ; CHECK-P10: # %bb.0: # %entry
4900 ; CHECK-P10-NEXT: pli r5, 244140625
4901 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
4902 ; CHECK-P10-NEXT: stbx r4, r3, r5
4903 ; CHECK-P10-NEXT: blr
4905 ; CHECK-PREP10-LABEL: st_align64_uint32_t_uint8_t:
4906 ; CHECK-PREP10: # %bb.0: # %entry
4907 ; CHECK-PREP10-NEXT: lis r5, 3725
4908 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
4909 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
4910 ; CHECK-PREP10-NEXT: stbx r4, r3, r5
4911 ; CHECK-PREP10-NEXT: blr
4913 %conv = trunc i32 %str to i8
4914 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
4915 store i8 %conv, ptr %add.ptr, align 1
4919 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4920 define dso_local void @st_reg_uint32_t_uint8_t(ptr nocapture %ptr, i64 %off, i32 zeroext %str) {
4921 ; CHECK-LABEL: st_reg_uint32_t_uint8_t:
4922 ; CHECK: # %bb.0: # %entry
4923 ; CHECK-NEXT: stbx r5, r3, r4
4926 %conv = trunc i32 %str to i8
4927 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
4928 store i8 %conv, ptr %add.ptr, align 1
4932 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4933 define dso_local void @st_or1_uint32_t_uint8_t(i64 %ptr, i8 zeroext %off, i32 zeroext %str) {
4934 ; CHECK-LABEL: st_or1_uint32_t_uint8_t:
4935 ; CHECK: # %bb.0: # %entry
4936 ; CHECK-NEXT: or r3, r4, r3
4937 ; CHECK-NEXT: stb r5, 0(r3)
4940 %conv = trunc i32 %str to i8
4941 %conv1 = zext i8 %off to i64
4942 %or = or i64 %conv1, %ptr
4943 %0 = inttoptr i64 %or to ptr
4944 store i8 %conv, ptr %0, align 1
4948 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4949 define dso_local void @st_not_disjoint16_uint32_t_uint8_t(i64 %ptr, i32 zeroext %str) {
4950 ; CHECK-LABEL: st_not_disjoint16_uint32_t_uint8_t:
4951 ; CHECK: # %bb.0: # %entry
4952 ; CHECK-NEXT: ori r3, r3, 6
4953 ; CHECK-NEXT: stb r4, 0(r3)
4956 %conv = trunc i32 %str to i8
4957 %or = or i64 %ptr, 6
4958 %0 = inttoptr i64 %or to ptr
4959 store i8 %conv, ptr %0, align 1
4963 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4964 define dso_local void @st_disjoint_align16_uint32_t_uint8_t(i64 %ptr, i32 zeroext %str) {
4965 ; CHECK-LABEL: st_disjoint_align16_uint32_t_uint8_t:
4966 ; CHECK: # %bb.0: # %entry
4967 ; CHECK-NEXT: rldicr r3, r3, 0, 51
4968 ; CHECK-NEXT: stb r4, 24(r3)
4971 %and = and i64 %ptr, -4096
4972 %conv = trunc i32 %str to i8
4973 %or = or i64 %and, 24
4974 %0 = inttoptr i64 %or to ptr
4975 store i8 %conv, ptr %0, align 8
4979 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4980 define dso_local void @st_not_disjoint32_uint32_t_uint8_t(i64 %ptr, i32 zeroext %str) {
4981 ; CHECK-LABEL: st_not_disjoint32_uint32_t_uint8_t:
4982 ; CHECK: # %bb.0: # %entry
4983 ; CHECK-NEXT: ori r3, r3, 34463
4984 ; CHECK-NEXT: oris r3, r3, 1
4985 ; CHECK-NEXT: stb r4, 0(r3)
4988 %conv = trunc i32 %str to i8
4989 %or = or i64 %ptr, 99999
4990 %0 = inttoptr i64 %or to ptr
4991 store i8 %conv, ptr %0, align 1
4995 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4996 define dso_local void @st_disjoint_align32_uint32_t_uint8_t(i64 %ptr, i32 zeroext %str) {
4997 ; CHECK-P10-LABEL: st_disjoint_align32_uint32_t_uint8_t:
4998 ; CHECK-P10: # %bb.0: # %entry
4999 ; CHECK-P10-NEXT: lis r5, -15264
5000 ; CHECK-P10-NEXT: and r3, r3, r5
5001 ; CHECK-P10-NEXT: pstb r4, 999990000(r3), 0
5002 ; CHECK-P10-NEXT: blr
5004 ; CHECK-PREP10-LABEL: st_disjoint_align32_uint32_t_uint8_t:
5005 ; CHECK-PREP10: # %bb.0: # %entry
5006 ; CHECK-PREP10-NEXT: lis r5, -15264
5007 ; CHECK-PREP10-NEXT: and r3, r3, r5
5008 ; CHECK-PREP10-NEXT: lis r5, 15258
5009 ; CHECK-PREP10-NEXT: ori r5, r5, 41712
5010 ; CHECK-PREP10-NEXT: stbx r4, r3, r5
5011 ; CHECK-PREP10-NEXT: blr
5013 %and = and i64 %ptr, -1000341504
5014 %conv = trunc i32 %str to i8
5015 %or = or i64 %and, 999990000
5016 %0 = inttoptr i64 %or to ptr
5017 store i8 %conv, ptr %0, align 16
5021 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5022 define dso_local void @st_not_disjoint64_uint32_t_uint8_t(i64 %ptr, i32 zeroext %str) {
5023 ; CHECK-P10-LABEL: st_not_disjoint64_uint32_t_uint8_t:
5024 ; CHECK-P10: # %bb.0: # %entry
5025 ; CHECK-P10-NEXT: pli r5, 232
5026 ; CHECK-P10-NEXT: pli r6, 3567587329
5027 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
5028 ; CHECK-P10-NEXT: or r3, r3, r6
5029 ; CHECK-P10-NEXT: stb r4, 0(r3)
5030 ; CHECK-P10-NEXT: blr
5032 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint32_t_uint8_t:
5033 ; CHECK-PREP10: # %bb.0: # %entry
5034 ; CHECK-PREP10-NEXT: li r5, 29
5035 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
5036 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
5037 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
5038 ; CHECK-PREP10-NEXT: or r3, r3, r5
5039 ; CHECK-PREP10-NEXT: stb r4, 0(r3)
5040 ; CHECK-PREP10-NEXT: blr
5042 %conv = trunc i32 %str to i8
5043 %or = or i64 %ptr, 1000000000001
5044 %0 = inttoptr i64 %or to ptr
5045 store i8 %conv, ptr %0, align 1
5049 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5050 define dso_local void @st_disjoint_align64_uint32_t_uint8_t(i64 %ptr, i32 zeroext %str) {
5051 ; CHECK-P10-LABEL: st_disjoint_align64_uint32_t_uint8_t:
5052 ; CHECK-P10: # %bb.0: # %entry
5053 ; CHECK-P10-NEXT: pli r5, 244140625
5054 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
5055 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
5056 ; CHECK-P10-NEXT: stbx r4, r3, r5
5057 ; CHECK-P10-NEXT: blr
5059 ; CHECK-PREP10-LABEL: st_disjoint_align64_uint32_t_uint8_t:
5060 ; CHECK-PREP10: # %bb.0: # %entry
5061 ; CHECK-PREP10-NEXT: lis r5, 3725
5062 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
5063 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
5064 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
5065 ; CHECK-PREP10-NEXT: stbx r4, r3, r5
5066 ; CHECK-PREP10-NEXT: blr
5068 %and = and i64 %ptr, -1099511627776
5069 %conv = trunc i32 %str to i8
5070 %or = or i64 %and, 1000000000000
5071 %0 = inttoptr i64 %or to ptr
5072 store i8 %conv, ptr %0, align 4096
5076 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5077 define dso_local void @st_cst_align16_uint32_t_uint8_t(i32 zeroext %str) {
5078 ; CHECK-LABEL: st_cst_align16_uint32_t_uint8_t:
5079 ; CHECK: # %bb.0: # %entry
5080 ; CHECK-NEXT: stb r3, 4080(0)
5083 %conv = trunc i32 %str to i8
5084 store i8 %conv, ptr inttoptr (i64 4080 to ptr), align 16
5088 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5089 define dso_local void @st_cst_align32_uint32_t_uint8_t(i32 zeroext %str) {
5090 ; CHECK-LABEL: st_cst_align32_uint32_t_uint8_t:
5091 ; CHECK: # %bb.0: # %entry
5092 ; CHECK-NEXT: lis r4, 153
5093 ; CHECK-NEXT: stb r3, -27108(r4)
5096 %conv = trunc i32 %str to i8
5097 store i8 %conv, ptr inttoptr (i64 9999900 to ptr), align 4
5101 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5102 define dso_local void @st_cst_align64_uint32_t_uint8_t(i32 zeroext %str) {
5103 ; CHECK-P10-LABEL: st_cst_align64_uint32_t_uint8_t:
5104 ; CHECK-P10: # %bb.0: # %entry
5105 ; CHECK-P10-NEXT: pli r4, 244140625
5106 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5107 ; CHECK-P10-NEXT: stb r3, 0(r4)
5108 ; CHECK-P10-NEXT: blr
5110 ; CHECK-PREP10-LABEL: st_cst_align64_uint32_t_uint8_t:
5111 ; CHECK-PREP10: # %bb.0: # %entry
5112 ; CHECK-PREP10-NEXT: lis r4, 3725
5113 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
5114 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
5115 ; CHECK-PREP10-NEXT: stb r3, 0(r4)
5116 ; CHECK-PREP10-NEXT: blr
5118 %conv = trunc i32 %str to i8
5119 store i8 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
5123 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5124 define dso_local void @st_0_uint32_t_uint16_t(i64 %ptr, i32 zeroext %str) {
5125 ; CHECK-LABEL: st_0_uint32_t_uint16_t:
5126 ; CHECK: # %bb.0: # %entry
5127 ; CHECK-NEXT: sth r4, 0(r3)
5130 %conv = trunc i32 %str to i16
5131 %0 = inttoptr i64 %ptr to ptr
5132 store i16 %conv, ptr %0, align 2
5136 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5137 define dso_local void @st_align16_uint32_t_uint16_t(ptr nocapture %ptr, i32 zeroext %str) {
5138 ; CHECK-LABEL: st_align16_uint32_t_uint16_t:
5139 ; CHECK: # %bb.0: # %entry
5140 ; CHECK-NEXT: sth r4, 8(r3)
5143 %conv = trunc i32 %str to i16
5144 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
5145 store i16 %conv, ptr %add.ptr, align 2
5149 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5150 define dso_local void @st_align32_uint32_t_uint16_t(ptr nocapture %ptr, i32 zeroext %str) {
5151 ; CHECK-P10-LABEL: st_align32_uint32_t_uint16_t:
5152 ; CHECK-P10: # %bb.0: # %entry
5153 ; CHECK-P10-NEXT: psth r4, 99999000(r3), 0
5154 ; CHECK-P10-NEXT: blr
5156 ; CHECK-PREP10-LABEL: st_align32_uint32_t_uint16_t:
5157 ; CHECK-PREP10: # %bb.0: # %entry
5158 ; CHECK-PREP10-NEXT: lis r5, 1525
5159 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
5160 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
5161 ; CHECK-PREP10-NEXT: blr
5163 %conv = trunc i32 %str to i16
5164 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
5165 store i16 %conv, ptr %add.ptr, align 2
5169 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5170 define dso_local void @st_align64_uint32_t_uint16_t(ptr nocapture %ptr, i32 zeroext %str) {
5171 ; CHECK-P10-LABEL: st_align64_uint32_t_uint16_t:
5172 ; CHECK-P10: # %bb.0: # %entry
5173 ; CHECK-P10-NEXT: pli r5, 244140625
5174 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
5175 ; CHECK-P10-NEXT: sthx r4, r3, r5
5176 ; CHECK-P10-NEXT: blr
5178 ; CHECK-PREP10-LABEL: st_align64_uint32_t_uint16_t:
5179 ; CHECK-PREP10: # %bb.0: # %entry
5180 ; CHECK-PREP10-NEXT: lis r5, 3725
5181 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
5182 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
5183 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
5184 ; CHECK-PREP10-NEXT: blr
5186 %conv = trunc i32 %str to i16
5187 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
5188 store i16 %conv, ptr %add.ptr, align 2
5192 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5193 define dso_local void @st_reg_uint32_t_uint16_t(ptr nocapture %ptr, i64 %off, i32 zeroext %str) {
5194 ; CHECK-LABEL: st_reg_uint32_t_uint16_t:
5195 ; CHECK: # %bb.0: # %entry
5196 ; CHECK-NEXT: sthx r5, r3, r4
5199 %conv = trunc i32 %str to i16
5200 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
5201 store i16 %conv, ptr %add.ptr, align 2
5205 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5206 define dso_local void @st_or1_uint32_t_uint16_t(i64 %ptr, i8 zeroext %off, i32 zeroext %str) {
5207 ; CHECK-LABEL: st_or1_uint32_t_uint16_t:
5208 ; CHECK: # %bb.0: # %entry
5209 ; CHECK-NEXT: or r3, r4, r3
5210 ; CHECK-NEXT: sth r5, 0(r3)
5213 %conv = trunc i32 %str to i16
5214 %conv1 = zext i8 %off to i64
5215 %or = or i64 %conv1, %ptr
5216 %0 = inttoptr i64 %or to ptr
5217 store i16 %conv, ptr %0, align 2
5221 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5222 define dso_local void @st_not_disjoint16_uint32_t_uint16_t(i64 %ptr, i32 zeroext %str) {
5223 ; CHECK-LABEL: st_not_disjoint16_uint32_t_uint16_t:
5224 ; CHECK: # %bb.0: # %entry
5225 ; CHECK-NEXT: ori r3, r3, 6
5226 ; CHECK-NEXT: sth r4, 0(r3)
5229 %conv = trunc i32 %str to i16
5230 %or = or i64 %ptr, 6
5231 %0 = inttoptr i64 %or to ptr
5232 store i16 %conv, ptr %0, align 2
5236 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5237 define dso_local void @st_disjoint_align16_uint32_t_uint16_t(i64 %ptr, i32 zeroext %str) {
5238 ; CHECK-LABEL: st_disjoint_align16_uint32_t_uint16_t:
5239 ; CHECK: # %bb.0: # %entry
5240 ; CHECK-NEXT: rldicr r3, r3, 0, 51
5241 ; CHECK-NEXT: sth r4, 24(r3)
5244 %and = and i64 %ptr, -4096
5245 %conv = trunc i32 %str to i16
5246 %or = or i64 %and, 24
5247 %0 = inttoptr i64 %or to ptr
5248 store i16 %conv, ptr %0, align 8
5252 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5253 define dso_local void @st_not_disjoint32_uint32_t_uint16_t(i64 %ptr, i32 zeroext %str) {
5254 ; CHECK-LABEL: st_not_disjoint32_uint32_t_uint16_t:
5255 ; CHECK: # %bb.0: # %entry
5256 ; CHECK-NEXT: ori r3, r3, 34463
5257 ; CHECK-NEXT: oris r3, r3, 1
5258 ; CHECK-NEXT: sth r4, 0(r3)
5261 %conv = trunc i32 %str to i16
5262 %or = or i64 %ptr, 99999
5263 %0 = inttoptr i64 %or to ptr
5264 store i16 %conv, ptr %0, align 2
5268 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5269 define dso_local void @st_disjoint_align32_uint32_t_uint16_t(i64 %ptr, i32 zeroext %str) {
5270 ; CHECK-P10-LABEL: st_disjoint_align32_uint32_t_uint16_t:
5271 ; CHECK-P10: # %bb.0: # %entry
5272 ; CHECK-P10-NEXT: lis r5, -15264
5273 ; CHECK-P10-NEXT: and r3, r3, r5
5274 ; CHECK-P10-NEXT: psth r4, 999990000(r3), 0
5275 ; CHECK-P10-NEXT: blr
5277 ; CHECK-PREP10-LABEL: st_disjoint_align32_uint32_t_uint16_t:
5278 ; CHECK-PREP10: # %bb.0: # %entry
5279 ; CHECK-PREP10-NEXT: lis r5, -15264
5280 ; CHECK-PREP10-NEXT: and r3, r3, r5
5281 ; CHECK-PREP10-NEXT: lis r5, 15258
5282 ; CHECK-PREP10-NEXT: ori r5, r5, 41712
5283 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
5284 ; CHECK-PREP10-NEXT: blr
5286 %and = and i64 %ptr, -1000341504
5287 %conv = trunc i32 %str to i16
5288 %or = or i64 %and, 999990000
5289 %0 = inttoptr i64 %or to ptr
5290 store i16 %conv, ptr %0, align 16
5294 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5295 define dso_local void @st_not_disjoint64_uint32_t_uint16_t(i64 %ptr, i32 zeroext %str) {
5296 ; CHECK-P10-LABEL: st_not_disjoint64_uint32_t_uint16_t:
5297 ; CHECK-P10: # %bb.0: # %entry
5298 ; CHECK-P10-NEXT: pli r5, 232
5299 ; CHECK-P10-NEXT: pli r6, 3567587329
5300 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
5301 ; CHECK-P10-NEXT: or r3, r3, r6
5302 ; CHECK-P10-NEXT: sth r4, 0(r3)
5303 ; CHECK-P10-NEXT: blr
5305 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint32_t_uint16_t:
5306 ; CHECK-PREP10: # %bb.0: # %entry
5307 ; CHECK-PREP10-NEXT: li r5, 29
5308 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
5309 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
5310 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
5311 ; CHECK-PREP10-NEXT: or r3, r3, r5
5312 ; CHECK-PREP10-NEXT: sth r4, 0(r3)
5313 ; CHECK-PREP10-NEXT: blr
5315 %conv = trunc i32 %str to i16
5316 %or = or i64 %ptr, 1000000000001
5317 %0 = inttoptr i64 %or to ptr
5318 store i16 %conv, ptr %0, align 2
5322 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5323 define dso_local void @st_disjoint_align64_uint32_t_uint16_t(i64 %ptr, i32 zeroext %str) {
5324 ; CHECK-P10-LABEL: st_disjoint_align64_uint32_t_uint16_t:
5325 ; CHECK-P10: # %bb.0: # %entry
5326 ; CHECK-P10-NEXT: pli r5, 244140625
5327 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
5328 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
5329 ; CHECK-P10-NEXT: sthx r4, r3, r5
5330 ; CHECK-P10-NEXT: blr
5332 ; CHECK-PREP10-LABEL: st_disjoint_align64_uint32_t_uint16_t:
5333 ; CHECK-PREP10: # %bb.0: # %entry
5334 ; CHECK-PREP10-NEXT: lis r5, 3725
5335 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
5336 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
5337 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
5338 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
5339 ; CHECK-PREP10-NEXT: blr
5341 %and = and i64 %ptr, -1099511627776
5342 %conv = trunc i32 %str to i16
5343 %or = or i64 %and, 1000000000000
5344 %0 = inttoptr i64 %or to ptr
5345 store i16 %conv, ptr %0, align 4096
5349 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5350 define dso_local void @st_cst_align16_uint32_t_uint16_t(i32 zeroext %str) {
5351 ; CHECK-LABEL: st_cst_align16_uint32_t_uint16_t:
5352 ; CHECK: # %bb.0: # %entry
5353 ; CHECK-NEXT: sth r3, 4080(0)
5356 %conv = trunc i32 %str to i16
5357 store i16 %conv, ptr inttoptr (i64 4080 to ptr), align 16
5361 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5362 define dso_local void @st_cst_align32_uint32_t_uint16_t(i32 zeroext %str) {
5363 ; CHECK-LABEL: st_cst_align32_uint32_t_uint16_t:
5364 ; CHECK: # %bb.0: # %entry
5365 ; CHECK-NEXT: lis r4, 153
5366 ; CHECK-NEXT: sth r3, -27108(r4)
5369 %conv = trunc i32 %str to i16
5370 store i16 %conv, ptr inttoptr (i64 9999900 to ptr), align 4
5374 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5375 define dso_local void @st_cst_align64_uint32_t_uint16_t(i32 zeroext %str) {
5376 ; CHECK-P10-LABEL: st_cst_align64_uint32_t_uint16_t:
5377 ; CHECK-P10: # %bb.0: # %entry
5378 ; CHECK-P10-NEXT: pli r4, 244140625
5379 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5380 ; CHECK-P10-NEXT: sth r3, 0(r4)
5381 ; CHECK-P10-NEXT: blr
5383 ; CHECK-PREP10-LABEL: st_cst_align64_uint32_t_uint16_t:
5384 ; CHECK-PREP10: # %bb.0: # %entry
5385 ; CHECK-PREP10-NEXT: lis r4, 3725
5386 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
5387 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
5388 ; CHECK-PREP10-NEXT: sth r3, 0(r4)
5389 ; CHECK-PREP10-NEXT: blr
5391 %conv = trunc i32 %str to i16
5392 store i16 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
5396 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5397 define dso_local void @st_0_uint32_t_uint32_t(i64 %ptr, i32 zeroext %str) {
5398 ; CHECK-LABEL: st_0_uint32_t_uint32_t:
5399 ; CHECK: # %bb.0: # %entry
5400 ; CHECK-NEXT: stw r4, 0(r3)
5403 %0 = inttoptr i64 %ptr to ptr
5404 store i32 %str, ptr %0, align 4
5408 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5409 define dso_local void @st_align16_uint32_t_uint32_t(ptr nocapture %ptr, i32 zeroext %str) {
5410 ; CHECK-LABEL: st_align16_uint32_t_uint32_t:
5411 ; CHECK: # %bb.0: # %entry
5412 ; CHECK-NEXT: stw r4, 8(r3)
5415 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
5416 store i32 %str, ptr %add.ptr, align 4
5420 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5421 define dso_local void @st_align32_uint32_t_uint32_t(ptr nocapture %ptr, i32 zeroext %str) {
5422 ; CHECK-P10-LABEL: st_align32_uint32_t_uint32_t:
5423 ; CHECK-P10: # %bb.0: # %entry
5424 ; CHECK-P10-NEXT: pstw r4, 99999000(r3), 0
5425 ; CHECK-P10-NEXT: blr
5427 ; CHECK-PREP10-LABEL: st_align32_uint32_t_uint32_t:
5428 ; CHECK-PREP10: # %bb.0: # %entry
5429 ; CHECK-PREP10-NEXT: lis r5, 1525
5430 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
5431 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
5432 ; CHECK-PREP10-NEXT: blr
5434 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
5435 store i32 %str, ptr %add.ptr, align 4
5439 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5440 define dso_local void @st_align64_uint32_t_uint32_t(ptr nocapture %ptr, i32 zeroext %str) {
5441 ; CHECK-P10-LABEL: st_align64_uint32_t_uint32_t:
5442 ; CHECK-P10: # %bb.0: # %entry
5443 ; CHECK-P10-NEXT: pli r5, 244140625
5444 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
5445 ; CHECK-P10-NEXT: stwx r4, r3, r5
5446 ; CHECK-P10-NEXT: blr
5448 ; CHECK-PREP10-LABEL: st_align64_uint32_t_uint32_t:
5449 ; CHECK-PREP10: # %bb.0: # %entry
5450 ; CHECK-PREP10-NEXT: lis r5, 3725
5451 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
5452 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
5453 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
5454 ; CHECK-PREP10-NEXT: blr
5456 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
5457 store i32 %str, ptr %add.ptr, align 4
5461 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5462 define dso_local void @st_reg_uint32_t_uint32_t(ptr nocapture %ptr, i64 %off, i32 zeroext %str) {
5463 ; CHECK-LABEL: st_reg_uint32_t_uint32_t:
5464 ; CHECK: # %bb.0: # %entry
5465 ; CHECK-NEXT: stwx r5, r3, r4
5468 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
5469 store i32 %str, ptr %add.ptr, align 4
5473 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5474 define dso_local void @st_or1_uint32_t_uint32_t(i64 %ptr, i8 zeroext %off, i32 zeroext %str) {
5475 ; CHECK-LABEL: st_or1_uint32_t_uint32_t:
5476 ; CHECK: # %bb.0: # %entry
5477 ; CHECK-NEXT: or r3, r4, r3
5478 ; CHECK-NEXT: stw r5, 0(r3)
5481 %conv = zext i8 %off to i64
5482 %or = or i64 %conv, %ptr
5483 %0 = inttoptr i64 %or to ptr
5484 store i32 %str, ptr %0, align 4
5488 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5489 define dso_local void @st_not_disjoint16_uint32_t_uint32_t(i64 %ptr, i32 zeroext %str) {
5490 ; CHECK-LABEL: st_not_disjoint16_uint32_t_uint32_t:
5491 ; CHECK: # %bb.0: # %entry
5492 ; CHECK-NEXT: ori r3, r3, 6
5493 ; CHECK-NEXT: stw r4, 0(r3)
5496 %or = or i64 %ptr, 6
5497 %0 = inttoptr i64 %or to ptr
5498 store i32 %str, ptr %0, align 4
5502 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5503 define dso_local void @st_disjoint_align16_uint32_t_uint32_t(i64 %ptr, i32 zeroext %str) {
5504 ; CHECK-LABEL: st_disjoint_align16_uint32_t_uint32_t:
5505 ; CHECK: # %bb.0: # %entry
5506 ; CHECK-NEXT: rldicr r3, r3, 0, 51
5507 ; CHECK-NEXT: stw r4, 24(r3)
5510 %and = and i64 %ptr, -4096
5511 %or = or i64 %and, 24
5512 %0 = inttoptr i64 %or to ptr
5513 store i32 %str, ptr %0, align 8
5517 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5518 define dso_local void @st_not_disjoint32_uint32_t_uint32_t(i64 %ptr, i32 zeroext %str) {
5519 ; CHECK-LABEL: st_not_disjoint32_uint32_t_uint32_t:
5520 ; CHECK: # %bb.0: # %entry
5521 ; CHECK-NEXT: ori r3, r3, 34463
5522 ; CHECK-NEXT: oris r3, r3, 1
5523 ; CHECK-NEXT: stw r4, 0(r3)
5526 %or = or i64 %ptr, 99999
5527 %0 = inttoptr i64 %or to ptr
5528 store i32 %str, ptr %0, align 4
5532 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5533 define dso_local void @st_disjoint_align32_uint32_t_uint32_t(i64 %ptr, i32 zeroext %str) {
5534 ; CHECK-P10-LABEL: st_disjoint_align32_uint32_t_uint32_t:
5535 ; CHECK-P10: # %bb.0: # %entry
5536 ; CHECK-P10-NEXT: lis r5, -15264
5537 ; CHECK-P10-NEXT: and r3, r3, r5
5538 ; CHECK-P10-NEXT: pstw r4, 999990000(r3), 0
5539 ; CHECK-P10-NEXT: blr
5541 ; CHECK-PREP10-LABEL: st_disjoint_align32_uint32_t_uint32_t:
5542 ; CHECK-PREP10: # %bb.0: # %entry
5543 ; CHECK-PREP10-NEXT: lis r5, -15264
5544 ; CHECK-PREP10-NEXT: and r3, r3, r5
5545 ; CHECK-PREP10-NEXT: lis r5, 15258
5546 ; CHECK-PREP10-NEXT: ori r5, r5, 41712
5547 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
5548 ; CHECK-PREP10-NEXT: blr
5550 %and = and i64 %ptr, -1000341504
5551 %or = or i64 %and, 999990000
5552 %0 = inttoptr i64 %or to ptr
5553 store i32 %str, ptr %0, align 16
5557 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5558 define dso_local void @st_not_disjoint64_uint32_t_uint32_t(i64 %ptr, i32 zeroext %str) {
5559 ; CHECK-P10-LABEL: st_not_disjoint64_uint32_t_uint32_t:
5560 ; CHECK-P10: # %bb.0: # %entry
5561 ; CHECK-P10-NEXT: pli r5, 232
5562 ; CHECK-P10-NEXT: pli r6, 3567587329
5563 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
5564 ; CHECK-P10-NEXT: or r3, r3, r6
5565 ; CHECK-P10-NEXT: stw r4, 0(r3)
5566 ; CHECK-P10-NEXT: blr
5568 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint32_t_uint32_t:
5569 ; CHECK-PREP10: # %bb.0: # %entry
5570 ; CHECK-PREP10-NEXT: li r5, 29
5571 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
5572 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
5573 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
5574 ; CHECK-PREP10-NEXT: or r3, r3, r5
5575 ; CHECK-PREP10-NEXT: stw r4, 0(r3)
5576 ; CHECK-PREP10-NEXT: blr
5578 %or = or i64 %ptr, 1000000000001
5579 %0 = inttoptr i64 %or to ptr
5580 store i32 %str, ptr %0, align 4
5584 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5585 define dso_local void @st_disjoint_align64_uint32_t_uint32_t(i64 %ptr, i32 zeroext %str) {
5586 ; CHECK-P10-LABEL: st_disjoint_align64_uint32_t_uint32_t:
5587 ; CHECK-P10: # %bb.0: # %entry
5588 ; CHECK-P10-NEXT: pli r5, 244140625
5589 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
5590 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
5591 ; CHECK-P10-NEXT: stwx r4, r3, r5
5592 ; CHECK-P10-NEXT: blr
5594 ; CHECK-PREP10-LABEL: st_disjoint_align64_uint32_t_uint32_t:
5595 ; CHECK-PREP10: # %bb.0: # %entry
5596 ; CHECK-PREP10-NEXT: lis r5, 3725
5597 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
5598 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
5599 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
5600 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
5601 ; CHECK-PREP10-NEXT: blr
5603 %and = and i64 %ptr, -1099511627776
5604 %or = or i64 %and, 1000000000000
5605 %0 = inttoptr i64 %or to ptr
5606 store i32 %str, ptr %0, align 4096
5610 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5611 define dso_local void @st_cst_align16_uint32_t_uint32_t(i32 zeroext %str) {
5612 ; CHECK-LABEL: st_cst_align16_uint32_t_uint32_t:
5613 ; CHECK: # %bb.0: # %entry
5614 ; CHECK-NEXT: stw r3, 4080(0)
5617 store i32 %str, ptr inttoptr (i64 4080 to ptr), align 16
5621 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5622 define dso_local void @st_cst_align32_uint32_t_uint32_t(i32 zeroext %str) {
5623 ; CHECK-LABEL: st_cst_align32_uint32_t_uint32_t:
5624 ; CHECK: # %bb.0: # %entry
5625 ; CHECK-NEXT: lis r4, 153
5626 ; CHECK-NEXT: stw r3, -27108(r4)
5629 store i32 %str, ptr inttoptr (i64 9999900 to ptr), align 4
5633 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5634 define dso_local void @st_cst_align64_uint32_t_uint32_t(i32 zeroext %str) {
5635 ; CHECK-P10-LABEL: st_cst_align64_uint32_t_uint32_t:
5636 ; CHECK-P10: # %bb.0: # %entry
5637 ; CHECK-P10-NEXT: pli r4, 244140625
5638 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5639 ; CHECK-P10-NEXT: stw r3, 0(r4)
5640 ; CHECK-P10-NEXT: blr
5642 ; CHECK-PREP10-LABEL: st_cst_align64_uint32_t_uint32_t:
5643 ; CHECK-PREP10: # %bb.0: # %entry
5644 ; CHECK-PREP10-NEXT: lis r4, 3725
5645 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
5646 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
5647 ; CHECK-PREP10-NEXT: stw r3, 0(r4)
5648 ; CHECK-PREP10-NEXT: blr
5650 store i32 %str, ptr inttoptr (i64 1000000000000 to ptr), align 4096
5654 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5655 define dso_local void @st_0_uint32_t_uint64_t(i64 %ptr, i32 zeroext %str) {
5656 ; CHECK-LABEL: st_0_uint32_t_uint64_t:
5657 ; CHECK: # %bb.0: # %entry
5658 ; CHECK-NEXT: std r4, 0(r3)
5661 %conv = zext i32 %str to i64
5662 %0 = inttoptr i64 %ptr to ptr
5663 store i64 %conv, ptr %0, align 8
5667 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5668 define dso_local void @st_align16_uint32_t_uint64_t(ptr nocapture %ptr, i32 zeroext %str) {
5669 ; CHECK-LABEL: st_align16_uint32_t_uint64_t:
5670 ; CHECK: # %bb.0: # %entry
5671 ; CHECK-NEXT: std r4, 8(r3)
5674 %conv = zext i32 %str to i64
5675 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
5676 store i64 %conv, ptr %add.ptr, align 8
5680 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5681 define dso_local void @st_align32_uint32_t_uint64_t(ptr nocapture %ptr, i32 zeroext %str) {
5682 ; CHECK-P10-LABEL: st_align32_uint32_t_uint64_t:
5683 ; CHECK-P10: # %bb.0: # %entry
5684 ; CHECK-P10-NEXT: pstd r4, 99999000(r3), 0
5685 ; CHECK-P10-NEXT: blr
5687 ; CHECK-PREP10-LABEL: st_align32_uint32_t_uint64_t:
5688 ; CHECK-PREP10: # %bb.0: # %entry
5689 ; CHECK-PREP10-NEXT: lis r5, 1525
5690 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
5691 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
5692 ; CHECK-PREP10-NEXT: blr
5694 %conv = zext i32 %str to i64
5695 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
5696 store i64 %conv, ptr %add.ptr, align 8
5700 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5701 define dso_local void @st_align64_uint32_t_uint64_t(ptr nocapture %ptr, i32 zeroext %str) {
5702 ; CHECK-P10-LABEL: st_align64_uint32_t_uint64_t:
5703 ; CHECK-P10: # %bb.0: # %entry
5704 ; CHECK-P10-NEXT: pli r5, 244140625
5705 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
5706 ; CHECK-P10-NEXT: stdx r4, r3, r5
5707 ; CHECK-P10-NEXT: blr
5709 ; CHECK-PREP10-LABEL: st_align64_uint32_t_uint64_t:
5710 ; CHECK-PREP10: # %bb.0: # %entry
5711 ; CHECK-PREP10-NEXT: lis r5, 3725
5712 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
5713 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
5714 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
5715 ; CHECK-PREP10-NEXT: blr
5717 %conv = zext i32 %str to i64
5718 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
5719 store i64 %conv, ptr %add.ptr, align 8
5723 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5724 define dso_local void @st_reg_uint32_t_uint64_t(ptr nocapture %ptr, i64 %off, i32 zeroext %str) {
5725 ; CHECK-LABEL: st_reg_uint32_t_uint64_t:
5726 ; CHECK: # %bb.0: # %entry
5727 ; CHECK-NEXT: stdx r5, r3, r4
5730 %conv = zext i32 %str to i64
5731 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
5732 store i64 %conv, ptr %add.ptr, align 8
5736 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5737 define dso_local void @st_or1_uint32_t_uint64_t(i64 %ptr, i8 zeroext %off, i32 zeroext %str) {
5738 ; CHECK-LABEL: st_or1_uint32_t_uint64_t:
5739 ; CHECK: # %bb.0: # %entry
5740 ; CHECK-NEXT: or r3, r4, r3
5741 ; CHECK-NEXT: std r5, 0(r3)
5744 %conv = zext i32 %str to i64
5745 %conv1 = zext i8 %off to i64
5746 %or = or i64 %conv1, %ptr
5747 %0 = inttoptr i64 %or to ptr
5748 store i64 %conv, ptr %0, align 8
5752 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5753 define dso_local void @st_not_disjoint16_uint32_t_uint64_t(i64 %ptr, i32 zeroext %str) {
5754 ; CHECK-LABEL: st_not_disjoint16_uint32_t_uint64_t:
5755 ; CHECK: # %bb.0: # %entry
5756 ; CHECK-NEXT: ori r3, r3, 6
5757 ; CHECK-NEXT: std r4, 0(r3)
5760 %conv = zext i32 %str to i64
5761 %or = or i64 %ptr, 6
5762 %0 = inttoptr i64 %or to ptr
5763 store i64 %conv, ptr %0, align 8
5767 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5768 define dso_local void @st_disjoint_align16_uint32_t_uint64_t(i64 %ptr, i32 zeroext %str) {
5769 ; CHECK-LABEL: st_disjoint_align16_uint32_t_uint64_t:
5770 ; CHECK: # %bb.0: # %entry
5771 ; CHECK-NEXT: rldicr r3, r3, 0, 51
5772 ; CHECK-NEXT: std r4, 24(r3)
5775 %and = and i64 %ptr, -4096
5776 %conv = zext i32 %str to i64
5777 %or = or i64 %and, 24
5778 %0 = inttoptr i64 %or to ptr
5779 store i64 %conv, ptr %0, align 8
5783 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5784 define dso_local void @st_not_disjoint32_uint32_t_uint64_t(i64 %ptr, i32 zeroext %str) {
5785 ; CHECK-LABEL: st_not_disjoint32_uint32_t_uint64_t:
5786 ; CHECK: # %bb.0: # %entry
5787 ; CHECK-NEXT: ori r3, r3, 34463
5788 ; CHECK-NEXT: oris r3, r3, 1
5789 ; CHECK-NEXT: std r4, 0(r3)
5792 %conv = zext i32 %str to i64
5793 %or = or i64 %ptr, 99999
5794 %0 = inttoptr i64 %or to ptr
5795 store i64 %conv, ptr %0, align 8
5799 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5800 define dso_local void @st_disjoint_align32_uint32_t_uint64_t(i64 %ptr, i32 zeroext %str) {
5801 ; CHECK-P10-LABEL: st_disjoint_align32_uint32_t_uint64_t:
5802 ; CHECK-P10: # %bb.0: # %entry
5803 ; CHECK-P10-NEXT: lis r5, -15264
5804 ; CHECK-P10-NEXT: and r3, r3, r5
5805 ; CHECK-P10-NEXT: pstd r4, 999990000(r3), 0
5806 ; CHECK-P10-NEXT: blr
5808 ; CHECK-PREP10-LABEL: st_disjoint_align32_uint32_t_uint64_t:
5809 ; CHECK-PREP10: # %bb.0: # %entry
5810 ; CHECK-PREP10-NEXT: lis r5, -15264
5811 ; CHECK-PREP10-NEXT: and r3, r3, r5
5812 ; CHECK-PREP10-NEXT: lis r5, 15258
5813 ; CHECK-PREP10-NEXT: ori r5, r5, 41712
5814 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
5815 ; CHECK-PREP10-NEXT: blr
5817 %and = and i64 %ptr, -1000341504
5818 %conv = zext i32 %str to i64
5819 %or = or i64 %and, 999990000
5820 %0 = inttoptr i64 %or to ptr
5821 store i64 %conv, ptr %0, align 16
5825 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5826 define dso_local void @st_not_disjoint64_uint32_t_uint64_t(i64 %ptr, i32 zeroext %str) {
5827 ; CHECK-P10-LABEL: st_not_disjoint64_uint32_t_uint64_t:
5828 ; CHECK-P10: # %bb.0: # %entry
5829 ; CHECK-P10-NEXT: pli r5, 232
5830 ; CHECK-P10-NEXT: pli r6, 3567587329
5831 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
5832 ; CHECK-P10-NEXT: or r3, r3, r6
5833 ; CHECK-P10-NEXT: std r4, 0(r3)
5834 ; CHECK-P10-NEXT: blr
5836 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint32_t_uint64_t:
5837 ; CHECK-PREP10: # %bb.0: # %entry
5838 ; CHECK-PREP10-NEXT: li r5, 29
5839 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
5840 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
5841 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
5842 ; CHECK-PREP10-NEXT: or r3, r3, r5
5843 ; CHECK-PREP10-NEXT: std r4, 0(r3)
5844 ; CHECK-PREP10-NEXT: blr
5846 %conv = zext i32 %str to i64
5847 %or = or i64 %ptr, 1000000000001
5848 %0 = inttoptr i64 %or to ptr
5849 store i64 %conv, ptr %0, align 8
5853 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5854 define dso_local void @st_disjoint_align64_uint32_t_uint64_t(i64 %ptr, i32 zeroext %str) {
5855 ; CHECK-P10-LABEL: st_disjoint_align64_uint32_t_uint64_t:
5856 ; CHECK-P10: # %bb.0: # %entry
5857 ; CHECK-P10-NEXT: pli r5, 244140625
5858 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
5859 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
5860 ; CHECK-P10-NEXT: stdx r4, r3, r5
5861 ; CHECK-P10-NEXT: blr
5863 ; CHECK-PREP10-LABEL: st_disjoint_align64_uint32_t_uint64_t:
5864 ; CHECK-PREP10: # %bb.0: # %entry
5865 ; CHECK-PREP10-NEXT: lis r5, 3725
5866 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
5867 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
5868 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
5869 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
5870 ; CHECK-PREP10-NEXT: blr
5872 %and = and i64 %ptr, -1099511627776
5873 %conv = zext i32 %str to i64
5874 %or = or i64 %and, 1000000000000
5875 %0 = inttoptr i64 %or to ptr
5876 store i64 %conv, ptr %0, align 4096
5880 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5881 define dso_local void @st_cst_align16_uint32_t_uint64_t(i32 zeroext %str) {
5882 ; CHECK-LABEL: st_cst_align16_uint32_t_uint64_t:
5883 ; CHECK: # %bb.0: # %entry
5884 ; CHECK-NEXT: std r3, 4080(0)
5887 %conv = zext i32 %str to i64
5888 store i64 %conv, ptr inttoptr (i64 4080 to ptr), align 16
5892 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5893 define dso_local void @st_cst_align32_uint32_t_uint64_t(i32 zeroext %str) {
5894 ; CHECK-LABEL: st_cst_align32_uint32_t_uint64_t:
5895 ; CHECK: # %bb.0: # %entry
5896 ; CHECK-NEXT: lis r4, 153
5897 ; CHECK-NEXT: std r3, -27108(r4)
5900 %conv = zext i32 %str to i64
5901 store i64 %conv, ptr inttoptr (i64 9999900 to ptr), align 8
5905 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5906 define dso_local void @st_cst_align64_uint32_t_uint64_t(i32 zeroext %str) {
5907 ; CHECK-P10-LABEL: st_cst_align64_uint32_t_uint64_t:
5908 ; CHECK-P10: # %bb.0: # %entry
5909 ; CHECK-P10-NEXT: pli r4, 244140625
5910 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5911 ; CHECK-P10-NEXT: std r3, 0(r4)
5912 ; CHECK-P10-NEXT: blr
5914 ; CHECK-PREP10-LABEL: st_cst_align64_uint32_t_uint64_t:
5915 ; CHECK-PREP10: # %bb.0: # %entry
5916 ; CHECK-PREP10-NEXT: lis r4, 3725
5917 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
5918 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
5919 ; CHECK-PREP10-NEXT: std r3, 0(r4)
5920 ; CHECK-PREP10-NEXT: blr
5922 %conv = zext i32 %str to i64
5923 store i64 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
5927 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5928 define dso_local void @st_0_uint32_t_float(i64 %ptr, i32 zeroext %str) {
5929 ; CHECK-LABEL: st_0_uint32_t_float:
5930 ; CHECK: # %bb.0: # %entry
5931 ; CHECK-NEXT: mtfprwz f0, r4
5932 ; CHECK-NEXT: xscvuxdsp f0, f0
5933 ; CHECK-NEXT: stfs f0, 0(r3)
5936 %conv = uitofp i32 %str to float
5937 %0 = inttoptr i64 %ptr to ptr
5938 store float %conv, ptr %0, align 4
5942 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5943 define dso_local void @st_align16_uint32_t_float(ptr nocapture %ptr, i32 zeroext %str) {
5944 ; CHECK-LABEL: st_align16_uint32_t_float:
5945 ; CHECK: # %bb.0: # %entry
5946 ; CHECK-NEXT: mtfprwz f0, r4
5947 ; CHECK-NEXT: xscvuxdsp f0, f0
5948 ; CHECK-NEXT: stfs f0, 8(r3)
5951 %conv = uitofp i32 %str to float
5952 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
5953 store float %conv, ptr %add.ptr, align 4
5957 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5958 define dso_local void @st_align32_uint32_t_float(ptr nocapture %ptr, i32 zeroext %str) {
5959 ; CHECK-P10-LABEL: st_align32_uint32_t_float:
5960 ; CHECK-P10: # %bb.0: # %entry
5961 ; CHECK-P10-NEXT: mtfprwz f0, r4
5962 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
5963 ; CHECK-P10-NEXT: pstfs f0, 99999000(r3), 0
5964 ; CHECK-P10-NEXT: blr
5966 ; CHECK-P9-LABEL: st_align32_uint32_t_float:
5967 ; CHECK-P9: # %bb.0: # %entry
5968 ; CHECK-P9-NEXT: mtfprwz f0, r4
5969 ; CHECK-P9-NEXT: lis r4, 1525
5970 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
5971 ; CHECK-P9-NEXT: ori r4, r4, 56600
5972 ; CHECK-P9-NEXT: stfsx f0, r3, r4
5973 ; CHECK-P9-NEXT: blr
5975 ; CHECK-P8-LABEL: st_align32_uint32_t_float:
5976 ; CHECK-P8: # %bb.0: # %entry
5977 ; CHECK-P8-NEXT: mtfprwz f0, r4
5978 ; CHECK-P8-NEXT: lis r4, 1525
5979 ; CHECK-P8-NEXT: ori r4, r4, 56600
5980 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
5981 ; CHECK-P8-NEXT: stfsx f0, r3, r4
5982 ; CHECK-P8-NEXT: blr
5984 %conv = uitofp i32 %str to float
5985 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
5986 store float %conv, ptr %add.ptr, align 4
5990 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5991 define dso_local void @st_align64_uint32_t_float(ptr nocapture %ptr, i32 zeroext %str) {
5992 ; CHECK-P10-LABEL: st_align64_uint32_t_float:
5993 ; CHECK-P10: # %bb.0: # %entry
5994 ; CHECK-P10-NEXT: mtfprwz f0, r4
5995 ; CHECK-P10-NEXT: pli r4, 244140625
5996 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5997 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
5998 ; CHECK-P10-NEXT: stfsx f0, r3, r4
5999 ; CHECK-P10-NEXT: blr
6001 ; CHECK-P9-LABEL: st_align64_uint32_t_float:
6002 ; CHECK-P9: # %bb.0: # %entry
6003 ; CHECK-P9-NEXT: mtfprwz f0, r4
6004 ; CHECK-P9-NEXT: lis r4, 3725
6005 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
6006 ; CHECK-P9-NEXT: ori r4, r4, 19025
6007 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
6008 ; CHECK-P9-NEXT: stfsx f0, r3, r4
6009 ; CHECK-P9-NEXT: blr
6011 ; CHECK-P8-LABEL: st_align64_uint32_t_float:
6012 ; CHECK-P8: # %bb.0: # %entry
6013 ; CHECK-P8-NEXT: mtfprwz f0, r4
6014 ; CHECK-P8-NEXT: lis r4, 3725
6015 ; CHECK-P8-NEXT: ori r4, r4, 19025
6016 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
6017 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
6018 ; CHECK-P8-NEXT: stfsx f0, r3, r4
6019 ; CHECK-P8-NEXT: blr
6021 %conv = uitofp i32 %str to float
6022 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
6023 store float %conv, ptr %add.ptr, align 4
6027 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6028 define dso_local void @st_reg_uint32_t_float(ptr nocapture %ptr, i64 %off, i32 zeroext %str) {
6029 ; CHECK-LABEL: st_reg_uint32_t_float:
6030 ; CHECK: # %bb.0: # %entry
6031 ; CHECK-NEXT: mtfprwz f0, r5
6032 ; CHECK-NEXT: xscvuxdsp f0, f0
6033 ; CHECK-NEXT: stfsx f0, r3, r4
6036 %conv = uitofp i32 %str to float
6037 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
6038 store float %conv, ptr %add.ptr, align 4
6042 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6043 define dso_local void @st_or1_uint32_t_float(i64 %ptr, i8 zeroext %off, i32 zeroext %str) {
6044 ; CHECK-LABEL: st_or1_uint32_t_float:
6045 ; CHECK: # %bb.0: # %entry
6046 ; CHECK-NEXT: mtfprwz f0, r5
6047 ; CHECK-NEXT: or r3, r4, r3
6048 ; CHECK-NEXT: xscvuxdsp f0, f0
6049 ; CHECK-NEXT: stfs f0, 0(r3)
6052 %conv = uitofp i32 %str to float
6053 %conv1 = zext i8 %off to i64
6054 %or = or i64 %conv1, %ptr
6055 %0 = inttoptr i64 %or to ptr
6056 store float %conv, ptr %0, align 4
6060 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6061 define dso_local void @st_not_disjoint16_uint32_t_float(i64 %ptr, i32 zeroext %str) {
6062 ; CHECK-LABEL: st_not_disjoint16_uint32_t_float:
6063 ; CHECK: # %bb.0: # %entry
6064 ; CHECK-NEXT: mtfprwz f0, r4
6065 ; CHECK-NEXT: ori r3, r3, 6
6066 ; CHECK-NEXT: xscvuxdsp f0, f0
6067 ; CHECK-NEXT: stfs f0, 0(r3)
6070 %conv = uitofp i32 %str to float
6071 %or = or i64 %ptr, 6
6072 %0 = inttoptr i64 %or to ptr
6073 store float %conv, ptr %0, align 4
6077 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6078 define dso_local void @st_disjoint_align16_uint32_t_float(i64 %ptr, i32 zeroext %str) {
6079 ; CHECK-LABEL: st_disjoint_align16_uint32_t_float:
6080 ; CHECK: # %bb.0: # %entry
6081 ; CHECK-NEXT: mtfprwz f0, r4
6082 ; CHECK-NEXT: rldicr r3, r3, 0, 51
6083 ; CHECK-NEXT: xscvuxdsp f0, f0
6084 ; CHECK-NEXT: stfs f0, 24(r3)
6087 %and = and i64 %ptr, -4096
6088 %conv = uitofp i32 %str to float
6089 %or = or i64 %and, 24
6090 %0 = inttoptr i64 %or to ptr
6091 store float %conv, ptr %0, align 8
6095 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6096 define dso_local void @st_not_disjoint32_uint32_t_float(i64 %ptr, i32 zeroext %str) {
6097 ; CHECK-P10-LABEL: st_not_disjoint32_uint32_t_float:
6098 ; CHECK-P10: # %bb.0: # %entry
6099 ; CHECK-P10-NEXT: mtfprwz f0, r4
6100 ; CHECK-P10-NEXT: ori r3, r3, 34463
6101 ; CHECK-P10-NEXT: oris r3, r3, 1
6102 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
6103 ; CHECK-P10-NEXT: stfs f0, 0(r3)
6104 ; CHECK-P10-NEXT: blr
6106 ; CHECK-P9-LABEL: st_not_disjoint32_uint32_t_float:
6107 ; CHECK-P9: # %bb.0: # %entry
6108 ; CHECK-P9-NEXT: mtfprwz f0, r4
6109 ; CHECK-P9-NEXT: ori r3, r3, 34463
6110 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
6111 ; CHECK-P9-NEXT: oris r3, r3, 1
6112 ; CHECK-P9-NEXT: stfs f0, 0(r3)
6113 ; CHECK-P9-NEXT: blr
6115 ; CHECK-P8-LABEL: st_not_disjoint32_uint32_t_float:
6116 ; CHECK-P8: # %bb.0: # %entry
6117 ; CHECK-P8-NEXT: mtfprwz f0, r4
6118 ; CHECK-P8-NEXT: ori r3, r3, 34463
6119 ; CHECK-P8-NEXT: oris r3, r3, 1
6120 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
6121 ; CHECK-P8-NEXT: stfs f0, 0(r3)
6122 ; CHECK-P8-NEXT: blr
6124 %conv = uitofp i32 %str to float
6125 %or = or i64 %ptr, 99999
6126 %0 = inttoptr i64 %or to ptr
6127 store float %conv, ptr %0, align 4
6131 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6132 define dso_local void @st_disjoint_align32_uint32_t_float(i64 %ptr, i32 zeroext %str) {
6133 ; CHECK-P10-LABEL: st_disjoint_align32_uint32_t_float:
6134 ; CHECK-P10: # %bb.0: # %entry
6135 ; CHECK-P10-NEXT: mtfprwz f0, r4
6136 ; CHECK-P10-NEXT: lis r5, -15264
6137 ; CHECK-P10-NEXT: and r3, r3, r5
6138 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
6139 ; CHECK-P10-NEXT: pstfs f0, 999990000(r3), 0
6140 ; CHECK-P10-NEXT: blr
6142 ; CHECK-P9-LABEL: st_disjoint_align32_uint32_t_float:
6143 ; CHECK-P9: # %bb.0: # %entry
6144 ; CHECK-P9-NEXT: mtfprwz f0, r4
6145 ; CHECK-P9-NEXT: lis r5, -15264
6146 ; CHECK-P9-NEXT: lis r4, 15258
6147 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
6148 ; CHECK-P9-NEXT: and r3, r3, r5
6149 ; CHECK-P9-NEXT: ori r4, r4, 41712
6150 ; CHECK-P9-NEXT: stfsx f0, r3, r4
6151 ; CHECK-P9-NEXT: blr
6153 ; CHECK-P8-LABEL: st_disjoint_align32_uint32_t_float:
6154 ; CHECK-P8: # %bb.0: # %entry
6155 ; CHECK-P8-NEXT: mtfprwz f0, r4
6156 ; CHECK-P8-NEXT: lis r5, -15264
6157 ; CHECK-P8-NEXT: lis r4, 15258
6158 ; CHECK-P8-NEXT: and r3, r3, r5
6159 ; CHECK-P8-NEXT: ori r4, r4, 41712
6160 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
6161 ; CHECK-P8-NEXT: stfsx f0, r3, r4
6162 ; CHECK-P8-NEXT: blr
6164 %and = and i64 %ptr, -1000341504
6165 %conv = uitofp i32 %str to float
6166 %or = or i64 %and, 999990000
6167 %0 = inttoptr i64 %or to ptr
6168 store float %conv, ptr %0, align 16
6172 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6173 define dso_local void @st_not_disjoint64_uint32_t_float(i64 %ptr, i32 zeroext %str) {
6174 ; CHECK-P10-LABEL: st_not_disjoint64_uint32_t_float:
6175 ; CHECK-P10: # %bb.0: # %entry
6176 ; CHECK-P10-NEXT: mtfprwz f0, r4
6177 ; CHECK-P10-NEXT: pli r4, 232
6178 ; CHECK-P10-NEXT: pli r5, 3567587329
6179 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
6180 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
6181 ; CHECK-P10-NEXT: or r3, r3, r5
6182 ; CHECK-P10-NEXT: stfs f0, 0(r3)
6183 ; CHECK-P10-NEXT: blr
6185 ; CHECK-P9-LABEL: st_not_disjoint64_uint32_t_float:
6186 ; CHECK-P9: # %bb.0: # %entry
6187 ; CHECK-P9-NEXT: mtfprwz f0, r4
6188 ; CHECK-P9-NEXT: li r4, 29
6189 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
6190 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
6191 ; CHECK-P9-NEXT: oris r4, r4, 54437
6192 ; CHECK-P9-NEXT: ori r4, r4, 4097
6193 ; CHECK-P9-NEXT: or r3, r3, r4
6194 ; CHECK-P9-NEXT: stfs f0, 0(r3)
6195 ; CHECK-P9-NEXT: blr
6197 ; CHECK-P8-LABEL: st_not_disjoint64_uint32_t_float:
6198 ; CHECK-P8: # %bb.0: # %entry
6199 ; CHECK-P8-NEXT: mtfprwz f0, r4
6200 ; CHECK-P8-NEXT: li r4, 29
6201 ; CHECK-P8-NEXT: rldic r4, r4, 35, 24
6202 ; CHECK-P8-NEXT: oris r4, r4, 54437
6203 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
6204 ; CHECK-P8-NEXT: ori r4, r4, 4097
6205 ; CHECK-P8-NEXT: or r3, r3, r4
6206 ; CHECK-P8-NEXT: stfs f0, 0(r3)
6207 ; CHECK-P8-NEXT: blr
6209 %conv = uitofp i32 %str to float
6210 %or = or i64 %ptr, 1000000000001
6211 %0 = inttoptr i64 %or to ptr
6212 store float %conv, ptr %0, align 4
6216 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6217 define dso_local void @st_disjoint_align64_uint32_t_float(i64 %ptr, i32 zeroext %str) {
6218 ; CHECK-P10-LABEL: st_disjoint_align64_uint32_t_float:
6219 ; CHECK-P10: # %bb.0: # %entry
6220 ; CHECK-P10-NEXT: mtfprwz f0, r4
6221 ; CHECK-P10-NEXT: pli r4, 244140625
6222 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
6223 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6224 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
6225 ; CHECK-P10-NEXT: stfsx f0, r3, r4
6226 ; CHECK-P10-NEXT: blr
6228 ; CHECK-P9-LABEL: st_disjoint_align64_uint32_t_float:
6229 ; CHECK-P9: # %bb.0: # %entry
6230 ; CHECK-P9-NEXT: mtfprwz f0, r4
6231 ; CHECK-P9-NEXT: lis r4, 3725
6232 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
6233 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
6234 ; CHECK-P9-NEXT: ori r4, r4, 19025
6235 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
6236 ; CHECK-P9-NEXT: stfsx f0, r3, r4
6237 ; CHECK-P9-NEXT: blr
6239 ; CHECK-P8-LABEL: st_disjoint_align64_uint32_t_float:
6240 ; CHECK-P8: # %bb.0: # %entry
6241 ; CHECK-P8-NEXT: mtfprwz f0, r4
6242 ; CHECK-P8-NEXT: lis r4, 3725
6243 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
6244 ; CHECK-P8-NEXT: ori r4, r4, 19025
6245 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
6246 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
6247 ; CHECK-P8-NEXT: stfsx f0, r3, r4
6248 ; CHECK-P8-NEXT: blr
6250 %and = and i64 %ptr, -1099511627776
6251 %conv = uitofp i32 %str to float
6252 %or = or i64 %and, 1000000000000
6253 %0 = inttoptr i64 %or to ptr
6254 store float %conv, ptr %0, align 4096
6258 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6259 define dso_local void @st_cst_align16_uint32_t_float(i32 zeroext %str) {
6260 ; CHECK-LABEL: st_cst_align16_uint32_t_float:
6261 ; CHECK: # %bb.0: # %entry
6262 ; CHECK-NEXT: mtfprwz f0, r3
6263 ; CHECK-NEXT: xscvuxdsp f0, f0
6264 ; CHECK-NEXT: stfs f0, 4080(0)
6267 %conv = uitofp i32 %str to float
6268 store float %conv, ptr inttoptr (i64 4080 to ptr), align 16
6272 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6273 define dso_local void @st_cst_align32_uint32_t_float(i32 zeroext %str) {
6274 ; CHECK-LABEL: st_cst_align32_uint32_t_float:
6275 ; CHECK: # %bb.0: # %entry
6276 ; CHECK-NEXT: mtfprwz f0, r3
6277 ; CHECK-NEXT: lis r3, 153
6278 ; CHECK-NEXT: xscvuxdsp f0, f0
6279 ; CHECK-NEXT: stfs f0, -27108(r3)
6282 %conv = uitofp i32 %str to float
6283 store float %conv, ptr inttoptr (i64 9999900 to ptr), align 4
6287 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6288 define dso_local void @st_cst_align64_uint32_t_float(i32 zeroext %str) {
6289 ; CHECK-P10-LABEL: st_cst_align64_uint32_t_float:
6290 ; CHECK-P10: # %bb.0: # %entry
6291 ; CHECK-P10-NEXT: mtfprwz f0, r3
6292 ; CHECK-P10-NEXT: pli r3, 244140625
6293 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
6294 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
6295 ; CHECK-P10-NEXT: stfs f0, 0(r3)
6296 ; CHECK-P10-NEXT: blr
6298 ; CHECK-P9-LABEL: st_cst_align64_uint32_t_float:
6299 ; CHECK-P9: # %bb.0: # %entry
6300 ; CHECK-P9-NEXT: mtfprwz f0, r3
6301 ; CHECK-P9-NEXT: lis r3, 3725
6302 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
6303 ; CHECK-P9-NEXT: ori r3, r3, 19025
6304 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
6305 ; CHECK-P9-NEXT: stfs f0, 0(r3)
6306 ; CHECK-P9-NEXT: blr
6308 ; CHECK-P8-LABEL: st_cst_align64_uint32_t_float:
6309 ; CHECK-P8: # %bb.0: # %entry
6310 ; CHECK-P8-NEXT: mtfprwz f0, r3
6311 ; CHECK-P8-NEXT: lis r3, 3725
6312 ; CHECK-P8-NEXT: ori r3, r3, 19025
6313 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
6314 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
6315 ; CHECK-P8-NEXT: stfs f0, 0(r3)
6316 ; CHECK-P8-NEXT: blr
6318 %conv = uitofp i32 %str to float
6319 store float %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
6323 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6324 define dso_local void @st_0_uint32_t_double(i64 %ptr, i32 zeroext %str) {
6325 ; CHECK-LABEL: st_0_uint32_t_double:
6326 ; CHECK: # %bb.0: # %entry
6327 ; CHECK-NEXT: mtfprwz f0, r4
6328 ; CHECK-NEXT: xscvuxddp f0, f0
6329 ; CHECK-NEXT: stfd f0, 0(r3)
6332 %conv = uitofp i32 %str to double
6333 %0 = inttoptr i64 %ptr to ptr
6334 store double %conv, ptr %0, align 8
6338 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6339 define dso_local void @st_align16_uint32_t_double(ptr nocapture %ptr, i32 zeroext %str) {
6340 ; CHECK-LABEL: st_align16_uint32_t_double:
6341 ; CHECK: # %bb.0: # %entry
6342 ; CHECK-NEXT: mtfprwz f0, r4
6343 ; CHECK-NEXT: xscvuxddp f0, f0
6344 ; CHECK-NEXT: stfd f0, 8(r3)
6347 %conv = uitofp i32 %str to double
6348 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
6349 store double %conv, ptr %add.ptr, align 8
6353 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6354 define dso_local void @st_align32_uint32_t_double(ptr nocapture %ptr, i32 zeroext %str) {
6355 ; CHECK-P10-LABEL: st_align32_uint32_t_double:
6356 ; CHECK-P10: # %bb.0: # %entry
6357 ; CHECK-P10-NEXT: mtfprwz f0, r4
6358 ; CHECK-P10-NEXT: xscvuxddp f0, f0
6359 ; CHECK-P10-NEXT: pstfd f0, 99999000(r3), 0
6360 ; CHECK-P10-NEXT: blr
6362 ; CHECK-P9-LABEL: st_align32_uint32_t_double:
6363 ; CHECK-P9: # %bb.0: # %entry
6364 ; CHECK-P9-NEXT: mtfprwz f0, r4
6365 ; CHECK-P9-NEXT: lis r4, 1525
6366 ; CHECK-P9-NEXT: xscvuxddp f0, f0
6367 ; CHECK-P9-NEXT: ori r4, r4, 56600
6368 ; CHECK-P9-NEXT: stfdx f0, r3, r4
6369 ; CHECK-P9-NEXT: blr
6371 ; CHECK-P8-LABEL: st_align32_uint32_t_double:
6372 ; CHECK-P8: # %bb.0: # %entry
6373 ; CHECK-P8-NEXT: mtfprwz f0, r4
6374 ; CHECK-P8-NEXT: lis r4, 1525
6375 ; CHECK-P8-NEXT: ori r4, r4, 56600
6376 ; CHECK-P8-NEXT: xscvuxddp f0, f0
6377 ; CHECK-P8-NEXT: stfdx f0, r3, r4
6378 ; CHECK-P8-NEXT: blr
6380 %conv = uitofp i32 %str to double
6381 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
6382 store double %conv, ptr %add.ptr, align 8
6386 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6387 define dso_local void @st_align64_uint32_t_double(ptr nocapture %ptr, i32 zeroext %str) {
6388 ; CHECK-P10-LABEL: st_align64_uint32_t_double:
6389 ; CHECK-P10: # %bb.0: # %entry
6390 ; CHECK-P10-NEXT: mtfprwz f0, r4
6391 ; CHECK-P10-NEXT: pli r4, 244140625
6392 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6393 ; CHECK-P10-NEXT: xscvuxddp f0, f0
6394 ; CHECK-P10-NEXT: stfdx f0, r3, r4
6395 ; CHECK-P10-NEXT: blr
6397 ; CHECK-P9-LABEL: st_align64_uint32_t_double:
6398 ; CHECK-P9: # %bb.0: # %entry
6399 ; CHECK-P9-NEXT: mtfprwz f0, r4
6400 ; CHECK-P9-NEXT: lis r4, 3725
6401 ; CHECK-P9-NEXT: xscvuxddp f0, f0
6402 ; CHECK-P9-NEXT: ori r4, r4, 19025
6403 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
6404 ; CHECK-P9-NEXT: stfdx f0, r3, r4
6405 ; CHECK-P9-NEXT: blr
6407 ; CHECK-P8-LABEL: st_align64_uint32_t_double:
6408 ; CHECK-P8: # %bb.0: # %entry
6409 ; CHECK-P8-NEXT: mtfprwz f0, r4
6410 ; CHECK-P8-NEXT: lis r4, 3725
6411 ; CHECK-P8-NEXT: ori r4, r4, 19025
6412 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
6413 ; CHECK-P8-NEXT: xscvuxddp f0, f0
6414 ; CHECK-P8-NEXT: stfdx f0, r3, r4
6415 ; CHECK-P8-NEXT: blr
6417 %conv = uitofp i32 %str to double
6418 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
6419 store double %conv, ptr %add.ptr, align 8
6423 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6424 define dso_local void @st_reg_uint32_t_double(ptr nocapture %ptr, i64 %off, i32 zeroext %str) {
6425 ; CHECK-LABEL: st_reg_uint32_t_double:
6426 ; CHECK: # %bb.0: # %entry
6427 ; CHECK-NEXT: mtfprwz f0, r5
6428 ; CHECK-NEXT: xscvuxddp f0, f0
6429 ; CHECK-NEXT: stfdx f0, r3, r4
6432 %conv = uitofp i32 %str to double
6433 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
6434 store double %conv, ptr %add.ptr, align 8
6438 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6439 define dso_local void @st_or1_uint32_t_double(i64 %ptr, i8 zeroext %off, i32 zeroext %str) {
6440 ; CHECK-LABEL: st_or1_uint32_t_double:
6441 ; CHECK: # %bb.0: # %entry
6442 ; CHECK-NEXT: mtfprwz f0, r5
6443 ; CHECK-NEXT: or r3, r4, r3
6444 ; CHECK-NEXT: xscvuxddp f0, f0
6445 ; CHECK-NEXT: stfd f0, 0(r3)
6448 %conv = uitofp i32 %str to double
6449 %conv1 = zext i8 %off to i64
6450 %or = or i64 %conv1, %ptr
6451 %0 = inttoptr i64 %or to ptr
6452 store double %conv, ptr %0, align 8
6456 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6457 define dso_local void @st_not_disjoint16_uint32_t_double(i64 %ptr, i32 zeroext %str) {
6458 ; CHECK-LABEL: st_not_disjoint16_uint32_t_double:
6459 ; CHECK: # %bb.0: # %entry
6460 ; CHECK-NEXT: mtfprwz f0, r4
6461 ; CHECK-NEXT: ori r3, r3, 6
6462 ; CHECK-NEXT: xscvuxddp f0, f0
6463 ; CHECK-NEXT: stfd f0, 0(r3)
6466 %conv = uitofp i32 %str to double
6467 %or = or i64 %ptr, 6
6468 %0 = inttoptr i64 %or to ptr
6469 store double %conv, ptr %0, align 8
6473 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6474 define dso_local void @st_disjoint_align16_uint32_t_double(i64 %ptr, i32 zeroext %str) {
6475 ; CHECK-LABEL: st_disjoint_align16_uint32_t_double:
6476 ; CHECK: # %bb.0: # %entry
6477 ; CHECK-NEXT: mtfprwz f0, r4
6478 ; CHECK-NEXT: rldicr r3, r3, 0, 51
6479 ; CHECK-NEXT: xscvuxddp f0, f0
6480 ; CHECK-NEXT: stfd f0, 24(r3)
6483 %and = and i64 %ptr, -4096
6484 %conv = uitofp i32 %str to double
6485 %or = or i64 %and, 24
6486 %0 = inttoptr i64 %or to ptr
6487 store double %conv, ptr %0, align 8
6491 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6492 define dso_local void @st_not_disjoint32_uint32_t_double(i64 %ptr, i32 zeroext %str) {
6493 ; CHECK-P10-LABEL: st_not_disjoint32_uint32_t_double:
6494 ; CHECK-P10: # %bb.0: # %entry
6495 ; CHECK-P10-NEXT: mtfprwz f0, r4
6496 ; CHECK-P10-NEXT: ori r3, r3, 34463
6497 ; CHECK-P10-NEXT: oris r3, r3, 1
6498 ; CHECK-P10-NEXT: xscvuxddp f0, f0
6499 ; CHECK-P10-NEXT: stfd f0, 0(r3)
6500 ; CHECK-P10-NEXT: blr
6502 ; CHECK-P9-LABEL: st_not_disjoint32_uint32_t_double:
6503 ; CHECK-P9: # %bb.0: # %entry
6504 ; CHECK-P9-NEXT: mtfprwz f0, r4
6505 ; CHECK-P9-NEXT: ori r3, r3, 34463
6506 ; CHECK-P9-NEXT: xscvuxddp f0, f0
6507 ; CHECK-P9-NEXT: oris r3, r3, 1
6508 ; CHECK-P9-NEXT: stfd f0, 0(r3)
6509 ; CHECK-P9-NEXT: blr
6511 ; CHECK-P8-LABEL: st_not_disjoint32_uint32_t_double:
6512 ; CHECK-P8: # %bb.0: # %entry
6513 ; CHECK-P8-NEXT: mtfprwz f0, r4
6514 ; CHECK-P8-NEXT: ori r3, r3, 34463
6515 ; CHECK-P8-NEXT: oris r3, r3, 1
6516 ; CHECK-P8-NEXT: xscvuxddp f0, f0
6517 ; CHECK-P8-NEXT: stfd f0, 0(r3)
6518 ; CHECK-P8-NEXT: blr
6520 %conv = uitofp i32 %str to double
6521 %or = or i64 %ptr, 99999
6522 %0 = inttoptr i64 %or to ptr
6523 store double %conv, ptr %0, align 8
6527 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6528 define dso_local void @st_disjoint_align32_uint32_t_double(i64 %ptr, i32 zeroext %str) {
6529 ; CHECK-P10-LABEL: st_disjoint_align32_uint32_t_double:
6530 ; CHECK-P10: # %bb.0: # %entry
6531 ; CHECK-P10-NEXT: mtfprwz f0, r4
6532 ; CHECK-P10-NEXT: lis r5, -15264
6533 ; CHECK-P10-NEXT: and r3, r3, r5
6534 ; CHECK-P10-NEXT: xscvuxddp f0, f0
6535 ; CHECK-P10-NEXT: pstfd f0, 999990000(r3), 0
6536 ; CHECK-P10-NEXT: blr
6538 ; CHECK-P9-LABEL: st_disjoint_align32_uint32_t_double:
6539 ; CHECK-P9: # %bb.0: # %entry
6540 ; CHECK-P9-NEXT: mtfprwz f0, r4
6541 ; CHECK-P9-NEXT: lis r5, -15264
6542 ; CHECK-P9-NEXT: lis r4, 15258
6543 ; CHECK-P9-NEXT: xscvuxddp f0, f0
6544 ; CHECK-P9-NEXT: and r3, r3, r5
6545 ; CHECK-P9-NEXT: ori r4, r4, 41712
6546 ; CHECK-P9-NEXT: stfdx f0, r3, r4
6547 ; CHECK-P9-NEXT: blr
6549 ; CHECK-P8-LABEL: st_disjoint_align32_uint32_t_double:
6550 ; CHECK-P8: # %bb.0: # %entry
6551 ; CHECK-P8-NEXT: mtfprwz f0, r4
6552 ; CHECK-P8-NEXT: lis r5, -15264
6553 ; CHECK-P8-NEXT: lis r4, 15258
6554 ; CHECK-P8-NEXT: and r3, r3, r5
6555 ; CHECK-P8-NEXT: ori r4, r4, 41712
6556 ; CHECK-P8-NEXT: xscvuxddp f0, f0
6557 ; CHECK-P8-NEXT: stfdx f0, r3, r4
6558 ; CHECK-P8-NEXT: blr
6560 %and = and i64 %ptr, -1000341504
6561 %conv = uitofp i32 %str to double
6562 %or = or i64 %and, 999990000
6563 %0 = inttoptr i64 %or to ptr
6564 store double %conv, ptr %0, align 16
6568 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6569 define dso_local void @st_not_disjoint64_uint32_t_double(i64 %ptr, i32 zeroext %str) {
6570 ; CHECK-P10-LABEL: st_not_disjoint64_uint32_t_double:
6571 ; CHECK-P10: # %bb.0: # %entry
6572 ; CHECK-P10-NEXT: mtfprwz f0, r4
6573 ; CHECK-P10-NEXT: pli r4, 232
6574 ; CHECK-P10-NEXT: pli r5, 3567587329
6575 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
6576 ; CHECK-P10-NEXT: xscvuxddp f0, f0
6577 ; CHECK-P10-NEXT: or r3, r3, r5
6578 ; CHECK-P10-NEXT: stfd f0, 0(r3)
6579 ; CHECK-P10-NEXT: blr
6581 ; CHECK-P9-LABEL: st_not_disjoint64_uint32_t_double:
6582 ; CHECK-P9: # %bb.0: # %entry
6583 ; CHECK-P9-NEXT: mtfprwz f0, r4
6584 ; CHECK-P9-NEXT: li r4, 29
6585 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
6586 ; CHECK-P9-NEXT: xscvuxddp f0, f0
6587 ; CHECK-P9-NEXT: oris r4, r4, 54437
6588 ; CHECK-P9-NEXT: ori r4, r4, 4097
6589 ; CHECK-P9-NEXT: or r3, r3, r4
6590 ; CHECK-P9-NEXT: stfd f0, 0(r3)
6591 ; CHECK-P9-NEXT: blr
6593 ; CHECK-P8-LABEL: st_not_disjoint64_uint32_t_double:
6594 ; CHECK-P8: # %bb.0: # %entry
6595 ; CHECK-P8-NEXT: mtfprwz f0, r4
6596 ; CHECK-P8-NEXT: li r4, 29
6597 ; CHECK-P8-NEXT: rldic r4, r4, 35, 24
6598 ; CHECK-P8-NEXT: oris r4, r4, 54437
6599 ; CHECK-P8-NEXT: xscvuxddp f0, f0
6600 ; CHECK-P8-NEXT: ori r4, r4, 4097
6601 ; CHECK-P8-NEXT: or r3, r3, r4
6602 ; CHECK-P8-NEXT: stfd f0, 0(r3)
6603 ; CHECK-P8-NEXT: blr
6605 %conv = uitofp i32 %str to double
6606 %or = or i64 %ptr, 1000000000001
6607 %0 = inttoptr i64 %or to ptr
6608 store double %conv, ptr %0, align 8
6612 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6613 define dso_local void @st_disjoint_align64_uint32_t_double(i64 %ptr, i32 zeroext %str) {
6614 ; CHECK-P10-LABEL: st_disjoint_align64_uint32_t_double:
6615 ; CHECK-P10: # %bb.0: # %entry
6616 ; CHECK-P10-NEXT: mtfprwz f0, r4
6617 ; CHECK-P10-NEXT: pli r4, 244140625
6618 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
6619 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6620 ; CHECK-P10-NEXT: xscvuxddp f0, f0
6621 ; CHECK-P10-NEXT: stfdx f0, r3, r4
6622 ; CHECK-P10-NEXT: blr
6624 ; CHECK-P9-LABEL: st_disjoint_align64_uint32_t_double:
6625 ; CHECK-P9: # %bb.0: # %entry
6626 ; CHECK-P9-NEXT: mtfprwz f0, r4
6627 ; CHECK-P9-NEXT: lis r4, 3725
6628 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
6629 ; CHECK-P9-NEXT: xscvuxddp f0, f0
6630 ; CHECK-P9-NEXT: ori r4, r4, 19025
6631 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
6632 ; CHECK-P9-NEXT: stfdx f0, r3, r4
6633 ; CHECK-P9-NEXT: blr
6635 ; CHECK-P8-LABEL: st_disjoint_align64_uint32_t_double:
6636 ; CHECK-P8: # %bb.0: # %entry
6637 ; CHECK-P8-NEXT: mtfprwz f0, r4
6638 ; CHECK-P8-NEXT: lis r4, 3725
6639 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
6640 ; CHECK-P8-NEXT: ori r4, r4, 19025
6641 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
6642 ; CHECK-P8-NEXT: xscvuxddp f0, f0
6643 ; CHECK-P8-NEXT: stfdx f0, r3, r4
6644 ; CHECK-P8-NEXT: blr
6646 %and = and i64 %ptr, -1099511627776
6647 %conv = uitofp i32 %str to double
6648 %or = or i64 %and, 1000000000000
6649 %0 = inttoptr i64 %or to ptr
6650 store double %conv, ptr %0, align 4096
6654 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6655 define dso_local void @st_cst_align16_uint32_t_double(i32 zeroext %str) {
6656 ; CHECK-LABEL: st_cst_align16_uint32_t_double:
6657 ; CHECK: # %bb.0: # %entry
6658 ; CHECK-NEXT: mtfprwz f0, r3
6659 ; CHECK-NEXT: xscvuxddp f0, f0
6660 ; CHECK-NEXT: stfd f0, 4080(0)
6663 %conv = uitofp i32 %str to double
6664 store double %conv, ptr inttoptr (i64 4080 to ptr), align 16
6668 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6669 define dso_local void @st_cst_align32_uint32_t_double(i32 zeroext %str) {
6670 ; CHECK-LABEL: st_cst_align32_uint32_t_double:
6671 ; CHECK: # %bb.0: # %entry
6672 ; CHECK-NEXT: mtfprwz f0, r3
6673 ; CHECK-NEXT: lis r3, 153
6674 ; CHECK-NEXT: xscvuxddp f0, f0
6675 ; CHECK-NEXT: stfd f0, -27108(r3)
6678 %conv = uitofp i32 %str to double
6679 store double %conv, ptr inttoptr (i64 9999900 to ptr), align 8
6683 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6684 define dso_local void @st_cst_align64_uint32_t_double(i32 zeroext %str) {
6685 ; CHECK-P10-LABEL: st_cst_align64_uint32_t_double:
6686 ; CHECK-P10: # %bb.0: # %entry
6687 ; CHECK-P10-NEXT: mtfprwz f0, r3
6688 ; CHECK-P10-NEXT: pli r3, 244140625
6689 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
6690 ; CHECK-P10-NEXT: xscvuxddp f0, f0
6691 ; CHECK-P10-NEXT: stfd f0, 0(r3)
6692 ; CHECK-P10-NEXT: blr
6694 ; CHECK-P9-LABEL: st_cst_align64_uint32_t_double:
6695 ; CHECK-P9: # %bb.0: # %entry
6696 ; CHECK-P9-NEXT: mtfprwz f0, r3
6697 ; CHECK-P9-NEXT: lis r3, 3725
6698 ; CHECK-P9-NEXT: xscvuxddp f0, f0
6699 ; CHECK-P9-NEXT: ori r3, r3, 19025
6700 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
6701 ; CHECK-P9-NEXT: stfd f0, 0(r3)
6702 ; CHECK-P9-NEXT: blr
6704 ; CHECK-P8-LABEL: st_cst_align64_uint32_t_double:
6705 ; CHECK-P8: # %bb.0: # %entry
6706 ; CHECK-P8-NEXT: mtfprwz f0, r3
6707 ; CHECK-P8-NEXT: lis r3, 3725
6708 ; CHECK-P8-NEXT: ori r3, r3, 19025
6709 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
6710 ; CHECK-P8-NEXT: xscvuxddp f0, f0
6711 ; CHECK-P8-NEXT: stfd f0, 0(r3)
6712 ; CHECK-P8-NEXT: blr
6714 %conv = uitofp i32 %str to double
6715 store double %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
6719 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6720 define dso_local void @st_0_int32_t_uint64_t(i64 %ptr, i32 signext %str) {
6721 ; CHECK-LABEL: st_0_int32_t_uint64_t:
6722 ; CHECK: # %bb.0: # %entry
6723 ; CHECK-NEXT: std r4, 0(r3)
6726 %conv = sext i32 %str to i64
6727 %0 = inttoptr i64 %ptr to ptr
6728 store i64 %conv, ptr %0, align 8
6732 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6733 define dso_local void @st_align16_int32_t_uint64_t(ptr nocapture %ptr, i32 signext %str) {
6734 ; CHECK-LABEL: st_align16_int32_t_uint64_t:
6735 ; CHECK: # %bb.0: # %entry
6736 ; CHECK-NEXT: std r4, 8(r3)
6739 %conv = sext i32 %str to i64
6740 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
6741 store i64 %conv, ptr %add.ptr, align 8
6745 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6746 define dso_local void @st_align32_int32_t_uint64_t(ptr nocapture %ptr, i32 signext %str) {
6747 ; CHECK-P10-LABEL: st_align32_int32_t_uint64_t:
6748 ; CHECK-P10: # %bb.0: # %entry
6749 ; CHECK-P10-NEXT: pstd r4, 99999000(r3), 0
6750 ; CHECK-P10-NEXT: blr
6752 ; CHECK-PREP10-LABEL: st_align32_int32_t_uint64_t:
6753 ; CHECK-PREP10: # %bb.0: # %entry
6754 ; CHECK-PREP10-NEXT: lis r5, 1525
6755 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
6756 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
6757 ; CHECK-PREP10-NEXT: blr
6759 %conv = sext i32 %str to i64
6760 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
6761 store i64 %conv, ptr %add.ptr, align 8
6765 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6766 define dso_local void @st_align64_int32_t_uint64_t(ptr nocapture %ptr, i32 signext %str) {
6767 ; CHECK-P10-LABEL: st_align64_int32_t_uint64_t:
6768 ; CHECK-P10: # %bb.0: # %entry
6769 ; CHECK-P10-NEXT: pli r5, 244140625
6770 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6771 ; CHECK-P10-NEXT: stdx r4, r3, r5
6772 ; CHECK-P10-NEXT: blr
6774 ; CHECK-PREP10-LABEL: st_align64_int32_t_uint64_t:
6775 ; CHECK-PREP10: # %bb.0: # %entry
6776 ; CHECK-PREP10-NEXT: lis r5, 3725
6777 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6778 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6779 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
6780 ; CHECK-PREP10-NEXT: blr
6782 %conv = sext i32 %str to i64
6783 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
6784 store i64 %conv, ptr %add.ptr, align 8
6788 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6789 define dso_local void @st_reg_int32_t_uint64_t(ptr nocapture %ptr, i64 %off, i32 signext %str) {
6790 ; CHECK-LABEL: st_reg_int32_t_uint64_t:
6791 ; CHECK: # %bb.0: # %entry
6792 ; CHECK-NEXT: stdx r5, r3, r4
6795 %conv = sext i32 %str to i64
6796 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
6797 store i64 %conv, ptr %add.ptr, align 8
6801 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6802 define dso_local void @st_or1_int32_t_uint64_t(i64 %ptr, i8 zeroext %off, i32 signext %str) {
6803 ; CHECK-LABEL: st_or1_int32_t_uint64_t:
6804 ; CHECK: # %bb.0: # %entry
6805 ; CHECK-NEXT: or r3, r4, r3
6806 ; CHECK-NEXT: std r5, 0(r3)
6809 %conv = sext i32 %str to i64
6810 %conv1 = zext i8 %off to i64
6811 %or = or i64 %conv1, %ptr
6812 %0 = inttoptr i64 %or to ptr
6813 store i64 %conv, ptr %0, align 8
6817 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6818 define dso_local void @st_not_disjoint16_int32_t_uint64_t(i64 %ptr, i32 signext %str) {
6819 ; CHECK-LABEL: st_not_disjoint16_int32_t_uint64_t:
6820 ; CHECK: # %bb.0: # %entry
6821 ; CHECK-NEXT: ori r3, r3, 6
6822 ; CHECK-NEXT: std r4, 0(r3)
6825 %conv = sext i32 %str to i64
6826 %or = or i64 %ptr, 6
6827 %0 = inttoptr i64 %or to ptr
6828 store i64 %conv, ptr %0, align 8
6832 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6833 define dso_local void @st_disjoint_align16_int32_t_uint64_t(i64 %ptr, i32 signext %str) {
6834 ; CHECK-LABEL: st_disjoint_align16_int32_t_uint64_t:
6835 ; CHECK: # %bb.0: # %entry
6836 ; CHECK-NEXT: rldicr r3, r3, 0, 51
6837 ; CHECK-NEXT: std r4, 24(r3)
6840 %and = and i64 %ptr, -4096
6841 %conv = sext i32 %str to i64
6842 %or = or i64 %and, 24
6843 %0 = inttoptr i64 %or to ptr
6844 store i64 %conv, ptr %0, align 8
6848 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6849 define dso_local void @st_not_disjoint32_int32_t_uint64_t(i64 %ptr, i32 signext %str) {
6850 ; CHECK-LABEL: st_not_disjoint32_int32_t_uint64_t:
6851 ; CHECK: # %bb.0: # %entry
6852 ; CHECK-NEXT: ori r3, r3, 34463
6853 ; CHECK-NEXT: oris r3, r3, 1
6854 ; CHECK-NEXT: std r4, 0(r3)
6857 %conv = sext i32 %str to i64
6858 %or = or i64 %ptr, 99999
6859 %0 = inttoptr i64 %or to ptr
6860 store i64 %conv, ptr %0, align 8
6864 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6865 define dso_local void @st_disjoint_align32_int32_t_uint64_t(i64 %ptr, i32 signext %str) {
6866 ; CHECK-P10-LABEL: st_disjoint_align32_int32_t_uint64_t:
6867 ; CHECK-P10: # %bb.0: # %entry
6868 ; CHECK-P10-NEXT: lis r5, -15264
6869 ; CHECK-P10-NEXT: and r3, r3, r5
6870 ; CHECK-P10-NEXT: pstd r4, 999990000(r3), 0
6871 ; CHECK-P10-NEXT: blr
6873 ; CHECK-PREP10-LABEL: st_disjoint_align32_int32_t_uint64_t:
6874 ; CHECK-PREP10: # %bb.0: # %entry
6875 ; CHECK-PREP10-NEXT: lis r5, -15264
6876 ; CHECK-PREP10-NEXT: and r3, r3, r5
6877 ; CHECK-PREP10-NEXT: lis r5, 15258
6878 ; CHECK-PREP10-NEXT: ori r5, r5, 41712
6879 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
6880 ; CHECK-PREP10-NEXT: blr
6882 %and = and i64 %ptr, -1000341504
6883 %conv = sext i32 %str to i64
6884 %or = or i64 %and, 999990000
6885 %0 = inttoptr i64 %or to ptr
6886 store i64 %conv, ptr %0, align 16
6890 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6891 define dso_local void @st_not_disjoint64_int32_t_uint64_t(i64 %ptr, i32 signext %str) {
6892 ; CHECK-P10-LABEL: st_not_disjoint64_int32_t_uint64_t:
6893 ; CHECK-P10: # %bb.0: # %entry
6894 ; CHECK-P10-NEXT: pli r5, 232
6895 ; CHECK-P10-NEXT: pli r6, 3567587329
6896 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
6897 ; CHECK-P10-NEXT: or r3, r3, r6
6898 ; CHECK-P10-NEXT: std r4, 0(r3)
6899 ; CHECK-P10-NEXT: blr
6901 ; CHECK-PREP10-LABEL: st_not_disjoint64_int32_t_uint64_t:
6902 ; CHECK-PREP10: # %bb.0: # %entry
6903 ; CHECK-PREP10-NEXT: li r5, 29
6904 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
6905 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
6906 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
6907 ; CHECK-PREP10-NEXT: or r3, r3, r5
6908 ; CHECK-PREP10-NEXT: std r4, 0(r3)
6909 ; CHECK-PREP10-NEXT: blr
6911 %conv = sext i32 %str to i64
6912 %or = or i64 %ptr, 1000000000001
6913 %0 = inttoptr i64 %or to ptr
6914 store i64 %conv, ptr %0, align 8
6918 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6919 define dso_local void @st_disjoint_align64_int32_t_uint64_t(i64 %ptr, i32 signext %str) {
6920 ; CHECK-P10-LABEL: st_disjoint_align64_int32_t_uint64_t:
6921 ; CHECK-P10: # %bb.0: # %entry
6922 ; CHECK-P10-NEXT: pli r5, 244140625
6923 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
6924 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6925 ; CHECK-P10-NEXT: stdx r4, r3, r5
6926 ; CHECK-P10-NEXT: blr
6928 ; CHECK-PREP10-LABEL: st_disjoint_align64_int32_t_uint64_t:
6929 ; CHECK-PREP10: # %bb.0: # %entry
6930 ; CHECK-PREP10-NEXT: lis r5, 3725
6931 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
6932 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6933 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6934 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
6935 ; CHECK-PREP10-NEXT: blr
6937 %and = and i64 %ptr, -1099511627776
6938 %conv = sext i32 %str to i64
6939 %or = or i64 %and, 1000000000000
6940 %0 = inttoptr i64 %or to ptr
6941 store i64 %conv, ptr %0, align 4096
6945 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6946 define dso_local void @st_cst_align16_int32_t_uint64_t(i32 signext %str) {
6947 ; CHECK-LABEL: st_cst_align16_int32_t_uint64_t:
6948 ; CHECK: # %bb.0: # %entry
6949 ; CHECK-NEXT: std r3, 4080(0)
6952 %conv = sext i32 %str to i64
6953 store i64 %conv, ptr inttoptr (i64 4080 to ptr), align 16
6957 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6958 define dso_local void @st_cst_align32_int32_t_uint64_t(i32 signext %str) {
6959 ; CHECK-LABEL: st_cst_align32_int32_t_uint64_t:
6960 ; CHECK: # %bb.0: # %entry
6961 ; CHECK-NEXT: lis r4, 153
6962 ; CHECK-NEXT: std r3, -27108(r4)
6965 %conv = sext i32 %str to i64
6966 store i64 %conv, ptr inttoptr (i64 9999900 to ptr), align 8
6970 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6971 define dso_local void @st_cst_align64_int32_t_uint64_t(i32 signext %str) {
6972 ; CHECK-P10-LABEL: st_cst_align64_int32_t_uint64_t:
6973 ; CHECK-P10: # %bb.0: # %entry
6974 ; CHECK-P10-NEXT: pli r4, 244140625
6975 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6976 ; CHECK-P10-NEXT: std r3, 0(r4)
6977 ; CHECK-P10-NEXT: blr
6979 ; CHECK-PREP10-LABEL: st_cst_align64_int32_t_uint64_t:
6980 ; CHECK-PREP10: # %bb.0: # %entry
6981 ; CHECK-PREP10-NEXT: lis r4, 3725
6982 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
6983 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
6984 ; CHECK-PREP10-NEXT: std r3, 0(r4)
6985 ; CHECK-PREP10-NEXT: blr
6987 %conv = sext i32 %str to i64
6988 store i64 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
6992 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6993 define dso_local void @st_0_int32_t_float(i64 %ptr, i32 signext %str) {
6994 ; CHECK-LABEL: st_0_int32_t_float:
6995 ; CHECK: # %bb.0: # %entry
6996 ; CHECK-NEXT: mtfprwa f0, r4
6997 ; CHECK-NEXT: xscvsxdsp f0, f0
6998 ; CHECK-NEXT: stfs f0, 0(r3)
7001 %conv = sitofp i32 %str to float
7002 %0 = inttoptr i64 %ptr to ptr
7003 store float %conv, ptr %0, align 4
7007 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7008 define dso_local void @st_align16_int32_t_float(ptr nocapture %ptr, i32 signext %str) {
7009 ; CHECK-LABEL: st_align16_int32_t_float:
7010 ; CHECK: # %bb.0: # %entry
7011 ; CHECK-NEXT: mtfprwa f0, r4
7012 ; CHECK-NEXT: xscvsxdsp f0, f0
7013 ; CHECK-NEXT: stfs f0, 8(r3)
7016 %conv = sitofp i32 %str to float
7017 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
7018 store float %conv, ptr %add.ptr, align 4
7022 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7023 define dso_local void @st_align32_int32_t_float(ptr nocapture %ptr, i32 signext %str) {
7024 ; CHECK-P10-LABEL: st_align32_int32_t_float:
7025 ; CHECK-P10: # %bb.0: # %entry
7026 ; CHECK-P10-NEXT: mtfprwa f0, r4
7027 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
7028 ; CHECK-P10-NEXT: pstfs f0, 99999000(r3), 0
7029 ; CHECK-P10-NEXT: blr
7031 ; CHECK-P9-LABEL: st_align32_int32_t_float:
7032 ; CHECK-P9: # %bb.0: # %entry
7033 ; CHECK-P9-NEXT: mtfprwa f0, r4
7034 ; CHECK-P9-NEXT: lis r4, 1525
7035 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
7036 ; CHECK-P9-NEXT: ori r4, r4, 56600
7037 ; CHECK-P9-NEXT: stfsx f0, r3, r4
7038 ; CHECK-P9-NEXT: blr
7040 ; CHECK-P8-LABEL: st_align32_int32_t_float:
7041 ; CHECK-P8: # %bb.0: # %entry
7042 ; CHECK-P8-NEXT: mtfprwa f0, r4
7043 ; CHECK-P8-NEXT: lis r4, 1525
7044 ; CHECK-P8-NEXT: ori r4, r4, 56600
7045 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
7046 ; CHECK-P8-NEXT: stfsx f0, r3, r4
7047 ; CHECK-P8-NEXT: blr
7049 %conv = sitofp i32 %str to float
7050 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
7051 store float %conv, ptr %add.ptr, align 4
7055 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7056 define dso_local void @st_align64_int32_t_float(ptr nocapture %ptr, i32 signext %str) {
7057 ; CHECK-P10-LABEL: st_align64_int32_t_float:
7058 ; CHECK-P10: # %bb.0: # %entry
7059 ; CHECK-P10-NEXT: mtfprwa f0, r4
7060 ; CHECK-P10-NEXT: pli r4, 244140625
7061 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7062 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
7063 ; CHECK-P10-NEXT: stfsx f0, r3, r4
7064 ; CHECK-P10-NEXT: blr
7066 ; CHECK-P9-LABEL: st_align64_int32_t_float:
7067 ; CHECK-P9: # %bb.0: # %entry
7068 ; CHECK-P9-NEXT: mtfprwa f0, r4
7069 ; CHECK-P9-NEXT: lis r4, 3725
7070 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
7071 ; CHECK-P9-NEXT: ori r4, r4, 19025
7072 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
7073 ; CHECK-P9-NEXT: stfsx f0, r3, r4
7074 ; CHECK-P9-NEXT: blr
7076 ; CHECK-P8-LABEL: st_align64_int32_t_float:
7077 ; CHECK-P8: # %bb.0: # %entry
7078 ; CHECK-P8-NEXT: mtfprwa f0, r4
7079 ; CHECK-P8-NEXT: lis r4, 3725
7080 ; CHECK-P8-NEXT: ori r4, r4, 19025
7081 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
7082 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
7083 ; CHECK-P8-NEXT: stfsx f0, r3, r4
7084 ; CHECK-P8-NEXT: blr
7086 %conv = sitofp i32 %str to float
7087 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
7088 store float %conv, ptr %add.ptr, align 4
7092 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7093 define dso_local void @st_reg_int32_t_float(ptr nocapture %ptr, i64 %off, i32 signext %str) {
7094 ; CHECK-LABEL: st_reg_int32_t_float:
7095 ; CHECK: # %bb.0: # %entry
7096 ; CHECK-NEXT: mtfprwa f0, r5
7097 ; CHECK-NEXT: xscvsxdsp f0, f0
7098 ; CHECK-NEXT: stfsx f0, r3, r4
7101 %conv = sitofp i32 %str to float
7102 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
7103 store float %conv, ptr %add.ptr, align 4
7107 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7108 define dso_local void @st_or1_int32_t_float(i64 %ptr, i8 zeroext %off, i32 signext %str) {
7109 ; CHECK-LABEL: st_or1_int32_t_float:
7110 ; CHECK: # %bb.0: # %entry
7111 ; CHECK-NEXT: mtfprwa f0, r5
7112 ; CHECK-NEXT: or r3, r4, r3
7113 ; CHECK-NEXT: xscvsxdsp f0, f0
7114 ; CHECK-NEXT: stfs f0, 0(r3)
7117 %conv = sitofp i32 %str to float
7118 %conv1 = zext i8 %off to i64
7119 %or = or i64 %conv1, %ptr
7120 %0 = inttoptr i64 %or to ptr
7121 store float %conv, ptr %0, align 4
7125 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7126 define dso_local void @st_not_disjoint16_int32_t_float(i64 %ptr, i32 signext %str) {
7127 ; CHECK-LABEL: st_not_disjoint16_int32_t_float:
7128 ; CHECK: # %bb.0: # %entry
7129 ; CHECK-NEXT: mtfprwa f0, r4
7130 ; CHECK-NEXT: ori r3, r3, 6
7131 ; CHECK-NEXT: xscvsxdsp f0, f0
7132 ; CHECK-NEXT: stfs f0, 0(r3)
7135 %conv = sitofp i32 %str to float
7136 %or = or i64 %ptr, 6
7137 %0 = inttoptr i64 %or to ptr
7138 store float %conv, ptr %0, align 4
7142 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7143 define dso_local void @st_disjoint_align16_int32_t_float(i64 %ptr, i32 signext %str) {
7144 ; CHECK-LABEL: st_disjoint_align16_int32_t_float:
7145 ; CHECK: # %bb.0: # %entry
7146 ; CHECK-NEXT: mtfprwa f0, r4
7147 ; CHECK-NEXT: rldicr r3, r3, 0, 51
7148 ; CHECK-NEXT: xscvsxdsp f0, f0
7149 ; CHECK-NEXT: stfs f0, 24(r3)
7152 %and = and i64 %ptr, -4096
7153 %conv = sitofp i32 %str to float
7154 %or = or i64 %and, 24
7155 %0 = inttoptr i64 %or to ptr
7156 store float %conv, ptr %0, align 8
7160 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7161 define dso_local void @st_not_disjoint32_int32_t_float(i64 %ptr, i32 signext %str) {
7162 ; CHECK-P10-LABEL: st_not_disjoint32_int32_t_float:
7163 ; CHECK-P10: # %bb.0: # %entry
7164 ; CHECK-P10-NEXT: mtfprwa f0, r4
7165 ; CHECK-P10-NEXT: ori r3, r3, 34463
7166 ; CHECK-P10-NEXT: oris r3, r3, 1
7167 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
7168 ; CHECK-P10-NEXT: stfs f0, 0(r3)
7169 ; CHECK-P10-NEXT: blr
7171 ; CHECK-P9-LABEL: st_not_disjoint32_int32_t_float:
7172 ; CHECK-P9: # %bb.0: # %entry
7173 ; CHECK-P9-NEXT: mtfprwa f0, r4
7174 ; CHECK-P9-NEXT: ori r3, r3, 34463
7175 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
7176 ; CHECK-P9-NEXT: oris r3, r3, 1
7177 ; CHECK-P9-NEXT: stfs f0, 0(r3)
7178 ; CHECK-P9-NEXT: blr
7180 ; CHECK-P8-LABEL: st_not_disjoint32_int32_t_float:
7181 ; CHECK-P8: # %bb.0: # %entry
7182 ; CHECK-P8-NEXT: mtfprwa f0, r4
7183 ; CHECK-P8-NEXT: ori r3, r3, 34463
7184 ; CHECK-P8-NEXT: oris r3, r3, 1
7185 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
7186 ; CHECK-P8-NEXT: stfs f0, 0(r3)
7187 ; CHECK-P8-NEXT: blr
7189 %conv = sitofp i32 %str to float
7190 %or = or i64 %ptr, 99999
7191 %0 = inttoptr i64 %or to ptr
7192 store float %conv, ptr %0, align 4
7196 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7197 define dso_local void @st_disjoint_align32_int32_t_float(i64 %ptr, i32 signext %str) {
7198 ; CHECK-P10-LABEL: st_disjoint_align32_int32_t_float:
7199 ; CHECK-P10: # %bb.0: # %entry
7200 ; CHECK-P10-NEXT: mtfprwa f0, r4
7201 ; CHECK-P10-NEXT: lis r5, -15264
7202 ; CHECK-P10-NEXT: and r3, r3, r5
7203 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
7204 ; CHECK-P10-NEXT: pstfs f0, 999990000(r3), 0
7205 ; CHECK-P10-NEXT: blr
7207 ; CHECK-P9-LABEL: st_disjoint_align32_int32_t_float:
7208 ; CHECK-P9: # %bb.0: # %entry
7209 ; CHECK-P9-NEXT: mtfprwa f0, r4
7210 ; CHECK-P9-NEXT: lis r5, -15264
7211 ; CHECK-P9-NEXT: lis r4, 15258
7212 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
7213 ; CHECK-P9-NEXT: and r3, r3, r5
7214 ; CHECK-P9-NEXT: ori r4, r4, 41712
7215 ; CHECK-P9-NEXT: stfsx f0, r3, r4
7216 ; CHECK-P9-NEXT: blr
7218 ; CHECK-P8-LABEL: st_disjoint_align32_int32_t_float:
7219 ; CHECK-P8: # %bb.0: # %entry
7220 ; CHECK-P8-NEXT: mtfprwa f0, r4
7221 ; CHECK-P8-NEXT: lis r5, -15264
7222 ; CHECK-P8-NEXT: lis r4, 15258
7223 ; CHECK-P8-NEXT: and r3, r3, r5
7224 ; CHECK-P8-NEXT: ori r4, r4, 41712
7225 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
7226 ; CHECK-P8-NEXT: stfsx f0, r3, r4
7227 ; CHECK-P8-NEXT: blr
7229 %and = and i64 %ptr, -1000341504
7230 %conv = sitofp i32 %str to float
7231 %or = or i64 %and, 999990000
7232 %0 = inttoptr i64 %or to ptr
7233 store float %conv, ptr %0, align 16
7237 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7238 define dso_local void @st_not_disjoint64_int32_t_float(i64 %ptr, i32 signext %str) {
7239 ; CHECK-P10-LABEL: st_not_disjoint64_int32_t_float:
7240 ; CHECK-P10: # %bb.0: # %entry
7241 ; CHECK-P10-NEXT: mtfprwa f0, r4
7242 ; CHECK-P10-NEXT: pli r4, 232
7243 ; CHECK-P10-NEXT: pli r5, 3567587329
7244 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
7245 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
7246 ; CHECK-P10-NEXT: or r3, r3, r5
7247 ; CHECK-P10-NEXT: stfs f0, 0(r3)
7248 ; CHECK-P10-NEXT: blr
7250 ; CHECK-P9-LABEL: st_not_disjoint64_int32_t_float:
7251 ; CHECK-P9: # %bb.0: # %entry
7252 ; CHECK-P9-NEXT: mtfprwa f0, r4
7253 ; CHECK-P9-NEXT: li r4, 29
7254 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
7255 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
7256 ; CHECK-P9-NEXT: oris r4, r4, 54437
7257 ; CHECK-P9-NEXT: ori r4, r4, 4097
7258 ; CHECK-P9-NEXT: or r3, r3, r4
7259 ; CHECK-P9-NEXT: stfs f0, 0(r3)
7260 ; CHECK-P9-NEXT: blr
7262 ; CHECK-P8-LABEL: st_not_disjoint64_int32_t_float:
7263 ; CHECK-P8: # %bb.0: # %entry
7264 ; CHECK-P8-NEXT: mtfprwa f0, r4
7265 ; CHECK-P8-NEXT: li r4, 29
7266 ; CHECK-P8-NEXT: rldic r4, r4, 35, 24
7267 ; CHECK-P8-NEXT: oris r4, r4, 54437
7268 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
7269 ; CHECK-P8-NEXT: ori r4, r4, 4097
7270 ; CHECK-P8-NEXT: or r3, r3, r4
7271 ; CHECK-P8-NEXT: stfs f0, 0(r3)
7272 ; CHECK-P8-NEXT: blr
7274 %conv = sitofp i32 %str to float
7275 %or = or i64 %ptr, 1000000000001
7276 %0 = inttoptr i64 %or to ptr
7277 store float %conv, ptr %0, align 4
7281 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7282 define dso_local void @st_disjoint_align64_int32_t_float(i64 %ptr, i32 signext %str) {
7283 ; CHECK-P10-LABEL: st_disjoint_align64_int32_t_float:
7284 ; CHECK-P10: # %bb.0: # %entry
7285 ; CHECK-P10-NEXT: mtfprwa f0, r4
7286 ; CHECK-P10-NEXT: pli r4, 244140625
7287 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
7288 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7289 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
7290 ; CHECK-P10-NEXT: stfsx f0, r3, r4
7291 ; CHECK-P10-NEXT: blr
7293 ; CHECK-P9-LABEL: st_disjoint_align64_int32_t_float:
7294 ; CHECK-P9: # %bb.0: # %entry
7295 ; CHECK-P9-NEXT: mtfprwa f0, r4
7296 ; CHECK-P9-NEXT: lis r4, 3725
7297 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
7298 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
7299 ; CHECK-P9-NEXT: ori r4, r4, 19025
7300 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
7301 ; CHECK-P9-NEXT: stfsx f0, r3, r4
7302 ; CHECK-P9-NEXT: blr
7304 ; CHECK-P8-LABEL: st_disjoint_align64_int32_t_float:
7305 ; CHECK-P8: # %bb.0: # %entry
7306 ; CHECK-P8-NEXT: mtfprwa f0, r4
7307 ; CHECK-P8-NEXT: lis r4, 3725
7308 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
7309 ; CHECK-P8-NEXT: ori r4, r4, 19025
7310 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
7311 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
7312 ; CHECK-P8-NEXT: stfsx f0, r3, r4
7313 ; CHECK-P8-NEXT: blr
7315 %and = and i64 %ptr, -1099511627776
7316 %conv = sitofp i32 %str to float
7317 %or = or i64 %and, 1000000000000
7318 %0 = inttoptr i64 %or to ptr
7319 store float %conv, ptr %0, align 4096
7323 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7324 define dso_local void @st_cst_align16_int32_t_float(i32 signext %str) {
7325 ; CHECK-LABEL: st_cst_align16_int32_t_float:
7326 ; CHECK: # %bb.0: # %entry
7327 ; CHECK-NEXT: mtfprwa f0, r3
7328 ; CHECK-NEXT: xscvsxdsp f0, f0
7329 ; CHECK-NEXT: stfs f0, 4080(0)
7332 %conv = sitofp i32 %str to float
7333 store float %conv, ptr inttoptr (i64 4080 to ptr), align 16
7337 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7338 define dso_local void @st_cst_align32_int32_t_float(i32 signext %str) {
7339 ; CHECK-LABEL: st_cst_align32_int32_t_float:
7340 ; CHECK: # %bb.0: # %entry
7341 ; CHECK-NEXT: mtfprwa f0, r3
7342 ; CHECK-NEXT: lis r3, 153
7343 ; CHECK-NEXT: xscvsxdsp f0, f0
7344 ; CHECK-NEXT: stfs f0, -27108(r3)
7347 %conv = sitofp i32 %str to float
7348 store float %conv, ptr inttoptr (i64 9999900 to ptr), align 4
7352 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7353 define dso_local void @st_cst_align64_int32_t_float(i32 signext %str) {
7354 ; CHECK-P10-LABEL: st_cst_align64_int32_t_float:
7355 ; CHECK-P10: # %bb.0: # %entry
7356 ; CHECK-P10-NEXT: mtfprwa f0, r3
7357 ; CHECK-P10-NEXT: pli r3, 244140625
7358 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
7359 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
7360 ; CHECK-P10-NEXT: stfs f0, 0(r3)
7361 ; CHECK-P10-NEXT: blr
7363 ; CHECK-P9-LABEL: st_cst_align64_int32_t_float:
7364 ; CHECK-P9: # %bb.0: # %entry
7365 ; CHECK-P9-NEXT: mtfprwa f0, r3
7366 ; CHECK-P9-NEXT: lis r3, 3725
7367 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
7368 ; CHECK-P9-NEXT: ori r3, r3, 19025
7369 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
7370 ; CHECK-P9-NEXT: stfs f0, 0(r3)
7371 ; CHECK-P9-NEXT: blr
7373 ; CHECK-P8-LABEL: st_cst_align64_int32_t_float:
7374 ; CHECK-P8: # %bb.0: # %entry
7375 ; CHECK-P8-NEXT: mtfprwa f0, r3
7376 ; CHECK-P8-NEXT: lis r3, 3725
7377 ; CHECK-P8-NEXT: ori r3, r3, 19025
7378 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
7379 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
7380 ; CHECK-P8-NEXT: stfs f0, 0(r3)
7381 ; CHECK-P8-NEXT: blr
7383 %conv = sitofp i32 %str to float
7384 store float %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
7388 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7389 define dso_local void @st_0_int32_t_double(i64 %ptr, i32 signext %str) {
7390 ; CHECK-LABEL: st_0_int32_t_double:
7391 ; CHECK: # %bb.0: # %entry
7392 ; CHECK-NEXT: mtfprwa f0, r4
7393 ; CHECK-NEXT: xscvsxddp f0, f0
7394 ; CHECK-NEXT: stfd f0, 0(r3)
7397 %conv = sitofp i32 %str to double
7398 %0 = inttoptr i64 %ptr to ptr
7399 store double %conv, ptr %0, align 8
7403 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7404 define dso_local void @st_align16_int32_t_double(ptr nocapture %ptr, i32 signext %str) {
7405 ; CHECK-LABEL: st_align16_int32_t_double:
7406 ; CHECK: # %bb.0: # %entry
7407 ; CHECK-NEXT: mtfprwa f0, r4
7408 ; CHECK-NEXT: xscvsxddp f0, f0
7409 ; CHECK-NEXT: stfd f0, 8(r3)
7412 %conv = sitofp i32 %str to double
7413 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
7414 store double %conv, ptr %add.ptr, align 8
7418 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7419 define dso_local void @st_align32_int32_t_double(ptr nocapture %ptr, i32 signext %str) {
7420 ; CHECK-P10-LABEL: st_align32_int32_t_double:
7421 ; CHECK-P10: # %bb.0: # %entry
7422 ; CHECK-P10-NEXT: mtfprwa f0, r4
7423 ; CHECK-P10-NEXT: xscvsxddp f0, f0
7424 ; CHECK-P10-NEXT: pstfd f0, 99999000(r3), 0
7425 ; CHECK-P10-NEXT: blr
7427 ; CHECK-P9-LABEL: st_align32_int32_t_double:
7428 ; CHECK-P9: # %bb.0: # %entry
7429 ; CHECK-P9-NEXT: mtfprwa f0, r4
7430 ; CHECK-P9-NEXT: lis r4, 1525
7431 ; CHECK-P9-NEXT: xscvsxddp f0, f0
7432 ; CHECK-P9-NEXT: ori r4, r4, 56600
7433 ; CHECK-P9-NEXT: stfdx f0, r3, r4
7434 ; CHECK-P9-NEXT: blr
7436 ; CHECK-P8-LABEL: st_align32_int32_t_double:
7437 ; CHECK-P8: # %bb.0: # %entry
7438 ; CHECK-P8-NEXT: mtfprwa f0, r4
7439 ; CHECK-P8-NEXT: lis r4, 1525
7440 ; CHECK-P8-NEXT: ori r4, r4, 56600
7441 ; CHECK-P8-NEXT: xscvsxddp f0, f0
7442 ; CHECK-P8-NEXT: stfdx f0, r3, r4
7443 ; CHECK-P8-NEXT: blr
7445 %conv = sitofp i32 %str to double
7446 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
7447 store double %conv, ptr %add.ptr, align 8
7451 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7452 define dso_local void @st_align64_int32_t_double(ptr nocapture %ptr, i32 signext %str) {
7453 ; CHECK-P10-LABEL: st_align64_int32_t_double:
7454 ; CHECK-P10: # %bb.0: # %entry
7455 ; CHECK-P10-NEXT: mtfprwa f0, r4
7456 ; CHECK-P10-NEXT: pli r4, 244140625
7457 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7458 ; CHECK-P10-NEXT: xscvsxddp f0, f0
7459 ; CHECK-P10-NEXT: stfdx f0, r3, r4
7460 ; CHECK-P10-NEXT: blr
7462 ; CHECK-P9-LABEL: st_align64_int32_t_double:
7463 ; CHECK-P9: # %bb.0: # %entry
7464 ; CHECK-P9-NEXT: mtfprwa f0, r4
7465 ; CHECK-P9-NEXT: lis r4, 3725
7466 ; CHECK-P9-NEXT: xscvsxddp f0, f0
7467 ; CHECK-P9-NEXT: ori r4, r4, 19025
7468 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
7469 ; CHECK-P9-NEXT: stfdx f0, r3, r4
7470 ; CHECK-P9-NEXT: blr
7472 ; CHECK-P8-LABEL: st_align64_int32_t_double:
7473 ; CHECK-P8: # %bb.0: # %entry
7474 ; CHECK-P8-NEXT: mtfprwa f0, r4
7475 ; CHECK-P8-NEXT: lis r4, 3725
7476 ; CHECK-P8-NEXT: ori r4, r4, 19025
7477 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
7478 ; CHECK-P8-NEXT: xscvsxddp f0, f0
7479 ; CHECK-P8-NEXT: stfdx f0, r3, r4
7480 ; CHECK-P8-NEXT: blr
7482 %conv = sitofp i32 %str to double
7483 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
7484 store double %conv, ptr %add.ptr, align 8
7488 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7489 define dso_local void @st_reg_int32_t_double(ptr nocapture %ptr, i64 %off, i32 signext %str) {
7490 ; CHECK-LABEL: st_reg_int32_t_double:
7491 ; CHECK: # %bb.0: # %entry
7492 ; CHECK-NEXT: mtfprwa f0, r5
7493 ; CHECK-NEXT: xscvsxddp f0, f0
7494 ; CHECK-NEXT: stfdx f0, r3, r4
7497 %conv = sitofp i32 %str to double
7498 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
7499 store double %conv, ptr %add.ptr, align 8
7503 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7504 define dso_local void @st_or1_int32_t_double(i64 %ptr, i8 zeroext %off, i32 signext %str) {
7505 ; CHECK-LABEL: st_or1_int32_t_double:
7506 ; CHECK: # %bb.0: # %entry
7507 ; CHECK-NEXT: mtfprwa f0, r5
7508 ; CHECK-NEXT: or r3, r4, r3
7509 ; CHECK-NEXT: xscvsxddp f0, f0
7510 ; CHECK-NEXT: stfd f0, 0(r3)
7513 %conv = sitofp i32 %str to double
7514 %conv1 = zext i8 %off to i64
7515 %or = or i64 %conv1, %ptr
7516 %0 = inttoptr i64 %or to ptr
7517 store double %conv, ptr %0, align 8
7521 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7522 define dso_local void @st_not_disjoint16_int32_t_double(i64 %ptr, i32 signext %str) {
7523 ; CHECK-LABEL: st_not_disjoint16_int32_t_double:
7524 ; CHECK: # %bb.0: # %entry
7525 ; CHECK-NEXT: mtfprwa f0, r4
7526 ; CHECK-NEXT: ori r3, r3, 6
7527 ; CHECK-NEXT: xscvsxddp f0, f0
7528 ; CHECK-NEXT: stfd f0, 0(r3)
7531 %conv = sitofp i32 %str to double
7532 %or = or i64 %ptr, 6
7533 %0 = inttoptr i64 %or to ptr
7534 store double %conv, ptr %0, align 8
7538 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7539 define dso_local void @st_disjoint_align16_int32_t_double(i64 %ptr, i32 signext %str) {
7540 ; CHECK-LABEL: st_disjoint_align16_int32_t_double:
7541 ; CHECK: # %bb.0: # %entry
7542 ; CHECK-NEXT: mtfprwa f0, r4
7543 ; CHECK-NEXT: rldicr r3, r3, 0, 51
7544 ; CHECK-NEXT: xscvsxddp f0, f0
7545 ; CHECK-NEXT: stfd f0, 24(r3)
7548 %and = and i64 %ptr, -4096
7549 %conv = sitofp i32 %str to double
7550 %or = or i64 %and, 24
7551 %0 = inttoptr i64 %or to ptr
7552 store double %conv, ptr %0, align 8
7556 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7557 define dso_local void @st_not_disjoint32_int32_t_double(i64 %ptr, i32 signext %str) {
7558 ; CHECK-P10-LABEL: st_not_disjoint32_int32_t_double:
7559 ; CHECK-P10: # %bb.0: # %entry
7560 ; CHECK-P10-NEXT: mtfprwa f0, r4
7561 ; CHECK-P10-NEXT: ori r3, r3, 34463
7562 ; CHECK-P10-NEXT: oris r3, r3, 1
7563 ; CHECK-P10-NEXT: xscvsxddp f0, f0
7564 ; CHECK-P10-NEXT: stfd f0, 0(r3)
7565 ; CHECK-P10-NEXT: blr
7567 ; CHECK-P9-LABEL: st_not_disjoint32_int32_t_double:
7568 ; CHECK-P9: # %bb.0: # %entry
7569 ; CHECK-P9-NEXT: mtfprwa f0, r4
7570 ; CHECK-P9-NEXT: ori r3, r3, 34463
7571 ; CHECK-P9-NEXT: xscvsxddp f0, f0
7572 ; CHECK-P9-NEXT: oris r3, r3, 1
7573 ; CHECK-P9-NEXT: stfd f0, 0(r3)
7574 ; CHECK-P9-NEXT: blr
7576 ; CHECK-P8-LABEL: st_not_disjoint32_int32_t_double:
7577 ; CHECK-P8: # %bb.0: # %entry
7578 ; CHECK-P8-NEXT: mtfprwa f0, r4
7579 ; CHECK-P8-NEXT: ori r3, r3, 34463
7580 ; CHECK-P8-NEXT: oris r3, r3, 1
7581 ; CHECK-P8-NEXT: xscvsxddp f0, f0
7582 ; CHECK-P8-NEXT: stfd f0, 0(r3)
7583 ; CHECK-P8-NEXT: blr
7585 %conv = sitofp i32 %str to double
7586 %or = or i64 %ptr, 99999
7587 %0 = inttoptr i64 %or to ptr
7588 store double %conv, ptr %0, align 8
7592 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7593 define dso_local void @st_disjoint_align32_int32_t_double(i64 %ptr, i32 signext %str) {
7594 ; CHECK-P10-LABEL: st_disjoint_align32_int32_t_double:
7595 ; CHECK-P10: # %bb.0: # %entry
7596 ; CHECK-P10-NEXT: mtfprwa f0, r4
7597 ; CHECK-P10-NEXT: lis r5, -15264
7598 ; CHECK-P10-NEXT: and r3, r3, r5
7599 ; CHECK-P10-NEXT: xscvsxddp f0, f0
7600 ; CHECK-P10-NEXT: pstfd f0, 999990000(r3), 0
7601 ; CHECK-P10-NEXT: blr
7603 ; CHECK-P9-LABEL: st_disjoint_align32_int32_t_double:
7604 ; CHECK-P9: # %bb.0: # %entry
7605 ; CHECK-P9-NEXT: mtfprwa f0, r4
7606 ; CHECK-P9-NEXT: lis r5, -15264
7607 ; CHECK-P9-NEXT: lis r4, 15258
7608 ; CHECK-P9-NEXT: xscvsxddp f0, f0
7609 ; CHECK-P9-NEXT: and r3, r3, r5
7610 ; CHECK-P9-NEXT: ori r4, r4, 41712
7611 ; CHECK-P9-NEXT: stfdx f0, r3, r4
7612 ; CHECK-P9-NEXT: blr
7614 ; CHECK-P8-LABEL: st_disjoint_align32_int32_t_double:
7615 ; CHECK-P8: # %bb.0: # %entry
7616 ; CHECK-P8-NEXT: mtfprwa f0, r4
7617 ; CHECK-P8-NEXT: lis r5, -15264
7618 ; CHECK-P8-NEXT: lis r4, 15258
7619 ; CHECK-P8-NEXT: and r3, r3, r5
7620 ; CHECK-P8-NEXT: ori r4, r4, 41712
7621 ; CHECK-P8-NEXT: xscvsxddp f0, f0
7622 ; CHECK-P8-NEXT: stfdx f0, r3, r4
7623 ; CHECK-P8-NEXT: blr
7625 %and = and i64 %ptr, -1000341504
7626 %conv = sitofp i32 %str to double
7627 %or = or i64 %and, 999990000
7628 %0 = inttoptr i64 %or to ptr
7629 store double %conv, ptr %0, align 16
7633 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7634 define dso_local void @st_not_disjoint64_int32_t_double(i64 %ptr, i32 signext %str) {
7635 ; CHECK-P10-LABEL: st_not_disjoint64_int32_t_double:
7636 ; CHECK-P10: # %bb.0: # %entry
7637 ; CHECK-P10-NEXT: mtfprwa f0, r4
7638 ; CHECK-P10-NEXT: pli r4, 232
7639 ; CHECK-P10-NEXT: pli r5, 3567587329
7640 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
7641 ; CHECK-P10-NEXT: xscvsxddp f0, f0
7642 ; CHECK-P10-NEXT: or r3, r3, r5
7643 ; CHECK-P10-NEXT: stfd f0, 0(r3)
7644 ; CHECK-P10-NEXT: blr
7646 ; CHECK-P9-LABEL: st_not_disjoint64_int32_t_double:
7647 ; CHECK-P9: # %bb.0: # %entry
7648 ; CHECK-P9-NEXT: mtfprwa f0, r4
7649 ; CHECK-P9-NEXT: li r4, 29
7650 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
7651 ; CHECK-P9-NEXT: xscvsxddp f0, f0
7652 ; CHECK-P9-NEXT: oris r4, r4, 54437
7653 ; CHECK-P9-NEXT: ori r4, r4, 4097
7654 ; CHECK-P9-NEXT: or r3, r3, r4
7655 ; CHECK-P9-NEXT: stfd f0, 0(r3)
7656 ; CHECK-P9-NEXT: blr
7658 ; CHECK-P8-LABEL: st_not_disjoint64_int32_t_double:
7659 ; CHECK-P8: # %bb.0: # %entry
7660 ; CHECK-P8-NEXT: mtfprwa f0, r4
7661 ; CHECK-P8-NEXT: li r4, 29
7662 ; CHECK-P8-NEXT: rldic r4, r4, 35, 24
7663 ; CHECK-P8-NEXT: oris r4, r4, 54437
7664 ; CHECK-P8-NEXT: xscvsxddp f0, f0
7665 ; CHECK-P8-NEXT: ori r4, r4, 4097
7666 ; CHECK-P8-NEXT: or r3, r3, r4
7667 ; CHECK-P8-NEXT: stfd f0, 0(r3)
7668 ; CHECK-P8-NEXT: blr
7670 %conv = sitofp i32 %str to double
7671 %or = or i64 %ptr, 1000000000001
7672 %0 = inttoptr i64 %or to ptr
7673 store double %conv, ptr %0, align 8
7677 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7678 define dso_local void @st_disjoint_align64_int32_t_double(i64 %ptr, i32 signext %str) {
7679 ; CHECK-P10-LABEL: st_disjoint_align64_int32_t_double:
7680 ; CHECK-P10: # %bb.0: # %entry
7681 ; CHECK-P10-NEXT: mtfprwa f0, r4
7682 ; CHECK-P10-NEXT: pli r4, 244140625
7683 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
7684 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7685 ; CHECK-P10-NEXT: xscvsxddp f0, f0
7686 ; CHECK-P10-NEXT: stfdx f0, r3, r4
7687 ; CHECK-P10-NEXT: blr
7689 ; CHECK-P9-LABEL: st_disjoint_align64_int32_t_double:
7690 ; CHECK-P9: # %bb.0: # %entry
7691 ; CHECK-P9-NEXT: mtfprwa f0, r4
7692 ; CHECK-P9-NEXT: lis r4, 3725
7693 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
7694 ; CHECK-P9-NEXT: xscvsxddp f0, f0
7695 ; CHECK-P9-NEXT: ori r4, r4, 19025
7696 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
7697 ; CHECK-P9-NEXT: stfdx f0, r3, r4
7698 ; CHECK-P9-NEXT: blr
7700 ; CHECK-P8-LABEL: st_disjoint_align64_int32_t_double:
7701 ; CHECK-P8: # %bb.0: # %entry
7702 ; CHECK-P8-NEXT: mtfprwa f0, r4
7703 ; CHECK-P8-NEXT: lis r4, 3725
7704 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
7705 ; CHECK-P8-NEXT: ori r4, r4, 19025
7706 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
7707 ; CHECK-P8-NEXT: xscvsxddp f0, f0
7708 ; CHECK-P8-NEXT: stfdx f0, r3, r4
7709 ; CHECK-P8-NEXT: blr
7711 %and = and i64 %ptr, -1099511627776
7712 %conv = sitofp i32 %str to double
7713 %or = or i64 %and, 1000000000000
7714 %0 = inttoptr i64 %or to ptr
7715 store double %conv, ptr %0, align 4096
7719 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7720 define dso_local void @st_cst_align16_int32_t_double(i32 signext %str) {
7721 ; CHECK-LABEL: st_cst_align16_int32_t_double:
7722 ; CHECK: # %bb.0: # %entry
7723 ; CHECK-NEXT: mtfprwa f0, r3
7724 ; CHECK-NEXT: xscvsxddp f0, f0
7725 ; CHECK-NEXT: stfd f0, 4080(0)
7728 %conv = sitofp i32 %str to double
7729 store double %conv, ptr inttoptr (i64 4080 to ptr), align 16
7733 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7734 define dso_local void @st_cst_align32_int32_t_double(i32 signext %str) {
7735 ; CHECK-LABEL: st_cst_align32_int32_t_double:
7736 ; CHECK: # %bb.0: # %entry
7737 ; CHECK-NEXT: mtfprwa f0, r3
7738 ; CHECK-NEXT: lis r3, 153
7739 ; CHECK-NEXT: xscvsxddp f0, f0
7740 ; CHECK-NEXT: stfd f0, -27108(r3)
7743 %conv = sitofp i32 %str to double
7744 store double %conv, ptr inttoptr (i64 9999900 to ptr), align 8
7748 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7749 define dso_local void @st_cst_align64_int32_t_double(i32 signext %str) {
7750 ; CHECK-P10-LABEL: st_cst_align64_int32_t_double:
7751 ; CHECK-P10: # %bb.0: # %entry
7752 ; CHECK-P10-NEXT: mtfprwa f0, r3
7753 ; CHECK-P10-NEXT: pli r3, 244140625
7754 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
7755 ; CHECK-P10-NEXT: xscvsxddp f0, f0
7756 ; CHECK-P10-NEXT: stfd f0, 0(r3)
7757 ; CHECK-P10-NEXT: blr
7759 ; CHECK-P9-LABEL: st_cst_align64_int32_t_double:
7760 ; CHECK-P9: # %bb.0: # %entry
7761 ; CHECK-P9-NEXT: mtfprwa f0, r3
7762 ; CHECK-P9-NEXT: lis r3, 3725
7763 ; CHECK-P9-NEXT: xscvsxddp f0, f0
7764 ; CHECK-P9-NEXT: ori r3, r3, 19025
7765 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
7766 ; CHECK-P9-NEXT: stfd f0, 0(r3)
7767 ; CHECK-P9-NEXT: blr
7769 ; CHECK-P8-LABEL: st_cst_align64_int32_t_double:
7770 ; CHECK-P8: # %bb.0: # %entry
7771 ; CHECK-P8-NEXT: mtfprwa f0, r3
7772 ; CHECK-P8-NEXT: lis r3, 3725
7773 ; CHECK-P8-NEXT: ori r3, r3, 19025
7774 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
7775 ; CHECK-P8-NEXT: xscvsxddp f0, f0
7776 ; CHECK-P8-NEXT: stfd f0, 0(r3)
7777 ; CHECK-P8-NEXT: blr
7779 %conv = sitofp i32 %str to double
7780 store double %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096