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 i8 @ld_0_int8_t_uint8_t(i64 %ptr) {
23 ; CHECK-LABEL: ld_0_int8_t_uint8_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
34 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
35 define dso_local signext i8 @ld_align16_int8_t_uint8_t(ptr nocapture readonly %ptr) {
36 ; CHECK-LABEL: ld_align16_int8_t_uint8_t:
37 ; CHECK: # %bb.0: # %entry
38 ; CHECK-NEXT: lbz r3, 8(r3)
39 ; CHECK-NEXT: extsb r3, r3
42 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
43 %0 = load i8, ptr %add.ptr, align 1
47 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
48 define dso_local signext i8 @ld_align32_int8_t_uint8_t(ptr nocapture readonly %ptr) {
49 ; CHECK-P10-LABEL: ld_align32_int8_t_uint8_t:
50 ; CHECK-P10: # %bb.0: # %entry
51 ; CHECK-P10-NEXT: plbz r3, 99999000(r3), 0
52 ; CHECK-P10-NEXT: extsb r3, r3
55 ; CHECK-PREP10-LABEL: ld_align32_int8_t_uint8_t:
56 ; CHECK-PREP10: # %bb.0: # %entry
57 ; CHECK-PREP10-NEXT: lis r4, 1525
58 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
59 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
60 ; CHECK-PREP10-NEXT: extsb r3, r3
61 ; CHECK-PREP10-NEXT: blr
63 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
64 %0 = load i8, ptr %add.ptr, align 1
68 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
69 define dso_local signext i8 @ld_align64_int8_t_uint8_t(ptr nocapture readonly %ptr) {
70 ; CHECK-P10-LABEL: ld_align64_int8_t_uint8_t:
71 ; CHECK-P10: # %bb.0: # %entry
72 ; CHECK-P10-NEXT: pli r4, 244140625
73 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
74 ; CHECK-P10-NEXT: lbzx r3, r3, r4
75 ; CHECK-P10-NEXT: extsb r3, r3
78 ; CHECK-PREP10-LABEL: ld_align64_int8_t_uint8_t:
79 ; CHECK-PREP10: # %bb.0: # %entry
80 ; CHECK-PREP10-NEXT: lis r4, 3725
81 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
82 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
83 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
84 ; CHECK-PREP10-NEXT: extsb r3, r3
85 ; CHECK-PREP10-NEXT: blr
87 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
88 %0 = load i8, ptr %add.ptr, align 1
92 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
93 define dso_local signext i8 @ld_reg_int8_t_uint8_t(ptr nocapture readonly %ptr, i64 %off) {
94 ; CHECK-LABEL: ld_reg_int8_t_uint8_t:
95 ; CHECK: # %bb.0: # %entry
96 ; CHECK-NEXT: lbzx r3, r3, r4
97 ; CHECK-NEXT: extsb r3, r3
100 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
101 %0 = load i8, ptr %add.ptr, align 1
105 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
106 define dso_local signext i8 @ld_or_int8_t_uint8_t(i64 %ptr, i8 zeroext %off) {
107 ; CHECK-LABEL: ld_or_int8_t_uint8_t:
108 ; CHECK: # %bb.0: # %entry
109 ; CHECK-NEXT: or r3, r4, r3
110 ; CHECK-NEXT: lbz r3, 0(r3)
111 ; CHECK-NEXT: extsb r3, r3
114 %conv = zext i8 %off to i64
115 %or = or i64 %conv, %ptr
116 %0 = inttoptr i64 %or to ptr
117 %1 = load i8, ptr %0, align 1
121 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
122 define dso_local signext i8 @ld_not_disjoint16_int8_t_uint8_t(i64 %ptr) {
123 ; CHECK-LABEL: ld_not_disjoint16_int8_t_uint8_t:
124 ; CHECK: # %bb.0: # %entry
125 ; CHECK-NEXT: ori r3, r3, 6
126 ; CHECK-NEXT: lbz r3, 0(r3)
127 ; CHECK-NEXT: extsb r3, r3
131 %0 = inttoptr i64 %or to ptr
132 %1 = load i8, ptr %0, align 1
136 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
137 define dso_local signext i8 @ld_disjoint_align16_int8_t_uint8_t(i64 %ptr) {
138 ; CHECK-LABEL: ld_disjoint_align16_int8_t_uint8_t:
139 ; CHECK: # %bb.0: # %entry
140 ; CHECK-NEXT: rldicr r3, r3, 0, 51
141 ; CHECK-NEXT: lbz r3, 24(r3)
142 ; CHECK-NEXT: extsb r3, r3
145 %and = and i64 %ptr, -4096
146 %or = or i64 %and, 24
147 %0 = inttoptr i64 %or to ptr
148 %1 = load i8, ptr %0, align 8
152 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
153 define dso_local signext i8 @ld_not_disjoint32_int8_t_uint8_t(i64 %ptr) {
154 ; CHECK-LABEL: ld_not_disjoint32_int8_t_uint8_t:
155 ; CHECK: # %bb.0: # %entry
156 ; CHECK-NEXT: ori r3, r3, 34463
157 ; CHECK-NEXT: oris r3, r3, 1
158 ; CHECK-NEXT: lbz r3, 0(r3)
159 ; CHECK-NEXT: extsb r3, r3
162 %or = or i64 %ptr, 99999
163 %0 = inttoptr i64 %or to ptr
164 %1 = load i8, ptr %0, align 1
168 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
169 define dso_local signext i8 @ld_disjoint_align32_int8_t_uint8_t(i64 %ptr) {
170 ; CHECK-P10-LABEL: ld_disjoint_align32_int8_t_uint8_t:
171 ; CHECK-P10: # %bb.0: # %entry
172 ; CHECK-P10-NEXT: lis r4, -15264
173 ; CHECK-P10-NEXT: and r3, r3, r4
174 ; CHECK-P10-NEXT: plbz r3, 999990000(r3), 0
175 ; CHECK-P10-NEXT: extsb r3, r3
176 ; CHECK-P10-NEXT: blr
178 ; CHECK-P9-LABEL: ld_disjoint_align32_int8_t_uint8_t:
179 ; CHECK-P9: # %bb.0: # %entry
180 ; CHECK-P9-NEXT: lis r4, -15264
181 ; CHECK-P9-NEXT: and r3, r3, r4
182 ; CHECK-P9-NEXT: lis r4, 15258
183 ; CHECK-P9-NEXT: ori r4, r4, 41712
184 ; CHECK-P9-NEXT: lbzx r3, r3, r4
185 ; CHECK-P9-NEXT: extsb r3, r3
188 ; CHECK-P8-LABEL: ld_disjoint_align32_int8_t_uint8_t:
189 ; CHECK-P8: # %bb.0: # %entry
190 ; CHECK-P8-NEXT: lis r4, -15264
191 ; CHECK-P8-NEXT: lis r5, 15258
192 ; CHECK-P8-NEXT: and r3, r3, r4
193 ; CHECK-P8-NEXT: ori r4, r5, 41712
194 ; CHECK-P8-NEXT: lbzx r3, r3, r4
195 ; CHECK-P8-NEXT: extsb r3, r3
198 %and = and i64 %ptr, -1000341504
199 %or = or i64 %and, 999990000
200 %0 = inttoptr i64 %or to ptr
201 %1 = load i8, ptr %0, align 16
205 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
206 define dso_local signext i8 @ld_not_disjoint64_int8_t_uint8_t(i64 %ptr) {
207 ; CHECK-P10-LABEL: ld_not_disjoint64_int8_t_uint8_t:
208 ; CHECK-P10: # %bb.0: # %entry
209 ; CHECK-P10-NEXT: pli r4, 232
210 ; CHECK-P10-NEXT: pli r5, 3567587329
211 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
212 ; CHECK-P10-NEXT: or r3, r3, r5
213 ; CHECK-P10-NEXT: lbz r3, 0(r3)
214 ; CHECK-P10-NEXT: extsb r3, r3
215 ; CHECK-P10-NEXT: blr
217 ; CHECK-PREP10-LABEL: ld_not_disjoint64_int8_t_uint8_t:
218 ; CHECK-PREP10: # %bb.0: # %entry
219 ; CHECK-PREP10-NEXT: li r4, 29
220 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
221 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
222 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
223 ; CHECK-PREP10-NEXT: or r3, r3, r4
224 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
225 ; CHECK-PREP10-NEXT: extsb r3, r3
226 ; CHECK-PREP10-NEXT: blr
228 %or = or i64 %ptr, 1000000000001
229 %0 = inttoptr i64 %or to ptr
230 %1 = load i8, ptr %0, align 1
234 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
235 define dso_local signext i8 @ld_disjoint_align64_int8_t_uint8_t(i64 %ptr) {
236 ; CHECK-P10-LABEL: ld_disjoint_align64_int8_t_uint8_t:
237 ; CHECK-P10: # %bb.0: # %entry
238 ; CHECK-P10-NEXT: pli r4, 244140625
239 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
240 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
241 ; CHECK-P10-NEXT: lbzx r3, r3, r4
242 ; CHECK-P10-NEXT: extsb r3, r3
243 ; CHECK-P10-NEXT: blr
245 ; CHECK-PREP10-LABEL: ld_disjoint_align64_int8_t_uint8_t:
246 ; CHECK-PREP10: # %bb.0: # %entry
247 ; CHECK-PREP10-NEXT: lis r4, 3725
248 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
249 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
250 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
251 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
252 ; CHECK-PREP10-NEXT: extsb r3, r3
253 ; CHECK-PREP10-NEXT: blr
255 %and = and i64 %ptr, -1099511627776
256 %or = or i64 %and, 1000000000000
257 %0 = inttoptr i64 %or to ptr
258 %1 = load i8, ptr %0, align 4096
262 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
263 define dso_local signext i8 @ld_cst_align16_int8_t_uint8_t() {
264 ; CHECK-LABEL: ld_cst_align16_int8_t_uint8_t:
265 ; CHECK: # %bb.0: # %entry
266 ; CHECK-NEXT: lbz r3, 4080(0)
267 ; CHECK-NEXT: extsb r3, r3
270 %0 = load i8, ptr inttoptr (i64 4080 to ptr), align 16
274 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
275 define dso_local signext i8 @ld_cst_align32_int8_t_uint8_t() {
276 ; CHECK-LABEL: ld_cst_align32_int8_t_uint8_t:
277 ; CHECK: # %bb.0: # %entry
278 ; CHECK-NEXT: lis r3, 153
279 ; CHECK-NEXT: lbz r3, -27108(r3)
280 ; CHECK-NEXT: extsb r3, r3
283 %0 = load i8, ptr inttoptr (i64 9999900 to ptr), align 4
287 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
288 define dso_local signext i8 @ld_cst_align64_int8_t_uint8_t() {
289 ; CHECK-P10-LABEL: ld_cst_align64_int8_t_uint8_t:
290 ; CHECK-P10: # %bb.0: # %entry
291 ; CHECK-P10-NEXT: pli r3, 244140625
292 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
293 ; CHECK-P10-NEXT: lbz r3, 0(r3)
294 ; CHECK-P10-NEXT: extsb r3, r3
295 ; CHECK-P10-NEXT: blr
297 ; CHECK-PREP10-LABEL: ld_cst_align64_int8_t_uint8_t:
298 ; CHECK-PREP10: # %bb.0: # %entry
299 ; CHECK-PREP10-NEXT: lis r3, 3725
300 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
301 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
302 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
303 ; CHECK-PREP10-NEXT: extsb r3, r3
304 ; CHECK-PREP10-NEXT: blr
306 %0 = load i8, ptr inttoptr (i64 1000000000000 to ptr), align 4096
310 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
311 define dso_local signext i8 @ld_0_int8_t_uint16_t(i64 %ptr) {
312 ; CHECK-LE-LABEL: ld_0_int8_t_uint16_t:
313 ; CHECK-LE: # %bb.0: # %entry
314 ; CHECK-LE-NEXT: lbz r3, 0(r3)
315 ; CHECK-LE-NEXT: extsb r3, r3
318 ; CHECK-BE-LABEL: ld_0_int8_t_uint16_t:
319 ; CHECK-BE: # %bb.0: # %entry
320 ; CHECK-BE-NEXT: lbz r3, 1(r3)
321 ; CHECK-BE-NEXT: extsb r3, r3
324 %0 = inttoptr i64 %ptr to ptr
325 %1 = load i16, ptr %0, align 2
326 %conv = trunc i16 %1 to i8
330 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
331 define dso_local signext i8 @ld_align16_int8_t_uint16_t(ptr nocapture readonly %ptr) {
332 ; CHECK-LE-LABEL: ld_align16_int8_t_uint16_t:
333 ; CHECK-LE: # %bb.0: # %entry
334 ; CHECK-LE-NEXT: lbz r3, 8(r3)
335 ; CHECK-LE-NEXT: extsb r3, r3
338 ; CHECK-BE-LABEL: ld_align16_int8_t_uint16_t:
339 ; CHECK-BE: # %bb.0: # %entry
340 ; CHECK-BE-NEXT: lbz r3, 9(r3)
341 ; CHECK-BE-NEXT: extsb r3, r3
344 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
345 %0 = load i16, ptr %add.ptr, align 2
346 %conv = trunc i16 %0 to i8
350 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
351 define dso_local signext i8 @ld_align32_int8_t_uint16_t(ptr nocapture readonly %ptr) {
352 ; CHECK-P10-LE-LABEL: ld_align32_int8_t_uint16_t:
353 ; CHECK-P10-LE: # %bb.0: # %entry
354 ; CHECK-P10-LE-NEXT: plbz r3, 99999000(r3), 0
355 ; CHECK-P10-LE-NEXT: extsb r3, r3
356 ; CHECK-P10-LE-NEXT: blr
358 ; CHECK-P10-BE-LABEL: ld_align32_int8_t_uint16_t:
359 ; CHECK-P10-BE: # %bb.0: # %entry
360 ; CHECK-P10-BE-NEXT: plbz r3, 99999001(r3), 0
361 ; CHECK-P10-BE-NEXT: extsb r3, r3
362 ; CHECK-P10-BE-NEXT: blr
364 ; CHECK-P9-LE-LABEL: ld_align32_int8_t_uint16_t:
365 ; CHECK-P9-LE: # %bb.0: # %entry
366 ; CHECK-P9-LE-NEXT: lis r4, 1525
367 ; CHECK-P9-LE-NEXT: ori r4, r4, 56600
368 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
369 ; CHECK-P9-LE-NEXT: extsb r3, r3
370 ; CHECK-P9-LE-NEXT: blr
372 ; CHECK-P9-BE-LABEL: ld_align32_int8_t_uint16_t:
373 ; CHECK-P9-BE: # %bb.0: # %entry
374 ; CHECK-P9-BE-NEXT: lis r4, 1525
375 ; CHECK-P9-BE-NEXT: ori r4, r4, 56601
376 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
377 ; CHECK-P9-BE-NEXT: extsb r3, r3
378 ; CHECK-P9-BE-NEXT: blr
380 ; CHECK-P8-LE-LABEL: ld_align32_int8_t_uint16_t:
381 ; CHECK-P8-LE: # %bb.0: # %entry
382 ; CHECK-P8-LE-NEXT: lis r4, 1525
383 ; CHECK-P8-LE-NEXT: ori r4, r4, 56600
384 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
385 ; CHECK-P8-LE-NEXT: extsb r3, r3
386 ; CHECK-P8-LE-NEXT: blr
388 ; CHECK-P8-BE-LABEL: ld_align32_int8_t_uint16_t:
389 ; CHECK-P8-BE: # %bb.0: # %entry
390 ; CHECK-P8-BE-NEXT: lis r4, 1525
391 ; CHECK-P8-BE-NEXT: ori r4, r4, 56601
392 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
393 ; CHECK-P8-BE-NEXT: extsb r3, r3
394 ; CHECK-P8-BE-NEXT: blr
396 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
397 %0 = load i16, ptr %add.ptr, align 2
398 %conv = trunc i16 %0 to i8
402 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
403 define dso_local signext i8 @ld_align64_int8_t_uint16_t(ptr nocapture readonly %ptr) {
404 ; CHECK-P10-LE-LABEL: ld_align64_int8_t_uint16_t:
405 ; CHECK-P10-LE: # %bb.0: # %entry
406 ; CHECK-P10-LE-NEXT: pli r4, 244140625
407 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
408 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
409 ; CHECK-P10-LE-NEXT: extsb r3, r3
410 ; CHECK-P10-LE-NEXT: blr
412 ; CHECK-P10-BE-LABEL: ld_align64_int8_t_uint16_t:
413 ; CHECK-P10-BE: # %bb.0: # %entry
414 ; CHECK-P10-BE-NEXT: pli r4, 232
415 ; CHECK-P10-BE-NEXT: pli r5, 3567587329
416 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
417 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
418 ; CHECK-P10-BE-NEXT: extsb r3, r3
419 ; CHECK-P10-BE-NEXT: blr
421 ; CHECK-P9-LE-LABEL: ld_align64_int8_t_uint16_t:
422 ; CHECK-P9-LE: # %bb.0: # %entry
423 ; CHECK-P9-LE-NEXT: lis r4, 3725
424 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
425 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
426 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
427 ; CHECK-P9-LE-NEXT: extsb r3, r3
428 ; CHECK-P9-LE-NEXT: blr
430 ; CHECK-P9-BE-LABEL: ld_align64_int8_t_uint16_t:
431 ; CHECK-P9-BE: # %bb.0: # %entry
432 ; CHECK-P9-BE-NEXT: li r4, 29
433 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
434 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
435 ; CHECK-P9-BE-NEXT: ori r4, r4, 4097
436 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
437 ; CHECK-P9-BE-NEXT: extsb r3, r3
438 ; CHECK-P9-BE-NEXT: blr
440 ; CHECK-P8-LE-LABEL: ld_align64_int8_t_uint16_t:
441 ; CHECK-P8-LE: # %bb.0: # %entry
442 ; CHECK-P8-LE-NEXT: lis r4, 3725
443 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
444 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
445 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
446 ; CHECK-P8-LE-NEXT: extsb r3, r3
447 ; CHECK-P8-LE-NEXT: blr
449 ; CHECK-P8-BE-LABEL: ld_align64_int8_t_uint16_t:
450 ; CHECK-P8-BE: # %bb.0: # %entry
451 ; CHECK-P8-BE-NEXT: li r4, 29
452 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
453 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
454 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
455 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
456 ; CHECK-P8-BE-NEXT: extsb r3, r3
457 ; CHECK-P8-BE-NEXT: blr
459 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
460 %0 = load i16, ptr %add.ptr, align 2
461 %conv = trunc i16 %0 to i8
465 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
466 define dso_local signext i8 @ld_reg_int8_t_uint16_t(ptr nocapture readonly %ptr, i64 %off) {
467 ; CHECK-LE-LABEL: ld_reg_int8_t_uint16_t:
468 ; CHECK-LE: # %bb.0: # %entry
469 ; CHECK-LE-NEXT: lbzx r3, r3, r4
470 ; CHECK-LE-NEXT: extsb r3, r3
473 ; CHECK-BE-LABEL: ld_reg_int8_t_uint16_t:
474 ; CHECK-BE: # %bb.0: # %entry
475 ; CHECK-BE-NEXT: add r3, r3, r4
476 ; CHECK-BE-NEXT: lbz r3, 1(r3)
477 ; CHECK-BE-NEXT: extsb r3, r3
480 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
481 %0 = load i16, ptr %add.ptr, align 2
482 %conv = trunc i16 %0 to i8
486 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
487 define dso_local signext i8 @ld_or_int8_t_uint16_t(i64 %ptr, i8 zeroext %off) {
488 ; CHECK-LE-LABEL: ld_or_int8_t_uint16_t:
489 ; CHECK-LE: # %bb.0: # %entry
490 ; CHECK-LE-NEXT: or r3, r4, r3
491 ; CHECK-LE-NEXT: lbz r3, 0(r3)
492 ; CHECK-LE-NEXT: extsb r3, r3
495 ; CHECK-BE-LABEL: ld_or_int8_t_uint16_t:
496 ; CHECK-BE: # %bb.0: # %entry
497 ; CHECK-BE-NEXT: or r3, r4, r3
498 ; CHECK-BE-NEXT: lbz r3, 1(r3)
499 ; CHECK-BE-NEXT: extsb r3, r3
502 %conv = zext i8 %off to i64
503 %or = or i64 %conv, %ptr
504 %0 = inttoptr i64 %or to ptr
505 %1 = load i16, ptr %0, align 2
506 %conv1 = trunc i16 %1 to i8
510 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
511 define dso_local signext i8 @ld_not_disjoint16_int8_t_uint16_t(i64 %ptr) {
512 ; CHECK-LE-LABEL: ld_not_disjoint16_int8_t_uint16_t:
513 ; CHECK-LE: # %bb.0: # %entry
514 ; CHECK-LE-NEXT: ori r3, r3, 6
515 ; CHECK-LE-NEXT: lbz r3, 0(r3)
516 ; CHECK-LE-NEXT: extsb r3, r3
519 ; CHECK-BE-LABEL: ld_not_disjoint16_int8_t_uint16_t:
520 ; CHECK-BE: # %bb.0: # %entry
521 ; CHECK-BE-NEXT: ori r3, r3, 6
522 ; CHECK-BE-NEXT: lbz r3, 1(r3)
523 ; CHECK-BE-NEXT: extsb r3, r3
527 %0 = inttoptr i64 %or to ptr
528 %1 = load i16, ptr %0, align 2
529 %conv = trunc i16 %1 to i8
533 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
534 define dso_local signext i8 @ld_disjoint_align16_int8_t_uint16_t(i64 %ptr) {
535 ; CHECK-LE-LABEL: ld_disjoint_align16_int8_t_uint16_t:
536 ; CHECK-LE: # %bb.0: # %entry
537 ; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
538 ; CHECK-LE-NEXT: lbz r3, 24(r3)
539 ; CHECK-LE-NEXT: extsb r3, r3
542 ; CHECK-BE-LABEL: ld_disjoint_align16_int8_t_uint16_t:
543 ; CHECK-BE: # %bb.0: # %entry
544 ; CHECK-BE-NEXT: rldicr r3, r3, 0, 51
545 ; CHECK-BE-NEXT: lbz r3, 25(r3)
546 ; CHECK-BE-NEXT: extsb r3, r3
549 %and = and i64 %ptr, -4096
550 %or = or i64 %and, 24
551 %0 = inttoptr i64 %or to ptr
552 %1 = load i16, ptr %0, align 8
553 %conv = trunc i16 %1 to i8
557 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
558 define dso_local signext i8 @ld_not_disjoint32_int8_t_uint16_t(i64 %ptr) {
559 ; CHECK-LE-LABEL: ld_not_disjoint32_int8_t_uint16_t:
560 ; CHECK-LE: # %bb.0: # %entry
561 ; CHECK-LE-NEXT: ori r3, r3, 34463
562 ; CHECK-LE-NEXT: oris r3, r3, 1
563 ; CHECK-LE-NEXT: lbz r3, 0(r3)
564 ; CHECK-LE-NEXT: extsb r3, r3
567 ; CHECK-BE-LABEL: ld_not_disjoint32_int8_t_uint16_t:
568 ; CHECK-BE: # %bb.0: # %entry
569 ; CHECK-BE-NEXT: ori r3, r3, 34463
570 ; CHECK-BE-NEXT: oris r3, r3, 1
571 ; CHECK-BE-NEXT: lbz r3, 1(r3)
572 ; CHECK-BE-NEXT: extsb r3, r3
575 %or = or i64 %ptr, 99999
576 %0 = inttoptr i64 %or to ptr
577 %1 = load i16, ptr %0, align 2
578 %conv = trunc i16 %1 to i8
582 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
583 define dso_local signext i8 @ld_disjoint_align32_int8_t_uint16_t(i64 %ptr) {
584 ; CHECK-P10-LE-LABEL: ld_disjoint_align32_int8_t_uint16_t:
585 ; CHECK-P10-LE: # %bb.0: # %entry
586 ; CHECK-P10-LE-NEXT: lis r4, -15264
587 ; CHECK-P10-LE-NEXT: and r3, r3, r4
588 ; CHECK-P10-LE-NEXT: plbz r3, 999990000(r3), 0
589 ; CHECK-P10-LE-NEXT: extsb r3, r3
590 ; CHECK-P10-LE-NEXT: blr
592 ; CHECK-P10-BE-LABEL: ld_disjoint_align32_int8_t_uint16_t:
593 ; CHECK-P10-BE: # %bb.0: # %entry
594 ; CHECK-P10-BE-NEXT: lis r4, -15264
595 ; CHECK-P10-BE-NEXT: and r3, r3, r4
596 ; CHECK-P10-BE-NEXT: plbz r3, 999990001(r3), 0
597 ; CHECK-P10-BE-NEXT: extsb r3, r3
598 ; CHECK-P10-BE-NEXT: blr
600 ; CHECK-P9-LE-LABEL: ld_disjoint_align32_int8_t_uint16_t:
601 ; CHECK-P9-LE: # %bb.0: # %entry
602 ; CHECK-P9-LE-NEXT: lis r4, -15264
603 ; CHECK-P9-LE-NEXT: and r3, r3, r4
604 ; CHECK-P9-LE-NEXT: lis r4, 15258
605 ; CHECK-P9-LE-NEXT: ori r4, r4, 41712
606 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
607 ; CHECK-P9-LE-NEXT: extsb r3, r3
608 ; CHECK-P9-LE-NEXT: blr
610 ; CHECK-P9-BE-LABEL: ld_disjoint_align32_int8_t_uint16_t:
611 ; CHECK-P9-BE: # %bb.0: # %entry
612 ; CHECK-P9-BE-NEXT: lis r4, -15264
613 ; CHECK-P9-BE-NEXT: and r3, r3, r4
614 ; CHECK-P9-BE-NEXT: lis r4, 15258
615 ; CHECK-P9-BE-NEXT: ori r4, r4, 41713
616 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
617 ; CHECK-P9-BE-NEXT: extsb r3, r3
618 ; CHECK-P9-BE-NEXT: blr
620 ; CHECK-P8-LE-LABEL: ld_disjoint_align32_int8_t_uint16_t:
621 ; CHECK-P8-LE: # %bb.0: # %entry
622 ; CHECK-P8-LE-NEXT: lis r4, -15264
623 ; CHECK-P8-LE-NEXT: lis r5, 15258
624 ; CHECK-P8-LE-NEXT: and r3, r3, r4
625 ; CHECK-P8-LE-NEXT: ori r4, r5, 41712
626 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
627 ; CHECK-P8-LE-NEXT: extsb r3, r3
628 ; CHECK-P8-LE-NEXT: blr
630 ; CHECK-P8-BE-LABEL: ld_disjoint_align32_int8_t_uint16_t:
631 ; CHECK-P8-BE: # %bb.0: # %entry
632 ; CHECK-P8-BE-NEXT: lis r4, -15264
633 ; CHECK-P8-BE-NEXT: lis r5, 15258
634 ; CHECK-P8-BE-NEXT: and r3, r3, r4
635 ; CHECK-P8-BE-NEXT: ori r4, r5, 41713
636 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
637 ; CHECK-P8-BE-NEXT: extsb r3, r3
638 ; CHECK-P8-BE-NEXT: blr
640 %and = and i64 %ptr, -1000341504
641 %or = or i64 %and, 999990000
642 %0 = inttoptr i64 %or to ptr
643 %1 = load i16, ptr %0, align 16
644 %conv = trunc i16 %1 to i8
648 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
649 define dso_local signext i8 @ld_not_disjoint64_int8_t_uint16_t(i64 %ptr) {
650 ; CHECK-P10-LE-LABEL: ld_not_disjoint64_int8_t_uint16_t:
651 ; CHECK-P10-LE: # %bb.0: # %entry
652 ; CHECK-P10-LE-NEXT: pli r4, 232
653 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
654 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
655 ; CHECK-P10-LE-NEXT: or r3, r3, r5
656 ; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
657 ; CHECK-P10-LE-NEXT: extsb r3, r3
658 ; CHECK-P10-LE-NEXT: blr
660 ; CHECK-P10-BE-LABEL: ld_not_disjoint64_int8_t_uint16_t:
661 ; CHECK-P10-BE: # %bb.0: # %entry
662 ; CHECK-P10-BE-NEXT: pli r4, 232
663 ; CHECK-P10-BE-NEXT: pli r5, 3567587329
664 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
665 ; CHECK-P10-BE-NEXT: or r3, r3, r5
666 ; CHECK-P10-BE-NEXT: lbz r3, 1(r3)
667 ; CHECK-P10-BE-NEXT: extsb r3, r3
668 ; CHECK-P10-BE-NEXT: blr
670 ; CHECK-P9-LE-LABEL: ld_not_disjoint64_int8_t_uint16_t:
671 ; CHECK-P9-LE: # %bb.0: # %entry
672 ; CHECK-P9-LE-NEXT: li r4, 29
673 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
674 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
675 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
676 ; CHECK-P9-LE-NEXT: or r3, r3, r4
677 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
678 ; CHECK-P9-LE-NEXT: extsb r3, r3
679 ; CHECK-P9-LE-NEXT: blr
681 ; CHECK-P9-BE-LABEL: ld_not_disjoint64_int8_t_uint16_t:
682 ; CHECK-P9-BE: # %bb.0: # %entry
683 ; CHECK-P9-BE-NEXT: li r4, 29
684 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
685 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
686 ; CHECK-P9-BE-NEXT: ori r4, r4, 4097
687 ; CHECK-P9-BE-NEXT: or r3, r3, r4
688 ; CHECK-P9-BE-NEXT: lbz r3, 1(r3)
689 ; CHECK-P9-BE-NEXT: extsb r3, r3
690 ; CHECK-P9-BE-NEXT: blr
692 ; CHECK-P8-LE-LABEL: ld_not_disjoint64_int8_t_uint16_t:
693 ; CHECK-P8-LE: # %bb.0: # %entry
694 ; CHECK-P8-LE-NEXT: li r4, 29
695 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
696 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
697 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
698 ; CHECK-P8-LE-NEXT: or r3, r3, r4
699 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
700 ; CHECK-P8-LE-NEXT: extsb r3, r3
701 ; CHECK-P8-LE-NEXT: blr
703 ; CHECK-P8-BE-LABEL: ld_not_disjoint64_int8_t_uint16_t:
704 ; CHECK-P8-BE: # %bb.0: # %entry
705 ; CHECK-P8-BE-NEXT: li r4, 29
706 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
707 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
708 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
709 ; CHECK-P8-BE-NEXT: or r3, r3, r4
710 ; CHECK-P8-BE-NEXT: lbz r3, 1(r3)
711 ; CHECK-P8-BE-NEXT: extsb r3, r3
712 ; CHECK-P8-BE-NEXT: blr
714 %or = or i64 %ptr, 1000000000001
715 %0 = inttoptr i64 %or to ptr
716 %1 = load i16, ptr %0, align 2
717 %conv = trunc i16 %1 to i8
721 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
722 define dso_local signext i8 @ld_disjoint_align64_int8_t_uint16_t(i64 %ptr) {
723 ; CHECK-P10-LE-LABEL: ld_disjoint_align64_int8_t_uint16_t:
724 ; CHECK-P10-LE: # %bb.0: # %entry
725 ; CHECK-P10-LE-NEXT: pli r4, 244140625
726 ; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
727 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
728 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
729 ; CHECK-P10-LE-NEXT: extsb r3, r3
730 ; CHECK-P10-LE-NEXT: blr
732 ; CHECK-P10-BE-LABEL: ld_disjoint_align64_int8_t_uint16_t:
733 ; CHECK-P10-BE: # %bb.0: # %entry
734 ; CHECK-P10-BE-NEXT: pli r4, 232
735 ; CHECK-P10-BE-NEXT: pli r5, 3567587329
736 ; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
737 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
738 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
739 ; CHECK-P10-BE-NEXT: extsb r3, r3
740 ; CHECK-P10-BE-NEXT: blr
742 ; CHECK-P9-LE-LABEL: ld_disjoint_align64_int8_t_uint16_t:
743 ; CHECK-P9-LE: # %bb.0: # %entry
744 ; CHECK-P9-LE-NEXT: lis r4, 3725
745 ; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
746 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
747 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
748 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
749 ; CHECK-P9-LE-NEXT: extsb r3, r3
750 ; CHECK-P9-LE-NEXT: blr
752 ; CHECK-P9-BE-LABEL: ld_disjoint_align64_int8_t_uint16_t:
753 ; CHECK-P9-BE: # %bb.0: # %entry
754 ; CHECK-P9-BE-NEXT: li r4, 29
755 ; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
756 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
757 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
758 ; CHECK-P9-BE-NEXT: ori r4, r4, 4097
759 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
760 ; CHECK-P9-BE-NEXT: extsb r3, r3
761 ; CHECK-P9-BE-NEXT: blr
763 ; CHECK-P8-LE-LABEL: ld_disjoint_align64_int8_t_uint16_t:
764 ; CHECK-P8-LE: # %bb.0: # %entry
765 ; CHECK-P8-LE-NEXT: lis r4, 3725
766 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
767 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
768 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
769 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
770 ; CHECK-P8-LE-NEXT: extsb r3, r3
771 ; CHECK-P8-LE-NEXT: blr
773 ; CHECK-P8-BE-LABEL: ld_disjoint_align64_int8_t_uint16_t:
774 ; CHECK-P8-BE: # %bb.0: # %entry
775 ; CHECK-P8-BE-NEXT: li r4, 29
776 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
777 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
778 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
779 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
780 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
781 ; CHECK-P8-BE-NEXT: extsb r3, r3
782 ; CHECK-P8-BE-NEXT: blr
784 %and = and i64 %ptr, -1099511627776
785 %or = or i64 %and, 1000000000000
786 %0 = inttoptr i64 %or to ptr
787 %1 = load i16, ptr %0, align 4096
788 %conv = trunc i16 %1 to i8
792 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
793 define dso_local signext i8 @ld_cst_align16_int8_t_uint16_t() {
794 ; CHECK-LE-LABEL: ld_cst_align16_int8_t_uint16_t:
795 ; CHECK-LE: # %bb.0: # %entry
796 ; CHECK-LE-NEXT: lbz r3, 4080(0)
797 ; CHECK-LE-NEXT: extsb r3, r3
800 ; CHECK-BE-LABEL: ld_cst_align16_int8_t_uint16_t:
801 ; CHECK-BE: # %bb.0: # %entry
802 ; CHECK-BE-NEXT: lbz r3, 4081(0)
803 ; CHECK-BE-NEXT: extsb r3, r3
806 %0 = load i16, ptr inttoptr (i64 4080 to ptr), align 16
807 %conv = trunc i16 %0 to i8
811 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
812 define dso_local signext i8 @ld_cst_align32_int8_t_uint16_t() {
813 ; CHECK-LE-LABEL: ld_cst_align32_int8_t_uint16_t:
814 ; CHECK-LE: # %bb.0: # %entry
815 ; CHECK-LE-NEXT: lis r3, 153
816 ; CHECK-LE-NEXT: lbz r3, -27108(r3)
817 ; CHECK-LE-NEXT: extsb r3, r3
820 ; CHECK-BE-LABEL: ld_cst_align32_int8_t_uint16_t:
821 ; CHECK-BE: # %bb.0: # %entry
822 ; CHECK-BE-NEXT: lis r3, 153
823 ; CHECK-BE-NEXT: lbz r3, -27107(r3)
824 ; CHECK-BE-NEXT: extsb r3, r3
827 %0 = load i16, ptr inttoptr (i64 9999900 to ptr), align 4
828 %conv = trunc i16 %0 to i8
832 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
833 define dso_local signext i8 @ld_cst_align64_int8_t_uint16_t() {
834 ; CHECK-P10-LE-LABEL: ld_cst_align64_int8_t_uint16_t:
835 ; CHECK-P10-LE: # %bb.0: # %entry
836 ; CHECK-P10-LE-NEXT: pli r3, 244140625
837 ; CHECK-P10-LE-NEXT: rldic r3, r3, 12, 24
838 ; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
839 ; CHECK-P10-LE-NEXT: extsb r3, r3
840 ; CHECK-P10-LE-NEXT: blr
842 ; CHECK-P10-BE-LABEL: ld_cst_align64_int8_t_uint16_t:
843 ; CHECK-P10-BE: # %bb.0: # %entry
844 ; CHECK-P10-BE-NEXT: pli r3, 232
845 ; CHECK-P10-BE-NEXT: pli r4, 3567587329
846 ; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
847 ; CHECK-P10-BE-NEXT: lbz r3, 0(r4)
848 ; CHECK-P10-BE-NEXT: extsb r3, r3
849 ; CHECK-P10-BE-NEXT: blr
851 ; CHECK-P9-LE-LABEL: ld_cst_align64_int8_t_uint16_t:
852 ; CHECK-P9-LE: # %bb.0: # %entry
853 ; CHECK-P9-LE-NEXT: lis r3, 3725
854 ; CHECK-P9-LE-NEXT: ori r3, r3, 19025
855 ; CHECK-P9-LE-NEXT: rldic r3, r3, 12, 24
856 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
857 ; CHECK-P9-LE-NEXT: extsb r3, r3
858 ; CHECK-P9-LE-NEXT: blr
860 ; CHECK-P9-BE-LABEL: ld_cst_align64_int8_t_uint16_t:
861 ; CHECK-P9-BE: # %bb.0: # %entry
862 ; CHECK-P9-BE-NEXT: li r3, 29
863 ; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
864 ; CHECK-P9-BE-NEXT: oris r3, r3, 54437
865 ; CHECK-P9-BE-NEXT: ori r3, r3, 4097
866 ; CHECK-P9-BE-NEXT: lbz r3, 0(r3)
867 ; CHECK-P9-BE-NEXT: extsb r3, r3
868 ; CHECK-P9-BE-NEXT: blr
870 ; CHECK-P8-LE-LABEL: ld_cst_align64_int8_t_uint16_t:
871 ; CHECK-P8-LE: # %bb.0: # %entry
872 ; CHECK-P8-LE-NEXT: lis r3, 3725
873 ; CHECK-P8-LE-NEXT: ori r3, r3, 19025
874 ; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
875 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
876 ; CHECK-P8-LE-NEXT: extsb r3, r3
877 ; CHECK-P8-LE-NEXT: blr
879 ; CHECK-P8-BE-LABEL: ld_cst_align64_int8_t_uint16_t:
880 ; CHECK-P8-BE: # %bb.0: # %entry
881 ; CHECK-P8-BE-NEXT: li r3, 29
882 ; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
883 ; CHECK-P8-BE-NEXT: oris r3, r3, 54437
884 ; CHECK-P8-BE-NEXT: ori r3, r3, 4097
885 ; CHECK-P8-BE-NEXT: lbz r3, 0(r3)
886 ; CHECK-P8-BE-NEXT: extsb r3, r3
887 ; CHECK-P8-BE-NEXT: blr
889 %0 = load i16, ptr inttoptr (i64 1000000000000 to ptr), align 4096
890 %conv = trunc i16 %0 to i8
894 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
895 define dso_local signext i8 @ld_0_int8_t_uint32_t(i64 %ptr) {
896 ; CHECK-LE-LABEL: ld_0_int8_t_uint32_t:
897 ; CHECK-LE: # %bb.0: # %entry
898 ; CHECK-LE-NEXT: lbz r3, 0(r3)
899 ; CHECK-LE-NEXT: extsb r3, r3
902 ; CHECK-BE-LABEL: ld_0_int8_t_uint32_t:
903 ; CHECK-BE: # %bb.0: # %entry
904 ; CHECK-BE-NEXT: lbz r3, 3(r3)
905 ; CHECK-BE-NEXT: extsb r3, r3
908 %0 = inttoptr i64 %ptr to ptr
909 %1 = load i32, ptr %0, align 4
910 %conv = trunc i32 %1 to i8
914 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
915 define dso_local signext i8 @ld_align16_int8_t_uint32_t(ptr nocapture readonly %ptr) {
916 ; CHECK-LE-LABEL: ld_align16_int8_t_uint32_t:
917 ; CHECK-LE: # %bb.0: # %entry
918 ; CHECK-LE-NEXT: lbz r3, 8(r3)
919 ; CHECK-LE-NEXT: extsb r3, r3
922 ; CHECK-BE-LABEL: ld_align16_int8_t_uint32_t:
923 ; CHECK-BE: # %bb.0: # %entry
924 ; CHECK-BE-NEXT: lbz r3, 11(r3)
925 ; CHECK-BE-NEXT: extsb r3, r3
928 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
929 %0 = load i32, ptr %add.ptr, align 4
930 %conv = trunc i32 %0 to i8
934 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
935 define dso_local signext i8 @ld_align32_int8_t_uint32_t(ptr nocapture readonly %ptr) {
936 ; CHECK-P10-LE-LABEL: ld_align32_int8_t_uint32_t:
937 ; CHECK-P10-LE: # %bb.0: # %entry
938 ; CHECK-P10-LE-NEXT: plbz r3, 99999000(r3), 0
939 ; CHECK-P10-LE-NEXT: extsb r3, r3
940 ; CHECK-P10-LE-NEXT: blr
942 ; CHECK-P10-BE-LABEL: ld_align32_int8_t_uint32_t:
943 ; CHECK-P10-BE: # %bb.0: # %entry
944 ; CHECK-P10-BE-NEXT: plbz r3, 99999003(r3), 0
945 ; CHECK-P10-BE-NEXT: extsb r3, r3
946 ; CHECK-P10-BE-NEXT: blr
948 ; CHECK-P9-LE-LABEL: ld_align32_int8_t_uint32_t:
949 ; CHECK-P9-LE: # %bb.0: # %entry
950 ; CHECK-P9-LE-NEXT: lis r4, 1525
951 ; CHECK-P9-LE-NEXT: ori r4, r4, 56600
952 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
953 ; CHECK-P9-LE-NEXT: extsb r3, r3
954 ; CHECK-P9-LE-NEXT: blr
956 ; CHECK-P9-BE-LABEL: ld_align32_int8_t_uint32_t:
957 ; CHECK-P9-BE: # %bb.0: # %entry
958 ; CHECK-P9-BE-NEXT: lis r4, 1525
959 ; CHECK-P9-BE-NEXT: ori r4, r4, 56603
960 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
961 ; CHECK-P9-BE-NEXT: extsb r3, r3
962 ; CHECK-P9-BE-NEXT: blr
964 ; CHECK-P8-LE-LABEL: ld_align32_int8_t_uint32_t:
965 ; CHECK-P8-LE: # %bb.0: # %entry
966 ; CHECK-P8-LE-NEXT: lis r4, 1525
967 ; CHECK-P8-LE-NEXT: ori r4, r4, 56600
968 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
969 ; CHECK-P8-LE-NEXT: extsb r3, r3
970 ; CHECK-P8-LE-NEXT: blr
972 ; CHECK-P8-BE-LABEL: ld_align32_int8_t_uint32_t:
973 ; CHECK-P8-BE: # %bb.0: # %entry
974 ; CHECK-P8-BE-NEXT: lis r4, 1525
975 ; CHECK-P8-BE-NEXT: ori r4, r4, 56603
976 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
977 ; CHECK-P8-BE-NEXT: extsb r3, r3
978 ; CHECK-P8-BE-NEXT: blr
980 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
981 %0 = load i32, ptr %add.ptr, align 4
982 %conv = trunc i32 %0 to i8
986 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
987 define dso_local signext i8 @ld_align64_int8_t_uint32_t(ptr nocapture readonly %ptr) {
988 ; CHECK-P10-LE-LABEL: ld_align64_int8_t_uint32_t:
989 ; CHECK-P10-LE: # %bb.0: # %entry
990 ; CHECK-P10-LE-NEXT: pli r4, 244140625
991 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
992 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
993 ; CHECK-P10-LE-NEXT: extsb r3, r3
994 ; CHECK-P10-LE-NEXT: blr
996 ; CHECK-P10-BE-LABEL: ld_align64_int8_t_uint32_t:
997 ; CHECK-P10-BE: # %bb.0: # %entry
998 ; CHECK-P10-BE-NEXT: pli r4, 232
999 ; CHECK-P10-BE-NEXT: pli r5, 3567587331
1000 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
1001 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
1002 ; CHECK-P10-BE-NEXT: extsb r3, r3
1003 ; CHECK-P10-BE-NEXT: blr
1005 ; CHECK-P9-LE-LABEL: ld_align64_int8_t_uint32_t:
1006 ; CHECK-P9-LE: # %bb.0: # %entry
1007 ; CHECK-P9-LE-NEXT: lis r4, 3725
1008 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
1009 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
1010 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
1011 ; CHECK-P9-LE-NEXT: extsb r3, r3
1012 ; CHECK-P9-LE-NEXT: blr
1014 ; CHECK-P9-BE-LABEL: ld_align64_int8_t_uint32_t:
1015 ; CHECK-P9-BE: # %bb.0: # %entry
1016 ; CHECK-P9-BE-NEXT: li r4, 29
1017 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
1018 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
1019 ; CHECK-P9-BE-NEXT: ori r4, r4, 4099
1020 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
1021 ; CHECK-P9-BE-NEXT: extsb r3, r3
1022 ; CHECK-P9-BE-NEXT: blr
1024 ; CHECK-P8-LE-LABEL: ld_align64_int8_t_uint32_t:
1025 ; CHECK-P8-LE: # %bb.0: # %entry
1026 ; CHECK-P8-LE-NEXT: lis r4, 3725
1027 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
1028 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
1029 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
1030 ; CHECK-P8-LE-NEXT: extsb r3, r3
1031 ; CHECK-P8-LE-NEXT: blr
1033 ; CHECK-P8-BE-LABEL: ld_align64_int8_t_uint32_t:
1034 ; CHECK-P8-BE: # %bb.0: # %entry
1035 ; CHECK-P8-BE-NEXT: li r4, 29
1036 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
1037 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
1038 ; CHECK-P8-BE-NEXT: ori r4, r4, 4099
1039 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
1040 ; CHECK-P8-BE-NEXT: extsb r3, r3
1041 ; CHECK-P8-BE-NEXT: blr
1043 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
1044 %0 = load i32, ptr %add.ptr, align 4
1045 %conv = trunc i32 %0 to i8
1049 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1050 define dso_local signext i8 @ld_reg_int8_t_uint32_t(ptr nocapture readonly %ptr, i64 %off) {
1051 ; CHECK-LE-LABEL: ld_reg_int8_t_uint32_t:
1052 ; CHECK-LE: # %bb.0: # %entry
1053 ; CHECK-LE-NEXT: lbzx r3, r3, r4
1054 ; CHECK-LE-NEXT: extsb r3, r3
1055 ; CHECK-LE-NEXT: blr
1057 ; CHECK-BE-LABEL: ld_reg_int8_t_uint32_t:
1058 ; CHECK-BE: # %bb.0: # %entry
1059 ; CHECK-BE-NEXT: add r3, r3, r4
1060 ; CHECK-BE-NEXT: lbz r3, 3(r3)
1061 ; CHECK-BE-NEXT: extsb r3, r3
1062 ; CHECK-BE-NEXT: blr
1064 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
1065 %0 = load i32, ptr %add.ptr, align 4
1066 %conv = trunc i32 %0 to i8
1070 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1071 define dso_local signext i8 @ld_or_int8_t_uint32_t(i64 %ptr, i8 zeroext %off) {
1072 ; CHECK-LE-LABEL: ld_or_int8_t_uint32_t:
1073 ; CHECK-LE: # %bb.0: # %entry
1074 ; CHECK-LE-NEXT: or r3, r4, r3
1075 ; CHECK-LE-NEXT: lbz r3, 0(r3)
1076 ; CHECK-LE-NEXT: extsb r3, r3
1077 ; CHECK-LE-NEXT: blr
1079 ; CHECK-BE-LABEL: ld_or_int8_t_uint32_t:
1080 ; CHECK-BE: # %bb.0: # %entry
1081 ; CHECK-BE-NEXT: or r3, r4, r3
1082 ; CHECK-BE-NEXT: lbz r3, 3(r3)
1083 ; CHECK-BE-NEXT: extsb r3, r3
1084 ; CHECK-BE-NEXT: blr
1086 %conv = zext i8 %off to i64
1087 %or = or i64 %conv, %ptr
1088 %0 = inttoptr i64 %or to ptr
1089 %1 = load i32, ptr %0, align 4
1090 %conv1 = trunc i32 %1 to i8
1094 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1095 define dso_local signext i8 @ld_not_disjoint16_int8_t_uint32_t(i64 %ptr) {
1096 ; CHECK-LE-LABEL: ld_not_disjoint16_int8_t_uint32_t:
1097 ; CHECK-LE: # %bb.0: # %entry
1098 ; CHECK-LE-NEXT: ori r3, r3, 6
1099 ; CHECK-LE-NEXT: lbz r3, 0(r3)
1100 ; CHECK-LE-NEXT: extsb r3, r3
1101 ; CHECK-LE-NEXT: blr
1103 ; CHECK-BE-LABEL: ld_not_disjoint16_int8_t_uint32_t:
1104 ; CHECK-BE: # %bb.0: # %entry
1105 ; CHECK-BE-NEXT: ori r3, r3, 6
1106 ; CHECK-BE-NEXT: lbz r3, 3(r3)
1107 ; CHECK-BE-NEXT: extsb r3, r3
1108 ; CHECK-BE-NEXT: blr
1110 %or = or i64 %ptr, 6
1111 %0 = inttoptr i64 %or to ptr
1112 %1 = load i32, ptr %0, align 4
1113 %conv = trunc i32 %1 to i8
1117 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1118 define dso_local signext i8 @ld_disjoint_align16_int8_t_uint32_t(i64 %ptr) {
1119 ; CHECK-LE-LABEL: ld_disjoint_align16_int8_t_uint32_t:
1120 ; CHECK-LE: # %bb.0: # %entry
1121 ; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
1122 ; CHECK-LE-NEXT: lbz r3, 24(r3)
1123 ; CHECK-LE-NEXT: extsb r3, r3
1124 ; CHECK-LE-NEXT: blr
1126 ; CHECK-BE-LABEL: ld_disjoint_align16_int8_t_uint32_t:
1127 ; CHECK-BE: # %bb.0: # %entry
1128 ; CHECK-BE-NEXT: rldicr r3, r3, 0, 51
1129 ; CHECK-BE-NEXT: lbz r3, 27(r3)
1130 ; CHECK-BE-NEXT: extsb r3, r3
1131 ; CHECK-BE-NEXT: blr
1133 %and = and i64 %ptr, -4096
1134 %or = or i64 %and, 24
1135 %0 = inttoptr i64 %or to ptr
1136 %1 = load i32, ptr %0, align 8
1137 %conv = trunc i32 %1 to i8
1141 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1142 define dso_local signext i8 @ld_not_disjoint32_int8_t_uint32_t(i64 %ptr) {
1143 ; CHECK-LE-LABEL: ld_not_disjoint32_int8_t_uint32_t:
1144 ; CHECK-LE: # %bb.0: # %entry
1145 ; CHECK-LE-NEXT: ori r3, r3, 34463
1146 ; CHECK-LE-NEXT: oris r3, r3, 1
1147 ; CHECK-LE-NEXT: lbz r3, 0(r3)
1148 ; CHECK-LE-NEXT: extsb r3, r3
1149 ; CHECK-LE-NEXT: blr
1151 ; CHECK-BE-LABEL: ld_not_disjoint32_int8_t_uint32_t:
1152 ; CHECK-BE: # %bb.0: # %entry
1153 ; CHECK-BE-NEXT: ori r3, r3, 34463
1154 ; CHECK-BE-NEXT: oris r3, r3, 1
1155 ; CHECK-BE-NEXT: lbz r3, 3(r3)
1156 ; CHECK-BE-NEXT: extsb r3, r3
1157 ; CHECK-BE-NEXT: blr
1159 %or = or i64 %ptr, 99999
1160 %0 = inttoptr i64 %or to ptr
1161 %1 = load i32, ptr %0, align 4
1162 %conv = trunc i32 %1 to i8
1166 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1167 define dso_local signext i8 @ld_disjoint_align32_int8_t_uint32_t(i64 %ptr) {
1168 ; CHECK-P10-LE-LABEL: ld_disjoint_align32_int8_t_uint32_t:
1169 ; CHECK-P10-LE: # %bb.0: # %entry
1170 ; CHECK-P10-LE-NEXT: lis r4, -15264
1171 ; CHECK-P10-LE-NEXT: and r3, r3, r4
1172 ; CHECK-P10-LE-NEXT: plbz r3, 999990000(r3), 0
1173 ; CHECK-P10-LE-NEXT: extsb r3, r3
1174 ; CHECK-P10-LE-NEXT: blr
1176 ; CHECK-P10-BE-LABEL: ld_disjoint_align32_int8_t_uint32_t:
1177 ; CHECK-P10-BE: # %bb.0: # %entry
1178 ; CHECK-P10-BE-NEXT: lis r4, -15264
1179 ; CHECK-P10-BE-NEXT: and r3, r3, r4
1180 ; CHECK-P10-BE-NEXT: plbz r3, 999990003(r3), 0
1181 ; CHECK-P10-BE-NEXT: extsb r3, r3
1182 ; CHECK-P10-BE-NEXT: blr
1184 ; CHECK-P9-LE-LABEL: ld_disjoint_align32_int8_t_uint32_t:
1185 ; CHECK-P9-LE: # %bb.0: # %entry
1186 ; CHECK-P9-LE-NEXT: lis r4, -15264
1187 ; CHECK-P9-LE-NEXT: and r3, r3, r4
1188 ; CHECK-P9-LE-NEXT: lis r4, 15258
1189 ; CHECK-P9-LE-NEXT: ori r4, r4, 41712
1190 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
1191 ; CHECK-P9-LE-NEXT: extsb r3, r3
1192 ; CHECK-P9-LE-NEXT: blr
1194 ; CHECK-P9-BE-LABEL: ld_disjoint_align32_int8_t_uint32_t:
1195 ; CHECK-P9-BE: # %bb.0: # %entry
1196 ; CHECK-P9-BE-NEXT: lis r4, -15264
1197 ; CHECK-P9-BE-NEXT: and r3, r3, r4
1198 ; CHECK-P9-BE-NEXT: lis r4, 15258
1199 ; CHECK-P9-BE-NEXT: ori r4, r4, 41715
1200 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
1201 ; CHECK-P9-BE-NEXT: extsb r3, r3
1202 ; CHECK-P9-BE-NEXT: blr
1204 ; CHECK-P8-LE-LABEL: ld_disjoint_align32_int8_t_uint32_t:
1205 ; CHECK-P8-LE: # %bb.0: # %entry
1206 ; CHECK-P8-LE-NEXT: lis r4, -15264
1207 ; CHECK-P8-LE-NEXT: lis r5, 15258
1208 ; CHECK-P8-LE-NEXT: and r3, r3, r4
1209 ; CHECK-P8-LE-NEXT: ori r4, r5, 41712
1210 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
1211 ; CHECK-P8-LE-NEXT: extsb r3, r3
1212 ; CHECK-P8-LE-NEXT: blr
1214 ; CHECK-P8-BE-LABEL: ld_disjoint_align32_int8_t_uint32_t:
1215 ; CHECK-P8-BE: # %bb.0: # %entry
1216 ; CHECK-P8-BE-NEXT: lis r4, -15264
1217 ; CHECK-P8-BE-NEXT: lis r5, 15258
1218 ; CHECK-P8-BE-NEXT: and r3, r3, r4
1219 ; CHECK-P8-BE-NEXT: ori r4, r5, 41715
1220 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
1221 ; CHECK-P8-BE-NEXT: extsb r3, r3
1222 ; CHECK-P8-BE-NEXT: blr
1224 %and = and i64 %ptr, -1000341504
1225 %or = or i64 %and, 999990000
1226 %0 = inttoptr i64 %or to ptr
1227 %1 = load i32, ptr %0, align 16
1228 %conv = trunc i32 %1 to i8
1232 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1233 define dso_local signext i8 @ld_not_disjoint64_int8_t_uint32_t(i64 %ptr) {
1234 ; CHECK-P10-LE-LABEL: ld_not_disjoint64_int8_t_uint32_t:
1235 ; CHECK-P10-LE: # %bb.0: # %entry
1236 ; CHECK-P10-LE-NEXT: pli r4, 232
1237 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
1238 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
1239 ; CHECK-P10-LE-NEXT: or r3, r3, r5
1240 ; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
1241 ; CHECK-P10-LE-NEXT: extsb r3, r3
1242 ; CHECK-P10-LE-NEXT: blr
1244 ; CHECK-P10-BE-LABEL: ld_not_disjoint64_int8_t_uint32_t:
1245 ; CHECK-P10-BE: # %bb.0: # %entry
1246 ; CHECK-P10-BE-NEXT: pli r4, 232
1247 ; CHECK-P10-BE-NEXT: pli r5, 3567587329
1248 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
1249 ; CHECK-P10-BE-NEXT: or r3, r3, r5
1250 ; CHECK-P10-BE-NEXT: lbz r3, 3(r3)
1251 ; CHECK-P10-BE-NEXT: extsb r3, r3
1252 ; CHECK-P10-BE-NEXT: blr
1254 ; CHECK-P9-LE-LABEL: ld_not_disjoint64_int8_t_uint32_t:
1255 ; CHECK-P9-LE: # %bb.0: # %entry
1256 ; CHECK-P9-LE-NEXT: li r4, 29
1257 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
1258 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
1259 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
1260 ; CHECK-P9-LE-NEXT: or r3, r3, r4
1261 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
1262 ; CHECK-P9-LE-NEXT: extsb r3, r3
1263 ; CHECK-P9-LE-NEXT: blr
1265 ; CHECK-P9-BE-LABEL: ld_not_disjoint64_int8_t_uint32_t:
1266 ; CHECK-P9-BE: # %bb.0: # %entry
1267 ; CHECK-P9-BE-NEXT: li r4, 29
1268 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
1269 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
1270 ; CHECK-P9-BE-NEXT: ori r4, r4, 4097
1271 ; CHECK-P9-BE-NEXT: or r3, r3, r4
1272 ; CHECK-P9-BE-NEXT: lbz r3, 3(r3)
1273 ; CHECK-P9-BE-NEXT: extsb r3, r3
1274 ; CHECK-P9-BE-NEXT: blr
1276 ; CHECK-P8-LE-LABEL: ld_not_disjoint64_int8_t_uint32_t:
1277 ; CHECK-P8-LE: # %bb.0: # %entry
1278 ; CHECK-P8-LE-NEXT: li r4, 29
1279 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
1280 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
1281 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
1282 ; CHECK-P8-LE-NEXT: or r3, r3, r4
1283 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
1284 ; CHECK-P8-LE-NEXT: extsb r3, r3
1285 ; CHECK-P8-LE-NEXT: blr
1287 ; CHECK-P8-BE-LABEL: ld_not_disjoint64_int8_t_uint32_t:
1288 ; CHECK-P8-BE: # %bb.0: # %entry
1289 ; CHECK-P8-BE-NEXT: li r4, 29
1290 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
1291 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
1292 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
1293 ; CHECK-P8-BE-NEXT: or r3, r3, r4
1294 ; CHECK-P8-BE-NEXT: lbz r3, 3(r3)
1295 ; CHECK-P8-BE-NEXT: extsb r3, r3
1296 ; CHECK-P8-BE-NEXT: blr
1298 %or = or i64 %ptr, 1000000000001
1299 %0 = inttoptr i64 %or to ptr
1300 %1 = load i32, ptr %0, align 4
1301 %conv = trunc i32 %1 to i8
1305 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1306 define dso_local signext i8 @ld_disjoint_align64_int8_t_uint32_t(i64 %ptr) {
1307 ; CHECK-P10-LE-LABEL: ld_disjoint_align64_int8_t_uint32_t:
1308 ; CHECK-P10-LE: # %bb.0: # %entry
1309 ; CHECK-P10-LE-NEXT: pli r4, 244140625
1310 ; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
1311 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
1312 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
1313 ; CHECK-P10-LE-NEXT: extsb r3, r3
1314 ; CHECK-P10-LE-NEXT: blr
1316 ; CHECK-P10-BE-LABEL: ld_disjoint_align64_int8_t_uint32_t:
1317 ; CHECK-P10-BE: # %bb.0: # %entry
1318 ; CHECK-P10-BE-NEXT: pli r4, 232
1319 ; CHECK-P10-BE-NEXT: pli r5, 3567587331
1320 ; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
1321 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
1322 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
1323 ; CHECK-P10-BE-NEXT: extsb r3, r3
1324 ; CHECK-P10-BE-NEXT: blr
1326 ; CHECK-P9-LE-LABEL: ld_disjoint_align64_int8_t_uint32_t:
1327 ; CHECK-P9-LE: # %bb.0: # %entry
1328 ; CHECK-P9-LE-NEXT: lis r4, 3725
1329 ; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
1330 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
1331 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
1332 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
1333 ; CHECK-P9-LE-NEXT: extsb r3, r3
1334 ; CHECK-P9-LE-NEXT: blr
1336 ; CHECK-P9-BE-LABEL: ld_disjoint_align64_int8_t_uint32_t:
1337 ; CHECK-P9-BE: # %bb.0: # %entry
1338 ; CHECK-P9-BE-NEXT: li r4, 29
1339 ; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
1340 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
1341 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
1342 ; CHECK-P9-BE-NEXT: ori r4, r4, 4099
1343 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
1344 ; CHECK-P9-BE-NEXT: extsb r3, r3
1345 ; CHECK-P9-BE-NEXT: blr
1347 ; CHECK-P8-LE-LABEL: ld_disjoint_align64_int8_t_uint32_t:
1348 ; CHECK-P8-LE: # %bb.0: # %entry
1349 ; CHECK-P8-LE-NEXT: lis r4, 3725
1350 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
1351 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
1352 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
1353 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
1354 ; CHECK-P8-LE-NEXT: extsb r3, r3
1355 ; CHECK-P8-LE-NEXT: blr
1357 ; CHECK-P8-BE-LABEL: ld_disjoint_align64_int8_t_uint32_t:
1358 ; CHECK-P8-BE: # %bb.0: # %entry
1359 ; CHECK-P8-BE-NEXT: li r4, 29
1360 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
1361 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
1362 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
1363 ; CHECK-P8-BE-NEXT: ori r4, r4, 4099
1364 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
1365 ; CHECK-P8-BE-NEXT: extsb r3, r3
1366 ; CHECK-P8-BE-NEXT: blr
1368 %and = and i64 %ptr, -1099511627776
1369 %or = or i64 %and, 1000000000000
1370 %0 = inttoptr i64 %or to ptr
1371 %1 = load i32, ptr %0, align 4096
1372 %conv = trunc i32 %1 to i8
1376 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1377 define dso_local signext i8 @ld_cst_align16_int8_t_uint32_t() {
1378 ; CHECK-LE-LABEL: ld_cst_align16_int8_t_uint32_t:
1379 ; CHECK-LE: # %bb.0: # %entry
1380 ; CHECK-LE-NEXT: lbz r3, 4080(0)
1381 ; CHECK-LE-NEXT: extsb r3, r3
1382 ; CHECK-LE-NEXT: blr
1384 ; CHECK-BE-LABEL: ld_cst_align16_int8_t_uint32_t:
1385 ; CHECK-BE: # %bb.0: # %entry
1386 ; CHECK-BE-NEXT: lbz r3, 4083(0)
1387 ; CHECK-BE-NEXT: extsb r3, r3
1388 ; CHECK-BE-NEXT: blr
1390 %0 = load i32, ptr inttoptr (i64 4080 to ptr), align 16
1391 %conv = trunc i32 %0 to i8
1395 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1396 define dso_local signext i8 @ld_cst_align32_int8_t_uint32_t() {
1397 ; CHECK-LE-LABEL: ld_cst_align32_int8_t_uint32_t:
1398 ; CHECK-LE: # %bb.0: # %entry
1399 ; CHECK-LE-NEXT: lis r3, 153
1400 ; CHECK-LE-NEXT: lbz r3, -27108(r3)
1401 ; CHECK-LE-NEXT: extsb r3, r3
1402 ; CHECK-LE-NEXT: blr
1404 ; CHECK-BE-LABEL: ld_cst_align32_int8_t_uint32_t:
1405 ; CHECK-BE: # %bb.0: # %entry
1406 ; CHECK-BE-NEXT: lis r3, 153
1407 ; CHECK-BE-NEXT: lbz r3, -27105(r3)
1408 ; CHECK-BE-NEXT: extsb r3, r3
1409 ; CHECK-BE-NEXT: blr
1411 %0 = load i32, ptr inttoptr (i64 9999900 to ptr), align 4
1412 %conv = trunc i32 %0 to i8
1416 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1417 define dso_local signext i8 @ld_cst_align64_int8_t_uint32_t() {
1418 ; CHECK-P10-LE-LABEL: ld_cst_align64_int8_t_uint32_t:
1419 ; CHECK-P10-LE: # %bb.0: # %entry
1420 ; CHECK-P10-LE-NEXT: pli r3, 244140625
1421 ; CHECK-P10-LE-NEXT: rldic r3, r3, 12, 24
1422 ; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
1423 ; CHECK-P10-LE-NEXT: extsb r3, r3
1424 ; CHECK-P10-LE-NEXT: blr
1426 ; CHECK-P10-BE-LABEL: ld_cst_align64_int8_t_uint32_t:
1427 ; CHECK-P10-BE: # %bb.0: # %entry
1428 ; CHECK-P10-BE-NEXT: pli r3, 232
1429 ; CHECK-P10-BE-NEXT: pli r4, 3567587331
1430 ; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
1431 ; CHECK-P10-BE-NEXT: lbz r3, 0(r4)
1432 ; CHECK-P10-BE-NEXT: extsb r3, r3
1433 ; CHECK-P10-BE-NEXT: blr
1435 ; CHECK-P9-LE-LABEL: ld_cst_align64_int8_t_uint32_t:
1436 ; CHECK-P9-LE: # %bb.0: # %entry
1437 ; CHECK-P9-LE-NEXT: lis r3, 3725
1438 ; CHECK-P9-LE-NEXT: ori r3, r3, 19025
1439 ; CHECK-P9-LE-NEXT: rldic r3, r3, 12, 24
1440 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
1441 ; CHECK-P9-LE-NEXT: extsb r3, r3
1442 ; CHECK-P9-LE-NEXT: blr
1444 ; CHECK-P9-BE-LABEL: ld_cst_align64_int8_t_uint32_t:
1445 ; CHECK-P9-BE: # %bb.0: # %entry
1446 ; CHECK-P9-BE-NEXT: li r3, 29
1447 ; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
1448 ; CHECK-P9-BE-NEXT: oris r3, r3, 54437
1449 ; CHECK-P9-BE-NEXT: ori r3, r3, 4099
1450 ; CHECK-P9-BE-NEXT: lbz r3, 0(r3)
1451 ; CHECK-P9-BE-NEXT: extsb r3, r3
1452 ; CHECK-P9-BE-NEXT: blr
1454 ; CHECK-P8-LE-LABEL: ld_cst_align64_int8_t_uint32_t:
1455 ; CHECK-P8-LE: # %bb.0: # %entry
1456 ; CHECK-P8-LE-NEXT: lis r3, 3725
1457 ; CHECK-P8-LE-NEXT: ori r3, r3, 19025
1458 ; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
1459 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
1460 ; CHECK-P8-LE-NEXT: extsb r3, r3
1461 ; CHECK-P8-LE-NEXT: blr
1463 ; CHECK-P8-BE-LABEL: ld_cst_align64_int8_t_uint32_t:
1464 ; CHECK-P8-BE: # %bb.0: # %entry
1465 ; CHECK-P8-BE-NEXT: li r3, 29
1466 ; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
1467 ; CHECK-P8-BE-NEXT: oris r3, r3, 54437
1468 ; CHECK-P8-BE-NEXT: ori r3, r3, 4099
1469 ; CHECK-P8-BE-NEXT: lbz r3, 0(r3)
1470 ; CHECK-P8-BE-NEXT: extsb r3, r3
1471 ; CHECK-P8-BE-NEXT: blr
1473 %0 = load i32, ptr inttoptr (i64 1000000000000 to ptr), align 4096
1474 %conv = trunc i32 %0 to i8
1478 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1479 define dso_local signext i8 @ld_0_int8_t_uint64_t(i64 %ptr) {
1480 ; CHECK-LE-LABEL: ld_0_int8_t_uint64_t:
1481 ; CHECK-LE: # %bb.0: # %entry
1482 ; CHECK-LE-NEXT: lbz r3, 0(r3)
1483 ; CHECK-LE-NEXT: extsb r3, r3
1484 ; CHECK-LE-NEXT: blr
1486 ; CHECK-BE-LABEL: ld_0_int8_t_uint64_t:
1487 ; CHECK-BE: # %bb.0: # %entry
1488 ; CHECK-BE-NEXT: lbz r3, 7(r3)
1489 ; CHECK-BE-NEXT: extsb r3, r3
1490 ; CHECK-BE-NEXT: blr
1492 %0 = inttoptr i64 %ptr to ptr
1493 %1 = load i64, ptr %0, align 8
1494 %conv = trunc i64 %1 to i8
1498 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1499 define dso_local signext i8 @ld_align16_int8_t_uint64_t(ptr nocapture readonly %ptr) {
1500 ; CHECK-LE-LABEL: ld_align16_int8_t_uint64_t:
1501 ; CHECK-LE: # %bb.0: # %entry
1502 ; CHECK-LE-NEXT: lbz r3, 8(r3)
1503 ; CHECK-LE-NEXT: extsb r3, r3
1504 ; CHECK-LE-NEXT: blr
1506 ; CHECK-BE-LABEL: ld_align16_int8_t_uint64_t:
1507 ; CHECK-BE: # %bb.0: # %entry
1508 ; CHECK-BE-NEXT: lbz r3, 15(r3)
1509 ; CHECK-BE-NEXT: extsb r3, r3
1510 ; CHECK-BE-NEXT: blr
1512 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
1513 %0 = load i64, ptr %add.ptr, align 8
1514 %conv = trunc i64 %0 to i8
1518 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1519 define dso_local signext i8 @ld_align32_int8_t_uint64_t(ptr nocapture readonly %ptr) {
1520 ; CHECK-P10-LE-LABEL: ld_align32_int8_t_uint64_t:
1521 ; CHECK-P10-LE: # %bb.0: # %entry
1522 ; CHECK-P10-LE-NEXT: plbz r3, 99999000(r3), 0
1523 ; CHECK-P10-LE-NEXT: extsb r3, r3
1524 ; CHECK-P10-LE-NEXT: blr
1526 ; CHECK-P10-BE-LABEL: ld_align32_int8_t_uint64_t:
1527 ; CHECK-P10-BE: # %bb.0: # %entry
1528 ; CHECK-P10-BE-NEXT: plbz r3, 99999007(r3), 0
1529 ; CHECK-P10-BE-NEXT: extsb r3, r3
1530 ; CHECK-P10-BE-NEXT: blr
1532 ; CHECK-P9-LE-LABEL: ld_align32_int8_t_uint64_t:
1533 ; CHECK-P9-LE: # %bb.0: # %entry
1534 ; CHECK-P9-LE-NEXT: lis r4, 1525
1535 ; CHECK-P9-LE-NEXT: ori r4, r4, 56600
1536 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
1537 ; CHECK-P9-LE-NEXT: extsb r3, r3
1538 ; CHECK-P9-LE-NEXT: blr
1540 ; CHECK-P9-BE-LABEL: ld_align32_int8_t_uint64_t:
1541 ; CHECK-P9-BE: # %bb.0: # %entry
1542 ; CHECK-P9-BE-NEXT: lis r4, 1525
1543 ; CHECK-P9-BE-NEXT: ori r4, r4, 56607
1544 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
1545 ; CHECK-P9-BE-NEXT: extsb r3, r3
1546 ; CHECK-P9-BE-NEXT: blr
1548 ; CHECK-P8-LE-LABEL: ld_align32_int8_t_uint64_t:
1549 ; CHECK-P8-LE: # %bb.0: # %entry
1550 ; CHECK-P8-LE-NEXT: lis r4, 1525
1551 ; CHECK-P8-LE-NEXT: ori r4, r4, 56600
1552 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
1553 ; CHECK-P8-LE-NEXT: extsb r3, r3
1554 ; CHECK-P8-LE-NEXT: blr
1556 ; CHECK-P8-BE-LABEL: ld_align32_int8_t_uint64_t:
1557 ; CHECK-P8-BE: # %bb.0: # %entry
1558 ; CHECK-P8-BE-NEXT: lis r4, 1525
1559 ; CHECK-P8-BE-NEXT: ori r4, r4, 56607
1560 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
1561 ; CHECK-P8-BE-NEXT: extsb r3, r3
1562 ; CHECK-P8-BE-NEXT: blr
1564 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
1565 %0 = load i64, ptr %add.ptr, align 8
1566 %conv = trunc i64 %0 to i8
1570 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1571 define dso_local signext i8 @ld_align64_int8_t_uint64_t(ptr nocapture readonly %ptr) {
1572 ; CHECK-P10-LE-LABEL: ld_align64_int8_t_uint64_t:
1573 ; CHECK-P10-LE: # %bb.0: # %entry
1574 ; CHECK-P10-LE-NEXT: pli r4, 244140625
1575 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
1576 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
1577 ; CHECK-P10-LE-NEXT: extsb r3, r3
1578 ; CHECK-P10-LE-NEXT: blr
1580 ; CHECK-P10-BE-LABEL: ld_align64_int8_t_uint64_t:
1581 ; CHECK-P10-BE: # %bb.0: # %entry
1582 ; CHECK-P10-BE-NEXT: pli r4, 232
1583 ; CHECK-P10-BE-NEXT: pli r5, 3567587335
1584 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
1585 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
1586 ; CHECK-P10-BE-NEXT: extsb r3, r3
1587 ; CHECK-P10-BE-NEXT: blr
1589 ; CHECK-P9-LE-LABEL: ld_align64_int8_t_uint64_t:
1590 ; CHECK-P9-LE: # %bb.0: # %entry
1591 ; CHECK-P9-LE-NEXT: lis r4, 3725
1592 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
1593 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
1594 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
1595 ; CHECK-P9-LE-NEXT: extsb r3, r3
1596 ; CHECK-P9-LE-NEXT: blr
1598 ; CHECK-P9-BE-LABEL: ld_align64_int8_t_uint64_t:
1599 ; CHECK-P9-BE: # %bb.0: # %entry
1600 ; CHECK-P9-BE-NEXT: li r4, 29
1601 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
1602 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
1603 ; CHECK-P9-BE-NEXT: ori r4, r4, 4103
1604 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
1605 ; CHECK-P9-BE-NEXT: extsb r3, r3
1606 ; CHECK-P9-BE-NEXT: blr
1608 ; CHECK-P8-LE-LABEL: ld_align64_int8_t_uint64_t:
1609 ; CHECK-P8-LE: # %bb.0: # %entry
1610 ; CHECK-P8-LE-NEXT: lis r4, 3725
1611 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
1612 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
1613 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
1614 ; CHECK-P8-LE-NEXT: extsb r3, r3
1615 ; CHECK-P8-LE-NEXT: blr
1617 ; CHECK-P8-BE-LABEL: ld_align64_int8_t_uint64_t:
1618 ; CHECK-P8-BE: # %bb.0: # %entry
1619 ; CHECK-P8-BE-NEXT: li r4, 29
1620 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
1621 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
1622 ; CHECK-P8-BE-NEXT: ori r4, r4, 4103
1623 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
1624 ; CHECK-P8-BE-NEXT: extsb r3, r3
1625 ; CHECK-P8-BE-NEXT: blr
1627 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
1628 %0 = load i64, ptr %add.ptr, align 8
1629 %conv = trunc i64 %0 to i8
1633 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1634 define dso_local signext i8 @ld_reg_int8_t_uint64_t(ptr nocapture readonly %ptr, i64 %off) {
1635 ; CHECK-LE-LABEL: ld_reg_int8_t_uint64_t:
1636 ; CHECK-LE: # %bb.0: # %entry
1637 ; CHECK-LE-NEXT: lbzx r3, r3, r4
1638 ; CHECK-LE-NEXT: extsb r3, r3
1639 ; CHECK-LE-NEXT: blr
1641 ; CHECK-BE-LABEL: ld_reg_int8_t_uint64_t:
1642 ; CHECK-BE: # %bb.0: # %entry
1643 ; CHECK-BE-NEXT: add r3, r3, r4
1644 ; CHECK-BE-NEXT: lbz r3, 7(r3)
1645 ; CHECK-BE-NEXT: extsb r3, r3
1646 ; CHECK-BE-NEXT: blr
1648 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
1649 %0 = load i64, ptr %add.ptr, align 8
1650 %conv = trunc i64 %0 to i8
1654 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1655 define dso_local signext i8 @ld_or_int8_t_uint64_t(i64 %ptr, i8 zeroext %off) {
1656 ; CHECK-LE-LABEL: ld_or_int8_t_uint64_t:
1657 ; CHECK-LE: # %bb.0: # %entry
1658 ; CHECK-LE-NEXT: or r3, r4, r3
1659 ; CHECK-LE-NEXT: lbz r3, 0(r3)
1660 ; CHECK-LE-NEXT: extsb r3, r3
1661 ; CHECK-LE-NEXT: blr
1663 ; CHECK-BE-LABEL: ld_or_int8_t_uint64_t:
1664 ; CHECK-BE: # %bb.0: # %entry
1665 ; CHECK-BE-NEXT: or r3, r4, r3
1666 ; CHECK-BE-NEXT: lbz r3, 7(r3)
1667 ; CHECK-BE-NEXT: extsb r3, r3
1668 ; CHECK-BE-NEXT: blr
1670 %conv = zext i8 %off to i64
1671 %or = or i64 %conv, %ptr
1672 %0 = inttoptr i64 %or to ptr
1673 %1 = load i64, ptr %0, align 8
1674 %conv1 = trunc i64 %1 to i8
1678 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1679 define dso_local signext i8 @ld_not_disjoint16_int8_t_uint64_t(i64 %ptr) {
1680 ; CHECK-LE-LABEL: ld_not_disjoint16_int8_t_uint64_t:
1681 ; CHECK-LE: # %bb.0: # %entry
1682 ; CHECK-LE-NEXT: ori r3, r3, 6
1683 ; CHECK-LE-NEXT: lbz r3, 0(r3)
1684 ; CHECK-LE-NEXT: extsb r3, r3
1685 ; CHECK-LE-NEXT: blr
1687 ; CHECK-BE-LABEL: ld_not_disjoint16_int8_t_uint64_t:
1688 ; CHECK-BE: # %bb.0: # %entry
1689 ; CHECK-BE-NEXT: ori r3, r3, 6
1690 ; CHECK-BE-NEXT: lbz r3, 7(r3)
1691 ; CHECK-BE-NEXT: extsb r3, r3
1692 ; CHECK-BE-NEXT: blr
1694 %or = or i64 %ptr, 6
1695 %0 = inttoptr i64 %or to ptr
1696 %1 = load i64, ptr %0, align 8
1697 %conv = trunc i64 %1 to i8
1701 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1702 define dso_local signext i8 @ld_disjoint_align16_int8_t_uint64_t(i64 %ptr) {
1703 ; CHECK-LE-LABEL: ld_disjoint_align16_int8_t_uint64_t:
1704 ; CHECK-LE: # %bb.0: # %entry
1705 ; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
1706 ; CHECK-LE-NEXT: lbz r3, 24(r3)
1707 ; CHECK-LE-NEXT: extsb r3, r3
1708 ; CHECK-LE-NEXT: blr
1710 ; CHECK-BE-LABEL: ld_disjoint_align16_int8_t_uint64_t:
1711 ; CHECK-BE: # %bb.0: # %entry
1712 ; CHECK-BE-NEXT: rldicr r3, r3, 0, 51
1713 ; CHECK-BE-NEXT: lbz r3, 31(r3)
1714 ; CHECK-BE-NEXT: extsb r3, r3
1715 ; CHECK-BE-NEXT: blr
1717 %and = and i64 %ptr, -4096
1718 %or = or i64 %and, 24
1719 %0 = inttoptr i64 %or to ptr
1720 %1 = load i64, ptr %0, align 8
1721 %conv = trunc i64 %1 to i8
1725 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1726 define dso_local signext i8 @ld_not_disjoint32_int8_t_uint64_t(i64 %ptr) {
1727 ; CHECK-LE-LABEL: ld_not_disjoint32_int8_t_uint64_t:
1728 ; CHECK-LE: # %bb.0: # %entry
1729 ; CHECK-LE-NEXT: ori r3, r3, 34463
1730 ; CHECK-LE-NEXT: oris r3, r3, 1
1731 ; CHECK-LE-NEXT: lbz r3, 0(r3)
1732 ; CHECK-LE-NEXT: extsb r3, r3
1733 ; CHECK-LE-NEXT: blr
1735 ; CHECK-BE-LABEL: ld_not_disjoint32_int8_t_uint64_t:
1736 ; CHECK-BE: # %bb.0: # %entry
1737 ; CHECK-BE-NEXT: ori r3, r3, 34463
1738 ; CHECK-BE-NEXT: oris r3, r3, 1
1739 ; CHECK-BE-NEXT: lbz r3, 7(r3)
1740 ; CHECK-BE-NEXT: extsb r3, r3
1741 ; CHECK-BE-NEXT: blr
1743 %or = or i64 %ptr, 99999
1744 %0 = inttoptr i64 %or to ptr
1745 %1 = load i64, ptr %0, align 8
1746 %conv = trunc i64 %1 to i8
1750 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1751 define dso_local signext i8 @ld_disjoint_align32_int8_t_uint64_t(i64 %ptr) {
1752 ; CHECK-P10-LE-LABEL: ld_disjoint_align32_int8_t_uint64_t:
1753 ; CHECK-P10-LE: # %bb.0: # %entry
1754 ; CHECK-P10-LE-NEXT: lis r4, -15264
1755 ; CHECK-P10-LE-NEXT: and r3, r3, r4
1756 ; CHECK-P10-LE-NEXT: plbz r3, 999990000(r3), 0
1757 ; CHECK-P10-LE-NEXT: extsb r3, r3
1758 ; CHECK-P10-LE-NEXT: blr
1760 ; CHECK-P10-BE-LABEL: ld_disjoint_align32_int8_t_uint64_t:
1761 ; CHECK-P10-BE: # %bb.0: # %entry
1762 ; CHECK-P10-BE-NEXT: lis r4, -15264
1763 ; CHECK-P10-BE-NEXT: and r3, r3, r4
1764 ; CHECK-P10-BE-NEXT: plbz r3, 999990007(r3), 0
1765 ; CHECK-P10-BE-NEXT: extsb r3, r3
1766 ; CHECK-P10-BE-NEXT: blr
1768 ; CHECK-P9-LE-LABEL: ld_disjoint_align32_int8_t_uint64_t:
1769 ; CHECK-P9-LE: # %bb.0: # %entry
1770 ; CHECK-P9-LE-NEXT: lis r4, -15264
1771 ; CHECK-P9-LE-NEXT: and r3, r3, r4
1772 ; CHECK-P9-LE-NEXT: lis r4, 15258
1773 ; CHECK-P9-LE-NEXT: ori r4, r4, 41712
1774 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
1775 ; CHECK-P9-LE-NEXT: extsb r3, r3
1776 ; CHECK-P9-LE-NEXT: blr
1778 ; CHECK-P9-BE-LABEL: ld_disjoint_align32_int8_t_uint64_t:
1779 ; CHECK-P9-BE: # %bb.0: # %entry
1780 ; CHECK-P9-BE-NEXT: lis r4, -15264
1781 ; CHECK-P9-BE-NEXT: and r3, r3, r4
1782 ; CHECK-P9-BE-NEXT: lis r4, 15258
1783 ; CHECK-P9-BE-NEXT: ori r4, r4, 41719
1784 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
1785 ; CHECK-P9-BE-NEXT: extsb r3, r3
1786 ; CHECK-P9-BE-NEXT: blr
1788 ; CHECK-P8-LE-LABEL: ld_disjoint_align32_int8_t_uint64_t:
1789 ; CHECK-P8-LE: # %bb.0: # %entry
1790 ; CHECK-P8-LE-NEXT: lis r4, -15264
1791 ; CHECK-P8-LE-NEXT: lis r5, 15258
1792 ; CHECK-P8-LE-NEXT: and r3, r3, r4
1793 ; CHECK-P8-LE-NEXT: ori r4, r5, 41712
1794 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
1795 ; CHECK-P8-LE-NEXT: extsb r3, r3
1796 ; CHECK-P8-LE-NEXT: blr
1798 ; CHECK-P8-BE-LABEL: ld_disjoint_align32_int8_t_uint64_t:
1799 ; CHECK-P8-BE: # %bb.0: # %entry
1800 ; CHECK-P8-BE-NEXT: lis r4, -15264
1801 ; CHECK-P8-BE-NEXT: lis r5, 15258
1802 ; CHECK-P8-BE-NEXT: and r3, r3, r4
1803 ; CHECK-P8-BE-NEXT: ori r4, r5, 41719
1804 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
1805 ; CHECK-P8-BE-NEXT: extsb r3, r3
1806 ; CHECK-P8-BE-NEXT: blr
1808 %and = and i64 %ptr, -1000341504
1809 %or = or i64 %and, 999990000
1810 %0 = inttoptr i64 %or to ptr
1811 %1 = load i64, ptr %0, align 16
1812 %conv = trunc i64 %1 to i8
1816 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1817 define dso_local signext i8 @ld_not_disjoint64_int8_t_uint64_t(i64 %ptr) {
1818 ; CHECK-P10-LE-LABEL: ld_not_disjoint64_int8_t_uint64_t:
1819 ; CHECK-P10-LE: # %bb.0: # %entry
1820 ; CHECK-P10-LE-NEXT: pli r4, 232
1821 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
1822 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
1823 ; CHECK-P10-LE-NEXT: or r3, r3, r5
1824 ; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
1825 ; CHECK-P10-LE-NEXT: extsb r3, r3
1826 ; CHECK-P10-LE-NEXT: blr
1828 ; CHECK-P10-BE-LABEL: ld_not_disjoint64_int8_t_uint64_t:
1829 ; CHECK-P10-BE: # %bb.0: # %entry
1830 ; CHECK-P10-BE-NEXT: pli r4, 232
1831 ; CHECK-P10-BE-NEXT: pli r5, 3567587329
1832 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
1833 ; CHECK-P10-BE-NEXT: or r3, r3, r5
1834 ; CHECK-P10-BE-NEXT: lbz r3, 7(r3)
1835 ; CHECK-P10-BE-NEXT: extsb r3, r3
1836 ; CHECK-P10-BE-NEXT: blr
1838 ; CHECK-P9-LE-LABEL: ld_not_disjoint64_int8_t_uint64_t:
1839 ; CHECK-P9-LE: # %bb.0: # %entry
1840 ; CHECK-P9-LE-NEXT: li r4, 29
1841 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
1842 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
1843 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
1844 ; CHECK-P9-LE-NEXT: or r3, r3, r4
1845 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
1846 ; CHECK-P9-LE-NEXT: extsb r3, r3
1847 ; CHECK-P9-LE-NEXT: blr
1849 ; CHECK-P9-BE-LABEL: ld_not_disjoint64_int8_t_uint64_t:
1850 ; CHECK-P9-BE: # %bb.0: # %entry
1851 ; CHECK-P9-BE-NEXT: li r4, 29
1852 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
1853 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
1854 ; CHECK-P9-BE-NEXT: ori r4, r4, 4097
1855 ; CHECK-P9-BE-NEXT: or r3, r3, r4
1856 ; CHECK-P9-BE-NEXT: lbz r3, 7(r3)
1857 ; CHECK-P9-BE-NEXT: extsb r3, r3
1858 ; CHECK-P9-BE-NEXT: blr
1860 ; CHECK-P8-LE-LABEL: ld_not_disjoint64_int8_t_uint64_t:
1861 ; CHECK-P8-LE: # %bb.0: # %entry
1862 ; CHECK-P8-LE-NEXT: li r4, 29
1863 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
1864 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
1865 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
1866 ; CHECK-P8-LE-NEXT: or r3, r3, r4
1867 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
1868 ; CHECK-P8-LE-NEXT: extsb r3, r3
1869 ; CHECK-P8-LE-NEXT: blr
1871 ; CHECK-P8-BE-LABEL: ld_not_disjoint64_int8_t_uint64_t:
1872 ; CHECK-P8-BE: # %bb.0: # %entry
1873 ; CHECK-P8-BE-NEXT: li r4, 29
1874 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
1875 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
1876 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
1877 ; CHECK-P8-BE-NEXT: or r3, r3, r4
1878 ; CHECK-P8-BE-NEXT: lbz r3, 7(r3)
1879 ; CHECK-P8-BE-NEXT: extsb r3, r3
1880 ; CHECK-P8-BE-NEXT: blr
1882 %or = or i64 %ptr, 1000000000001
1883 %0 = inttoptr i64 %or to ptr
1884 %1 = load i64, ptr %0, align 8
1885 %conv = trunc i64 %1 to i8
1889 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1890 define dso_local signext i8 @ld_disjoint_align64_int8_t_uint64_t(i64 %ptr) {
1891 ; CHECK-P10-LE-LABEL: ld_disjoint_align64_int8_t_uint64_t:
1892 ; CHECK-P10-LE: # %bb.0: # %entry
1893 ; CHECK-P10-LE-NEXT: pli r4, 244140625
1894 ; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
1895 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
1896 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
1897 ; CHECK-P10-LE-NEXT: extsb r3, r3
1898 ; CHECK-P10-LE-NEXT: blr
1900 ; CHECK-P10-BE-LABEL: ld_disjoint_align64_int8_t_uint64_t:
1901 ; CHECK-P10-BE: # %bb.0: # %entry
1902 ; CHECK-P10-BE-NEXT: pli r4, 232
1903 ; CHECK-P10-BE-NEXT: pli r5, 3567587335
1904 ; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
1905 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
1906 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
1907 ; CHECK-P10-BE-NEXT: extsb r3, r3
1908 ; CHECK-P10-BE-NEXT: blr
1910 ; CHECK-P9-LE-LABEL: ld_disjoint_align64_int8_t_uint64_t:
1911 ; CHECK-P9-LE: # %bb.0: # %entry
1912 ; CHECK-P9-LE-NEXT: lis r4, 3725
1913 ; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
1914 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
1915 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
1916 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
1917 ; CHECK-P9-LE-NEXT: extsb r3, r3
1918 ; CHECK-P9-LE-NEXT: blr
1920 ; CHECK-P9-BE-LABEL: ld_disjoint_align64_int8_t_uint64_t:
1921 ; CHECK-P9-BE: # %bb.0: # %entry
1922 ; CHECK-P9-BE-NEXT: li r4, 29
1923 ; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
1924 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
1925 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
1926 ; CHECK-P9-BE-NEXT: ori r4, r4, 4103
1927 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
1928 ; CHECK-P9-BE-NEXT: extsb r3, r3
1929 ; CHECK-P9-BE-NEXT: blr
1931 ; CHECK-P8-LE-LABEL: ld_disjoint_align64_int8_t_uint64_t:
1932 ; CHECK-P8-LE: # %bb.0: # %entry
1933 ; CHECK-P8-LE-NEXT: lis r4, 3725
1934 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
1935 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
1936 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
1937 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
1938 ; CHECK-P8-LE-NEXT: extsb r3, r3
1939 ; CHECK-P8-LE-NEXT: blr
1941 ; CHECK-P8-BE-LABEL: ld_disjoint_align64_int8_t_uint64_t:
1942 ; CHECK-P8-BE: # %bb.0: # %entry
1943 ; CHECK-P8-BE-NEXT: li r4, 29
1944 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
1945 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
1946 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
1947 ; CHECK-P8-BE-NEXT: ori r4, r4, 4103
1948 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
1949 ; CHECK-P8-BE-NEXT: extsb r3, r3
1950 ; CHECK-P8-BE-NEXT: blr
1952 %and = and i64 %ptr, -1099511627776
1953 %or = or i64 %and, 1000000000000
1954 %0 = inttoptr i64 %or to ptr
1955 %1 = load i64, ptr %0, align 4096
1956 %conv = trunc i64 %1 to i8
1960 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1961 define dso_local signext i8 @ld_cst_align16_int8_t_uint64_t() {
1962 ; CHECK-LE-LABEL: ld_cst_align16_int8_t_uint64_t:
1963 ; CHECK-LE: # %bb.0: # %entry
1964 ; CHECK-LE-NEXT: lbz r3, 4080(0)
1965 ; CHECK-LE-NEXT: extsb r3, r3
1966 ; CHECK-LE-NEXT: blr
1968 ; CHECK-BE-LABEL: ld_cst_align16_int8_t_uint64_t:
1969 ; CHECK-BE: # %bb.0: # %entry
1970 ; CHECK-BE-NEXT: lbz r3, 4087(0)
1971 ; CHECK-BE-NEXT: extsb r3, r3
1972 ; CHECK-BE-NEXT: blr
1974 %0 = load i64, ptr inttoptr (i64 4080 to ptr), align 16
1975 %conv = trunc i64 %0 to i8
1979 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1980 define dso_local signext i8 @ld_cst_align32_int8_t_uint64_t() {
1981 ; CHECK-LE-LABEL: ld_cst_align32_int8_t_uint64_t:
1982 ; CHECK-LE: # %bb.0: # %entry
1983 ; CHECK-LE-NEXT: lis r3, 153
1984 ; CHECK-LE-NEXT: lbz r3, -27108(r3)
1985 ; CHECK-LE-NEXT: extsb r3, r3
1986 ; CHECK-LE-NEXT: blr
1988 ; CHECK-BE-LABEL: ld_cst_align32_int8_t_uint64_t:
1989 ; CHECK-BE: # %bb.0: # %entry
1990 ; CHECK-BE-NEXT: lis r3, 153
1991 ; CHECK-BE-NEXT: lbz r3, -27101(r3)
1992 ; CHECK-BE-NEXT: extsb r3, r3
1993 ; CHECK-BE-NEXT: blr
1995 %0 = load i64, ptr inttoptr (i64 9999900 to ptr), align 8
1996 %conv = trunc i64 %0 to i8
2000 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2001 define dso_local signext i8 @ld_cst_align64_int8_t_uint64_t() {
2002 ; CHECK-P10-LE-LABEL: ld_cst_align64_int8_t_uint64_t:
2003 ; CHECK-P10-LE: # %bb.0: # %entry
2004 ; CHECK-P10-LE-NEXT: pli r3, 244140625
2005 ; CHECK-P10-LE-NEXT: rldic r3, r3, 12, 24
2006 ; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
2007 ; CHECK-P10-LE-NEXT: extsb r3, r3
2008 ; CHECK-P10-LE-NEXT: blr
2010 ; CHECK-P10-BE-LABEL: ld_cst_align64_int8_t_uint64_t:
2011 ; CHECK-P10-BE: # %bb.0: # %entry
2012 ; CHECK-P10-BE-NEXT: pli r3, 232
2013 ; CHECK-P10-BE-NEXT: pli r4, 3567587335
2014 ; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
2015 ; CHECK-P10-BE-NEXT: lbz r3, 0(r4)
2016 ; CHECK-P10-BE-NEXT: extsb r3, r3
2017 ; CHECK-P10-BE-NEXT: blr
2019 ; CHECK-P9-LE-LABEL: ld_cst_align64_int8_t_uint64_t:
2020 ; CHECK-P9-LE: # %bb.0: # %entry
2021 ; CHECK-P9-LE-NEXT: lis r3, 3725
2022 ; CHECK-P9-LE-NEXT: ori r3, r3, 19025
2023 ; CHECK-P9-LE-NEXT: rldic r3, r3, 12, 24
2024 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
2025 ; CHECK-P9-LE-NEXT: extsb r3, r3
2026 ; CHECK-P9-LE-NEXT: blr
2028 ; CHECK-P9-BE-LABEL: ld_cst_align64_int8_t_uint64_t:
2029 ; CHECK-P9-BE: # %bb.0: # %entry
2030 ; CHECK-P9-BE-NEXT: li r3, 29
2031 ; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
2032 ; CHECK-P9-BE-NEXT: oris r3, r3, 54437
2033 ; CHECK-P9-BE-NEXT: ori r3, r3, 4103
2034 ; CHECK-P9-BE-NEXT: lbz r3, 0(r3)
2035 ; CHECK-P9-BE-NEXT: extsb r3, r3
2036 ; CHECK-P9-BE-NEXT: blr
2038 ; CHECK-P8-LE-LABEL: ld_cst_align64_int8_t_uint64_t:
2039 ; CHECK-P8-LE: # %bb.0: # %entry
2040 ; CHECK-P8-LE-NEXT: lis r3, 3725
2041 ; CHECK-P8-LE-NEXT: ori r3, r3, 19025
2042 ; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
2043 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
2044 ; CHECK-P8-LE-NEXT: extsb r3, r3
2045 ; CHECK-P8-LE-NEXT: blr
2047 ; CHECK-P8-BE-LABEL: ld_cst_align64_int8_t_uint64_t:
2048 ; CHECK-P8-BE: # %bb.0: # %entry
2049 ; CHECK-P8-BE-NEXT: li r3, 29
2050 ; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
2051 ; CHECK-P8-BE-NEXT: oris r3, r3, 54437
2052 ; CHECK-P8-BE-NEXT: ori r3, r3, 4103
2053 ; CHECK-P8-BE-NEXT: lbz r3, 0(r3)
2054 ; CHECK-P8-BE-NEXT: extsb r3, r3
2055 ; CHECK-P8-BE-NEXT: blr
2057 %0 = load i64, ptr inttoptr (i64 1000000000000 to ptr), align 4096
2058 %conv = trunc i64 %0 to i8
2062 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2063 define dso_local signext i8 @ld_0_int8_t_float(i64 %ptr) {
2064 ; CHECK-LABEL: ld_0_int8_t_float:
2065 ; CHECK: # %bb.0: # %entry
2066 ; CHECK-NEXT: lfs f0, 0(r3)
2067 ; CHECK-NEXT: xscvdpsxws f0, f0
2068 ; CHECK-NEXT: mffprwz r3, f0
2069 ; CHECK-NEXT: extsw r3, r3
2072 %0 = inttoptr i64 %ptr to ptr
2073 %1 = load float, ptr %0, align 4
2074 %conv = fptosi float %1 to i8
2078 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2079 define dso_local signext i8 @ld_align16_int8_t_float(ptr nocapture readonly %ptr) {
2080 ; CHECK-LABEL: ld_align16_int8_t_float:
2081 ; CHECK: # %bb.0: # %entry
2082 ; CHECK-NEXT: lfs f0, 8(r3)
2083 ; CHECK-NEXT: xscvdpsxws f0, f0
2084 ; CHECK-NEXT: mffprwz r3, f0
2085 ; CHECK-NEXT: extsw r3, r3
2088 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
2089 %0 = load float, ptr %add.ptr, align 4
2090 %conv = fptosi float %0 to i8
2094 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2095 define dso_local signext i8 @ld_align32_int8_t_float(ptr nocapture readonly %ptr) {
2096 ; CHECK-P10-LABEL: ld_align32_int8_t_float:
2097 ; CHECK-P10: # %bb.0: # %entry
2098 ; CHECK-P10-NEXT: plfs f0, 99999000(r3), 0
2099 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2100 ; CHECK-P10-NEXT: mffprwz r3, f0
2101 ; CHECK-P10-NEXT: extsw r3, r3
2102 ; CHECK-P10-NEXT: blr
2104 ; CHECK-PREP10-LABEL: ld_align32_int8_t_float:
2105 ; CHECK-PREP10: # %bb.0: # %entry
2106 ; CHECK-PREP10-NEXT: lis r4, 1525
2107 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
2108 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
2109 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2110 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2111 ; CHECK-PREP10-NEXT: extsw r3, r3
2112 ; CHECK-PREP10-NEXT: blr
2114 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
2115 %0 = load float, ptr %add.ptr, align 4
2116 %conv = fptosi float %0 to i8
2120 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2121 define dso_local signext i8 @ld_align64_int8_t_float(ptr nocapture readonly %ptr) {
2122 ; CHECK-P10-LABEL: ld_align64_int8_t_float:
2123 ; CHECK-P10: # %bb.0: # %entry
2124 ; CHECK-P10-NEXT: pli r4, 244140625
2125 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2126 ; CHECK-P10-NEXT: lfsx f0, r3, r4
2127 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2128 ; CHECK-P10-NEXT: mffprwz r3, f0
2129 ; CHECK-P10-NEXT: extsw r3, r3
2130 ; CHECK-P10-NEXT: blr
2132 ; CHECK-PREP10-LABEL: ld_align64_int8_t_float:
2133 ; CHECK-PREP10: # %bb.0: # %entry
2134 ; CHECK-PREP10-NEXT: lis r4, 3725
2135 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2136 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2137 ; CHECK-PREP10-NEXT: lfsx 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 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
2144 %0 = load float, ptr %add.ptr, align 4
2145 %conv = fptosi float %0 to i8
2149 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2150 define dso_local signext i8 @ld_reg_int8_t_float(ptr nocapture readonly %ptr, i64 %off) {
2151 ; CHECK-LABEL: ld_reg_int8_t_float:
2152 ; CHECK: # %bb.0: # %entry
2153 ; CHECK-NEXT: lfsx f0, r3, r4
2154 ; CHECK-NEXT: xscvdpsxws f0, f0
2155 ; CHECK-NEXT: mffprwz r3, f0
2156 ; CHECK-NEXT: extsw r3, r3
2159 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
2160 %0 = load float, ptr %add.ptr, align 4
2161 %conv = fptosi float %0 to i8
2165 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2166 define dso_local signext i8 @ld_or_int8_t_float(i64 %ptr, i8 zeroext %off) {
2167 ; CHECK-LABEL: ld_or_int8_t_float:
2168 ; CHECK: # %bb.0: # %entry
2169 ; CHECK-NEXT: or r3, r4, r3
2170 ; CHECK-NEXT: lfs f0, 0(r3)
2171 ; CHECK-NEXT: xscvdpsxws f0, f0
2172 ; CHECK-NEXT: mffprwz r3, f0
2173 ; CHECK-NEXT: extsw r3, r3
2176 %conv = zext i8 %off to i64
2177 %or = or i64 %conv, %ptr
2178 %0 = inttoptr i64 %or to ptr
2179 %1 = load float, ptr %0, align 4
2180 %conv1 = fptosi float %1 to i8
2184 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2185 define dso_local signext i8 @ld_not_disjoint16_int8_t_float(i64 %ptr) {
2186 ; CHECK-LABEL: ld_not_disjoint16_int8_t_float:
2187 ; CHECK: # %bb.0: # %entry
2188 ; CHECK-NEXT: ori r3, r3, 6
2189 ; CHECK-NEXT: lfs f0, 0(r3)
2190 ; CHECK-NEXT: xscvdpsxws f0, f0
2191 ; CHECK-NEXT: mffprwz r3, f0
2192 ; CHECK-NEXT: extsw r3, r3
2195 %or = or i64 %ptr, 6
2196 %0 = inttoptr i64 %or to ptr
2197 %1 = load float, ptr %0, align 4
2198 %conv = fptosi float %1 to i8
2202 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2203 define dso_local signext i8 @ld_disjoint_align16_int8_t_float(i64 %ptr) {
2204 ; CHECK-LABEL: ld_disjoint_align16_int8_t_float:
2205 ; CHECK: # %bb.0: # %entry
2206 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2207 ; CHECK-NEXT: lfs f0, 24(r3)
2208 ; CHECK-NEXT: xscvdpsxws f0, f0
2209 ; CHECK-NEXT: mffprwz r3, f0
2210 ; CHECK-NEXT: extsw r3, r3
2213 %and = and i64 %ptr, -4096
2214 %or = or i64 %and, 24
2215 %0 = inttoptr i64 %or to ptr
2216 %1 = load float, ptr %0, align 8
2217 %conv = fptosi float %1 to i8
2221 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2222 define dso_local signext i8 @ld_not_disjoint32_int8_t_float(i64 %ptr) {
2223 ; CHECK-LABEL: ld_not_disjoint32_int8_t_float:
2224 ; CHECK: # %bb.0: # %entry
2225 ; CHECK-NEXT: ori r3, r3, 34463
2226 ; CHECK-NEXT: oris r3, r3, 1
2227 ; CHECK-NEXT: lfs f0, 0(r3)
2228 ; CHECK-NEXT: xscvdpsxws f0, f0
2229 ; CHECK-NEXT: mffprwz r3, f0
2230 ; CHECK-NEXT: extsw r3, r3
2233 %or = or i64 %ptr, 99999
2234 %0 = inttoptr i64 %or to ptr
2235 %1 = load float, ptr %0, align 4
2236 %conv = fptosi float %1 to i8
2240 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2241 define dso_local signext i8 @ld_disjoint_align32_int8_t_float(i64 %ptr) {
2242 ; CHECK-P10-LABEL: ld_disjoint_align32_int8_t_float:
2243 ; CHECK-P10: # %bb.0: # %entry
2244 ; CHECK-P10-NEXT: lis r4, -15264
2245 ; CHECK-P10-NEXT: and r3, r3, r4
2246 ; CHECK-P10-NEXT: plfs f0, 999990000(r3), 0
2247 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2248 ; CHECK-P10-NEXT: mffprwz r3, f0
2249 ; CHECK-P10-NEXT: extsw r3, r3
2250 ; CHECK-P10-NEXT: blr
2252 ; CHECK-P9-LABEL: ld_disjoint_align32_int8_t_float:
2253 ; CHECK-P9: # %bb.0: # %entry
2254 ; CHECK-P9-NEXT: lis r4, -15264
2255 ; CHECK-P9-NEXT: and r3, r3, r4
2256 ; CHECK-P9-NEXT: lis r4, 15258
2257 ; CHECK-P9-NEXT: ori r4, r4, 41712
2258 ; CHECK-P9-NEXT: lfsx f0, r3, r4
2259 ; CHECK-P9-NEXT: xscvdpsxws f0, f0
2260 ; CHECK-P9-NEXT: mffprwz r3, f0
2261 ; CHECK-P9-NEXT: extsw r3, r3
2262 ; CHECK-P9-NEXT: blr
2264 ; CHECK-P8-LABEL: ld_disjoint_align32_int8_t_float:
2265 ; CHECK-P8: # %bb.0: # %entry
2266 ; CHECK-P8-NEXT: lis r4, -15264
2267 ; CHECK-P8-NEXT: lis r5, 15258
2268 ; CHECK-P8-NEXT: and r3, r3, r4
2269 ; CHECK-P8-NEXT: ori r4, r5, 41712
2270 ; CHECK-P8-NEXT: lfsx f0, r3, r4
2271 ; CHECK-P8-NEXT: xscvdpsxws f0, f0
2272 ; CHECK-P8-NEXT: mffprwz r3, f0
2273 ; CHECK-P8-NEXT: extsw r3, r3
2274 ; CHECK-P8-NEXT: blr
2276 %and = and i64 %ptr, -1000341504
2277 %or = or i64 %and, 999990000
2278 %0 = inttoptr i64 %or to ptr
2279 %1 = load float, ptr %0, align 16
2280 %conv = fptosi float %1 to i8
2284 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2285 define dso_local signext i8 @ld_not_disjoint64_int8_t_float(i64 %ptr) {
2286 ; CHECK-P10-LABEL: ld_not_disjoint64_int8_t_float:
2287 ; CHECK-P10: # %bb.0: # %entry
2288 ; CHECK-P10-NEXT: pli r4, 232
2289 ; CHECK-P10-NEXT: pli r5, 3567587329
2290 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2291 ; CHECK-P10-NEXT: or r3, r3, r5
2292 ; CHECK-P10-NEXT: lfs f0, 0(r3)
2293 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2294 ; CHECK-P10-NEXT: mffprwz r3, f0
2295 ; CHECK-P10-NEXT: extsw r3, r3
2296 ; CHECK-P10-NEXT: blr
2298 ; CHECK-PREP10-LABEL: ld_not_disjoint64_int8_t_float:
2299 ; CHECK-PREP10: # %bb.0: # %entry
2300 ; CHECK-PREP10-NEXT: li r4, 29
2301 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2302 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2303 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2304 ; CHECK-PREP10-NEXT: or r3, r3, r4
2305 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
2306 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2307 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2308 ; CHECK-PREP10-NEXT: extsw r3, r3
2309 ; CHECK-PREP10-NEXT: blr
2311 %or = or i64 %ptr, 1000000000001
2312 %0 = inttoptr i64 %or to ptr
2313 %1 = load float, ptr %0, align 4
2314 %conv = fptosi float %1 to i8
2318 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2319 define dso_local signext i8 @ld_disjoint_align64_int8_t_float(i64 %ptr) {
2320 ; CHECK-P10-LABEL: ld_disjoint_align64_int8_t_float:
2321 ; CHECK-P10: # %bb.0: # %entry
2322 ; CHECK-P10-NEXT: pli r4, 244140625
2323 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
2324 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2325 ; CHECK-P10-NEXT: lfsx f0, r3, r4
2326 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2327 ; CHECK-P10-NEXT: mffprwz r3, f0
2328 ; CHECK-P10-NEXT: extsw r3, r3
2329 ; CHECK-P10-NEXT: blr
2331 ; CHECK-PREP10-LABEL: ld_disjoint_align64_int8_t_float:
2332 ; CHECK-PREP10: # %bb.0: # %entry
2333 ; CHECK-PREP10-NEXT: lis r4, 3725
2334 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
2335 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2336 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2337 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
2338 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2339 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2340 ; CHECK-PREP10-NEXT: extsw r3, r3
2341 ; CHECK-PREP10-NEXT: blr
2343 %and = and i64 %ptr, -1099511627776
2344 %or = or i64 %and, 1000000000000
2345 %0 = inttoptr i64 %or to ptr
2346 %1 = load float, ptr %0, align 4096
2347 %conv = fptosi float %1 to i8
2351 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2352 define dso_local signext i8 @ld_cst_align16_int8_t_float() {
2353 ; CHECK-LABEL: ld_cst_align16_int8_t_float:
2354 ; CHECK: # %bb.0: # %entry
2355 ; CHECK-NEXT: lfs f0, 4080(0)
2356 ; CHECK-NEXT: xscvdpsxws f0, f0
2357 ; CHECK-NEXT: mffprwz r3, f0
2358 ; CHECK-NEXT: extsw r3, r3
2361 %0 = load float, ptr inttoptr (i64 4080 to ptr), align 16
2362 %conv = fptosi float %0 to i8
2366 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2367 define dso_local signext i8 @ld_cst_align32_int8_t_float() {
2368 ; CHECK-LABEL: ld_cst_align32_int8_t_float:
2369 ; CHECK: # %bb.0: # %entry
2370 ; CHECK-NEXT: lis r3, 153
2371 ; CHECK-NEXT: lfs f0, -27108(r3)
2372 ; CHECK-NEXT: xscvdpsxws f0, f0
2373 ; CHECK-NEXT: mffprwz r3, f0
2374 ; CHECK-NEXT: extsw r3, r3
2377 %0 = load float, ptr inttoptr (i64 9999900 to ptr), align 4
2378 %conv = fptosi float %0 to i8
2382 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2383 define dso_local signext i8 @ld_cst_align64_int8_t_float() {
2384 ; CHECK-P10-LABEL: ld_cst_align64_int8_t_float:
2385 ; CHECK-P10: # %bb.0: # %entry
2386 ; CHECK-P10-NEXT: pli r3, 244140625
2387 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
2388 ; CHECK-P10-NEXT: lfs f0, 0(r3)
2389 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2390 ; CHECK-P10-NEXT: mffprwz r3, f0
2391 ; CHECK-P10-NEXT: extsw r3, r3
2392 ; CHECK-P10-NEXT: blr
2394 ; CHECK-PREP10-LABEL: ld_cst_align64_int8_t_float:
2395 ; CHECK-PREP10: # %bb.0: # %entry
2396 ; CHECK-PREP10-NEXT: lis r3, 3725
2397 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
2398 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
2399 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
2400 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2401 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2402 ; CHECK-PREP10-NEXT: extsw r3, r3
2403 ; CHECK-PREP10-NEXT: blr
2405 %0 = load float, ptr inttoptr (i64 1000000000000 to ptr), align 4096
2406 %conv = fptosi float %0 to i8
2410 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2411 define dso_local signext i8 @ld_0_int8_t_double(i64 %ptr) {
2412 ; CHECK-LABEL: ld_0_int8_t_double:
2413 ; CHECK: # %bb.0: # %entry
2414 ; CHECK-NEXT: lfd f0, 0(r3)
2415 ; CHECK-NEXT: xscvdpsxws f0, f0
2416 ; CHECK-NEXT: mffprwz r3, f0
2417 ; CHECK-NEXT: extsw r3, r3
2420 %0 = inttoptr i64 %ptr to ptr
2421 %1 = load double, ptr %0, align 8
2422 %conv = fptosi double %1 to i8
2426 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2427 define dso_local signext i8 @ld_align16_int8_t_double(ptr nocapture readonly %ptr) {
2428 ; CHECK-LABEL: ld_align16_int8_t_double:
2429 ; CHECK: # %bb.0: # %entry
2430 ; CHECK-NEXT: lfd f0, 8(r3)
2431 ; CHECK-NEXT: xscvdpsxws f0, f0
2432 ; CHECK-NEXT: mffprwz r3, f0
2433 ; CHECK-NEXT: extsw r3, r3
2436 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
2437 %0 = load double, ptr %add.ptr, align 8
2438 %conv = fptosi double %0 to i8
2442 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2443 define dso_local signext i8 @ld_align32_int8_t_double(ptr nocapture readonly %ptr) {
2444 ; CHECK-P10-LABEL: ld_align32_int8_t_double:
2445 ; CHECK-P10: # %bb.0: # %entry
2446 ; CHECK-P10-NEXT: plfd f0, 99999000(r3), 0
2447 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2448 ; CHECK-P10-NEXT: mffprwz r3, f0
2449 ; CHECK-P10-NEXT: extsw r3, r3
2450 ; CHECK-P10-NEXT: blr
2452 ; CHECK-PREP10-LABEL: ld_align32_int8_t_double:
2453 ; CHECK-PREP10: # %bb.0: # %entry
2454 ; CHECK-PREP10-NEXT: lis r4, 1525
2455 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
2456 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
2457 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2458 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2459 ; CHECK-PREP10-NEXT: extsw r3, r3
2460 ; CHECK-PREP10-NEXT: blr
2462 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
2463 %0 = load double, ptr %add.ptr, align 8
2464 %conv = fptosi double %0 to i8
2468 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2469 define dso_local signext i8 @ld_align64_int8_t_double(ptr nocapture readonly %ptr) {
2470 ; CHECK-P10-LABEL: ld_align64_int8_t_double:
2471 ; CHECK-P10: # %bb.0: # %entry
2472 ; CHECK-P10-NEXT: pli r4, 244140625
2473 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2474 ; CHECK-P10-NEXT: lfdx f0, r3, r4
2475 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2476 ; CHECK-P10-NEXT: mffprwz r3, f0
2477 ; CHECK-P10-NEXT: extsw r3, r3
2478 ; CHECK-P10-NEXT: blr
2480 ; CHECK-PREP10-LABEL: ld_align64_int8_t_double:
2481 ; CHECK-PREP10: # %bb.0: # %entry
2482 ; CHECK-PREP10-NEXT: lis r4, 3725
2483 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2484 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2485 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
2486 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2487 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2488 ; CHECK-PREP10-NEXT: extsw r3, r3
2489 ; CHECK-PREP10-NEXT: blr
2491 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
2492 %0 = load double, ptr %add.ptr, align 8
2493 %conv = fptosi double %0 to i8
2497 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2498 define dso_local signext i8 @ld_reg_int8_t_double(ptr nocapture readonly %ptr, i64 %off) {
2499 ; CHECK-LABEL: ld_reg_int8_t_double:
2500 ; CHECK: # %bb.0: # %entry
2501 ; CHECK-NEXT: lfdx f0, r3, r4
2502 ; CHECK-NEXT: xscvdpsxws f0, f0
2503 ; CHECK-NEXT: mffprwz r3, f0
2504 ; CHECK-NEXT: extsw r3, r3
2507 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
2508 %0 = load double, ptr %add.ptr, align 8
2509 %conv = fptosi double %0 to i8
2513 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2514 define dso_local signext i8 @ld_or_int8_t_double(i64 %ptr, i8 zeroext %off) {
2515 ; CHECK-LABEL: ld_or_int8_t_double:
2516 ; CHECK: # %bb.0: # %entry
2517 ; CHECK-NEXT: or r3, r4, r3
2518 ; CHECK-NEXT: lfd f0, 0(r3)
2519 ; CHECK-NEXT: xscvdpsxws f0, f0
2520 ; CHECK-NEXT: mffprwz r3, f0
2521 ; CHECK-NEXT: extsw r3, r3
2524 %conv = zext i8 %off to i64
2525 %or = or i64 %conv, %ptr
2526 %0 = inttoptr i64 %or to ptr
2527 %1 = load double, ptr %0, align 8
2528 %conv1 = fptosi double %1 to i8
2532 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2533 define dso_local signext i8 @ld_not_disjoint16_int8_t_double(i64 %ptr) {
2534 ; CHECK-LABEL: ld_not_disjoint16_int8_t_double:
2535 ; CHECK: # %bb.0: # %entry
2536 ; CHECK-NEXT: ori r3, r3, 6
2537 ; CHECK-NEXT: lfd f0, 0(r3)
2538 ; CHECK-NEXT: xscvdpsxws f0, f0
2539 ; CHECK-NEXT: mffprwz r3, f0
2540 ; CHECK-NEXT: extsw r3, r3
2543 %or = or i64 %ptr, 6
2544 %0 = inttoptr i64 %or to ptr
2545 %1 = load double, ptr %0, align 8
2546 %conv = fptosi double %1 to i8
2550 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2551 define dso_local signext i8 @ld_disjoint_align16_int8_t_double(i64 %ptr) {
2552 ; CHECK-LABEL: ld_disjoint_align16_int8_t_double:
2553 ; CHECK: # %bb.0: # %entry
2554 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2555 ; CHECK-NEXT: lfd f0, 24(r3)
2556 ; CHECK-NEXT: xscvdpsxws f0, f0
2557 ; CHECK-NEXT: mffprwz r3, f0
2558 ; CHECK-NEXT: extsw r3, r3
2561 %and = and i64 %ptr, -4096
2562 %or = or i64 %and, 24
2563 %0 = inttoptr i64 %or to ptr
2564 %1 = load double, ptr %0, align 8
2565 %conv = fptosi double %1 to i8
2569 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2570 define dso_local signext i8 @ld_not_disjoint32_int8_t_double(i64 %ptr) {
2571 ; CHECK-LABEL: ld_not_disjoint32_int8_t_double:
2572 ; CHECK: # %bb.0: # %entry
2573 ; CHECK-NEXT: ori r3, r3, 34463
2574 ; CHECK-NEXT: oris r3, r3, 1
2575 ; CHECK-NEXT: lfd f0, 0(r3)
2576 ; CHECK-NEXT: xscvdpsxws f0, f0
2577 ; CHECK-NEXT: mffprwz r3, f0
2578 ; CHECK-NEXT: extsw r3, r3
2581 %or = or i64 %ptr, 99999
2582 %0 = inttoptr i64 %or to ptr
2583 %1 = load double, ptr %0, align 8
2584 %conv = fptosi double %1 to i8
2588 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2589 define dso_local signext i8 @ld_disjoint_align32_int8_t_double(i64 %ptr) {
2590 ; CHECK-P10-LABEL: ld_disjoint_align32_int8_t_double:
2591 ; CHECK-P10: # %bb.0: # %entry
2592 ; CHECK-P10-NEXT: lis r4, -15264
2593 ; CHECK-P10-NEXT: and r3, r3, r4
2594 ; CHECK-P10-NEXT: plfd f0, 999990000(r3), 0
2595 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2596 ; CHECK-P10-NEXT: mffprwz r3, f0
2597 ; CHECK-P10-NEXT: extsw r3, r3
2598 ; CHECK-P10-NEXT: blr
2600 ; CHECK-P9-LABEL: ld_disjoint_align32_int8_t_double:
2601 ; CHECK-P9: # %bb.0: # %entry
2602 ; CHECK-P9-NEXT: lis r4, -15264
2603 ; CHECK-P9-NEXT: and r3, r3, r4
2604 ; CHECK-P9-NEXT: lis r4, 15258
2605 ; CHECK-P9-NEXT: ori r4, r4, 41712
2606 ; CHECK-P9-NEXT: lfdx f0, r3, r4
2607 ; CHECK-P9-NEXT: xscvdpsxws f0, f0
2608 ; CHECK-P9-NEXT: mffprwz r3, f0
2609 ; CHECK-P9-NEXT: extsw r3, r3
2610 ; CHECK-P9-NEXT: blr
2612 ; CHECK-P8-LABEL: ld_disjoint_align32_int8_t_double:
2613 ; CHECK-P8: # %bb.0: # %entry
2614 ; CHECK-P8-NEXT: lis r4, -15264
2615 ; CHECK-P8-NEXT: lis r5, 15258
2616 ; CHECK-P8-NEXT: and r3, r3, r4
2617 ; CHECK-P8-NEXT: ori r4, r5, 41712
2618 ; CHECK-P8-NEXT: lfdx f0, r3, r4
2619 ; CHECK-P8-NEXT: xscvdpsxws f0, f0
2620 ; CHECK-P8-NEXT: mffprwz r3, f0
2621 ; CHECK-P8-NEXT: extsw r3, r3
2622 ; CHECK-P8-NEXT: blr
2624 %and = and i64 %ptr, -1000341504
2625 %or = or i64 %and, 999990000
2626 %0 = inttoptr i64 %or to ptr
2627 %1 = load double, ptr %0, align 16
2628 %conv = fptosi double %1 to i8
2632 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2633 define dso_local signext i8 @ld_not_disjoint64_int8_t_double(i64 %ptr) {
2634 ; CHECK-P10-LABEL: ld_not_disjoint64_int8_t_double:
2635 ; CHECK-P10: # %bb.0: # %entry
2636 ; CHECK-P10-NEXT: pli r4, 232
2637 ; CHECK-P10-NEXT: pli r5, 3567587329
2638 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2639 ; CHECK-P10-NEXT: or r3, r3, r5
2640 ; CHECK-P10-NEXT: lfd f0, 0(r3)
2641 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2642 ; CHECK-P10-NEXT: mffprwz r3, f0
2643 ; CHECK-P10-NEXT: extsw r3, r3
2644 ; CHECK-P10-NEXT: blr
2646 ; CHECK-PREP10-LABEL: ld_not_disjoint64_int8_t_double:
2647 ; CHECK-PREP10: # %bb.0: # %entry
2648 ; CHECK-PREP10-NEXT: li r4, 29
2649 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2650 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2651 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2652 ; CHECK-PREP10-NEXT: or r3, r3, r4
2653 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
2654 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2655 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2656 ; CHECK-PREP10-NEXT: extsw r3, r3
2657 ; CHECK-PREP10-NEXT: blr
2659 %or = or i64 %ptr, 1000000000001
2660 %0 = inttoptr i64 %or to ptr
2661 %1 = load double, ptr %0, align 8
2662 %conv = fptosi double %1 to i8
2666 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2667 define dso_local signext i8 @ld_disjoint_align64_int8_t_double(i64 %ptr) {
2668 ; CHECK-P10-LABEL: ld_disjoint_align64_int8_t_double:
2669 ; CHECK-P10: # %bb.0: # %entry
2670 ; CHECK-P10-NEXT: pli r4, 244140625
2671 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
2672 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2673 ; CHECK-P10-NEXT: lfdx f0, r3, r4
2674 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2675 ; CHECK-P10-NEXT: mffprwz r3, f0
2676 ; CHECK-P10-NEXT: extsw r3, r3
2677 ; CHECK-P10-NEXT: blr
2679 ; CHECK-PREP10-LABEL: ld_disjoint_align64_int8_t_double:
2680 ; CHECK-PREP10: # %bb.0: # %entry
2681 ; CHECK-PREP10-NEXT: lis r4, 3725
2682 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
2683 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2684 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2685 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
2686 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2687 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2688 ; CHECK-PREP10-NEXT: extsw r3, r3
2689 ; CHECK-PREP10-NEXT: blr
2691 %and = and i64 %ptr, -1099511627776
2692 %or = or i64 %and, 1000000000000
2693 %0 = inttoptr i64 %or to ptr
2694 %1 = load double, ptr %0, align 4096
2695 %conv = fptosi double %1 to i8
2699 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2700 define dso_local signext i8 @ld_cst_align16_int8_t_double() {
2701 ; CHECK-LABEL: ld_cst_align16_int8_t_double:
2702 ; CHECK: # %bb.0: # %entry
2703 ; CHECK-NEXT: lfd f0, 4080(0)
2704 ; CHECK-NEXT: xscvdpsxws f0, f0
2705 ; CHECK-NEXT: mffprwz r3, f0
2706 ; CHECK-NEXT: extsw r3, r3
2709 %0 = load double, ptr inttoptr (i64 4080 to ptr), align 16
2710 %conv = fptosi double %0 to i8
2714 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2715 define dso_local signext i8 @ld_cst_align32_int8_t_double() {
2716 ; CHECK-LABEL: ld_cst_align32_int8_t_double:
2717 ; CHECK: # %bb.0: # %entry
2718 ; CHECK-NEXT: lis r3, 153
2719 ; CHECK-NEXT: lfd f0, -27108(r3)
2720 ; CHECK-NEXT: xscvdpsxws f0, f0
2721 ; CHECK-NEXT: mffprwz r3, f0
2722 ; CHECK-NEXT: extsw r3, r3
2725 %0 = load double, ptr inttoptr (i64 9999900 to ptr), align 8
2726 %conv = fptosi double %0 to i8
2730 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2731 define dso_local signext i8 @ld_cst_align64_int8_t_double() {
2732 ; CHECK-P10-LABEL: ld_cst_align64_int8_t_double:
2733 ; CHECK-P10: # %bb.0: # %entry
2734 ; CHECK-P10-NEXT: pli r3, 244140625
2735 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
2736 ; CHECK-P10-NEXT: lfd f0, 0(r3)
2737 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2738 ; CHECK-P10-NEXT: mffprwz r3, f0
2739 ; CHECK-P10-NEXT: extsw r3, r3
2740 ; CHECK-P10-NEXT: blr
2742 ; CHECK-PREP10-LABEL: ld_cst_align64_int8_t_double:
2743 ; CHECK-PREP10: # %bb.0: # %entry
2744 ; CHECK-PREP10-NEXT: lis r3, 3725
2745 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
2746 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
2747 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
2748 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2749 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2750 ; CHECK-PREP10-NEXT: extsw r3, r3
2751 ; CHECK-PREP10-NEXT: blr
2753 %0 = load double, ptr inttoptr (i64 1000000000000 to ptr), align 4096
2754 %conv = fptosi double %0 to i8
2758 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2759 define dso_local zeroext i8 @ld_0_uint8_t_uint8_t(i64 %ptr) {
2760 ; CHECK-LABEL: ld_0_uint8_t_uint8_t:
2761 ; CHECK: # %bb.0: # %entry
2762 ; CHECK-NEXT: lbz r3, 0(r3)
2765 %0 = inttoptr i64 %ptr to ptr
2766 %1 = load i8, ptr %0, align 1
2770 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2771 define dso_local zeroext i8 @ld_align16_uint8_t_uint8_t(ptr nocapture readonly %ptr) {
2772 ; CHECK-LABEL: ld_align16_uint8_t_uint8_t:
2773 ; CHECK: # %bb.0: # %entry
2774 ; CHECK-NEXT: lbz r3, 8(r3)
2777 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
2778 %0 = load i8, ptr %add.ptr, align 1
2782 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2783 define dso_local zeroext i8 @ld_align32_uint8_t_uint8_t(ptr nocapture readonly %ptr) {
2784 ; CHECK-P10-LABEL: ld_align32_uint8_t_uint8_t:
2785 ; CHECK-P10: # %bb.0: # %entry
2786 ; CHECK-P10-NEXT: plbz r3, 99999000(r3), 0
2787 ; CHECK-P10-NEXT: blr
2789 ; CHECK-PREP10-LABEL: ld_align32_uint8_t_uint8_t:
2790 ; CHECK-PREP10: # %bb.0: # %entry
2791 ; CHECK-PREP10-NEXT: lis r4, 1525
2792 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
2793 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
2794 ; CHECK-PREP10-NEXT: blr
2796 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
2797 %0 = load i8, ptr %add.ptr, align 1
2801 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2802 define dso_local zeroext i8 @ld_unalign64_uint8_t_uint8_t(ptr nocapture readonly %ptr) {
2803 ; CHECK-P10-LABEL: ld_unalign64_uint8_t_uint8_t:
2804 ; CHECK-P10: # %bb.0: # %entry
2805 ; CHECK-P10-NEXT: pli r4, 232
2806 ; CHECK-P10-NEXT: pli r5, 3567587329
2807 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2808 ; CHECK-P10-NEXT: lbzx r3, r3, r5
2809 ; CHECK-P10-NEXT: blr
2811 ; CHECK-PREP10-LABEL: ld_unalign64_uint8_t_uint8_t:
2812 ; CHECK-PREP10: # %bb.0: # %entry
2813 ; CHECK-PREP10-NEXT: li r4, 29
2814 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2815 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2816 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2817 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
2818 ; CHECK-PREP10-NEXT: blr
2820 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000001
2821 %0 = load i8, ptr %add.ptr, align 1
2825 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2826 define dso_local zeroext i8 @ld_align64_uint8_t_uint8_t(ptr nocapture readonly %ptr) {
2827 ; CHECK-P10-LABEL: ld_align64_uint8_t_uint8_t:
2828 ; CHECK-P10: # %bb.0: # %entry
2829 ; CHECK-P10-NEXT: pli r4, 244140625
2830 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2831 ; CHECK-P10-NEXT: lbzx r3, r3, r4
2832 ; CHECK-P10-NEXT: blr
2834 ; CHECK-PREP10-LABEL: ld_align64_uint8_t_uint8_t:
2835 ; CHECK-PREP10: # %bb.0: # %entry
2836 ; CHECK-PREP10-NEXT: lis r4, 3725
2837 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2838 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2839 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
2840 ; CHECK-PREP10-NEXT: blr
2842 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
2843 %0 = load i8, ptr %add.ptr, align 1
2847 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2848 define dso_local zeroext i8 @ld_reg_uint8_t_uint8_t(ptr nocapture readonly %ptr, i64 %off) {
2849 ; CHECK-LABEL: ld_reg_uint8_t_uint8_t:
2850 ; CHECK: # %bb.0: # %entry
2851 ; CHECK-NEXT: lbzx r3, r3, r4
2854 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
2855 %0 = load i8, ptr %add.ptr, align 1
2859 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2860 define dso_local zeroext i8 @ld_or_uint8_t_uint8_t(i64 %ptr, i8 zeroext %off) {
2861 ; CHECK-LABEL: ld_or_uint8_t_uint8_t:
2862 ; CHECK: # %bb.0: # %entry
2863 ; CHECK-NEXT: or r3, r4, r3
2864 ; CHECK-NEXT: lbz r3, 0(r3)
2867 %conv = zext i8 %off to i64
2868 %or = or i64 %conv, %ptr
2869 %0 = inttoptr i64 %or to ptr
2870 %1 = load i8, ptr %0, align 1
2874 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2875 define dso_local zeroext i8 @ld_not_disjoint16_uint8_t_uint8_t(i64 %ptr) {
2876 ; CHECK-LABEL: ld_not_disjoint16_uint8_t_uint8_t:
2877 ; CHECK: # %bb.0: # %entry
2878 ; CHECK-NEXT: ori r3, r3, 6
2879 ; CHECK-NEXT: lbz r3, 0(r3)
2882 %or = or i64 %ptr, 6
2883 %0 = inttoptr i64 %or to ptr
2884 %1 = load i8, ptr %0, align 1
2888 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2889 define dso_local zeroext i8 @ld_disjoint_align16_uint8_t_uint8_t(i64 %ptr) {
2890 ; CHECK-LABEL: ld_disjoint_align16_uint8_t_uint8_t:
2891 ; CHECK: # %bb.0: # %entry
2892 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2893 ; CHECK-NEXT: lbz r3, 24(r3)
2896 %and = and i64 %ptr, -4096
2897 %or = or i64 %and, 24
2898 %0 = inttoptr i64 %or to ptr
2899 %1 = load i8, ptr %0, align 8
2903 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2904 define dso_local zeroext i8 @ld_not_disjoint32_uint8_t_uint8_t(i64 %ptr) {
2905 ; CHECK-LABEL: ld_not_disjoint32_uint8_t_uint8_t:
2906 ; CHECK: # %bb.0: # %entry
2907 ; CHECK-NEXT: ori r3, r3, 34463
2908 ; CHECK-NEXT: oris r3, r3, 1
2909 ; CHECK-NEXT: lbz r3, 0(r3)
2912 %or = or i64 %ptr, 99999
2913 %0 = inttoptr i64 %or to ptr
2914 %1 = load i8, ptr %0, align 1
2918 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2919 define dso_local zeroext i8 @ld_disjoint_align32_uint8_t_uint8_t(i64 %ptr) {
2920 ; CHECK-P10-LABEL: ld_disjoint_align32_uint8_t_uint8_t:
2921 ; CHECK-P10: # %bb.0: # %entry
2922 ; CHECK-P10-NEXT: lis r4, -15264
2923 ; CHECK-P10-NEXT: and r3, r3, r4
2924 ; CHECK-P10-NEXT: plbz r3, 999990000(r3), 0
2925 ; CHECK-P10-NEXT: blr
2927 ; CHECK-P9-LABEL: ld_disjoint_align32_uint8_t_uint8_t:
2928 ; CHECK-P9: # %bb.0: # %entry
2929 ; CHECK-P9-NEXT: lis r4, -15264
2930 ; CHECK-P9-NEXT: and r3, r3, r4
2931 ; CHECK-P9-NEXT: lis r4, 15258
2932 ; CHECK-P9-NEXT: ori r4, r4, 41712
2933 ; CHECK-P9-NEXT: lbzx r3, r3, r4
2934 ; CHECK-P9-NEXT: blr
2936 ; CHECK-P8-LABEL: ld_disjoint_align32_uint8_t_uint8_t:
2937 ; CHECK-P8: # %bb.0: # %entry
2938 ; CHECK-P8-NEXT: lis r4, -15264
2939 ; CHECK-P8-NEXT: lis r5, 15258
2940 ; CHECK-P8-NEXT: and r3, r3, r4
2941 ; CHECK-P8-NEXT: ori r4, r5, 41712
2942 ; CHECK-P8-NEXT: lbzx r3, r3, r4
2943 ; CHECK-P8-NEXT: blr
2945 %and = and i64 %ptr, -1000341504
2946 %or = or i64 %and, 999990000
2947 %0 = inttoptr i64 %or to ptr
2948 %1 = load i8, ptr %0, align 16
2952 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2953 define dso_local zeroext i8 @ld_not_disjoint64_uint8_t_uint8_t(i64 %ptr) {
2954 ; CHECK-P10-LABEL: ld_not_disjoint64_uint8_t_uint8_t:
2955 ; CHECK-P10: # %bb.0: # %entry
2956 ; CHECK-P10-NEXT: pli r4, 232
2957 ; CHECK-P10-NEXT: pli r5, 3567587329
2958 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2959 ; CHECK-P10-NEXT: or r3, r3, r5
2960 ; CHECK-P10-NEXT: lbz r3, 0(r3)
2961 ; CHECK-P10-NEXT: blr
2963 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint8_t_uint8_t:
2964 ; CHECK-PREP10: # %bb.0: # %entry
2965 ; CHECK-PREP10-NEXT: li r4, 29
2966 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2967 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2968 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2969 ; CHECK-PREP10-NEXT: or r3, r3, r4
2970 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
2971 ; CHECK-PREP10-NEXT: blr
2973 %or = or i64 %ptr, 1000000000001
2974 %0 = inttoptr i64 %or to ptr
2975 %1 = load i8, ptr %0, align 1
2979 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2980 define dso_local zeroext i8 @ld_disjoint_unalign64_uint8_t_uint8_t(i64 %ptr) {
2981 ; CHECK-P10-LABEL: ld_disjoint_unalign64_uint8_t_uint8_t:
2982 ; CHECK-P10: # %bb.0: # %entry
2983 ; CHECK-P10-NEXT: pli r4, 232
2984 ; CHECK-P10-NEXT: pli r5, 3567587329
2985 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
2986 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2987 ; CHECK-P10-NEXT: lbzx r3, r3, r5
2988 ; CHECK-P10-NEXT: blr
2990 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint8_t_uint8_t:
2991 ; CHECK-PREP10: # %bb.0: # %entry
2992 ; CHECK-PREP10-NEXT: li r4, 29
2993 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
2994 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2995 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2996 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2997 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
2998 ; CHECK-PREP10-NEXT: blr
3000 %and = and i64 %ptr, -1099511627776
3001 %or = or i64 %and, 1000000000001
3002 %0 = inttoptr i64 %or to ptr
3003 %1 = load i8, ptr %0, align 1
3007 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3008 define dso_local zeroext i8 @ld_disjoint_align64_uint8_t_uint8_t(i64 %ptr) {
3009 ; CHECK-P10-LABEL: ld_disjoint_align64_uint8_t_uint8_t:
3010 ; CHECK-P10: # %bb.0: # %entry
3011 ; CHECK-P10-NEXT: pli r4, 244140625
3012 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
3013 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
3014 ; CHECK-P10-NEXT: lbzx r3, r3, r4
3015 ; CHECK-P10-NEXT: blr
3017 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint8_t_uint8_t:
3018 ; CHECK-PREP10: # %bb.0: # %entry
3019 ; CHECK-PREP10-NEXT: lis r4, 3725
3020 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
3021 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
3022 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
3023 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
3024 ; CHECK-PREP10-NEXT: blr
3026 %and = and i64 %ptr, -1099511627776
3027 %or = or i64 %and, 1000000000000
3028 %0 = inttoptr i64 %or to ptr
3029 %1 = load i8, ptr %0, align 4096
3033 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3034 define dso_local zeroext i8 @ld_cst_align16_uint8_t_uint8_t() {
3035 ; CHECK-LABEL: ld_cst_align16_uint8_t_uint8_t:
3036 ; CHECK: # %bb.0: # %entry
3037 ; CHECK-NEXT: lbz r3, 4080(0)
3040 %0 = load i8, ptr inttoptr (i64 4080 to ptr), align 16
3044 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3045 define dso_local zeroext i8 @ld_cst_align32_uint8_t_uint8_t() {
3046 ; CHECK-LABEL: ld_cst_align32_uint8_t_uint8_t:
3047 ; CHECK: # %bb.0: # %entry
3048 ; CHECK-NEXT: lis r3, 153
3049 ; CHECK-NEXT: lbz r3, -27108(r3)
3052 %0 = load i8, ptr inttoptr (i64 9999900 to ptr), align 4
3056 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3057 define dso_local zeroext i8 @ld_cst_unalign64_uint8_t_uint8_t() {
3058 ; CHECK-P10-LABEL: ld_cst_unalign64_uint8_t_uint8_t:
3059 ; CHECK-P10: # %bb.0: # %entry
3060 ; CHECK-P10-NEXT: pli r3, 232
3061 ; CHECK-P10-NEXT: pli r4, 3567587329
3062 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
3063 ; CHECK-P10-NEXT: lbz r3, 0(r4)
3064 ; CHECK-P10-NEXT: blr
3066 ; CHECK-PREP10-LABEL: ld_cst_unalign64_uint8_t_uint8_t:
3067 ; CHECK-PREP10: # %bb.0: # %entry
3068 ; CHECK-PREP10-NEXT: li r3, 29
3069 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
3070 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
3071 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
3072 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
3073 ; CHECK-PREP10-NEXT: blr
3075 %0 = load i8, ptr inttoptr (i64 1000000000001 to ptr), align 1
3079 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3080 define dso_local zeroext i8 @ld_cst_align64_uint8_t_uint8_t() {
3081 ; CHECK-P10-LABEL: ld_cst_align64_uint8_t_uint8_t:
3082 ; CHECK-P10: # %bb.0: # %entry
3083 ; CHECK-P10-NEXT: pli r3, 244140625
3084 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
3085 ; CHECK-P10-NEXT: lbz r3, 0(r3)
3086 ; CHECK-P10-NEXT: blr
3088 ; CHECK-PREP10-LABEL: ld_cst_align64_uint8_t_uint8_t:
3089 ; CHECK-PREP10: # %bb.0: # %entry
3090 ; CHECK-PREP10-NEXT: lis r3, 3725
3091 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
3092 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
3093 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
3094 ; CHECK-PREP10-NEXT: blr
3096 %0 = load i8, ptr inttoptr (i64 1000000000000 to ptr), align 4096
3100 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3101 define dso_local zeroext i8 @ld_0_uint8_t_uint16_t(i64 %ptr) {
3102 ; CHECK-LE-LABEL: ld_0_uint8_t_uint16_t:
3103 ; CHECK-LE: # %bb.0: # %entry
3104 ; CHECK-LE-NEXT: lbz r3, 0(r3)
3105 ; CHECK-LE-NEXT: blr
3107 ; CHECK-BE-LABEL: ld_0_uint8_t_uint16_t:
3108 ; CHECK-BE: # %bb.0: # %entry
3109 ; CHECK-BE-NEXT: lbz r3, 1(r3)
3110 ; CHECK-BE-NEXT: blr
3112 %0 = inttoptr i64 %ptr to ptr
3113 %1 = load i16, ptr %0, align 2
3114 %conv = trunc i16 %1 to i8
3118 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3119 define dso_local zeroext i8 @ld_align16_uint8_t_uint16_t(ptr nocapture readonly %ptr) {
3120 ; CHECK-LE-LABEL: ld_align16_uint8_t_uint16_t:
3121 ; CHECK-LE: # %bb.0: # %entry
3122 ; CHECK-LE-NEXT: lbz r3, 8(r3)
3123 ; CHECK-LE-NEXT: blr
3125 ; CHECK-BE-LABEL: ld_align16_uint8_t_uint16_t:
3126 ; CHECK-BE: # %bb.0: # %entry
3127 ; CHECK-BE-NEXT: lbz r3, 9(r3)
3128 ; CHECK-BE-NEXT: blr
3130 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
3131 %0 = load i16, ptr %add.ptr, align 2
3132 %conv = trunc i16 %0 to i8
3136 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3137 define dso_local zeroext i8 @ld_align32_uint8_t_uint16_t(ptr nocapture readonly %ptr) {
3138 ; CHECK-P10-LE-LABEL: ld_align32_uint8_t_uint16_t:
3139 ; CHECK-P10-LE: # %bb.0: # %entry
3140 ; CHECK-P10-LE-NEXT: plbz r3, 99999000(r3), 0
3141 ; CHECK-P10-LE-NEXT: blr
3143 ; CHECK-P10-BE-LABEL: ld_align32_uint8_t_uint16_t:
3144 ; CHECK-P10-BE: # %bb.0: # %entry
3145 ; CHECK-P10-BE-NEXT: plbz r3, 99999001(r3), 0
3146 ; CHECK-P10-BE-NEXT: blr
3148 ; CHECK-P9-LE-LABEL: ld_align32_uint8_t_uint16_t:
3149 ; CHECK-P9-LE: # %bb.0: # %entry
3150 ; CHECK-P9-LE-NEXT: lis r4, 1525
3151 ; CHECK-P9-LE-NEXT: ori r4, r4, 56600
3152 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
3153 ; CHECK-P9-LE-NEXT: blr
3155 ; CHECK-P9-BE-LABEL: ld_align32_uint8_t_uint16_t:
3156 ; CHECK-P9-BE: # %bb.0: # %entry
3157 ; CHECK-P9-BE-NEXT: lis r4, 1525
3158 ; CHECK-P9-BE-NEXT: ori r4, r4, 56601
3159 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
3160 ; CHECK-P9-BE-NEXT: blr
3162 ; CHECK-P8-LE-LABEL: ld_align32_uint8_t_uint16_t:
3163 ; CHECK-P8-LE: # %bb.0: # %entry
3164 ; CHECK-P8-LE-NEXT: lis r4, 1525
3165 ; CHECK-P8-LE-NEXT: ori r4, r4, 56600
3166 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
3167 ; CHECK-P8-LE-NEXT: blr
3169 ; CHECK-P8-BE-LABEL: ld_align32_uint8_t_uint16_t:
3170 ; CHECK-P8-BE: # %bb.0: # %entry
3171 ; CHECK-P8-BE-NEXT: lis r4, 1525
3172 ; CHECK-P8-BE-NEXT: ori r4, r4, 56601
3173 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
3174 ; CHECK-P8-BE-NEXT: blr
3176 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
3177 %0 = load i16, ptr %add.ptr, align 2
3178 %conv = trunc i16 %0 to i8
3182 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3183 define dso_local zeroext i8 @ld_unalign64_uint8_t_uint16_t(ptr nocapture readonly %ptr) {
3184 ; CHECK-P10-LE-LABEL: ld_unalign64_uint8_t_uint16_t:
3185 ; CHECK-P10-LE: # %bb.0: # %entry
3186 ; CHECK-P10-LE-NEXT: pli r4, 232
3187 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
3188 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
3189 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r5
3190 ; CHECK-P10-LE-NEXT: blr
3192 ; CHECK-P10-BE-LABEL: ld_unalign64_uint8_t_uint16_t:
3193 ; CHECK-P10-BE: # %bb.0: # %entry
3194 ; CHECK-P10-BE-NEXT: pli r4, 232
3195 ; CHECK-P10-BE-NEXT: pli r5, 3567587330
3196 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
3197 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
3198 ; CHECK-P10-BE-NEXT: blr
3200 ; CHECK-P9-LE-LABEL: ld_unalign64_uint8_t_uint16_t:
3201 ; CHECK-P9-LE: # %bb.0: # %entry
3202 ; CHECK-P9-LE-NEXT: li r4, 29
3203 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
3204 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
3205 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
3206 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
3207 ; CHECK-P9-LE-NEXT: blr
3209 ; CHECK-P9-BE-LABEL: ld_unalign64_uint8_t_uint16_t:
3210 ; CHECK-P9-BE: # %bb.0: # %entry
3211 ; CHECK-P9-BE-NEXT: li r4, 29
3212 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
3213 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
3214 ; CHECK-P9-BE-NEXT: ori r4, r4, 4098
3215 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
3216 ; CHECK-P9-BE-NEXT: blr
3218 ; CHECK-P8-LE-LABEL: ld_unalign64_uint8_t_uint16_t:
3219 ; CHECK-P8-LE: # %bb.0: # %entry
3220 ; CHECK-P8-LE-NEXT: li r4, 29
3221 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
3222 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
3223 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
3224 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
3225 ; CHECK-P8-LE-NEXT: blr
3227 ; CHECK-P8-BE-LABEL: ld_unalign64_uint8_t_uint16_t:
3228 ; CHECK-P8-BE: # %bb.0: # %entry
3229 ; CHECK-P8-BE-NEXT: li r4, 29
3230 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
3231 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
3232 ; CHECK-P8-BE-NEXT: ori r4, r4, 4098
3233 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
3234 ; CHECK-P8-BE-NEXT: blr
3236 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000001
3237 %0 = load i16, ptr %add.ptr, align 2
3238 %conv = trunc i16 %0 to i8
3242 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3243 define dso_local zeroext i8 @ld_align64_uint8_t_uint16_t(ptr nocapture readonly %ptr) {
3244 ; CHECK-P10-LE-LABEL: ld_align64_uint8_t_uint16_t:
3245 ; CHECK-P10-LE: # %bb.0: # %entry
3246 ; CHECK-P10-LE-NEXT: pli r4, 244140625
3247 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
3248 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
3249 ; CHECK-P10-LE-NEXT: blr
3251 ; CHECK-P10-BE-LABEL: ld_align64_uint8_t_uint16_t:
3252 ; CHECK-P10-BE: # %bb.0: # %entry
3253 ; CHECK-P10-BE-NEXT: pli r4, 232
3254 ; CHECK-P10-BE-NEXT: pli r5, 3567587329
3255 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
3256 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
3257 ; CHECK-P10-BE-NEXT: blr
3259 ; CHECK-P9-LE-LABEL: ld_align64_uint8_t_uint16_t:
3260 ; CHECK-P9-LE: # %bb.0: # %entry
3261 ; CHECK-P9-LE-NEXT: lis r4, 3725
3262 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
3263 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
3264 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
3265 ; CHECK-P9-LE-NEXT: blr
3267 ; CHECK-P9-BE-LABEL: ld_align64_uint8_t_uint16_t:
3268 ; CHECK-P9-BE: # %bb.0: # %entry
3269 ; CHECK-P9-BE-NEXT: li r4, 29
3270 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
3271 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
3272 ; CHECK-P9-BE-NEXT: ori r4, r4, 4097
3273 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
3274 ; CHECK-P9-BE-NEXT: blr
3276 ; CHECK-P8-LE-LABEL: ld_align64_uint8_t_uint16_t:
3277 ; CHECK-P8-LE: # %bb.0: # %entry
3278 ; CHECK-P8-LE-NEXT: lis r4, 3725
3279 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
3280 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
3281 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
3282 ; CHECK-P8-LE-NEXT: blr
3284 ; CHECK-P8-BE-LABEL: ld_align64_uint8_t_uint16_t:
3285 ; CHECK-P8-BE: # %bb.0: # %entry
3286 ; CHECK-P8-BE-NEXT: li r4, 29
3287 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
3288 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
3289 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
3290 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
3291 ; CHECK-P8-BE-NEXT: blr
3293 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
3294 %0 = load i16, ptr %add.ptr, align 2
3295 %conv = trunc i16 %0 to i8
3299 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3300 define dso_local zeroext i8 @ld_reg_uint8_t_uint16_t(ptr nocapture readonly %ptr, i64 %off) {
3301 ; CHECK-LE-LABEL: ld_reg_uint8_t_uint16_t:
3302 ; CHECK-LE: # %bb.0: # %entry
3303 ; CHECK-LE-NEXT: lbzx r3, r3, r4
3304 ; CHECK-LE-NEXT: blr
3306 ; CHECK-BE-LABEL: ld_reg_uint8_t_uint16_t:
3307 ; CHECK-BE: # %bb.0: # %entry
3308 ; CHECK-BE-NEXT: add r3, r3, r4
3309 ; CHECK-BE-NEXT: lbz r3, 1(r3)
3310 ; CHECK-BE-NEXT: blr
3312 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
3313 %0 = load i16, ptr %add.ptr, align 2
3314 %conv = trunc i16 %0 to i8
3318 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3319 define dso_local zeroext i8 @ld_or_uint8_t_uint16_t(i64 %ptr, i8 zeroext %off) {
3320 ; CHECK-LE-LABEL: ld_or_uint8_t_uint16_t:
3321 ; CHECK-LE: # %bb.0: # %entry
3322 ; CHECK-LE-NEXT: or r3, r4, r3
3323 ; CHECK-LE-NEXT: lbz r3, 0(r3)
3324 ; CHECK-LE-NEXT: blr
3326 ; CHECK-BE-LABEL: ld_or_uint8_t_uint16_t:
3327 ; CHECK-BE: # %bb.0: # %entry
3328 ; CHECK-BE-NEXT: or r3, r4, r3
3329 ; CHECK-BE-NEXT: lbz r3, 1(r3)
3330 ; CHECK-BE-NEXT: blr
3332 %conv = zext i8 %off to i64
3333 %or = or i64 %conv, %ptr
3334 %0 = inttoptr i64 %or to ptr
3335 %1 = load i16, ptr %0, align 2
3336 %conv1 = trunc i16 %1 to i8
3340 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3341 define dso_local zeroext i8 @ld_not_disjoint16_uint8_t_uint16_t(i64 %ptr) {
3342 ; CHECK-LE-LABEL: ld_not_disjoint16_uint8_t_uint16_t:
3343 ; CHECK-LE: # %bb.0: # %entry
3344 ; CHECK-LE-NEXT: ori r3, r3, 6
3345 ; CHECK-LE-NEXT: lbz r3, 0(r3)
3346 ; CHECK-LE-NEXT: blr
3348 ; CHECK-BE-LABEL: ld_not_disjoint16_uint8_t_uint16_t:
3349 ; CHECK-BE: # %bb.0: # %entry
3350 ; CHECK-BE-NEXT: ori r3, r3, 6
3351 ; CHECK-BE-NEXT: lbz r3, 1(r3)
3352 ; CHECK-BE-NEXT: blr
3354 %or = or i64 %ptr, 6
3355 %0 = inttoptr i64 %or to ptr
3356 %1 = load i16, ptr %0, align 2
3357 %conv = trunc i16 %1 to i8
3361 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3362 define dso_local zeroext i8 @ld_disjoint_align16_uint8_t_uint16_t(i64 %ptr) {
3363 ; CHECK-LE-LABEL: ld_disjoint_align16_uint8_t_uint16_t:
3364 ; CHECK-LE: # %bb.0: # %entry
3365 ; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
3366 ; CHECK-LE-NEXT: lbz r3, 24(r3)
3367 ; CHECK-LE-NEXT: blr
3369 ; CHECK-BE-LABEL: ld_disjoint_align16_uint8_t_uint16_t:
3370 ; CHECK-BE: # %bb.0: # %entry
3371 ; CHECK-BE-NEXT: rldicr r3, r3, 0, 51
3372 ; CHECK-BE-NEXT: lbz r3, 25(r3)
3373 ; CHECK-BE-NEXT: blr
3375 %and = and i64 %ptr, -4096
3376 %or = or i64 %and, 24
3377 %0 = inttoptr i64 %or to ptr
3378 %1 = load i16, ptr %0, align 8
3379 %conv = trunc i16 %1 to i8
3383 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3384 define dso_local zeroext i8 @ld_not_disjoint32_uint8_t_uint16_t(i64 %ptr) {
3385 ; CHECK-LE-LABEL: ld_not_disjoint32_uint8_t_uint16_t:
3386 ; CHECK-LE: # %bb.0: # %entry
3387 ; CHECK-LE-NEXT: ori r3, r3, 34463
3388 ; CHECK-LE-NEXT: oris r3, r3, 1
3389 ; CHECK-LE-NEXT: lbz r3, 0(r3)
3390 ; CHECK-LE-NEXT: blr
3392 ; CHECK-BE-LABEL: ld_not_disjoint32_uint8_t_uint16_t:
3393 ; CHECK-BE: # %bb.0: # %entry
3394 ; CHECK-BE-NEXT: ori r3, r3, 34463
3395 ; CHECK-BE-NEXT: oris r3, r3, 1
3396 ; CHECK-BE-NEXT: lbz r3, 1(r3)
3397 ; CHECK-BE-NEXT: blr
3399 %or = or i64 %ptr, 99999
3400 %0 = inttoptr i64 %or to ptr
3401 %1 = load i16, ptr %0, align 2
3402 %conv = trunc i16 %1 to i8
3406 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3407 define dso_local zeroext i8 @ld_disjoint_align32_uint8_t_uint16_t(i64 %ptr) {
3408 ; CHECK-P10-LE-LABEL: ld_disjoint_align32_uint8_t_uint16_t:
3409 ; CHECK-P10-LE: # %bb.0: # %entry
3410 ; CHECK-P10-LE-NEXT: lis r4, -15264
3411 ; CHECK-P10-LE-NEXT: and r3, r3, r4
3412 ; CHECK-P10-LE-NEXT: plbz r3, 999990000(r3), 0
3413 ; CHECK-P10-LE-NEXT: blr
3415 ; CHECK-P10-BE-LABEL: ld_disjoint_align32_uint8_t_uint16_t:
3416 ; CHECK-P10-BE: # %bb.0: # %entry
3417 ; CHECK-P10-BE-NEXT: lis r4, -15264
3418 ; CHECK-P10-BE-NEXT: and r3, r3, r4
3419 ; CHECK-P10-BE-NEXT: plbz r3, 999990001(r3), 0
3420 ; CHECK-P10-BE-NEXT: blr
3422 ; CHECK-P9-LE-LABEL: ld_disjoint_align32_uint8_t_uint16_t:
3423 ; CHECK-P9-LE: # %bb.0: # %entry
3424 ; CHECK-P9-LE-NEXT: lis r4, -15264
3425 ; CHECK-P9-LE-NEXT: and r3, r3, r4
3426 ; CHECK-P9-LE-NEXT: lis r4, 15258
3427 ; CHECK-P9-LE-NEXT: ori r4, r4, 41712
3428 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
3429 ; CHECK-P9-LE-NEXT: blr
3431 ; CHECK-P9-BE-LABEL: ld_disjoint_align32_uint8_t_uint16_t:
3432 ; CHECK-P9-BE: # %bb.0: # %entry
3433 ; CHECK-P9-BE-NEXT: lis r4, -15264
3434 ; CHECK-P9-BE-NEXT: and r3, r3, r4
3435 ; CHECK-P9-BE-NEXT: lis r4, 15258
3436 ; CHECK-P9-BE-NEXT: ori r4, r4, 41713
3437 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
3438 ; CHECK-P9-BE-NEXT: blr
3440 ; CHECK-P8-LE-LABEL: ld_disjoint_align32_uint8_t_uint16_t:
3441 ; CHECK-P8-LE: # %bb.0: # %entry
3442 ; CHECK-P8-LE-NEXT: lis r4, -15264
3443 ; CHECK-P8-LE-NEXT: lis r5, 15258
3444 ; CHECK-P8-LE-NEXT: and r3, r3, r4
3445 ; CHECK-P8-LE-NEXT: ori r4, r5, 41712
3446 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
3447 ; CHECK-P8-LE-NEXT: blr
3449 ; CHECK-P8-BE-LABEL: ld_disjoint_align32_uint8_t_uint16_t:
3450 ; CHECK-P8-BE: # %bb.0: # %entry
3451 ; CHECK-P8-BE-NEXT: lis r4, -15264
3452 ; CHECK-P8-BE-NEXT: lis r5, 15258
3453 ; CHECK-P8-BE-NEXT: and r3, r3, r4
3454 ; CHECK-P8-BE-NEXT: ori r4, r5, 41713
3455 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
3456 ; CHECK-P8-BE-NEXT: blr
3458 %and = and i64 %ptr, -1000341504
3459 %or = or i64 %and, 999990000
3460 %0 = inttoptr i64 %or to ptr
3461 %1 = load i16, ptr %0, align 16
3462 %conv = trunc i16 %1 to i8
3466 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3467 define dso_local zeroext i8 @ld_not_disjoint64_uint8_t_uint16_t(i64 %ptr) {
3468 ; CHECK-P10-LE-LABEL: ld_not_disjoint64_uint8_t_uint16_t:
3469 ; CHECK-P10-LE: # %bb.0: # %entry
3470 ; CHECK-P10-LE-NEXT: pli r4, 232
3471 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
3472 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
3473 ; CHECK-P10-LE-NEXT: or r3, r3, r5
3474 ; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
3475 ; CHECK-P10-LE-NEXT: blr
3477 ; CHECK-P10-BE-LABEL: ld_not_disjoint64_uint8_t_uint16_t:
3478 ; CHECK-P10-BE: # %bb.0: # %entry
3479 ; CHECK-P10-BE-NEXT: pli r4, 232
3480 ; CHECK-P10-BE-NEXT: pli r5, 3567587329
3481 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
3482 ; CHECK-P10-BE-NEXT: or r3, r3, r5
3483 ; CHECK-P10-BE-NEXT: lbz r3, 1(r3)
3484 ; CHECK-P10-BE-NEXT: blr
3486 ; CHECK-P9-LE-LABEL: ld_not_disjoint64_uint8_t_uint16_t:
3487 ; CHECK-P9-LE: # %bb.0: # %entry
3488 ; CHECK-P9-LE-NEXT: li r4, 29
3489 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
3490 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
3491 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
3492 ; CHECK-P9-LE-NEXT: or r3, r3, r4
3493 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
3494 ; CHECK-P9-LE-NEXT: blr
3496 ; CHECK-P9-BE-LABEL: ld_not_disjoint64_uint8_t_uint16_t:
3497 ; CHECK-P9-BE: # %bb.0: # %entry
3498 ; CHECK-P9-BE-NEXT: li r4, 29
3499 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
3500 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
3501 ; CHECK-P9-BE-NEXT: ori r4, r4, 4097
3502 ; CHECK-P9-BE-NEXT: or r3, r3, r4
3503 ; CHECK-P9-BE-NEXT: lbz r3, 1(r3)
3504 ; CHECK-P9-BE-NEXT: blr
3506 ; CHECK-P8-LE-LABEL: ld_not_disjoint64_uint8_t_uint16_t:
3507 ; CHECK-P8-LE: # %bb.0: # %entry
3508 ; CHECK-P8-LE-NEXT: li r4, 29
3509 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
3510 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
3511 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
3512 ; CHECK-P8-LE-NEXT: or r3, r3, r4
3513 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
3514 ; CHECK-P8-LE-NEXT: blr
3516 ; CHECK-P8-BE-LABEL: ld_not_disjoint64_uint8_t_uint16_t:
3517 ; CHECK-P8-BE: # %bb.0: # %entry
3518 ; CHECK-P8-BE-NEXT: li r4, 29
3519 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
3520 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
3521 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
3522 ; CHECK-P8-BE-NEXT: or r3, r3, r4
3523 ; CHECK-P8-BE-NEXT: lbz r3, 1(r3)
3524 ; CHECK-P8-BE-NEXT: blr
3526 %or = or i64 %ptr, 1000000000001
3527 %0 = inttoptr i64 %or to ptr
3528 %1 = load i16, ptr %0, align 2
3529 %conv = trunc i16 %1 to i8
3533 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3534 define dso_local zeroext i8 @ld_disjoint_unalign64_uint8_t_uint16_t(i64 %ptr) {
3535 ; CHECK-P10-LE-LABEL: ld_disjoint_unalign64_uint8_t_uint16_t:
3536 ; CHECK-P10-LE: # %bb.0: # %entry
3537 ; CHECK-P10-LE-NEXT: pli r4, 232
3538 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
3539 ; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
3540 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
3541 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r5
3542 ; CHECK-P10-LE-NEXT: blr
3544 ; CHECK-P10-BE-LABEL: ld_disjoint_unalign64_uint8_t_uint16_t:
3545 ; CHECK-P10-BE: # %bb.0: # %entry
3546 ; CHECK-P10-BE-NEXT: pli r4, 232
3547 ; CHECK-P10-BE-NEXT: pli r5, 3567587330
3548 ; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
3549 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
3550 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
3551 ; CHECK-P10-BE-NEXT: blr
3553 ; CHECK-P9-LE-LABEL: ld_disjoint_unalign64_uint8_t_uint16_t:
3554 ; CHECK-P9-LE: # %bb.0: # %entry
3555 ; CHECK-P9-LE-NEXT: li r4, 29
3556 ; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
3557 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
3558 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
3559 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
3560 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
3561 ; CHECK-P9-LE-NEXT: blr
3563 ; CHECK-P9-BE-LABEL: ld_disjoint_unalign64_uint8_t_uint16_t:
3564 ; CHECK-P9-BE: # %bb.0: # %entry
3565 ; CHECK-P9-BE-NEXT: li r4, 29
3566 ; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
3567 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
3568 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
3569 ; CHECK-P9-BE-NEXT: ori r4, r4, 4098
3570 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
3571 ; CHECK-P9-BE-NEXT: blr
3573 ; CHECK-P8-LE-LABEL: ld_disjoint_unalign64_uint8_t_uint16_t:
3574 ; CHECK-P8-LE: # %bb.0: # %entry
3575 ; CHECK-P8-LE-NEXT: li r4, 29
3576 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
3577 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
3578 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
3579 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
3580 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
3581 ; CHECK-P8-LE-NEXT: blr
3583 ; CHECK-P8-BE-LABEL: ld_disjoint_unalign64_uint8_t_uint16_t:
3584 ; CHECK-P8-BE: # %bb.0: # %entry
3585 ; CHECK-P8-BE-NEXT: li r4, 29
3586 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
3587 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
3588 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
3589 ; CHECK-P8-BE-NEXT: ori r4, r4, 4098
3590 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
3591 ; CHECK-P8-BE-NEXT: blr
3593 %and = and i64 %ptr, -1099511627776
3594 %or = or i64 %and, 1000000000001
3595 %0 = inttoptr i64 %or to ptr
3596 %1 = load i16, ptr %0, align 2
3597 %conv = trunc i16 %1 to i8
3601 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3602 define dso_local zeroext i8 @ld_disjoint_align64_uint8_t_uint16_t(i64 %ptr) {
3603 ; CHECK-P10-LE-LABEL: ld_disjoint_align64_uint8_t_uint16_t:
3604 ; CHECK-P10-LE: # %bb.0: # %entry
3605 ; CHECK-P10-LE-NEXT: pli r4, 244140625
3606 ; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
3607 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
3608 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
3609 ; CHECK-P10-LE-NEXT: blr
3611 ; CHECK-P10-BE-LABEL: ld_disjoint_align64_uint8_t_uint16_t:
3612 ; CHECK-P10-BE: # %bb.0: # %entry
3613 ; CHECK-P10-BE-NEXT: pli r4, 232
3614 ; CHECK-P10-BE-NEXT: pli r5, 3567587329
3615 ; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
3616 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
3617 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
3618 ; CHECK-P10-BE-NEXT: blr
3620 ; CHECK-P9-LE-LABEL: ld_disjoint_align64_uint8_t_uint16_t:
3621 ; CHECK-P9-LE: # %bb.0: # %entry
3622 ; CHECK-P9-LE-NEXT: lis r4, 3725
3623 ; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
3624 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
3625 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
3626 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
3627 ; CHECK-P9-LE-NEXT: blr
3629 ; CHECK-P9-BE-LABEL: ld_disjoint_align64_uint8_t_uint16_t:
3630 ; CHECK-P9-BE: # %bb.0: # %entry
3631 ; CHECK-P9-BE-NEXT: li r4, 29
3632 ; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
3633 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
3634 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
3635 ; CHECK-P9-BE-NEXT: ori r4, r4, 4097
3636 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
3637 ; CHECK-P9-BE-NEXT: blr
3639 ; CHECK-P8-LE-LABEL: ld_disjoint_align64_uint8_t_uint16_t:
3640 ; CHECK-P8-LE: # %bb.0: # %entry
3641 ; CHECK-P8-LE-NEXT: lis r4, 3725
3642 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
3643 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
3644 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
3645 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
3646 ; CHECK-P8-LE-NEXT: blr
3648 ; CHECK-P8-BE-LABEL: ld_disjoint_align64_uint8_t_uint16_t:
3649 ; CHECK-P8-BE: # %bb.0: # %entry
3650 ; CHECK-P8-BE-NEXT: li r4, 29
3651 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
3652 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
3653 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
3654 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
3655 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
3656 ; CHECK-P8-BE-NEXT: blr
3658 %and = and i64 %ptr, -1099511627776
3659 %or = or i64 %and, 1000000000000
3660 %0 = inttoptr i64 %or to ptr
3661 %1 = load i16, ptr %0, align 4096
3662 %conv = trunc i16 %1 to i8
3666 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3667 define dso_local zeroext i8 @ld_cst_align16_uint8_t_uint16_t() {
3668 ; CHECK-LE-LABEL: ld_cst_align16_uint8_t_uint16_t:
3669 ; CHECK-LE: # %bb.0: # %entry
3670 ; CHECK-LE-NEXT: lbz r3, 4080(0)
3671 ; CHECK-LE-NEXT: blr
3673 ; CHECK-BE-LABEL: ld_cst_align16_uint8_t_uint16_t:
3674 ; CHECK-BE: # %bb.0: # %entry
3675 ; CHECK-BE-NEXT: lbz r3, 4081(0)
3676 ; CHECK-BE-NEXT: blr
3678 %0 = load i16, ptr inttoptr (i64 4080 to ptr), align 16
3679 %conv = trunc i16 %0 to i8
3683 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3684 define dso_local zeroext i8 @ld_cst_align32_uint8_t_uint16_t() {
3685 ; CHECK-LE-LABEL: ld_cst_align32_uint8_t_uint16_t:
3686 ; CHECK-LE: # %bb.0: # %entry
3687 ; CHECK-LE-NEXT: lis r3, 153
3688 ; CHECK-LE-NEXT: lbz r3, -27108(r3)
3689 ; CHECK-LE-NEXT: blr
3691 ; CHECK-BE-LABEL: ld_cst_align32_uint8_t_uint16_t:
3692 ; CHECK-BE: # %bb.0: # %entry
3693 ; CHECK-BE-NEXT: lis r3, 153
3694 ; CHECK-BE-NEXT: lbz r3, -27107(r3)
3695 ; CHECK-BE-NEXT: blr
3697 %0 = load i16, ptr inttoptr (i64 9999900 to ptr), align 4
3698 %conv = trunc i16 %0 to i8
3702 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3703 define dso_local zeroext i8 @ld_cst_unalign64_uint8_t_uint16_t() {
3704 ; CHECK-P10-LE-LABEL: ld_cst_unalign64_uint8_t_uint16_t:
3705 ; CHECK-P10-LE: # %bb.0: # %entry
3706 ; CHECK-P10-LE-NEXT: pli r3, 232
3707 ; CHECK-P10-LE-NEXT: pli r4, 3567587329
3708 ; CHECK-P10-LE-NEXT: rldimi r4, r3, 32, 0
3709 ; CHECK-P10-LE-NEXT: lbz r3, 0(r4)
3710 ; CHECK-P10-LE-NEXT: blr
3712 ; CHECK-P10-BE-LABEL: ld_cst_unalign64_uint8_t_uint16_t:
3713 ; CHECK-P10-BE: # %bb.0: # %entry
3714 ; CHECK-P10-BE-NEXT: pli r3, 232
3715 ; CHECK-P10-BE-NEXT: pli r4, 3567587330
3716 ; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
3717 ; CHECK-P10-BE-NEXT: lbz r3, 0(r4)
3718 ; CHECK-P10-BE-NEXT: blr
3720 ; CHECK-P9-LE-LABEL: ld_cst_unalign64_uint8_t_uint16_t:
3721 ; CHECK-P9-LE: # %bb.0: # %entry
3722 ; CHECK-P9-LE-NEXT: li r3, 29
3723 ; CHECK-P9-LE-NEXT: rldic r3, r3, 35, 24
3724 ; CHECK-P9-LE-NEXT: oris r3, r3, 54437
3725 ; CHECK-P9-LE-NEXT: ori r3, r3, 4097
3726 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
3727 ; CHECK-P9-LE-NEXT: blr
3729 ; CHECK-P9-BE-LABEL: ld_cst_unalign64_uint8_t_uint16_t:
3730 ; CHECK-P9-BE: # %bb.0: # %entry
3731 ; CHECK-P9-BE-NEXT: li r3, 29
3732 ; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
3733 ; CHECK-P9-BE-NEXT: oris r3, r3, 54437
3734 ; CHECK-P9-BE-NEXT: ori r3, r3, 4098
3735 ; CHECK-P9-BE-NEXT: lbz r3, 0(r3)
3736 ; CHECK-P9-BE-NEXT: blr
3738 ; CHECK-P8-LE-LABEL: ld_cst_unalign64_uint8_t_uint16_t:
3739 ; CHECK-P8-LE: # %bb.0: # %entry
3740 ; CHECK-P8-LE-NEXT: li r3, 29
3741 ; CHECK-P8-LE-NEXT: rldic r3, r3, 35, 24
3742 ; CHECK-P8-LE-NEXT: oris r3, r3, 54437
3743 ; CHECK-P8-LE-NEXT: ori r3, r3, 4097
3744 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
3745 ; CHECK-P8-LE-NEXT: blr
3747 ; CHECK-P8-BE-LABEL: ld_cst_unalign64_uint8_t_uint16_t:
3748 ; CHECK-P8-BE: # %bb.0: # %entry
3749 ; CHECK-P8-BE-NEXT: li r3, 29
3750 ; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
3751 ; CHECK-P8-BE-NEXT: oris r3, r3, 54437
3752 ; CHECK-P8-BE-NEXT: ori r3, r3, 4098
3753 ; CHECK-P8-BE-NEXT: lbz r3, 0(r3)
3754 ; CHECK-P8-BE-NEXT: blr
3756 %0 = load i16, ptr inttoptr (i64 1000000000001 to ptr), align 2
3757 %conv = trunc i16 %0 to i8
3761 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3762 define dso_local zeroext i8 @ld_cst_align64_uint8_t_uint16_t() {
3763 ; CHECK-P10-LE-LABEL: ld_cst_align64_uint8_t_uint16_t:
3764 ; CHECK-P10-LE: # %bb.0: # %entry
3765 ; CHECK-P10-LE-NEXT: pli r3, 244140625
3766 ; CHECK-P10-LE-NEXT: rldic r3, r3, 12, 24
3767 ; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
3768 ; CHECK-P10-LE-NEXT: blr
3770 ; CHECK-P10-BE-LABEL: ld_cst_align64_uint8_t_uint16_t:
3771 ; CHECK-P10-BE: # %bb.0: # %entry
3772 ; CHECK-P10-BE-NEXT: pli r3, 232
3773 ; CHECK-P10-BE-NEXT: pli r4, 3567587329
3774 ; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
3775 ; CHECK-P10-BE-NEXT: lbz r3, 0(r4)
3776 ; CHECK-P10-BE-NEXT: blr
3778 ; CHECK-P9-LE-LABEL: ld_cst_align64_uint8_t_uint16_t:
3779 ; CHECK-P9-LE: # %bb.0: # %entry
3780 ; CHECK-P9-LE-NEXT: lis r3, 3725
3781 ; CHECK-P9-LE-NEXT: ori r3, r3, 19025
3782 ; CHECK-P9-LE-NEXT: rldic r3, r3, 12, 24
3783 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
3784 ; CHECK-P9-LE-NEXT: blr
3786 ; CHECK-P9-BE-LABEL: ld_cst_align64_uint8_t_uint16_t:
3787 ; CHECK-P9-BE: # %bb.0: # %entry
3788 ; CHECK-P9-BE-NEXT: li r3, 29
3789 ; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
3790 ; CHECK-P9-BE-NEXT: oris r3, r3, 54437
3791 ; CHECK-P9-BE-NEXT: ori r3, r3, 4097
3792 ; CHECK-P9-BE-NEXT: lbz r3, 0(r3)
3793 ; CHECK-P9-BE-NEXT: blr
3795 ; CHECK-P8-LE-LABEL: ld_cst_align64_uint8_t_uint16_t:
3796 ; CHECK-P8-LE: # %bb.0: # %entry
3797 ; CHECK-P8-LE-NEXT: lis r3, 3725
3798 ; CHECK-P8-LE-NEXT: ori r3, r3, 19025
3799 ; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
3800 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
3801 ; CHECK-P8-LE-NEXT: blr
3803 ; CHECK-P8-BE-LABEL: ld_cst_align64_uint8_t_uint16_t:
3804 ; CHECK-P8-BE: # %bb.0: # %entry
3805 ; CHECK-P8-BE-NEXT: li r3, 29
3806 ; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
3807 ; CHECK-P8-BE-NEXT: oris r3, r3, 54437
3808 ; CHECK-P8-BE-NEXT: ori r3, r3, 4097
3809 ; CHECK-P8-BE-NEXT: lbz r3, 0(r3)
3810 ; CHECK-P8-BE-NEXT: blr
3812 %0 = load i16, ptr inttoptr (i64 1000000000000 to ptr), align 4096
3813 %conv = trunc i16 %0 to i8
3817 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3818 define dso_local zeroext i8 @ld_0_uint8_t_uint32_t(i64 %ptr) {
3819 ; CHECK-LE-LABEL: ld_0_uint8_t_uint32_t:
3820 ; CHECK-LE: # %bb.0: # %entry
3821 ; CHECK-LE-NEXT: lbz r3, 0(r3)
3822 ; CHECK-LE-NEXT: blr
3824 ; CHECK-BE-LABEL: ld_0_uint8_t_uint32_t:
3825 ; CHECK-BE: # %bb.0: # %entry
3826 ; CHECK-BE-NEXT: lbz r3, 3(r3)
3827 ; CHECK-BE-NEXT: blr
3829 %0 = inttoptr i64 %ptr to ptr
3830 %1 = load i32, ptr %0, align 4
3831 %conv = trunc i32 %1 to i8
3835 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3836 define dso_local zeroext i8 @ld_align16_uint8_t_uint32_t(ptr nocapture readonly %ptr) {
3837 ; CHECK-LE-LABEL: ld_align16_uint8_t_uint32_t:
3838 ; CHECK-LE: # %bb.0: # %entry
3839 ; CHECK-LE-NEXT: lbz r3, 8(r3)
3840 ; CHECK-LE-NEXT: blr
3842 ; CHECK-BE-LABEL: ld_align16_uint8_t_uint32_t:
3843 ; CHECK-BE: # %bb.0: # %entry
3844 ; CHECK-BE-NEXT: lbz r3, 11(r3)
3845 ; CHECK-BE-NEXT: blr
3847 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
3848 %0 = load i32, ptr %add.ptr, align 4
3849 %conv = trunc i32 %0 to i8
3853 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3854 define dso_local zeroext i8 @ld_align32_uint8_t_uint32_t(ptr nocapture readonly %ptr) {
3855 ; CHECK-P10-LE-LABEL: ld_align32_uint8_t_uint32_t:
3856 ; CHECK-P10-LE: # %bb.0: # %entry
3857 ; CHECK-P10-LE-NEXT: plbz r3, 99999000(r3), 0
3858 ; CHECK-P10-LE-NEXT: blr
3860 ; CHECK-P10-BE-LABEL: ld_align32_uint8_t_uint32_t:
3861 ; CHECK-P10-BE: # %bb.0: # %entry
3862 ; CHECK-P10-BE-NEXT: plbz r3, 99999003(r3), 0
3863 ; CHECK-P10-BE-NEXT: blr
3865 ; CHECK-P9-LE-LABEL: ld_align32_uint8_t_uint32_t:
3866 ; CHECK-P9-LE: # %bb.0: # %entry
3867 ; CHECK-P9-LE-NEXT: lis r4, 1525
3868 ; CHECK-P9-LE-NEXT: ori r4, r4, 56600
3869 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
3870 ; CHECK-P9-LE-NEXT: blr
3872 ; CHECK-P9-BE-LABEL: ld_align32_uint8_t_uint32_t:
3873 ; CHECK-P9-BE: # %bb.0: # %entry
3874 ; CHECK-P9-BE-NEXT: lis r4, 1525
3875 ; CHECK-P9-BE-NEXT: ori r4, r4, 56603
3876 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
3877 ; CHECK-P9-BE-NEXT: blr
3879 ; CHECK-P8-LE-LABEL: ld_align32_uint8_t_uint32_t:
3880 ; CHECK-P8-LE: # %bb.0: # %entry
3881 ; CHECK-P8-LE-NEXT: lis r4, 1525
3882 ; CHECK-P8-LE-NEXT: ori r4, r4, 56600
3883 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
3884 ; CHECK-P8-LE-NEXT: blr
3886 ; CHECK-P8-BE-LABEL: ld_align32_uint8_t_uint32_t:
3887 ; CHECK-P8-BE: # %bb.0: # %entry
3888 ; CHECK-P8-BE-NEXT: lis r4, 1525
3889 ; CHECK-P8-BE-NEXT: ori r4, r4, 56603
3890 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
3891 ; CHECK-P8-BE-NEXT: blr
3893 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
3894 %0 = load i32, ptr %add.ptr, align 4
3895 %conv = trunc i32 %0 to i8
3899 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3900 define dso_local zeroext i8 @ld_unalign64_uint8_t_uint32_t(ptr nocapture readonly %ptr) {
3901 ; CHECK-P10-LE-LABEL: ld_unalign64_uint8_t_uint32_t:
3902 ; CHECK-P10-LE: # %bb.0: # %entry
3903 ; CHECK-P10-LE-NEXT: pli r4, 232
3904 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
3905 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
3906 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r5
3907 ; CHECK-P10-LE-NEXT: blr
3909 ; CHECK-P10-BE-LABEL: ld_unalign64_uint8_t_uint32_t:
3910 ; CHECK-P10-BE: # %bb.0: # %entry
3911 ; CHECK-P10-BE-NEXT: pli r4, 232
3912 ; CHECK-P10-BE-NEXT: pli r5, 3567587332
3913 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
3914 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
3915 ; CHECK-P10-BE-NEXT: blr
3917 ; CHECK-P9-LE-LABEL: ld_unalign64_uint8_t_uint32_t:
3918 ; CHECK-P9-LE: # %bb.0: # %entry
3919 ; CHECK-P9-LE-NEXT: li r4, 29
3920 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
3921 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
3922 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
3923 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
3924 ; CHECK-P9-LE-NEXT: blr
3926 ; CHECK-P9-BE-LABEL: ld_unalign64_uint8_t_uint32_t:
3927 ; CHECK-P9-BE: # %bb.0: # %entry
3928 ; CHECK-P9-BE-NEXT: li r4, 29
3929 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
3930 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
3931 ; CHECK-P9-BE-NEXT: ori r4, r4, 4100
3932 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
3933 ; CHECK-P9-BE-NEXT: blr
3935 ; CHECK-P8-LE-LABEL: ld_unalign64_uint8_t_uint32_t:
3936 ; CHECK-P8-LE: # %bb.0: # %entry
3937 ; CHECK-P8-LE-NEXT: li r4, 29
3938 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
3939 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
3940 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
3941 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
3942 ; CHECK-P8-LE-NEXT: blr
3944 ; CHECK-P8-BE-LABEL: ld_unalign64_uint8_t_uint32_t:
3945 ; CHECK-P8-BE: # %bb.0: # %entry
3946 ; CHECK-P8-BE-NEXT: li r4, 29
3947 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
3948 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
3949 ; CHECK-P8-BE-NEXT: ori r4, r4, 4100
3950 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
3951 ; CHECK-P8-BE-NEXT: blr
3953 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000001
3954 %0 = load i32, ptr %add.ptr, align 4
3955 %conv = trunc i32 %0 to i8
3959 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3960 define dso_local zeroext i8 @ld_align64_uint8_t_uint32_t(ptr nocapture readonly %ptr) {
3961 ; CHECK-P10-LE-LABEL: ld_align64_uint8_t_uint32_t:
3962 ; CHECK-P10-LE: # %bb.0: # %entry
3963 ; CHECK-P10-LE-NEXT: pli r4, 244140625
3964 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
3965 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
3966 ; CHECK-P10-LE-NEXT: blr
3968 ; CHECK-P10-BE-LABEL: ld_align64_uint8_t_uint32_t:
3969 ; CHECK-P10-BE: # %bb.0: # %entry
3970 ; CHECK-P10-BE-NEXT: pli r4, 232
3971 ; CHECK-P10-BE-NEXT: pli r5, 3567587331
3972 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
3973 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
3974 ; CHECK-P10-BE-NEXT: blr
3976 ; CHECK-P9-LE-LABEL: ld_align64_uint8_t_uint32_t:
3977 ; CHECK-P9-LE: # %bb.0: # %entry
3978 ; CHECK-P9-LE-NEXT: lis r4, 3725
3979 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
3980 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
3981 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
3982 ; CHECK-P9-LE-NEXT: blr
3984 ; CHECK-P9-BE-LABEL: ld_align64_uint8_t_uint32_t:
3985 ; CHECK-P9-BE: # %bb.0: # %entry
3986 ; CHECK-P9-BE-NEXT: li r4, 29
3987 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
3988 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
3989 ; CHECK-P9-BE-NEXT: ori r4, r4, 4099
3990 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
3991 ; CHECK-P9-BE-NEXT: blr
3993 ; CHECK-P8-LE-LABEL: ld_align64_uint8_t_uint32_t:
3994 ; CHECK-P8-LE: # %bb.0: # %entry
3995 ; CHECK-P8-LE-NEXT: lis r4, 3725
3996 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
3997 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
3998 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
3999 ; CHECK-P8-LE-NEXT: blr
4001 ; CHECK-P8-BE-LABEL: ld_align64_uint8_t_uint32_t:
4002 ; CHECK-P8-BE: # %bb.0: # %entry
4003 ; CHECK-P8-BE-NEXT: li r4, 29
4004 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
4005 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
4006 ; CHECK-P8-BE-NEXT: ori r4, r4, 4099
4007 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
4008 ; CHECK-P8-BE-NEXT: blr
4010 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
4011 %0 = load i32, ptr %add.ptr, align 4
4012 %conv = trunc i32 %0 to i8
4016 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4017 define dso_local zeroext i8 @ld_reg_uint8_t_uint32_t(ptr nocapture readonly %ptr, i64 %off) {
4018 ; CHECK-LE-LABEL: ld_reg_uint8_t_uint32_t:
4019 ; CHECK-LE: # %bb.0: # %entry
4020 ; CHECK-LE-NEXT: lbzx r3, r3, r4
4021 ; CHECK-LE-NEXT: blr
4023 ; CHECK-BE-LABEL: ld_reg_uint8_t_uint32_t:
4024 ; CHECK-BE: # %bb.0: # %entry
4025 ; CHECK-BE-NEXT: add r3, r3, r4
4026 ; CHECK-BE-NEXT: lbz r3, 3(r3)
4027 ; CHECK-BE-NEXT: blr
4029 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
4030 %0 = load i32, ptr %add.ptr, align 4
4031 %conv = trunc i32 %0 to i8
4035 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4036 define dso_local zeroext i8 @ld_or_uint8_t_uint32_t(i64 %ptr, i8 zeroext %off) {
4037 ; CHECK-LE-LABEL: ld_or_uint8_t_uint32_t:
4038 ; CHECK-LE: # %bb.0: # %entry
4039 ; CHECK-LE-NEXT: or r3, r4, r3
4040 ; CHECK-LE-NEXT: lbz r3, 0(r3)
4041 ; CHECK-LE-NEXT: blr
4043 ; CHECK-BE-LABEL: ld_or_uint8_t_uint32_t:
4044 ; CHECK-BE: # %bb.0: # %entry
4045 ; CHECK-BE-NEXT: or r3, r4, r3
4046 ; CHECK-BE-NEXT: lbz r3, 3(r3)
4047 ; CHECK-BE-NEXT: blr
4049 %conv = zext i8 %off to i64
4050 %or = or i64 %conv, %ptr
4051 %0 = inttoptr i64 %or to ptr
4052 %1 = load i32, ptr %0, align 4
4053 %conv1 = trunc i32 %1 to i8
4057 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4058 define dso_local zeroext i8 @ld_not_disjoint16_uint8_t_uint32_t(i64 %ptr) {
4059 ; CHECK-LE-LABEL: ld_not_disjoint16_uint8_t_uint32_t:
4060 ; CHECK-LE: # %bb.0: # %entry
4061 ; CHECK-LE-NEXT: ori r3, r3, 6
4062 ; CHECK-LE-NEXT: lbz r3, 0(r3)
4063 ; CHECK-LE-NEXT: blr
4065 ; CHECK-BE-LABEL: ld_not_disjoint16_uint8_t_uint32_t:
4066 ; CHECK-BE: # %bb.0: # %entry
4067 ; CHECK-BE-NEXT: ori r3, r3, 6
4068 ; CHECK-BE-NEXT: lbz r3, 3(r3)
4069 ; CHECK-BE-NEXT: blr
4071 %or = or i64 %ptr, 6
4072 %0 = inttoptr i64 %or to ptr
4073 %1 = load i32, ptr %0, align 4
4074 %conv = trunc i32 %1 to i8
4078 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4079 define dso_local zeroext i8 @ld_disjoint_align16_uint8_t_uint32_t(i64 %ptr) {
4080 ; CHECK-LE-LABEL: ld_disjoint_align16_uint8_t_uint32_t:
4081 ; CHECK-LE: # %bb.0: # %entry
4082 ; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
4083 ; CHECK-LE-NEXT: lbz r3, 24(r3)
4084 ; CHECK-LE-NEXT: blr
4086 ; CHECK-BE-LABEL: ld_disjoint_align16_uint8_t_uint32_t:
4087 ; CHECK-BE: # %bb.0: # %entry
4088 ; CHECK-BE-NEXT: rldicr r3, r3, 0, 51
4089 ; CHECK-BE-NEXT: lbz r3, 27(r3)
4090 ; CHECK-BE-NEXT: blr
4092 %and = and i64 %ptr, -4096
4093 %or = or i64 %and, 24
4094 %0 = inttoptr i64 %or to ptr
4095 %1 = load i32, ptr %0, align 8
4096 %conv = trunc i32 %1 to i8
4100 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4101 define dso_local zeroext i8 @ld_not_disjoint32_uint8_t_uint32_t(i64 %ptr) {
4102 ; CHECK-LE-LABEL: ld_not_disjoint32_uint8_t_uint32_t:
4103 ; CHECK-LE: # %bb.0: # %entry
4104 ; CHECK-LE-NEXT: ori r3, r3, 34463
4105 ; CHECK-LE-NEXT: oris r3, r3, 1
4106 ; CHECK-LE-NEXT: lbz r3, 0(r3)
4107 ; CHECK-LE-NEXT: blr
4109 ; CHECK-BE-LABEL: ld_not_disjoint32_uint8_t_uint32_t:
4110 ; CHECK-BE: # %bb.0: # %entry
4111 ; CHECK-BE-NEXT: ori r3, r3, 34463
4112 ; CHECK-BE-NEXT: oris r3, r3, 1
4113 ; CHECK-BE-NEXT: lbz r3, 3(r3)
4114 ; CHECK-BE-NEXT: blr
4116 %or = or i64 %ptr, 99999
4117 %0 = inttoptr i64 %or to ptr
4118 %1 = load i32, ptr %0, align 4
4119 %conv = trunc i32 %1 to i8
4123 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4124 define dso_local zeroext i8 @ld_disjoint_align32_uint8_t_uint32_t(i64 %ptr) {
4125 ; CHECK-P10-LE-LABEL: ld_disjoint_align32_uint8_t_uint32_t:
4126 ; CHECK-P10-LE: # %bb.0: # %entry
4127 ; CHECK-P10-LE-NEXT: lis r4, -15264
4128 ; CHECK-P10-LE-NEXT: and r3, r3, r4
4129 ; CHECK-P10-LE-NEXT: plbz r3, 999990000(r3), 0
4130 ; CHECK-P10-LE-NEXT: blr
4132 ; CHECK-P10-BE-LABEL: ld_disjoint_align32_uint8_t_uint32_t:
4133 ; CHECK-P10-BE: # %bb.0: # %entry
4134 ; CHECK-P10-BE-NEXT: lis r4, -15264
4135 ; CHECK-P10-BE-NEXT: and r3, r3, r4
4136 ; CHECK-P10-BE-NEXT: plbz r3, 999990003(r3), 0
4137 ; CHECK-P10-BE-NEXT: blr
4139 ; CHECK-P9-LE-LABEL: ld_disjoint_align32_uint8_t_uint32_t:
4140 ; CHECK-P9-LE: # %bb.0: # %entry
4141 ; CHECK-P9-LE-NEXT: lis r4, -15264
4142 ; CHECK-P9-LE-NEXT: and r3, r3, r4
4143 ; CHECK-P9-LE-NEXT: lis r4, 15258
4144 ; CHECK-P9-LE-NEXT: ori r4, r4, 41712
4145 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
4146 ; CHECK-P9-LE-NEXT: blr
4148 ; CHECK-P9-BE-LABEL: ld_disjoint_align32_uint8_t_uint32_t:
4149 ; CHECK-P9-BE: # %bb.0: # %entry
4150 ; CHECK-P9-BE-NEXT: lis r4, -15264
4151 ; CHECK-P9-BE-NEXT: and r3, r3, r4
4152 ; CHECK-P9-BE-NEXT: lis r4, 15258
4153 ; CHECK-P9-BE-NEXT: ori r4, r4, 41715
4154 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
4155 ; CHECK-P9-BE-NEXT: blr
4157 ; CHECK-P8-LE-LABEL: ld_disjoint_align32_uint8_t_uint32_t:
4158 ; CHECK-P8-LE: # %bb.0: # %entry
4159 ; CHECK-P8-LE-NEXT: lis r4, -15264
4160 ; CHECK-P8-LE-NEXT: lis r5, 15258
4161 ; CHECK-P8-LE-NEXT: and r3, r3, r4
4162 ; CHECK-P8-LE-NEXT: ori r4, r5, 41712
4163 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
4164 ; CHECK-P8-LE-NEXT: blr
4166 ; CHECK-P8-BE-LABEL: ld_disjoint_align32_uint8_t_uint32_t:
4167 ; CHECK-P8-BE: # %bb.0: # %entry
4168 ; CHECK-P8-BE-NEXT: lis r4, -15264
4169 ; CHECK-P8-BE-NEXT: lis r5, 15258
4170 ; CHECK-P8-BE-NEXT: and r3, r3, r4
4171 ; CHECK-P8-BE-NEXT: ori r4, r5, 41715
4172 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
4173 ; CHECK-P8-BE-NEXT: blr
4175 %and = and i64 %ptr, -1000341504
4176 %or = or i64 %and, 999990000
4177 %0 = inttoptr i64 %or to ptr
4178 %1 = load i32, ptr %0, align 16
4179 %conv = trunc i32 %1 to i8
4183 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4184 define dso_local zeroext i8 @ld_not_disjoint64_uint8_t_uint32_t(i64 %ptr) {
4185 ; CHECK-P10-LE-LABEL: ld_not_disjoint64_uint8_t_uint32_t:
4186 ; CHECK-P10-LE: # %bb.0: # %entry
4187 ; CHECK-P10-LE-NEXT: pli r4, 232
4188 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
4189 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
4190 ; CHECK-P10-LE-NEXT: or r3, r3, r5
4191 ; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
4192 ; CHECK-P10-LE-NEXT: blr
4194 ; CHECK-P10-BE-LABEL: ld_not_disjoint64_uint8_t_uint32_t:
4195 ; CHECK-P10-BE: # %bb.0: # %entry
4196 ; CHECK-P10-BE-NEXT: pli r4, 232
4197 ; CHECK-P10-BE-NEXT: pli r5, 3567587329
4198 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
4199 ; CHECK-P10-BE-NEXT: or r3, r3, r5
4200 ; CHECK-P10-BE-NEXT: lbz r3, 3(r3)
4201 ; CHECK-P10-BE-NEXT: blr
4203 ; CHECK-P9-LE-LABEL: ld_not_disjoint64_uint8_t_uint32_t:
4204 ; CHECK-P9-LE: # %bb.0: # %entry
4205 ; CHECK-P9-LE-NEXT: li r4, 29
4206 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
4207 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
4208 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
4209 ; CHECK-P9-LE-NEXT: or r3, r3, r4
4210 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
4211 ; CHECK-P9-LE-NEXT: blr
4213 ; CHECK-P9-BE-LABEL: ld_not_disjoint64_uint8_t_uint32_t:
4214 ; CHECK-P9-BE: # %bb.0: # %entry
4215 ; CHECK-P9-BE-NEXT: li r4, 29
4216 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
4217 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
4218 ; CHECK-P9-BE-NEXT: ori r4, r4, 4097
4219 ; CHECK-P9-BE-NEXT: or r3, r3, r4
4220 ; CHECK-P9-BE-NEXT: lbz r3, 3(r3)
4221 ; CHECK-P9-BE-NEXT: blr
4223 ; CHECK-P8-LE-LABEL: ld_not_disjoint64_uint8_t_uint32_t:
4224 ; CHECK-P8-LE: # %bb.0: # %entry
4225 ; CHECK-P8-LE-NEXT: li r4, 29
4226 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
4227 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
4228 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
4229 ; CHECK-P8-LE-NEXT: or r3, r3, r4
4230 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
4231 ; CHECK-P8-LE-NEXT: blr
4233 ; CHECK-P8-BE-LABEL: ld_not_disjoint64_uint8_t_uint32_t:
4234 ; CHECK-P8-BE: # %bb.0: # %entry
4235 ; CHECK-P8-BE-NEXT: li r4, 29
4236 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
4237 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
4238 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
4239 ; CHECK-P8-BE-NEXT: or r3, r3, r4
4240 ; CHECK-P8-BE-NEXT: lbz r3, 3(r3)
4241 ; CHECK-P8-BE-NEXT: blr
4243 %or = or i64 %ptr, 1000000000001
4244 %0 = inttoptr i64 %or to ptr
4245 %1 = load i32, ptr %0, align 4
4246 %conv = trunc i32 %1 to i8
4250 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4251 define dso_local zeroext i8 @ld_disjoint_unalign64_uint8_t_uint32_t(i64 %ptr) {
4252 ; CHECK-P10-LE-LABEL: ld_disjoint_unalign64_uint8_t_uint32_t:
4253 ; CHECK-P10-LE: # %bb.0: # %entry
4254 ; CHECK-P10-LE-NEXT: pli r4, 232
4255 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
4256 ; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
4257 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
4258 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r5
4259 ; CHECK-P10-LE-NEXT: blr
4261 ; CHECK-P10-BE-LABEL: ld_disjoint_unalign64_uint8_t_uint32_t:
4262 ; CHECK-P10-BE: # %bb.0: # %entry
4263 ; CHECK-P10-BE-NEXT: pli r4, 232
4264 ; CHECK-P10-BE-NEXT: pli r5, 3567587332
4265 ; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
4266 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
4267 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
4268 ; CHECK-P10-BE-NEXT: blr
4270 ; CHECK-P9-LE-LABEL: ld_disjoint_unalign64_uint8_t_uint32_t:
4271 ; CHECK-P9-LE: # %bb.0: # %entry
4272 ; CHECK-P9-LE-NEXT: li r4, 29
4273 ; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
4274 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
4275 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
4276 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
4277 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
4278 ; CHECK-P9-LE-NEXT: blr
4280 ; CHECK-P9-BE-LABEL: ld_disjoint_unalign64_uint8_t_uint32_t:
4281 ; CHECK-P9-BE: # %bb.0: # %entry
4282 ; CHECK-P9-BE-NEXT: li r4, 29
4283 ; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
4284 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
4285 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
4286 ; CHECK-P9-BE-NEXT: ori r4, r4, 4100
4287 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
4288 ; CHECK-P9-BE-NEXT: blr
4290 ; CHECK-P8-LE-LABEL: ld_disjoint_unalign64_uint8_t_uint32_t:
4291 ; CHECK-P8-LE: # %bb.0: # %entry
4292 ; CHECK-P8-LE-NEXT: li r4, 29
4293 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
4294 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
4295 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
4296 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
4297 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
4298 ; CHECK-P8-LE-NEXT: blr
4300 ; CHECK-P8-BE-LABEL: ld_disjoint_unalign64_uint8_t_uint32_t:
4301 ; CHECK-P8-BE: # %bb.0: # %entry
4302 ; CHECK-P8-BE-NEXT: li r4, 29
4303 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
4304 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
4305 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
4306 ; CHECK-P8-BE-NEXT: ori r4, r4, 4100
4307 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
4308 ; CHECK-P8-BE-NEXT: blr
4310 %and = and i64 %ptr, -1099511627776
4311 %or = or i64 %and, 1000000000001
4312 %0 = inttoptr i64 %or to ptr
4313 %1 = load i32, ptr %0, align 4
4314 %conv = trunc i32 %1 to i8
4318 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4319 define dso_local zeroext i8 @ld_disjoint_align64_uint8_t_uint32_t(i64 %ptr) {
4320 ; CHECK-P10-LE-LABEL: ld_disjoint_align64_uint8_t_uint32_t:
4321 ; CHECK-P10-LE: # %bb.0: # %entry
4322 ; CHECK-P10-LE-NEXT: pli r4, 244140625
4323 ; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
4324 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
4325 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
4326 ; CHECK-P10-LE-NEXT: blr
4328 ; CHECK-P10-BE-LABEL: ld_disjoint_align64_uint8_t_uint32_t:
4329 ; CHECK-P10-BE: # %bb.0: # %entry
4330 ; CHECK-P10-BE-NEXT: pli r4, 232
4331 ; CHECK-P10-BE-NEXT: pli r5, 3567587331
4332 ; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
4333 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
4334 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
4335 ; CHECK-P10-BE-NEXT: blr
4337 ; CHECK-P9-LE-LABEL: ld_disjoint_align64_uint8_t_uint32_t:
4338 ; CHECK-P9-LE: # %bb.0: # %entry
4339 ; CHECK-P9-LE-NEXT: lis r4, 3725
4340 ; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
4341 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
4342 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
4343 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
4344 ; CHECK-P9-LE-NEXT: blr
4346 ; CHECK-P9-BE-LABEL: ld_disjoint_align64_uint8_t_uint32_t:
4347 ; CHECK-P9-BE: # %bb.0: # %entry
4348 ; CHECK-P9-BE-NEXT: li r4, 29
4349 ; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
4350 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
4351 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
4352 ; CHECK-P9-BE-NEXT: ori r4, r4, 4099
4353 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
4354 ; CHECK-P9-BE-NEXT: blr
4356 ; CHECK-P8-LE-LABEL: ld_disjoint_align64_uint8_t_uint32_t:
4357 ; CHECK-P8-LE: # %bb.0: # %entry
4358 ; CHECK-P8-LE-NEXT: lis r4, 3725
4359 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
4360 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
4361 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
4362 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
4363 ; CHECK-P8-LE-NEXT: blr
4365 ; CHECK-P8-BE-LABEL: ld_disjoint_align64_uint8_t_uint32_t:
4366 ; CHECK-P8-BE: # %bb.0: # %entry
4367 ; CHECK-P8-BE-NEXT: li r4, 29
4368 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
4369 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
4370 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
4371 ; CHECK-P8-BE-NEXT: ori r4, r4, 4099
4372 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
4373 ; CHECK-P8-BE-NEXT: blr
4375 %and = and i64 %ptr, -1099511627776
4376 %or = or i64 %and, 1000000000000
4377 %0 = inttoptr i64 %or to ptr
4378 %1 = load i32, ptr %0, align 4096
4379 %conv = trunc i32 %1 to i8
4383 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4384 define dso_local zeroext i8 @ld_cst_align16_uint8_t_uint32_t() {
4385 ; CHECK-LE-LABEL: ld_cst_align16_uint8_t_uint32_t:
4386 ; CHECK-LE: # %bb.0: # %entry
4387 ; CHECK-LE-NEXT: lbz r3, 4080(0)
4388 ; CHECK-LE-NEXT: blr
4390 ; CHECK-BE-LABEL: ld_cst_align16_uint8_t_uint32_t:
4391 ; CHECK-BE: # %bb.0: # %entry
4392 ; CHECK-BE-NEXT: lbz r3, 4083(0)
4393 ; CHECK-BE-NEXT: blr
4395 %0 = load i32, ptr inttoptr (i64 4080 to ptr), align 16
4396 %conv = trunc i32 %0 to i8
4400 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4401 define dso_local zeroext i8 @ld_cst_align32_uint8_t_uint32_t() {
4402 ; CHECK-LE-LABEL: ld_cst_align32_uint8_t_uint32_t:
4403 ; CHECK-LE: # %bb.0: # %entry
4404 ; CHECK-LE-NEXT: lis r3, 153
4405 ; CHECK-LE-NEXT: lbz r3, -27108(r3)
4406 ; CHECK-LE-NEXT: blr
4408 ; CHECK-BE-LABEL: ld_cst_align32_uint8_t_uint32_t:
4409 ; CHECK-BE: # %bb.0: # %entry
4410 ; CHECK-BE-NEXT: lis r3, 153
4411 ; CHECK-BE-NEXT: lbz r3, -27105(r3)
4412 ; CHECK-BE-NEXT: blr
4414 %0 = load i32, ptr inttoptr (i64 9999900 to ptr), align 4
4415 %conv = trunc i32 %0 to i8
4419 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4420 define dso_local zeroext i8 @ld_cst_unalign64_uint8_t_uint32_t() {
4421 ; CHECK-P10-LE-LABEL: ld_cst_unalign64_uint8_t_uint32_t:
4422 ; CHECK-P10-LE: # %bb.0: # %entry
4423 ; CHECK-P10-LE-NEXT: pli r3, 232
4424 ; CHECK-P10-LE-NEXT: pli r4, 3567587329
4425 ; CHECK-P10-LE-NEXT: rldimi r4, r3, 32, 0
4426 ; CHECK-P10-LE-NEXT: lbz r3, 0(r4)
4427 ; CHECK-P10-LE-NEXT: blr
4429 ; CHECK-P10-BE-LABEL: ld_cst_unalign64_uint8_t_uint32_t:
4430 ; CHECK-P10-BE: # %bb.0: # %entry
4431 ; CHECK-P10-BE-NEXT: pli r3, 232
4432 ; CHECK-P10-BE-NEXT: pli r4, 3567587332
4433 ; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
4434 ; CHECK-P10-BE-NEXT: lbz r3, 0(r4)
4435 ; CHECK-P10-BE-NEXT: blr
4437 ; CHECK-P9-LE-LABEL: ld_cst_unalign64_uint8_t_uint32_t:
4438 ; CHECK-P9-LE: # %bb.0: # %entry
4439 ; CHECK-P9-LE-NEXT: li r3, 29
4440 ; CHECK-P9-LE-NEXT: rldic r3, r3, 35, 24
4441 ; CHECK-P9-LE-NEXT: oris r3, r3, 54437
4442 ; CHECK-P9-LE-NEXT: ori r3, r3, 4097
4443 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
4444 ; CHECK-P9-LE-NEXT: blr
4446 ; CHECK-P9-BE-LABEL: ld_cst_unalign64_uint8_t_uint32_t:
4447 ; CHECK-P9-BE: # %bb.0: # %entry
4448 ; CHECK-P9-BE-NEXT: li r3, 29
4449 ; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
4450 ; CHECK-P9-BE-NEXT: oris r3, r3, 54437
4451 ; CHECK-P9-BE-NEXT: ori r3, r3, 4100
4452 ; CHECK-P9-BE-NEXT: lbz r3, 0(r3)
4453 ; CHECK-P9-BE-NEXT: blr
4455 ; CHECK-P8-LE-LABEL: ld_cst_unalign64_uint8_t_uint32_t:
4456 ; CHECK-P8-LE: # %bb.0: # %entry
4457 ; CHECK-P8-LE-NEXT: li r3, 29
4458 ; CHECK-P8-LE-NEXT: rldic r3, r3, 35, 24
4459 ; CHECK-P8-LE-NEXT: oris r3, r3, 54437
4460 ; CHECK-P8-LE-NEXT: ori r3, r3, 4097
4461 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
4462 ; CHECK-P8-LE-NEXT: blr
4464 ; CHECK-P8-BE-LABEL: ld_cst_unalign64_uint8_t_uint32_t:
4465 ; CHECK-P8-BE: # %bb.0: # %entry
4466 ; CHECK-P8-BE-NEXT: li r3, 29
4467 ; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
4468 ; CHECK-P8-BE-NEXT: oris r3, r3, 54437
4469 ; CHECK-P8-BE-NEXT: ori r3, r3, 4100
4470 ; CHECK-P8-BE-NEXT: lbz r3, 0(r3)
4471 ; CHECK-P8-BE-NEXT: blr
4473 %0 = load i32, ptr inttoptr (i64 1000000000001 to ptr), align 4
4474 %conv = trunc i32 %0 to i8
4478 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4479 define dso_local zeroext i8 @ld_cst_align64_uint8_t_uint32_t() {
4480 ; CHECK-P10-LE-LABEL: ld_cst_align64_uint8_t_uint32_t:
4481 ; CHECK-P10-LE: # %bb.0: # %entry
4482 ; CHECK-P10-LE-NEXT: pli r3, 244140625
4483 ; CHECK-P10-LE-NEXT: rldic r3, r3, 12, 24
4484 ; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
4485 ; CHECK-P10-LE-NEXT: blr
4487 ; CHECK-P10-BE-LABEL: ld_cst_align64_uint8_t_uint32_t:
4488 ; CHECK-P10-BE: # %bb.0: # %entry
4489 ; CHECK-P10-BE-NEXT: pli r3, 232
4490 ; CHECK-P10-BE-NEXT: pli r4, 3567587331
4491 ; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
4492 ; CHECK-P10-BE-NEXT: lbz r3, 0(r4)
4493 ; CHECK-P10-BE-NEXT: blr
4495 ; CHECK-P9-LE-LABEL: ld_cst_align64_uint8_t_uint32_t:
4496 ; CHECK-P9-LE: # %bb.0: # %entry
4497 ; CHECK-P9-LE-NEXT: lis r3, 3725
4498 ; CHECK-P9-LE-NEXT: ori r3, r3, 19025
4499 ; CHECK-P9-LE-NEXT: rldic r3, r3, 12, 24
4500 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
4501 ; CHECK-P9-LE-NEXT: blr
4503 ; CHECK-P9-BE-LABEL: ld_cst_align64_uint8_t_uint32_t:
4504 ; CHECK-P9-BE: # %bb.0: # %entry
4505 ; CHECK-P9-BE-NEXT: li r3, 29
4506 ; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
4507 ; CHECK-P9-BE-NEXT: oris r3, r3, 54437
4508 ; CHECK-P9-BE-NEXT: ori r3, r3, 4099
4509 ; CHECK-P9-BE-NEXT: lbz r3, 0(r3)
4510 ; CHECK-P9-BE-NEXT: blr
4512 ; CHECK-P8-LE-LABEL: ld_cst_align64_uint8_t_uint32_t:
4513 ; CHECK-P8-LE: # %bb.0: # %entry
4514 ; CHECK-P8-LE-NEXT: lis r3, 3725
4515 ; CHECK-P8-LE-NEXT: ori r3, r3, 19025
4516 ; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
4517 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
4518 ; CHECK-P8-LE-NEXT: blr
4520 ; CHECK-P8-BE-LABEL: ld_cst_align64_uint8_t_uint32_t:
4521 ; CHECK-P8-BE: # %bb.0: # %entry
4522 ; CHECK-P8-BE-NEXT: li r3, 29
4523 ; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
4524 ; CHECK-P8-BE-NEXT: oris r3, r3, 54437
4525 ; CHECK-P8-BE-NEXT: ori r3, r3, 4099
4526 ; CHECK-P8-BE-NEXT: lbz r3, 0(r3)
4527 ; CHECK-P8-BE-NEXT: blr
4529 %0 = load i32, ptr inttoptr (i64 1000000000000 to ptr), align 4096
4530 %conv = trunc i32 %0 to i8
4534 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4535 define dso_local zeroext i8 @ld_0_uint8_t_uint64_t(i64 %ptr) {
4536 ; CHECK-LE-LABEL: ld_0_uint8_t_uint64_t:
4537 ; CHECK-LE: # %bb.0: # %entry
4538 ; CHECK-LE-NEXT: lbz r3, 0(r3)
4539 ; CHECK-LE-NEXT: blr
4541 ; CHECK-BE-LABEL: ld_0_uint8_t_uint64_t:
4542 ; CHECK-BE: # %bb.0: # %entry
4543 ; CHECK-BE-NEXT: lbz r3, 7(r3)
4544 ; CHECK-BE-NEXT: blr
4546 %0 = inttoptr i64 %ptr to ptr
4547 %1 = load i64, ptr %0, align 8
4548 %conv = trunc i64 %1 to i8
4552 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4553 define dso_local zeroext i8 @ld_align16_uint8_t_uint64_t(ptr nocapture readonly %ptr) {
4554 ; CHECK-LE-LABEL: ld_align16_uint8_t_uint64_t:
4555 ; CHECK-LE: # %bb.0: # %entry
4556 ; CHECK-LE-NEXT: lbz r3, 8(r3)
4557 ; CHECK-LE-NEXT: blr
4559 ; CHECK-BE-LABEL: ld_align16_uint8_t_uint64_t:
4560 ; CHECK-BE: # %bb.0: # %entry
4561 ; CHECK-BE-NEXT: lbz r3, 15(r3)
4562 ; CHECK-BE-NEXT: blr
4564 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
4565 %0 = load i64, ptr %add.ptr, align 8
4566 %conv = trunc i64 %0 to i8
4570 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4571 define dso_local zeroext i8 @ld_align32_uint8_t_uint64_t(ptr nocapture readonly %ptr) {
4572 ; CHECK-P10-LE-LABEL: ld_align32_uint8_t_uint64_t:
4573 ; CHECK-P10-LE: # %bb.0: # %entry
4574 ; CHECK-P10-LE-NEXT: plbz r3, 99999000(r3), 0
4575 ; CHECK-P10-LE-NEXT: blr
4577 ; CHECK-P10-BE-LABEL: ld_align32_uint8_t_uint64_t:
4578 ; CHECK-P10-BE: # %bb.0: # %entry
4579 ; CHECK-P10-BE-NEXT: plbz r3, 99999007(r3), 0
4580 ; CHECK-P10-BE-NEXT: blr
4582 ; CHECK-P9-LE-LABEL: ld_align32_uint8_t_uint64_t:
4583 ; CHECK-P9-LE: # %bb.0: # %entry
4584 ; CHECK-P9-LE-NEXT: lis r4, 1525
4585 ; CHECK-P9-LE-NEXT: ori r4, r4, 56600
4586 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
4587 ; CHECK-P9-LE-NEXT: blr
4589 ; CHECK-P9-BE-LABEL: ld_align32_uint8_t_uint64_t:
4590 ; CHECK-P9-BE: # %bb.0: # %entry
4591 ; CHECK-P9-BE-NEXT: lis r4, 1525
4592 ; CHECK-P9-BE-NEXT: ori r4, r4, 56607
4593 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
4594 ; CHECK-P9-BE-NEXT: blr
4596 ; CHECK-P8-LE-LABEL: ld_align32_uint8_t_uint64_t:
4597 ; CHECK-P8-LE: # %bb.0: # %entry
4598 ; CHECK-P8-LE-NEXT: lis r4, 1525
4599 ; CHECK-P8-LE-NEXT: ori r4, r4, 56600
4600 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
4601 ; CHECK-P8-LE-NEXT: blr
4603 ; CHECK-P8-BE-LABEL: ld_align32_uint8_t_uint64_t:
4604 ; CHECK-P8-BE: # %bb.0: # %entry
4605 ; CHECK-P8-BE-NEXT: lis r4, 1525
4606 ; CHECK-P8-BE-NEXT: ori r4, r4, 56607
4607 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
4608 ; CHECK-P8-BE-NEXT: blr
4610 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
4611 %0 = load i64, ptr %add.ptr, align 8
4612 %conv = trunc i64 %0 to i8
4616 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4617 define dso_local zeroext i8 @ld_unalign64_uint8_t_uint64_t(ptr nocapture readonly %ptr) {
4618 ; CHECK-P10-LE-LABEL: ld_unalign64_uint8_t_uint64_t:
4619 ; CHECK-P10-LE: # %bb.0: # %entry
4620 ; CHECK-P10-LE-NEXT: pli r4, 232
4621 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
4622 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
4623 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r5
4624 ; CHECK-P10-LE-NEXT: blr
4626 ; CHECK-P10-BE-LABEL: ld_unalign64_uint8_t_uint64_t:
4627 ; CHECK-P10-BE: # %bb.0: # %entry
4628 ; CHECK-P10-BE-NEXT: pli r4, 232
4629 ; CHECK-P10-BE-NEXT: pli r5, 3567587336
4630 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
4631 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
4632 ; CHECK-P10-BE-NEXT: blr
4634 ; CHECK-P9-LE-LABEL: ld_unalign64_uint8_t_uint64_t:
4635 ; CHECK-P9-LE: # %bb.0: # %entry
4636 ; CHECK-P9-LE-NEXT: li r4, 29
4637 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
4638 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
4639 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
4640 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
4641 ; CHECK-P9-LE-NEXT: blr
4643 ; CHECK-P9-BE-LABEL: ld_unalign64_uint8_t_uint64_t:
4644 ; CHECK-P9-BE: # %bb.0: # %entry
4645 ; CHECK-P9-BE-NEXT: li r4, 29
4646 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
4647 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
4648 ; CHECK-P9-BE-NEXT: ori r4, r4, 4104
4649 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
4650 ; CHECK-P9-BE-NEXT: blr
4652 ; CHECK-P8-LE-LABEL: ld_unalign64_uint8_t_uint64_t:
4653 ; CHECK-P8-LE: # %bb.0: # %entry
4654 ; CHECK-P8-LE-NEXT: li r4, 29
4655 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
4656 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
4657 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
4658 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
4659 ; CHECK-P8-LE-NEXT: blr
4661 ; CHECK-P8-BE-LABEL: ld_unalign64_uint8_t_uint64_t:
4662 ; CHECK-P8-BE: # %bb.0: # %entry
4663 ; CHECK-P8-BE-NEXT: li r4, 29
4664 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
4665 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
4666 ; CHECK-P8-BE-NEXT: ori r4, r4, 4104
4667 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
4668 ; CHECK-P8-BE-NEXT: blr
4670 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000001
4671 %0 = load i64, ptr %add.ptr, align 8
4672 %conv = trunc i64 %0 to i8
4676 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4677 define dso_local zeroext i8 @ld_align64_uint8_t_uint64_t(ptr nocapture readonly %ptr) {
4678 ; CHECK-P10-LE-LABEL: ld_align64_uint8_t_uint64_t:
4679 ; CHECK-P10-LE: # %bb.0: # %entry
4680 ; CHECK-P10-LE-NEXT: pli r4, 244140625
4681 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
4682 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
4683 ; CHECK-P10-LE-NEXT: blr
4685 ; CHECK-P10-BE-LABEL: ld_align64_uint8_t_uint64_t:
4686 ; CHECK-P10-BE: # %bb.0: # %entry
4687 ; CHECK-P10-BE-NEXT: pli r4, 232
4688 ; CHECK-P10-BE-NEXT: pli r5, 3567587335
4689 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
4690 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
4691 ; CHECK-P10-BE-NEXT: blr
4693 ; CHECK-P9-LE-LABEL: ld_align64_uint8_t_uint64_t:
4694 ; CHECK-P9-LE: # %bb.0: # %entry
4695 ; CHECK-P9-LE-NEXT: lis r4, 3725
4696 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
4697 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
4698 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
4699 ; CHECK-P9-LE-NEXT: blr
4701 ; CHECK-P9-BE-LABEL: ld_align64_uint8_t_uint64_t:
4702 ; CHECK-P9-BE: # %bb.0: # %entry
4703 ; CHECK-P9-BE-NEXT: li r4, 29
4704 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
4705 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
4706 ; CHECK-P9-BE-NEXT: ori r4, r4, 4103
4707 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
4708 ; CHECK-P9-BE-NEXT: blr
4710 ; CHECK-P8-LE-LABEL: ld_align64_uint8_t_uint64_t:
4711 ; CHECK-P8-LE: # %bb.0: # %entry
4712 ; CHECK-P8-LE-NEXT: lis r4, 3725
4713 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
4714 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
4715 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
4716 ; CHECK-P8-LE-NEXT: blr
4718 ; CHECK-P8-BE-LABEL: ld_align64_uint8_t_uint64_t:
4719 ; CHECK-P8-BE: # %bb.0: # %entry
4720 ; CHECK-P8-BE-NEXT: li r4, 29
4721 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
4722 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
4723 ; CHECK-P8-BE-NEXT: ori r4, r4, 4103
4724 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
4725 ; CHECK-P8-BE-NEXT: blr
4727 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
4728 %0 = load i64, ptr %add.ptr, align 8
4729 %conv = trunc i64 %0 to i8
4733 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4734 define dso_local zeroext i8 @ld_reg_uint8_t_uint64_t(ptr nocapture readonly %ptr, i64 %off) {
4735 ; CHECK-LE-LABEL: ld_reg_uint8_t_uint64_t:
4736 ; CHECK-LE: # %bb.0: # %entry
4737 ; CHECK-LE-NEXT: lbzx r3, r3, r4
4738 ; CHECK-LE-NEXT: blr
4740 ; CHECK-BE-LABEL: ld_reg_uint8_t_uint64_t:
4741 ; CHECK-BE: # %bb.0: # %entry
4742 ; CHECK-BE-NEXT: add r3, r3, r4
4743 ; CHECK-BE-NEXT: lbz r3, 7(r3)
4744 ; CHECK-BE-NEXT: blr
4746 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
4747 %0 = load i64, ptr %add.ptr, align 8
4748 %conv = trunc i64 %0 to i8
4752 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4753 define dso_local zeroext i8 @ld_or_uint8_t_uint64_t(i64 %ptr, i8 zeroext %off) {
4754 ; CHECK-LE-LABEL: ld_or_uint8_t_uint64_t:
4755 ; CHECK-LE: # %bb.0: # %entry
4756 ; CHECK-LE-NEXT: or r3, r4, r3
4757 ; CHECK-LE-NEXT: lbz r3, 0(r3)
4758 ; CHECK-LE-NEXT: blr
4760 ; CHECK-BE-LABEL: ld_or_uint8_t_uint64_t:
4761 ; CHECK-BE: # %bb.0: # %entry
4762 ; CHECK-BE-NEXT: or r3, r4, r3
4763 ; CHECK-BE-NEXT: lbz r3, 7(r3)
4764 ; CHECK-BE-NEXT: blr
4766 %conv = zext i8 %off to i64
4767 %or = or i64 %conv, %ptr
4768 %0 = inttoptr i64 %or to ptr
4769 %1 = load i64, ptr %0, align 8
4770 %conv1 = trunc i64 %1 to i8
4774 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4775 define dso_local zeroext i8 @ld_not_disjoint16_uint8_t_uint64_t(i64 %ptr) {
4776 ; CHECK-LE-LABEL: ld_not_disjoint16_uint8_t_uint64_t:
4777 ; CHECK-LE: # %bb.0: # %entry
4778 ; CHECK-LE-NEXT: ori r3, r3, 6
4779 ; CHECK-LE-NEXT: lbz r3, 0(r3)
4780 ; CHECK-LE-NEXT: blr
4782 ; CHECK-BE-LABEL: ld_not_disjoint16_uint8_t_uint64_t:
4783 ; CHECK-BE: # %bb.0: # %entry
4784 ; CHECK-BE-NEXT: ori r3, r3, 6
4785 ; CHECK-BE-NEXT: lbz r3, 7(r3)
4786 ; CHECK-BE-NEXT: blr
4788 %or = or i64 %ptr, 6
4789 %0 = inttoptr i64 %or to ptr
4790 %1 = load i64, ptr %0, align 8
4791 %conv = trunc i64 %1 to i8
4795 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4796 define dso_local zeroext i8 @ld_disjoint_align16_uint8_t_uint64_t(i64 %ptr) {
4797 ; CHECK-LE-LABEL: ld_disjoint_align16_uint8_t_uint64_t:
4798 ; CHECK-LE: # %bb.0: # %entry
4799 ; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
4800 ; CHECK-LE-NEXT: lbz r3, 24(r3)
4801 ; CHECK-LE-NEXT: blr
4803 ; CHECK-BE-LABEL: ld_disjoint_align16_uint8_t_uint64_t:
4804 ; CHECK-BE: # %bb.0: # %entry
4805 ; CHECK-BE-NEXT: rldicr r3, r3, 0, 51
4806 ; CHECK-BE-NEXT: lbz r3, 31(r3)
4807 ; CHECK-BE-NEXT: blr
4809 %and = and i64 %ptr, -4096
4810 %or = or i64 %and, 24
4811 %0 = inttoptr i64 %or to ptr
4812 %1 = load i64, ptr %0, align 8
4813 %conv = trunc i64 %1 to i8
4817 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4818 define dso_local zeroext i8 @ld_not_disjoint32_uint8_t_uint64_t(i64 %ptr) {
4819 ; CHECK-LE-LABEL: ld_not_disjoint32_uint8_t_uint64_t:
4820 ; CHECK-LE: # %bb.0: # %entry
4821 ; CHECK-LE-NEXT: ori r3, r3, 34463
4822 ; CHECK-LE-NEXT: oris r3, r3, 1
4823 ; CHECK-LE-NEXT: lbz r3, 0(r3)
4824 ; CHECK-LE-NEXT: blr
4826 ; CHECK-BE-LABEL: ld_not_disjoint32_uint8_t_uint64_t:
4827 ; CHECK-BE: # %bb.0: # %entry
4828 ; CHECK-BE-NEXT: ori r3, r3, 34463
4829 ; CHECK-BE-NEXT: oris r3, r3, 1
4830 ; CHECK-BE-NEXT: lbz r3, 7(r3)
4831 ; CHECK-BE-NEXT: blr
4833 %or = or i64 %ptr, 99999
4834 %0 = inttoptr i64 %or to ptr
4835 %1 = load i64, ptr %0, align 8
4836 %conv = trunc i64 %1 to i8
4840 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4841 define dso_local zeroext i8 @ld_disjoint_align32_uint8_t_uint64_t(i64 %ptr) {
4842 ; CHECK-P10-LE-LABEL: ld_disjoint_align32_uint8_t_uint64_t:
4843 ; CHECK-P10-LE: # %bb.0: # %entry
4844 ; CHECK-P10-LE-NEXT: lis r4, -15264
4845 ; CHECK-P10-LE-NEXT: and r3, r3, r4
4846 ; CHECK-P10-LE-NEXT: plbz r3, 999990000(r3), 0
4847 ; CHECK-P10-LE-NEXT: blr
4849 ; CHECK-P10-BE-LABEL: ld_disjoint_align32_uint8_t_uint64_t:
4850 ; CHECK-P10-BE: # %bb.0: # %entry
4851 ; CHECK-P10-BE-NEXT: lis r4, -15264
4852 ; CHECK-P10-BE-NEXT: and r3, r3, r4
4853 ; CHECK-P10-BE-NEXT: plbz r3, 999990007(r3), 0
4854 ; CHECK-P10-BE-NEXT: blr
4856 ; CHECK-P9-LE-LABEL: ld_disjoint_align32_uint8_t_uint64_t:
4857 ; CHECK-P9-LE: # %bb.0: # %entry
4858 ; CHECK-P9-LE-NEXT: lis r4, -15264
4859 ; CHECK-P9-LE-NEXT: and r3, r3, r4
4860 ; CHECK-P9-LE-NEXT: lis r4, 15258
4861 ; CHECK-P9-LE-NEXT: ori r4, r4, 41712
4862 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
4863 ; CHECK-P9-LE-NEXT: blr
4865 ; CHECK-P9-BE-LABEL: ld_disjoint_align32_uint8_t_uint64_t:
4866 ; CHECK-P9-BE: # %bb.0: # %entry
4867 ; CHECK-P9-BE-NEXT: lis r4, -15264
4868 ; CHECK-P9-BE-NEXT: and r3, r3, r4
4869 ; CHECK-P9-BE-NEXT: lis r4, 15258
4870 ; CHECK-P9-BE-NEXT: ori r4, r4, 41719
4871 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
4872 ; CHECK-P9-BE-NEXT: blr
4874 ; CHECK-P8-LE-LABEL: ld_disjoint_align32_uint8_t_uint64_t:
4875 ; CHECK-P8-LE: # %bb.0: # %entry
4876 ; CHECK-P8-LE-NEXT: lis r4, -15264
4877 ; CHECK-P8-LE-NEXT: lis r5, 15258
4878 ; CHECK-P8-LE-NEXT: and r3, r3, r4
4879 ; CHECK-P8-LE-NEXT: ori r4, r5, 41712
4880 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
4881 ; CHECK-P8-LE-NEXT: blr
4883 ; CHECK-P8-BE-LABEL: ld_disjoint_align32_uint8_t_uint64_t:
4884 ; CHECK-P8-BE: # %bb.0: # %entry
4885 ; CHECK-P8-BE-NEXT: lis r4, -15264
4886 ; CHECK-P8-BE-NEXT: lis r5, 15258
4887 ; CHECK-P8-BE-NEXT: and r3, r3, r4
4888 ; CHECK-P8-BE-NEXT: ori r4, r5, 41719
4889 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
4890 ; CHECK-P8-BE-NEXT: blr
4892 %and = and i64 %ptr, -1000341504
4893 %or = or i64 %and, 999990000
4894 %0 = inttoptr i64 %or to ptr
4895 %1 = load i64, ptr %0, align 16
4896 %conv = trunc i64 %1 to i8
4900 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4901 define dso_local zeroext i8 @ld_not_disjoint64_uint8_t_uint64_t(i64 %ptr) {
4902 ; CHECK-P10-LE-LABEL: ld_not_disjoint64_uint8_t_uint64_t:
4903 ; CHECK-P10-LE: # %bb.0: # %entry
4904 ; CHECK-P10-LE-NEXT: pli r4, 232
4905 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
4906 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
4907 ; CHECK-P10-LE-NEXT: or r3, r3, r5
4908 ; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
4909 ; CHECK-P10-LE-NEXT: blr
4911 ; CHECK-P10-BE-LABEL: ld_not_disjoint64_uint8_t_uint64_t:
4912 ; CHECK-P10-BE: # %bb.0: # %entry
4913 ; CHECK-P10-BE-NEXT: pli r4, 232
4914 ; CHECK-P10-BE-NEXT: pli r5, 3567587329
4915 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
4916 ; CHECK-P10-BE-NEXT: or r3, r3, r5
4917 ; CHECK-P10-BE-NEXT: lbz r3, 7(r3)
4918 ; CHECK-P10-BE-NEXT: blr
4920 ; CHECK-P9-LE-LABEL: ld_not_disjoint64_uint8_t_uint64_t:
4921 ; CHECK-P9-LE: # %bb.0: # %entry
4922 ; CHECK-P9-LE-NEXT: li r4, 29
4923 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
4924 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
4925 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
4926 ; CHECK-P9-LE-NEXT: or r3, r3, r4
4927 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
4928 ; CHECK-P9-LE-NEXT: blr
4930 ; CHECK-P9-BE-LABEL: ld_not_disjoint64_uint8_t_uint64_t:
4931 ; CHECK-P9-BE: # %bb.0: # %entry
4932 ; CHECK-P9-BE-NEXT: li r4, 29
4933 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
4934 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
4935 ; CHECK-P9-BE-NEXT: ori r4, r4, 4097
4936 ; CHECK-P9-BE-NEXT: or r3, r3, r4
4937 ; CHECK-P9-BE-NEXT: lbz r3, 7(r3)
4938 ; CHECK-P9-BE-NEXT: blr
4940 ; CHECK-P8-LE-LABEL: ld_not_disjoint64_uint8_t_uint64_t:
4941 ; CHECK-P8-LE: # %bb.0: # %entry
4942 ; CHECK-P8-LE-NEXT: li r4, 29
4943 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
4944 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
4945 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
4946 ; CHECK-P8-LE-NEXT: or r3, r3, r4
4947 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
4948 ; CHECK-P8-LE-NEXT: blr
4950 ; CHECK-P8-BE-LABEL: ld_not_disjoint64_uint8_t_uint64_t:
4951 ; CHECK-P8-BE: # %bb.0: # %entry
4952 ; CHECK-P8-BE-NEXT: li r4, 29
4953 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
4954 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
4955 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
4956 ; CHECK-P8-BE-NEXT: or r3, r3, r4
4957 ; CHECK-P8-BE-NEXT: lbz r3, 7(r3)
4958 ; CHECK-P8-BE-NEXT: blr
4960 %or = or i64 %ptr, 1000000000001
4961 %0 = inttoptr i64 %or to ptr
4962 %1 = load i64, ptr %0, align 8
4963 %conv = trunc i64 %1 to i8
4967 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4968 define dso_local zeroext i8 @ld_disjoint_unalign64_uint8_t_uint64_t(i64 %ptr) {
4969 ; CHECK-P10-LE-LABEL: ld_disjoint_unalign64_uint8_t_uint64_t:
4970 ; CHECK-P10-LE: # %bb.0: # %entry
4971 ; CHECK-P10-LE-NEXT: pli r4, 232
4972 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
4973 ; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
4974 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
4975 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r5
4976 ; CHECK-P10-LE-NEXT: blr
4978 ; CHECK-P10-BE-LABEL: ld_disjoint_unalign64_uint8_t_uint64_t:
4979 ; CHECK-P10-BE: # %bb.0: # %entry
4980 ; CHECK-P10-BE-NEXT: pli r4, 232
4981 ; CHECK-P10-BE-NEXT: pli r5, 3567587336
4982 ; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
4983 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
4984 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
4985 ; CHECK-P10-BE-NEXT: blr
4987 ; CHECK-P9-LE-LABEL: ld_disjoint_unalign64_uint8_t_uint64_t:
4988 ; CHECK-P9-LE: # %bb.0: # %entry
4989 ; CHECK-P9-LE-NEXT: li r4, 29
4990 ; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
4991 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
4992 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
4993 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
4994 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
4995 ; CHECK-P9-LE-NEXT: blr
4997 ; CHECK-P9-BE-LABEL: ld_disjoint_unalign64_uint8_t_uint64_t:
4998 ; CHECK-P9-BE: # %bb.0: # %entry
4999 ; CHECK-P9-BE-NEXT: li r4, 29
5000 ; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
5001 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
5002 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
5003 ; CHECK-P9-BE-NEXT: ori r4, r4, 4104
5004 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
5005 ; CHECK-P9-BE-NEXT: blr
5007 ; CHECK-P8-LE-LABEL: ld_disjoint_unalign64_uint8_t_uint64_t:
5008 ; CHECK-P8-LE: # %bb.0: # %entry
5009 ; CHECK-P8-LE-NEXT: li r4, 29
5010 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
5011 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
5012 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
5013 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
5014 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
5015 ; CHECK-P8-LE-NEXT: blr
5017 ; CHECK-P8-BE-LABEL: ld_disjoint_unalign64_uint8_t_uint64_t:
5018 ; CHECK-P8-BE: # %bb.0: # %entry
5019 ; CHECK-P8-BE-NEXT: li r4, 29
5020 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
5021 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
5022 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
5023 ; CHECK-P8-BE-NEXT: ori r4, r4, 4104
5024 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
5025 ; CHECK-P8-BE-NEXT: blr
5027 %and = and i64 %ptr, -1099511627776
5028 %or = or i64 %and, 1000000000001
5029 %0 = inttoptr i64 %or to ptr
5030 %1 = load i64, ptr %0, align 8
5031 %conv = trunc i64 %1 to i8
5035 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5036 define dso_local zeroext i8 @ld_disjoint_align64_uint8_t_uint64_t(i64 %ptr) {
5037 ; CHECK-P10-LE-LABEL: ld_disjoint_align64_uint8_t_uint64_t:
5038 ; CHECK-P10-LE: # %bb.0: # %entry
5039 ; CHECK-P10-LE-NEXT: pli r4, 244140625
5040 ; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
5041 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
5042 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
5043 ; CHECK-P10-LE-NEXT: blr
5045 ; CHECK-P10-BE-LABEL: ld_disjoint_align64_uint8_t_uint64_t:
5046 ; CHECK-P10-BE: # %bb.0: # %entry
5047 ; CHECK-P10-BE-NEXT: pli r4, 232
5048 ; CHECK-P10-BE-NEXT: pli r5, 3567587335
5049 ; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
5050 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
5051 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
5052 ; CHECK-P10-BE-NEXT: blr
5054 ; CHECK-P9-LE-LABEL: ld_disjoint_align64_uint8_t_uint64_t:
5055 ; CHECK-P9-LE: # %bb.0: # %entry
5056 ; CHECK-P9-LE-NEXT: lis r4, 3725
5057 ; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
5058 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
5059 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
5060 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
5061 ; CHECK-P9-LE-NEXT: blr
5063 ; CHECK-P9-BE-LABEL: ld_disjoint_align64_uint8_t_uint64_t:
5064 ; CHECK-P9-BE: # %bb.0: # %entry
5065 ; CHECK-P9-BE-NEXT: li r4, 29
5066 ; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
5067 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
5068 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
5069 ; CHECK-P9-BE-NEXT: ori r4, r4, 4103
5070 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
5071 ; CHECK-P9-BE-NEXT: blr
5073 ; CHECK-P8-LE-LABEL: ld_disjoint_align64_uint8_t_uint64_t:
5074 ; CHECK-P8-LE: # %bb.0: # %entry
5075 ; CHECK-P8-LE-NEXT: lis r4, 3725
5076 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
5077 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
5078 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
5079 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
5080 ; CHECK-P8-LE-NEXT: blr
5082 ; CHECK-P8-BE-LABEL: ld_disjoint_align64_uint8_t_uint64_t:
5083 ; CHECK-P8-BE: # %bb.0: # %entry
5084 ; CHECK-P8-BE-NEXT: li r4, 29
5085 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
5086 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
5087 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
5088 ; CHECK-P8-BE-NEXT: ori r4, r4, 4103
5089 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
5090 ; CHECK-P8-BE-NEXT: blr
5092 %and = and i64 %ptr, -1099511627776
5093 %or = or i64 %and, 1000000000000
5094 %0 = inttoptr i64 %or to ptr
5095 %1 = load i64, ptr %0, align 4096
5096 %conv = trunc i64 %1 to i8
5100 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5101 define dso_local zeroext i8 @ld_cst_align16_uint8_t_uint64_t() {
5102 ; CHECK-LE-LABEL: ld_cst_align16_uint8_t_uint64_t:
5103 ; CHECK-LE: # %bb.0: # %entry
5104 ; CHECK-LE-NEXT: lbz r3, 4080(0)
5105 ; CHECK-LE-NEXT: blr
5107 ; CHECK-BE-LABEL: ld_cst_align16_uint8_t_uint64_t:
5108 ; CHECK-BE: # %bb.0: # %entry
5109 ; CHECK-BE-NEXT: lbz r3, 4087(0)
5110 ; CHECK-BE-NEXT: blr
5112 %0 = load i64, ptr inttoptr (i64 4080 to ptr), align 16
5113 %conv = trunc i64 %0 to i8
5117 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5118 define dso_local zeroext i8 @ld_cst_align32_uint8_t_uint64_t() {
5119 ; CHECK-LE-LABEL: ld_cst_align32_uint8_t_uint64_t:
5120 ; CHECK-LE: # %bb.0: # %entry
5121 ; CHECK-LE-NEXT: lis r3, 153
5122 ; CHECK-LE-NEXT: lbz r3, -27108(r3)
5123 ; CHECK-LE-NEXT: blr
5125 ; CHECK-BE-LABEL: ld_cst_align32_uint8_t_uint64_t:
5126 ; CHECK-BE: # %bb.0: # %entry
5127 ; CHECK-BE-NEXT: lis r3, 153
5128 ; CHECK-BE-NEXT: lbz r3, -27101(r3)
5129 ; CHECK-BE-NEXT: blr
5131 %0 = load i64, ptr inttoptr (i64 9999900 to ptr), align 8
5132 %conv = trunc i64 %0 to i8
5136 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5137 define dso_local zeroext i8 @ld_cst_unalign64_uint8_t_uint64_t() {
5138 ; CHECK-P10-LE-LABEL: ld_cst_unalign64_uint8_t_uint64_t:
5139 ; CHECK-P10-LE: # %bb.0: # %entry
5140 ; CHECK-P10-LE-NEXT: pli r3, 232
5141 ; CHECK-P10-LE-NEXT: pli r4, 3567587329
5142 ; CHECK-P10-LE-NEXT: rldimi r4, r3, 32, 0
5143 ; CHECK-P10-LE-NEXT: lbz r3, 0(r4)
5144 ; CHECK-P10-LE-NEXT: blr
5146 ; CHECK-P10-BE-LABEL: ld_cst_unalign64_uint8_t_uint64_t:
5147 ; CHECK-P10-BE: # %bb.0: # %entry
5148 ; CHECK-P10-BE-NEXT: pli r3, 232
5149 ; CHECK-P10-BE-NEXT: pli r4, 3567587336
5150 ; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
5151 ; CHECK-P10-BE-NEXT: lbz r3, 0(r4)
5152 ; CHECK-P10-BE-NEXT: blr
5154 ; CHECK-P9-LE-LABEL: ld_cst_unalign64_uint8_t_uint64_t:
5155 ; CHECK-P9-LE: # %bb.0: # %entry
5156 ; CHECK-P9-LE-NEXT: li r3, 29
5157 ; CHECK-P9-LE-NEXT: rldic r3, r3, 35, 24
5158 ; CHECK-P9-LE-NEXT: oris r3, r3, 54437
5159 ; CHECK-P9-LE-NEXT: ori r3, r3, 4097
5160 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
5161 ; CHECK-P9-LE-NEXT: blr
5163 ; CHECK-P9-BE-LABEL: ld_cst_unalign64_uint8_t_uint64_t:
5164 ; CHECK-P9-BE: # %bb.0: # %entry
5165 ; CHECK-P9-BE-NEXT: li r3, 29
5166 ; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
5167 ; CHECK-P9-BE-NEXT: oris r3, r3, 54437
5168 ; CHECK-P9-BE-NEXT: ori r3, r3, 4104
5169 ; CHECK-P9-BE-NEXT: lbz r3, 0(r3)
5170 ; CHECK-P9-BE-NEXT: blr
5172 ; CHECK-P8-LE-LABEL: ld_cst_unalign64_uint8_t_uint64_t:
5173 ; CHECK-P8-LE: # %bb.0: # %entry
5174 ; CHECK-P8-LE-NEXT: li r3, 29
5175 ; CHECK-P8-LE-NEXT: rldic r3, r3, 35, 24
5176 ; CHECK-P8-LE-NEXT: oris r3, r3, 54437
5177 ; CHECK-P8-LE-NEXT: ori r3, r3, 4097
5178 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
5179 ; CHECK-P8-LE-NEXT: blr
5181 ; CHECK-P8-BE-LABEL: ld_cst_unalign64_uint8_t_uint64_t:
5182 ; CHECK-P8-BE: # %bb.0: # %entry
5183 ; CHECK-P8-BE-NEXT: li r3, 29
5184 ; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
5185 ; CHECK-P8-BE-NEXT: oris r3, r3, 54437
5186 ; CHECK-P8-BE-NEXT: ori r3, r3, 4104
5187 ; CHECK-P8-BE-NEXT: lbz r3, 0(r3)
5188 ; CHECK-P8-BE-NEXT: blr
5190 %0 = load i64, ptr inttoptr (i64 1000000000001 to ptr), align 8
5191 %conv = trunc i64 %0 to i8
5195 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5196 define dso_local zeroext i8 @ld_cst_align64_uint8_t_uint64_t() {
5197 ; CHECK-P10-LE-LABEL: ld_cst_align64_uint8_t_uint64_t:
5198 ; CHECK-P10-LE: # %bb.0: # %entry
5199 ; CHECK-P10-LE-NEXT: pli r3, 244140625
5200 ; CHECK-P10-LE-NEXT: rldic r3, r3, 12, 24
5201 ; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
5202 ; CHECK-P10-LE-NEXT: blr
5204 ; CHECK-P10-BE-LABEL: ld_cst_align64_uint8_t_uint64_t:
5205 ; CHECK-P10-BE: # %bb.0: # %entry
5206 ; CHECK-P10-BE-NEXT: pli r3, 232
5207 ; CHECK-P10-BE-NEXT: pli r4, 3567587335
5208 ; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
5209 ; CHECK-P10-BE-NEXT: lbz r3, 0(r4)
5210 ; CHECK-P10-BE-NEXT: blr
5212 ; CHECK-P9-LE-LABEL: ld_cst_align64_uint8_t_uint64_t:
5213 ; CHECK-P9-LE: # %bb.0: # %entry
5214 ; CHECK-P9-LE-NEXT: lis r3, 3725
5215 ; CHECK-P9-LE-NEXT: ori r3, r3, 19025
5216 ; CHECK-P9-LE-NEXT: rldic r3, r3, 12, 24
5217 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
5218 ; CHECK-P9-LE-NEXT: blr
5220 ; CHECK-P9-BE-LABEL: ld_cst_align64_uint8_t_uint64_t:
5221 ; CHECK-P9-BE: # %bb.0: # %entry
5222 ; CHECK-P9-BE-NEXT: li r3, 29
5223 ; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
5224 ; CHECK-P9-BE-NEXT: oris r3, r3, 54437
5225 ; CHECK-P9-BE-NEXT: ori r3, r3, 4103
5226 ; CHECK-P9-BE-NEXT: lbz r3, 0(r3)
5227 ; CHECK-P9-BE-NEXT: blr
5229 ; CHECK-P8-LE-LABEL: ld_cst_align64_uint8_t_uint64_t:
5230 ; CHECK-P8-LE: # %bb.0: # %entry
5231 ; CHECK-P8-LE-NEXT: lis r3, 3725
5232 ; CHECK-P8-LE-NEXT: ori r3, r3, 19025
5233 ; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
5234 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
5235 ; CHECK-P8-LE-NEXT: blr
5237 ; CHECK-P8-BE-LABEL: ld_cst_align64_uint8_t_uint64_t:
5238 ; CHECK-P8-BE: # %bb.0: # %entry
5239 ; CHECK-P8-BE-NEXT: li r3, 29
5240 ; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
5241 ; CHECK-P8-BE-NEXT: oris r3, r3, 54437
5242 ; CHECK-P8-BE-NEXT: ori r3, r3, 4103
5243 ; CHECK-P8-BE-NEXT: lbz r3, 0(r3)
5244 ; CHECK-P8-BE-NEXT: blr
5246 %0 = load i64, ptr inttoptr (i64 1000000000000 to ptr), align 4096
5247 %conv = trunc i64 %0 to i8
5251 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5252 define dso_local zeroext i8 @ld_0_uint8_t_float(i64 %ptr) {
5253 ; CHECK-LABEL: ld_0_uint8_t_float:
5254 ; CHECK: # %bb.0: # %entry
5255 ; CHECK-NEXT: lfs f0, 0(r3)
5256 ; CHECK-NEXT: xscvdpsxws f0, f0
5257 ; CHECK-NEXT: mffprwz r3, f0
5260 %0 = inttoptr i64 %ptr to ptr
5261 %1 = load float, ptr %0, align 4
5262 %conv = fptoui float %1 to i8
5266 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5267 define dso_local zeroext i8 @ld_align16_uint8_t_float(ptr nocapture readonly %ptr) {
5268 ; CHECK-LABEL: ld_align16_uint8_t_float:
5269 ; CHECK: # %bb.0: # %entry
5270 ; CHECK-NEXT: lfs f0, 8(r3)
5271 ; CHECK-NEXT: xscvdpsxws f0, f0
5272 ; CHECK-NEXT: mffprwz r3, f0
5275 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
5276 %0 = load float, ptr %add.ptr, align 4
5277 %conv = fptoui float %0 to i8
5281 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5282 define dso_local zeroext i8 @ld_align32_uint8_t_float(ptr nocapture readonly %ptr) {
5283 ; CHECK-P10-LABEL: ld_align32_uint8_t_float:
5284 ; CHECK-P10: # %bb.0: # %entry
5285 ; CHECK-P10-NEXT: plfs f0, 99999000(r3), 0
5286 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5287 ; CHECK-P10-NEXT: mffprwz r3, f0
5288 ; CHECK-P10-NEXT: blr
5290 ; CHECK-PREP10-LABEL: ld_align32_uint8_t_float:
5291 ; CHECK-PREP10: # %bb.0: # %entry
5292 ; CHECK-PREP10-NEXT: lis r4, 1525
5293 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
5294 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
5295 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5296 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5297 ; CHECK-PREP10-NEXT: blr
5299 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
5300 %0 = load float, ptr %add.ptr, align 4
5301 %conv = fptoui float %0 to i8
5305 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5306 define dso_local zeroext i8 @ld_unalign64_uint8_t_float(ptr nocapture readonly %ptr) {
5307 ; CHECK-P10-LABEL: ld_unalign64_uint8_t_float:
5308 ; CHECK-P10: # %bb.0: # %entry
5309 ; CHECK-P10-NEXT: pli r4, 232
5310 ; CHECK-P10-NEXT: pli r5, 3567587329
5311 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
5312 ; CHECK-P10-NEXT: lfsx f0, r3, r5
5313 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5314 ; CHECK-P10-NEXT: mffprwz r3, f0
5315 ; CHECK-P10-NEXT: blr
5317 ; CHECK-PREP10-LABEL: ld_unalign64_uint8_t_float:
5318 ; CHECK-PREP10: # %bb.0: # %entry
5319 ; CHECK-PREP10-NEXT: li r4, 29
5320 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
5321 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
5322 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
5323 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
5324 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5325 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5326 ; CHECK-PREP10-NEXT: blr
5328 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000001
5329 %0 = load float, ptr %add.ptr, align 4
5330 %conv = fptoui float %0 to i8
5334 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5335 define dso_local zeroext i8 @ld_align64_uint8_t_float(ptr nocapture readonly %ptr) {
5336 ; CHECK-P10-LABEL: ld_align64_uint8_t_float:
5337 ; CHECK-P10: # %bb.0: # %entry
5338 ; CHECK-P10-NEXT: pli r4, 244140625
5339 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5340 ; CHECK-P10-NEXT: lfsx f0, r3, r4
5341 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5342 ; CHECK-P10-NEXT: mffprwz r3, f0
5343 ; CHECK-P10-NEXT: blr
5345 ; CHECK-PREP10-LABEL: ld_align64_uint8_t_float:
5346 ; CHECK-PREP10: # %bb.0: # %entry
5347 ; CHECK-PREP10-NEXT: lis r4, 3725
5348 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
5349 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
5350 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
5351 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5352 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5353 ; CHECK-PREP10-NEXT: blr
5355 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
5356 %0 = load float, ptr %add.ptr, align 4
5357 %conv = fptoui float %0 to i8
5361 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5362 define dso_local zeroext i8 @ld_reg_uint8_t_float(ptr nocapture readonly %ptr, i64 %off) {
5363 ; CHECK-LABEL: ld_reg_uint8_t_float:
5364 ; CHECK: # %bb.0: # %entry
5365 ; CHECK-NEXT: lfsx f0, r3, r4
5366 ; CHECK-NEXT: xscvdpsxws f0, f0
5367 ; CHECK-NEXT: mffprwz r3, f0
5370 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
5371 %0 = load float, ptr %add.ptr, align 4
5372 %conv = fptoui float %0 to i8
5376 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5377 define dso_local zeroext i8 @ld_or_uint8_t_float(i64 %ptr, i8 zeroext %off) {
5378 ; CHECK-LABEL: ld_or_uint8_t_float:
5379 ; CHECK: # %bb.0: # %entry
5380 ; CHECK-NEXT: or r3, r4, r3
5381 ; CHECK-NEXT: lfs f0, 0(r3)
5382 ; CHECK-NEXT: xscvdpsxws f0, f0
5383 ; CHECK-NEXT: mffprwz r3, f0
5386 %conv = zext i8 %off to i64
5387 %or = or i64 %conv, %ptr
5388 %0 = inttoptr i64 %or to ptr
5389 %1 = load float, ptr %0, align 4
5390 %conv1 = fptoui float %1 to i8
5394 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5395 define dso_local zeroext i8 @ld_not_disjoint16_uint8_t_float(i64 %ptr) {
5396 ; CHECK-LABEL: ld_not_disjoint16_uint8_t_float:
5397 ; CHECK: # %bb.0: # %entry
5398 ; CHECK-NEXT: ori r3, r3, 6
5399 ; CHECK-NEXT: lfs f0, 0(r3)
5400 ; CHECK-NEXT: xscvdpsxws f0, f0
5401 ; CHECK-NEXT: mffprwz r3, f0
5404 %or = or i64 %ptr, 6
5405 %0 = inttoptr i64 %or to ptr
5406 %1 = load float, ptr %0, align 4
5407 %conv = fptoui float %1 to i8
5411 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5412 define dso_local zeroext i8 @ld_disjoint_align16_uint8_t_float(i64 %ptr) {
5413 ; CHECK-LABEL: ld_disjoint_align16_uint8_t_float:
5414 ; CHECK: # %bb.0: # %entry
5415 ; CHECK-NEXT: rldicr r3, r3, 0, 51
5416 ; CHECK-NEXT: lfs f0, 24(r3)
5417 ; CHECK-NEXT: xscvdpsxws f0, f0
5418 ; CHECK-NEXT: mffprwz r3, f0
5421 %and = and i64 %ptr, -4096
5422 %or = or i64 %and, 24
5423 %0 = inttoptr i64 %or to ptr
5424 %1 = load float, ptr %0, align 8
5425 %conv = fptoui float %1 to i8
5429 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5430 define dso_local zeroext i8 @ld_not_disjoint32_uint8_t_float(i64 %ptr) {
5431 ; CHECK-LABEL: ld_not_disjoint32_uint8_t_float:
5432 ; CHECK: # %bb.0: # %entry
5433 ; CHECK-NEXT: ori r3, r3, 34463
5434 ; CHECK-NEXT: oris r3, r3, 1
5435 ; CHECK-NEXT: lfs f0, 0(r3)
5436 ; CHECK-NEXT: xscvdpsxws f0, f0
5437 ; CHECK-NEXT: mffprwz r3, f0
5440 %or = or i64 %ptr, 99999
5441 %0 = inttoptr i64 %or to ptr
5442 %1 = load float, ptr %0, align 4
5443 %conv = fptoui float %1 to i8
5447 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5448 define dso_local zeroext i8 @ld_disjoint_align32_uint8_t_float(i64 %ptr) {
5449 ; CHECK-P10-LABEL: ld_disjoint_align32_uint8_t_float:
5450 ; CHECK-P10: # %bb.0: # %entry
5451 ; CHECK-P10-NEXT: lis r4, -15264
5452 ; CHECK-P10-NEXT: and r3, r3, r4
5453 ; CHECK-P10-NEXT: plfs f0, 999990000(r3), 0
5454 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5455 ; CHECK-P10-NEXT: mffprwz r3, f0
5456 ; CHECK-P10-NEXT: blr
5458 ; CHECK-P9-LABEL: ld_disjoint_align32_uint8_t_float:
5459 ; CHECK-P9: # %bb.0: # %entry
5460 ; CHECK-P9-NEXT: lis r4, -15264
5461 ; CHECK-P9-NEXT: and r3, r3, r4
5462 ; CHECK-P9-NEXT: lis r4, 15258
5463 ; CHECK-P9-NEXT: ori r4, r4, 41712
5464 ; CHECK-P9-NEXT: lfsx f0, r3, r4
5465 ; CHECK-P9-NEXT: xscvdpsxws f0, f0
5466 ; CHECK-P9-NEXT: mffprwz r3, f0
5467 ; CHECK-P9-NEXT: blr
5469 ; CHECK-P8-LABEL: ld_disjoint_align32_uint8_t_float:
5470 ; CHECK-P8: # %bb.0: # %entry
5471 ; CHECK-P8-NEXT: lis r4, -15264
5472 ; CHECK-P8-NEXT: lis r5, 15258
5473 ; CHECK-P8-NEXT: and r3, r3, r4
5474 ; CHECK-P8-NEXT: ori r4, r5, 41712
5475 ; CHECK-P8-NEXT: lfsx f0, r3, r4
5476 ; CHECK-P8-NEXT: xscvdpsxws f0, f0
5477 ; CHECK-P8-NEXT: mffprwz r3, f0
5478 ; CHECK-P8-NEXT: blr
5480 %and = and i64 %ptr, -1000341504
5481 %or = or i64 %and, 999990000
5482 %0 = inttoptr i64 %or to ptr
5483 %1 = load float, ptr %0, align 16
5484 %conv = fptoui float %1 to i8
5488 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5489 define dso_local zeroext i8 @ld_not_disjoint64_uint8_t_float(i64 %ptr) {
5490 ; CHECK-P10-LABEL: ld_not_disjoint64_uint8_t_float:
5491 ; CHECK-P10: # %bb.0: # %entry
5492 ; CHECK-P10-NEXT: pli r4, 232
5493 ; CHECK-P10-NEXT: pli r5, 3567587329
5494 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
5495 ; CHECK-P10-NEXT: or r3, r3, r5
5496 ; CHECK-P10-NEXT: lfs f0, 0(r3)
5497 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5498 ; CHECK-P10-NEXT: mffprwz r3, f0
5499 ; CHECK-P10-NEXT: blr
5501 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint8_t_float:
5502 ; CHECK-PREP10: # %bb.0: # %entry
5503 ; CHECK-PREP10-NEXT: li r4, 29
5504 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
5505 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
5506 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
5507 ; CHECK-PREP10-NEXT: or r3, r3, r4
5508 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
5509 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5510 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5511 ; CHECK-PREP10-NEXT: blr
5513 %or = or i64 %ptr, 1000000000001
5514 %0 = inttoptr i64 %or to ptr
5515 %1 = load float, ptr %0, align 4
5516 %conv = fptoui float %1 to i8
5520 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5521 define dso_local zeroext i8 @ld_disjoint_unalign64_uint8_t_float(i64 %ptr) {
5522 ; CHECK-P10-LABEL: ld_disjoint_unalign64_uint8_t_float:
5523 ; CHECK-P10: # %bb.0: # %entry
5524 ; CHECK-P10-NEXT: pli r4, 232
5525 ; CHECK-P10-NEXT: pli r5, 3567587329
5526 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
5527 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
5528 ; CHECK-P10-NEXT: lfsx f0, r3, r5
5529 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5530 ; CHECK-P10-NEXT: mffprwz r3, f0
5531 ; CHECK-P10-NEXT: blr
5533 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint8_t_float:
5534 ; CHECK-PREP10: # %bb.0: # %entry
5535 ; CHECK-PREP10-NEXT: li r4, 29
5536 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
5537 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
5538 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
5539 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
5540 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
5541 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5542 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5543 ; CHECK-PREP10-NEXT: blr
5545 %and = and i64 %ptr, -1099511627776
5546 %or = or i64 %and, 1000000000001
5547 %0 = inttoptr i64 %or to ptr
5548 %1 = load float, ptr %0, align 4
5549 %conv = fptoui float %1 to i8
5553 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5554 define dso_local zeroext i8 @ld_disjoint_align64_uint8_t_float(i64 %ptr) {
5555 ; CHECK-P10-LABEL: ld_disjoint_align64_uint8_t_float:
5556 ; CHECK-P10: # %bb.0: # %entry
5557 ; CHECK-P10-NEXT: pli r4, 244140625
5558 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
5559 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5560 ; CHECK-P10-NEXT: lfsx f0, r3, r4
5561 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5562 ; CHECK-P10-NEXT: mffprwz r3, f0
5563 ; CHECK-P10-NEXT: blr
5565 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint8_t_float:
5566 ; CHECK-PREP10: # %bb.0: # %entry
5567 ; CHECK-PREP10-NEXT: lis r4, 3725
5568 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
5569 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
5570 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
5571 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
5572 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5573 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5574 ; CHECK-PREP10-NEXT: blr
5576 %and = and i64 %ptr, -1099511627776
5577 %or = or i64 %and, 1000000000000
5578 %0 = inttoptr i64 %or to ptr
5579 %1 = load float, ptr %0, align 4096
5580 %conv = fptoui float %1 to i8
5584 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5585 define dso_local zeroext i8 @ld_cst_align16_uint8_t_float() {
5586 ; CHECK-LABEL: ld_cst_align16_uint8_t_float:
5587 ; CHECK: # %bb.0: # %entry
5588 ; CHECK-NEXT: lfs f0, 4080(0)
5589 ; CHECK-NEXT: xscvdpsxws f0, f0
5590 ; CHECK-NEXT: mffprwz r3, f0
5593 %0 = load float, ptr inttoptr (i64 4080 to ptr), align 16
5594 %conv = fptoui float %0 to i8
5598 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5599 define dso_local zeroext i8 @ld_cst_align32_uint8_t_float() {
5600 ; CHECK-LABEL: ld_cst_align32_uint8_t_float:
5601 ; CHECK: # %bb.0: # %entry
5602 ; CHECK-NEXT: lis r3, 153
5603 ; CHECK-NEXT: lfs f0, -27108(r3)
5604 ; CHECK-NEXT: xscvdpsxws f0, f0
5605 ; CHECK-NEXT: mffprwz r3, f0
5608 %0 = load float, ptr inttoptr (i64 9999900 to ptr), align 4
5609 %conv = fptoui float %0 to i8
5613 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5614 define dso_local zeroext i8 @ld_cst_unalign64_uint8_t_float() {
5615 ; CHECK-P10-LABEL: ld_cst_unalign64_uint8_t_float:
5616 ; CHECK-P10: # %bb.0: # %entry
5617 ; CHECK-P10-NEXT: pli r3, 232
5618 ; CHECK-P10-NEXT: pli r4, 3567587329
5619 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
5620 ; CHECK-P10-NEXT: lfs f0, 0(r4)
5621 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5622 ; CHECK-P10-NEXT: mffprwz r3, f0
5623 ; CHECK-P10-NEXT: blr
5625 ; CHECK-PREP10-LABEL: ld_cst_unalign64_uint8_t_float:
5626 ; CHECK-PREP10: # %bb.0: # %entry
5627 ; CHECK-PREP10-NEXT: li r3, 29
5628 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
5629 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
5630 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
5631 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
5632 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5633 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5634 ; CHECK-PREP10-NEXT: blr
5636 %0 = load float, ptr inttoptr (i64 1000000000001 to ptr), align 4
5637 %conv = fptoui float %0 to i8
5641 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5642 define dso_local zeroext i8 @ld_cst_align64_uint8_t_float() {
5643 ; CHECK-P10-LABEL: ld_cst_align64_uint8_t_float:
5644 ; CHECK-P10: # %bb.0: # %entry
5645 ; CHECK-P10-NEXT: pli r3, 244140625
5646 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
5647 ; CHECK-P10-NEXT: lfs f0, 0(r3)
5648 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5649 ; CHECK-P10-NEXT: mffprwz r3, f0
5650 ; CHECK-P10-NEXT: blr
5652 ; CHECK-PREP10-LABEL: ld_cst_align64_uint8_t_float:
5653 ; CHECK-PREP10: # %bb.0: # %entry
5654 ; CHECK-PREP10-NEXT: lis r3, 3725
5655 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
5656 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
5657 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
5658 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5659 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5660 ; CHECK-PREP10-NEXT: blr
5662 %0 = load float, ptr inttoptr (i64 1000000000000 to ptr), align 4096
5663 %conv = fptoui float %0 to i8
5667 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5668 define dso_local zeroext i8 @ld_0_uint8_t_double(i64 %ptr) {
5669 ; CHECK-LABEL: ld_0_uint8_t_double:
5670 ; CHECK: # %bb.0: # %entry
5671 ; CHECK-NEXT: lfd f0, 0(r3)
5672 ; CHECK-NEXT: xscvdpsxws f0, f0
5673 ; CHECK-NEXT: mffprwz r3, f0
5676 %0 = inttoptr i64 %ptr to ptr
5677 %1 = load double, ptr %0, align 8
5678 %conv = fptoui double %1 to i8
5682 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5683 define dso_local zeroext i8 @ld_align16_uint8_t_double(ptr nocapture readonly %ptr) {
5684 ; CHECK-LABEL: ld_align16_uint8_t_double:
5685 ; CHECK: # %bb.0: # %entry
5686 ; CHECK-NEXT: lfd f0, 8(r3)
5687 ; CHECK-NEXT: xscvdpsxws f0, f0
5688 ; CHECK-NEXT: mffprwz r3, f0
5691 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
5692 %0 = load double, ptr %add.ptr, align 8
5693 %conv = fptoui double %0 to i8
5697 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5698 define dso_local zeroext i8 @ld_align32_uint8_t_double(ptr nocapture readonly %ptr) {
5699 ; CHECK-P10-LABEL: ld_align32_uint8_t_double:
5700 ; CHECK-P10: # %bb.0: # %entry
5701 ; CHECK-P10-NEXT: plfd f0, 99999000(r3), 0
5702 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5703 ; CHECK-P10-NEXT: mffprwz r3, f0
5704 ; CHECK-P10-NEXT: blr
5706 ; CHECK-PREP10-LABEL: ld_align32_uint8_t_double:
5707 ; CHECK-PREP10: # %bb.0: # %entry
5708 ; CHECK-PREP10-NEXT: lis r4, 1525
5709 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
5710 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
5711 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5712 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5713 ; CHECK-PREP10-NEXT: blr
5715 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
5716 %0 = load double, ptr %add.ptr, align 8
5717 %conv = fptoui double %0 to i8
5721 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5722 define dso_local zeroext i8 @ld_unalign64_uint8_t_double(ptr nocapture readonly %ptr) {
5723 ; CHECK-P10-LABEL: ld_unalign64_uint8_t_double:
5724 ; CHECK-P10: # %bb.0: # %entry
5725 ; CHECK-P10-NEXT: pli r4, 232
5726 ; CHECK-P10-NEXT: pli r5, 3567587329
5727 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
5728 ; CHECK-P10-NEXT: lfdx f0, r3, r5
5729 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5730 ; CHECK-P10-NEXT: mffprwz r3, f0
5731 ; CHECK-P10-NEXT: blr
5733 ; CHECK-PREP10-LABEL: ld_unalign64_uint8_t_double:
5734 ; CHECK-PREP10: # %bb.0: # %entry
5735 ; CHECK-PREP10-NEXT: li r4, 29
5736 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
5737 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
5738 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
5739 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
5740 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5741 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5742 ; CHECK-PREP10-NEXT: blr
5744 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000001
5745 %0 = load double, ptr %add.ptr, align 8
5746 %conv = fptoui double %0 to i8
5750 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5751 define dso_local zeroext i8 @ld_align64_uint8_t_double(ptr nocapture readonly %ptr) {
5752 ; CHECK-P10-LABEL: ld_align64_uint8_t_double:
5753 ; CHECK-P10: # %bb.0: # %entry
5754 ; CHECK-P10-NEXT: pli r4, 244140625
5755 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5756 ; CHECK-P10-NEXT: lfdx f0, r3, r4
5757 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5758 ; CHECK-P10-NEXT: mffprwz r3, f0
5759 ; CHECK-P10-NEXT: blr
5761 ; CHECK-PREP10-LABEL: ld_align64_uint8_t_double:
5762 ; CHECK-PREP10: # %bb.0: # %entry
5763 ; CHECK-PREP10-NEXT: lis r4, 3725
5764 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
5765 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
5766 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
5767 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5768 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5769 ; CHECK-PREP10-NEXT: blr
5771 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
5772 %0 = load double, ptr %add.ptr, align 8
5773 %conv = fptoui double %0 to i8
5777 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5778 define dso_local zeroext i8 @ld_reg_uint8_t_double(ptr nocapture readonly %ptr, i64 %off) {
5779 ; CHECK-LABEL: ld_reg_uint8_t_double:
5780 ; CHECK: # %bb.0: # %entry
5781 ; CHECK-NEXT: lfdx f0, r3, r4
5782 ; CHECK-NEXT: xscvdpsxws f0, f0
5783 ; CHECK-NEXT: mffprwz r3, f0
5786 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
5787 %0 = load double, ptr %add.ptr, align 8
5788 %conv = fptoui double %0 to i8
5792 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5793 define dso_local zeroext i8 @ld_or_uint8_t_double(i64 %ptr, i8 zeroext %off) {
5794 ; CHECK-LABEL: ld_or_uint8_t_double:
5795 ; CHECK: # %bb.0: # %entry
5796 ; CHECK-NEXT: or r3, r4, r3
5797 ; CHECK-NEXT: lfd f0, 0(r3)
5798 ; CHECK-NEXT: xscvdpsxws f0, f0
5799 ; CHECK-NEXT: mffprwz r3, f0
5802 %conv = zext i8 %off to i64
5803 %or = or i64 %conv, %ptr
5804 %0 = inttoptr i64 %or to ptr
5805 %1 = load double, ptr %0, align 8
5806 %conv1 = fptoui double %1 to i8
5810 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5811 define dso_local zeroext i8 @ld_not_disjoint16_uint8_t_double(i64 %ptr) {
5812 ; CHECK-LABEL: ld_not_disjoint16_uint8_t_double:
5813 ; CHECK: # %bb.0: # %entry
5814 ; CHECK-NEXT: ori r3, r3, 6
5815 ; CHECK-NEXT: lfd f0, 0(r3)
5816 ; CHECK-NEXT: xscvdpsxws f0, f0
5817 ; CHECK-NEXT: mffprwz r3, f0
5820 %or = or i64 %ptr, 6
5821 %0 = inttoptr i64 %or to ptr
5822 %1 = load double, ptr %0, align 8
5823 %conv = fptoui double %1 to i8
5827 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5828 define dso_local zeroext i8 @ld_disjoint_align16_uint8_t_double(i64 %ptr) {
5829 ; CHECK-LABEL: ld_disjoint_align16_uint8_t_double:
5830 ; CHECK: # %bb.0: # %entry
5831 ; CHECK-NEXT: rldicr r3, r3, 0, 51
5832 ; CHECK-NEXT: lfd f0, 24(r3)
5833 ; CHECK-NEXT: xscvdpsxws f0, f0
5834 ; CHECK-NEXT: mffprwz r3, f0
5837 %and = and i64 %ptr, -4096
5838 %or = or i64 %and, 24
5839 %0 = inttoptr i64 %or to ptr
5840 %1 = load double, ptr %0, align 8
5841 %conv = fptoui double %1 to i8
5845 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5846 define dso_local zeroext i8 @ld_not_disjoint32_uint8_t_double(i64 %ptr) {
5847 ; CHECK-LABEL: ld_not_disjoint32_uint8_t_double:
5848 ; CHECK: # %bb.0: # %entry
5849 ; CHECK-NEXT: ori r3, r3, 34463
5850 ; CHECK-NEXT: oris r3, r3, 1
5851 ; CHECK-NEXT: lfd f0, 0(r3)
5852 ; CHECK-NEXT: xscvdpsxws f0, f0
5853 ; CHECK-NEXT: mffprwz r3, f0
5856 %or = or i64 %ptr, 99999
5857 %0 = inttoptr i64 %or to ptr
5858 %1 = load double, ptr %0, align 8
5859 %conv = fptoui double %1 to i8
5863 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5864 define dso_local zeroext i8 @ld_disjoint_align32_uint8_t_double(i64 %ptr) {
5865 ; CHECK-P10-LABEL: ld_disjoint_align32_uint8_t_double:
5866 ; CHECK-P10: # %bb.0: # %entry
5867 ; CHECK-P10-NEXT: lis r4, -15264
5868 ; CHECK-P10-NEXT: and r3, r3, r4
5869 ; CHECK-P10-NEXT: plfd f0, 999990000(r3), 0
5870 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5871 ; CHECK-P10-NEXT: mffprwz r3, f0
5872 ; CHECK-P10-NEXT: blr
5874 ; CHECK-P9-LABEL: ld_disjoint_align32_uint8_t_double:
5875 ; CHECK-P9: # %bb.0: # %entry
5876 ; CHECK-P9-NEXT: lis r4, -15264
5877 ; CHECK-P9-NEXT: and r3, r3, r4
5878 ; CHECK-P9-NEXT: lis r4, 15258
5879 ; CHECK-P9-NEXT: ori r4, r4, 41712
5880 ; CHECK-P9-NEXT: lfdx f0, r3, r4
5881 ; CHECK-P9-NEXT: xscvdpsxws f0, f0
5882 ; CHECK-P9-NEXT: mffprwz r3, f0
5883 ; CHECK-P9-NEXT: blr
5885 ; CHECK-P8-LABEL: ld_disjoint_align32_uint8_t_double:
5886 ; CHECK-P8: # %bb.0: # %entry
5887 ; CHECK-P8-NEXT: lis r4, -15264
5888 ; CHECK-P8-NEXT: lis r5, 15258
5889 ; CHECK-P8-NEXT: and r3, r3, r4
5890 ; CHECK-P8-NEXT: ori r4, r5, 41712
5891 ; CHECK-P8-NEXT: lfdx f0, r3, r4
5892 ; CHECK-P8-NEXT: xscvdpsxws f0, f0
5893 ; CHECK-P8-NEXT: mffprwz r3, f0
5894 ; CHECK-P8-NEXT: blr
5896 %and = and i64 %ptr, -1000341504
5897 %or = or i64 %and, 999990000
5898 %0 = inttoptr i64 %or to ptr
5899 %1 = load double, ptr %0, align 16
5900 %conv = fptoui double %1 to i8
5904 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5905 define dso_local zeroext i8 @ld_not_disjoint64_uint8_t_double(i64 %ptr) {
5906 ; CHECK-P10-LABEL: ld_not_disjoint64_uint8_t_double:
5907 ; CHECK-P10: # %bb.0: # %entry
5908 ; CHECK-P10-NEXT: pli r4, 232
5909 ; CHECK-P10-NEXT: pli r5, 3567587329
5910 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
5911 ; CHECK-P10-NEXT: or r3, r3, r5
5912 ; CHECK-P10-NEXT: lfd f0, 0(r3)
5913 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5914 ; CHECK-P10-NEXT: mffprwz r3, f0
5915 ; CHECK-P10-NEXT: blr
5917 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint8_t_double:
5918 ; CHECK-PREP10: # %bb.0: # %entry
5919 ; CHECK-PREP10-NEXT: li r4, 29
5920 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
5921 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
5922 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
5923 ; CHECK-PREP10-NEXT: or r3, r3, r4
5924 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
5925 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5926 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5927 ; CHECK-PREP10-NEXT: blr
5929 %or = or i64 %ptr, 1000000000001
5930 %0 = inttoptr i64 %or to ptr
5931 %1 = load double, ptr %0, align 8
5932 %conv = fptoui double %1 to i8
5936 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5937 define dso_local zeroext i8 @ld_disjoint_unalign64_uint8_t_double(i64 %ptr) {
5938 ; CHECK-P10-LABEL: ld_disjoint_unalign64_uint8_t_double:
5939 ; CHECK-P10: # %bb.0: # %entry
5940 ; CHECK-P10-NEXT: pli r4, 232
5941 ; CHECK-P10-NEXT: pli r5, 3567587329
5942 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
5943 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
5944 ; CHECK-P10-NEXT: lfdx f0, r3, r5
5945 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5946 ; CHECK-P10-NEXT: mffprwz r3, f0
5947 ; CHECK-P10-NEXT: blr
5949 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint8_t_double:
5950 ; CHECK-PREP10: # %bb.0: # %entry
5951 ; CHECK-PREP10-NEXT: li r4, 29
5952 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
5953 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
5954 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
5955 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
5956 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
5957 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5958 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5959 ; CHECK-PREP10-NEXT: blr
5961 %and = and i64 %ptr, -1099511627776
5962 %or = or i64 %and, 1000000000001
5963 %0 = inttoptr i64 %or to ptr
5964 %1 = load double, ptr %0, align 8
5965 %conv = fptoui double %1 to i8
5969 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5970 define dso_local zeroext i8 @ld_disjoint_align64_uint8_t_double(i64 %ptr) {
5971 ; CHECK-P10-LABEL: ld_disjoint_align64_uint8_t_double:
5972 ; CHECK-P10: # %bb.0: # %entry
5973 ; CHECK-P10-NEXT: pli r4, 244140625
5974 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
5975 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5976 ; CHECK-P10-NEXT: lfdx f0, r3, r4
5977 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5978 ; CHECK-P10-NEXT: mffprwz r3, f0
5979 ; CHECK-P10-NEXT: blr
5981 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint8_t_double:
5982 ; CHECK-PREP10: # %bb.0: # %entry
5983 ; CHECK-PREP10-NEXT: lis r4, 3725
5984 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
5985 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
5986 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
5987 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
5988 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5989 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5990 ; CHECK-PREP10-NEXT: blr
5992 %and = and i64 %ptr, -1099511627776
5993 %or = or i64 %and, 1000000000000
5994 %0 = inttoptr i64 %or to ptr
5995 %1 = load double, ptr %0, align 4096
5996 %conv = fptoui double %1 to i8
6000 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
6001 define dso_local zeroext i8 @ld_cst_align16_uint8_t_double() {
6002 ; CHECK-LABEL: ld_cst_align16_uint8_t_double:
6003 ; CHECK: # %bb.0: # %entry
6004 ; CHECK-NEXT: lfd f0, 4080(0)
6005 ; CHECK-NEXT: xscvdpsxws f0, f0
6006 ; CHECK-NEXT: mffprwz r3, f0
6009 %0 = load double, ptr inttoptr (i64 4080 to ptr), align 16
6010 %conv = fptoui double %0 to i8
6014 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
6015 define dso_local zeroext i8 @ld_cst_align32_uint8_t_double() {
6016 ; CHECK-LABEL: ld_cst_align32_uint8_t_double:
6017 ; CHECK: # %bb.0: # %entry
6018 ; CHECK-NEXT: lis r3, 153
6019 ; CHECK-NEXT: lfd f0, -27108(r3)
6020 ; CHECK-NEXT: xscvdpsxws f0, f0
6021 ; CHECK-NEXT: mffprwz r3, f0
6024 %0 = load double, ptr inttoptr (i64 9999900 to ptr), align 8
6025 %conv = fptoui double %0 to i8
6029 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
6030 define dso_local zeroext i8 @ld_cst_unalign64_uint8_t_double() {
6031 ; CHECK-P10-LABEL: ld_cst_unalign64_uint8_t_double:
6032 ; CHECK-P10: # %bb.0: # %entry
6033 ; CHECK-P10-NEXT: pli r3, 232
6034 ; CHECK-P10-NEXT: pli r4, 3567587329
6035 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
6036 ; CHECK-P10-NEXT: lfd f0, 0(r4)
6037 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
6038 ; CHECK-P10-NEXT: mffprwz r3, f0
6039 ; CHECK-P10-NEXT: blr
6041 ; CHECK-PREP10-LABEL: ld_cst_unalign64_uint8_t_double:
6042 ; CHECK-PREP10: # %bb.0: # %entry
6043 ; CHECK-PREP10-NEXT: li r3, 29
6044 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
6045 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
6046 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
6047 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
6048 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
6049 ; CHECK-PREP10-NEXT: mffprwz r3, f0
6050 ; CHECK-PREP10-NEXT: blr
6052 %0 = load double, ptr inttoptr (i64 1000000000001 to ptr), align 8
6053 %conv = fptoui double %0 to i8
6057 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
6058 define dso_local zeroext i8 @ld_cst_align64_uint8_t_double() {
6059 ; CHECK-P10-LABEL: ld_cst_align64_uint8_t_double:
6060 ; CHECK-P10: # %bb.0: # %entry
6061 ; CHECK-P10-NEXT: pli r3, 244140625
6062 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
6063 ; CHECK-P10-NEXT: lfd f0, 0(r3)
6064 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
6065 ; CHECK-P10-NEXT: mffprwz r3, f0
6066 ; CHECK-P10-NEXT: blr
6068 ; CHECK-PREP10-LABEL: ld_cst_align64_uint8_t_double:
6069 ; CHECK-PREP10: # %bb.0: # %entry
6070 ; CHECK-PREP10-NEXT: lis r3, 3725
6071 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
6072 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
6073 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
6074 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
6075 ; CHECK-PREP10-NEXT: mffprwz r3, f0
6076 ; CHECK-PREP10-NEXT: blr
6078 %0 = load double, ptr inttoptr (i64 1000000000000 to ptr), align 4096
6079 %conv = fptoui double %0 to i8
6083 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6084 define dso_local void @st_0_uint8_t_uint8_t(i64 %ptr, i8 zeroext %str) {
6085 ; CHECK-LABEL: st_0_uint8_t_uint8_t:
6086 ; CHECK: # %bb.0: # %entry
6087 ; CHECK-NEXT: stb r4, 0(r3)
6090 %0 = inttoptr i64 %ptr to ptr
6091 store i8 %str, ptr %0, align 1
6095 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6096 define dso_local void @st_align16_uint8_t_uint8_t(ptr nocapture %ptr, i8 zeroext %str) {
6097 ; CHECK-LABEL: st_align16_uint8_t_uint8_t:
6098 ; CHECK: # %bb.0: # %entry
6099 ; CHECK-NEXT: stb r4, 8(r3)
6102 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
6103 store i8 %str, ptr %add.ptr, align 1
6107 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6108 define dso_local void @st_align32_uint8_t_uint8_t(ptr nocapture %ptr, i8 zeroext %str) {
6109 ; CHECK-P10-LABEL: st_align32_uint8_t_uint8_t:
6110 ; CHECK-P10: # %bb.0: # %entry
6111 ; CHECK-P10-NEXT: pstb r4, 99999000(r3), 0
6112 ; CHECK-P10-NEXT: blr
6114 ; CHECK-PREP10-LABEL: st_align32_uint8_t_uint8_t:
6115 ; CHECK-PREP10: # %bb.0: # %entry
6116 ; CHECK-PREP10-NEXT: lis r5, 1525
6117 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
6118 ; CHECK-PREP10-NEXT: stbx r4, r3, r5
6119 ; CHECK-PREP10-NEXT: blr
6121 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
6122 store i8 %str, ptr %add.ptr, align 1
6126 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6127 define dso_local void @st_align64_uint8_t_uint8_t(ptr nocapture %ptr, i8 zeroext %str) {
6128 ; CHECK-P10-LABEL: st_align64_uint8_t_uint8_t:
6129 ; CHECK-P10: # %bb.0: # %entry
6130 ; CHECK-P10-NEXT: pli r5, 244140625
6131 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6132 ; CHECK-P10-NEXT: stbx r4, r3, r5
6133 ; CHECK-P10-NEXT: blr
6135 ; CHECK-PREP10-LABEL: st_align64_uint8_t_uint8_t:
6136 ; CHECK-PREP10: # %bb.0: # %entry
6137 ; CHECK-PREP10-NEXT: lis r5, 3725
6138 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6139 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6140 ; CHECK-PREP10-NEXT: stbx r4, r3, r5
6141 ; CHECK-PREP10-NEXT: blr
6143 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
6144 store i8 %str, ptr %add.ptr, align 1
6148 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6149 define dso_local void @st_reg_uint8_t_uint8_t(ptr nocapture %ptr, i64 %off, i8 zeroext %str) {
6150 ; CHECK-LABEL: st_reg_uint8_t_uint8_t:
6151 ; CHECK: # %bb.0: # %entry
6152 ; CHECK-NEXT: stbx r5, r3, r4
6155 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
6156 store i8 %str, ptr %add.ptr, align 1
6160 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6161 define dso_local void @st_or1_uint8_t_uint8_t(i64 %ptr, i8 zeroext %off, i8 zeroext %str) {
6162 ; CHECK-LABEL: st_or1_uint8_t_uint8_t:
6163 ; CHECK: # %bb.0: # %entry
6164 ; CHECK-NEXT: or r3, r4, r3
6165 ; CHECK-NEXT: stb r5, 0(r3)
6168 %conv = zext i8 %off to i64
6169 %or = or i64 %conv, %ptr
6170 %0 = inttoptr i64 %or to ptr
6171 store i8 %str, ptr %0, align 1
6175 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6176 define dso_local void @st_not_disjoint16_uint8_t_uint8_t(i64 %ptr, i8 zeroext %str) {
6177 ; CHECK-LABEL: st_not_disjoint16_uint8_t_uint8_t:
6178 ; CHECK: # %bb.0: # %entry
6179 ; CHECK-NEXT: ori r3, r3, 6
6180 ; CHECK-NEXT: stb r4, 0(r3)
6183 %or = or i64 %ptr, 6
6184 %0 = inttoptr i64 %or to ptr
6185 store i8 %str, ptr %0, align 1
6189 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6190 define dso_local void @st_disjoint_align16_uint8_t_uint8_t(i64 %ptr, i8 zeroext %str) {
6191 ; CHECK-LABEL: st_disjoint_align16_uint8_t_uint8_t:
6192 ; CHECK: # %bb.0: # %entry
6193 ; CHECK-NEXT: rldicr r3, r3, 0, 51
6194 ; CHECK-NEXT: stb r4, 24(r3)
6197 %and = and i64 %ptr, -4096
6198 %or = or i64 %and, 24
6199 %0 = inttoptr i64 %or to ptr
6200 store i8 %str, ptr %0, align 8
6204 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6205 define dso_local void @st_not_disjoint32_uint8_t_uint8_t(i64 %ptr, i8 zeroext %str) {
6206 ; CHECK-LABEL: st_not_disjoint32_uint8_t_uint8_t:
6207 ; CHECK: # %bb.0: # %entry
6208 ; CHECK-NEXT: ori r3, r3, 34463
6209 ; CHECK-NEXT: oris r3, r3, 1
6210 ; CHECK-NEXT: stb r4, 0(r3)
6213 %or = or i64 %ptr, 99999
6214 %0 = inttoptr i64 %or to ptr
6215 store i8 %str, ptr %0, align 1
6219 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6220 define dso_local void @st_disjoint_align32_uint8_t_uint8_t(i64 %ptr, i8 zeroext %str) {
6221 ; CHECK-P10-LABEL: st_disjoint_align32_uint8_t_uint8_t:
6222 ; CHECK-P10: # %bb.0: # %entry
6223 ; CHECK-P10-NEXT: lis r5, -15264
6224 ; CHECK-P10-NEXT: and r3, r3, r5
6225 ; CHECK-P10-NEXT: pstb r4, 999990000(r3), 0
6226 ; CHECK-P10-NEXT: blr
6228 ; CHECK-P9-LABEL: st_disjoint_align32_uint8_t_uint8_t:
6229 ; CHECK-P9: # %bb.0: # %entry
6230 ; CHECK-P9-NEXT: lis r5, -15264
6231 ; CHECK-P9-NEXT: and r3, r3, r5
6232 ; CHECK-P9-NEXT: lis r5, 15258
6233 ; CHECK-P9-NEXT: ori r5, r5, 41712
6234 ; CHECK-P9-NEXT: stbx r4, r3, r5
6235 ; CHECK-P9-NEXT: blr
6237 ; CHECK-P8-LABEL: st_disjoint_align32_uint8_t_uint8_t:
6238 ; CHECK-P8: # %bb.0: # %entry
6239 ; CHECK-P8-NEXT: lis r5, -15264
6240 ; CHECK-P8-NEXT: lis r6, 15258
6241 ; CHECK-P8-NEXT: and r3, r3, r5
6242 ; CHECK-P8-NEXT: ori r5, r6, 41712
6243 ; CHECK-P8-NEXT: stbx r4, r3, r5
6244 ; CHECK-P8-NEXT: blr
6246 %and = and i64 %ptr, -1000341504
6247 %or = or i64 %and, 999990000
6248 %0 = inttoptr i64 %or to ptr
6249 store i8 %str, ptr %0, align 16
6253 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6254 define dso_local void @st_not_disjoint64_uint8_t_uint8_t(i64 %ptr, i8 zeroext %str) {
6255 ; CHECK-P10-LABEL: st_not_disjoint64_uint8_t_uint8_t:
6256 ; CHECK-P10: # %bb.0: # %entry
6257 ; CHECK-P10-NEXT: pli r5, 232
6258 ; CHECK-P10-NEXT: pli r6, 3567587329
6259 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
6260 ; CHECK-P10-NEXT: or r3, r3, r6
6261 ; CHECK-P10-NEXT: stb r4, 0(r3)
6262 ; CHECK-P10-NEXT: blr
6264 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint8_t_uint8_t:
6265 ; CHECK-PREP10: # %bb.0: # %entry
6266 ; CHECK-PREP10-NEXT: li r5, 29
6267 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
6268 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
6269 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
6270 ; CHECK-PREP10-NEXT: or r3, r3, r5
6271 ; CHECK-PREP10-NEXT: stb r4, 0(r3)
6272 ; CHECK-PREP10-NEXT: blr
6274 %or = or i64 %ptr, 1000000000001
6275 %0 = inttoptr i64 %or to ptr
6276 store i8 %str, ptr %0, align 1
6280 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6281 define dso_local void @st_disjoint_align64_uint8_t_uint8_t(i64 %ptr, i8 zeroext %str) {
6282 ; CHECK-P10-LABEL: st_disjoint_align64_uint8_t_uint8_t:
6283 ; CHECK-P10: # %bb.0: # %entry
6284 ; CHECK-P10-NEXT: pli r5, 244140625
6285 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
6286 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6287 ; CHECK-P10-NEXT: stbx r4, r3, r5
6288 ; CHECK-P10-NEXT: blr
6290 ; CHECK-PREP10-LABEL: st_disjoint_align64_uint8_t_uint8_t:
6291 ; CHECK-PREP10: # %bb.0: # %entry
6292 ; CHECK-PREP10-NEXT: lis r5, 3725
6293 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
6294 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6295 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6296 ; CHECK-PREP10-NEXT: stbx r4, r3, r5
6297 ; CHECK-PREP10-NEXT: blr
6299 %and = and i64 %ptr, -1099511627776
6300 %or = or i64 %and, 1000000000000
6301 %0 = inttoptr i64 %or to ptr
6302 store i8 %str, ptr %0, align 4096
6306 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6307 define dso_local void @st_cst_align16_uint8_t_uint8_t(i8 zeroext %str) {
6308 ; CHECK-LABEL: st_cst_align16_uint8_t_uint8_t:
6309 ; CHECK: # %bb.0: # %entry
6310 ; CHECK-NEXT: stb r3, 4080(0)
6313 store i8 %str, ptr inttoptr (i64 4080 to ptr), align 16
6317 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6318 define dso_local void @st_cst_align32_uint8_t_uint8_t(i8 zeroext %str) {
6319 ; CHECK-LABEL: st_cst_align32_uint8_t_uint8_t:
6320 ; CHECK: # %bb.0: # %entry
6321 ; CHECK-NEXT: lis r4, 153
6322 ; CHECK-NEXT: stb r3, -27108(r4)
6325 store i8 %str, ptr inttoptr (i64 9999900 to ptr), align 4
6329 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6330 define dso_local void @st_cst_align64_uint8_t_uint8_t(i8 zeroext %str) {
6331 ; CHECK-P10-LABEL: st_cst_align64_uint8_t_uint8_t:
6332 ; CHECK-P10: # %bb.0: # %entry
6333 ; CHECK-P10-NEXT: pli r4, 244140625
6334 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6335 ; CHECK-P10-NEXT: stb r3, 0(r4)
6336 ; CHECK-P10-NEXT: blr
6338 ; CHECK-PREP10-LABEL: st_cst_align64_uint8_t_uint8_t:
6339 ; CHECK-PREP10: # %bb.0: # %entry
6340 ; CHECK-PREP10-NEXT: lis r4, 3725
6341 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
6342 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
6343 ; CHECK-PREP10-NEXT: stb r3, 0(r4)
6344 ; CHECK-PREP10-NEXT: blr
6346 store i8 %str, ptr inttoptr (i64 1000000000000 to ptr), align 4096
6350 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6351 define dso_local void @st_0_uint8_t_uint16_t(i64 %ptr, i8 zeroext %str) {
6352 ; CHECK-LABEL: st_0_uint8_t_uint16_t:
6353 ; CHECK: # %bb.0: # %entry
6354 ; CHECK-NEXT: sth r4, 0(r3)
6357 %conv = zext i8 %str to i16
6358 %0 = inttoptr i64 %ptr to ptr
6359 store i16 %conv, ptr %0, align 2
6363 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6364 define dso_local void @st_align16_uint8_t_uint16_t(ptr nocapture %ptr, i8 zeroext %str) {
6365 ; CHECK-LABEL: st_align16_uint8_t_uint16_t:
6366 ; CHECK: # %bb.0: # %entry
6367 ; CHECK-NEXT: sth r4, 8(r3)
6370 %conv = zext i8 %str to i16
6371 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
6372 store i16 %conv, ptr %add.ptr, align 2
6376 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6377 define dso_local void @st_align32_uint8_t_uint16_t(ptr nocapture %ptr, i8 zeroext %str) {
6378 ; CHECK-P10-LABEL: st_align32_uint8_t_uint16_t:
6379 ; CHECK-P10: # %bb.0: # %entry
6380 ; CHECK-P10-NEXT: psth r4, 99999000(r3), 0
6381 ; CHECK-P10-NEXT: blr
6383 ; CHECK-PREP10-LABEL: st_align32_uint8_t_uint16_t:
6384 ; CHECK-PREP10: # %bb.0: # %entry
6385 ; CHECK-PREP10-NEXT: lis r5, 1525
6386 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
6387 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
6388 ; CHECK-PREP10-NEXT: blr
6390 %conv = zext i8 %str to i16
6391 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
6392 store i16 %conv, ptr %add.ptr, align 2
6396 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6397 define dso_local void @st_align64_uint8_t_uint16_t(ptr nocapture %ptr, i8 zeroext %str) {
6398 ; CHECK-P10-LABEL: st_align64_uint8_t_uint16_t:
6399 ; CHECK-P10: # %bb.0: # %entry
6400 ; CHECK-P10-NEXT: pli r5, 244140625
6401 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6402 ; CHECK-P10-NEXT: sthx r4, r3, r5
6403 ; CHECK-P10-NEXT: blr
6405 ; CHECK-PREP10-LABEL: st_align64_uint8_t_uint16_t:
6406 ; CHECK-PREP10: # %bb.0: # %entry
6407 ; CHECK-PREP10-NEXT: lis r5, 3725
6408 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6409 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6410 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
6411 ; CHECK-PREP10-NEXT: blr
6413 %conv = zext i8 %str to i16
6414 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
6415 store i16 %conv, ptr %add.ptr, align 2
6419 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6420 define dso_local void @st_reg_uint8_t_uint16_t(ptr nocapture %ptr, i64 %off, i8 zeroext %str) {
6421 ; CHECK-LABEL: st_reg_uint8_t_uint16_t:
6422 ; CHECK: # %bb.0: # %entry
6423 ; CHECK-NEXT: sthx r5, r3, r4
6426 %conv = zext i8 %str to i16
6427 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
6428 store i16 %conv, ptr %add.ptr, align 2
6432 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6433 define dso_local void @st_or1_uint8_t_uint16_t(i64 %ptr, i8 zeroext %off, i8 zeroext %str) {
6434 ; CHECK-LABEL: st_or1_uint8_t_uint16_t:
6435 ; CHECK: # %bb.0: # %entry
6436 ; CHECK-NEXT: or r3, r4, r3
6437 ; CHECK-NEXT: sth r5, 0(r3)
6440 %conv = zext i8 %str to i16
6441 %conv1 = zext i8 %off to i64
6442 %or = or i64 %conv1, %ptr
6443 %0 = inttoptr i64 %or to ptr
6444 store i16 %conv, ptr %0, align 2
6448 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6449 define dso_local void @st_not_disjoint16_uint8_t_uint16_t(i64 %ptr, i8 zeroext %str) {
6450 ; CHECK-LABEL: st_not_disjoint16_uint8_t_uint16_t:
6451 ; CHECK: # %bb.0: # %entry
6452 ; CHECK-NEXT: ori r3, r3, 6
6453 ; CHECK-NEXT: sth r4, 0(r3)
6456 %conv = zext i8 %str to i16
6457 %or = or i64 %ptr, 6
6458 %0 = inttoptr i64 %or to ptr
6459 store i16 %conv, ptr %0, align 2
6463 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6464 define dso_local void @st_disjoint_align16_uint8_t_uint16_t(i64 %ptr, i8 zeroext %str) {
6465 ; CHECK-LABEL: st_disjoint_align16_uint8_t_uint16_t:
6466 ; CHECK: # %bb.0: # %entry
6467 ; CHECK-NEXT: rldicr r3, r3, 0, 51
6468 ; CHECK-NEXT: sth r4, 24(r3)
6471 %and = and i64 %ptr, -4096
6472 %conv = zext i8 %str to i16
6473 %or = or i64 %and, 24
6474 %0 = inttoptr i64 %or to ptr
6475 store i16 %conv, ptr %0, align 8
6479 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6480 define dso_local void @st_not_disjoint32_uint8_t_uint16_t(i64 %ptr, i8 zeroext %str) {
6481 ; CHECK-LABEL: st_not_disjoint32_uint8_t_uint16_t:
6482 ; CHECK: # %bb.0: # %entry
6483 ; CHECK-NEXT: ori r3, r3, 34463
6484 ; CHECK-NEXT: oris r3, r3, 1
6485 ; CHECK-NEXT: sth r4, 0(r3)
6488 %conv = zext i8 %str to i16
6489 %or = or i64 %ptr, 99999
6490 %0 = inttoptr i64 %or to ptr
6491 store i16 %conv, ptr %0, align 2
6495 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6496 define dso_local void @st_disjoint_align32_uint8_t_uint16_t(i64 %ptr, i8 zeroext %str) {
6497 ; CHECK-P10-LABEL: st_disjoint_align32_uint8_t_uint16_t:
6498 ; CHECK-P10: # %bb.0: # %entry
6499 ; CHECK-P10-NEXT: lis r5, -15264
6500 ; CHECK-P10-NEXT: and r3, r3, r5
6501 ; CHECK-P10-NEXT: psth r4, 999990000(r3), 0
6502 ; CHECK-P10-NEXT: blr
6504 ; CHECK-P9-LABEL: st_disjoint_align32_uint8_t_uint16_t:
6505 ; CHECK-P9: # %bb.0: # %entry
6506 ; CHECK-P9-NEXT: lis r5, -15264
6507 ; CHECK-P9-NEXT: and r3, r3, r5
6508 ; CHECK-P9-NEXT: lis r5, 15258
6509 ; CHECK-P9-NEXT: ori r5, r5, 41712
6510 ; CHECK-P9-NEXT: sthx r4, r3, r5
6511 ; CHECK-P9-NEXT: blr
6513 ; CHECK-P8-LABEL: st_disjoint_align32_uint8_t_uint16_t:
6514 ; CHECK-P8: # %bb.0: # %entry
6515 ; CHECK-P8-NEXT: lis r5, -15264
6516 ; CHECK-P8-NEXT: lis r6, 15258
6517 ; CHECK-P8-NEXT: and r3, r3, r5
6518 ; CHECK-P8-NEXT: ori r5, r6, 41712
6519 ; CHECK-P8-NEXT: sthx r4, r3, r5
6520 ; CHECK-P8-NEXT: blr
6522 %and = and i64 %ptr, -1000341504
6523 %conv = zext i8 %str to i16
6524 %or = or i64 %and, 999990000
6525 %0 = inttoptr i64 %or to ptr
6526 store i16 %conv, ptr %0, align 16
6530 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6531 define dso_local void @st_not_disjoint64_uint8_t_uint16_t(i64 %ptr, i8 zeroext %str) {
6532 ; CHECK-P10-LABEL: st_not_disjoint64_uint8_t_uint16_t:
6533 ; CHECK-P10: # %bb.0: # %entry
6534 ; CHECK-P10-NEXT: pli r5, 232
6535 ; CHECK-P10-NEXT: pli r6, 3567587329
6536 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
6537 ; CHECK-P10-NEXT: or r3, r3, r6
6538 ; CHECK-P10-NEXT: sth r4, 0(r3)
6539 ; CHECK-P10-NEXT: blr
6541 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint8_t_uint16_t:
6542 ; CHECK-PREP10: # %bb.0: # %entry
6543 ; CHECK-PREP10-NEXT: li r5, 29
6544 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
6545 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
6546 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
6547 ; CHECK-PREP10-NEXT: or r3, r3, r5
6548 ; CHECK-PREP10-NEXT: sth r4, 0(r3)
6549 ; CHECK-PREP10-NEXT: blr
6551 %conv = zext i8 %str to i16
6552 %or = or i64 %ptr, 1000000000001
6553 %0 = inttoptr i64 %or to ptr
6554 store i16 %conv, ptr %0, align 2
6558 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6559 define dso_local void @st_disjoint_align64_uint8_t_uint16_t(i64 %ptr, i8 zeroext %str) {
6560 ; CHECK-P10-LABEL: st_disjoint_align64_uint8_t_uint16_t:
6561 ; CHECK-P10: # %bb.0: # %entry
6562 ; CHECK-P10-NEXT: pli r5, 244140625
6563 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
6564 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6565 ; CHECK-P10-NEXT: sthx r4, r3, r5
6566 ; CHECK-P10-NEXT: blr
6568 ; CHECK-PREP10-LABEL: st_disjoint_align64_uint8_t_uint16_t:
6569 ; CHECK-PREP10: # %bb.0: # %entry
6570 ; CHECK-PREP10-NEXT: lis r5, 3725
6571 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
6572 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6573 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6574 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
6575 ; CHECK-PREP10-NEXT: blr
6577 %and = and i64 %ptr, -1099511627776
6578 %conv = zext i8 %str to i16
6579 %or = or i64 %and, 1000000000000
6580 %0 = inttoptr i64 %or to ptr
6581 store i16 %conv, ptr %0, align 4096
6585 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6586 define dso_local void @st_cst_align16_uint8_t_uint16_t(i8 zeroext %str) {
6587 ; CHECK-LABEL: st_cst_align16_uint8_t_uint16_t:
6588 ; CHECK: # %bb.0: # %entry
6589 ; CHECK-NEXT: sth r3, 4080(0)
6592 %conv = zext i8 %str to i16
6593 store i16 %conv, ptr inttoptr (i64 4080 to ptr), align 16
6597 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6598 define dso_local void @st_cst_align32_uint8_t_uint16_t(i8 zeroext %str) {
6599 ; CHECK-LABEL: st_cst_align32_uint8_t_uint16_t:
6600 ; CHECK: # %bb.0: # %entry
6601 ; CHECK-NEXT: lis r4, 153
6602 ; CHECK-NEXT: sth r3, -27108(r4)
6605 %conv = zext i8 %str to i16
6606 store i16 %conv, ptr inttoptr (i64 9999900 to ptr), align 4
6610 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6611 define dso_local void @st_cst_align64_uint8_t_uint16_t(i8 zeroext %str) {
6612 ; CHECK-P10-LABEL: st_cst_align64_uint8_t_uint16_t:
6613 ; CHECK-P10: # %bb.0: # %entry
6614 ; CHECK-P10-NEXT: pli r4, 244140625
6615 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6616 ; CHECK-P10-NEXT: sth r3, 0(r4)
6617 ; CHECK-P10-NEXT: blr
6619 ; CHECK-PREP10-LABEL: st_cst_align64_uint8_t_uint16_t:
6620 ; CHECK-PREP10: # %bb.0: # %entry
6621 ; CHECK-PREP10-NEXT: lis r4, 3725
6622 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
6623 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
6624 ; CHECK-PREP10-NEXT: sth r3, 0(r4)
6625 ; CHECK-PREP10-NEXT: blr
6627 %conv = zext i8 %str to i16
6628 store i16 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
6632 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6633 define dso_local void @st_0_uint8_t_uint32_t(i64 %ptr, i8 zeroext %str) {
6634 ; CHECK-LABEL: st_0_uint8_t_uint32_t:
6635 ; CHECK: # %bb.0: # %entry
6636 ; CHECK-NEXT: stw r4, 0(r3)
6639 %conv = zext i8 %str to i32
6640 %0 = inttoptr i64 %ptr to ptr
6641 store i32 %conv, ptr %0, align 4
6645 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6646 define dso_local void @st_align16_uint8_t_uint32_t(ptr nocapture %ptr, i8 zeroext %str) {
6647 ; CHECK-LABEL: st_align16_uint8_t_uint32_t:
6648 ; CHECK: # %bb.0: # %entry
6649 ; CHECK-NEXT: stw r4, 8(r3)
6652 %conv = zext i8 %str to i32
6653 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
6654 store i32 %conv, ptr %add.ptr, align 4
6658 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6659 define dso_local void @st_align32_uint8_t_uint32_t(ptr nocapture %ptr, i8 zeroext %str) {
6660 ; CHECK-P10-LABEL: st_align32_uint8_t_uint32_t:
6661 ; CHECK-P10: # %bb.0: # %entry
6662 ; CHECK-P10-NEXT: pstw r4, 99999000(r3), 0
6663 ; CHECK-P10-NEXT: blr
6665 ; CHECK-PREP10-LABEL: st_align32_uint8_t_uint32_t:
6666 ; CHECK-PREP10: # %bb.0: # %entry
6667 ; CHECK-PREP10-NEXT: lis r5, 1525
6668 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
6669 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
6670 ; CHECK-PREP10-NEXT: blr
6672 %conv = zext i8 %str to i32
6673 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
6674 store i32 %conv, ptr %add.ptr, align 4
6678 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6679 define dso_local void @st_align64_uint8_t_uint32_t(ptr nocapture %ptr, i8 zeroext %str) {
6680 ; CHECK-P10-LABEL: st_align64_uint8_t_uint32_t:
6681 ; CHECK-P10: # %bb.0: # %entry
6682 ; CHECK-P10-NEXT: pli r5, 244140625
6683 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6684 ; CHECK-P10-NEXT: stwx r4, r3, r5
6685 ; CHECK-P10-NEXT: blr
6687 ; CHECK-PREP10-LABEL: st_align64_uint8_t_uint32_t:
6688 ; CHECK-PREP10: # %bb.0: # %entry
6689 ; CHECK-PREP10-NEXT: lis r5, 3725
6690 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6691 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6692 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
6693 ; CHECK-PREP10-NEXT: blr
6695 %conv = zext i8 %str to i32
6696 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
6697 store i32 %conv, ptr %add.ptr, align 4
6701 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6702 define dso_local void @st_reg_uint8_t_uint32_t(ptr nocapture %ptr, i64 %off, i8 zeroext %str) {
6703 ; CHECK-LABEL: st_reg_uint8_t_uint32_t:
6704 ; CHECK: # %bb.0: # %entry
6705 ; CHECK-NEXT: stwx r5, r3, r4
6708 %conv = zext i8 %str to i32
6709 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
6710 store i32 %conv, ptr %add.ptr, align 4
6714 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6715 define dso_local void @st_or1_uint8_t_uint32_t(i64 %ptr, i8 zeroext %off, i8 zeroext %str) {
6716 ; CHECK-LABEL: st_or1_uint8_t_uint32_t:
6717 ; CHECK: # %bb.0: # %entry
6718 ; CHECK-NEXT: or r3, r4, r3
6719 ; CHECK-NEXT: stw r5, 0(r3)
6722 %conv = zext i8 %str to i32
6723 %conv1 = zext i8 %off to i64
6724 %or = or i64 %conv1, %ptr
6725 %0 = inttoptr i64 %or to ptr
6726 store i32 %conv, ptr %0, align 4
6730 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6731 define dso_local void @st_not_disjoint16_uint8_t_uint32_t(i64 %ptr, i8 zeroext %str) {
6732 ; CHECK-LABEL: st_not_disjoint16_uint8_t_uint32_t:
6733 ; CHECK: # %bb.0: # %entry
6734 ; CHECK-NEXT: ori r3, r3, 6
6735 ; CHECK-NEXT: stw r4, 0(r3)
6738 %conv = zext i8 %str to i32
6739 %or = or i64 %ptr, 6
6740 %0 = inttoptr i64 %or to ptr
6741 store i32 %conv, ptr %0, align 4
6745 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6746 define dso_local void @st_disjoint_align16_uint8_t_uint32_t(i64 %ptr, i8 zeroext %str) {
6747 ; CHECK-LABEL: st_disjoint_align16_uint8_t_uint32_t:
6748 ; CHECK: # %bb.0: # %entry
6749 ; CHECK-NEXT: rldicr r3, r3, 0, 51
6750 ; CHECK-NEXT: stw r4, 24(r3)
6753 %and = and i64 %ptr, -4096
6754 %conv = zext i8 %str to i32
6755 %or = or i64 %and, 24
6756 %0 = inttoptr i64 %or to ptr
6757 store i32 %conv, ptr %0, align 8
6761 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6762 define dso_local void @st_not_disjoint32_uint8_t_uint32_t(i64 %ptr, i8 zeroext %str) {
6763 ; CHECK-LABEL: st_not_disjoint32_uint8_t_uint32_t:
6764 ; CHECK: # %bb.0: # %entry
6765 ; CHECK-NEXT: ori r3, r3, 34463
6766 ; CHECK-NEXT: oris r3, r3, 1
6767 ; CHECK-NEXT: stw r4, 0(r3)
6770 %conv = zext i8 %str to i32
6771 %or = or i64 %ptr, 99999
6772 %0 = inttoptr i64 %or to ptr
6773 store i32 %conv, ptr %0, align 4
6777 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6778 define dso_local void @st_disjoint_align32_uint8_t_uint32_t(i64 %ptr, i8 zeroext %str) {
6779 ; CHECK-P10-LABEL: st_disjoint_align32_uint8_t_uint32_t:
6780 ; CHECK-P10: # %bb.0: # %entry
6781 ; CHECK-P10-NEXT: lis r5, -15264
6782 ; CHECK-P10-NEXT: and r3, r3, r5
6783 ; CHECK-P10-NEXT: pstw r4, 999990000(r3), 0
6784 ; CHECK-P10-NEXT: blr
6786 ; CHECK-P9-LABEL: st_disjoint_align32_uint8_t_uint32_t:
6787 ; CHECK-P9: # %bb.0: # %entry
6788 ; CHECK-P9-NEXT: lis r5, -15264
6789 ; CHECK-P9-NEXT: and r3, r3, r5
6790 ; CHECK-P9-NEXT: lis r5, 15258
6791 ; CHECK-P9-NEXT: ori r5, r5, 41712
6792 ; CHECK-P9-NEXT: stwx r4, r3, r5
6793 ; CHECK-P9-NEXT: blr
6795 ; CHECK-P8-LABEL: st_disjoint_align32_uint8_t_uint32_t:
6796 ; CHECK-P8: # %bb.0: # %entry
6797 ; CHECK-P8-NEXT: lis r5, -15264
6798 ; CHECK-P8-NEXT: lis r6, 15258
6799 ; CHECK-P8-NEXT: and r3, r3, r5
6800 ; CHECK-P8-NEXT: ori r5, r6, 41712
6801 ; CHECK-P8-NEXT: stwx r4, r3, r5
6802 ; CHECK-P8-NEXT: blr
6804 %and = and i64 %ptr, -1000341504
6805 %conv = zext i8 %str to i32
6806 %or = or i64 %and, 999990000
6807 %0 = inttoptr i64 %or to ptr
6808 store i32 %conv, ptr %0, align 16
6812 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6813 define dso_local void @st_not_disjoint64_uint8_t_uint32_t(i64 %ptr, i8 zeroext %str) {
6814 ; CHECK-P10-LABEL: st_not_disjoint64_uint8_t_uint32_t:
6815 ; CHECK-P10: # %bb.0: # %entry
6816 ; CHECK-P10-NEXT: pli r5, 232
6817 ; CHECK-P10-NEXT: pli r6, 3567587329
6818 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
6819 ; CHECK-P10-NEXT: or r3, r3, r6
6820 ; CHECK-P10-NEXT: stw r4, 0(r3)
6821 ; CHECK-P10-NEXT: blr
6823 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint8_t_uint32_t:
6824 ; CHECK-PREP10: # %bb.0: # %entry
6825 ; CHECK-PREP10-NEXT: li r5, 29
6826 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
6827 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
6828 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
6829 ; CHECK-PREP10-NEXT: or r3, r3, r5
6830 ; CHECK-PREP10-NEXT: stw r4, 0(r3)
6831 ; CHECK-PREP10-NEXT: blr
6833 %conv = zext i8 %str to i32
6834 %or = or i64 %ptr, 1000000000001
6835 %0 = inttoptr i64 %or to ptr
6836 store i32 %conv, ptr %0, align 4
6840 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6841 define dso_local void @st_disjoint_align64_uint8_t_uint32_t(i64 %ptr, i8 zeroext %str) {
6842 ; CHECK-P10-LABEL: st_disjoint_align64_uint8_t_uint32_t:
6843 ; CHECK-P10: # %bb.0: # %entry
6844 ; CHECK-P10-NEXT: pli r5, 244140625
6845 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
6846 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6847 ; CHECK-P10-NEXT: stwx r4, r3, r5
6848 ; CHECK-P10-NEXT: blr
6850 ; CHECK-PREP10-LABEL: st_disjoint_align64_uint8_t_uint32_t:
6851 ; CHECK-PREP10: # %bb.0: # %entry
6852 ; CHECK-PREP10-NEXT: lis r5, 3725
6853 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
6854 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6855 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6856 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
6857 ; CHECK-PREP10-NEXT: blr
6859 %and = and i64 %ptr, -1099511627776
6860 %conv = zext i8 %str to i32
6861 %or = or i64 %and, 1000000000000
6862 %0 = inttoptr i64 %or to ptr
6863 store i32 %conv, ptr %0, align 4096
6867 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6868 define dso_local void @st_cst_align16_uint8_t_uint32_t(i8 zeroext %str) {
6869 ; CHECK-LABEL: st_cst_align16_uint8_t_uint32_t:
6870 ; CHECK: # %bb.0: # %entry
6871 ; CHECK-NEXT: stw r3, 4080(0)
6874 %conv = zext i8 %str to i32
6875 store i32 %conv, ptr inttoptr (i64 4080 to ptr), align 16
6879 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6880 define dso_local void @st_cst_align32_uint8_t_uint32_t(i8 zeroext %str) {
6881 ; CHECK-LABEL: st_cst_align32_uint8_t_uint32_t:
6882 ; CHECK: # %bb.0: # %entry
6883 ; CHECK-NEXT: lis r4, 153
6884 ; CHECK-NEXT: stw r3, -27108(r4)
6887 %conv = zext i8 %str to i32
6888 store i32 %conv, ptr inttoptr (i64 9999900 to ptr), align 4
6892 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6893 define dso_local void @st_cst_align64_uint8_t_uint32_t(i8 zeroext %str) {
6894 ; CHECK-P10-LABEL: st_cst_align64_uint8_t_uint32_t:
6895 ; CHECK-P10: # %bb.0: # %entry
6896 ; CHECK-P10-NEXT: pli r4, 244140625
6897 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6898 ; CHECK-P10-NEXT: stw r3, 0(r4)
6899 ; CHECK-P10-NEXT: blr
6901 ; CHECK-PREP10-LABEL: st_cst_align64_uint8_t_uint32_t:
6902 ; CHECK-PREP10: # %bb.0: # %entry
6903 ; CHECK-PREP10-NEXT: lis r4, 3725
6904 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
6905 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
6906 ; CHECK-PREP10-NEXT: stw r3, 0(r4)
6907 ; CHECK-PREP10-NEXT: blr
6909 %conv = zext i8 %str to i32
6910 store i32 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
6914 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6915 define dso_local void @st_0_uint8_t_uint64_t(i64 %ptr, i8 zeroext %str) {
6916 ; CHECK-LABEL: st_0_uint8_t_uint64_t:
6917 ; CHECK: # %bb.0: # %entry
6918 ; CHECK-NEXT: std r4, 0(r3)
6921 %conv = zext i8 %str to i64
6922 %0 = inttoptr i64 %ptr to ptr
6923 store i64 %conv, ptr %0, align 8
6927 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6928 define dso_local void @st_align16_uint8_t_uint64_t(ptr nocapture %ptr, i8 zeroext %str) {
6929 ; CHECK-LABEL: st_align16_uint8_t_uint64_t:
6930 ; CHECK: # %bb.0: # %entry
6931 ; CHECK-NEXT: std r4, 8(r3)
6934 %conv = zext i8 %str to i64
6935 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
6936 store i64 %conv, ptr %add.ptr, align 8
6940 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6941 define dso_local void @st_align32_uint8_t_uint64_t(ptr nocapture %ptr, i8 zeroext %str) {
6942 ; CHECK-P10-LABEL: st_align32_uint8_t_uint64_t:
6943 ; CHECK-P10: # %bb.0: # %entry
6944 ; CHECK-P10-NEXT: pstd r4, 99999000(r3), 0
6945 ; CHECK-P10-NEXT: blr
6947 ; CHECK-PREP10-LABEL: st_align32_uint8_t_uint64_t:
6948 ; CHECK-PREP10: # %bb.0: # %entry
6949 ; CHECK-PREP10-NEXT: lis r5, 1525
6950 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
6951 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
6952 ; CHECK-PREP10-NEXT: blr
6954 %conv = zext i8 %str to i64
6955 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
6956 store i64 %conv, ptr %add.ptr, align 8
6960 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6961 define dso_local void @st_align64_uint8_t_uint64_t(ptr nocapture %ptr, i8 zeroext %str) {
6962 ; CHECK-P10-LABEL: st_align64_uint8_t_uint64_t:
6963 ; CHECK-P10: # %bb.0: # %entry
6964 ; CHECK-P10-NEXT: pli r5, 244140625
6965 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6966 ; CHECK-P10-NEXT: stdx r4, r3, r5
6967 ; CHECK-P10-NEXT: blr
6969 ; CHECK-PREP10-LABEL: st_align64_uint8_t_uint64_t:
6970 ; CHECK-PREP10: # %bb.0: # %entry
6971 ; CHECK-PREP10-NEXT: lis r5, 3725
6972 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6973 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6974 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
6975 ; CHECK-PREP10-NEXT: blr
6977 %conv = zext i8 %str to i64
6978 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
6979 store i64 %conv, ptr %add.ptr, align 8
6983 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6984 define dso_local void @st_reg_uint8_t_uint64_t(ptr nocapture %ptr, i64 %off, i8 zeroext %str) {
6985 ; CHECK-LABEL: st_reg_uint8_t_uint64_t:
6986 ; CHECK: # %bb.0: # %entry
6987 ; CHECK-NEXT: stdx r5, r3, r4
6990 %conv = zext i8 %str to i64
6991 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
6992 store i64 %conv, ptr %add.ptr, align 8
6996 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6997 define dso_local void @st_or1_uint8_t_uint64_t(i64 %ptr, i8 zeroext %off, i8 zeroext %str) {
6998 ; CHECK-LABEL: st_or1_uint8_t_uint64_t:
6999 ; CHECK: # %bb.0: # %entry
7000 ; CHECK-NEXT: or r3, r4, r3
7001 ; CHECK-NEXT: std r5, 0(r3)
7004 %conv = zext i8 %str to i64
7005 %conv1 = zext i8 %off to i64
7006 %or = or i64 %conv1, %ptr
7007 %0 = inttoptr i64 %or to ptr
7008 store i64 %conv, ptr %0, align 8
7012 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7013 define dso_local void @st_not_disjoint16_uint8_t_uint64_t(i64 %ptr, i8 zeroext %str) {
7014 ; CHECK-LABEL: st_not_disjoint16_uint8_t_uint64_t:
7015 ; CHECK: # %bb.0: # %entry
7016 ; CHECK-NEXT: ori r3, r3, 6
7017 ; CHECK-NEXT: std r4, 0(r3)
7020 %conv = zext i8 %str to i64
7021 %or = or i64 %ptr, 6
7022 %0 = inttoptr i64 %or to ptr
7023 store i64 %conv, ptr %0, align 8
7027 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7028 define dso_local void @st_disjoint_align16_uint8_t_uint64_t(i64 %ptr, i8 zeroext %str) {
7029 ; CHECK-LABEL: st_disjoint_align16_uint8_t_uint64_t:
7030 ; CHECK: # %bb.0: # %entry
7031 ; CHECK-NEXT: rldicr r3, r3, 0, 51
7032 ; CHECK-NEXT: std r4, 24(r3)
7035 %and = and i64 %ptr, -4096
7036 %conv = zext i8 %str to i64
7037 %or = or i64 %and, 24
7038 %0 = inttoptr i64 %or to ptr
7039 store i64 %conv, ptr %0, align 8
7043 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7044 define dso_local void @st_not_disjoint32_uint8_t_uint64_t(i64 %ptr, i8 zeroext %str) {
7045 ; CHECK-LABEL: st_not_disjoint32_uint8_t_uint64_t:
7046 ; CHECK: # %bb.0: # %entry
7047 ; CHECK-NEXT: ori r3, r3, 34463
7048 ; CHECK-NEXT: oris r3, r3, 1
7049 ; CHECK-NEXT: std r4, 0(r3)
7052 %conv = zext i8 %str to i64
7053 %or = or i64 %ptr, 99999
7054 %0 = inttoptr i64 %or to ptr
7055 store i64 %conv, ptr %0, align 8
7059 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7060 define dso_local void @st_disjoint_align32_uint8_t_uint64_t(i64 %ptr, i8 zeroext %str) {
7061 ; CHECK-P10-LABEL: st_disjoint_align32_uint8_t_uint64_t:
7062 ; CHECK-P10: # %bb.0: # %entry
7063 ; CHECK-P10-NEXT: lis r5, -15264
7064 ; CHECK-P10-NEXT: and r3, r3, r5
7065 ; CHECK-P10-NEXT: pstd r4, 999990000(r3), 0
7066 ; CHECK-P10-NEXT: blr
7068 ; CHECK-P9-LABEL: st_disjoint_align32_uint8_t_uint64_t:
7069 ; CHECK-P9: # %bb.0: # %entry
7070 ; CHECK-P9-NEXT: lis r5, -15264
7071 ; CHECK-P9-NEXT: and r3, r3, r5
7072 ; CHECK-P9-NEXT: lis r5, 15258
7073 ; CHECK-P9-NEXT: ori r5, r5, 41712
7074 ; CHECK-P9-NEXT: stdx r4, r3, r5
7075 ; CHECK-P9-NEXT: blr
7077 ; CHECK-P8-LABEL: st_disjoint_align32_uint8_t_uint64_t:
7078 ; CHECK-P8: # %bb.0: # %entry
7079 ; CHECK-P8-NEXT: lis r5, -15264
7080 ; CHECK-P8-NEXT: lis r6, 15258
7081 ; CHECK-P8-NEXT: and r3, r3, r5
7082 ; CHECK-P8-NEXT: ori r5, r6, 41712
7083 ; CHECK-P8-NEXT: stdx r4, r3, r5
7084 ; CHECK-P8-NEXT: blr
7086 %and = and i64 %ptr, -1000341504
7087 %conv = zext i8 %str to i64
7088 %or = or i64 %and, 999990000
7089 %0 = inttoptr i64 %or to ptr
7090 store i64 %conv, ptr %0, align 16
7094 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7095 define dso_local void @st_not_disjoint64_uint8_t_uint64_t(i64 %ptr, i8 zeroext %str) {
7096 ; CHECK-P10-LABEL: st_not_disjoint64_uint8_t_uint64_t:
7097 ; CHECK-P10: # %bb.0: # %entry
7098 ; CHECK-P10-NEXT: pli r5, 232
7099 ; CHECK-P10-NEXT: pli r6, 3567587329
7100 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
7101 ; CHECK-P10-NEXT: or r3, r3, r6
7102 ; CHECK-P10-NEXT: std r4, 0(r3)
7103 ; CHECK-P10-NEXT: blr
7105 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint8_t_uint64_t:
7106 ; CHECK-PREP10: # %bb.0: # %entry
7107 ; CHECK-PREP10-NEXT: li r5, 29
7108 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
7109 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
7110 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
7111 ; CHECK-PREP10-NEXT: or r3, r3, r5
7112 ; CHECK-PREP10-NEXT: std r4, 0(r3)
7113 ; CHECK-PREP10-NEXT: blr
7115 %conv = zext i8 %str to i64
7116 %or = or i64 %ptr, 1000000000001
7117 %0 = inttoptr i64 %or to ptr
7118 store i64 %conv, ptr %0, align 8
7122 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7123 define dso_local void @st_disjoint_align64_uint8_t_uint64_t(i64 %ptr, i8 zeroext %str) {
7124 ; CHECK-P10-LABEL: st_disjoint_align64_uint8_t_uint64_t:
7125 ; CHECK-P10: # %bb.0: # %entry
7126 ; CHECK-P10-NEXT: pli r5, 244140625
7127 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
7128 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
7129 ; CHECK-P10-NEXT: stdx r4, r3, r5
7130 ; CHECK-P10-NEXT: blr
7132 ; CHECK-PREP10-LABEL: st_disjoint_align64_uint8_t_uint64_t:
7133 ; CHECK-PREP10: # %bb.0: # %entry
7134 ; CHECK-PREP10-NEXT: lis r5, 3725
7135 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
7136 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
7137 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
7138 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
7139 ; CHECK-PREP10-NEXT: blr
7141 %and = and i64 %ptr, -1099511627776
7142 %conv = zext i8 %str to i64
7143 %or = or i64 %and, 1000000000000
7144 %0 = inttoptr i64 %or to ptr
7145 store i64 %conv, ptr %0, align 4096
7149 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7150 define dso_local void @st_cst_align16_uint8_t_uint64_t(i8 zeroext %str) {
7151 ; CHECK-LABEL: st_cst_align16_uint8_t_uint64_t:
7152 ; CHECK: # %bb.0: # %entry
7153 ; CHECK-NEXT: std r3, 4080(0)
7156 %conv = zext i8 %str to i64
7157 store i64 %conv, ptr inttoptr (i64 4080 to ptr), align 16
7161 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7162 define dso_local void @st_cst_align32_uint8_t_uint64_t(i8 zeroext %str) {
7163 ; CHECK-LABEL: st_cst_align32_uint8_t_uint64_t:
7164 ; CHECK: # %bb.0: # %entry
7165 ; CHECK-NEXT: lis r4, 153
7166 ; CHECK-NEXT: std r3, -27108(r4)
7169 %conv = zext i8 %str to i64
7170 store i64 %conv, ptr inttoptr (i64 9999900 to ptr), align 8
7174 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7175 define dso_local void @st_cst_align64_uint8_t_uint64_t(i8 zeroext %str) {
7176 ; CHECK-P10-LABEL: st_cst_align64_uint8_t_uint64_t:
7177 ; CHECK-P10: # %bb.0: # %entry
7178 ; CHECK-P10-NEXT: pli r4, 244140625
7179 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7180 ; CHECK-P10-NEXT: std r3, 0(r4)
7181 ; CHECK-P10-NEXT: blr
7183 ; CHECK-PREP10-LABEL: st_cst_align64_uint8_t_uint64_t:
7184 ; CHECK-PREP10: # %bb.0: # %entry
7185 ; CHECK-PREP10-NEXT: lis r4, 3725
7186 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
7187 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
7188 ; CHECK-PREP10-NEXT: std r3, 0(r4)
7189 ; CHECK-PREP10-NEXT: blr
7191 %conv = zext i8 %str to i64
7192 store i64 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
7196 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7197 define dso_local void @st_0_uint8_t_float(i64 %ptr, i8 zeroext %str) {
7198 ; CHECK-LABEL: st_0_uint8_t_float:
7199 ; CHECK: # %bb.0: # %entry
7200 ; CHECK-NEXT: mtfprwz f0, r4
7201 ; CHECK-NEXT: xscvuxdsp f0, f0
7202 ; CHECK-NEXT: stfs f0, 0(r3)
7205 %conv = uitofp i8 %str to float
7206 %0 = inttoptr i64 %ptr to ptr
7207 store float %conv, ptr %0, align 4
7211 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7212 define dso_local void @st_align16_uint8_t_float(ptr nocapture %ptr, i8 zeroext %str) {
7213 ; CHECK-LABEL: st_align16_uint8_t_float:
7214 ; CHECK: # %bb.0: # %entry
7215 ; CHECK-NEXT: mtfprwz f0, r4
7216 ; CHECK-NEXT: xscvuxdsp f0, f0
7217 ; CHECK-NEXT: stfs f0, 8(r3)
7220 %conv = uitofp i8 %str to float
7221 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
7222 store float %conv, ptr %add.ptr, align 4
7226 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7227 define dso_local void @st_align32_uint8_t_float(ptr nocapture %ptr, i8 zeroext %str) {
7228 ; CHECK-P10-LABEL: st_align32_uint8_t_float:
7229 ; CHECK-P10: # %bb.0: # %entry
7230 ; CHECK-P10-NEXT: mtfprwz f0, r4
7231 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
7232 ; CHECK-P10-NEXT: pstfs f0, 99999000(r3), 0
7233 ; CHECK-P10-NEXT: blr
7235 ; CHECK-P9-LABEL: st_align32_uint8_t_float:
7236 ; CHECK-P9: # %bb.0: # %entry
7237 ; CHECK-P9-NEXT: mtfprwz f0, r4
7238 ; CHECK-P9-NEXT: lis r4, 1525
7239 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
7240 ; CHECK-P9-NEXT: ori r4, r4, 56600
7241 ; CHECK-P9-NEXT: stfsx f0, r3, r4
7242 ; CHECK-P9-NEXT: blr
7244 ; CHECK-P8-LABEL: st_align32_uint8_t_float:
7245 ; CHECK-P8: # %bb.0: # %entry
7246 ; CHECK-P8-NEXT: mtfprwz f0, r4
7247 ; CHECK-P8-NEXT: lis r4, 1525
7248 ; CHECK-P8-NEXT: ori r4, r4, 56600
7249 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
7250 ; CHECK-P8-NEXT: stfsx f0, r3, r4
7251 ; CHECK-P8-NEXT: blr
7253 %conv = uitofp i8 %str to float
7254 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
7255 store float %conv, ptr %add.ptr, align 4
7259 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7260 define dso_local void @st_align64_uint8_t_float(ptr nocapture %ptr, i8 zeroext %str) {
7261 ; CHECK-P10-LABEL: st_align64_uint8_t_float:
7262 ; CHECK-P10: # %bb.0: # %entry
7263 ; CHECK-P10-NEXT: mtfprwz f0, r4
7264 ; CHECK-P10-NEXT: pli r4, 244140625
7265 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7266 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
7267 ; CHECK-P10-NEXT: stfsx f0, r3, r4
7268 ; CHECK-P10-NEXT: blr
7270 ; CHECK-P9-LABEL: st_align64_uint8_t_float:
7271 ; CHECK-P9: # %bb.0: # %entry
7272 ; CHECK-P9-NEXT: mtfprwz f0, r4
7273 ; CHECK-P9-NEXT: lis r4, 3725
7274 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
7275 ; CHECK-P9-NEXT: ori r4, r4, 19025
7276 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
7277 ; CHECK-P9-NEXT: stfsx f0, r3, r4
7278 ; CHECK-P9-NEXT: blr
7280 ; CHECK-P8-LABEL: st_align64_uint8_t_float:
7281 ; CHECK-P8: # %bb.0: # %entry
7282 ; CHECK-P8-NEXT: mtfprwz f0, r4
7283 ; CHECK-P8-NEXT: lis r4, 3725
7284 ; CHECK-P8-NEXT: ori r4, r4, 19025
7285 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
7286 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
7287 ; CHECK-P8-NEXT: stfsx f0, r3, r4
7288 ; CHECK-P8-NEXT: blr
7290 %conv = uitofp i8 %str to float
7291 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
7292 store float %conv, ptr %add.ptr, align 4
7296 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7297 define dso_local void @st_reg_uint8_t_float(ptr nocapture %ptr, i64 %off, i8 zeroext %str) {
7298 ; CHECK-LABEL: st_reg_uint8_t_float:
7299 ; CHECK: # %bb.0: # %entry
7300 ; CHECK-NEXT: mtfprwz f0, r5
7301 ; CHECK-NEXT: xscvuxdsp f0, f0
7302 ; CHECK-NEXT: stfsx f0, r3, r4
7305 %conv = uitofp i8 %str to float
7306 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
7307 store float %conv, ptr %add.ptr, align 4
7311 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7312 define dso_local void @st_or1_uint8_t_float(i64 %ptr, i8 zeroext %off, i8 zeroext %str) {
7313 ; CHECK-LABEL: st_or1_uint8_t_float:
7314 ; CHECK: # %bb.0: # %entry
7315 ; CHECK-NEXT: mtfprwz f0, r5
7316 ; CHECK-NEXT: or r3, r4, r3
7317 ; CHECK-NEXT: xscvuxdsp f0, f0
7318 ; CHECK-NEXT: stfs f0, 0(r3)
7321 %conv = uitofp i8 %str to float
7322 %conv1 = zext i8 %off to i64
7323 %or = or i64 %conv1, %ptr
7324 %0 = inttoptr i64 %or to ptr
7325 store float %conv, ptr %0, align 4
7329 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7330 define dso_local void @st_not_disjoint16_uint8_t_float(i64 %ptr, i8 zeroext %str) {
7331 ; CHECK-LABEL: st_not_disjoint16_uint8_t_float:
7332 ; CHECK: # %bb.0: # %entry
7333 ; CHECK-NEXT: mtfprwz f0, r4
7334 ; CHECK-NEXT: ori r3, r3, 6
7335 ; CHECK-NEXT: xscvuxdsp f0, f0
7336 ; CHECK-NEXT: stfs f0, 0(r3)
7339 %conv = uitofp i8 %str to float
7340 %or = or i64 %ptr, 6
7341 %0 = inttoptr i64 %or to ptr
7342 store float %conv, ptr %0, align 4
7346 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7347 define dso_local void @st_disjoint_align16_uint8_t_float(i64 %ptr, i8 zeroext %str) {
7348 ; CHECK-LABEL: st_disjoint_align16_uint8_t_float:
7349 ; CHECK: # %bb.0: # %entry
7350 ; CHECK-NEXT: mtfprwz f0, r4
7351 ; CHECK-NEXT: rldicr r3, r3, 0, 51
7352 ; CHECK-NEXT: xscvuxdsp f0, f0
7353 ; CHECK-NEXT: stfs f0, 24(r3)
7356 %and = and i64 %ptr, -4096
7357 %conv = uitofp i8 %str to float
7358 %or = or i64 %and, 24
7359 %0 = inttoptr i64 %or to ptr
7360 store float %conv, ptr %0, align 8
7364 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7365 define dso_local void @st_not_disjoint32_uint8_t_float(i64 %ptr, i8 zeroext %str) {
7366 ; CHECK-P10-LABEL: st_not_disjoint32_uint8_t_float:
7367 ; CHECK-P10: # %bb.0: # %entry
7368 ; CHECK-P10-NEXT: mtfprwz f0, r4
7369 ; CHECK-P10-NEXT: ori r3, r3, 34463
7370 ; CHECK-P10-NEXT: oris r3, r3, 1
7371 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
7372 ; CHECK-P10-NEXT: stfs f0, 0(r3)
7373 ; CHECK-P10-NEXT: blr
7375 ; CHECK-P9-LABEL: st_not_disjoint32_uint8_t_float:
7376 ; CHECK-P9: # %bb.0: # %entry
7377 ; CHECK-P9-NEXT: mtfprwz f0, r4
7378 ; CHECK-P9-NEXT: ori r3, r3, 34463
7379 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
7380 ; CHECK-P9-NEXT: oris r3, r3, 1
7381 ; CHECK-P9-NEXT: stfs f0, 0(r3)
7382 ; CHECK-P9-NEXT: blr
7384 ; CHECK-P8-LABEL: st_not_disjoint32_uint8_t_float:
7385 ; CHECK-P8: # %bb.0: # %entry
7386 ; CHECK-P8-NEXT: mtfprwz f0, r4
7387 ; CHECK-P8-NEXT: ori r3, r3, 34463
7388 ; CHECK-P8-NEXT: oris r3, r3, 1
7389 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
7390 ; CHECK-P8-NEXT: stfs f0, 0(r3)
7391 ; CHECK-P8-NEXT: blr
7393 %conv = uitofp i8 %str to float
7394 %or = or i64 %ptr, 99999
7395 %0 = inttoptr i64 %or to ptr
7396 store float %conv, ptr %0, align 4
7400 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7401 define dso_local void @st_disjoint_align32_uint8_t_float(i64 %ptr, i8 zeroext %str) {
7402 ; CHECK-P10-LABEL: st_disjoint_align32_uint8_t_float:
7403 ; CHECK-P10: # %bb.0: # %entry
7404 ; CHECK-P10-NEXT: mtfprwz f0, r4
7405 ; CHECK-P10-NEXT: lis r5, -15264
7406 ; CHECK-P10-NEXT: and r3, r3, r5
7407 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
7408 ; CHECK-P10-NEXT: pstfs f0, 999990000(r3), 0
7409 ; CHECK-P10-NEXT: blr
7411 ; CHECK-P9-LABEL: st_disjoint_align32_uint8_t_float:
7412 ; CHECK-P9: # %bb.0: # %entry
7413 ; CHECK-P9-NEXT: mtfprwz f0, r4
7414 ; CHECK-P9-NEXT: lis r5, -15264
7415 ; CHECK-P9-NEXT: lis r4, 15258
7416 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
7417 ; CHECK-P9-NEXT: and r3, r3, r5
7418 ; CHECK-P9-NEXT: ori r4, r4, 41712
7419 ; CHECK-P9-NEXT: stfsx f0, r3, r4
7420 ; CHECK-P9-NEXT: blr
7422 ; CHECK-P8-LABEL: st_disjoint_align32_uint8_t_float:
7423 ; CHECK-P8: # %bb.0: # %entry
7424 ; CHECK-P8-NEXT: mtfprwz f0, r4
7425 ; CHECK-P8-NEXT: lis r4, -15264
7426 ; CHECK-P8-NEXT: lis r5, 15258
7427 ; CHECK-P8-NEXT: and r3, r3, r4
7428 ; CHECK-P8-NEXT: ori r4, r5, 41712
7429 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
7430 ; CHECK-P8-NEXT: stfsx f0, r3, r4
7431 ; CHECK-P8-NEXT: blr
7433 %and = and i64 %ptr, -1000341504
7434 %conv = uitofp i8 %str to float
7435 %or = or i64 %and, 999990000
7436 %0 = inttoptr i64 %or to ptr
7437 store float %conv, ptr %0, align 16
7441 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7442 define dso_local void @st_not_disjoint64_uint8_t_float(i64 %ptr, i8 zeroext %str) {
7443 ; CHECK-P10-LABEL: st_not_disjoint64_uint8_t_float:
7444 ; CHECK-P10: # %bb.0: # %entry
7445 ; CHECK-P10-NEXT: mtfprwz f0, r4
7446 ; CHECK-P10-NEXT: pli r4, 232
7447 ; CHECK-P10-NEXT: pli r5, 3567587329
7448 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
7449 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
7450 ; CHECK-P10-NEXT: or r3, r3, r5
7451 ; CHECK-P10-NEXT: stfs f0, 0(r3)
7452 ; CHECK-P10-NEXT: blr
7454 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint8_t_float:
7455 ; CHECK-PREP10: # %bb.0: # %entry
7456 ; CHECK-PREP10-NEXT: mtfprwz f0, r4
7457 ; CHECK-PREP10-NEXT: li r4, 29
7458 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
7459 ; CHECK-PREP10-NEXT: xscvuxdsp f0, f0
7460 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
7461 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
7462 ; CHECK-PREP10-NEXT: or r3, r3, r4
7463 ; CHECK-PREP10-NEXT: stfs f0, 0(r3)
7464 ; CHECK-PREP10-NEXT: blr
7466 %conv = uitofp i8 %str to float
7467 %or = or i64 %ptr, 1000000000001
7468 %0 = inttoptr i64 %or to ptr
7469 store float %conv, ptr %0, align 4
7473 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7474 define dso_local void @st_disjoint_align64_uint8_t_float(i64 %ptr, i8 zeroext %str) {
7475 ; CHECK-P10-LABEL: st_disjoint_align64_uint8_t_float:
7476 ; CHECK-P10: # %bb.0: # %entry
7477 ; CHECK-P10-NEXT: mtfprwz f0, r4
7478 ; CHECK-P10-NEXT: pli r4, 244140625
7479 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
7480 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7481 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
7482 ; CHECK-P10-NEXT: stfsx f0, r3, r4
7483 ; CHECK-P10-NEXT: blr
7485 ; CHECK-P9-LABEL: st_disjoint_align64_uint8_t_float:
7486 ; CHECK-P9: # %bb.0: # %entry
7487 ; CHECK-P9-NEXT: mtfprwz f0, r4
7488 ; CHECK-P9-NEXT: lis r4, 3725
7489 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
7490 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
7491 ; CHECK-P9-NEXT: ori r4, r4, 19025
7492 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
7493 ; CHECK-P9-NEXT: stfsx f0, r3, r4
7494 ; CHECK-P9-NEXT: blr
7496 ; CHECK-P8-LABEL: st_disjoint_align64_uint8_t_float:
7497 ; CHECK-P8: # %bb.0: # %entry
7498 ; CHECK-P8-NEXT: mtfprwz f0, r4
7499 ; CHECK-P8-NEXT: lis r5, 3725
7500 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
7501 ; CHECK-P8-NEXT: ori r4, r5, 19025
7502 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
7503 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
7504 ; CHECK-P8-NEXT: stfsx f0, r3, r4
7505 ; CHECK-P8-NEXT: blr
7507 %and = and i64 %ptr, -1099511627776
7508 %conv = uitofp i8 %str to float
7509 %or = or i64 %and, 1000000000000
7510 %0 = inttoptr i64 %or to ptr
7511 store float %conv, ptr %0, align 4096
7515 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7516 define dso_local void @st_cst_align16_uint8_t_float(i8 zeroext %str) {
7517 ; CHECK-LABEL: st_cst_align16_uint8_t_float:
7518 ; CHECK: # %bb.0: # %entry
7519 ; CHECK-NEXT: mtfprwz f0, r3
7520 ; CHECK-NEXT: xscvuxdsp f0, f0
7521 ; CHECK-NEXT: stfs f0, 4080(0)
7524 %conv = uitofp i8 %str to float
7525 store float %conv, ptr inttoptr (i64 4080 to ptr), align 16
7529 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7530 define dso_local void @st_cst_align32_uint8_t_float(i8 zeroext %str) {
7531 ; CHECK-LABEL: st_cst_align32_uint8_t_float:
7532 ; CHECK: # %bb.0: # %entry
7533 ; CHECK-NEXT: mtfprwz f0, r3
7534 ; CHECK-NEXT: lis r3, 153
7535 ; CHECK-NEXT: xscvuxdsp f0, f0
7536 ; CHECK-NEXT: stfs f0, -27108(r3)
7539 %conv = uitofp i8 %str to float
7540 store float %conv, ptr inttoptr (i64 9999900 to ptr), align 4
7544 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7545 define dso_local void @st_cst_align64_uint8_t_float(i8 zeroext %str) {
7546 ; CHECK-P10-LABEL: st_cst_align64_uint8_t_float:
7547 ; CHECK-P10: # %bb.0: # %entry
7548 ; CHECK-P10-NEXT: mtfprwz f0, r3
7549 ; CHECK-P10-NEXT: pli r3, 244140625
7550 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
7551 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
7552 ; CHECK-P10-NEXT: stfs f0, 0(r3)
7553 ; CHECK-P10-NEXT: blr
7555 ; CHECK-P9-LABEL: st_cst_align64_uint8_t_float:
7556 ; CHECK-P9: # %bb.0: # %entry
7557 ; CHECK-P9-NEXT: mtfprwz f0, r3
7558 ; CHECK-P9-NEXT: lis r3, 3725
7559 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
7560 ; CHECK-P9-NEXT: ori r3, r3, 19025
7561 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
7562 ; CHECK-P9-NEXT: stfs f0, 0(r3)
7563 ; CHECK-P9-NEXT: blr
7565 ; CHECK-P8-LABEL: st_cst_align64_uint8_t_float:
7566 ; CHECK-P8: # %bb.0: # %entry
7567 ; CHECK-P8-NEXT: mtfprwz f0, r3
7568 ; CHECK-P8-NEXT: lis r3, 3725
7569 ; CHECK-P8-NEXT: ori r3, r3, 19025
7570 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
7571 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
7572 ; CHECK-P8-NEXT: stfs f0, 0(r3)
7573 ; CHECK-P8-NEXT: blr
7575 %conv = uitofp i8 %str to float
7576 store float %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
7580 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7581 define dso_local void @st_0_uint8_t_double(i64 %ptr, i8 zeroext %str) {
7582 ; CHECK-LABEL: st_0_uint8_t_double:
7583 ; CHECK: # %bb.0: # %entry
7584 ; CHECK-NEXT: mtfprwz f0, r4
7585 ; CHECK-NEXT: xscvuxddp f0, f0
7586 ; CHECK-NEXT: stfd f0, 0(r3)
7589 %conv = uitofp i8 %str to double
7590 %0 = inttoptr i64 %ptr to ptr
7591 store double %conv, ptr %0, align 8
7595 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7596 define dso_local void @st_align16_uint8_t_double(ptr nocapture %ptr, i8 zeroext %str) {
7597 ; CHECK-LABEL: st_align16_uint8_t_double:
7598 ; CHECK: # %bb.0: # %entry
7599 ; CHECK-NEXT: mtfprwz f0, r4
7600 ; CHECK-NEXT: xscvuxddp f0, f0
7601 ; CHECK-NEXT: stfd f0, 8(r3)
7604 %conv = uitofp i8 %str to double
7605 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
7606 store double %conv, ptr %add.ptr, align 8
7610 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7611 define dso_local void @st_align32_uint8_t_double(ptr nocapture %ptr, i8 zeroext %str) {
7612 ; CHECK-P10-LABEL: st_align32_uint8_t_double:
7613 ; CHECK-P10: # %bb.0: # %entry
7614 ; CHECK-P10-NEXT: mtfprwz f0, r4
7615 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7616 ; CHECK-P10-NEXT: pstfd f0, 99999000(r3), 0
7617 ; CHECK-P10-NEXT: blr
7619 ; CHECK-P9-LABEL: st_align32_uint8_t_double:
7620 ; CHECK-P9: # %bb.0: # %entry
7621 ; CHECK-P9-NEXT: mtfprwz f0, r4
7622 ; CHECK-P9-NEXT: lis r4, 1525
7623 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7624 ; CHECK-P9-NEXT: ori r4, r4, 56600
7625 ; CHECK-P9-NEXT: stfdx f0, r3, r4
7626 ; CHECK-P9-NEXT: blr
7628 ; CHECK-P8-LABEL: st_align32_uint8_t_double:
7629 ; CHECK-P8: # %bb.0: # %entry
7630 ; CHECK-P8-NEXT: mtfprwz f0, r4
7631 ; CHECK-P8-NEXT: lis r4, 1525
7632 ; CHECK-P8-NEXT: ori r4, r4, 56600
7633 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7634 ; CHECK-P8-NEXT: stfdx f0, r3, r4
7635 ; CHECK-P8-NEXT: blr
7637 %conv = uitofp i8 %str to double
7638 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
7639 store double %conv, ptr %add.ptr, align 8
7643 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7644 define dso_local void @st_align64_uint8_t_double(ptr nocapture %ptr, i8 zeroext %str) {
7645 ; CHECK-P10-LABEL: st_align64_uint8_t_double:
7646 ; CHECK-P10: # %bb.0: # %entry
7647 ; CHECK-P10-NEXT: mtfprwz f0, r4
7648 ; CHECK-P10-NEXT: pli r4, 244140625
7649 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7650 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7651 ; CHECK-P10-NEXT: stfdx f0, r3, r4
7652 ; CHECK-P10-NEXT: blr
7654 ; CHECK-P9-LABEL: st_align64_uint8_t_double:
7655 ; CHECK-P9: # %bb.0: # %entry
7656 ; CHECK-P9-NEXT: mtfprwz f0, r4
7657 ; CHECK-P9-NEXT: lis r4, 3725
7658 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7659 ; CHECK-P9-NEXT: ori r4, r4, 19025
7660 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
7661 ; CHECK-P9-NEXT: stfdx f0, r3, r4
7662 ; CHECK-P9-NEXT: blr
7664 ; CHECK-P8-LABEL: st_align64_uint8_t_double:
7665 ; CHECK-P8: # %bb.0: # %entry
7666 ; CHECK-P8-NEXT: mtfprwz f0, r4
7667 ; CHECK-P8-NEXT: lis r4, 3725
7668 ; CHECK-P8-NEXT: ori r4, r4, 19025
7669 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7670 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
7671 ; CHECK-P8-NEXT: stfdx f0, r3, r4
7672 ; CHECK-P8-NEXT: blr
7674 %conv = uitofp i8 %str to double
7675 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
7676 store double %conv, ptr %add.ptr, align 8
7680 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7681 define dso_local void @st_reg_uint8_t_double(ptr nocapture %ptr, i64 %off, i8 zeroext %str) {
7682 ; CHECK-LABEL: st_reg_uint8_t_double:
7683 ; CHECK: # %bb.0: # %entry
7684 ; CHECK-NEXT: mtfprwz f0, r5
7685 ; CHECK-NEXT: xscvuxddp f0, f0
7686 ; CHECK-NEXT: stfdx f0, r3, r4
7689 %conv = uitofp i8 %str to double
7690 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
7691 store double %conv, ptr %add.ptr, align 8
7695 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7696 define dso_local void @st_or1_uint8_t_double(i64 %ptr, i8 zeroext %off, i8 zeroext %str) {
7697 ; CHECK-LABEL: st_or1_uint8_t_double:
7698 ; CHECK: # %bb.0: # %entry
7699 ; CHECK-NEXT: mtfprwz f0, r5
7700 ; CHECK-NEXT: or r3, r4, r3
7701 ; CHECK-NEXT: xscvuxddp f0, f0
7702 ; CHECK-NEXT: stfd f0, 0(r3)
7705 %conv = uitofp i8 %str to double
7706 %conv1 = zext i8 %off to i64
7707 %or = or i64 %conv1, %ptr
7708 %0 = inttoptr i64 %or to ptr
7709 store double %conv, ptr %0, align 8
7713 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7714 define dso_local void @st_not_disjoint16_uint8_t_double(i64 %ptr, i8 zeroext %str) {
7715 ; CHECK-LABEL: st_not_disjoint16_uint8_t_double:
7716 ; CHECK: # %bb.0: # %entry
7717 ; CHECK-NEXT: mtfprwz f0, r4
7718 ; CHECK-NEXT: ori r3, r3, 6
7719 ; CHECK-NEXT: xscvuxddp f0, f0
7720 ; CHECK-NEXT: stfd f0, 0(r3)
7723 %conv = uitofp i8 %str to double
7724 %or = or i64 %ptr, 6
7725 %0 = inttoptr i64 %or to ptr
7726 store double %conv, ptr %0, align 8
7730 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7731 define dso_local void @st_disjoint_align16_uint8_t_double(i64 %ptr, i8 zeroext %str) {
7732 ; CHECK-LABEL: st_disjoint_align16_uint8_t_double:
7733 ; CHECK: # %bb.0: # %entry
7734 ; CHECK-NEXT: mtfprwz f0, r4
7735 ; CHECK-NEXT: rldicr r3, r3, 0, 51
7736 ; CHECK-NEXT: xscvuxddp f0, f0
7737 ; CHECK-NEXT: stfd f0, 24(r3)
7740 %and = and i64 %ptr, -4096
7741 %conv = uitofp i8 %str to double
7742 %or = or i64 %and, 24
7743 %0 = inttoptr i64 %or to ptr
7744 store double %conv, ptr %0, align 8
7748 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7749 define dso_local void @st_not_disjoint32_uint8_t_double(i64 %ptr, i8 zeroext %str) {
7750 ; CHECK-P10-LABEL: st_not_disjoint32_uint8_t_double:
7751 ; CHECK-P10: # %bb.0: # %entry
7752 ; CHECK-P10-NEXT: mtfprwz f0, r4
7753 ; CHECK-P10-NEXT: ori r3, r3, 34463
7754 ; CHECK-P10-NEXT: oris r3, r3, 1
7755 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7756 ; CHECK-P10-NEXT: stfd f0, 0(r3)
7757 ; CHECK-P10-NEXT: blr
7759 ; CHECK-P9-LABEL: st_not_disjoint32_uint8_t_double:
7760 ; CHECK-P9: # %bb.0: # %entry
7761 ; CHECK-P9-NEXT: mtfprwz f0, r4
7762 ; CHECK-P9-NEXT: ori r3, r3, 34463
7763 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7764 ; CHECK-P9-NEXT: oris r3, r3, 1
7765 ; CHECK-P9-NEXT: stfd f0, 0(r3)
7766 ; CHECK-P9-NEXT: blr
7768 ; CHECK-P8-LABEL: st_not_disjoint32_uint8_t_double:
7769 ; CHECK-P8: # %bb.0: # %entry
7770 ; CHECK-P8-NEXT: mtfprwz f0, r4
7771 ; CHECK-P8-NEXT: ori r3, r3, 34463
7772 ; CHECK-P8-NEXT: oris r3, r3, 1
7773 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7774 ; CHECK-P8-NEXT: stfd f0, 0(r3)
7775 ; CHECK-P8-NEXT: blr
7777 %conv = uitofp i8 %str to double
7778 %or = or i64 %ptr, 99999
7779 %0 = inttoptr i64 %or to ptr
7780 store double %conv, ptr %0, align 8
7784 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7785 define dso_local void @st_disjoint_align32_uint8_t_double(i64 %ptr, i8 zeroext %str) {
7786 ; CHECK-P10-LABEL: st_disjoint_align32_uint8_t_double:
7787 ; CHECK-P10: # %bb.0: # %entry
7788 ; CHECK-P10-NEXT: mtfprwz f0, r4
7789 ; CHECK-P10-NEXT: lis r5, -15264
7790 ; CHECK-P10-NEXT: and r3, r3, r5
7791 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7792 ; CHECK-P10-NEXT: pstfd f0, 999990000(r3), 0
7793 ; CHECK-P10-NEXT: blr
7795 ; CHECK-P9-LABEL: st_disjoint_align32_uint8_t_double:
7796 ; CHECK-P9: # %bb.0: # %entry
7797 ; CHECK-P9-NEXT: mtfprwz f0, r4
7798 ; CHECK-P9-NEXT: lis r5, -15264
7799 ; CHECK-P9-NEXT: lis r4, 15258
7800 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7801 ; CHECK-P9-NEXT: and r3, r3, r5
7802 ; CHECK-P9-NEXT: ori r4, r4, 41712
7803 ; CHECK-P9-NEXT: stfdx f0, r3, r4
7804 ; CHECK-P9-NEXT: blr
7806 ; CHECK-P8-LABEL: st_disjoint_align32_uint8_t_double:
7807 ; CHECK-P8: # %bb.0: # %entry
7808 ; CHECK-P8-NEXT: mtfprwz f0, r4
7809 ; CHECK-P8-NEXT: lis r4, -15264
7810 ; CHECK-P8-NEXT: lis r5, 15258
7811 ; CHECK-P8-NEXT: and r3, r3, r4
7812 ; CHECK-P8-NEXT: ori r4, r5, 41712
7813 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7814 ; CHECK-P8-NEXT: stfdx f0, r3, r4
7815 ; CHECK-P8-NEXT: blr
7817 %and = and i64 %ptr, -1000341504
7818 %conv = uitofp i8 %str to double
7819 %or = or i64 %and, 999990000
7820 %0 = inttoptr i64 %or to ptr
7821 store double %conv, ptr %0, align 16
7825 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7826 define dso_local void @st_not_disjoint64_uint8_t_double(i64 %ptr, i8 zeroext %str) {
7827 ; CHECK-P10-LABEL: st_not_disjoint64_uint8_t_double:
7828 ; CHECK-P10: # %bb.0: # %entry
7829 ; CHECK-P10-NEXT: mtfprwz f0, r4
7830 ; CHECK-P10-NEXT: pli r4, 232
7831 ; CHECK-P10-NEXT: pli r5, 3567587329
7832 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
7833 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7834 ; CHECK-P10-NEXT: or r3, r3, r5
7835 ; CHECK-P10-NEXT: stfd f0, 0(r3)
7836 ; CHECK-P10-NEXT: blr
7838 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint8_t_double:
7839 ; CHECK-PREP10: # %bb.0: # %entry
7840 ; CHECK-PREP10-NEXT: mtfprwz f0, r4
7841 ; CHECK-PREP10-NEXT: li r4, 29
7842 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
7843 ; CHECK-PREP10-NEXT: xscvuxddp f0, f0
7844 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
7845 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
7846 ; CHECK-PREP10-NEXT: or r3, r3, r4
7847 ; CHECK-PREP10-NEXT: stfd f0, 0(r3)
7848 ; CHECK-PREP10-NEXT: blr
7850 %conv = uitofp i8 %str to double
7851 %or = or i64 %ptr, 1000000000001
7852 %0 = inttoptr i64 %or to ptr
7853 store double %conv, ptr %0, align 8
7857 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7858 define dso_local void @st_disjoint_align64_uint8_t_double(i64 %ptr, i8 zeroext %str) {
7859 ; CHECK-P10-LABEL: st_disjoint_align64_uint8_t_double:
7860 ; CHECK-P10: # %bb.0: # %entry
7861 ; CHECK-P10-NEXT: mtfprwz f0, r4
7862 ; CHECK-P10-NEXT: pli r4, 244140625
7863 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
7864 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7865 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7866 ; CHECK-P10-NEXT: stfdx f0, r3, r4
7867 ; CHECK-P10-NEXT: blr
7869 ; CHECK-P9-LABEL: st_disjoint_align64_uint8_t_double:
7870 ; CHECK-P9: # %bb.0: # %entry
7871 ; CHECK-P9-NEXT: mtfprwz f0, r4
7872 ; CHECK-P9-NEXT: lis r4, 3725
7873 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
7874 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7875 ; CHECK-P9-NEXT: ori r4, r4, 19025
7876 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
7877 ; CHECK-P9-NEXT: stfdx f0, r3, r4
7878 ; CHECK-P9-NEXT: blr
7880 ; CHECK-P8-LABEL: st_disjoint_align64_uint8_t_double:
7881 ; CHECK-P8: # %bb.0: # %entry
7882 ; CHECK-P8-NEXT: mtfprwz f0, r4
7883 ; CHECK-P8-NEXT: lis r5, 3725
7884 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
7885 ; CHECK-P8-NEXT: ori r4, r5, 19025
7886 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7887 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
7888 ; CHECK-P8-NEXT: stfdx f0, r3, r4
7889 ; CHECK-P8-NEXT: blr
7891 %and = and i64 %ptr, -1099511627776
7892 %conv = uitofp i8 %str to double
7893 %or = or i64 %and, 1000000000000
7894 %0 = inttoptr i64 %or to ptr
7895 store double %conv, ptr %0, align 4096
7899 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7900 define dso_local void @st_cst_align16_uint8_t_double(i8 zeroext %str) {
7901 ; CHECK-LABEL: st_cst_align16_uint8_t_double:
7902 ; CHECK: # %bb.0: # %entry
7903 ; CHECK-NEXT: mtfprwz f0, r3
7904 ; CHECK-NEXT: xscvuxddp f0, f0
7905 ; CHECK-NEXT: stfd f0, 4080(0)
7908 %conv = uitofp i8 %str to double
7909 store double %conv, ptr inttoptr (i64 4080 to ptr), align 16
7913 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7914 define dso_local void @st_cst_align32_uint8_t_double(i8 zeroext %str) {
7915 ; CHECK-LABEL: st_cst_align32_uint8_t_double:
7916 ; CHECK: # %bb.0: # %entry
7917 ; CHECK-NEXT: mtfprwz f0, r3
7918 ; CHECK-NEXT: lis r3, 153
7919 ; CHECK-NEXT: xscvuxddp f0, f0
7920 ; CHECK-NEXT: stfd f0, -27108(r3)
7923 %conv = uitofp i8 %str to double
7924 store double %conv, ptr inttoptr (i64 9999900 to ptr), align 8
7928 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7929 define dso_local void @st_cst_align64_uint8_t_double(i8 zeroext %str) {
7930 ; CHECK-P10-LABEL: st_cst_align64_uint8_t_double:
7931 ; CHECK-P10: # %bb.0: # %entry
7932 ; CHECK-P10-NEXT: mtfprwz f0, r3
7933 ; CHECK-P10-NEXT: pli r3, 244140625
7934 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
7935 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7936 ; CHECK-P10-NEXT: stfd f0, 0(r3)
7937 ; CHECK-P10-NEXT: blr
7939 ; CHECK-P9-LABEL: st_cst_align64_uint8_t_double:
7940 ; CHECK-P9: # %bb.0: # %entry
7941 ; CHECK-P9-NEXT: mtfprwz f0, r3
7942 ; CHECK-P9-NEXT: lis r3, 3725
7943 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7944 ; CHECK-P9-NEXT: ori r3, r3, 19025
7945 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
7946 ; CHECK-P9-NEXT: stfd f0, 0(r3)
7947 ; CHECK-P9-NEXT: blr
7949 ; CHECK-P8-LABEL: st_cst_align64_uint8_t_double:
7950 ; CHECK-P8: # %bb.0: # %entry
7951 ; CHECK-P8-NEXT: mtfprwz f0, r3
7952 ; CHECK-P8-NEXT: lis r3, 3725
7953 ; CHECK-P8-NEXT: ori r3, r3, 19025
7954 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7955 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
7956 ; CHECK-P8-NEXT: stfd f0, 0(r3)
7957 ; CHECK-P8-NEXT: blr
7959 %conv = uitofp i8 %str to double
7960 store double %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
7964 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7965 define dso_local void @st_0_int8_t_uint16_t(i64 %ptr, i8 signext %str) {
7966 ; CHECK-LABEL: st_0_int8_t_uint16_t:
7967 ; CHECK: # %bb.0: # %entry
7968 ; CHECK-NEXT: sth r4, 0(r3)
7971 %conv = sext i8 %str to i16
7972 %0 = inttoptr i64 %ptr to ptr
7973 store i16 %conv, ptr %0, align 2
7977 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7978 define dso_local void @st_align16_int8_t_uint16_t(ptr nocapture %ptr, i8 signext %str) {
7979 ; CHECK-LABEL: st_align16_int8_t_uint16_t:
7980 ; CHECK: # %bb.0: # %entry
7981 ; CHECK-NEXT: sth r4, 8(r3)
7984 %conv = sext i8 %str to i16
7985 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
7986 store i16 %conv, ptr %add.ptr, align 2
7990 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7991 define dso_local void @st_align32_int8_t_uint16_t(ptr nocapture %ptr, i8 signext %str) {
7992 ; CHECK-P10-LABEL: st_align32_int8_t_uint16_t:
7993 ; CHECK-P10: # %bb.0: # %entry
7994 ; CHECK-P10-NEXT: psth r4, 99999000(r3), 0
7995 ; CHECK-P10-NEXT: blr
7997 ; CHECK-PREP10-LABEL: st_align32_int8_t_uint16_t:
7998 ; CHECK-PREP10: # %bb.0: # %entry
7999 ; CHECK-PREP10-NEXT: lis r5, 1525
8000 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
8001 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
8002 ; CHECK-PREP10-NEXT: blr
8004 %conv = sext i8 %str to i16
8005 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
8006 store i16 %conv, ptr %add.ptr, align 2
8010 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8011 define dso_local void @st_align64_int8_t_uint16_t(ptr nocapture %ptr, i8 signext %str) {
8012 ; CHECK-P10-LABEL: st_align64_int8_t_uint16_t:
8013 ; CHECK-P10: # %bb.0: # %entry
8014 ; CHECK-P10-NEXT: pli r5, 244140625
8015 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
8016 ; CHECK-P10-NEXT: sthx r4, r3, r5
8017 ; CHECK-P10-NEXT: blr
8019 ; CHECK-PREP10-LABEL: st_align64_int8_t_uint16_t:
8020 ; CHECK-PREP10: # %bb.0: # %entry
8021 ; CHECK-PREP10-NEXT: lis r5, 3725
8022 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
8023 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
8024 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
8025 ; CHECK-PREP10-NEXT: blr
8027 %conv = sext i8 %str to i16
8028 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
8029 store i16 %conv, ptr %add.ptr, align 2
8033 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8034 define dso_local void @st_reg_int8_t_uint16_t(ptr nocapture %ptr, i64 %off, i8 signext %str) {
8035 ; CHECK-LABEL: st_reg_int8_t_uint16_t:
8036 ; CHECK: # %bb.0: # %entry
8037 ; CHECK-NEXT: sthx r5, r3, r4
8040 %conv = sext i8 %str to i16
8041 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
8042 store i16 %conv, ptr %add.ptr, align 2
8046 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8047 define dso_local void @st_or1_int8_t_uint16_t(i64 %ptr, i8 zeroext %off, i8 signext %str) {
8048 ; CHECK-LABEL: st_or1_int8_t_uint16_t:
8049 ; CHECK: # %bb.0: # %entry
8050 ; CHECK-NEXT: or r3, r4, r3
8051 ; CHECK-NEXT: sth r5, 0(r3)
8054 %conv = sext i8 %str to i16
8055 %conv1 = zext i8 %off to i64
8056 %or = or i64 %conv1, %ptr
8057 %0 = inttoptr i64 %or to ptr
8058 store i16 %conv, ptr %0, align 2
8062 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8063 define dso_local void @st_not_disjoint16_int8_t_uint16_t(i64 %ptr, i8 signext %str) {
8064 ; CHECK-LABEL: st_not_disjoint16_int8_t_uint16_t:
8065 ; CHECK: # %bb.0: # %entry
8066 ; CHECK-NEXT: ori r3, r3, 6
8067 ; CHECK-NEXT: sth r4, 0(r3)
8070 %conv = sext i8 %str to i16
8071 %or = or i64 %ptr, 6
8072 %0 = inttoptr i64 %or to ptr
8073 store i16 %conv, ptr %0, align 2
8077 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8078 define dso_local void @st_disjoint_align16_int8_t_uint16_t(i64 %ptr, i8 signext %str) {
8079 ; CHECK-LABEL: st_disjoint_align16_int8_t_uint16_t:
8080 ; CHECK: # %bb.0: # %entry
8081 ; CHECK-NEXT: rldicr r3, r3, 0, 51
8082 ; CHECK-NEXT: sth r4, 24(r3)
8085 %and = and i64 %ptr, -4096
8086 %conv = sext i8 %str to i16
8087 %or = or i64 %and, 24
8088 %0 = inttoptr i64 %or to ptr
8089 store i16 %conv, ptr %0, align 8
8093 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8094 define dso_local void @st_not_disjoint32_int8_t_uint16_t(i64 %ptr, i8 signext %str) {
8095 ; CHECK-LABEL: st_not_disjoint32_int8_t_uint16_t:
8096 ; CHECK: # %bb.0: # %entry
8097 ; CHECK-NEXT: ori r3, r3, 34463
8098 ; CHECK-NEXT: oris r3, r3, 1
8099 ; CHECK-NEXT: sth r4, 0(r3)
8102 %conv = sext i8 %str to i16
8103 %or = or i64 %ptr, 99999
8104 %0 = inttoptr i64 %or to ptr
8105 store i16 %conv, ptr %0, align 2
8109 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8110 define dso_local void @st_disjoint_align32_int8_t_uint16_t(i64 %ptr, i8 signext %str) {
8111 ; CHECK-P10-LABEL: st_disjoint_align32_int8_t_uint16_t:
8112 ; CHECK-P10: # %bb.0: # %entry
8113 ; CHECK-P10-NEXT: lis r5, -15264
8114 ; CHECK-P10-NEXT: and r3, r3, r5
8115 ; CHECK-P10-NEXT: psth r4, 999990000(r3), 0
8116 ; CHECK-P10-NEXT: blr
8118 ; CHECK-P9-LABEL: st_disjoint_align32_int8_t_uint16_t:
8119 ; CHECK-P9: # %bb.0: # %entry
8120 ; CHECK-P9-NEXT: lis r5, -15264
8121 ; CHECK-P9-NEXT: and r3, r3, r5
8122 ; CHECK-P9-NEXT: lis r5, 15258
8123 ; CHECK-P9-NEXT: ori r5, r5, 41712
8124 ; CHECK-P9-NEXT: sthx r4, r3, r5
8125 ; CHECK-P9-NEXT: blr
8127 ; CHECK-P8-LABEL: st_disjoint_align32_int8_t_uint16_t:
8128 ; CHECK-P8: # %bb.0: # %entry
8129 ; CHECK-P8-NEXT: lis r5, -15264
8130 ; CHECK-P8-NEXT: lis r6, 15258
8131 ; CHECK-P8-NEXT: and r3, r3, r5
8132 ; CHECK-P8-NEXT: ori r5, r6, 41712
8133 ; CHECK-P8-NEXT: sthx r4, r3, r5
8134 ; CHECK-P8-NEXT: blr
8136 %and = and i64 %ptr, -1000341504
8137 %conv = sext i8 %str to i16
8138 %or = or i64 %and, 999990000
8139 %0 = inttoptr i64 %or to ptr
8140 store i16 %conv, ptr %0, align 16
8144 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8145 define dso_local void @st_not_disjoint64_int8_t_uint16_t(i64 %ptr, i8 signext %str) {
8146 ; CHECK-P10-LABEL: st_not_disjoint64_int8_t_uint16_t:
8147 ; CHECK-P10: # %bb.0: # %entry
8148 ; CHECK-P10-NEXT: pli r5, 232
8149 ; CHECK-P10-NEXT: pli r6, 3567587329
8150 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
8151 ; CHECK-P10-NEXT: or r3, r3, r6
8152 ; CHECK-P10-NEXT: sth r4, 0(r3)
8153 ; CHECK-P10-NEXT: blr
8155 ; CHECK-PREP10-LABEL: st_not_disjoint64_int8_t_uint16_t:
8156 ; CHECK-PREP10: # %bb.0: # %entry
8157 ; CHECK-PREP10-NEXT: li r5, 29
8158 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
8159 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
8160 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
8161 ; CHECK-PREP10-NEXT: or r3, r3, r5
8162 ; CHECK-PREP10-NEXT: sth r4, 0(r3)
8163 ; CHECK-PREP10-NEXT: blr
8165 %conv = sext i8 %str to i16
8166 %or = or i64 %ptr, 1000000000001
8167 %0 = inttoptr i64 %or to ptr
8168 store i16 %conv, ptr %0, align 2
8172 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8173 define dso_local void @st_disjoint_align64_int8_t_uint16_t(i64 %ptr, i8 signext %str) {
8174 ; CHECK-P10-LABEL: st_disjoint_align64_int8_t_uint16_t:
8175 ; CHECK-P10: # %bb.0: # %entry
8176 ; CHECK-P10-NEXT: pli r5, 244140625
8177 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
8178 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
8179 ; CHECK-P10-NEXT: sthx r4, r3, r5
8180 ; CHECK-P10-NEXT: blr
8182 ; CHECK-PREP10-LABEL: st_disjoint_align64_int8_t_uint16_t:
8183 ; CHECK-PREP10: # %bb.0: # %entry
8184 ; CHECK-PREP10-NEXT: lis r5, 3725
8185 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
8186 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
8187 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
8188 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
8189 ; CHECK-PREP10-NEXT: blr
8191 %and = and i64 %ptr, -1099511627776
8192 %conv = sext i8 %str to i16
8193 %or = or i64 %and, 1000000000000
8194 %0 = inttoptr i64 %or to ptr
8195 store i16 %conv, ptr %0, align 4096
8199 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8200 define dso_local void @st_cst_align16_int8_t_uint16_t(i8 signext %str) {
8201 ; CHECK-LABEL: st_cst_align16_int8_t_uint16_t:
8202 ; CHECK: # %bb.0: # %entry
8203 ; CHECK-NEXT: sth r3, 4080(0)
8206 %conv = sext i8 %str to i16
8207 store i16 %conv, ptr inttoptr (i64 4080 to ptr), align 16
8211 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8212 define dso_local void @st_cst_align32_int8_t_uint16_t(i8 signext %str) {
8213 ; CHECK-LABEL: st_cst_align32_int8_t_uint16_t:
8214 ; CHECK: # %bb.0: # %entry
8215 ; CHECK-NEXT: lis r4, 153
8216 ; CHECK-NEXT: sth r3, -27108(r4)
8219 %conv = sext i8 %str to i16
8220 store i16 %conv, ptr inttoptr (i64 9999900 to ptr), align 4
8224 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8225 define dso_local void @st_cst_align64_int8_t_uint16_t(i8 signext %str) {
8226 ; CHECK-P10-LABEL: st_cst_align64_int8_t_uint16_t:
8227 ; CHECK-P10: # %bb.0: # %entry
8228 ; CHECK-P10-NEXT: pli r4, 244140625
8229 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
8230 ; CHECK-P10-NEXT: sth r3, 0(r4)
8231 ; CHECK-P10-NEXT: blr
8233 ; CHECK-PREP10-LABEL: st_cst_align64_int8_t_uint16_t:
8234 ; CHECK-PREP10: # %bb.0: # %entry
8235 ; CHECK-PREP10-NEXT: lis r4, 3725
8236 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
8237 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
8238 ; CHECK-PREP10-NEXT: sth r3, 0(r4)
8239 ; CHECK-PREP10-NEXT: blr
8241 %conv = sext i8 %str to i16
8242 store i16 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
8246 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8247 define dso_local void @st_0_int8_t_uint32_t(i64 %ptr, i8 signext %str) {
8248 ; CHECK-LABEL: st_0_int8_t_uint32_t:
8249 ; CHECK: # %bb.0: # %entry
8250 ; CHECK-NEXT: stw r4, 0(r3)
8253 %conv = sext i8 %str to i32
8254 %0 = inttoptr i64 %ptr to ptr
8255 store i32 %conv, ptr %0, align 4
8259 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8260 define dso_local void @st_align16_int8_t_uint32_t(ptr nocapture %ptr, i8 signext %str) {
8261 ; CHECK-LABEL: st_align16_int8_t_uint32_t:
8262 ; CHECK: # %bb.0: # %entry
8263 ; CHECK-NEXT: stw r4, 8(r3)
8266 %conv = sext i8 %str to i32
8267 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
8268 store i32 %conv, ptr %add.ptr, align 4
8272 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8273 define dso_local void @st_align32_int8_t_uint32_t(ptr nocapture %ptr, i8 signext %str) {
8274 ; CHECK-P10-LABEL: st_align32_int8_t_uint32_t:
8275 ; CHECK-P10: # %bb.0: # %entry
8276 ; CHECK-P10-NEXT: pstw r4, 99999000(r3), 0
8277 ; CHECK-P10-NEXT: blr
8279 ; CHECK-PREP10-LABEL: st_align32_int8_t_uint32_t:
8280 ; CHECK-PREP10: # %bb.0: # %entry
8281 ; CHECK-PREP10-NEXT: lis r5, 1525
8282 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
8283 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
8284 ; CHECK-PREP10-NEXT: blr
8286 %conv = sext i8 %str to i32
8287 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
8288 store i32 %conv, ptr %add.ptr, align 4
8292 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8293 define dso_local void @st_align64_int8_t_uint32_t(ptr nocapture %ptr, i8 signext %str) {
8294 ; CHECK-P10-LABEL: st_align64_int8_t_uint32_t:
8295 ; CHECK-P10: # %bb.0: # %entry
8296 ; CHECK-P10-NEXT: pli r5, 244140625
8297 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
8298 ; CHECK-P10-NEXT: stwx r4, r3, r5
8299 ; CHECK-P10-NEXT: blr
8301 ; CHECK-PREP10-LABEL: st_align64_int8_t_uint32_t:
8302 ; CHECK-PREP10: # %bb.0: # %entry
8303 ; CHECK-PREP10-NEXT: lis r5, 3725
8304 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
8305 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
8306 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
8307 ; CHECK-PREP10-NEXT: blr
8309 %conv = sext i8 %str to i32
8310 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
8311 store i32 %conv, ptr %add.ptr, align 4
8315 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8316 define dso_local void @st_reg_int8_t_uint32_t(ptr nocapture %ptr, i64 %off, i8 signext %str) {
8317 ; CHECK-LABEL: st_reg_int8_t_uint32_t:
8318 ; CHECK: # %bb.0: # %entry
8319 ; CHECK-NEXT: stwx r5, r3, r4
8322 %conv = sext i8 %str to i32
8323 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
8324 store i32 %conv, ptr %add.ptr, align 4
8328 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8329 define dso_local void @st_or1_int8_t_uint32_t(i64 %ptr, i8 zeroext %off, i8 signext %str) {
8330 ; CHECK-LABEL: st_or1_int8_t_uint32_t:
8331 ; CHECK: # %bb.0: # %entry
8332 ; CHECK-NEXT: or r3, r4, r3
8333 ; CHECK-NEXT: stw r5, 0(r3)
8336 %conv = sext i8 %str to i32
8337 %conv1 = zext i8 %off to i64
8338 %or = or i64 %conv1, %ptr
8339 %0 = inttoptr i64 %or to ptr
8340 store i32 %conv, ptr %0, align 4
8344 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8345 define dso_local void @st_not_disjoint16_int8_t_uint32_t(i64 %ptr, i8 signext %str) {
8346 ; CHECK-LABEL: st_not_disjoint16_int8_t_uint32_t:
8347 ; CHECK: # %bb.0: # %entry
8348 ; CHECK-NEXT: ori r3, r3, 6
8349 ; CHECK-NEXT: stw r4, 0(r3)
8352 %conv = sext i8 %str to i32
8353 %or = or i64 %ptr, 6
8354 %0 = inttoptr i64 %or to ptr
8355 store i32 %conv, ptr %0, align 4
8359 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8360 define dso_local void @st_disjoint_align16_int8_t_uint32_t(i64 %ptr, i8 signext %str) {
8361 ; CHECK-LABEL: st_disjoint_align16_int8_t_uint32_t:
8362 ; CHECK: # %bb.0: # %entry
8363 ; CHECK-NEXT: rldicr r3, r3, 0, 51
8364 ; CHECK-NEXT: stw r4, 24(r3)
8367 %and = and i64 %ptr, -4096
8368 %conv = sext i8 %str to i32
8369 %or = or i64 %and, 24
8370 %0 = inttoptr i64 %or to ptr
8371 store i32 %conv, ptr %0, align 8
8375 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8376 define dso_local void @st_not_disjoint32_int8_t_uint32_t(i64 %ptr, i8 signext %str) {
8377 ; CHECK-LABEL: st_not_disjoint32_int8_t_uint32_t:
8378 ; CHECK: # %bb.0: # %entry
8379 ; CHECK-NEXT: ori r3, r3, 34463
8380 ; CHECK-NEXT: oris r3, r3, 1
8381 ; CHECK-NEXT: stw r4, 0(r3)
8384 %conv = sext i8 %str to i32
8385 %or = or i64 %ptr, 99999
8386 %0 = inttoptr i64 %or to ptr
8387 store i32 %conv, ptr %0, align 4
8391 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8392 define dso_local void @st_disjoint_align32_int8_t_uint32_t(i64 %ptr, i8 signext %str) {
8393 ; CHECK-P10-LABEL: st_disjoint_align32_int8_t_uint32_t:
8394 ; CHECK-P10: # %bb.0: # %entry
8395 ; CHECK-P10-NEXT: lis r5, -15264
8396 ; CHECK-P10-NEXT: and r3, r3, r5
8397 ; CHECK-P10-NEXT: pstw r4, 999990000(r3), 0
8398 ; CHECK-P10-NEXT: blr
8400 ; CHECK-P9-LABEL: st_disjoint_align32_int8_t_uint32_t:
8401 ; CHECK-P9: # %bb.0: # %entry
8402 ; CHECK-P9-NEXT: lis r5, -15264
8403 ; CHECK-P9-NEXT: and r3, r3, r5
8404 ; CHECK-P9-NEXT: lis r5, 15258
8405 ; CHECK-P9-NEXT: ori r5, r5, 41712
8406 ; CHECK-P9-NEXT: stwx r4, r3, r5
8407 ; CHECK-P9-NEXT: blr
8409 ; CHECK-P8-LABEL: st_disjoint_align32_int8_t_uint32_t:
8410 ; CHECK-P8: # %bb.0: # %entry
8411 ; CHECK-P8-NEXT: lis r5, -15264
8412 ; CHECK-P8-NEXT: lis r6, 15258
8413 ; CHECK-P8-NEXT: and r3, r3, r5
8414 ; CHECK-P8-NEXT: ori r5, r6, 41712
8415 ; CHECK-P8-NEXT: stwx r4, r3, r5
8416 ; CHECK-P8-NEXT: blr
8418 %and = and i64 %ptr, -1000341504
8419 %conv = sext i8 %str to i32
8420 %or = or i64 %and, 999990000
8421 %0 = inttoptr i64 %or to ptr
8422 store i32 %conv, ptr %0, align 16
8426 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8427 define dso_local void @st_not_disjoint64_int8_t_uint32_t(i64 %ptr, i8 signext %str) {
8428 ; CHECK-P10-LABEL: st_not_disjoint64_int8_t_uint32_t:
8429 ; CHECK-P10: # %bb.0: # %entry
8430 ; CHECK-P10-NEXT: pli r5, 232
8431 ; CHECK-P10-NEXT: pli r6, 3567587329
8432 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
8433 ; CHECK-P10-NEXT: or r3, r3, r6
8434 ; CHECK-P10-NEXT: stw r4, 0(r3)
8435 ; CHECK-P10-NEXT: blr
8437 ; CHECK-PREP10-LABEL: st_not_disjoint64_int8_t_uint32_t:
8438 ; CHECK-PREP10: # %bb.0: # %entry
8439 ; CHECK-PREP10-NEXT: li r5, 29
8440 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
8441 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
8442 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
8443 ; CHECK-PREP10-NEXT: or r3, r3, r5
8444 ; CHECK-PREP10-NEXT: stw r4, 0(r3)
8445 ; CHECK-PREP10-NEXT: blr
8447 %conv = sext i8 %str to i32
8448 %or = or i64 %ptr, 1000000000001
8449 %0 = inttoptr i64 %or to ptr
8450 store i32 %conv, ptr %0, align 4
8454 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8455 define dso_local void @st_disjoint_align64_int8_t_uint32_t(i64 %ptr, i8 signext %str) {
8456 ; CHECK-P10-LABEL: st_disjoint_align64_int8_t_uint32_t:
8457 ; CHECK-P10: # %bb.0: # %entry
8458 ; CHECK-P10-NEXT: pli r5, 244140625
8459 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
8460 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
8461 ; CHECK-P10-NEXT: stwx r4, r3, r5
8462 ; CHECK-P10-NEXT: blr
8464 ; CHECK-PREP10-LABEL: st_disjoint_align64_int8_t_uint32_t:
8465 ; CHECK-PREP10: # %bb.0: # %entry
8466 ; CHECK-PREP10-NEXT: lis r5, 3725
8467 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
8468 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
8469 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
8470 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
8471 ; CHECK-PREP10-NEXT: blr
8473 %and = and i64 %ptr, -1099511627776
8474 %conv = sext i8 %str to i32
8475 %or = or i64 %and, 1000000000000
8476 %0 = inttoptr i64 %or to ptr
8477 store i32 %conv, ptr %0, align 4096
8481 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8482 define dso_local void @st_cst_align16_int8_t_uint32_t(i8 signext %str) {
8483 ; CHECK-LABEL: st_cst_align16_int8_t_uint32_t:
8484 ; CHECK: # %bb.0: # %entry
8485 ; CHECK-NEXT: stw r3, 4080(0)
8488 %conv = sext i8 %str to i32
8489 store i32 %conv, ptr inttoptr (i64 4080 to ptr), align 16
8493 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8494 define dso_local void @st_cst_align32_int8_t_uint32_t(i8 signext %str) {
8495 ; CHECK-LABEL: st_cst_align32_int8_t_uint32_t:
8496 ; CHECK: # %bb.0: # %entry
8497 ; CHECK-NEXT: lis r4, 153
8498 ; CHECK-NEXT: stw r3, -27108(r4)
8501 %conv = sext i8 %str to i32
8502 store i32 %conv, ptr inttoptr (i64 9999900 to ptr), align 4
8506 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8507 define dso_local void @st_cst_align64_int8_t_uint32_t(i8 signext %str) {
8508 ; CHECK-P10-LABEL: st_cst_align64_int8_t_uint32_t:
8509 ; CHECK-P10: # %bb.0: # %entry
8510 ; CHECK-P10-NEXT: pli r4, 244140625
8511 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
8512 ; CHECK-P10-NEXT: stw r3, 0(r4)
8513 ; CHECK-P10-NEXT: blr
8515 ; CHECK-PREP10-LABEL: st_cst_align64_int8_t_uint32_t:
8516 ; CHECK-PREP10: # %bb.0: # %entry
8517 ; CHECK-PREP10-NEXT: lis r4, 3725
8518 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
8519 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
8520 ; CHECK-PREP10-NEXT: stw r3, 0(r4)
8521 ; CHECK-PREP10-NEXT: blr
8523 %conv = sext i8 %str to i32
8524 store i32 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
8528 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8529 define dso_local void @st_0_int8_t_uint64_t(i64 %ptr, i8 signext %str) {
8530 ; CHECK-LABEL: st_0_int8_t_uint64_t:
8531 ; CHECK: # %bb.0: # %entry
8532 ; CHECK-NEXT: std r4, 0(r3)
8535 %conv = sext i8 %str to i64
8536 %0 = inttoptr i64 %ptr to ptr
8537 store i64 %conv, ptr %0, align 8
8541 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8542 define dso_local void @st_align16_int8_t_uint64_t(ptr nocapture %ptr, i8 signext %str) {
8543 ; CHECK-LABEL: st_align16_int8_t_uint64_t:
8544 ; CHECK: # %bb.0: # %entry
8545 ; CHECK-NEXT: std r4, 8(r3)
8548 %conv = sext i8 %str to i64
8549 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
8550 store i64 %conv, ptr %add.ptr, align 8
8554 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8555 define dso_local void @st_align32_int8_t_uint64_t(ptr nocapture %ptr, i8 signext %str) {
8556 ; CHECK-P10-LABEL: st_align32_int8_t_uint64_t:
8557 ; CHECK-P10: # %bb.0: # %entry
8558 ; CHECK-P10-NEXT: pstd r4, 99999000(r3), 0
8559 ; CHECK-P10-NEXT: blr
8561 ; CHECK-PREP10-LABEL: st_align32_int8_t_uint64_t:
8562 ; CHECK-PREP10: # %bb.0: # %entry
8563 ; CHECK-PREP10-NEXT: lis r5, 1525
8564 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
8565 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
8566 ; CHECK-PREP10-NEXT: blr
8568 %conv = sext i8 %str to i64
8569 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
8570 store i64 %conv, ptr %add.ptr, align 8
8574 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8575 define dso_local void @st_align64_int8_t_uint64_t(ptr nocapture %ptr, i8 signext %str) {
8576 ; CHECK-P10-LABEL: st_align64_int8_t_uint64_t:
8577 ; CHECK-P10: # %bb.0: # %entry
8578 ; CHECK-P10-NEXT: pli r5, 244140625
8579 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
8580 ; CHECK-P10-NEXT: stdx r4, r3, r5
8581 ; CHECK-P10-NEXT: blr
8583 ; CHECK-PREP10-LABEL: st_align64_int8_t_uint64_t:
8584 ; CHECK-PREP10: # %bb.0: # %entry
8585 ; CHECK-PREP10-NEXT: lis r5, 3725
8586 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
8587 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
8588 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
8589 ; CHECK-PREP10-NEXT: blr
8591 %conv = sext i8 %str to i64
8592 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
8593 store i64 %conv, ptr %add.ptr, align 8
8597 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8598 define dso_local void @st_reg_int8_t_uint64_t(ptr nocapture %ptr, i64 %off, i8 signext %str) {
8599 ; CHECK-LABEL: st_reg_int8_t_uint64_t:
8600 ; CHECK: # %bb.0: # %entry
8601 ; CHECK-NEXT: stdx r5, r3, r4
8604 %conv = sext i8 %str to i64
8605 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
8606 store i64 %conv, ptr %add.ptr, align 8
8610 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8611 define dso_local void @st_or1_int8_t_uint64_t(i64 %ptr, i8 zeroext %off, i8 signext %str) {
8612 ; CHECK-LABEL: st_or1_int8_t_uint64_t:
8613 ; CHECK: # %bb.0: # %entry
8614 ; CHECK-NEXT: or r3, r4, r3
8615 ; CHECK-NEXT: std r5, 0(r3)
8618 %conv = sext i8 %str to i64
8619 %conv1 = zext i8 %off to i64
8620 %or = or i64 %conv1, %ptr
8621 %0 = inttoptr i64 %or to ptr
8622 store i64 %conv, ptr %0, align 8
8626 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8627 define dso_local void @st_not_disjoint16_int8_t_uint64_t(i64 %ptr, i8 signext %str) {
8628 ; CHECK-LABEL: st_not_disjoint16_int8_t_uint64_t:
8629 ; CHECK: # %bb.0: # %entry
8630 ; CHECK-NEXT: ori r3, r3, 6
8631 ; CHECK-NEXT: std r4, 0(r3)
8634 %conv = sext i8 %str to i64
8635 %or = or i64 %ptr, 6
8636 %0 = inttoptr i64 %or to ptr
8637 store i64 %conv, ptr %0, align 8
8641 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8642 define dso_local void @st_disjoint_align16_int8_t_uint64_t(i64 %ptr, i8 signext %str) {
8643 ; CHECK-LABEL: st_disjoint_align16_int8_t_uint64_t:
8644 ; CHECK: # %bb.0: # %entry
8645 ; CHECK-NEXT: rldicr r3, r3, 0, 51
8646 ; CHECK-NEXT: std r4, 24(r3)
8649 %and = and i64 %ptr, -4096
8650 %conv = sext i8 %str to i64
8651 %or = or i64 %and, 24
8652 %0 = inttoptr i64 %or to ptr
8653 store i64 %conv, ptr %0, align 8
8657 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8658 define dso_local void @st_not_disjoint32_int8_t_uint64_t(i64 %ptr, i8 signext %str) {
8659 ; CHECK-LABEL: st_not_disjoint32_int8_t_uint64_t:
8660 ; CHECK: # %bb.0: # %entry
8661 ; CHECK-NEXT: ori r3, r3, 34463
8662 ; CHECK-NEXT: oris r3, r3, 1
8663 ; CHECK-NEXT: std r4, 0(r3)
8666 %conv = sext i8 %str to i64
8667 %or = or i64 %ptr, 99999
8668 %0 = inttoptr i64 %or to ptr
8669 store i64 %conv, ptr %0, align 8
8673 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8674 define dso_local void @st_disjoint_align32_int8_t_uint64_t(i64 %ptr, i8 signext %str) {
8675 ; CHECK-P10-LABEL: st_disjoint_align32_int8_t_uint64_t:
8676 ; CHECK-P10: # %bb.0: # %entry
8677 ; CHECK-P10-NEXT: lis r5, -15264
8678 ; CHECK-P10-NEXT: and r3, r3, r5
8679 ; CHECK-P10-NEXT: pstd r4, 999990000(r3), 0
8680 ; CHECK-P10-NEXT: blr
8682 ; CHECK-P9-LABEL: st_disjoint_align32_int8_t_uint64_t:
8683 ; CHECK-P9: # %bb.0: # %entry
8684 ; CHECK-P9-NEXT: lis r5, -15264
8685 ; CHECK-P9-NEXT: and r3, r3, r5
8686 ; CHECK-P9-NEXT: lis r5, 15258
8687 ; CHECK-P9-NEXT: ori r5, r5, 41712
8688 ; CHECK-P9-NEXT: stdx r4, r3, r5
8689 ; CHECK-P9-NEXT: blr
8691 ; CHECK-P8-LABEL: st_disjoint_align32_int8_t_uint64_t:
8692 ; CHECK-P8: # %bb.0: # %entry
8693 ; CHECK-P8-NEXT: lis r5, -15264
8694 ; CHECK-P8-NEXT: lis r6, 15258
8695 ; CHECK-P8-NEXT: and r3, r3, r5
8696 ; CHECK-P8-NEXT: ori r5, r6, 41712
8697 ; CHECK-P8-NEXT: stdx r4, r3, r5
8698 ; CHECK-P8-NEXT: blr
8700 %and = and i64 %ptr, -1000341504
8701 %conv = sext i8 %str to i64
8702 %or = or i64 %and, 999990000
8703 %0 = inttoptr i64 %or to ptr
8704 store i64 %conv, ptr %0, align 16
8708 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8709 define dso_local void @st_not_disjoint64_int8_t_uint64_t(i64 %ptr, i8 signext %str) {
8710 ; CHECK-P10-LABEL: st_not_disjoint64_int8_t_uint64_t:
8711 ; CHECK-P10: # %bb.0: # %entry
8712 ; CHECK-P10-NEXT: pli r5, 232
8713 ; CHECK-P10-NEXT: pli r6, 3567587329
8714 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
8715 ; CHECK-P10-NEXT: or r3, r3, r6
8716 ; CHECK-P10-NEXT: std r4, 0(r3)
8717 ; CHECK-P10-NEXT: blr
8719 ; CHECK-PREP10-LABEL: st_not_disjoint64_int8_t_uint64_t:
8720 ; CHECK-PREP10: # %bb.0: # %entry
8721 ; CHECK-PREP10-NEXT: li r5, 29
8722 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
8723 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
8724 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
8725 ; CHECK-PREP10-NEXT: or r3, r3, r5
8726 ; CHECK-PREP10-NEXT: std r4, 0(r3)
8727 ; CHECK-PREP10-NEXT: blr
8729 %conv = sext i8 %str to i64
8730 %or = or i64 %ptr, 1000000000001
8731 %0 = inttoptr i64 %or to ptr
8732 store i64 %conv, ptr %0, align 8
8736 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8737 define dso_local void @st_disjoint_align64_int8_t_uint64_t(i64 %ptr, i8 signext %str) {
8738 ; CHECK-P10-LABEL: st_disjoint_align64_int8_t_uint64_t:
8739 ; CHECK-P10: # %bb.0: # %entry
8740 ; CHECK-P10-NEXT: pli r5, 244140625
8741 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
8742 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
8743 ; CHECK-P10-NEXT: stdx r4, r3, r5
8744 ; CHECK-P10-NEXT: blr
8746 ; CHECK-PREP10-LABEL: st_disjoint_align64_int8_t_uint64_t:
8747 ; CHECK-PREP10: # %bb.0: # %entry
8748 ; CHECK-PREP10-NEXT: lis r5, 3725
8749 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
8750 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
8751 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
8752 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
8753 ; CHECK-PREP10-NEXT: blr
8755 %and = and i64 %ptr, -1099511627776
8756 %conv = sext i8 %str to i64
8757 %or = or i64 %and, 1000000000000
8758 %0 = inttoptr i64 %or to ptr
8759 store i64 %conv, ptr %0, align 4096
8763 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8764 define dso_local void @st_cst_align16_int8_t_uint64_t(i8 signext %str) {
8765 ; CHECK-LABEL: st_cst_align16_int8_t_uint64_t:
8766 ; CHECK: # %bb.0: # %entry
8767 ; CHECK-NEXT: std r3, 4080(0)
8770 %conv = sext i8 %str to i64
8771 store i64 %conv, ptr inttoptr (i64 4080 to ptr), align 16
8775 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8776 define dso_local void @st_cst_align32_int8_t_uint64_t(i8 signext %str) {
8777 ; CHECK-LABEL: st_cst_align32_int8_t_uint64_t:
8778 ; CHECK: # %bb.0: # %entry
8779 ; CHECK-NEXT: lis r4, 153
8780 ; CHECK-NEXT: std r3, -27108(r4)
8783 %conv = sext i8 %str to i64
8784 store i64 %conv, ptr inttoptr (i64 9999900 to ptr), align 8
8788 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8789 define dso_local void @st_cst_align64_int8_t_uint64_t(i8 signext %str) {
8790 ; CHECK-P10-LABEL: st_cst_align64_int8_t_uint64_t:
8791 ; CHECK-P10: # %bb.0: # %entry
8792 ; CHECK-P10-NEXT: pli r4, 244140625
8793 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
8794 ; CHECK-P10-NEXT: std r3, 0(r4)
8795 ; CHECK-P10-NEXT: blr
8797 ; CHECK-PREP10-LABEL: st_cst_align64_int8_t_uint64_t:
8798 ; CHECK-PREP10: # %bb.0: # %entry
8799 ; CHECK-PREP10-NEXT: lis r4, 3725
8800 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
8801 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
8802 ; CHECK-PREP10-NEXT: std r3, 0(r4)
8803 ; CHECK-PREP10-NEXT: blr
8805 %conv = sext i8 %str to i64
8806 store i64 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
8810 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8811 define dso_local void @st_0_int8_t_float(i64 %ptr, i8 signext %str) {
8812 ; CHECK-LABEL: st_0_int8_t_float:
8813 ; CHECK: # %bb.0: # %entry
8814 ; CHECK-NEXT: mtfprwa f0, r4
8815 ; CHECK-NEXT: xscvsxdsp f0, f0
8816 ; CHECK-NEXT: stfs f0, 0(r3)
8819 %conv = sitofp i8 %str to float
8820 %0 = inttoptr i64 %ptr to ptr
8821 store float %conv, ptr %0, align 4
8825 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8826 define dso_local void @st_align16_int8_t_float(ptr nocapture %ptr, i8 signext %str) {
8827 ; CHECK-LABEL: st_align16_int8_t_float:
8828 ; CHECK: # %bb.0: # %entry
8829 ; CHECK-NEXT: mtfprwa f0, r4
8830 ; CHECK-NEXT: xscvsxdsp f0, f0
8831 ; CHECK-NEXT: stfs f0, 8(r3)
8834 %conv = sitofp i8 %str to float
8835 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
8836 store float %conv, ptr %add.ptr, align 4
8840 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8841 define dso_local void @st_align32_int8_t_float(ptr nocapture %ptr, i8 signext %str) {
8842 ; CHECK-P10-LABEL: st_align32_int8_t_float:
8843 ; CHECK-P10: # %bb.0: # %entry
8844 ; CHECK-P10-NEXT: mtfprwa f0, r4
8845 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
8846 ; CHECK-P10-NEXT: pstfs f0, 99999000(r3), 0
8847 ; CHECK-P10-NEXT: blr
8849 ; CHECK-P9-LABEL: st_align32_int8_t_float:
8850 ; CHECK-P9: # %bb.0: # %entry
8851 ; CHECK-P9-NEXT: mtfprwa f0, r4
8852 ; CHECK-P9-NEXT: lis r4, 1525
8853 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
8854 ; CHECK-P9-NEXT: ori r4, r4, 56600
8855 ; CHECK-P9-NEXT: stfsx f0, r3, r4
8856 ; CHECK-P9-NEXT: blr
8858 ; CHECK-P8-LABEL: st_align32_int8_t_float:
8859 ; CHECK-P8: # %bb.0: # %entry
8860 ; CHECK-P8-NEXT: mtfprwa f0, r4
8861 ; CHECK-P8-NEXT: lis r4, 1525
8862 ; CHECK-P8-NEXT: ori r4, r4, 56600
8863 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
8864 ; CHECK-P8-NEXT: stfsx f0, r3, r4
8865 ; CHECK-P8-NEXT: blr
8867 %conv = sitofp i8 %str to float
8868 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
8869 store float %conv, ptr %add.ptr, align 4
8873 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8874 define dso_local void @st_align64_int8_t_float(ptr nocapture %ptr, i8 signext %str) {
8875 ; CHECK-P10-LABEL: st_align64_int8_t_float:
8876 ; CHECK-P10: # %bb.0: # %entry
8877 ; CHECK-P10-NEXT: mtfprwa f0, r4
8878 ; CHECK-P10-NEXT: pli r4, 244140625
8879 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
8880 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
8881 ; CHECK-P10-NEXT: stfsx f0, r3, r4
8882 ; CHECK-P10-NEXT: blr
8884 ; CHECK-P9-LABEL: st_align64_int8_t_float:
8885 ; CHECK-P9: # %bb.0: # %entry
8886 ; CHECK-P9-NEXT: mtfprwa f0, r4
8887 ; CHECK-P9-NEXT: lis r4, 3725
8888 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
8889 ; CHECK-P9-NEXT: ori r4, r4, 19025
8890 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
8891 ; CHECK-P9-NEXT: stfsx f0, r3, r4
8892 ; CHECK-P9-NEXT: blr
8894 ; CHECK-P8-LABEL: st_align64_int8_t_float:
8895 ; CHECK-P8: # %bb.0: # %entry
8896 ; CHECK-P8-NEXT: mtfprwa f0, r4
8897 ; CHECK-P8-NEXT: lis r4, 3725
8898 ; CHECK-P8-NEXT: ori r4, r4, 19025
8899 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
8900 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
8901 ; CHECK-P8-NEXT: stfsx f0, r3, r4
8902 ; CHECK-P8-NEXT: blr
8904 %conv = sitofp i8 %str to float
8905 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
8906 store float %conv, ptr %add.ptr, align 4
8910 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8911 define dso_local void @st_reg_int8_t_float(ptr nocapture %ptr, i64 %off, i8 signext %str) {
8912 ; CHECK-LABEL: st_reg_int8_t_float:
8913 ; CHECK: # %bb.0: # %entry
8914 ; CHECK-NEXT: mtfprwa f0, r5
8915 ; CHECK-NEXT: xscvsxdsp f0, f0
8916 ; CHECK-NEXT: stfsx f0, r3, r4
8919 %conv = sitofp i8 %str to float
8920 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
8921 store float %conv, ptr %add.ptr, align 4
8925 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8926 define dso_local void @st_or1_int8_t_float(i64 %ptr, i8 zeroext %off, i8 signext %str) {
8927 ; CHECK-LABEL: st_or1_int8_t_float:
8928 ; CHECK: # %bb.0: # %entry
8929 ; CHECK-NEXT: mtfprwa f0, r5
8930 ; CHECK-NEXT: or r3, r4, r3
8931 ; CHECK-NEXT: xscvsxdsp f0, f0
8932 ; CHECK-NEXT: stfs f0, 0(r3)
8935 %conv = sitofp i8 %str to float
8936 %conv1 = zext i8 %off to i64
8937 %or = or i64 %conv1, %ptr
8938 %0 = inttoptr i64 %or to ptr
8939 store float %conv, ptr %0, align 4
8943 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8944 define dso_local void @st_not_disjoint16_int8_t_float(i64 %ptr, i8 signext %str) {
8945 ; CHECK-LABEL: st_not_disjoint16_int8_t_float:
8946 ; CHECK: # %bb.0: # %entry
8947 ; CHECK-NEXT: mtfprwa f0, r4
8948 ; CHECK-NEXT: ori r3, r3, 6
8949 ; CHECK-NEXT: xscvsxdsp f0, f0
8950 ; CHECK-NEXT: stfs f0, 0(r3)
8953 %conv = sitofp i8 %str to float
8954 %or = or i64 %ptr, 6
8955 %0 = inttoptr i64 %or to ptr
8956 store float %conv, ptr %0, align 4
8960 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8961 define dso_local void @st_disjoint_align16_int8_t_float(i64 %ptr, i8 signext %str) {
8962 ; CHECK-LABEL: st_disjoint_align16_int8_t_float:
8963 ; CHECK: # %bb.0: # %entry
8964 ; CHECK-NEXT: mtfprwa f0, r4
8965 ; CHECK-NEXT: rldicr r3, r3, 0, 51
8966 ; CHECK-NEXT: xscvsxdsp f0, f0
8967 ; CHECK-NEXT: stfs f0, 24(r3)
8970 %and = and i64 %ptr, -4096
8971 %conv = sitofp i8 %str to float
8972 %or = or i64 %and, 24
8973 %0 = inttoptr i64 %or to ptr
8974 store float %conv, ptr %0, align 8
8978 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8979 define dso_local void @st_not_disjoint32_int8_t_float(i64 %ptr, i8 signext %str) {
8980 ; CHECK-P10-LABEL: st_not_disjoint32_int8_t_float:
8981 ; CHECK-P10: # %bb.0: # %entry
8982 ; CHECK-P10-NEXT: mtfprwa f0, r4
8983 ; CHECK-P10-NEXT: ori r3, r3, 34463
8984 ; CHECK-P10-NEXT: oris r3, r3, 1
8985 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
8986 ; CHECK-P10-NEXT: stfs f0, 0(r3)
8987 ; CHECK-P10-NEXT: blr
8989 ; CHECK-P9-LABEL: st_not_disjoint32_int8_t_float:
8990 ; CHECK-P9: # %bb.0: # %entry
8991 ; CHECK-P9-NEXT: mtfprwa f0, r4
8992 ; CHECK-P9-NEXT: ori r3, r3, 34463
8993 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
8994 ; CHECK-P9-NEXT: oris r3, r3, 1
8995 ; CHECK-P9-NEXT: stfs f0, 0(r3)
8996 ; CHECK-P9-NEXT: blr
8998 ; CHECK-P8-LABEL: st_not_disjoint32_int8_t_float:
8999 ; CHECK-P8: # %bb.0: # %entry
9000 ; CHECK-P8-NEXT: mtfprwa f0, r4
9001 ; CHECK-P8-NEXT: ori r3, r3, 34463
9002 ; CHECK-P8-NEXT: oris r3, r3, 1
9003 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
9004 ; CHECK-P8-NEXT: stfs f0, 0(r3)
9005 ; CHECK-P8-NEXT: blr
9007 %conv = sitofp i8 %str to float
9008 %or = or i64 %ptr, 99999
9009 %0 = inttoptr i64 %or to ptr
9010 store float %conv, ptr %0, align 4
9014 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9015 define dso_local void @st_disjoint_align32_int8_t_float(i64 %ptr, i8 signext %str) {
9016 ; CHECK-P10-LABEL: st_disjoint_align32_int8_t_float:
9017 ; CHECK-P10: # %bb.0: # %entry
9018 ; CHECK-P10-NEXT: mtfprwa f0, r4
9019 ; CHECK-P10-NEXT: lis r5, -15264
9020 ; CHECK-P10-NEXT: and r3, r3, r5
9021 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
9022 ; CHECK-P10-NEXT: pstfs f0, 999990000(r3), 0
9023 ; CHECK-P10-NEXT: blr
9025 ; CHECK-P9-LABEL: st_disjoint_align32_int8_t_float:
9026 ; CHECK-P9: # %bb.0: # %entry
9027 ; CHECK-P9-NEXT: mtfprwa f0, r4
9028 ; CHECK-P9-NEXT: lis r5, -15264
9029 ; CHECK-P9-NEXT: lis r4, 15258
9030 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
9031 ; CHECK-P9-NEXT: and r3, r3, r5
9032 ; CHECK-P9-NEXT: ori r4, r4, 41712
9033 ; CHECK-P9-NEXT: stfsx f0, r3, r4
9034 ; CHECK-P9-NEXT: blr
9036 ; CHECK-P8-LABEL: st_disjoint_align32_int8_t_float:
9037 ; CHECK-P8: # %bb.0: # %entry
9038 ; CHECK-P8-NEXT: mtfprwa f0, r4
9039 ; CHECK-P8-NEXT: lis r4, -15264
9040 ; CHECK-P8-NEXT: lis r5, 15258
9041 ; CHECK-P8-NEXT: and r3, r3, r4
9042 ; CHECK-P8-NEXT: ori r4, r5, 41712
9043 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
9044 ; CHECK-P8-NEXT: stfsx f0, r3, r4
9045 ; CHECK-P8-NEXT: blr
9047 %and = and i64 %ptr, -1000341504
9048 %conv = sitofp i8 %str to float
9049 %or = or i64 %and, 999990000
9050 %0 = inttoptr i64 %or to ptr
9051 store float %conv, ptr %0, align 16
9055 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9056 define dso_local void @st_not_disjoint64_int8_t_float(i64 %ptr, i8 signext %str) {
9057 ; CHECK-P10-LABEL: st_not_disjoint64_int8_t_float:
9058 ; CHECK-P10: # %bb.0: # %entry
9059 ; CHECK-P10-NEXT: mtfprwa f0, r4
9060 ; CHECK-P10-NEXT: pli r4, 232
9061 ; CHECK-P10-NEXT: pli r5, 3567587329
9062 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
9063 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
9064 ; CHECK-P10-NEXT: or r3, r3, r5
9065 ; CHECK-P10-NEXT: stfs f0, 0(r3)
9066 ; CHECK-P10-NEXT: blr
9068 ; CHECK-PREP10-LABEL: st_not_disjoint64_int8_t_float:
9069 ; CHECK-PREP10: # %bb.0: # %entry
9070 ; CHECK-PREP10-NEXT: mtfprwa f0, r4
9071 ; CHECK-PREP10-NEXT: li r4, 29
9072 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
9073 ; CHECK-PREP10-NEXT: xscvsxdsp f0, f0
9074 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
9075 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
9076 ; CHECK-PREP10-NEXT: or r3, r3, r4
9077 ; CHECK-PREP10-NEXT: stfs f0, 0(r3)
9078 ; CHECK-PREP10-NEXT: blr
9080 %conv = sitofp i8 %str to float
9081 %or = or i64 %ptr, 1000000000001
9082 %0 = inttoptr i64 %or to ptr
9083 store float %conv, ptr %0, align 4
9087 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9088 define dso_local void @st_disjoint_align64_int8_t_float(i64 %ptr, i8 signext %str) {
9089 ; CHECK-P10-LABEL: st_disjoint_align64_int8_t_float:
9090 ; CHECK-P10: # %bb.0: # %entry
9091 ; CHECK-P10-NEXT: mtfprwa f0, r4
9092 ; CHECK-P10-NEXT: pli r4, 244140625
9093 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
9094 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
9095 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
9096 ; CHECK-P10-NEXT: stfsx f0, r3, r4
9097 ; CHECK-P10-NEXT: blr
9099 ; CHECK-P9-LABEL: st_disjoint_align64_int8_t_float:
9100 ; CHECK-P9: # %bb.0: # %entry
9101 ; CHECK-P9-NEXT: mtfprwa f0, r4
9102 ; CHECK-P9-NEXT: lis r4, 3725
9103 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
9104 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
9105 ; CHECK-P9-NEXT: ori r4, r4, 19025
9106 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
9107 ; CHECK-P9-NEXT: stfsx f0, r3, r4
9108 ; CHECK-P9-NEXT: blr
9110 ; CHECK-P8-LABEL: st_disjoint_align64_int8_t_float:
9111 ; CHECK-P8: # %bb.0: # %entry
9112 ; CHECK-P8-NEXT: mtfprwa f0, r4
9113 ; CHECK-P8-NEXT: lis r5, 3725
9114 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
9115 ; CHECK-P8-NEXT: ori r4, r5, 19025
9116 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
9117 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
9118 ; CHECK-P8-NEXT: stfsx f0, r3, r4
9119 ; CHECK-P8-NEXT: blr
9121 %and = and i64 %ptr, -1099511627776
9122 %conv = sitofp i8 %str to float
9123 %or = or i64 %and, 1000000000000
9124 %0 = inttoptr i64 %or to ptr
9125 store float %conv, ptr %0, align 4096
9129 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9130 define dso_local void @st_cst_align16_int8_t_float(i8 signext %str) {
9131 ; CHECK-LABEL: st_cst_align16_int8_t_float:
9132 ; CHECK: # %bb.0: # %entry
9133 ; CHECK-NEXT: mtfprwa f0, r3
9134 ; CHECK-NEXT: xscvsxdsp f0, f0
9135 ; CHECK-NEXT: stfs f0, 4080(0)
9138 %conv = sitofp i8 %str to float
9139 store float %conv, ptr inttoptr (i64 4080 to ptr), align 16
9143 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9144 define dso_local void @st_cst_align32_int8_t_float(i8 signext %str) {
9145 ; CHECK-LABEL: st_cst_align32_int8_t_float:
9146 ; CHECK: # %bb.0: # %entry
9147 ; CHECK-NEXT: mtfprwa f0, r3
9148 ; CHECK-NEXT: lis r3, 153
9149 ; CHECK-NEXT: xscvsxdsp f0, f0
9150 ; CHECK-NEXT: stfs f0, -27108(r3)
9153 %conv = sitofp i8 %str to float
9154 store float %conv, ptr inttoptr (i64 9999900 to ptr), align 4
9158 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9159 define dso_local void @st_cst_align64_int8_t_float(i8 signext %str) {
9160 ; CHECK-P10-LABEL: st_cst_align64_int8_t_float:
9161 ; CHECK-P10: # %bb.0: # %entry
9162 ; CHECK-P10-NEXT: mtfprwa f0, r3
9163 ; CHECK-P10-NEXT: pli r3, 244140625
9164 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
9165 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
9166 ; CHECK-P10-NEXT: stfs f0, 0(r3)
9167 ; CHECK-P10-NEXT: blr
9169 ; CHECK-P9-LABEL: st_cst_align64_int8_t_float:
9170 ; CHECK-P9: # %bb.0: # %entry
9171 ; CHECK-P9-NEXT: mtfprwa f0, r3
9172 ; CHECK-P9-NEXT: lis r3, 3725
9173 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
9174 ; CHECK-P9-NEXT: ori r3, r3, 19025
9175 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
9176 ; CHECK-P9-NEXT: stfs f0, 0(r3)
9177 ; CHECK-P9-NEXT: blr
9179 ; CHECK-P8-LABEL: st_cst_align64_int8_t_float:
9180 ; CHECK-P8: # %bb.0: # %entry
9181 ; CHECK-P8-NEXT: mtfprwa f0, r3
9182 ; CHECK-P8-NEXT: lis r3, 3725
9183 ; CHECK-P8-NEXT: ori r3, r3, 19025
9184 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
9185 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
9186 ; CHECK-P8-NEXT: stfs f0, 0(r3)
9187 ; CHECK-P8-NEXT: blr
9189 %conv = sitofp i8 %str to float
9190 store float %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
9194 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9195 define dso_local void @st_0_int8_t_double(i64 %ptr, i8 signext %str) {
9196 ; CHECK-LABEL: st_0_int8_t_double:
9197 ; CHECK: # %bb.0: # %entry
9198 ; CHECK-NEXT: mtfprwa f0, r4
9199 ; CHECK-NEXT: xscvsxddp f0, f0
9200 ; CHECK-NEXT: stfd f0, 0(r3)
9203 %conv = sitofp i8 %str to double
9204 %0 = inttoptr i64 %ptr to ptr
9205 store double %conv, ptr %0, align 8
9209 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9210 define dso_local void @st_align16_int8_t_double(ptr nocapture %ptr, i8 signext %str) {
9211 ; CHECK-LABEL: st_align16_int8_t_double:
9212 ; CHECK: # %bb.0: # %entry
9213 ; CHECK-NEXT: mtfprwa f0, r4
9214 ; CHECK-NEXT: xscvsxddp f0, f0
9215 ; CHECK-NEXT: stfd f0, 8(r3)
9218 %conv = sitofp i8 %str to double
9219 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
9220 store double %conv, ptr %add.ptr, align 8
9224 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9225 define dso_local void @st_align32_int8_t_double(ptr nocapture %ptr, i8 signext %str) {
9226 ; CHECK-P10-LABEL: st_align32_int8_t_double:
9227 ; CHECK-P10: # %bb.0: # %entry
9228 ; CHECK-P10-NEXT: mtfprwa f0, r4
9229 ; CHECK-P10-NEXT: xscvsxddp f0, f0
9230 ; CHECK-P10-NEXT: pstfd f0, 99999000(r3), 0
9231 ; CHECK-P10-NEXT: blr
9233 ; CHECK-P9-LABEL: st_align32_int8_t_double:
9234 ; CHECK-P9: # %bb.0: # %entry
9235 ; CHECK-P9-NEXT: mtfprwa f0, r4
9236 ; CHECK-P9-NEXT: lis r4, 1525
9237 ; CHECK-P9-NEXT: xscvsxddp f0, f0
9238 ; CHECK-P9-NEXT: ori r4, r4, 56600
9239 ; CHECK-P9-NEXT: stfdx f0, r3, r4
9240 ; CHECK-P9-NEXT: blr
9242 ; CHECK-P8-LABEL: st_align32_int8_t_double:
9243 ; CHECK-P8: # %bb.0: # %entry
9244 ; CHECK-P8-NEXT: mtfprwa f0, r4
9245 ; CHECK-P8-NEXT: lis r4, 1525
9246 ; CHECK-P8-NEXT: ori r4, r4, 56600
9247 ; CHECK-P8-NEXT: xscvsxddp f0, f0
9248 ; CHECK-P8-NEXT: stfdx f0, r3, r4
9249 ; CHECK-P8-NEXT: blr
9251 %conv = sitofp i8 %str to double
9252 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
9253 store double %conv, ptr %add.ptr, align 8
9257 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9258 define dso_local void @st_align64_int8_t_double(ptr nocapture %ptr, i8 signext %str) {
9259 ; CHECK-P10-LABEL: st_align64_int8_t_double:
9260 ; CHECK-P10: # %bb.0: # %entry
9261 ; CHECK-P10-NEXT: mtfprwa f0, r4
9262 ; CHECK-P10-NEXT: pli r4, 244140625
9263 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
9264 ; CHECK-P10-NEXT: xscvsxddp f0, f0
9265 ; CHECK-P10-NEXT: stfdx f0, r3, r4
9266 ; CHECK-P10-NEXT: blr
9268 ; CHECK-P9-LABEL: st_align64_int8_t_double:
9269 ; CHECK-P9: # %bb.0: # %entry
9270 ; CHECK-P9-NEXT: mtfprwa f0, r4
9271 ; CHECK-P9-NEXT: lis r4, 3725
9272 ; CHECK-P9-NEXT: xscvsxddp f0, f0
9273 ; CHECK-P9-NEXT: ori r4, r4, 19025
9274 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
9275 ; CHECK-P9-NEXT: stfdx f0, r3, r4
9276 ; CHECK-P9-NEXT: blr
9278 ; CHECK-P8-LABEL: st_align64_int8_t_double:
9279 ; CHECK-P8: # %bb.0: # %entry
9280 ; CHECK-P8-NEXT: mtfprwa f0, r4
9281 ; CHECK-P8-NEXT: lis r4, 3725
9282 ; CHECK-P8-NEXT: ori r4, r4, 19025
9283 ; CHECK-P8-NEXT: xscvsxddp f0, f0
9284 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
9285 ; CHECK-P8-NEXT: stfdx f0, r3, r4
9286 ; CHECK-P8-NEXT: blr
9288 %conv = sitofp i8 %str to double
9289 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
9290 store double %conv, ptr %add.ptr, align 8
9294 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9295 define dso_local void @st_reg_int8_t_double(ptr nocapture %ptr, i64 %off, i8 signext %str) {
9296 ; CHECK-LABEL: st_reg_int8_t_double:
9297 ; CHECK: # %bb.0: # %entry
9298 ; CHECK-NEXT: mtfprwa f0, r5
9299 ; CHECK-NEXT: xscvsxddp f0, f0
9300 ; CHECK-NEXT: stfdx f0, r3, r4
9303 %conv = sitofp i8 %str to double
9304 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
9305 store double %conv, ptr %add.ptr, align 8
9309 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9310 define dso_local void @st_or1_int8_t_double(i64 %ptr, i8 zeroext %off, i8 signext %str) {
9311 ; CHECK-LABEL: st_or1_int8_t_double:
9312 ; CHECK: # %bb.0: # %entry
9313 ; CHECK-NEXT: mtfprwa f0, r5
9314 ; CHECK-NEXT: or r3, r4, r3
9315 ; CHECK-NEXT: xscvsxddp f0, f0
9316 ; CHECK-NEXT: stfd f0, 0(r3)
9319 %conv = sitofp i8 %str to double
9320 %conv1 = zext i8 %off to i64
9321 %or = or i64 %conv1, %ptr
9322 %0 = inttoptr i64 %or to ptr
9323 store double %conv, ptr %0, align 8
9327 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9328 define dso_local void @st_not_disjoint16_int8_t_double(i64 %ptr, i8 signext %str) {
9329 ; CHECK-LABEL: st_not_disjoint16_int8_t_double:
9330 ; CHECK: # %bb.0: # %entry
9331 ; CHECK-NEXT: mtfprwa f0, r4
9332 ; CHECK-NEXT: ori r3, r3, 6
9333 ; CHECK-NEXT: xscvsxddp f0, f0
9334 ; CHECK-NEXT: stfd f0, 0(r3)
9337 %conv = sitofp i8 %str to double
9338 %or = or i64 %ptr, 6
9339 %0 = inttoptr i64 %or to ptr
9340 store double %conv, ptr %0, align 8
9344 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9345 define dso_local void @st_disjoint_align16_int8_t_double(i64 %ptr, i8 signext %str) {
9346 ; CHECK-LABEL: st_disjoint_align16_int8_t_double:
9347 ; CHECK: # %bb.0: # %entry
9348 ; CHECK-NEXT: mtfprwa f0, r4
9349 ; CHECK-NEXT: rldicr r3, r3, 0, 51
9350 ; CHECK-NEXT: xscvsxddp f0, f0
9351 ; CHECK-NEXT: stfd f0, 24(r3)
9354 %and = and i64 %ptr, -4096
9355 %conv = sitofp i8 %str to double
9356 %or = or i64 %and, 24
9357 %0 = inttoptr i64 %or to ptr
9358 store double %conv, ptr %0, align 8
9362 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9363 define dso_local void @st_not_disjoint32_int8_t_double(i64 %ptr, i8 signext %str) {
9364 ; CHECK-P10-LABEL: st_not_disjoint32_int8_t_double:
9365 ; CHECK-P10: # %bb.0: # %entry
9366 ; CHECK-P10-NEXT: mtfprwa f0, r4
9367 ; CHECK-P10-NEXT: ori r3, r3, 34463
9368 ; CHECK-P10-NEXT: oris r3, r3, 1
9369 ; CHECK-P10-NEXT: xscvsxddp f0, f0
9370 ; CHECK-P10-NEXT: stfd f0, 0(r3)
9371 ; CHECK-P10-NEXT: blr
9373 ; CHECK-P9-LABEL: st_not_disjoint32_int8_t_double:
9374 ; CHECK-P9: # %bb.0: # %entry
9375 ; CHECK-P9-NEXT: mtfprwa f0, r4
9376 ; CHECK-P9-NEXT: ori r3, r3, 34463
9377 ; CHECK-P9-NEXT: xscvsxddp f0, f0
9378 ; CHECK-P9-NEXT: oris r3, r3, 1
9379 ; CHECK-P9-NEXT: stfd f0, 0(r3)
9380 ; CHECK-P9-NEXT: blr
9382 ; CHECK-P8-LABEL: st_not_disjoint32_int8_t_double:
9383 ; CHECK-P8: # %bb.0: # %entry
9384 ; CHECK-P8-NEXT: mtfprwa f0, r4
9385 ; CHECK-P8-NEXT: ori r3, r3, 34463
9386 ; CHECK-P8-NEXT: oris r3, r3, 1
9387 ; CHECK-P8-NEXT: xscvsxddp f0, f0
9388 ; CHECK-P8-NEXT: stfd f0, 0(r3)
9389 ; CHECK-P8-NEXT: blr
9391 %conv = sitofp i8 %str to double
9392 %or = or i64 %ptr, 99999
9393 %0 = inttoptr i64 %or to ptr
9394 store double %conv, ptr %0, align 8
9398 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9399 define dso_local void @st_disjoint_align32_int8_t_double(i64 %ptr, i8 signext %str) {
9400 ; CHECK-P10-LABEL: st_disjoint_align32_int8_t_double:
9401 ; CHECK-P10: # %bb.0: # %entry
9402 ; CHECK-P10-NEXT: mtfprwa f0, r4
9403 ; CHECK-P10-NEXT: lis r5, -15264
9404 ; CHECK-P10-NEXT: and r3, r3, r5
9405 ; CHECK-P10-NEXT: xscvsxddp f0, f0
9406 ; CHECK-P10-NEXT: pstfd f0, 999990000(r3), 0
9407 ; CHECK-P10-NEXT: blr
9409 ; CHECK-P9-LABEL: st_disjoint_align32_int8_t_double:
9410 ; CHECK-P9: # %bb.0: # %entry
9411 ; CHECK-P9-NEXT: mtfprwa f0, r4
9412 ; CHECK-P9-NEXT: lis r5, -15264
9413 ; CHECK-P9-NEXT: lis r4, 15258
9414 ; CHECK-P9-NEXT: xscvsxddp f0, f0
9415 ; CHECK-P9-NEXT: and r3, r3, r5
9416 ; CHECK-P9-NEXT: ori r4, r4, 41712
9417 ; CHECK-P9-NEXT: stfdx f0, r3, r4
9418 ; CHECK-P9-NEXT: blr
9420 ; CHECK-P8-LABEL: st_disjoint_align32_int8_t_double:
9421 ; CHECK-P8: # %bb.0: # %entry
9422 ; CHECK-P8-NEXT: mtfprwa f0, r4
9423 ; CHECK-P8-NEXT: lis r4, -15264
9424 ; CHECK-P8-NEXT: lis r5, 15258
9425 ; CHECK-P8-NEXT: and r3, r3, r4
9426 ; CHECK-P8-NEXT: ori r4, r5, 41712
9427 ; CHECK-P8-NEXT: xscvsxddp f0, f0
9428 ; CHECK-P8-NEXT: stfdx f0, r3, r4
9429 ; CHECK-P8-NEXT: blr
9431 %and = and i64 %ptr, -1000341504
9432 %conv = sitofp i8 %str to double
9433 %or = or i64 %and, 999990000
9434 %0 = inttoptr i64 %or to ptr
9435 store double %conv, ptr %0, align 16
9439 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9440 define dso_local void @st_not_disjoint64_int8_t_double(i64 %ptr, i8 signext %str) {
9441 ; CHECK-P10-LABEL: st_not_disjoint64_int8_t_double:
9442 ; CHECK-P10: # %bb.0: # %entry
9443 ; CHECK-P10-NEXT: mtfprwa f0, r4
9444 ; CHECK-P10-NEXT: pli r4, 232
9445 ; CHECK-P10-NEXT: pli r5, 3567587329
9446 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
9447 ; CHECK-P10-NEXT: xscvsxddp f0, f0
9448 ; CHECK-P10-NEXT: or r3, r3, r5
9449 ; CHECK-P10-NEXT: stfd f0, 0(r3)
9450 ; CHECK-P10-NEXT: blr
9452 ; CHECK-PREP10-LABEL: st_not_disjoint64_int8_t_double:
9453 ; CHECK-PREP10: # %bb.0: # %entry
9454 ; CHECK-PREP10-NEXT: mtfprwa f0, r4
9455 ; CHECK-PREP10-NEXT: li r4, 29
9456 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
9457 ; CHECK-PREP10-NEXT: xscvsxddp f0, f0
9458 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
9459 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
9460 ; CHECK-PREP10-NEXT: or r3, r3, r4
9461 ; CHECK-PREP10-NEXT: stfd f0, 0(r3)
9462 ; CHECK-PREP10-NEXT: blr
9464 %conv = sitofp i8 %str to double
9465 %or = or i64 %ptr, 1000000000001
9466 %0 = inttoptr i64 %or to ptr
9467 store double %conv, ptr %0, align 8
9471 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9472 define dso_local void @st_disjoint_align64_int8_t_double(i64 %ptr, i8 signext %str) {
9473 ; CHECK-P10-LABEL: st_disjoint_align64_int8_t_double:
9474 ; CHECK-P10: # %bb.0: # %entry
9475 ; CHECK-P10-NEXT: mtfprwa f0, r4
9476 ; CHECK-P10-NEXT: pli r4, 244140625
9477 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
9478 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
9479 ; CHECK-P10-NEXT: xscvsxddp f0, f0
9480 ; CHECK-P10-NEXT: stfdx f0, r3, r4
9481 ; CHECK-P10-NEXT: blr
9483 ; CHECK-P9-LABEL: st_disjoint_align64_int8_t_double:
9484 ; CHECK-P9: # %bb.0: # %entry
9485 ; CHECK-P9-NEXT: mtfprwa f0, r4
9486 ; CHECK-P9-NEXT: lis r4, 3725
9487 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
9488 ; CHECK-P9-NEXT: xscvsxddp f0, f0
9489 ; CHECK-P9-NEXT: ori r4, r4, 19025
9490 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
9491 ; CHECK-P9-NEXT: stfdx f0, r3, r4
9492 ; CHECK-P9-NEXT: blr
9494 ; CHECK-P8-LABEL: st_disjoint_align64_int8_t_double:
9495 ; CHECK-P8: # %bb.0: # %entry
9496 ; CHECK-P8-NEXT: mtfprwa f0, r4
9497 ; CHECK-P8-NEXT: lis r5, 3725
9498 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
9499 ; CHECK-P8-NEXT: ori r4, r5, 19025
9500 ; CHECK-P8-NEXT: xscvsxddp f0, f0
9501 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
9502 ; CHECK-P8-NEXT: stfdx f0, r3, r4
9503 ; CHECK-P8-NEXT: blr
9505 %and = and i64 %ptr, -1099511627776
9506 %conv = sitofp i8 %str to double
9507 %or = or i64 %and, 1000000000000
9508 %0 = inttoptr i64 %or to ptr
9509 store double %conv, ptr %0, align 4096
9513 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9514 define dso_local void @st_cst_align16_int8_t_double(i8 signext %str) {
9515 ; CHECK-LABEL: st_cst_align16_int8_t_double:
9516 ; CHECK: # %bb.0: # %entry
9517 ; CHECK-NEXT: mtfprwa f0, r3
9518 ; CHECK-NEXT: xscvsxddp f0, f0
9519 ; CHECK-NEXT: stfd f0, 4080(0)
9522 %conv = sitofp i8 %str to double
9523 store double %conv, ptr inttoptr (i64 4080 to ptr), align 16
9527 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9528 define dso_local void @st_cst_align32_int8_t_double(i8 signext %str) {
9529 ; CHECK-LABEL: st_cst_align32_int8_t_double:
9530 ; CHECK: # %bb.0: # %entry
9531 ; CHECK-NEXT: mtfprwa f0, r3
9532 ; CHECK-NEXT: lis r3, 153
9533 ; CHECK-NEXT: xscvsxddp f0, f0
9534 ; CHECK-NEXT: stfd f0, -27108(r3)
9537 %conv = sitofp i8 %str to double
9538 store double %conv, ptr inttoptr (i64 9999900 to ptr), align 8
9542 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9543 define dso_local void @st_cst_align64_int8_t_double(i8 signext %str) {
9544 ; CHECK-P10-LABEL: st_cst_align64_int8_t_double:
9545 ; CHECK-P10: # %bb.0: # %entry
9546 ; CHECK-P10-NEXT: mtfprwa f0, r3
9547 ; CHECK-P10-NEXT: pli r3, 244140625
9548 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
9549 ; CHECK-P10-NEXT: xscvsxddp f0, f0
9550 ; CHECK-P10-NEXT: stfd f0, 0(r3)
9551 ; CHECK-P10-NEXT: blr
9553 ; CHECK-P9-LABEL: st_cst_align64_int8_t_double:
9554 ; CHECK-P9: # %bb.0: # %entry
9555 ; CHECK-P9-NEXT: mtfprwa f0, r3
9556 ; CHECK-P9-NEXT: lis r3, 3725
9557 ; CHECK-P9-NEXT: xscvsxddp f0, f0
9558 ; CHECK-P9-NEXT: ori r3, r3, 19025
9559 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
9560 ; CHECK-P9-NEXT: stfd f0, 0(r3)
9561 ; CHECK-P9-NEXT: blr
9563 ; CHECK-P8-LABEL: st_cst_align64_int8_t_double:
9564 ; CHECK-P8: # %bb.0: # %entry
9565 ; CHECK-P8-NEXT: mtfprwa f0, r3
9566 ; CHECK-P8-NEXT: lis r3, 3725
9567 ; CHECK-P8-NEXT: ori r3, r3, 19025
9568 ; CHECK-P8-NEXT: xscvsxddp f0, f0
9569 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
9570 ; CHECK-P8-NEXT: stfd f0, 0(r3)
9571 ; CHECK-P8-NEXT: blr
9573 %conv = sitofp i8 %str to double
9574 store double %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096