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-PREP10-LABEL: ld_disjoint_align32_int8_t_uint8_t:
179 ; CHECK-PREP10: # %bb.0: # %entry
180 ; CHECK-PREP10-NEXT: lis r4, -15264
181 ; CHECK-PREP10-NEXT: and r3, r3, r4
182 ; CHECK-PREP10-NEXT: lis r4, 15258
183 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
184 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
185 ; CHECK-PREP10-NEXT: extsb r3, r3
186 ; CHECK-PREP10-NEXT: blr
188 %and = and i64 %ptr, -1000341504
189 %or = or i64 %and, 999990000
190 %0 = inttoptr i64 %or to ptr
191 %1 = load i8, ptr %0, align 16
195 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
196 define dso_local signext i8 @ld_not_disjoint64_int8_t_uint8_t(i64 %ptr) {
197 ; CHECK-P10-LABEL: ld_not_disjoint64_int8_t_uint8_t:
198 ; CHECK-P10: # %bb.0: # %entry
199 ; CHECK-P10-NEXT: pli r4, 232
200 ; CHECK-P10-NEXT: pli r5, 3567587329
201 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
202 ; CHECK-P10-NEXT: or r3, r3, r5
203 ; CHECK-P10-NEXT: lbz r3, 0(r3)
204 ; CHECK-P10-NEXT: extsb r3, r3
205 ; CHECK-P10-NEXT: blr
207 ; CHECK-PREP10-LABEL: ld_not_disjoint64_int8_t_uint8_t:
208 ; CHECK-PREP10: # %bb.0: # %entry
209 ; CHECK-PREP10-NEXT: li r4, 29
210 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
211 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
212 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
213 ; CHECK-PREP10-NEXT: or r3, r3, r4
214 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
215 ; CHECK-PREP10-NEXT: extsb r3, r3
216 ; CHECK-PREP10-NEXT: blr
218 %or = or i64 %ptr, 1000000000001
219 %0 = inttoptr i64 %or to ptr
220 %1 = load i8, ptr %0, align 1
224 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
225 define dso_local signext i8 @ld_disjoint_align64_int8_t_uint8_t(i64 %ptr) {
226 ; CHECK-P10-LABEL: ld_disjoint_align64_int8_t_uint8_t:
227 ; CHECK-P10: # %bb.0: # %entry
228 ; CHECK-P10-NEXT: pli r4, 244140625
229 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
230 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
231 ; CHECK-P10-NEXT: lbzx r3, r3, r4
232 ; CHECK-P10-NEXT: extsb r3, r3
233 ; CHECK-P10-NEXT: blr
235 ; CHECK-PREP10-LABEL: ld_disjoint_align64_int8_t_uint8_t:
236 ; CHECK-PREP10: # %bb.0: # %entry
237 ; CHECK-PREP10-NEXT: lis r4, 3725
238 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
239 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
240 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
241 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
242 ; CHECK-PREP10-NEXT: extsb r3, r3
243 ; CHECK-PREP10-NEXT: blr
245 %and = and i64 %ptr, -1099511627776
246 %or = or i64 %and, 1000000000000
247 %0 = inttoptr i64 %or to ptr
248 %1 = load i8, ptr %0, align 4096
252 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
253 define dso_local signext i8 @ld_cst_align16_int8_t_uint8_t() {
254 ; CHECK-LABEL: ld_cst_align16_int8_t_uint8_t:
255 ; CHECK: # %bb.0: # %entry
256 ; CHECK-NEXT: lbz r3, 4080(0)
257 ; CHECK-NEXT: extsb r3, r3
260 %0 = load i8, ptr inttoptr (i64 4080 to ptr), align 16
264 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
265 define dso_local signext i8 @ld_cst_align32_int8_t_uint8_t() {
266 ; CHECK-LABEL: ld_cst_align32_int8_t_uint8_t:
267 ; CHECK: # %bb.0: # %entry
268 ; CHECK-NEXT: lis r3, 153
269 ; CHECK-NEXT: lbz r3, -27108(r3)
270 ; CHECK-NEXT: extsb r3, r3
273 %0 = load i8, ptr inttoptr (i64 9999900 to ptr), align 4
277 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
278 define dso_local signext i8 @ld_cst_align64_int8_t_uint8_t() {
279 ; CHECK-P10-LABEL: ld_cst_align64_int8_t_uint8_t:
280 ; CHECK-P10: # %bb.0: # %entry
281 ; CHECK-P10-NEXT: pli r3, 244140625
282 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
283 ; CHECK-P10-NEXT: lbz r3, 0(r3)
284 ; CHECK-P10-NEXT: extsb r3, r3
285 ; CHECK-P10-NEXT: blr
287 ; CHECK-PREP10-LABEL: ld_cst_align64_int8_t_uint8_t:
288 ; CHECK-PREP10: # %bb.0: # %entry
289 ; CHECK-PREP10-NEXT: lis r3, 3725
290 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
291 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
292 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
293 ; CHECK-PREP10-NEXT: extsb r3, r3
294 ; CHECK-PREP10-NEXT: blr
296 %0 = load i8, ptr inttoptr (i64 1000000000000 to ptr), align 4096
300 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
301 define dso_local signext i8 @ld_0_int8_t_uint16_t(i64 %ptr) {
302 ; CHECK-LE-LABEL: ld_0_int8_t_uint16_t:
303 ; CHECK-LE: # %bb.0: # %entry
304 ; CHECK-LE-NEXT: lbz r3, 0(r3)
305 ; CHECK-LE-NEXT: extsb r3, r3
308 ; CHECK-BE-LABEL: ld_0_int8_t_uint16_t:
309 ; CHECK-BE: # %bb.0: # %entry
310 ; CHECK-BE-NEXT: lbz r3, 1(r3)
311 ; CHECK-BE-NEXT: extsb r3, r3
314 %0 = inttoptr i64 %ptr to ptr
315 %1 = load i16, ptr %0, align 2
316 %conv = trunc i16 %1 to i8
320 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
321 define dso_local signext i8 @ld_align16_int8_t_uint16_t(ptr nocapture readonly %ptr) {
322 ; CHECK-LE-LABEL: ld_align16_int8_t_uint16_t:
323 ; CHECK-LE: # %bb.0: # %entry
324 ; CHECK-LE-NEXT: lbz r3, 8(r3)
325 ; CHECK-LE-NEXT: extsb r3, r3
328 ; CHECK-BE-LABEL: ld_align16_int8_t_uint16_t:
329 ; CHECK-BE: # %bb.0: # %entry
330 ; CHECK-BE-NEXT: lbz r3, 9(r3)
331 ; CHECK-BE-NEXT: extsb r3, r3
334 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
335 %0 = load i16, ptr %add.ptr, align 2
336 %conv = trunc i16 %0 to i8
340 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
341 define dso_local signext i8 @ld_align32_int8_t_uint16_t(ptr nocapture readonly %ptr) {
342 ; CHECK-P10-LE-LABEL: ld_align32_int8_t_uint16_t:
343 ; CHECK-P10-LE: # %bb.0: # %entry
344 ; CHECK-P10-LE-NEXT: plbz r3, 99999000(r3), 0
345 ; CHECK-P10-LE-NEXT: extsb r3, r3
346 ; CHECK-P10-LE-NEXT: blr
348 ; CHECK-P10-BE-LABEL: ld_align32_int8_t_uint16_t:
349 ; CHECK-P10-BE: # %bb.0: # %entry
350 ; CHECK-P10-BE-NEXT: plbz r3, 99999001(r3), 0
351 ; CHECK-P10-BE-NEXT: extsb r3, r3
352 ; CHECK-P10-BE-NEXT: blr
354 ; CHECK-P9-LE-LABEL: ld_align32_int8_t_uint16_t:
355 ; CHECK-P9-LE: # %bb.0: # %entry
356 ; CHECK-P9-LE-NEXT: lis r4, 1525
357 ; CHECK-P9-LE-NEXT: ori r4, r4, 56600
358 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
359 ; CHECK-P9-LE-NEXT: extsb r3, r3
360 ; CHECK-P9-LE-NEXT: blr
362 ; CHECK-P9-BE-LABEL: ld_align32_int8_t_uint16_t:
363 ; CHECK-P9-BE: # %bb.0: # %entry
364 ; CHECK-P9-BE-NEXT: lis r4, 1525
365 ; CHECK-P9-BE-NEXT: ori r4, r4, 56601
366 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
367 ; CHECK-P9-BE-NEXT: extsb r3, r3
368 ; CHECK-P9-BE-NEXT: blr
370 ; CHECK-P8-LE-LABEL: ld_align32_int8_t_uint16_t:
371 ; CHECK-P8-LE: # %bb.0: # %entry
372 ; CHECK-P8-LE-NEXT: lis r4, 1525
373 ; CHECK-P8-LE-NEXT: ori r4, r4, 56600
374 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
375 ; CHECK-P8-LE-NEXT: extsb r3, r3
376 ; CHECK-P8-LE-NEXT: blr
378 ; CHECK-P8-BE-LABEL: ld_align32_int8_t_uint16_t:
379 ; CHECK-P8-BE: # %bb.0: # %entry
380 ; CHECK-P8-BE-NEXT: lis r4, 1525
381 ; CHECK-P8-BE-NEXT: ori r4, r4, 56601
382 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
383 ; CHECK-P8-BE-NEXT: extsb r3, r3
384 ; CHECK-P8-BE-NEXT: blr
386 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
387 %0 = load i16, ptr %add.ptr, align 2
388 %conv = trunc i16 %0 to i8
392 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
393 define dso_local signext i8 @ld_align64_int8_t_uint16_t(ptr nocapture readonly %ptr) {
394 ; CHECK-P10-LE-LABEL: ld_align64_int8_t_uint16_t:
395 ; CHECK-P10-LE: # %bb.0: # %entry
396 ; CHECK-P10-LE-NEXT: pli r4, 244140625
397 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
398 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
399 ; CHECK-P10-LE-NEXT: extsb r3, r3
400 ; CHECK-P10-LE-NEXT: blr
402 ; CHECK-P10-BE-LABEL: ld_align64_int8_t_uint16_t:
403 ; CHECK-P10-BE: # %bb.0: # %entry
404 ; CHECK-P10-BE-NEXT: pli r4, 232
405 ; CHECK-P10-BE-NEXT: pli r5, 3567587329
406 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
407 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
408 ; CHECK-P10-BE-NEXT: extsb r3, r3
409 ; CHECK-P10-BE-NEXT: blr
411 ; CHECK-P9-LE-LABEL: ld_align64_int8_t_uint16_t:
412 ; CHECK-P9-LE: # %bb.0: # %entry
413 ; CHECK-P9-LE-NEXT: lis r4, 3725
414 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
415 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
416 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
417 ; CHECK-P9-LE-NEXT: extsb r3, r3
418 ; CHECK-P9-LE-NEXT: blr
420 ; CHECK-P9-BE-LABEL: ld_align64_int8_t_uint16_t:
421 ; CHECK-P9-BE: # %bb.0: # %entry
422 ; CHECK-P9-BE-NEXT: li r4, 29
423 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
424 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
425 ; CHECK-P9-BE-NEXT: ori r4, r4, 4097
426 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
427 ; CHECK-P9-BE-NEXT: extsb r3, r3
428 ; CHECK-P9-BE-NEXT: blr
430 ; CHECK-P8-LE-LABEL: ld_align64_int8_t_uint16_t:
431 ; CHECK-P8-LE: # %bb.0: # %entry
432 ; CHECK-P8-LE-NEXT: lis r4, 3725
433 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
434 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
435 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
436 ; CHECK-P8-LE-NEXT: extsb r3, r3
437 ; CHECK-P8-LE-NEXT: blr
439 ; CHECK-P8-BE-LABEL: ld_align64_int8_t_uint16_t:
440 ; CHECK-P8-BE: # %bb.0: # %entry
441 ; CHECK-P8-BE-NEXT: li r4, 29
442 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
443 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
444 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
445 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
446 ; CHECK-P8-BE-NEXT: extsb r3, r3
447 ; CHECK-P8-BE-NEXT: blr
449 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
450 %0 = load i16, ptr %add.ptr, align 2
451 %conv = trunc i16 %0 to i8
455 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
456 define dso_local signext i8 @ld_reg_int8_t_uint16_t(ptr nocapture readonly %ptr, i64 %off) {
457 ; CHECK-LE-LABEL: ld_reg_int8_t_uint16_t:
458 ; CHECK-LE: # %bb.0: # %entry
459 ; CHECK-LE-NEXT: lbzx r3, r3, r4
460 ; CHECK-LE-NEXT: extsb r3, r3
463 ; CHECK-BE-LABEL: ld_reg_int8_t_uint16_t:
464 ; CHECK-BE: # %bb.0: # %entry
465 ; CHECK-BE-NEXT: add r3, r3, r4
466 ; CHECK-BE-NEXT: lbz r3, 1(r3)
467 ; CHECK-BE-NEXT: extsb r3, r3
470 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
471 %0 = load i16, ptr %add.ptr, align 2
472 %conv = trunc i16 %0 to i8
476 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
477 define dso_local signext i8 @ld_or_int8_t_uint16_t(i64 %ptr, i8 zeroext %off) {
478 ; CHECK-LE-LABEL: ld_or_int8_t_uint16_t:
479 ; CHECK-LE: # %bb.0: # %entry
480 ; CHECK-LE-NEXT: or r3, r4, r3
481 ; CHECK-LE-NEXT: lbz r3, 0(r3)
482 ; CHECK-LE-NEXT: extsb r3, r3
485 ; CHECK-BE-LABEL: ld_or_int8_t_uint16_t:
486 ; CHECK-BE: # %bb.0: # %entry
487 ; CHECK-BE-NEXT: or r3, r4, r3
488 ; CHECK-BE-NEXT: lbz r3, 1(r3)
489 ; CHECK-BE-NEXT: extsb r3, r3
492 %conv = zext i8 %off to i64
493 %or = or i64 %conv, %ptr
494 %0 = inttoptr i64 %or to ptr
495 %1 = load i16, ptr %0, align 2
496 %conv1 = trunc i16 %1 to i8
500 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
501 define dso_local signext i8 @ld_not_disjoint16_int8_t_uint16_t(i64 %ptr) {
502 ; CHECK-LE-LABEL: ld_not_disjoint16_int8_t_uint16_t:
503 ; CHECK-LE: # %bb.0: # %entry
504 ; CHECK-LE-NEXT: ori r3, r3, 6
505 ; CHECK-LE-NEXT: lbz r3, 0(r3)
506 ; CHECK-LE-NEXT: extsb r3, r3
509 ; CHECK-BE-LABEL: ld_not_disjoint16_int8_t_uint16_t:
510 ; CHECK-BE: # %bb.0: # %entry
511 ; CHECK-BE-NEXT: ori r3, r3, 6
512 ; CHECK-BE-NEXT: lbz r3, 1(r3)
513 ; CHECK-BE-NEXT: extsb r3, r3
517 %0 = inttoptr i64 %or to ptr
518 %1 = load i16, ptr %0, align 2
519 %conv = trunc i16 %1 to i8
523 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
524 define dso_local signext i8 @ld_disjoint_align16_int8_t_uint16_t(i64 %ptr) {
525 ; CHECK-LE-LABEL: ld_disjoint_align16_int8_t_uint16_t:
526 ; CHECK-LE: # %bb.0: # %entry
527 ; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
528 ; CHECK-LE-NEXT: lbz r3, 24(r3)
529 ; CHECK-LE-NEXT: extsb r3, r3
532 ; CHECK-BE-LABEL: ld_disjoint_align16_int8_t_uint16_t:
533 ; CHECK-BE: # %bb.0: # %entry
534 ; CHECK-BE-NEXT: rldicr r3, r3, 0, 51
535 ; CHECK-BE-NEXT: lbz r3, 25(r3)
536 ; CHECK-BE-NEXT: extsb r3, r3
539 %and = and i64 %ptr, -4096
540 %or = or i64 %and, 24
541 %0 = inttoptr i64 %or to ptr
542 %1 = load i16, ptr %0, align 8
543 %conv = trunc i16 %1 to i8
547 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
548 define dso_local signext i8 @ld_not_disjoint32_int8_t_uint16_t(i64 %ptr) {
549 ; CHECK-LE-LABEL: ld_not_disjoint32_int8_t_uint16_t:
550 ; CHECK-LE: # %bb.0: # %entry
551 ; CHECK-LE-NEXT: ori r3, r3, 34463
552 ; CHECK-LE-NEXT: oris r3, r3, 1
553 ; CHECK-LE-NEXT: lbz r3, 0(r3)
554 ; CHECK-LE-NEXT: extsb r3, r3
557 ; CHECK-BE-LABEL: ld_not_disjoint32_int8_t_uint16_t:
558 ; CHECK-BE: # %bb.0: # %entry
559 ; CHECK-BE-NEXT: ori r3, r3, 34463
560 ; CHECK-BE-NEXT: oris r3, r3, 1
561 ; CHECK-BE-NEXT: lbz r3, 1(r3)
562 ; CHECK-BE-NEXT: extsb r3, r3
565 %or = or i64 %ptr, 99999
566 %0 = inttoptr i64 %or to ptr
567 %1 = load i16, ptr %0, align 2
568 %conv = trunc i16 %1 to i8
572 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
573 define dso_local signext i8 @ld_disjoint_align32_int8_t_uint16_t(i64 %ptr) {
574 ; CHECK-P10-LE-LABEL: ld_disjoint_align32_int8_t_uint16_t:
575 ; CHECK-P10-LE: # %bb.0: # %entry
576 ; CHECK-P10-LE-NEXT: lis r4, -15264
577 ; CHECK-P10-LE-NEXT: and r3, r3, r4
578 ; CHECK-P10-LE-NEXT: plbz r3, 999990000(r3), 0
579 ; CHECK-P10-LE-NEXT: extsb r3, r3
580 ; CHECK-P10-LE-NEXT: blr
582 ; CHECK-P10-BE-LABEL: ld_disjoint_align32_int8_t_uint16_t:
583 ; CHECK-P10-BE: # %bb.0: # %entry
584 ; CHECK-P10-BE-NEXT: lis r4, -15264
585 ; CHECK-P10-BE-NEXT: and r3, r3, r4
586 ; CHECK-P10-BE-NEXT: plbz r3, 999990001(r3), 0
587 ; CHECK-P10-BE-NEXT: extsb r3, r3
588 ; CHECK-P10-BE-NEXT: blr
590 ; CHECK-P9-LE-LABEL: ld_disjoint_align32_int8_t_uint16_t:
591 ; CHECK-P9-LE: # %bb.0: # %entry
592 ; CHECK-P9-LE-NEXT: lis r4, -15264
593 ; CHECK-P9-LE-NEXT: and r3, r3, r4
594 ; CHECK-P9-LE-NEXT: lis r4, 15258
595 ; CHECK-P9-LE-NEXT: ori r4, r4, 41712
596 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
597 ; CHECK-P9-LE-NEXT: extsb r3, r3
598 ; CHECK-P9-LE-NEXT: blr
600 ; CHECK-P9-BE-LABEL: ld_disjoint_align32_int8_t_uint16_t:
601 ; CHECK-P9-BE: # %bb.0: # %entry
602 ; CHECK-P9-BE-NEXT: lis r4, -15264
603 ; CHECK-P9-BE-NEXT: and r3, r3, r4
604 ; CHECK-P9-BE-NEXT: lis r4, 15258
605 ; CHECK-P9-BE-NEXT: ori r4, r4, 41713
606 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
607 ; CHECK-P9-BE-NEXT: extsb r3, r3
608 ; CHECK-P9-BE-NEXT: blr
610 ; CHECK-P8-LE-LABEL: ld_disjoint_align32_int8_t_uint16_t:
611 ; CHECK-P8-LE: # %bb.0: # %entry
612 ; CHECK-P8-LE-NEXT: lis r4, -15264
613 ; CHECK-P8-LE-NEXT: and r3, r3, r4
614 ; CHECK-P8-LE-NEXT: lis r4, 15258
615 ; CHECK-P8-LE-NEXT: ori r4, r4, 41712
616 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
617 ; CHECK-P8-LE-NEXT: extsb r3, r3
618 ; CHECK-P8-LE-NEXT: blr
620 ; CHECK-P8-BE-LABEL: ld_disjoint_align32_int8_t_uint16_t:
621 ; CHECK-P8-BE: # %bb.0: # %entry
622 ; CHECK-P8-BE-NEXT: lis r4, -15264
623 ; CHECK-P8-BE-NEXT: and r3, r3, r4
624 ; CHECK-P8-BE-NEXT: lis r4, 15258
625 ; CHECK-P8-BE-NEXT: ori r4, r4, 41713
626 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
627 ; CHECK-P8-BE-NEXT: extsb r3, r3
628 ; CHECK-P8-BE-NEXT: blr
630 %and = and i64 %ptr, -1000341504
631 %or = or i64 %and, 999990000
632 %0 = inttoptr i64 %or to ptr
633 %1 = load i16, ptr %0, align 16
634 %conv = trunc i16 %1 to i8
638 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
639 define dso_local signext i8 @ld_not_disjoint64_int8_t_uint16_t(i64 %ptr) {
640 ; CHECK-P10-LE-LABEL: ld_not_disjoint64_int8_t_uint16_t:
641 ; CHECK-P10-LE: # %bb.0: # %entry
642 ; CHECK-P10-LE-NEXT: pli r4, 232
643 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
644 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
645 ; CHECK-P10-LE-NEXT: or r3, r3, r5
646 ; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
647 ; CHECK-P10-LE-NEXT: extsb r3, r3
648 ; CHECK-P10-LE-NEXT: blr
650 ; CHECK-P10-BE-LABEL: ld_not_disjoint64_int8_t_uint16_t:
651 ; CHECK-P10-BE: # %bb.0: # %entry
652 ; CHECK-P10-BE-NEXT: pli r4, 232
653 ; CHECK-P10-BE-NEXT: pli r5, 3567587329
654 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
655 ; CHECK-P10-BE-NEXT: or r3, r3, r5
656 ; CHECK-P10-BE-NEXT: lbz r3, 1(r3)
657 ; CHECK-P10-BE-NEXT: extsb r3, r3
658 ; CHECK-P10-BE-NEXT: blr
660 ; CHECK-P9-LE-LABEL: ld_not_disjoint64_int8_t_uint16_t:
661 ; CHECK-P9-LE: # %bb.0: # %entry
662 ; CHECK-P9-LE-NEXT: li r4, 29
663 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
664 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
665 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
666 ; CHECK-P9-LE-NEXT: or r3, r3, r4
667 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
668 ; CHECK-P9-LE-NEXT: extsb r3, r3
669 ; CHECK-P9-LE-NEXT: blr
671 ; CHECK-P9-BE-LABEL: ld_not_disjoint64_int8_t_uint16_t:
672 ; CHECK-P9-BE: # %bb.0: # %entry
673 ; CHECK-P9-BE-NEXT: li r4, 29
674 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
675 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
676 ; CHECK-P9-BE-NEXT: ori r4, r4, 4097
677 ; CHECK-P9-BE-NEXT: or r3, r3, r4
678 ; CHECK-P9-BE-NEXT: lbz r3, 1(r3)
679 ; CHECK-P9-BE-NEXT: extsb r3, r3
680 ; CHECK-P9-BE-NEXT: blr
682 ; CHECK-P8-LE-LABEL: ld_not_disjoint64_int8_t_uint16_t:
683 ; CHECK-P8-LE: # %bb.0: # %entry
684 ; CHECK-P8-LE-NEXT: li r4, 29
685 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
686 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
687 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
688 ; CHECK-P8-LE-NEXT: or r3, r3, r4
689 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
690 ; CHECK-P8-LE-NEXT: extsb r3, r3
691 ; CHECK-P8-LE-NEXT: blr
693 ; CHECK-P8-BE-LABEL: ld_not_disjoint64_int8_t_uint16_t:
694 ; CHECK-P8-BE: # %bb.0: # %entry
695 ; CHECK-P8-BE-NEXT: li r4, 29
696 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
697 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
698 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
699 ; CHECK-P8-BE-NEXT: or r3, r3, r4
700 ; CHECK-P8-BE-NEXT: lbz r3, 1(r3)
701 ; CHECK-P8-BE-NEXT: extsb r3, r3
702 ; CHECK-P8-BE-NEXT: blr
704 %or = or i64 %ptr, 1000000000001
705 %0 = inttoptr i64 %or to ptr
706 %1 = load i16, ptr %0, align 2
707 %conv = trunc i16 %1 to i8
711 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
712 define dso_local signext i8 @ld_disjoint_align64_int8_t_uint16_t(i64 %ptr) {
713 ; CHECK-P10-LE-LABEL: ld_disjoint_align64_int8_t_uint16_t:
714 ; CHECK-P10-LE: # %bb.0: # %entry
715 ; CHECK-P10-LE-NEXT: pli r4, 244140625
716 ; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
717 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
718 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
719 ; CHECK-P10-LE-NEXT: extsb r3, r3
720 ; CHECK-P10-LE-NEXT: blr
722 ; CHECK-P10-BE-LABEL: ld_disjoint_align64_int8_t_uint16_t:
723 ; CHECK-P10-BE: # %bb.0: # %entry
724 ; CHECK-P10-BE-NEXT: pli r4, 232
725 ; CHECK-P10-BE-NEXT: pli r5, 3567587329
726 ; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
727 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
728 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
729 ; CHECK-P10-BE-NEXT: extsb r3, r3
730 ; CHECK-P10-BE-NEXT: blr
732 ; CHECK-P9-LE-LABEL: ld_disjoint_align64_int8_t_uint16_t:
733 ; CHECK-P9-LE: # %bb.0: # %entry
734 ; CHECK-P9-LE-NEXT: lis r4, 3725
735 ; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
736 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
737 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
738 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
739 ; CHECK-P9-LE-NEXT: extsb r3, r3
740 ; CHECK-P9-LE-NEXT: blr
742 ; CHECK-P9-BE-LABEL: ld_disjoint_align64_int8_t_uint16_t:
743 ; CHECK-P9-BE: # %bb.0: # %entry
744 ; CHECK-P9-BE-NEXT: li r4, 29
745 ; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
746 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
747 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
748 ; CHECK-P9-BE-NEXT: ori r4, r4, 4097
749 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
750 ; CHECK-P9-BE-NEXT: extsb r3, r3
751 ; CHECK-P9-BE-NEXT: blr
753 ; CHECK-P8-LE-LABEL: ld_disjoint_align64_int8_t_uint16_t:
754 ; CHECK-P8-LE: # %bb.0: # %entry
755 ; CHECK-P8-LE-NEXT: lis r4, 3725
756 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
757 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
758 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
759 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
760 ; CHECK-P8-LE-NEXT: extsb r3, r3
761 ; CHECK-P8-LE-NEXT: blr
763 ; CHECK-P8-BE-LABEL: ld_disjoint_align64_int8_t_uint16_t:
764 ; CHECK-P8-BE: # %bb.0: # %entry
765 ; CHECK-P8-BE-NEXT: li r4, 29
766 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
767 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
768 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
769 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
770 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
771 ; CHECK-P8-BE-NEXT: extsb r3, r3
772 ; CHECK-P8-BE-NEXT: blr
774 %and = and i64 %ptr, -1099511627776
775 %or = or i64 %and, 1000000000000
776 %0 = inttoptr i64 %or to ptr
777 %1 = load i16, ptr %0, align 4096
778 %conv = trunc i16 %1 to i8
782 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
783 define dso_local signext i8 @ld_cst_align16_int8_t_uint16_t() {
784 ; CHECK-LE-LABEL: ld_cst_align16_int8_t_uint16_t:
785 ; CHECK-LE: # %bb.0: # %entry
786 ; CHECK-LE-NEXT: lbz r3, 4080(0)
787 ; CHECK-LE-NEXT: extsb r3, r3
790 ; CHECK-BE-LABEL: ld_cst_align16_int8_t_uint16_t:
791 ; CHECK-BE: # %bb.0: # %entry
792 ; CHECK-BE-NEXT: lbz r3, 4081(0)
793 ; CHECK-BE-NEXT: extsb r3, r3
796 %0 = load i16, ptr inttoptr (i64 4080 to ptr), align 16
797 %conv = trunc i16 %0 to i8
801 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
802 define dso_local signext i8 @ld_cst_align32_int8_t_uint16_t() {
803 ; CHECK-LE-LABEL: ld_cst_align32_int8_t_uint16_t:
804 ; CHECK-LE: # %bb.0: # %entry
805 ; CHECK-LE-NEXT: lis r3, 153
806 ; CHECK-LE-NEXT: lbz r3, -27108(r3)
807 ; CHECK-LE-NEXT: extsb r3, r3
810 ; CHECK-BE-LABEL: ld_cst_align32_int8_t_uint16_t:
811 ; CHECK-BE: # %bb.0: # %entry
812 ; CHECK-BE-NEXT: lis r3, 153
813 ; CHECK-BE-NEXT: lbz r3, -27107(r3)
814 ; CHECK-BE-NEXT: extsb r3, r3
817 %0 = load i16, ptr inttoptr (i64 9999900 to ptr), align 4
818 %conv = trunc i16 %0 to i8
822 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
823 define dso_local signext i8 @ld_cst_align64_int8_t_uint16_t() {
824 ; CHECK-P10-LE-LABEL: ld_cst_align64_int8_t_uint16_t:
825 ; CHECK-P10-LE: # %bb.0: # %entry
826 ; CHECK-P10-LE-NEXT: pli r3, 244140625
827 ; CHECK-P10-LE-NEXT: rldic r3, r3, 12, 24
828 ; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
829 ; CHECK-P10-LE-NEXT: extsb r3, r3
830 ; CHECK-P10-LE-NEXT: blr
832 ; CHECK-P10-BE-LABEL: ld_cst_align64_int8_t_uint16_t:
833 ; CHECK-P10-BE: # %bb.0: # %entry
834 ; CHECK-P10-BE-NEXT: pli r3, 232
835 ; CHECK-P10-BE-NEXT: pli r4, 3567587329
836 ; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
837 ; CHECK-P10-BE-NEXT: lbz r3, 0(r4)
838 ; CHECK-P10-BE-NEXT: extsb r3, r3
839 ; CHECK-P10-BE-NEXT: blr
841 ; CHECK-P9-LE-LABEL: ld_cst_align64_int8_t_uint16_t:
842 ; CHECK-P9-LE: # %bb.0: # %entry
843 ; CHECK-P9-LE-NEXT: lis r3, 3725
844 ; CHECK-P9-LE-NEXT: ori r3, r3, 19025
845 ; CHECK-P9-LE-NEXT: rldic r3, r3, 12, 24
846 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
847 ; CHECK-P9-LE-NEXT: extsb r3, r3
848 ; CHECK-P9-LE-NEXT: blr
850 ; CHECK-P9-BE-LABEL: ld_cst_align64_int8_t_uint16_t:
851 ; CHECK-P9-BE: # %bb.0: # %entry
852 ; CHECK-P9-BE-NEXT: li r3, 29
853 ; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
854 ; CHECK-P9-BE-NEXT: oris r3, r3, 54437
855 ; CHECK-P9-BE-NEXT: ori r3, r3, 4097
856 ; CHECK-P9-BE-NEXT: lbz r3, 0(r3)
857 ; CHECK-P9-BE-NEXT: extsb r3, r3
858 ; CHECK-P9-BE-NEXT: blr
860 ; CHECK-P8-LE-LABEL: ld_cst_align64_int8_t_uint16_t:
861 ; CHECK-P8-LE: # %bb.0: # %entry
862 ; CHECK-P8-LE-NEXT: lis r3, 3725
863 ; CHECK-P8-LE-NEXT: ori r3, r3, 19025
864 ; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
865 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
866 ; CHECK-P8-LE-NEXT: extsb r3, r3
867 ; CHECK-P8-LE-NEXT: blr
869 ; CHECK-P8-BE-LABEL: ld_cst_align64_int8_t_uint16_t:
870 ; CHECK-P8-BE: # %bb.0: # %entry
871 ; CHECK-P8-BE-NEXT: li r3, 29
872 ; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
873 ; CHECK-P8-BE-NEXT: oris r3, r3, 54437
874 ; CHECK-P8-BE-NEXT: ori r3, r3, 4097
875 ; CHECK-P8-BE-NEXT: lbz r3, 0(r3)
876 ; CHECK-P8-BE-NEXT: extsb r3, r3
877 ; CHECK-P8-BE-NEXT: blr
879 %0 = load i16, ptr inttoptr (i64 1000000000000 to ptr), align 4096
880 %conv = trunc i16 %0 to i8
884 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
885 define dso_local signext i8 @ld_0_int8_t_uint32_t(i64 %ptr) {
886 ; CHECK-LE-LABEL: ld_0_int8_t_uint32_t:
887 ; CHECK-LE: # %bb.0: # %entry
888 ; CHECK-LE-NEXT: lbz r3, 0(r3)
889 ; CHECK-LE-NEXT: extsb r3, r3
892 ; CHECK-BE-LABEL: ld_0_int8_t_uint32_t:
893 ; CHECK-BE: # %bb.0: # %entry
894 ; CHECK-BE-NEXT: lbz r3, 3(r3)
895 ; CHECK-BE-NEXT: extsb r3, r3
898 %0 = inttoptr i64 %ptr to ptr
899 %1 = load i32, ptr %0, align 4
900 %conv = trunc i32 %1 to i8
904 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
905 define dso_local signext i8 @ld_align16_int8_t_uint32_t(ptr nocapture readonly %ptr) {
906 ; CHECK-LE-LABEL: ld_align16_int8_t_uint32_t:
907 ; CHECK-LE: # %bb.0: # %entry
908 ; CHECK-LE-NEXT: lbz r3, 8(r3)
909 ; CHECK-LE-NEXT: extsb r3, r3
912 ; CHECK-BE-LABEL: ld_align16_int8_t_uint32_t:
913 ; CHECK-BE: # %bb.0: # %entry
914 ; CHECK-BE-NEXT: lbz r3, 11(r3)
915 ; CHECK-BE-NEXT: extsb r3, r3
918 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
919 %0 = load i32, ptr %add.ptr, align 4
920 %conv = trunc i32 %0 to i8
924 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
925 define dso_local signext i8 @ld_align32_int8_t_uint32_t(ptr nocapture readonly %ptr) {
926 ; CHECK-P10-LE-LABEL: ld_align32_int8_t_uint32_t:
927 ; CHECK-P10-LE: # %bb.0: # %entry
928 ; CHECK-P10-LE-NEXT: plbz r3, 99999000(r3), 0
929 ; CHECK-P10-LE-NEXT: extsb r3, r3
930 ; CHECK-P10-LE-NEXT: blr
932 ; CHECK-P10-BE-LABEL: ld_align32_int8_t_uint32_t:
933 ; CHECK-P10-BE: # %bb.0: # %entry
934 ; CHECK-P10-BE-NEXT: plbz r3, 99999003(r3), 0
935 ; CHECK-P10-BE-NEXT: extsb r3, r3
936 ; CHECK-P10-BE-NEXT: blr
938 ; CHECK-P9-LE-LABEL: ld_align32_int8_t_uint32_t:
939 ; CHECK-P9-LE: # %bb.0: # %entry
940 ; CHECK-P9-LE-NEXT: lis r4, 1525
941 ; CHECK-P9-LE-NEXT: ori r4, r4, 56600
942 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
943 ; CHECK-P9-LE-NEXT: extsb r3, r3
944 ; CHECK-P9-LE-NEXT: blr
946 ; CHECK-P9-BE-LABEL: ld_align32_int8_t_uint32_t:
947 ; CHECK-P9-BE: # %bb.0: # %entry
948 ; CHECK-P9-BE-NEXT: lis r4, 1525
949 ; CHECK-P9-BE-NEXT: ori r4, r4, 56603
950 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
951 ; CHECK-P9-BE-NEXT: extsb r3, r3
952 ; CHECK-P9-BE-NEXT: blr
954 ; CHECK-P8-LE-LABEL: ld_align32_int8_t_uint32_t:
955 ; CHECK-P8-LE: # %bb.0: # %entry
956 ; CHECK-P8-LE-NEXT: lis r4, 1525
957 ; CHECK-P8-LE-NEXT: ori r4, r4, 56600
958 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
959 ; CHECK-P8-LE-NEXT: extsb r3, r3
960 ; CHECK-P8-LE-NEXT: blr
962 ; CHECK-P8-BE-LABEL: ld_align32_int8_t_uint32_t:
963 ; CHECK-P8-BE: # %bb.0: # %entry
964 ; CHECK-P8-BE-NEXT: lis r4, 1525
965 ; CHECK-P8-BE-NEXT: ori r4, r4, 56603
966 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
967 ; CHECK-P8-BE-NEXT: extsb r3, r3
968 ; CHECK-P8-BE-NEXT: blr
970 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
971 %0 = load i32, ptr %add.ptr, align 4
972 %conv = trunc i32 %0 to i8
976 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
977 define dso_local signext i8 @ld_align64_int8_t_uint32_t(ptr nocapture readonly %ptr) {
978 ; CHECK-P10-LE-LABEL: ld_align64_int8_t_uint32_t:
979 ; CHECK-P10-LE: # %bb.0: # %entry
980 ; CHECK-P10-LE-NEXT: pli r4, 244140625
981 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
982 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
983 ; CHECK-P10-LE-NEXT: extsb r3, r3
984 ; CHECK-P10-LE-NEXT: blr
986 ; CHECK-P10-BE-LABEL: ld_align64_int8_t_uint32_t:
987 ; CHECK-P10-BE: # %bb.0: # %entry
988 ; CHECK-P10-BE-NEXT: pli r4, 232
989 ; CHECK-P10-BE-NEXT: pli r5, 3567587331
990 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
991 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
992 ; CHECK-P10-BE-NEXT: extsb r3, r3
993 ; CHECK-P10-BE-NEXT: blr
995 ; CHECK-P9-LE-LABEL: ld_align64_int8_t_uint32_t:
996 ; CHECK-P9-LE: # %bb.0: # %entry
997 ; CHECK-P9-LE-NEXT: lis r4, 3725
998 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
999 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
1000 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
1001 ; CHECK-P9-LE-NEXT: extsb r3, r3
1002 ; CHECK-P9-LE-NEXT: blr
1004 ; CHECK-P9-BE-LABEL: ld_align64_int8_t_uint32_t:
1005 ; CHECK-P9-BE: # %bb.0: # %entry
1006 ; CHECK-P9-BE-NEXT: li r4, 29
1007 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
1008 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
1009 ; CHECK-P9-BE-NEXT: ori r4, r4, 4099
1010 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
1011 ; CHECK-P9-BE-NEXT: extsb r3, r3
1012 ; CHECK-P9-BE-NEXT: blr
1014 ; CHECK-P8-LE-LABEL: ld_align64_int8_t_uint32_t:
1015 ; CHECK-P8-LE: # %bb.0: # %entry
1016 ; CHECK-P8-LE-NEXT: lis r4, 3725
1017 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
1018 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
1019 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
1020 ; CHECK-P8-LE-NEXT: extsb r3, r3
1021 ; CHECK-P8-LE-NEXT: blr
1023 ; CHECK-P8-BE-LABEL: ld_align64_int8_t_uint32_t:
1024 ; CHECK-P8-BE: # %bb.0: # %entry
1025 ; CHECK-P8-BE-NEXT: li r4, 29
1026 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
1027 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
1028 ; CHECK-P8-BE-NEXT: ori r4, r4, 4099
1029 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
1030 ; CHECK-P8-BE-NEXT: extsb r3, r3
1031 ; CHECK-P8-BE-NEXT: blr
1033 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
1034 %0 = load i32, ptr %add.ptr, align 4
1035 %conv = trunc i32 %0 to i8
1039 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1040 define dso_local signext i8 @ld_reg_int8_t_uint32_t(ptr nocapture readonly %ptr, i64 %off) {
1041 ; CHECK-LE-LABEL: ld_reg_int8_t_uint32_t:
1042 ; CHECK-LE: # %bb.0: # %entry
1043 ; CHECK-LE-NEXT: lbzx r3, r3, r4
1044 ; CHECK-LE-NEXT: extsb r3, r3
1045 ; CHECK-LE-NEXT: blr
1047 ; CHECK-BE-LABEL: ld_reg_int8_t_uint32_t:
1048 ; CHECK-BE: # %bb.0: # %entry
1049 ; CHECK-BE-NEXT: add r3, r3, r4
1050 ; CHECK-BE-NEXT: lbz r3, 3(r3)
1051 ; CHECK-BE-NEXT: extsb r3, r3
1052 ; CHECK-BE-NEXT: blr
1054 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
1055 %0 = load i32, ptr %add.ptr, align 4
1056 %conv = trunc i32 %0 to i8
1060 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1061 define dso_local signext i8 @ld_or_int8_t_uint32_t(i64 %ptr, i8 zeroext %off) {
1062 ; CHECK-LE-LABEL: ld_or_int8_t_uint32_t:
1063 ; CHECK-LE: # %bb.0: # %entry
1064 ; CHECK-LE-NEXT: or r3, r4, r3
1065 ; CHECK-LE-NEXT: lbz r3, 0(r3)
1066 ; CHECK-LE-NEXT: extsb r3, r3
1067 ; CHECK-LE-NEXT: blr
1069 ; CHECK-BE-LABEL: ld_or_int8_t_uint32_t:
1070 ; CHECK-BE: # %bb.0: # %entry
1071 ; CHECK-BE-NEXT: or r3, r4, r3
1072 ; CHECK-BE-NEXT: lbz r3, 3(r3)
1073 ; CHECK-BE-NEXT: extsb r3, r3
1074 ; CHECK-BE-NEXT: blr
1076 %conv = zext i8 %off to i64
1077 %or = or i64 %conv, %ptr
1078 %0 = inttoptr i64 %or to ptr
1079 %1 = load i32, ptr %0, align 4
1080 %conv1 = trunc i32 %1 to i8
1084 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1085 define dso_local signext i8 @ld_not_disjoint16_int8_t_uint32_t(i64 %ptr) {
1086 ; CHECK-LE-LABEL: ld_not_disjoint16_int8_t_uint32_t:
1087 ; CHECK-LE: # %bb.0: # %entry
1088 ; CHECK-LE-NEXT: ori r3, r3, 6
1089 ; CHECK-LE-NEXT: lbz r3, 0(r3)
1090 ; CHECK-LE-NEXT: extsb r3, r3
1091 ; CHECK-LE-NEXT: blr
1093 ; CHECK-BE-LABEL: ld_not_disjoint16_int8_t_uint32_t:
1094 ; CHECK-BE: # %bb.0: # %entry
1095 ; CHECK-BE-NEXT: ori r3, r3, 6
1096 ; CHECK-BE-NEXT: lbz r3, 3(r3)
1097 ; CHECK-BE-NEXT: extsb r3, r3
1098 ; CHECK-BE-NEXT: blr
1100 %or = or i64 %ptr, 6
1101 %0 = inttoptr i64 %or to ptr
1102 %1 = load i32, ptr %0, align 4
1103 %conv = trunc i32 %1 to i8
1107 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1108 define dso_local signext i8 @ld_disjoint_align16_int8_t_uint32_t(i64 %ptr) {
1109 ; CHECK-LE-LABEL: ld_disjoint_align16_int8_t_uint32_t:
1110 ; CHECK-LE: # %bb.0: # %entry
1111 ; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
1112 ; CHECK-LE-NEXT: lbz r3, 24(r3)
1113 ; CHECK-LE-NEXT: extsb r3, r3
1114 ; CHECK-LE-NEXT: blr
1116 ; CHECK-BE-LABEL: ld_disjoint_align16_int8_t_uint32_t:
1117 ; CHECK-BE: # %bb.0: # %entry
1118 ; CHECK-BE-NEXT: rldicr r3, r3, 0, 51
1119 ; CHECK-BE-NEXT: lbz r3, 27(r3)
1120 ; CHECK-BE-NEXT: extsb r3, r3
1121 ; CHECK-BE-NEXT: blr
1123 %and = and i64 %ptr, -4096
1124 %or = or i64 %and, 24
1125 %0 = inttoptr i64 %or to ptr
1126 %1 = load i32, ptr %0, align 8
1127 %conv = trunc i32 %1 to i8
1131 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1132 define dso_local signext i8 @ld_not_disjoint32_int8_t_uint32_t(i64 %ptr) {
1133 ; CHECK-LE-LABEL: ld_not_disjoint32_int8_t_uint32_t:
1134 ; CHECK-LE: # %bb.0: # %entry
1135 ; CHECK-LE-NEXT: ori r3, r3, 34463
1136 ; CHECK-LE-NEXT: oris r3, r3, 1
1137 ; CHECK-LE-NEXT: lbz r3, 0(r3)
1138 ; CHECK-LE-NEXT: extsb r3, r3
1139 ; CHECK-LE-NEXT: blr
1141 ; CHECK-BE-LABEL: ld_not_disjoint32_int8_t_uint32_t:
1142 ; CHECK-BE: # %bb.0: # %entry
1143 ; CHECK-BE-NEXT: ori r3, r3, 34463
1144 ; CHECK-BE-NEXT: oris r3, r3, 1
1145 ; CHECK-BE-NEXT: lbz r3, 3(r3)
1146 ; CHECK-BE-NEXT: extsb r3, r3
1147 ; CHECK-BE-NEXT: blr
1149 %or = or i64 %ptr, 99999
1150 %0 = inttoptr i64 %or to ptr
1151 %1 = load i32, ptr %0, align 4
1152 %conv = trunc i32 %1 to i8
1156 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1157 define dso_local signext i8 @ld_disjoint_align32_int8_t_uint32_t(i64 %ptr) {
1158 ; CHECK-P10-LE-LABEL: ld_disjoint_align32_int8_t_uint32_t:
1159 ; CHECK-P10-LE: # %bb.0: # %entry
1160 ; CHECK-P10-LE-NEXT: lis r4, -15264
1161 ; CHECK-P10-LE-NEXT: and r3, r3, r4
1162 ; CHECK-P10-LE-NEXT: plbz r3, 999990000(r3), 0
1163 ; CHECK-P10-LE-NEXT: extsb r3, r3
1164 ; CHECK-P10-LE-NEXT: blr
1166 ; CHECK-P10-BE-LABEL: ld_disjoint_align32_int8_t_uint32_t:
1167 ; CHECK-P10-BE: # %bb.0: # %entry
1168 ; CHECK-P10-BE-NEXT: lis r4, -15264
1169 ; CHECK-P10-BE-NEXT: and r3, r3, r4
1170 ; CHECK-P10-BE-NEXT: plbz r3, 999990003(r3), 0
1171 ; CHECK-P10-BE-NEXT: extsb r3, r3
1172 ; CHECK-P10-BE-NEXT: blr
1174 ; CHECK-P9-LE-LABEL: ld_disjoint_align32_int8_t_uint32_t:
1175 ; CHECK-P9-LE: # %bb.0: # %entry
1176 ; CHECK-P9-LE-NEXT: lis r4, -15264
1177 ; CHECK-P9-LE-NEXT: and r3, r3, r4
1178 ; CHECK-P9-LE-NEXT: lis r4, 15258
1179 ; CHECK-P9-LE-NEXT: ori r4, r4, 41712
1180 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
1181 ; CHECK-P9-LE-NEXT: extsb r3, r3
1182 ; CHECK-P9-LE-NEXT: blr
1184 ; CHECK-P9-BE-LABEL: ld_disjoint_align32_int8_t_uint32_t:
1185 ; CHECK-P9-BE: # %bb.0: # %entry
1186 ; CHECK-P9-BE-NEXT: lis r4, -15264
1187 ; CHECK-P9-BE-NEXT: and r3, r3, r4
1188 ; CHECK-P9-BE-NEXT: lis r4, 15258
1189 ; CHECK-P9-BE-NEXT: ori r4, r4, 41715
1190 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
1191 ; CHECK-P9-BE-NEXT: extsb r3, r3
1192 ; CHECK-P9-BE-NEXT: blr
1194 ; CHECK-P8-LE-LABEL: ld_disjoint_align32_int8_t_uint32_t:
1195 ; CHECK-P8-LE: # %bb.0: # %entry
1196 ; CHECK-P8-LE-NEXT: lis r4, -15264
1197 ; CHECK-P8-LE-NEXT: and r3, r3, r4
1198 ; CHECK-P8-LE-NEXT: lis r4, 15258
1199 ; CHECK-P8-LE-NEXT: ori r4, r4, 41712
1200 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
1201 ; CHECK-P8-LE-NEXT: extsb r3, r3
1202 ; CHECK-P8-LE-NEXT: blr
1204 ; CHECK-P8-BE-LABEL: ld_disjoint_align32_int8_t_uint32_t:
1205 ; CHECK-P8-BE: # %bb.0: # %entry
1206 ; CHECK-P8-BE-NEXT: lis r4, -15264
1207 ; CHECK-P8-BE-NEXT: and r3, r3, r4
1208 ; CHECK-P8-BE-NEXT: lis r4, 15258
1209 ; CHECK-P8-BE-NEXT: ori r4, r4, 41715
1210 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
1211 ; CHECK-P8-BE-NEXT: extsb r3, r3
1212 ; CHECK-P8-BE-NEXT: blr
1214 %and = and i64 %ptr, -1000341504
1215 %or = or i64 %and, 999990000
1216 %0 = inttoptr i64 %or to ptr
1217 %1 = load i32, ptr %0, align 16
1218 %conv = trunc i32 %1 to i8
1222 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1223 define dso_local signext i8 @ld_not_disjoint64_int8_t_uint32_t(i64 %ptr) {
1224 ; CHECK-P10-LE-LABEL: ld_not_disjoint64_int8_t_uint32_t:
1225 ; CHECK-P10-LE: # %bb.0: # %entry
1226 ; CHECK-P10-LE-NEXT: pli r4, 232
1227 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
1228 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
1229 ; CHECK-P10-LE-NEXT: or r3, r3, r5
1230 ; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
1231 ; CHECK-P10-LE-NEXT: extsb r3, r3
1232 ; CHECK-P10-LE-NEXT: blr
1234 ; CHECK-P10-BE-LABEL: ld_not_disjoint64_int8_t_uint32_t:
1235 ; CHECK-P10-BE: # %bb.0: # %entry
1236 ; CHECK-P10-BE-NEXT: pli r4, 232
1237 ; CHECK-P10-BE-NEXT: pli r5, 3567587329
1238 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
1239 ; CHECK-P10-BE-NEXT: or r3, r3, r5
1240 ; CHECK-P10-BE-NEXT: lbz r3, 3(r3)
1241 ; CHECK-P10-BE-NEXT: extsb r3, r3
1242 ; CHECK-P10-BE-NEXT: blr
1244 ; CHECK-P9-LE-LABEL: ld_not_disjoint64_int8_t_uint32_t:
1245 ; CHECK-P9-LE: # %bb.0: # %entry
1246 ; CHECK-P9-LE-NEXT: li r4, 29
1247 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
1248 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
1249 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
1250 ; CHECK-P9-LE-NEXT: or r3, r3, r4
1251 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
1252 ; CHECK-P9-LE-NEXT: extsb r3, r3
1253 ; CHECK-P9-LE-NEXT: blr
1255 ; CHECK-P9-BE-LABEL: ld_not_disjoint64_int8_t_uint32_t:
1256 ; CHECK-P9-BE: # %bb.0: # %entry
1257 ; CHECK-P9-BE-NEXT: li r4, 29
1258 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
1259 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
1260 ; CHECK-P9-BE-NEXT: ori r4, r4, 4097
1261 ; CHECK-P9-BE-NEXT: or r3, r3, r4
1262 ; CHECK-P9-BE-NEXT: lbz r3, 3(r3)
1263 ; CHECK-P9-BE-NEXT: extsb r3, r3
1264 ; CHECK-P9-BE-NEXT: blr
1266 ; CHECK-P8-LE-LABEL: ld_not_disjoint64_int8_t_uint32_t:
1267 ; CHECK-P8-LE: # %bb.0: # %entry
1268 ; CHECK-P8-LE-NEXT: li r4, 29
1269 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
1270 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
1271 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
1272 ; CHECK-P8-LE-NEXT: or r3, r3, r4
1273 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
1274 ; CHECK-P8-LE-NEXT: extsb r3, r3
1275 ; CHECK-P8-LE-NEXT: blr
1277 ; CHECK-P8-BE-LABEL: ld_not_disjoint64_int8_t_uint32_t:
1278 ; CHECK-P8-BE: # %bb.0: # %entry
1279 ; CHECK-P8-BE-NEXT: li r4, 29
1280 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
1281 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
1282 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
1283 ; CHECK-P8-BE-NEXT: or r3, r3, r4
1284 ; CHECK-P8-BE-NEXT: lbz r3, 3(r3)
1285 ; CHECK-P8-BE-NEXT: extsb r3, r3
1286 ; CHECK-P8-BE-NEXT: blr
1288 %or = or i64 %ptr, 1000000000001
1289 %0 = inttoptr i64 %or to ptr
1290 %1 = load i32, ptr %0, align 4
1291 %conv = trunc i32 %1 to i8
1295 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1296 define dso_local signext i8 @ld_disjoint_align64_int8_t_uint32_t(i64 %ptr) {
1297 ; CHECK-P10-LE-LABEL: ld_disjoint_align64_int8_t_uint32_t:
1298 ; CHECK-P10-LE: # %bb.0: # %entry
1299 ; CHECK-P10-LE-NEXT: pli r4, 244140625
1300 ; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
1301 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
1302 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
1303 ; CHECK-P10-LE-NEXT: extsb r3, r3
1304 ; CHECK-P10-LE-NEXT: blr
1306 ; CHECK-P10-BE-LABEL: ld_disjoint_align64_int8_t_uint32_t:
1307 ; CHECK-P10-BE: # %bb.0: # %entry
1308 ; CHECK-P10-BE-NEXT: pli r4, 232
1309 ; CHECK-P10-BE-NEXT: pli r5, 3567587331
1310 ; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
1311 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
1312 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
1313 ; CHECK-P10-BE-NEXT: extsb r3, r3
1314 ; CHECK-P10-BE-NEXT: blr
1316 ; CHECK-P9-LE-LABEL: ld_disjoint_align64_int8_t_uint32_t:
1317 ; CHECK-P9-LE: # %bb.0: # %entry
1318 ; CHECK-P9-LE-NEXT: lis r4, 3725
1319 ; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
1320 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
1321 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
1322 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
1323 ; CHECK-P9-LE-NEXT: extsb r3, r3
1324 ; CHECK-P9-LE-NEXT: blr
1326 ; CHECK-P9-BE-LABEL: ld_disjoint_align64_int8_t_uint32_t:
1327 ; CHECK-P9-BE: # %bb.0: # %entry
1328 ; CHECK-P9-BE-NEXT: li r4, 29
1329 ; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
1330 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
1331 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
1332 ; CHECK-P9-BE-NEXT: ori r4, r4, 4099
1333 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
1334 ; CHECK-P9-BE-NEXT: extsb r3, r3
1335 ; CHECK-P9-BE-NEXT: blr
1337 ; CHECK-P8-LE-LABEL: ld_disjoint_align64_int8_t_uint32_t:
1338 ; CHECK-P8-LE: # %bb.0: # %entry
1339 ; CHECK-P8-LE-NEXT: lis r4, 3725
1340 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
1341 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
1342 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
1343 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
1344 ; CHECK-P8-LE-NEXT: extsb r3, r3
1345 ; CHECK-P8-LE-NEXT: blr
1347 ; CHECK-P8-BE-LABEL: ld_disjoint_align64_int8_t_uint32_t:
1348 ; CHECK-P8-BE: # %bb.0: # %entry
1349 ; CHECK-P8-BE-NEXT: li r4, 29
1350 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
1351 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
1352 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
1353 ; CHECK-P8-BE-NEXT: ori r4, r4, 4099
1354 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
1355 ; CHECK-P8-BE-NEXT: extsb r3, r3
1356 ; CHECK-P8-BE-NEXT: blr
1358 %and = and i64 %ptr, -1099511627776
1359 %or = or i64 %and, 1000000000000
1360 %0 = inttoptr i64 %or to ptr
1361 %1 = load i32, ptr %0, align 4096
1362 %conv = trunc i32 %1 to i8
1366 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1367 define dso_local signext i8 @ld_cst_align16_int8_t_uint32_t() {
1368 ; CHECK-LE-LABEL: ld_cst_align16_int8_t_uint32_t:
1369 ; CHECK-LE: # %bb.0: # %entry
1370 ; CHECK-LE-NEXT: lbz r3, 4080(0)
1371 ; CHECK-LE-NEXT: extsb r3, r3
1372 ; CHECK-LE-NEXT: blr
1374 ; CHECK-BE-LABEL: ld_cst_align16_int8_t_uint32_t:
1375 ; CHECK-BE: # %bb.0: # %entry
1376 ; CHECK-BE-NEXT: lbz r3, 4083(0)
1377 ; CHECK-BE-NEXT: extsb r3, r3
1378 ; CHECK-BE-NEXT: blr
1380 %0 = load i32, ptr inttoptr (i64 4080 to ptr), align 16
1381 %conv = trunc i32 %0 to i8
1385 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1386 define dso_local signext i8 @ld_cst_align32_int8_t_uint32_t() {
1387 ; CHECK-LE-LABEL: ld_cst_align32_int8_t_uint32_t:
1388 ; CHECK-LE: # %bb.0: # %entry
1389 ; CHECK-LE-NEXT: lis r3, 153
1390 ; CHECK-LE-NEXT: lbz r3, -27108(r3)
1391 ; CHECK-LE-NEXT: extsb r3, r3
1392 ; CHECK-LE-NEXT: blr
1394 ; CHECK-BE-LABEL: ld_cst_align32_int8_t_uint32_t:
1395 ; CHECK-BE: # %bb.0: # %entry
1396 ; CHECK-BE-NEXT: lis r3, 153
1397 ; CHECK-BE-NEXT: lbz r3, -27105(r3)
1398 ; CHECK-BE-NEXT: extsb r3, r3
1399 ; CHECK-BE-NEXT: blr
1401 %0 = load i32, ptr inttoptr (i64 9999900 to ptr), align 4
1402 %conv = trunc i32 %0 to i8
1406 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1407 define dso_local signext i8 @ld_cst_align64_int8_t_uint32_t() {
1408 ; CHECK-P10-LE-LABEL: ld_cst_align64_int8_t_uint32_t:
1409 ; CHECK-P10-LE: # %bb.0: # %entry
1410 ; CHECK-P10-LE-NEXT: pli r3, 244140625
1411 ; CHECK-P10-LE-NEXT: rldic r3, r3, 12, 24
1412 ; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
1413 ; CHECK-P10-LE-NEXT: extsb r3, r3
1414 ; CHECK-P10-LE-NEXT: blr
1416 ; CHECK-P10-BE-LABEL: ld_cst_align64_int8_t_uint32_t:
1417 ; CHECK-P10-BE: # %bb.0: # %entry
1418 ; CHECK-P10-BE-NEXT: pli r3, 232
1419 ; CHECK-P10-BE-NEXT: pli r4, 3567587331
1420 ; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
1421 ; CHECK-P10-BE-NEXT: lbz r3, 0(r4)
1422 ; CHECK-P10-BE-NEXT: extsb r3, r3
1423 ; CHECK-P10-BE-NEXT: blr
1425 ; CHECK-P9-LE-LABEL: ld_cst_align64_int8_t_uint32_t:
1426 ; CHECK-P9-LE: # %bb.0: # %entry
1427 ; CHECK-P9-LE-NEXT: lis r3, 3725
1428 ; CHECK-P9-LE-NEXT: ori r3, r3, 19025
1429 ; CHECK-P9-LE-NEXT: rldic r3, r3, 12, 24
1430 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
1431 ; CHECK-P9-LE-NEXT: extsb r3, r3
1432 ; CHECK-P9-LE-NEXT: blr
1434 ; CHECK-P9-BE-LABEL: ld_cst_align64_int8_t_uint32_t:
1435 ; CHECK-P9-BE: # %bb.0: # %entry
1436 ; CHECK-P9-BE-NEXT: li r3, 29
1437 ; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
1438 ; CHECK-P9-BE-NEXT: oris r3, r3, 54437
1439 ; CHECK-P9-BE-NEXT: ori r3, r3, 4099
1440 ; CHECK-P9-BE-NEXT: lbz r3, 0(r3)
1441 ; CHECK-P9-BE-NEXT: extsb r3, r3
1442 ; CHECK-P9-BE-NEXT: blr
1444 ; CHECK-P8-LE-LABEL: ld_cst_align64_int8_t_uint32_t:
1445 ; CHECK-P8-LE: # %bb.0: # %entry
1446 ; CHECK-P8-LE-NEXT: lis r3, 3725
1447 ; CHECK-P8-LE-NEXT: ori r3, r3, 19025
1448 ; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
1449 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
1450 ; CHECK-P8-LE-NEXT: extsb r3, r3
1451 ; CHECK-P8-LE-NEXT: blr
1453 ; CHECK-P8-BE-LABEL: ld_cst_align64_int8_t_uint32_t:
1454 ; CHECK-P8-BE: # %bb.0: # %entry
1455 ; CHECK-P8-BE-NEXT: li r3, 29
1456 ; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
1457 ; CHECK-P8-BE-NEXT: oris r3, r3, 54437
1458 ; CHECK-P8-BE-NEXT: ori r3, r3, 4099
1459 ; CHECK-P8-BE-NEXT: lbz r3, 0(r3)
1460 ; CHECK-P8-BE-NEXT: extsb r3, r3
1461 ; CHECK-P8-BE-NEXT: blr
1463 %0 = load i32, ptr inttoptr (i64 1000000000000 to ptr), align 4096
1464 %conv = trunc i32 %0 to i8
1468 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1469 define dso_local signext i8 @ld_0_int8_t_uint64_t(i64 %ptr) {
1470 ; CHECK-LE-LABEL: ld_0_int8_t_uint64_t:
1471 ; CHECK-LE: # %bb.0: # %entry
1472 ; CHECK-LE-NEXT: lbz r3, 0(r3)
1473 ; CHECK-LE-NEXT: extsb r3, r3
1474 ; CHECK-LE-NEXT: blr
1476 ; CHECK-BE-LABEL: ld_0_int8_t_uint64_t:
1477 ; CHECK-BE: # %bb.0: # %entry
1478 ; CHECK-BE-NEXT: lbz r3, 7(r3)
1479 ; CHECK-BE-NEXT: extsb r3, r3
1480 ; CHECK-BE-NEXT: blr
1482 %0 = inttoptr i64 %ptr to ptr
1483 %1 = load i64, ptr %0, align 8
1484 %conv = trunc i64 %1 to i8
1488 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1489 define dso_local signext i8 @ld_align16_int8_t_uint64_t(ptr nocapture readonly %ptr) {
1490 ; CHECK-LE-LABEL: ld_align16_int8_t_uint64_t:
1491 ; CHECK-LE: # %bb.0: # %entry
1492 ; CHECK-LE-NEXT: lbz r3, 8(r3)
1493 ; CHECK-LE-NEXT: extsb r3, r3
1494 ; CHECK-LE-NEXT: blr
1496 ; CHECK-BE-LABEL: ld_align16_int8_t_uint64_t:
1497 ; CHECK-BE: # %bb.0: # %entry
1498 ; CHECK-BE-NEXT: lbz r3, 15(r3)
1499 ; CHECK-BE-NEXT: extsb r3, r3
1500 ; CHECK-BE-NEXT: blr
1502 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
1503 %0 = load i64, ptr %add.ptr, align 8
1504 %conv = trunc i64 %0 to i8
1508 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1509 define dso_local signext i8 @ld_align32_int8_t_uint64_t(ptr nocapture readonly %ptr) {
1510 ; CHECK-P10-LE-LABEL: ld_align32_int8_t_uint64_t:
1511 ; CHECK-P10-LE: # %bb.0: # %entry
1512 ; CHECK-P10-LE-NEXT: plbz r3, 99999000(r3), 0
1513 ; CHECK-P10-LE-NEXT: extsb r3, r3
1514 ; CHECK-P10-LE-NEXT: blr
1516 ; CHECK-P10-BE-LABEL: ld_align32_int8_t_uint64_t:
1517 ; CHECK-P10-BE: # %bb.0: # %entry
1518 ; CHECK-P10-BE-NEXT: plbz r3, 99999007(r3), 0
1519 ; CHECK-P10-BE-NEXT: extsb r3, r3
1520 ; CHECK-P10-BE-NEXT: blr
1522 ; CHECK-P9-LE-LABEL: ld_align32_int8_t_uint64_t:
1523 ; CHECK-P9-LE: # %bb.0: # %entry
1524 ; CHECK-P9-LE-NEXT: lis r4, 1525
1525 ; CHECK-P9-LE-NEXT: ori r4, r4, 56600
1526 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
1527 ; CHECK-P9-LE-NEXT: extsb r3, r3
1528 ; CHECK-P9-LE-NEXT: blr
1530 ; CHECK-P9-BE-LABEL: ld_align32_int8_t_uint64_t:
1531 ; CHECK-P9-BE: # %bb.0: # %entry
1532 ; CHECK-P9-BE-NEXT: lis r4, 1525
1533 ; CHECK-P9-BE-NEXT: ori r4, r4, 56607
1534 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
1535 ; CHECK-P9-BE-NEXT: extsb r3, r3
1536 ; CHECK-P9-BE-NEXT: blr
1538 ; CHECK-P8-LE-LABEL: ld_align32_int8_t_uint64_t:
1539 ; CHECK-P8-LE: # %bb.0: # %entry
1540 ; CHECK-P8-LE-NEXT: lis r4, 1525
1541 ; CHECK-P8-LE-NEXT: ori r4, r4, 56600
1542 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
1543 ; CHECK-P8-LE-NEXT: extsb r3, r3
1544 ; CHECK-P8-LE-NEXT: blr
1546 ; CHECK-P8-BE-LABEL: ld_align32_int8_t_uint64_t:
1547 ; CHECK-P8-BE: # %bb.0: # %entry
1548 ; CHECK-P8-BE-NEXT: lis r4, 1525
1549 ; CHECK-P8-BE-NEXT: ori r4, r4, 56607
1550 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
1551 ; CHECK-P8-BE-NEXT: extsb r3, r3
1552 ; CHECK-P8-BE-NEXT: blr
1554 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
1555 %0 = load i64, ptr %add.ptr, align 8
1556 %conv = trunc i64 %0 to i8
1560 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1561 define dso_local signext i8 @ld_align64_int8_t_uint64_t(ptr nocapture readonly %ptr) {
1562 ; CHECK-P10-LE-LABEL: ld_align64_int8_t_uint64_t:
1563 ; CHECK-P10-LE: # %bb.0: # %entry
1564 ; CHECK-P10-LE-NEXT: pli r4, 244140625
1565 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
1566 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
1567 ; CHECK-P10-LE-NEXT: extsb r3, r3
1568 ; CHECK-P10-LE-NEXT: blr
1570 ; CHECK-P10-BE-LABEL: ld_align64_int8_t_uint64_t:
1571 ; CHECK-P10-BE: # %bb.0: # %entry
1572 ; CHECK-P10-BE-NEXT: pli r4, 232
1573 ; CHECK-P10-BE-NEXT: pli r5, 3567587335
1574 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
1575 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
1576 ; CHECK-P10-BE-NEXT: extsb r3, r3
1577 ; CHECK-P10-BE-NEXT: blr
1579 ; CHECK-P9-LE-LABEL: ld_align64_int8_t_uint64_t:
1580 ; CHECK-P9-LE: # %bb.0: # %entry
1581 ; CHECK-P9-LE-NEXT: lis r4, 3725
1582 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
1583 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
1584 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
1585 ; CHECK-P9-LE-NEXT: extsb r3, r3
1586 ; CHECK-P9-LE-NEXT: blr
1588 ; CHECK-P9-BE-LABEL: ld_align64_int8_t_uint64_t:
1589 ; CHECK-P9-BE: # %bb.0: # %entry
1590 ; CHECK-P9-BE-NEXT: li r4, 29
1591 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
1592 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
1593 ; CHECK-P9-BE-NEXT: ori r4, r4, 4103
1594 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
1595 ; CHECK-P9-BE-NEXT: extsb r3, r3
1596 ; CHECK-P9-BE-NEXT: blr
1598 ; CHECK-P8-LE-LABEL: ld_align64_int8_t_uint64_t:
1599 ; CHECK-P8-LE: # %bb.0: # %entry
1600 ; CHECK-P8-LE-NEXT: lis r4, 3725
1601 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
1602 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
1603 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
1604 ; CHECK-P8-LE-NEXT: extsb r3, r3
1605 ; CHECK-P8-LE-NEXT: blr
1607 ; CHECK-P8-BE-LABEL: ld_align64_int8_t_uint64_t:
1608 ; CHECK-P8-BE: # %bb.0: # %entry
1609 ; CHECK-P8-BE-NEXT: li r4, 29
1610 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
1611 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
1612 ; CHECK-P8-BE-NEXT: ori r4, r4, 4103
1613 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
1614 ; CHECK-P8-BE-NEXT: extsb r3, r3
1615 ; CHECK-P8-BE-NEXT: blr
1617 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
1618 %0 = load i64, ptr %add.ptr, align 8
1619 %conv = trunc i64 %0 to i8
1623 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1624 define dso_local signext i8 @ld_reg_int8_t_uint64_t(ptr nocapture readonly %ptr, i64 %off) {
1625 ; CHECK-LE-LABEL: ld_reg_int8_t_uint64_t:
1626 ; CHECK-LE: # %bb.0: # %entry
1627 ; CHECK-LE-NEXT: lbzx r3, r3, r4
1628 ; CHECK-LE-NEXT: extsb r3, r3
1629 ; CHECK-LE-NEXT: blr
1631 ; CHECK-BE-LABEL: ld_reg_int8_t_uint64_t:
1632 ; CHECK-BE: # %bb.0: # %entry
1633 ; CHECK-BE-NEXT: add r3, r3, r4
1634 ; CHECK-BE-NEXT: lbz r3, 7(r3)
1635 ; CHECK-BE-NEXT: extsb r3, r3
1636 ; CHECK-BE-NEXT: blr
1638 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
1639 %0 = load i64, ptr %add.ptr, align 8
1640 %conv = trunc i64 %0 to i8
1644 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1645 define dso_local signext i8 @ld_or_int8_t_uint64_t(i64 %ptr, i8 zeroext %off) {
1646 ; CHECK-LE-LABEL: ld_or_int8_t_uint64_t:
1647 ; CHECK-LE: # %bb.0: # %entry
1648 ; CHECK-LE-NEXT: or r3, r4, r3
1649 ; CHECK-LE-NEXT: lbz r3, 0(r3)
1650 ; CHECK-LE-NEXT: extsb r3, r3
1651 ; CHECK-LE-NEXT: blr
1653 ; CHECK-BE-LABEL: ld_or_int8_t_uint64_t:
1654 ; CHECK-BE: # %bb.0: # %entry
1655 ; CHECK-BE-NEXT: or r3, r4, r3
1656 ; CHECK-BE-NEXT: lbz r3, 7(r3)
1657 ; CHECK-BE-NEXT: extsb r3, r3
1658 ; CHECK-BE-NEXT: blr
1660 %conv = zext i8 %off to i64
1661 %or = or i64 %conv, %ptr
1662 %0 = inttoptr i64 %or to ptr
1663 %1 = load i64, ptr %0, align 8
1664 %conv1 = trunc i64 %1 to i8
1668 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1669 define dso_local signext i8 @ld_not_disjoint16_int8_t_uint64_t(i64 %ptr) {
1670 ; CHECK-LE-LABEL: ld_not_disjoint16_int8_t_uint64_t:
1671 ; CHECK-LE: # %bb.0: # %entry
1672 ; CHECK-LE-NEXT: ori r3, r3, 6
1673 ; CHECK-LE-NEXT: lbz r3, 0(r3)
1674 ; CHECK-LE-NEXT: extsb r3, r3
1675 ; CHECK-LE-NEXT: blr
1677 ; CHECK-BE-LABEL: ld_not_disjoint16_int8_t_uint64_t:
1678 ; CHECK-BE: # %bb.0: # %entry
1679 ; CHECK-BE-NEXT: ori r3, r3, 6
1680 ; CHECK-BE-NEXT: lbz r3, 7(r3)
1681 ; CHECK-BE-NEXT: extsb r3, r3
1682 ; CHECK-BE-NEXT: blr
1684 %or = or i64 %ptr, 6
1685 %0 = inttoptr i64 %or to ptr
1686 %1 = load i64, ptr %0, align 8
1687 %conv = trunc i64 %1 to i8
1691 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1692 define dso_local signext i8 @ld_disjoint_align16_int8_t_uint64_t(i64 %ptr) {
1693 ; CHECK-LE-LABEL: ld_disjoint_align16_int8_t_uint64_t:
1694 ; CHECK-LE: # %bb.0: # %entry
1695 ; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
1696 ; CHECK-LE-NEXT: lbz r3, 24(r3)
1697 ; CHECK-LE-NEXT: extsb r3, r3
1698 ; CHECK-LE-NEXT: blr
1700 ; CHECK-BE-LABEL: ld_disjoint_align16_int8_t_uint64_t:
1701 ; CHECK-BE: # %bb.0: # %entry
1702 ; CHECK-BE-NEXT: rldicr r3, r3, 0, 51
1703 ; CHECK-BE-NEXT: lbz r3, 31(r3)
1704 ; CHECK-BE-NEXT: extsb r3, r3
1705 ; CHECK-BE-NEXT: blr
1707 %and = and i64 %ptr, -4096
1708 %or = or i64 %and, 24
1709 %0 = inttoptr i64 %or to ptr
1710 %1 = load i64, ptr %0, align 8
1711 %conv = trunc i64 %1 to i8
1715 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1716 define dso_local signext i8 @ld_not_disjoint32_int8_t_uint64_t(i64 %ptr) {
1717 ; CHECK-LE-LABEL: ld_not_disjoint32_int8_t_uint64_t:
1718 ; CHECK-LE: # %bb.0: # %entry
1719 ; CHECK-LE-NEXT: ori r3, r3, 34463
1720 ; CHECK-LE-NEXT: oris r3, r3, 1
1721 ; CHECK-LE-NEXT: lbz r3, 0(r3)
1722 ; CHECK-LE-NEXT: extsb r3, r3
1723 ; CHECK-LE-NEXT: blr
1725 ; CHECK-BE-LABEL: ld_not_disjoint32_int8_t_uint64_t:
1726 ; CHECK-BE: # %bb.0: # %entry
1727 ; CHECK-BE-NEXT: ori r3, r3, 34463
1728 ; CHECK-BE-NEXT: oris r3, r3, 1
1729 ; CHECK-BE-NEXT: lbz r3, 7(r3)
1730 ; CHECK-BE-NEXT: extsb r3, r3
1731 ; CHECK-BE-NEXT: blr
1733 %or = or i64 %ptr, 99999
1734 %0 = inttoptr i64 %or to ptr
1735 %1 = load i64, ptr %0, align 8
1736 %conv = trunc i64 %1 to i8
1740 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1741 define dso_local signext i8 @ld_disjoint_align32_int8_t_uint64_t(i64 %ptr) {
1742 ; CHECK-P10-LE-LABEL: ld_disjoint_align32_int8_t_uint64_t:
1743 ; CHECK-P10-LE: # %bb.0: # %entry
1744 ; CHECK-P10-LE-NEXT: lis r4, -15264
1745 ; CHECK-P10-LE-NEXT: and r3, r3, r4
1746 ; CHECK-P10-LE-NEXT: plbz r3, 999990000(r3), 0
1747 ; CHECK-P10-LE-NEXT: extsb r3, r3
1748 ; CHECK-P10-LE-NEXT: blr
1750 ; CHECK-P10-BE-LABEL: ld_disjoint_align32_int8_t_uint64_t:
1751 ; CHECK-P10-BE: # %bb.0: # %entry
1752 ; CHECK-P10-BE-NEXT: lis r4, -15264
1753 ; CHECK-P10-BE-NEXT: and r3, r3, r4
1754 ; CHECK-P10-BE-NEXT: plbz r3, 999990007(r3), 0
1755 ; CHECK-P10-BE-NEXT: extsb r3, r3
1756 ; CHECK-P10-BE-NEXT: blr
1758 ; CHECK-P9-LE-LABEL: ld_disjoint_align32_int8_t_uint64_t:
1759 ; CHECK-P9-LE: # %bb.0: # %entry
1760 ; CHECK-P9-LE-NEXT: lis r4, -15264
1761 ; CHECK-P9-LE-NEXT: and r3, r3, r4
1762 ; CHECK-P9-LE-NEXT: lis r4, 15258
1763 ; CHECK-P9-LE-NEXT: ori r4, r4, 41712
1764 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
1765 ; CHECK-P9-LE-NEXT: extsb r3, r3
1766 ; CHECK-P9-LE-NEXT: blr
1768 ; CHECK-P9-BE-LABEL: ld_disjoint_align32_int8_t_uint64_t:
1769 ; CHECK-P9-BE: # %bb.0: # %entry
1770 ; CHECK-P9-BE-NEXT: lis r4, -15264
1771 ; CHECK-P9-BE-NEXT: and r3, r3, r4
1772 ; CHECK-P9-BE-NEXT: lis r4, 15258
1773 ; CHECK-P9-BE-NEXT: ori r4, r4, 41719
1774 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
1775 ; CHECK-P9-BE-NEXT: extsb r3, r3
1776 ; CHECK-P9-BE-NEXT: blr
1778 ; CHECK-P8-LE-LABEL: ld_disjoint_align32_int8_t_uint64_t:
1779 ; CHECK-P8-LE: # %bb.0: # %entry
1780 ; CHECK-P8-LE-NEXT: lis r4, -15264
1781 ; CHECK-P8-LE-NEXT: and r3, r3, r4
1782 ; CHECK-P8-LE-NEXT: lis r4, 15258
1783 ; CHECK-P8-LE-NEXT: ori r4, r4, 41712
1784 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
1785 ; CHECK-P8-LE-NEXT: extsb r3, r3
1786 ; CHECK-P8-LE-NEXT: blr
1788 ; CHECK-P8-BE-LABEL: ld_disjoint_align32_int8_t_uint64_t:
1789 ; CHECK-P8-BE: # %bb.0: # %entry
1790 ; CHECK-P8-BE-NEXT: lis r4, -15264
1791 ; CHECK-P8-BE-NEXT: and r3, r3, r4
1792 ; CHECK-P8-BE-NEXT: lis r4, 15258
1793 ; CHECK-P8-BE-NEXT: ori r4, r4, 41719
1794 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
1795 ; CHECK-P8-BE-NEXT: extsb r3, r3
1796 ; CHECK-P8-BE-NEXT: blr
1798 %and = and i64 %ptr, -1000341504
1799 %or = or i64 %and, 999990000
1800 %0 = inttoptr i64 %or to ptr
1801 %1 = load i64, ptr %0, align 16
1802 %conv = trunc i64 %1 to i8
1806 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1807 define dso_local signext i8 @ld_not_disjoint64_int8_t_uint64_t(i64 %ptr) {
1808 ; CHECK-P10-LE-LABEL: ld_not_disjoint64_int8_t_uint64_t:
1809 ; CHECK-P10-LE: # %bb.0: # %entry
1810 ; CHECK-P10-LE-NEXT: pli r4, 232
1811 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
1812 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
1813 ; CHECK-P10-LE-NEXT: or r3, r3, r5
1814 ; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
1815 ; CHECK-P10-LE-NEXT: extsb r3, r3
1816 ; CHECK-P10-LE-NEXT: blr
1818 ; CHECK-P10-BE-LABEL: ld_not_disjoint64_int8_t_uint64_t:
1819 ; CHECK-P10-BE: # %bb.0: # %entry
1820 ; CHECK-P10-BE-NEXT: pli r4, 232
1821 ; CHECK-P10-BE-NEXT: pli r5, 3567587329
1822 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
1823 ; CHECK-P10-BE-NEXT: or r3, r3, r5
1824 ; CHECK-P10-BE-NEXT: lbz r3, 7(r3)
1825 ; CHECK-P10-BE-NEXT: extsb r3, r3
1826 ; CHECK-P10-BE-NEXT: blr
1828 ; CHECK-P9-LE-LABEL: ld_not_disjoint64_int8_t_uint64_t:
1829 ; CHECK-P9-LE: # %bb.0: # %entry
1830 ; CHECK-P9-LE-NEXT: li r4, 29
1831 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
1832 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
1833 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
1834 ; CHECK-P9-LE-NEXT: or r3, r3, r4
1835 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
1836 ; CHECK-P9-LE-NEXT: extsb r3, r3
1837 ; CHECK-P9-LE-NEXT: blr
1839 ; CHECK-P9-BE-LABEL: ld_not_disjoint64_int8_t_uint64_t:
1840 ; CHECK-P9-BE: # %bb.0: # %entry
1841 ; CHECK-P9-BE-NEXT: li r4, 29
1842 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
1843 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
1844 ; CHECK-P9-BE-NEXT: ori r4, r4, 4097
1845 ; CHECK-P9-BE-NEXT: or r3, r3, r4
1846 ; CHECK-P9-BE-NEXT: lbz r3, 7(r3)
1847 ; CHECK-P9-BE-NEXT: extsb r3, r3
1848 ; CHECK-P9-BE-NEXT: blr
1850 ; CHECK-P8-LE-LABEL: ld_not_disjoint64_int8_t_uint64_t:
1851 ; CHECK-P8-LE: # %bb.0: # %entry
1852 ; CHECK-P8-LE-NEXT: li r4, 29
1853 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
1854 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
1855 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
1856 ; CHECK-P8-LE-NEXT: or r3, r3, r4
1857 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
1858 ; CHECK-P8-LE-NEXT: extsb r3, r3
1859 ; CHECK-P8-LE-NEXT: blr
1861 ; CHECK-P8-BE-LABEL: ld_not_disjoint64_int8_t_uint64_t:
1862 ; CHECK-P8-BE: # %bb.0: # %entry
1863 ; CHECK-P8-BE-NEXT: li r4, 29
1864 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
1865 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
1866 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
1867 ; CHECK-P8-BE-NEXT: or r3, r3, r4
1868 ; CHECK-P8-BE-NEXT: lbz r3, 7(r3)
1869 ; CHECK-P8-BE-NEXT: extsb r3, r3
1870 ; CHECK-P8-BE-NEXT: blr
1872 %or = or i64 %ptr, 1000000000001
1873 %0 = inttoptr i64 %or to ptr
1874 %1 = load i64, ptr %0, align 8
1875 %conv = trunc i64 %1 to i8
1879 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1880 define dso_local signext i8 @ld_disjoint_align64_int8_t_uint64_t(i64 %ptr) {
1881 ; CHECK-P10-LE-LABEL: ld_disjoint_align64_int8_t_uint64_t:
1882 ; CHECK-P10-LE: # %bb.0: # %entry
1883 ; CHECK-P10-LE-NEXT: pli r4, 244140625
1884 ; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
1885 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
1886 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
1887 ; CHECK-P10-LE-NEXT: extsb r3, r3
1888 ; CHECK-P10-LE-NEXT: blr
1890 ; CHECK-P10-BE-LABEL: ld_disjoint_align64_int8_t_uint64_t:
1891 ; CHECK-P10-BE: # %bb.0: # %entry
1892 ; CHECK-P10-BE-NEXT: pli r4, 232
1893 ; CHECK-P10-BE-NEXT: pli r5, 3567587335
1894 ; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
1895 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
1896 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
1897 ; CHECK-P10-BE-NEXT: extsb r3, r3
1898 ; CHECK-P10-BE-NEXT: blr
1900 ; CHECK-P9-LE-LABEL: ld_disjoint_align64_int8_t_uint64_t:
1901 ; CHECK-P9-LE: # %bb.0: # %entry
1902 ; CHECK-P9-LE-NEXT: lis r4, 3725
1903 ; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
1904 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
1905 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
1906 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
1907 ; CHECK-P9-LE-NEXT: extsb r3, r3
1908 ; CHECK-P9-LE-NEXT: blr
1910 ; CHECK-P9-BE-LABEL: ld_disjoint_align64_int8_t_uint64_t:
1911 ; CHECK-P9-BE: # %bb.0: # %entry
1912 ; CHECK-P9-BE-NEXT: li r4, 29
1913 ; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
1914 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
1915 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
1916 ; CHECK-P9-BE-NEXT: ori r4, r4, 4103
1917 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
1918 ; CHECK-P9-BE-NEXT: extsb r3, r3
1919 ; CHECK-P9-BE-NEXT: blr
1921 ; CHECK-P8-LE-LABEL: ld_disjoint_align64_int8_t_uint64_t:
1922 ; CHECK-P8-LE: # %bb.0: # %entry
1923 ; CHECK-P8-LE-NEXT: lis r4, 3725
1924 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
1925 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
1926 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
1927 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
1928 ; CHECK-P8-LE-NEXT: extsb r3, r3
1929 ; CHECK-P8-LE-NEXT: blr
1931 ; CHECK-P8-BE-LABEL: ld_disjoint_align64_int8_t_uint64_t:
1932 ; CHECK-P8-BE: # %bb.0: # %entry
1933 ; CHECK-P8-BE-NEXT: li r4, 29
1934 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
1935 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
1936 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
1937 ; CHECK-P8-BE-NEXT: ori r4, r4, 4103
1938 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
1939 ; CHECK-P8-BE-NEXT: extsb r3, r3
1940 ; CHECK-P8-BE-NEXT: blr
1942 %and = and i64 %ptr, -1099511627776
1943 %or = or i64 %and, 1000000000000
1944 %0 = inttoptr i64 %or to ptr
1945 %1 = load i64, ptr %0, align 4096
1946 %conv = trunc i64 %1 to i8
1950 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1951 define dso_local signext i8 @ld_cst_align16_int8_t_uint64_t() {
1952 ; CHECK-LE-LABEL: ld_cst_align16_int8_t_uint64_t:
1953 ; CHECK-LE: # %bb.0: # %entry
1954 ; CHECK-LE-NEXT: lbz r3, 4080(0)
1955 ; CHECK-LE-NEXT: extsb r3, r3
1956 ; CHECK-LE-NEXT: blr
1958 ; CHECK-BE-LABEL: ld_cst_align16_int8_t_uint64_t:
1959 ; CHECK-BE: # %bb.0: # %entry
1960 ; CHECK-BE-NEXT: lbz r3, 4087(0)
1961 ; CHECK-BE-NEXT: extsb r3, r3
1962 ; CHECK-BE-NEXT: blr
1964 %0 = load i64, ptr inttoptr (i64 4080 to ptr), align 16
1965 %conv = trunc i64 %0 to i8
1969 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1970 define dso_local signext i8 @ld_cst_align32_int8_t_uint64_t() {
1971 ; CHECK-LE-LABEL: ld_cst_align32_int8_t_uint64_t:
1972 ; CHECK-LE: # %bb.0: # %entry
1973 ; CHECK-LE-NEXT: lis r3, 153
1974 ; CHECK-LE-NEXT: lbz r3, -27108(r3)
1975 ; CHECK-LE-NEXT: extsb r3, r3
1976 ; CHECK-LE-NEXT: blr
1978 ; CHECK-BE-LABEL: ld_cst_align32_int8_t_uint64_t:
1979 ; CHECK-BE: # %bb.0: # %entry
1980 ; CHECK-BE-NEXT: lis r3, 153
1981 ; CHECK-BE-NEXT: lbz r3, -27101(r3)
1982 ; CHECK-BE-NEXT: extsb r3, r3
1983 ; CHECK-BE-NEXT: blr
1985 %0 = load i64, ptr inttoptr (i64 9999900 to ptr), align 8
1986 %conv = trunc i64 %0 to i8
1990 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1991 define dso_local signext i8 @ld_cst_align64_int8_t_uint64_t() {
1992 ; CHECK-P10-LE-LABEL: ld_cst_align64_int8_t_uint64_t:
1993 ; CHECK-P10-LE: # %bb.0: # %entry
1994 ; CHECK-P10-LE-NEXT: pli r3, 244140625
1995 ; CHECK-P10-LE-NEXT: rldic r3, r3, 12, 24
1996 ; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
1997 ; CHECK-P10-LE-NEXT: extsb r3, r3
1998 ; CHECK-P10-LE-NEXT: blr
2000 ; CHECK-P10-BE-LABEL: ld_cst_align64_int8_t_uint64_t:
2001 ; CHECK-P10-BE: # %bb.0: # %entry
2002 ; CHECK-P10-BE-NEXT: pli r3, 232
2003 ; CHECK-P10-BE-NEXT: pli r4, 3567587335
2004 ; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
2005 ; CHECK-P10-BE-NEXT: lbz r3, 0(r4)
2006 ; CHECK-P10-BE-NEXT: extsb r3, r3
2007 ; CHECK-P10-BE-NEXT: blr
2009 ; CHECK-P9-LE-LABEL: ld_cst_align64_int8_t_uint64_t:
2010 ; CHECK-P9-LE: # %bb.0: # %entry
2011 ; CHECK-P9-LE-NEXT: lis r3, 3725
2012 ; CHECK-P9-LE-NEXT: ori r3, r3, 19025
2013 ; CHECK-P9-LE-NEXT: rldic r3, r3, 12, 24
2014 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
2015 ; CHECK-P9-LE-NEXT: extsb r3, r3
2016 ; CHECK-P9-LE-NEXT: blr
2018 ; CHECK-P9-BE-LABEL: ld_cst_align64_int8_t_uint64_t:
2019 ; CHECK-P9-BE: # %bb.0: # %entry
2020 ; CHECK-P9-BE-NEXT: li r3, 29
2021 ; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
2022 ; CHECK-P9-BE-NEXT: oris r3, r3, 54437
2023 ; CHECK-P9-BE-NEXT: ori r3, r3, 4103
2024 ; CHECK-P9-BE-NEXT: lbz r3, 0(r3)
2025 ; CHECK-P9-BE-NEXT: extsb r3, r3
2026 ; CHECK-P9-BE-NEXT: blr
2028 ; CHECK-P8-LE-LABEL: ld_cst_align64_int8_t_uint64_t:
2029 ; CHECK-P8-LE: # %bb.0: # %entry
2030 ; CHECK-P8-LE-NEXT: lis r3, 3725
2031 ; CHECK-P8-LE-NEXT: ori r3, r3, 19025
2032 ; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
2033 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
2034 ; CHECK-P8-LE-NEXT: extsb r3, r3
2035 ; CHECK-P8-LE-NEXT: blr
2037 ; CHECK-P8-BE-LABEL: ld_cst_align64_int8_t_uint64_t:
2038 ; CHECK-P8-BE: # %bb.0: # %entry
2039 ; CHECK-P8-BE-NEXT: li r3, 29
2040 ; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
2041 ; CHECK-P8-BE-NEXT: oris r3, r3, 54437
2042 ; CHECK-P8-BE-NEXT: ori r3, r3, 4103
2043 ; CHECK-P8-BE-NEXT: lbz r3, 0(r3)
2044 ; CHECK-P8-BE-NEXT: extsb r3, r3
2045 ; CHECK-P8-BE-NEXT: blr
2047 %0 = load i64, ptr inttoptr (i64 1000000000000 to ptr), align 4096
2048 %conv = trunc i64 %0 to i8
2052 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2053 define dso_local signext i8 @ld_0_int8_t_float(i64 %ptr) {
2054 ; CHECK-LABEL: ld_0_int8_t_float:
2055 ; CHECK: # %bb.0: # %entry
2056 ; CHECK-NEXT: lfs f0, 0(r3)
2057 ; CHECK-NEXT: xscvdpsxws f0, f0
2058 ; CHECK-NEXT: mffprwz r3, f0
2059 ; CHECK-NEXT: extsw r3, r3
2062 %0 = inttoptr i64 %ptr to ptr
2063 %1 = load float, ptr %0, align 4
2064 %conv = fptosi float %1 to i8
2068 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2069 define dso_local signext i8 @ld_align16_int8_t_float(ptr nocapture readonly %ptr) {
2070 ; CHECK-LABEL: ld_align16_int8_t_float:
2071 ; CHECK: # %bb.0: # %entry
2072 ; CHECK-NEXT: lfs f0, 8(r3)
2073 ; CHECK-NEXT: xscvdpsxws f0, f0
2074 ; CHECK-NEXT: mffprwz r3, f0
2075 ; CHECK-NEXT: extsw r3, r3
2078 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
2079 %0 = load float, ptr %add.ptr, align 4
2080 %conv = fptosi float %0 to i8
2084 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2085 define dso_local signext i8 @ld_align32_int8_t_float(ptr nocapture readonly %ptr) {
2086 ; CHECK-P10-LABEL: ld_align32_int8_t_float:
2087 ; CHECK-P10: # %bb.0: # %entry
2088 ; CHECK-P10-NEXT: plfs f0, 99999000(r3), 0
2089 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2090 ; CHECK-P10-NEXT: mffprwz r3, f0
2091 ; CHECK-P10-NEXT: extsw r3, r3
2092 ; CHECK-P10-NEXT: blr
2094 ; CHECK-PREP10-LABEL: ld_align32_int8_t_float:
2095 ; CHECK-PREP10: # %bb.0: # %entry
2096 ; CHECK-PREP10-NEXT: lis r4, 1525
2097 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
2098 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
2099 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2100 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2101 ; CHECK-PREP10-NEXT: extsw r3, r3
2102 ; CHECK-PREP10-NEXT: blr
2104 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
2105 %0 = load float, ptr %add.ptr, align 4
2106 %conv = fptosi float %0 to i8
2110 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2111 define dso_local signext i8 @ld_align64_int8_t_float(ptr nocapture readonly %ptr) {
2112 ; CHECK-P10-LABEL: ld_align64_int8_t_float:
2113 ; CHECK-P10: # %bb.0: # %entry
2114 ; CHECK-P10-NEXT: pli r4, 244140625
2115 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2116 ; CHECK-P10-NEXT: lfsx f0, r3, r4
2117 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2118 ; CHECK-P10-NEXT: mffprwz r3, f0
2119 ; CHECK-P10-NEXT: extsw r3, r3
2120 ; CHECK-P10-NEXT: blr
2122 ; CHECK-PREP10-LABEL: ld_align64_int8_t_float:
2123 ; CHECK-PREP10: # %bb.0: # %entry
2124 ; CHECK-PREP10-NEXT: lis r4, 3725
2125 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2126 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2127 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
2128 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2129 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2130 ; CHECK-PREP10-NEXT: extsw r3, r3
2131 ; CHECK-PREP10-NEXT: blr
2133 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
2134 %0 = load float, ptr %add.ptr, align 4
2135 %conv = fptosi float %0 to i8
2139 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2140 define dso_local signext i8 @ld_reg_int8_t_float(ptr nocapture readonly %ptr, i64 %off) {
2141 ; CHECK-LABEL: ld_reg_int8_t_float:
2142 ; CHECK: # %bb.0: # %entry
2143 ; CHECK-NEXT: lfsx f0, r3, r4
2144 ; CHECK-NEXT: xscvdpsxws f0, f0
2145 ; CHECK-NEXT: mffprwz r3, f0
2146 ; CHECK-NEXT: extsw r3, r3
2149 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
2150 %0 = load float, ptr %add.ptr, align 4
2151 %conv = fptosi float %0 to i8
2155 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2156 define dso_local signext i8 @ld_or_int8_t_float(i64 %ptr, i8 zeroext %off) {
2157 ; CHECK-LABEL: ld_or_int8_t_float:
2158 ; CHECK: # %bb.0: # %entry
2159 ; CHECK-NEXT: or r3, r4, r3
2160 ; CHECK-NEXT: lfs f0, 0(r3)
2161 ; CHECK-NEXT: xscvdpsxws f0, f0
2162 ; CHECK-NEXT: mffprwz r3, f0
2163 ; CHECK-NEXT: extsw r3, r3
2166 %conv = zext i8 %off to i64
2167 %or = or i64 %conv, %ptr
2168 %0 = inttoptr i64 %or to ptr
2169 %1 = load float, ptr %0, align 4
2170 %conv1 = fptosi float %1 to i8
2174 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2175 define dso_local signext i8 @ld_not_disjoint16_int8_t_float(i64 %ptr) {
2176 ; CHECK-LABEL: ld_not_disjoint16_int8_t_float:
2177 ; CHECK: # %bb.0: # %entry
2178 ; CHECK-NEXT: ori r3, r3, 6
2179 ; CHECK-NEXT: lfs f0, 0(r3)
2180 ; CHECK-NEXT: xscvdpsxws f0, f0
2181 ; CHECK-NEXT: mffprwz r3, f0
2182 ; CHECK-NEXT: extsw r3, r3
2185 %or = or i64 %ptr, 6
2186 %0 = inttoptr i64 %or to ptr
2187 %1 = load float, ptr %0, align 4
2188 %conv = fptosi float %1 to i8
2192 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2193 define dso_local signext i8 @ld_disjoint_align16_int8_t_float(i64 %ptr) {
2194 ; CHECK-LABEL: ld_disjoint_align16_int8_t_float:
2195 ; CHECK: # %bb.0: # %entry
2196 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2197 ; CHECK-NEXT: lfs f0, 24(r3)
2198 ; CHECK-NEXT: xscvdpsxws f0, f0
2199 ; CHECK-NEXT: mffprwz r3, f0
2200 ; CHECK-NEXT: extsw r3, r3
2203 %and = and i64 %ptr, -4096
2204 %or = or i64 %and, 24
2205 %0 = inttoptr i64 %or to ptr
2206 %1 = load float, ptr %0, align 8
2207 %conv = fptosi float %1 to i8
2211 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2212 define dso_local signext i8 @ld_not_disjoint32_int8_t_float(i64 %ptr) {
2213 ; CHECK-LABEL: ld_not_disjoint32_int8_t_float:
2214 ; CHECK: # %bb.0: # %entry
2215 ; CHECK-NEXT: ori r3, r3, 34463
2216 ; CHECK-NEXT: oris r3, r3, 1
2217 ; CHECK-NEXT: lfs f0, 0(r3)
2218 ; CHECK-NEXT: xscvdpsxws f0, f0
2219 ; CHECK-NEXT: mffprwz r3, f0
2220 ; CHECK-NEXT: extsw r3, r3
2223 %or = or i64 %ptr, 99999
2224 %0 = inttoptr i64 %or to ptr
2225 %1 = load float, ptr %0, align 4
2226 %conv = fptosi float %1 to i8
2230 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2231 define dso_local signext i8 @ld_disjoint_align32_int8_t_float(i64 %ptr) {
2232 ; CHECK-P10-LABEL: ld_disjoint_align32_int8_t_float:
2233 ; CHECK-P10: # %bb.0: # %entry
2234 ; CHECK-P10-NEXT: lis r4, -15264
2235 ; CHECK-P10-NEXT: and r3, r3, r4
2236 ; CHECK-P10-NEXT: plfs f0, 999990000(r3), 0
2237 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2238 ; CHECK-P10-NEXT: mffprwz r3, f0
2239 ; CHECK-P10-NEXT: extsw r3, r3
2240 ; CHECK-P10-NEXT: blr
2242 ; CHECK-PREP10-LABEL: ld_disjoint_align32_int8_t_float:
2243 ; CHECK-PREP10: # %bb.0: # %entry
2244 ; CHECK-PREP10-NEXT: lis r4, -15264
2245 ; CHECK-PREP10-NEXT: and r3, r3, r4
2246 ; CHECK-PREP10-NEXT: lis r4, 15258
2247 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
2248 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
2249 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2250 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2251 ; CHECK-PREP10-NEXT: extsw r3, r3
2252 ; CHECK-PREP10-NEXT: blr
2254 %and = and i64 %ptr, -1000341504
2255 %or = or i64 %and, 999990000
2256 %0 = inttoptr i64 %or to ptr
2257 %1 = load float, ptr %0, align 16
2258 %conv = fptosi float %1 to i8
2262 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2263 define dso_local signext i8 @ld_not_disjoint64_int8_t_float(i64 %ptr) {
2264 ; CHECK-P10-LABEL: ld_not_disjoint64_int8_t_float:
2265 ; CHECK-P10: # %bb.0: # %entry
2266 ; CHECK-P10-NEXT: pli r4, 232
2267 ; CHECK-P10-NEXT: pli r5, 3567587329
2268 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2269 ; CHECK-P10-NEXT: or r3, r3, r5
2270 ; CHECK-P10-NEXT: lfs f0, 0(r3)
2271 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2272 ; CHECK-P10-NEXT: mffprwz r3, f0
2273 ; CHECK-P10-NEXT: extsw r3, r3
2274 ; CHECK-P10-NEXT: blr
2276 ; CHECK-PREP10-LABEL: ld_not_disjoint64_int8_t_float:
2277 ; CHECK-PREP10: # %bb.0: # %entry
2278 ; CHECK-PREP10-NEXT: li r4, 29
2279 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2280 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2281 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2282 ; CHECK-PREP10-NEXT: or r3, r3, r4
2283 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
2284 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2285 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2286 ; CHECK-PREP10-NEXT: extsw r3, r3
2287 ; CHECK-PREP10-NEXT: blr
2289 %or = or i64 %ptr, 1000000000001
2290 %0 = inttoptr i64 %or to ptr
2291 %1 = load float, ptr %0, align 4
2292 %conv = fptosi float %1 to i8
2296 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2297 define dso_local signext i8 @ld_disjoint_align64_int8_t_float(i64 %ptr) {
2298 ; CHECK-P10-LABEL: ld_disjoint_align64_int8_t_float:
2299 ; CHECK-P10: # %bb.0: # %entry
2300 ; CHECK-P10-NEXT: pli r4, 244140625
2301 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
2302 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2303 ; CHECK-P10-NEXT: lfsx f0, r3, r4
2304 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2305 ; CHECK-P10-NEXT: mffprwz r3, f0
2306 ; CHECK-P10-NEXT: extsw r3, r3
2307 ; CHECK-P10-NEXT: blr
2309 ; CHECK-PREP10-LABEL: ld_disjoint_align64_int8_t_float:
2310 ; CHECK-PREP10: # %bb.0: # %entry
2311 ; CHECK-PREP10-NEXT: lis r4, 3725
2312 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
2313 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2314 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2315 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
2316 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2317 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2318 ; CHECK-PREP10-NEXT: extsw r3, r3
2319 ; CHECK-PREP10-NEXT: blr
2321 %and = and i64 %ptr, -1099511627776
2322 %or = or i64 %and, 1000000000000
2323 %0 = inttoptr i64 %or to ptr
2324 %1 = load float, ptr %0, align 4096
2325 %conv = fptosi float %1 to i8
2329 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2330 define dso_local signext i8 @ld_cst_align16_int8_t_float() {
2331 ; CHECK-LABEL: ld_cst_align16_int8_t_float:
2332 ; CHECK: # %bb.0: # %entry
2333 ; CHECK-NEXT: lfs f0, 4080(0)
2334 ; CHECK-NEXT: xscvdpsxws f0, f0
2335 ; CHECK-NEXT: mffprwz r3, f0
2336 ; CHECK-NEXT: extsw r3, r3
2339 %0 = load float, ptr inttoptr (i64 4080 to ptr), align 16
2340 %conv = fptosi float %0 to i8
2344 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2345 define dso_local signext i8 @ld_cst_align32_int8_t_float() {
2346 ; CHECK-LABEL: ld_cst_align32_int8_t_float:
2347 ; CHECK: # %bb.0: # %entry
2348 ; CHECK-NEXT: lis r3, 153
2349 ; CHECK-NEXT: lfs f0, -27108(r3)
2350 ; CHECK-NEXT: xscvdpsxws f0, f0
2351 ; CHECK-NEXT: mffprwz r3, f0
2352 ; CHECK-NEXT: extsw r3, r3
2355 %0 = load float, ptr inttoptr (i64 9999900 to ptr), align 4
2356 %conv = fptosi float %0 to i8
2360 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2361 define dso_local signext i8 @ld_cst_align64_int8_t_float() {
2362 ; CHECK-P10-LABEL: ld_cst_align64_int8_t_float:
2363 ; CHECK-P10: # %bb.0: # %entry
2364 ; CHECK-P10-NEXT: pli r3, 244140625
2365 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
2366 ; CHECK-P10-NEXT: lfs f0, 0(r3)
2367 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2368 ; CHECK-P10-NEXT: mffprwz r3, f0
2369 ; CHECK-P10-NEXT: extsw r3, r3
2370 ; CHECK-P10-NEXT: blr
2372 ; CHECK-PREP10-LABEL: ld_cst_align64_int8_t_float:
2373 ; CHECK-PREP10: # %bb.0: # %entry
2374 ; CHECK-PREP10-NEXT: lis r3, 3725
2375 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
2376 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
2377 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
2378 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2379 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2380 ; CHECK-PREP10-NEXT: extsw r3, r3
2381 ; CHECK-PREP10-NEXT: blr
2383 %0 = load float, ptr inttoptr (i64 1000000000000 to ptr), align 4096
2384 %conv = fptosi float %0 to i8
2388 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2389 define dso_local signext i8 @ld_0_int8_t_double(i64 %ptr) {
2390 ; CHECK-LABEL: ld_0_int8_t_double:
2391 ; CHECK: # %bb.0: # %entry
2392 ; CHECK-NEXT: lfd f0, 0(r3)
2393 ; CHECK-NEXT: xscvdpsxws f0, f0
2394 ; CHECK-NEXT: mffprwz r3, f0
2395 ; CHECK-NEXT: extsw r3, r3
2398 %0 = inttoptr i64 %ptr to ptr
2399 %1 = load double, ptr %0, align 8
2400 %conv = fptosi double %1 to i8
2404 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2405 define dso_local signext i8 @ld_align16_int8_t_double(ptr nocapture readonly %ptr) {
2406 ; CHECK-LABEL: ld_align16_int8_t_double:
2407 ; CHECK: # %bb.0: # %entry
2408 ; CHECK-NEXT: lfd f0, 8(r3)
2409 ; CHECK-NEXT: xscvdpsxws f0, f0
2410 ; CHECK-NEXT: mffprwz r3, f0
2411 ; CHECK-NEXT: extsw r3, r3
2414 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
2415 %0 = load double, ptr %add.ptr, align 8
2416 %conv = fptosi double %0 to i8
2420 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2421 define dso_local signext i8 @ld_align32_int8_t_double(ptr nocapture readonly %ptr) {
2422 ; CHECK-P10-LABEL: ld_align32_int8_t_double:
2423 ; CHECK-P10: # %bb.0: # %entry
2424 ; CHECK-P10-NEXT: plfd f0, 99999000(r3), 0
2425 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2426 ; CHECK-P10-NEXT: mffprwz r3, f0
2427 ; CHECK-P10-NEXT: extsw r3, r3
2428 ; CHECK-P10-NEXT: blr
2430 ; CHECK-PREP10-LABEL: ld_align32_int8_t_double:
2431 ; CHECK-PREP10: # %bb.0: # %entry
2432 ; CHECK-PREP10-NEXT: lis r4, 1525
2433 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
2434 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
2435 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2436 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2437 ; CHECK-PREP10-NEXT: extsw r3, r3
2438 ; CHECK-PREP10-NEXT: blr
2440 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
2441 %0 = load double, ptr %add.ptr, align 8
2442 %conv = fptosi double %0 to i8
2446 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2447 define dso_local signext i8 @ld_align64_int8_t_double(ptr nocapture readonly %ptr) {
2448 ; CHECK-P10-LABEL: ld_align64_int8_t_double:
2449 ; CHECK-P10: # %bb.0: # %entry
2450 ; CHECK-P10-NEXT: pli r4, 244140625
2451 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2452 ; CHECK-P10-NEXT: lfdx f0, r3, r4
2453 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2454 ; CHECK-P10-NEXT: mffprwz r3, f0
2455 ; CHECK-P10-NEXT: extsw r3, r3
2456 ; CHECK-P10-NEXT: blr
2458 ; CHECK-PREP10-LABEL: ld_align64_int8_t_double:
2459 ; CHECK-PREP10: # %bb.0: # %entry
2460 ; CHECK-PREP10-NEXT: lis r4, 3725
2461 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2462 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2463 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
2464 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2465 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2466 ; CHECK-PREP10-NEXT: extsw r3, r3
2467 ; CHECK-PREP10-NEXT: blr
2469 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
2470 %0 = load double, ptr %add.ptr, align 8
2471 %conv = fptosi double %0 to i8
2475 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2476 define dso_local signext i8 @ld_reg_int8_t_double(ptr nocapture readonly %ptr, i64 %off) {
2477 ; CHECK-LABEL: ld_reg_int8_t_double:
2478 ; CHECK: # %bb.0: # %entry
2479 ; CHECK-NEXT: lfdx f0, r3, r4
2480 ; CHECK-NEXT: xscvdpsxws f0, f0
2481 ; CHECK-NEXT: mffprwz r3, f0
2482 ; CHECK-NEXT: extsw r3, r3
2485 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
2486 %0 = load double, ptr %add.ptr, align 8
2487 %conv = fptosi double %0 to i8
2491 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2492 define dso_local signext i8 @ld_or_int8_t_double(i64 %ptr, i8 zeroext %off) {
2493 ; CHECK-LABEL: ld_or_int8_t_double:
2494 ; CHECK: # %bb.0: # %entry
2495 ; CHECK-NEXT: or r3, r4, r3
2496 ; CHECK-NEXT: lfd f0, 0(r3)
2497 ; CHECK-NEXT: xscvdpsxws f0, f0
2498 ; CHECK-NEXT: mffprwz r3, f0
2499 ; CHECK-NEXT: extsw r3, r3
2502 %conv = zext i8 %off to i64
2503 %or = or i64 %conv, %ptr
2504 %0 = inttoptr i64 %or to ptr
2505 %1 = load double, ptr %0, align 8
2506 %conv1 = fptosi double %1 to i8
2510 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2511 define dso_local signext i8 @ld_not_disjoint16_int8_t_double(i64 %ptr) {
2512 ; CHECK-LABEL: ld_not_disjoint16_int8_t_double:
2513 ; CHECK: # %bb.0: # %entry
2514 ; CHECK-NEXT: ori r3, r3, 6
2515 ; CHECK-NEXT: lfd f0, 0(r3)
2516 ; CHECK-NEXT: xscvdpsxws f0, f0
2517 ; CHECK-NEXT: mffprwz r3, f0
2518 ; CHECK-NEXT: extsw r3, r3
2521 %or = or i64 %ptr, 6
2522 %0 = inttoptr i64 %or to ptr
2523 %1 = load double, ptr %0, align 8
2524 %conv = fptosi double %1 to i8
2528 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2529 define dso_local signext i8 @ld_disjoint_align16_int8_t_double(i64 %ptr) {
2530 ; CHECK-LABEL: ld_disjoint_align16_int8_t_double:
2531 ; CHECK: # %bb.0: # %entry
2532 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2533 ; CHECK-NEXT: lfd f0, 24(r3)
2534 ; CHECK-NEXT: xscvdpsxws f0, f0
2535 ; CHECK-NEXT: mffprwz r3, f0
2536 ; CHECK-NEXT: extsw r3, r3
2539 %and = and i64 %ptr, -4096
2540 %or = or i64 %and, 24
2541 %0 = inttoptr i64 %or to ptr
2542 %1 = load double, ptr %0, align 8
2543 %conv = fptosi double %1 to i8
2547 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2548 define dso_local signext i8 @ld_not_disjoint32_int8_t_double(i64 %ptr) {
2549 ; CHECK-LABEL: ld_not_disjoint32_int8_t_double:
2550 ; CHECK: # %bb.0: # %entry
2551 ; CHECK-NEXT: ori r3, r3, 34463
2552 ; CHECK-NEXT: oris r3, r3, 1
2553 ; CHECK-NEXT: lfd f0, 0(r3)
2554 ; CHECK-NEXT: xscvdpsxws f0, f0
2555 ; CHECK-NEXT: mffprwz r3, f0
2556 ; CHECK-NEXT: extsw r3, r3
2559 %or = or i64 %ptr, 99999
2560 %0 = inttoptr i64 %or to ptr
2561 %1 = load double, ptr %0, align 8
2562 %conv = fptosi double %1 to i8
2566 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2567 define dso_local signext i8 @ld_disjoint_align32_int8_t_double(i64 %ptr) {
2568 ; CHECK-P10-LABEL: ld_disjoint_align32_int8_t_double:
2569 ; CHECK-P10: # %bb.0: # %entry
2570 ; CHECK-P10-NEXT: lis r4, -15264
2571 ; CHECK-P10-NEXT: and r3, r3, r4
2572 ; CHECK-P10-NEXT: plfd f0, 999990000(r3), 0
2573 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2574 ; CHECK-P10-NEXT: mffprwz r3, f0
2575 ; CHECK-P10-NEXT: extsw r3, r3
2576 ; CHECK-P10-NEXT: blr
2578 ; CHECK-PREP10-LABEL: ld_disjoint_align32_int8_t_double:
2579 ; CHECK-PREP10: # %bb.0: # %entry
2580 ; CHECK-PREP10-NEXT: lis r4, -15264
2581 ; CHECK-PREP10-NEXT: and r3, r3, r4
2582 ; CHECK-PREP10-NEXT: lis r4, 15258
2583 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
2584 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
2585 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2586 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2587 ; CHECK-PREP10-NEXT: extsw r3, r3
2588 ; CHECK-PREP10-NEXT: blr
2590 %and = and i64 %ptr, -1000341504
2591 %or = or i64 %and, 999990000
2592 %0 = inttoptr i64 %or to ptr
2593 %1 = load double, ptr %0, align 16
2594 %conv = fptosi double %1 to i8
2598 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2599 define dso_local signext i8 @ld_not_disjoint64_int8_t_double(i64 %ptr) {
2600 ; CHECK-P10-LABEL: ld_not_disjoint64_int8_t_double:
2601 ; CHECK-P10: # %bb.0: # %entry
2602 ; CHECK-P10-NEXT: pli r4, 232
2603 ; CHECK-P10-NEXT: pli r5, 3567587329
2604 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2605 ; CHECK-P10-NEXT: or r3, r3, r5
2606 ; CHECK-P10-NEXT: lfd f0, 0(r3)
2607 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2608 ; CHECK-P10-NEXT: mffprwz r3, f0
2609 ; CHECK-P10-NEXT: extsw r3, r3
2610 ; CHECK-P10-NEXT: blr
2612 ; CHECK-PREP10-LABEL: ld_not_disjoint64_int8_t_double:
2613 ; CHECK-PREP10: # %bb.0: # %entry
2614 ; CHECK-PREP10-NEXT: li r4, 29
2615 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2616 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2617 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2618 ; CHECK-PREP10-NEXT: or r3, r3, r4
2619 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
2620 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2621 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2622 ; CHECK-PREP10-NEXT: extsw r3, r3
2623 ; CHECK-PREP10-NEXT: blr
2625 %or = or i64 %ptr, 1000000000001
2626 %0 = inttoptr i64 %or to ptr
2627 %1 = load double, ptr %0, align 8
2628 %conv = fptosi double %1 to i8
2632 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2633 define dso_local signext i8 @ld_disjoint_align64_int8_t_double(i64 %ptr) {
2634 ; CHECK-P10-LABEL: ld_disjoint_align64_int8_t_double:
2635 ; CHECK-P10: # %bb.0: # %entry
2636 ; CHECK-P10-NEXT: pli r4, 244140625
2637 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
2638 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2639 ; CHECK-P10-NEXT: lfdx f0, r3, r4
2640 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2641 ; CHECK-P10-NEXT: mffprwz r3, f0
2642 ; CHECK-P10-NEXT: extsw r3, r3
2643 ; CHECK-P10-NEXT: blr
2645 ; CHECK-PREP10-LABEL: ld_disjoint_align64_int8_t_double:
2646 ; CHECK-PREP10: # %bb.0: # %entry
2647 ; CHECK-PREP10-NEXT: lis r4, 3725
2648 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
2649 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2650 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2651 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
2652 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2653 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2654 ; CHECK-PREP10-NEXT: extsw r3, r3
2655 ; CHECK-PREP10-NEXT: blr
2657 %and = and i64 %ptr, -1099511627776
2658 %or = or i64 %and, 1000000000000
2659 %0 = inttoptr i64 %or to ptr
2660 %1 = load double, ptr %0, align 4096
2661 %conv = fptosi double %1 to i8
2665 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2666 define dso_local signext i8 @ld_cst_align16_int8_t_double() {
2667 ; CHECK-LABEL: ld_cst_align16_int8_t_double:
2668 ; CHECK: # %bb.0: # %entry
2669 ; CHECK-NEXT: lfd f0, 4080(0)
2670 ; CHECK-NEXT: xscvdpsxws f0, f0
2671 ; CHECK-NEXT: mffprwz r3, f0
2672 ; CHECK-NEXT: extsw r3, r3
2675 %0 = load double, ptr inttoptr (i64 4080 to ptr), align 16
2676 %conv = fptosi double %0 to i8
2680 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2681 define dso_local signext i8 @ld_cst_align32_int8_t_double() {
2682 ; CHECK-LABEL: ld_cst_align32_int8_t_double:
2683 ; CHECK: # %bb.0: # %entry
2684 ; CHECK-NEXT: lis r3, 153
2685 ; CHECK-NEXT: lfd f0, -27108(r3)
2686 ; CHECK-NEXT: xscvdpsxws f0, f0
2687 ; CHECK-NEXT: mffprwz r3, f0
2688 ; CHECK-NEXT: extsw r3, r3
2691 %0 = load double, ptr inttoptr (i64 9999900 to ptr), align 8
2692 %conv = fptosi double %0 to i8
2696 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2697 define dso_local signext i8 @ld_cst_align64_int8_t_double() {
2698 ; CHECK-P10-LABEL: ld_cst_align64_int8_t_double:
2699 ; CHECK-P10: # %bb.0: # %entry
2700 ; CHECK-P10-NEXT: pli r3, 244140625
2701 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
2702 ; CHECK-P10-NEXT: lfd f0, 0(r3)
2703 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2704 ; CHECK-P10-NEXT: mffprwz r3, f0
2705 ; CHECK-P10-NEXT: extsw r3, r3
2706 ; CHECK-P10-NEXT: blr
2708 ; CHECK-PREP10-LABEL: ld_cst_align64_int8_t_double:
2709 ; CHECK-PREP10: # %bb.0: # %entry
2710 ; CHECK-PREP10-NEXT: lis r3, 3725
2711 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
2712 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
2713 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
2714 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2715 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2716 ; CHECK-PREP10-NEXT: extsw r3, r3
2717 ; CHECK-PREP10-NEXT: blr
2719 %0 = load double, ptr inttoptr (i64 1000000000000 to ptr), align 4096
2720 %conv = fptosi double %0 to i8
2724 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2725 define dso_local zeroext i8 @ld_0_uint8_t_uint8_t(i64 %ptr) {
2726 ; CHECK-LABEL: ld_0_uint8_t_uint8_t:
2727 ; CHECK: # %bb.0: # %entry
2728 ; CHECK-NEXT: lbz r3, 0(r3)
2731 %0 = inttoptr i64 %ptr to ptr
2732 %1 = load i8, ptr %0, align 1
2736 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2737 define dso_local zeroext i8 @ld_align16_uint8_t_uint8_t(ptr nocapture readonly %ptr) {
2738 ; CHECK-LABEL: ld_align16_uint8_t_uint8_t:
2739 ; CHECK: # %bb.0: # %entry
2740 ; CHECK-NEXT: lbz r3, 8(r3)
2743 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
2744 %0 = load i8, ptr %add.ptr, align 1
2748 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2749 define dso_local zeroext i8 @ld_align32_uint8_t_uint8_t(ptr nocapture readonly %ptr) {
2750 ; CHECK-P10-LABEL: ld_align32_uint8_t_uint8_t:
2751 ; CHECK-P10: # %bb.0: # %entry
2752 ; CHECK-P10-NEXT: plbz r3, 99999000(r3), 0
2753 ; CHECK-P10-NEXT: blr
2755 ; CHECK-PREP10-LABEL: ld_align32_uint8_t_uint8_t:
2756 ; CHECK-PREP10: # %bb.0: # %entry
2757 ; CHECK-PREP10-NEXT: lis r4, 1525
2758 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
2759 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
2760 ; CHECK-PREP10-NEXT: blr
2762 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
2763 %0 = load i8, ptr %add.ptr, align 1
2767 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2768 define dso_local zeroext i8 @ld_unalign64_uint8_t_uint8_t(ptr nocapture readonly %ptr) {
2769 ; CHECK-P10-LABEL: ld_unalign64_uint8_t_uint8_t:
2770 ; CHECK-P10: # %bb.0: # %entry
2771 ; CHECK-P10-NEXT: pli r4, 232
2772 ; CHECK-P10-NEXT: pli r5, 3567587329
2773 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2774 ; CHECK-P10-NEXT: lbzx r3, r3, r5
2775 ; CHECK-P10-NEXT: blr
2777 ; CHECK-PREP10-LABEL: ld_unalign64_uint8_t_uint8_t:
2778 ; CHECK-PREP10: # %bb.0: # %entry
2779 ; CHECK-PREP10-NEXT: li r4, 29
2780 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2781 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2782 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2783 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
2784 ; CHECK-PREP10-NEXT: blr
2786 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000001
2787 %0 = load i8, ptr %add.ptr, align 1
2791 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2792 define dso_local zeroext i8 @ld_align64_uint8_t_uint8_t(ptr nocapture readonly %ptr) {
2793 ; CHECK-P10-LABEL: ld_align64_uint8_t_uint8_t:
2794 ; CHECK-P10: # %bb.0: # %entry
2795 ; CHECK-P10-NEXT: pli r4, 244140625
2796 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2797 ; CHECK-P10-NEXT: lbzx r3, r3, r4
2798 ; CHECK-P10-NEXT: blr
2800 ; CHECK-PREP10-LABEL: ld_align64_uint8_t_uint8_t:
2801 ; CHECK-PREP10: # %bb.0: # %entry
2802 ; CHECK-PREP10-NEXT: lis r4, 3725
2803 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2804 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2805 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
2806 ; CHECK-PREP10-NEXT: blr
2808 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
2809 %0 = load i8, ptr %add.ptr, align 1
2813 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2814 define dso_local zeroext i8 @ld_reg_uint8_t_uint8_t(ptr nocapture readonly %ptr, i64 %off) {
2815 ; CHECK-LABEL: ld_reg_uint8_t_uint8_t:
2816 ; CHECK: # %bb.0: # %entry
2817 ; CHECK-NEXT: lbzx r3, r3, r4
2820 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
2821 %0 = load i8, ptr %add.ptr, align 1
2825 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2826 define dso_local zeroext i8 @ld_or_uint8_t_uint8_t(i64 %ptr, i8 zeroext %off) {
2827 ; CHECK-LABEL: ld_or_uint8_t_uint8_t:
2828 ; CHECK: # %bb.0: # %entry
2829 ; CHECK-NEXT: or r3, r4, r3
2830 ; CHECK-NEXT: lbz r3, 0(r3)
2833 %conv = zext i8 %off to i64
2834 %or = or i64 %conv, %ptr
2835 %0 = inttoptr i64 %or to ptr
2836 %1 = load i8, ptr %0, align 1
2840 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2841 define dso_local zeroext i8 @ld_not_disjoint16_uint8_t_uint8_t(i64 %ptr) {
2842 ; CHECK-LABEL: ld_not_disjoint16_uint8_t_uint8_t:
2843 ; CHECK: # %bb.0: # %entry
2844 ; CHECK-NEXT: ori r3, r3, 6
2845 ; CHECK-NEXT: lbz r3, 0(r3)
2848 %or = or i64 %ptr, 6
2849 %0 = inttoptr i64 %or to ptr
2850 %1 = load i8, ptr %0, align 1
2854 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2855 define dso_local zeroext i8 @ld_disjoint_align16_uint8_t_uint8_t(i64 %ptr) {
2856 ; CHECK-LABEL: ld_disjoint_align16_uint8_t_uint8_t:
2857 ; CHECK: # %bb.0: # %entry
2858 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2859 ; CHECK-NEXT: lbz r3, 24(r3)
2862 %and = and i64 %ptr, -4096
2863 %or = or i64 %and, 24
2864 %0 = inttoptr i64 %or to ptr
2865 %1 = load i8, ptr %0, align 8
2869 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2870 define dso_local zeroext i8 @ld_not_disjoint32_uint8_t_uint8_t(i64 %ptr) {
2871 ; CHECK-LABEL: ld_not_disjoint32_uint8_t_uint8_t:
2872 ; CHECK: # %bb.0: # %entry
2873 ; CHECK-NEXT: ori r3, r3, 34463
2874 ; CHECK-NEXT: oris r3, r3, 1
2875 ; CHECK-NEXT: lbz r3, 0(r3)
2878 %or = or i64 %ptr, 99999
2879 %0 = inttoptr i64 %or to ptr
2880 %1 = load i8, ptr %0, align 1
2884 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2885 define dso_local zeroext i8 @ld_disjoint_align32_uint8_t_uint8_t(i64 %ptr) {
2886 ; CHECK-P10-LABEL: ld_disjoint_align32_uint8_t_uint8_t:
2887 ; CHECK-P10: # %bb.0: # %entry
2888 ; CHECK-P10-NEXT: lis r4, -15264
2889 ; CHECK-P10-NEXT: and r3, r3, r4
2890 ; CHECK-P10-NEXT: plbz r3, 999990000(r3), 0
2891 ; CHECK-P10-NEXT: blr
2893 ; CHECK-PREP10-LABEL: ld_disjoint_align32_uint8_t_uint8_t:
2894 ; CHECK-PREP10: # %bb.0: # %entry
2895 ; CHECK-PREP10-NEXT: lis r4, -15264
2896 ; CHECK-PREP10-NEXT: and r3, r3, r4
2897 ; CHECK-PREP10-NEXT: lis r4, 15258
2898 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
2899 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
2900 ; CHECK-PREP10-NEXT: blr
2902 %and = and i64 %ptr, -1000341504
2903 %or = or i64 %and, 999990000
2904 %0 = inttoptr i64 %or to ptr
2905 %1 = load i8, ptr %0, align 16
2909 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2910 define dso_local zeroext i8 @ld_not_disjoint64_uint8_t_uint8_t(i64 %ptr) {
2911 ; CHECK-P10-LABEL: ld_not_disjoint64_uint8_t_uint8_t:
2912 ; CHECK-P10: # %bb.0: # %entry
2913 ; CHECK-P10-NEXT: pli r4, 232
2914 ; CHECK-P10-NEXT: pli r5, 3567587329
2915 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2916 ; CHECK-P10-NEXT: or r3, r3, r5
2917 ; CHECK-P10-NEXT: lbz r3, 0(r3)
2918 ; CHECK-P10-NEXT: blr
2920 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint8_t_uint8_t:
2921 ; CHECK-PREP10: # %bb.0: # %entry
2922 ; CHECK-PREP10-NEXT: li r4, 29
2923 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2924 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2925 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2926 ; CHECK-PREP10-NEXT: or r3, r3, r4
2927 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
2928 ; CHECK-PREP10-NEXT: blr
2930 %or = or i64 %ptr, 1000000000001
2931 %0 = inttoptr i64 %or to ptr
2932 %1 = load i8, ptr %0, align 1
2936 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2937 define dso_local zeroext i8 @ld_disjoint_unalign64_uint8_t_uint8_t(i64 %ptr) {
2938 ; CHECK-P10-LABEL: ld_disjoint_unalign64_uint8_t_uint8_t:
2939 ; CHECK-P10: # %bb.0: # %entry
2940 ; CHECK-P10-NEXT: pli r4, 232
2941 ; CHECK-P10-NEXT: pli r5, 3567587329
2942 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
2943 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2944 ; CHECK-P10-NEXT: lbzx r3, r3, r5
2945 ; CHECK-P10-NEXT: blr
2947 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint8_t_uint8_t:
2948 ; CHECK-PREP10: # %bb.0: # %entry
2949 ; CHECK-PREP10-NEXT: li r4, 29
2950 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
2951 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2952 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2953 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2954 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
2955 ; CHECK-PREP10-NEXT: blr
2957 %and = and i64 %ptr, -1099511627776
2958 %or = or i64 %and, 1000000000001
2959 %0 = inttoptr i64 %or to ptr
2960 %1 = load i8, ptr %0, align 1
2964 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2965 define dso_local zeroext i8 @ld_disjoint_align64_uint8_t_uint8_t(i64 %ptr) {
2966 ; CHECK-P10-LABEL: ld_disjoint_align64_uint8_t_uint8_t:
2967 ; CHECK-P10: # %bb.0: # %entry
2968 ; CHECK-P10-NEXT: pli r4, 244140625
2969 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
2970 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2971 ; CHECK-P10-NEXT: lbzx r3, r3, r4
2972 ; CHECK-P10-NEXT: blr
2974 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint8_t_uint8_t:
2975 ; CHECK-PREP10: # %bb.0: # %entry
2976 ; CHECK-PREP10-NEXT: lis r4, 3725
2977 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
2978 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2979 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2980 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
2981 ; CHECK-PREP10-NEXT: blr
2983 %and = and i64 %ptr, -1099511627776
2984 %or = or i64 %and, 1000000000000
2985 %0 = inttoptr i64 %or to ptr
2986 %1 = load i8, ptr %0, align 4096
2990 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2991 define dso_local zeroext i8 @ld_cst_align16_uint8_t_uint8_t() {
2992 ; CHECK-LABEL: ld_cst_align16_uint8_t_uint8_t:
2993 ; CHECK: # %bb.0: # %entry
2994 ; CHECK-NEXT: lbz r3, 4080(0)
2997 %0 = load i8, ptr inttoptr (i64 4080 to ptr), align 16
3001 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3002 define dso_local zeroext i8 @ld_cst_align32_uint8_t_uint8_t() {
3003 ; CHECK-LABEL: ld_cst_align32_uint8_t_uint8_t:
3004 ; CHECK: # %bb.0: # %entry
3005 ; CHECK-NEXT: lis r3, 153
3006 ; CHECK-NEXT: lbz r3, -27108(r3)
3009 %0 = load i8, ptr inttoptr (i64 9999900 to ptr), align 4
3013 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3014 define dso_local zeroext i8 @ld_cst_unalign64_uint8_t_uint8_t() {
3015 ; CHECK-P10-LABEL: ld_cst_unalign64_uint8_t_uint8_t:
3016 ; CHECK-P10: # %bb.0: # %entry
3017 ; CHECK-P10-NEXT: pli r3, 232
3018 ; CHECK-P10-NEXT: pli r4, 3567587329
3019 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
3020 ; CHECK-P10-NEXT: lbz r3, 0(r4)
3021 ; CHECK-P10-NEXT: blr
3023 ; CHECK-PREP10-LABEL: ld_cst_unalign64_uint8_t_uint8_t:
3024 ; CHECK-PREP10: # %bb.0: # %entry
3025 ; CHECK-PREP10-NEXT: li r3, 29
3026 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
3027 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
3028 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
3029 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
3030 ; CHECK-PREP10-NEXT: blr
3032 %0 = load i8, ptr inttoptr (i64 1000000000001 to ptr), align 1
3036 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3037 define dso_local zeroext i8 @ld_cst_align64_uint8_t_uint8_t() {
3038 ; CHECK-P10-LABEL: ld_cst_align64_uint8_t_uint8_t:
3039 ; CHECK-P10: # %bb.0: # %entry
3040 ; CHECK-P10-NEXT: pli r3, 244140625
3041 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
3042 ; CHECK-P10-NEXT: lbz r3, 0(r3)
3043 ; CHECK-P10-NEXT: blr
3045 ; CHECK-PREP10-LABEL: ld_cst_align64_uint8_t_uint8_t:
3046 ; CHECK-PREP10: # %bb.0: # %entry
3047 ; CHECK-PREP10-NEXT: lis r3, 3725
3048 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
3049 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
3050 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
3051 ; CHECK-PREP10-NEXT: blr
3053 %0 = load i8, ptr inttoptr (i64 1000000000000 to ptr), align 4096
3057 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3058 define dso_local zeroext i8 @ld_0_uint8_t_uint16_t(i64 %ptr) {
3059 ; CHECK-LE-LABEL: ld_0_uint8_t_uint16_t:
3060 ; CHECK-LE: # %bb.0: # %entry
3061 ; CHECK-LE-NEXT: lbz r3, 0(r3)
3062 ; CHECK-LE-NEXT: blr
3064 ; CHECK-BE-LABEL: ld_0_uint8_t_uint16_t:
3065 ; CHECK-BE: # %bb.0: # %entry
3066 ; CHECK-BE-NEXT: lbz r3, 1(r3)
3067 ; CHECK-BE-NEXT: blr
3069 %0 = inttoptr i64 %ptr to ptr
3070 %1 = load i16, ptr %0, align 2
3071 %conv = trunc i16 %1 to i8
3075 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3076 define dso_local zeroext i8 @ld_align16_uint8_t_uint16_t(ptr nocapture readonly %ptr) {
3077 ; CHECK-LE-LABEL: ld_align16_uint8_t_uint16_t:
3078 ; CHECK-LE: # %bb.0: # %entry
3079 ; CHECK-LE-NEXT: lbz r3, 8(r3)
3080 ; CHECK-LE-NEXT: blr
3082 ; CHECK-BE-LABEL: ld_align16_uint8_t_uint16_t:
3083 ; CHECK-BE: # %bb.0: # %entry
3084 ; CHECK-BE-NEXT: lbz r3, 9(r3)
3085 ; CHECK-BE-NEXT: blr
3087 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
3088 %0 = load i16, ptr %add.ptr, align 2
3089 %conv = trunc i16 %0 to i8
3093 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3094 define dso_local zeroext i8 @ld_align32_uint8_t_uint16_t(ptr nocapture readonly %ptr) {
3095 ; CHECK-P10-LE-LABEL: ld_align32_uint8_t_uint16_t:
3096 ; CHECK-P10-LE: # %bb.0: # %entry
3097 ; CHECK-P10-LE-NEXT: plbz r3, 99999000(r3), 0
3098 ; CHECK-P10-LE-NEXT: blr
3100 ; CHECK-P10-BE-LABEL: ld_align32_uint8_t_uint16_t:
3101 ; CHECK-P10-BE: # %bb.0: # %entry
3102 ; CHECK-P10-BE-NEXT: plbz r3, 99999001(r3), 0
3103 ; CHECK-P10-BE-NEXT: blr
3105 ; CHECK-P9-LE-LABEL: ld_align32_uint8_t_uint16_t:
3106 ; CHECK-P9-LE: # %bb.0: # %entry
3107 ; CHECK-P9-LE-NEXT: lis r4, 1525
3108 ; CHECK-P9-LE-NEXT: ori r4, r4, 56600
3109 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
3110 ; CHECK-P9-LE-NEXT: blr
3112 ; CHECK-P9-BE-LABEL: ld_align32_uint8_t_uint16_t:
3113 ; CHECK-P9-BE: # %bb.0: # %entry
3114 ; CHECK-P9-BE-NEXT: lis r4, 1525
3115 ; CHECK-P9-BE-NEXT: ori r4, r4, 56601
3116 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
3117 ; CHECK-P9-BE-NEXT: blr
3119 ; CHECK-P8-LE-LABEL: ld_align32_uint8_t_uint16_t:
3120 ; CHECK-P8-LE: # %bb.0: # %entry
3121 ; CHECK-P8-LE-NEXT: lis r4, 1525
3122 ; CHECK-P8-LE-NEXT: ori r4, r4, 56600
3123 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
3124 ; CHECK-P8-LE-NEXT: blr
3126 ; CHECK-P8-BE-LABEL: ld_align32_uint8_t_uint16_t:
3127 ; CHECK-P8-BE: # %bb.0: # %entry
3128 ; CHECK-P8-BE-NEXT: lis r4, 1525
3129 ; CHECK-P8-BE-NEXT: ori r4, r4, 56601
3130 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
3131 ; CHECK-P8-BE-NEXT: blr
3133 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
3134 %0 = load i16, ptr %add.ptr, align 2
3135 %conv = trunc i16 %0 to i8
3139 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3140 define dso_local zeroext i8 @ld_unalign64_uint8_t_uint16_t(ptr nocapture readonly %ptr) {
3141 ; CHECK-P10-LE-LABEL: ld_unalign64_uint8_t_uint16_t:
3142 ; CHECK-P10-LE: # %bb.0: # %entry
3143 ; CHECK-P10-LE-NEXT: pli r4, 232
3144 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
3145 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
3146 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r5
3147 ; CHECK-P10-LE-NEXT: blr
3149 ; CHECK-P10-BE-LABEL: ld_unalign64_uint8_t_uint16_t:
3150 ; CHECK-P10-BE: # %bb.0: # %entry
3151 ; CHECK-P10-BE-NEXT: pli r4, 232
3152 ; CHECK-P10-BE-NEXT: pli r5, 3567587330
3153 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
3154 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
3155 ; CHECK-P10-BE-NEXT: blr
3157 ; CHECK-P9-LE-LABEL: ld_unalign64_uint8_t_uint16_t:
3158 ; CHECK-P9-LE: # %bb.0: # %entry
3159 ; CHECK-P9-LE-NEXT: li r4, 29
3160 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
3161 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
3162 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
3163 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
3164 ; CHECK-P9-LE-NEXT: blr
3166 ; CHECK-P9-BE-LABEL: ld_unalign64_uint8_t_uint16_t:
3167 ; CHECK-P9-BE: # %bb.0: # %entry
3168 ; CHECK-P9-BE-NEXT: li r4, 29
3169 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
3170 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
3171 ; CHECK-P9-BE-NEXT: ori r4, r4, 4098
3172 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
3173 ; CHECK-P9-BE-NEXT: blr
3175 ; CHECK-P8-LE-LABEL: ld_unalign64_uint8_t_uint16_t:
3176 ; CHECK-P8-LE: # %bb.0: # %entry
3177 ; CHECK-P8-LE-NEXT: li r4, 29
3178 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
3179 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
3180 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
3181 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
3182 ; CHECK-P8-LE-NEXT: blr
3184 ; CHECK-P8-BE-LABEL: ld_unalign64_uint8_t_uint16_t:
3185 ; CHECK-P8-BE: # %bb.0: # %entry
3186 ; CHECK-P8-BE-NEXT: li r4, 29
3187 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
3188 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
3189 ; CHECK-P8-BE-NEXT: ori r4, r4, 4098
3190 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
3191 ; CHECK-P8-BE-NEXT: blr
3193 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000001
3194 %0 = load i16, ptr %add.ptr, align 2
3195 %conv = trunc i16 %0 to i8
3199 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3200 define dso_local zeroext i8 @ld_align64_uint8_t_uint16_t(ptr nocapture readonly %ptr) {
3201 ; CHECK-P10-LE-LABEL: ld_align64_uint8_t_uint16_t:
3202 ; CHECK-P10-LE: # %bb.0: # %entry
3203 ; CHECK-P10-LE-NEXT: pli r4, 244140625
3204 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
3205 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
3206 ; CHECK-P10-LE-NEXT: blr
3208 ; CHECK-P10-BE-LABEL: ld_align64_uint8_t_uint16_t:
3209 ; CHECK-P10-BE: # %bb.0: # %entry
3210 ; CHECK-P10-BE-NEXT: pli r4, 232
3211 ; CHECK-P10-BE-NEXT: pli r5, 3567587329
3212 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
3213 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
3214 ; CHECK-P10-BE-NEXT: blr
3216 ; CHECK-P9-LE-LABEL: ld_align64_uint8_t_uint16_t:
3217 ; CHECK-P9-LE: # %bb.0: # %entry
3218 ; CHECK-P9-LE-NEXT: lis r4, 3725
3219 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
3220 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
3221 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
3222 ; CHECK-P9-LE-NEXT: blr
3224 ; CHECK-P9-BE-LABEL: ld_align64_uint8_t_uint16_t:
3225 ; CHECK-P9-BE: # %bb.0: # %entry
3226 ; CHECK-P9-BE-NEXT: li r4, 29
3227 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
3228 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
3229 ; CHECK-P9-BE-NEXT: ori r4, r4, 4097
3230 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
3231 ; CHECK-P9-BE-NEXT: blr
3233 ; CHECK-P8-LE-LABEL: ld_align64_uint8_t_uint16_t:
3234 ; CHECK-P8-LE: # %bb.0: # %entry
3235 ; CHECK-P8-LE-NEXT: lis r4, 3725
3236 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
3237 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
3238 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
3239 ; CHECK-P8-LE-NEXT: blr
3241 ; CHECK-P8-BE-LABEL: ld_align64_uint8_t_uint16_t:
3242 ; CHECK-P8-BE: # %bb.0: # %entry
3243 ; CHECK-P8-BE-NEXT: li r4, 29
3244 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
3245 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
3246 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
3247 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
3248 ; CHECK-P8-BE-NEXT: blr
3250 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
3251 %0 = load i16, ptr %add.ptr, align 2
3252 %conv = trunc i16 %0 to i8
3256 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3257 define dso_local zeroext i8 @ld_reg_uint8_t_uint16_t(ptr nocapture readonly %ptr, i64 %off) {
3258 ; CHECK-LE-LABEL: ld_reg_uint8_t_uint16_t:
3259 ; CHECK-LE: # %bb.0: # %entry
3260 ; CHECK-LE-NEXT: lbzx r3, r3, r4
3261 ; CHECK-LE-NEXT: blr
3263 ; CHECK-BE-LABEL: ld_reg_uint8_t_uint16_t:
3264 ; CHECK-BE: # %bb.0: # %entry
3265 ; CHECK-BE-NEXT: add r3, r3, r4
3266 ; CHECK-BE-NEXT: lbz r3, 1(r3)
3267 ; CHECK-BE-NEXT: blr
3269 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
3270 %0 = load i16, ptr %add.ptr, align 2
3271 %conv = trunc i16 %0 to i8
3275 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3276 define dso_local zeroext i8 @ld_or_uint8_t_uint16_t(i64 %ptr, i8 zeroext %off) {
3277 ; CHECK-LE-LABEL: ld_or_uint8_t_uint16_t:
3278 ; CHECK-LE: # %bb.0: # %entry
3279 ; CHECK-LE-NEXT: or r3, r4, r3
3280 ; CHECK-LE-NEXT: lbz r3, 0(r3)
3281 ; CHECK-LE-NEXT: blr
3283 ; CHECK-BE-LABEL: ld_or_uint8_t_uint16_t:
3284 ; CHECK-BE: # %bb.0: # %entry
3285 ; CHECK-BE-NEXT: or r3, r4, r3
3286 ; CHECK-BE-NEXT: lbz r3, 1(r3)
3287 ; CHECK-BE-NEXT: blr
3289 %conv = zext i8 %off to i64
3290 %or = or i64 %conv, %ptr
3291 %0 = inttoptr i64 %or to ptr
3292 %1 = load i16, ptr %0, align 2
3293 %conv1 = trunc i16 %1 to i8
3297 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3298 define dso_local zeroext i8 @ld_not_disjoint16_uint8_t_uint16_t(i64 %ptr) {
3299 ; CHECK-LE-LABEL: ld_not_disjoint16_uint8_t_uint16_t:
3300 ; CHECK-LE: # %bb.0: # %entry
3301 ; CHECK-LE-NEXT: ori r3, r3, 6
3302 ; CHECK-LE-NEXT: lbz r3, 0(r3)
3303 ; CHECK-LE-NEXT: blr
3305 ; CHECK-BE-LABEL: ld_not_disjoint16_uint8_t_uint16_t:
3306 ; CHECK-BE: # %bb.0: # %entry
3307 ; CHECK-BE-NEXT: ori r3, r3, 6
3308 ; CHECK-BE-NEXT: lbz r3, 1(r3)
3309 ; CHECK-BE-NEXT: blr
3311 %or = or i64 %ptr, 6
3312 %0 = inttoptr i64 %or to ptr
3313 %1 = load i16, ptr %0, align 2
3314 %conv = trunc i16 %1 to i8
3318 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3319 define dso_local zeroext i8 @ld_disjoint_align16_uint8_t_uint16_t(i64 %ptr) {
3320 ; CHECK-LE-LABEL: ld_disjoint_align16_uint8_t_uint16_t:
3321 ; CHECK-LE: # %bb.0: # %entry
3322 ; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
3323 ; CHECK-LE-NEXT: lbz r3, 24(r3)
3324 ; CHECK-LE-NEXT: blr
3326 ; CHECK-BE-LABEL: ld_disjoint_align16_uint8_t_uint16_t:
3327 ; CHECK-BE: # %bb.0: # %entry
3328 ; CHECK-BE-NEXT: rldicr r3, r3, 0, 51
3329 ; CHECK-BE-NEXT: lbz r3, 25(r3)
3330 ; CHECK-BE-NEXT: blr
3332 %and = and i64 %ptr, -4096
3333 %or = or i64 %and, 24
3334 %0 = inttoptr i64 %or to ptr
3335 %1 = load i16, ptr %0, align 8
3336 %conv = trunc i16 %1 to i8
3340 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3341 define dso_local zeroext i8 @ld_not_disjoint32_uint8_t_uint16_t(i64 %ptr) {
3342 ; CHECK-LE-LABEL: ld_not_disjoint32_uint8_t_uint16_t:
3343 ; CHECK-LE: # %bb.0: # %entry
3344 ; CHECK-LE-NEXT: ori r3, r3, 34463
3345 ; CHECK-LE-NEXT: oris r3, r3, 1
3346 ; CHECK-LE-NEXT: lbz r3, 0(r3)
3347 ; CHECK-LE-NEXT: blr
3349 ; CHECK-BE-LABEL: ld_not_disjoint32_uint8_t_uint16_t:
3350 ; CHECK-BE: # %bb.0: # %entry
3351 ; CHECK-BE-NEXT: ori r3, r3, 34463
3352 ; CHECK-BE-NEXT: oris r3, r3, 1
3353 ; CHECK-BE-NEXT: lbz r3, 1(r3)
3354 ; CHECK-BE-NEXT: blr
3356 %or = or i64 %ptr, 99999
3357 %0 = inttoptr i64 %or to ptr
3358 %1 = load i16, ptr %0, align 2
3359 %conv = trunc i16 %1 to i8
3363 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3364 define dso_local zeroext i8 @ld_disjoint_align32_uint8_t_uint16_t(i64 %ptr) {
3365 ; CHECK-P10-LE-LABEL: ld_disjoint_align32_uint8_t_uint16_t:
3366 ; CHECK-P10-LE: # %bb.0: # %entry
3367 ; CHECK-P10-LE-NEXT: lis r4, -15264
3368 ; CHECK-P10-LE-NEXT: and r3, r3, r4
3369 ; CHECK-P10-LE-NEXT: plbz r3, 999990000(r3), 0
3370 ; CHECK-P10-LE-NEXT: blr
3372 ; CHECK-P10-BE-LABEL: ld_disjoint_align32_uint8_t_uint16_t:
3373 ; CHECK-P10-BE: # %bb.0: # %entry
3374 ; CHECK-P10-BE-NEXT: lis r4, -15264
3375 ; CHECK-P10-BE-NEXT: and r3, r3, r4
3376 ; CHECK-P10-BE-NEXT: plbz r3, 999990001(r3), 0
3377 ; CHECK-P10-BE-NEXT: blr
3379 ; CHECK-P9-LE-LABEL: ld_disjoint_align32_uint8_t_uint16_t:
3380 ; CHECK-P9-LE: # %bb.0: # %entry
3381 ; CHECK-P9-LE-NEXT: lis r4, -15264
3382 ; CHECK-P9-LE-NEXT: and r3, r3, r4
3383 ; CHECK-P9-LE-NEXT: lis r4, 15258
3384 ; CHECK-P9-LE-NEXT: ori r4, r4, 41712
3385 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
3386 ; CHECK-P9-LE-NEXT: blr
3388 ; CHECK-P9-BE-LABEL: ld_disjoint_align32_uint8_t_uint16_t:
3389 ; CHECK-P9-BE: # %bb.0: # %entry
3390 ; CHECK-P9-BE-NEXT: lis r4, -15264
3391 ; CHECK-P9-BE-NEXT: and r3, r3, r4
3392 ; CHECK-P9-BE-NEXT: lis r4, 15258
3393 ; CHECK-P9-BE-NEXT: ori r4, r4, 41713
3394 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
3395 ; CHECK-P9-BE-NEXT: blr
3397 ; CHECK-P8-LE-LABEL: ld_disjoint_align32_uint8_t_uint16_t:
3398 ; CHECK-P8-LE: # %bb.0: # %entry
3399 ; CHECK-P8-LE-NEXT: lis r4, -15264
3400 ; CHECK-P8-LE-NEXT: and r3, r3, r4
3401 ; CHECK-P8-LE-NEXT: lis r4, 15258
3402 ; CHECK-P8-LE-NEXT: ori r4, r4, 41712
3403 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
3404 ; CHECK-P8-LE-NEXT: blr
3406 ; CHECK-P8-BE-LABEL: ld_disjoint_align32_uint8_t_uint16_t:
3407 ; CHECK-P8-BE: # %bb.0: # %entry
3408 ; CHECK-P8-BE-NEXT: lis r4, -15264
3409 ; CHECK-P8-BE-NEXT: and r3, r3, r4
3410 ; CHECK-P8-BE-NEXT: lis r4, 15258
3411 ; CHECK-P8-BE-NEXT: ori r4, r4, 41713
3412 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
3413 ; CHECK-P8-BE-NEXT: blr
3415 %and = and i64 %ptr, -1000341504
3416 %or = or i64 %and, 999990000
3417 %0 = inttoptr i64 %or to ptr
3418 %1 = load i16, ptr %0, align 16
3419 %conv = trunc i16 %1 to i8
3423 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3424 define dso_local zeroext i8 @ld_not_disjoint64_uint8_t_uint16_t(i64 %ptr) {
3425 ; CHECK-P10-LE-LABEL: ld_not_disjoint64_uint8_t_uint16_t:
3426 ; CHECK-P10-LE: # %bb.0: # %entry
3427 ; CHECK-P10-LE-NEXT: pli r4, 232
3428 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
3429 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
3430 ; CHECK-P10-LE-NEXT: or r3, r3, r5
3431 ; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
3432 ; CHECK-P10-LE-NEXT: blr
3434 ; CHECK-P10-BE-LABEL: ld_not_disjoint64_uint8_t_uint16_t:
3435 ; CHECK-P10-BE: # %bb.0: # %entry
3436 ; CHECK-P10-BE-NEXT: pli r4, 232
3437 ; CHECK-P10-BE-NEXT: pli r5, 3567587329
3438 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
3439 ; CHECK-P10-BE-NEXT: or r3, r3, r5
3440 ; CHECK-P10-BE-NEXT: lbz r3, 1(r3)
3441 ; CHECK-P10-BE-NEXT: blr
3443 ; CHECK-P9-LE-LABEL: ld_not_disjoint64_uint8_t_uint16_t:
3444 ; CHECK-P9-LE: # %bb.0: # %entry
3445 ; CHECK-P9-LE-NEXT: li r4, 29
3446 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
3447 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
3448 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
3449 ; CHECK-P9-LE-NEXT: or r3, r3, r4
3450 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
3451 ; CHECK-P9-LE-NEXT: blr
3453 ; CHECK-P9-BE-LABEL: ld_not_disjoint64_uint8_t_uint16_t:
3454 ; CHECK-P9-BE: # %bb.0: # %entry
3455 ; CHECK-P9-BE-NEXT: li r4, 29
3456 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
3457 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
3458 ; CHECK-P9-BE-NEXT: ori r4, r4, 4097
3459 ; CHECK-P9-BE-NEXT: or r3, r3, r4
3460 ; CHECK-P9-BE-NEXT: lbz r3, 1(r3)
3461 ; CHECK-P9-BE-NEXT: blr
3463 ; CHECK-P8-LE-LABEL: ld_not_disjoint64_uint8_t_uint16_t:
3464 ; CHECK-P8-LE: # %bb.0: # %entry
3465 ; CHECK-P8-LE-NEXT: li r4, 29
3466 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
3467 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
3468 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
3469 ; CHECK-P8-LE-NEXT: or r3, r3, r4
3470 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
3471 ; CHECK-P8-LE-NEXT: blr
3473 ; CHECK-P8-BE-LABEL: ld_not_disjoint64_uint8_t_uint16_t:
3474 ; CHECK-P8-BE: # %bb.0: # %entry
3475 ; CHECK-P8-BE-NEXT: li r4, 29
3476 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
3477 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
3478 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
3479 ; CHECK-P8-BE-NEXT: or r3, r3, r4
3480 ; CHECK-P8-BE-NEXT: lbz r3, 1(r3)
3481 ; CHECK-P8-BE-NEXT: blr
3483 %or = or i64 %ptr, 1000000000001
3484 %0 = inttoptr i64 %or to ptr
3485 %1 = load i16, ptr %0, align 2
3486 %conv = trunc i16 %1 to i8
3490 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3491 define dso_local zeroext i8 @ld_disjoint_unalign64_uint8_t_uint16_t(i64 %ptr) {
3492 ; CHECK-P10-LE-LABEL: ld_disjoint_unalign64_uint8_t_uint16_t:
3493 ; CHECK-P10-LE: # %bb.0: # %entry
3494 ; CHECK-P10-LE-NEXT: pli r4, 232
3495 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
3496 ; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
3497 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
3498 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r5
3499 ; CHECK-P10-LE-NEXT: blr
3501 ; CHECK-P10-BE-LABEL: ld_disjoint_unalign64_uint8_t_uint16_t:
3502 ; CHECK-P10-BE: # %bb.0: # %entry
3503 ; CHECK-P10-BE-NEXT: pli r4, 232
3504 ; CHECK-P10-BE-NEXT: pli r5, 3567587330
3505 ; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
3506 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
3507 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
3508 ; CHECK-P10-BE-NEXT: blr
3510 ; CHECK-P9-LE-LABEL: ld_disjoint_unalign64_uint8_t_uint16_t:
3511 ; CHECK-P9-LE: # %bb.0: # %entry
3512 ; CHECK-P9-LE-NEXT: li r4, 29
3513 ; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
3514 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
3515 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
3516 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
3517 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
3518 ; CHECK-P9-LE-NEXT: blr
3520 ; CHECK-P9-BE-LABEL: ld_disjoint_unalign64_uint8_t_uint16_t:
3521 ; CHECK-P9-BE: # %bb.0: # %entry
3522 ; CHECK-P9-BE-NEXT: li r4, 29
3523 ; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
3524 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
3525 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
3526 ; CHECK-P9-BE-NEXT: ori r4, r4, 4098
3527 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
3528 ; CHECK-P9-BE-NEXT: blr
3530 ; CHECK-P8-LE-LABEL: ld_disjoint_unalign64_uint8_t_uint16_t:
3531 ; CHECK-P8-LE: # %bb.0: # %entry
3532 ; CHECK-P8-LE-NEXT: li r4, 29
3533 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
3534 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
3535 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
3536 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
3537 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
3538 ; CHECK-P8-LE-NEXT: blr
3540 ; CHECK-P8-BE-LABEL: ld_disjoint_unalign64_uint8_t_uint16_t:
3541 ; CHECK-P8-BE: # %bb.0: # %entry
3542 ; CHECK-P8-BE-NEXT: li r4, 29
3543 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
3544 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
3545 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
3546 ; CHECK-P8-BE-NEXT: ori r4, r4, 4098
3547 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
3548 ; CHECK-P8-BE-NEXT: blr
3550 %and = and i64 %ptr, -1099511627776
3551 %or = or i64 %and, 1000000000001
3552 %0 = inttoptr i64 %or to ptr
3553 %1 = load i16, ptr %0, align 2
3554 %conv = trunc i16 %1 to i8
3558 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3559 define dso_local zeroext i8 @ld_disjoint_align64_uint8_t_uint16_t(i64 %ptr) {
3560 ; CHECK-P10-LE-LABEL: ld_disjoint_align64_uint8_t_uint16_t:
3561 ; CHECK-P10-LE: # %bb.0: # %entry
3562 ; CHECK-P10-LE-NEXT: pli r4, 244140625
3563 ; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
3564 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
3565 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
3566 ; CHECK-P10-LE-NEXT: blr
3568 ; CHECK-P10-BE-LABEL: ld_disjoint_align64_uint8_t_uint16_t:
3569 ; CHECK-P10-BE: # %bb.0: # %entry
3570 ; CHECK-P10-BE-NEXT: pli r4, 232
3571 ; CHECK-P10-BE-NEXT: pli r5, 3567587329
3572 ; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
3573 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
3574 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
3575 ; CHECK-P10-BE-NEXT: blr
3577 ; CHECK-P9-LE-LABEL: ld_disjoint_align64_uint8_t_uint16_t:
3578 ; CHECK-P9-LE: # %bb.0: # %entry
3579 ; CHECK-P9-LE-NEXT: lis r4, 3725
3580 ; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
3581 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
3582 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
3583 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
3584 ; CHECK-P9-LE-NEXT: blr
3586 ; CHECK-P9-BE-LABEL: ld_disjoint_align64_uint8_t_uint16_t:
3587 ; CHECK-P9-BE: # %bb.0: # %entry
3588 ; CHECK-P9-BE-NEXT: li r4, 29
3589 ; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
3590 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
3591 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
3592 ; CHECK-P9-BE-NEXT: ori r4, r4, 4097
3593 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
3594 ; CHECK-P9-BE-NEXT: blr
3596 ; CHECK-P8-LE-LABEL: ld_disjoint_align64_uint8_t_uint16_t:
3597 ; CHECK-P8-LE: # %bb.0: # %entry
3598 ; CHECK-P8-LE-NEXT: lis r4, 3725
3599 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
3600 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
3601 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
3602 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
3603 ; CHECK-P8-LE-NEXT: blr
3605 ; CHECK-P8-BE-LABEL: ld_disjoint_align64_uint8_t_uint16_t:
3606 ; CHECK-P8-BE: # %bb.0: # %entry
3607 ; CHECK-P8-BE-NEXT: li r4, 29
3608 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
3609 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
3610 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
3611 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
3612 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
3613 ; CHECK-P8-BE-NEXT: blr
3615 %and = and i64 %ptr, -1099511627776
3616 %or = or i64 %and, 1000000000000
3617 %0 = inttoptr i64 %or to ptr
3618 %1 = load i16, ptr %0, align 4096
3619 %conv = trunc i16 %1 to i8
3623 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3624 define dso_local zeroext i8 @ld_cst_align16_uint8_t_uint16_t() {
3625 ; CHECK-LE-LABEL: ld_cst_align16_uint8_t_uint16_t:
3626 ; CHECK-LE: # %bb.0: # %entry
3627 ; CHECK-LE-NEXT: lbz r3, 4080(0)
3628 ; CHECK-LE-NEXT: blr
3630 ; CHECK-BE-LABEL: ld_cst_align16_uint8_t_uint16_t:
3631 ; CHECK-BE: # %bb.0: # %entry
3632 ; CHECK-BE-NEXT: lbz r3, 4081(0)
3633 ; CHECK-BE-NEXT: blr
3635 %0 = load i16, ptr inttoptr (i64 4080 to ptr), align 16
3636 %conv = trunc i16 %0 to i8
3640 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3641 define dso_local zeroext i8 @ld_cst_align32_uint8_t_uint16_t() {
3642 ; CHECK-LE-LABEL: ld_cst_align32_uint8_t_uint16_t:
3643 ; CHECK-LE: # %bb.0: # %entry
3644 ; CHECK-LE-NEXT: lis r3, 153
3645 ; CHECK-LE-NEXT: lbz r3, -27108(r3)
3646 ; CHECK-LE-NEXT: blr
3648 ; CHECK-BE-LABEL: ld_cst_align32_uint8_t_uint16_t:
3649 ; CHECK-BE: # %bb.0: # %entry
3650 ; CHECK-BE-NEXT: lis r3, 153
3651 ; CHECK-BE-NEXT: lbz r3, -27107(r3)
3652 ; CHECK-BE-NEXT: blr
3654 %0 = load i16, ptr inttoptr (i64 9999900 to ptr), align 4
3655 %conv = trunc i16 %0 to i8
3659 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3660 define dso_local zeroext i8 @ld_cst_unalign64_uint8_t_uint16_t() {
3661 ; CHECK-P10-LE-LABEL: ld_cst_unalign64_uint8_t_uint16_t:
3662 ; CHECK-P10-LE: # %bb.0: # %entry
3663 ; CHECK-P10-LE-NEXT: pli r3, 232
3664 ; CHECK-P10-LE-NEXT: pli r4, 3567587329
3665 ; CHECK-P10-LE-NEXT: rldimi r4, r3, 32, 0
3666 ; CHECK-P10-LE-NEXT: lbz r3, 0(r4)
3667 ; CHECK-P10-LE-NEXT: blr
3669 ; CHECK-P10-BE-LABEL: ld_cst_unalign64_uint8_t_uint16_t:
3670 ; CHECK-P10-BE: # %bb.0: # %entry
3671 ; CHECK-P10-BE-NEXT: pli r3, 232
3672 ; CHECK-P10-BE-NEXT: pli r4, 3567587330
3673 ; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
3674 ; CHECK-P10-BE-NEXT: lbz r3, 0(r4)
3675 ; CHECK-P10-BE-NEXT: blr
3677 ; CHECK-P9-LE-LABEL: ld_cst_unalign64_uint8_t_uint16_t:
3678 ; CHECK-P9-LE: # %bb.0: # %entry
3679 ; CHECK-P9-LE-NEXT: li r3, 29
3680 ; CHECK-P9-LE-NEXT: rldic r3, r3, 35, 24
3681 ; CHECK-P9-LE-NEXT: oris r3, r3, 54437
3682 ; CHECK-P9-LE-NEXT: ori r3, r3, 4097
3683 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
3684 ; CHECK-P9-LE-NEXT: blr
3686 ; CHECK-P9-BE-LABEL: ld_cst_unalign64_uint8_t_uint16_t:
3687 ; CHECK-P9-BE: # %bb.0: # %entry
3688 ; CHECK-P9-BE-NEXT: li r3, 29
3689 ; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
3690 ; CHECK-P9-BE-NEXT: oris r3, r3, 54437
3691 ; CHECK-P9-BE-NEXT: ori r3, r3, 4098
3692 ; CHECK-P9-BE-NEXT: lbz r3, 0(r3)
3693 ; CHECK-P9-BE-NEXT: blr
3695 ; CHECK-P8-LE-LABEL: ld_cst_unalign64_uint8_t_uint16_t:
3696 ; CHECK-P8-LE: # %bb.0: # %entry
3697 ; CHECK-P8-LE-NEXT: li r3, 29
3698 ; CHECK-P8-LE-NEXT: rldic r3, r3, 35, 24
3699 ; CHECK-P8-LE-NEXT: oris r3, r3, 54437
3700 ; CHECK-P8-LE-NEXT: ori r3, r3, 4097
3701 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
3702 ; CHECK-P8-LE-NEXT: blr
3704 ; CHECK-P8-BE-LABEL: ld_cst_unalign64_uint8_t_uint16_t:
3705 ; CHECK-P8-BE: # %bb.0: # %entry
3706 ; CHECK-P8-BE-NEXT: li r3, 29
3707 ; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
3708 ; CHECK-P8-BE-NEXT: oris r3, r3, 54437
3709 ; CHECK-P8-BE-NEXT: ori r3, r3, 4098
3710 ; CHECK-P8-BE-NEXT: lbz r3, 0(r3)
3711 ; CHECK-P8-BE-NEXT: blr
3713 %0 = load i16, ptr inttoptr (i64 1000000000001 to ptr), align 2
3714 %conv = trunc i16 %0 to i8
3718 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3719 define dso_local zeroext i8 @ld_cst_align64_uint8_t_uint16_t() {
3720 ; CHECK-P10-LE-LABEL: ld_cst_align64_uint8_t_uint16_t:
3721 ; CHECK-P10-LE: # %bb.0: # %entry
3722 ; CHECK-P10-LE-NEXT: pli r3, 244140625
3723 ; CHECK-P10-LE-NEXT: rldic r3, r3, 12, 24
3724 ; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
3725 ; CHECK-P10-LE-NEXT: blr
3727 ; CHECK-P10-BE-LABEL: ld_cst_align64_uint8_t_uint16_t:
3728 ; CHECK-P10-BE: # %bb.0: # %entry
3729 ; CHECK-P10-BE-NEXT: pli r3, 232
3730 ; CHECK-P10-BE-NEXT: pli r4, 3567587329
3731 ; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
3732 ; CHECK-P10-BE-NEXT: lbz r3, 0(r4)
3733 ; CHECK-P10-BE-NEXT: blr
3735 ; CHECK-P9-LE-LABEL: ld_cst_align64_uint8_t_uint16_t:
3736 ; CHECK-P9-LE: # %bb.0: # %entry
3737 ; CHECK-P9-LE-NEXT: lis r3, 3725
3738 ; CHECK-P9-LE-NEXT: ori r3, r3, 19025
3739 ; CHECK-P9-LE-NEXT: rldic r3, r3, 12, 24
3740 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
3741 ; CHECK-P9-LE-NEXT: blr
3743 ; CHECK-P9-BE-LABEL: ld_cst_align64_uint8_t_uint16_t:
3744 ; CHECK-P9-BE: # %bb.0: # %entry
3745 ; CHECK-P9-BE-NEXT: li r3, 29
3746 ; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
3747 ; CHECK-P9-BE-NEXT: oris r3, r3, 54437
3748 ; CHECK-P9-BE-NEXT: ori r3, r3, 4097
3749 ; CHECK-P9-BE-NEXT: lbz r3, 0(r3)
3750 ; CHECK-P9-BE-NEXT: blr
3752 ; CHECK-P8-LE-LABEL: ld_cst_align64_uint8_t_uint16_t:
3753 ; CHECK-P8-LE: # %bb.0: # %entry
3754 ; CHECK-P8-LE-NEXT: lis r3, 3725
3755 ; CHECK-P8-LE-NEXT: ori r3, r3, 19025
3756 ; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
3757 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
3758 ; CHECK-P8-LE-NEXT: blr
3760 ; CHECK-P8-BE-LABEL: ld_cst_align64_uint8_t_uint16_t:
3761 ; CHECK-P8-BE: # %bb.0: # %entry
3762 ; CHECK-P8-BE-NEXT: li r3, 29
3763 ; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
3764 ; CHECK-P8-BE-NEXT: oris r3, r3, 54437
3765 ; CHECK-P8-BE-NEXT: ori r3, r3, 4097
3766 ; CHECK-P8-BE-NEXT: lbz r3, 0(r3)
3767 ; CHECK-P8-BE-NEXT: blr
3769 %0 = load i16, ptr inttoptr (i64 1000000000000 to ptr), align 4096
3770 %conv = trunc i16 %0 to i8
3774 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3775 define dso_local zeroext i8 @ld_0_uint8_t_uint32_t(i64 %ptr) {
3776 ; CHECK-LE-LABEL: ld_0_uint8_t_uint32_t:
3777 ; CHECK-LE: # %bb.0: # %entry
3778 ; CHECK-LE-NEXT: lbz r3, 0(r3)
3779 ; CHECK-LE-NEXT: blr
3781 ; CHECK-BE-LABEL: ld_0_uint8_t_uint32_t:
3782 ; CHECK-BE: # %bb.0: # %entry
3783 ; CHECK-BE-NEXT: lbz r3, 3(r3)
3784 ; CHECK-BE-NEXT: blr
3786 %0 = inttoptr i64 %ptr to ptr
3787 %1 = load i32, ptr %0, align 4
3788 %conv = trunc i32 %1 to i8
3792 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3793 define dso_local zeroext i8 @ld_align16_uint8_t_uint32_t(ptr nocapture readonly %ptr) {
3794 ; CHECK-LE-LABEL: ld_align16_uint8_t_uint32_t:
3795 ; CHECK-LE: # %bb.0: # %entry
3796 ; CHECK-LE-NEXT: lbz r3, 8(r3)
3797 ; CHECK-LE-NEXT: blr
3799 ; CHECK-BE-LABEL: ld_align16_uint8_t_uint32_t:
3800 ; CHECK-BE: # %bb.0: # %entry
3801 ; CHECK-BE-NEXT: lbz r3, 11(r3)
3802 ; CHECK-BE-NEXT: blr
3804 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
3805 %0 = load i32, ptr %add.ptr, align 4
3806 %conv = trunc i32 %0 to i8
3810 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3811 define dso_local zeroext i8 @ld_align32_uint8_t_uint32_t(ptr nocapture readonly %ptr) {
3812 ; CHECK-P10-LE-LABEL: ld_align32_uint8_t_uint32_t:
3813 ; CHECK-P10-LE: # %bb.0: # %entry
3814 ; CHECK-P10-LE-NEXT: plbz r3, 99999000(r3), 0
3815 ; CHECK-P10-LE-NEXT: blr
3817 ; CHECK-P10-BE-LABEL: ld_align32_uint8_t_uint32_t:
3818 ; CHECK-P10-BE: # %bb.0: # %entry
3819 ; CHECK-P10-BE-NEXT: plbz r3, 99999003(r3), 0
3820 ; CHECK-P10-BE-NEXT: blr
3822 ; CHECK-P9-LE-LABEL: ld_align32_uint8_t_uint32_t:
3823 ; CHECK-P9-LE: # %bb.0: # %entry
3824 ; CHECK-P9-LE-NEXT: lis r4, 1525
3825 ; CHECK-P9-LE-NEXT: ori r4, r4, 56600
3826 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
3827 ; CHECK-P9-LE-NEXT: blr
3829 ; CHECK-P9-BE-LABEL: ld_align32_uint8_t_uint32_t:
3830 ; CHECK-P9-BE: # %bb.0: # %entry
3831 ; CHECK-P9-BE-NEXT: lis r4, 1525
3832 ; CHECK-P9-BE-NEXT: ori r4, r4, 56603
3833 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
3834 ; CHECK-P9-BE-NEXT: blr
3836 ; CHECK-P8-LE-LABEL: ld_align32_uint8_t_uint32_t:
3837 ; CHECK-P8-LE: # %bb.0: # %entry
3838 ; CHECK-P8-LE-NEXT: lis r4, 1525
3839 ; CHECK-P8-LE-NEXT: ori r4, r4, 56600
3840 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
3841 ; CHECK-P8-LE-NEXT: blr
3843 ; CHECK-P8-BE-LABEL: ld_align32_uint8_t_uint32_t:
3844 ; CHECK-P8-BE: # %bb.0: # %entry
3845 ; CHECK-P8-BE-NEXT: lis r4, 1525
3846 ; CHECK-P8-BE-NEXT: ori r4, r4, 56603
3847 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
3848 ; CHECK-P8-BE-NEXT: blr
3850 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
3851 %0 = load i32, ptr %add.ptr, align 4
3852 %conv = trunc i32 %0 to i8
3856 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3857 define dso_local zeroext i8 @ld_unalign64_uint8_t_uint32_t(ptr nocapture readonly %ptr) {
3858 ; CHECK-P10-LE-LABEL: ld_unalign64_uint8_t_uint32_t:
3859 ; CHECK-P10-LE: # %bb.0: # %entry
3860 ; CHECK-P10-LE-NEXT: pli r4, 232
3861 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
3862 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
3863 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r5
3864 ; CHECK-P10-LE-NEXT: blr
3866 ; CHECK-P10-BE-LABEL: ld_unalign64_uint8_t_uint32_t:
3867 ; CHECK-P10-BE: # %bb.0: # %entry
3868 ; CHECK-P10-BE-NEXT: pli r4, 232
3869 ; CHECK-P10-BE-NEXT: pli r5, 3567587332
3870 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
3871 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
3872 ; CHECK-P10-BE-NEXT: blr
3874 ; CHECK-P9-LE-LABEL: ld_unalign64_uint8_t_uint32_t:
3875 ; CHECK-P9-LE: # %bb.0: # %entry
3876 ; CHECK-P9-LE-NEXT: li r4, 29
3877 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
3878 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
3879 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
3880 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
3881 ; CHECK-P9-LE-NEXT: blr
3883 ; CHECK-P9-BE-LABEL: ld_unalign64_uint8_t_uint32_t:
3884 ; CHECK-P9-BE: # %bb.0: # %entry
3885 ; CHECK-P9-BE-NEXT: li r4, 29
3886 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
3887 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
3888 ; CHECK-P9-BE-NEXT: ori r4, r4, 4100
3889 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
3890 ; CHECK-P9-BE-NEXT: blr
3892 ; CHECK-P8-LE-LABEL: ld_unalign64_uint8_t_uint32_t:
3893 ; CHECK-P8-LE: # %bb.0: # %entry
3894 ; CHECK-P8-LE-NEXT: li r4, 29
3895 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
3896 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
3897 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
3898 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
3899 ; CHECK-P8-LE-NEXT: blr
3901 ; CHECK-P8-BE-LABEL: ld_unalign64_uint8_t_uint32_t:
3902 ; CHECK-P8-BE: # %bb.0: # %entry
3903 ; CHECK-P8-BE-NEXT: li r4, 29
3904 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
3905 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
3906 ; CHECK-P8-BE-NEXT: ori r4, r4, 4100
3907 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
3908 ; CHECK-P8-BE-NEXT: blr
3910 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000001
3911 %0 = load i32, ptr %add.ptr, align 4
3912 %conv = trunc i32 %0 to i8
3916 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3917 define dso_local zeroext i8 @ld_align64_uint8_t_uint32_t(ptr nocapture readonly %ptr) {
3918 ; CHECK-P10-LE-LABEL: ld_align64_uint8_t_uint32_t:
3919 ; CHECK-P10-LE: # %bb.0: # %entry
3920 ; CHECK-P10-LE-NEXT: pli r4, 244140625
3921 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
3922 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
3923 ; CHECK-P10-LE-NEXT: blr
3925 ; CHECK-P10-BE-LABEL: ld_align64_uint8_t_uint32_t:
3926 ; CHECK-P10-BE: # %bb.0: # %entry
3927 ; CHECK-P10-BE-NEXT: pli r4, 232
3928 ; CHECK-P10-BE-NEXT: pli r5, 3567587331
3929 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
3930 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
3931 ; CHECK-P10-BE-NEXT: blr
3933 ; CHECK-P9-LE-LABEL: ld_align64_uint8_t_uint32_t:
3934 ; CHECK-P9-LE: # %bb.0: # %entry
3935 ; CHECK-P9-LE-NEXT: lis r4, 3725
3936 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
3937 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
3938 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
3939 ; CHECK-P9-LE-NEXT: blr
3941 ; CHECK-P9-BE-LABEL: ld_align64_uint8_t_uint32_t:
3942 ; CHECK-P9-BE: # %bb.0: # %entry
3943 ; CHECK-P9-BE-NEXT: li r4, 29
3944 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
3945 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
3946 ; CHECK-P9-BE-NEXT: ori r4, r4, 4099
3947 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
3948 ; CHECK-P9-BE-NEXT: blr
3950 ; CHECK-P8-LE-LABEL: ld_align64_uint8_t_uint32_t:
3951 ; CHECK-P8-LE: # %bb.0: # %entry
3952 ; CHECK-P8-LE-NEXT: lis r4, 3725
3953 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
3954 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
3955 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
3956 ; CHECK-P8-LE-NEXT: blr
3958 ; CHECK-P8-BE-LABEL: ld_align64_uint8_t_uint32_t:
3959 ; CHECK-P8-BE: # %bb.0: # %entry
3960 ; CHECK-P8-BE-NEXT: li r4, 29
3961 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
3962 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
3963 ; CHECK-P8-BE-NEXT: ori r4, r4, 4099
3964 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
3965 ; CHECK-P8-BE-NEXT: blr
3967 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
3968 %0 = load i32, ptr %add.ptr, align 4
3969 %conv = trunc i32 %0 to i8
3973 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3974 define dso_local zeroext i8 @ld_reg_uint8_t_uint32_t(ptr nocapture readonly %ptr, i64 %off) {
3975 ; CHECK-LE-LABEL: ld_reg_uint8_t_uint32_t:
3976 ; CHECK-LE: # %bb.0: # %entry
3977 ; CHECK-LE-NEXT: lbzx r3, r3, r4
3978 ; CHECK-LE-NEXT: blr
3980 ; CHECK-BE-LABEL: ld_reg_uint8_t_uint32_t:
3981 ; CHECK-BE: # %bb.0: # %entry
3982 ; CHECK-BE-NEXT: add r3, r3, r4
3983 ; CHECK-BE-NEXT: lbz r3, 3(r3)
3984 ; CHECK-BE-NEXT: blr
3986 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
3987 %0 = load i32, ptr %add.ptr, align 4
3988 %conv = trunc i32 %0 to i8
3992 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3993 define dso_local zeroext i8 @ld_or_uint8_t_uint32_t(i64 %ptr, i8 zeroext %off) {
3994 ; CHECK-LE-LABEL: ld_or_uint8_t_uint32_t:
3995 ; CHECK-LE: # %bb.0: # %entry
3996 ; CHECK-LE-NEXT: or r3, r4, r3
3997 ; CHECK-LE-NEXT: lbz r3, 0(r3)
3998 ; CHECK-LE-NEXT: blr
4000 ; CHECK-BE-LABEL: ld_or_uint8_t_uint32_t:
4001 ; CHECK-BE: # %bb.0: # %entry
4002 ; CHECK-BE-NEXT: or r3, r4, r3
4003 ; CHECK-BE-NEXT: lbz r3, 3(r3)
4004 ; CHECK-BE-NEXT: blr
4006 %conv = zext i8 %off to i64
4007 %or = or i64 %conv, %ptr
4008 %0 = inttoptr i64 %or to ptr
4009 %1 = load i32, ptr %0, align 4
4010 %conv1 = trunc i32 %1 to i8
4014 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4015 define dso_local zeroext i8 @ld_not_disjoint16_uint8_t_uint32_t(i64 %ptr) {
4016 ; CHECK-LE-LABEL: ld_not_disjoint16_uint8_t_uint32_t:
4017 ; CHECK-LE: # %bb.0: # %entry
4018 ; CHECK-LE-NEXT: ori r3, r3, 6
4019 ; CHECK-LE-NEXT: lbz r3, 0(r3)
4020 ; CHECK-LE-NEXT: blr
4022 ; CHECK-BE-LABEL: ld_not_disjoint16_uint8_t_uint32_t:
4023 ; CHECK-BE: # %bb.0: # %entry
4024 ; CHECK-BE-NEXT: ori r3, r3, 6
4025 ; CHECK-BE-NEXT: lbz r3, 3(r3)
4026 ; CHECK-BE-NEXT: blr
4028 %or = or i64 %ptr, 6
4029 %0 = inttoptr i64 %or to ptr
4030 %1 = load i32, ptr %0, align 4
4031 %conv = trunc i32 %1 to i8
4035 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4036 define dso_local zeroext i8 @ld_disjoint_align16_uint8_t_uint32_t(i64 %ptr) {
4037 ; CHECK-LE-LABEL: ld_disjoint_align16_uint8_t_uint32_t:
4038 ; CHECK-LE: # %bb.0: # %entry
4039 ; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
4040 ; CHECK-LE-NEXT: lbz r3, 24(r3)
4041 ; CHECK-LE-NEXT: blr
4043 ; CHECK-BE-LABEL: ld_disjoint_align16_uint8_t_uint32_t:
4044 ; CHECK-BE: # %bb.0: # %entry
4045 ; CHECK-BE-NEXT: rldicr r3, r3, 0, 51
4046 ; CHECK-BE-NEXT: lbz r3, 27(r3)
4047 ; CHECK-BE-NEXT: blr
4049 %and = and i64 %ptr, -4096
4050 %or = or i64 %and, 24
4051 %0 = inttoptr i64 %or to ptr
4052 %1 = load i32, ptr %0, align 8
4053 %conv = trunc i32 %1 to i8
4057 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4058 define dso_local zeroext i8 @ld_not_disjoint32_uint8_t_uint32_t(i64 %ptr) {
4059 ; CHECK-LE-LABEL: ld_not_disjoint32_uint8_t_uint32_t:
4060 ; CHECK-LE: # %bb.0: # %entry
4061 ; CHECK-LE-NEXT: ori r3, r3, 34463
4062 ; CHECK-LE-NEXT: oris r3, r3, 1
4063 ; CHECK-LE-NEXT: lbz r3, 0(r3)
4064 ; CHECK-LE-NEXT: blr
4066 ; CHECK-BE-LABEL: ld_not_disjoint32_uint8_t_uint32_t:
4067 ; CHECK-BE: # %bb.0: # %entry
4068 ; CHECK-BE-NEXT: ori r3, r3, 34463
4069 ; CHECK-BE-NEXT: oris r3, r3, 1
4070 ; CHECK-BE-NEXT: lbz r3, 3(r3)
4071 ; CHECK-BE-NEXT: blr
4073 %or = or i64 %ptr, 99999
4074 %0 = inttoptr i64 %or to ptr
4075 %1 = load i32, ptr %0, align 4
4076 %conv = trunc i32 %1 to i8
4080 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4081 define dso_local zeroext i8 @ld_disjoint_align32_uint8_t_uint32_t(i64 %ptr) {
4082 ; CHECK-P10-LE-LABEL: ld_disjoint_align32_uint8_t_uint32_t:
4083 ; CHECK-P10-LE: # %bb.0: # %entry
4084 ; CHECK-P10-LE-NEXT: lis r4, -15264
4085 ; CHECK-P10-LE-NEXT: and r3, r3, r4
4086 ; CHECK-P10-LE-NEXT: plbz r3, 999990000(r3), 0
4087 ; CHECK-P10-LE-NEXT: blr
4089 ; CHECK-P10-BE-LABEL: ld_disjoint_align32_uint8_t_uint32_t:
4090 ; CHECK-P10-BE: # %bb.0: # %entry
4091 ; CHECK-P10-BE-NEXT: lis r4, -15264
4092 ; CHECK-P10-BE-NEXT: and r3, r3, r4
4093 ; CHECK-P10-BE-NEXT: plbz r3, 999990003(r3), 0
4094 ; CHECK-P10-BE-NEXT: blr
4096 ; CHECK-P9-LE-LABEL: ld_disjoint_align32_uint8_t_uint32_t:
4097 ; CHECK-P9-LE: # %bb.0: # %entry
4098 ; CHECK-P9-LE-NEXT: lis r4, -15264
4099 ; CHECK-P9-LE-NEXT: and r3, r3, r4
4100 ; CHECK-P9-LE-NEXT: lis r4, 15258
4101 ; CHECK-P9-LE-NEXT: ori r4, r4, 41712
4102 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
4103 ; CHECK-P9-LE-NEXT: blr
4105 ; CHECK-P9-BE-LABEL: ld_disjoint_align32_uint8_t_uint32_t:
4106 ; CHECK-P9-BE: # %bb.0: # %entry
4107 ; CHECK-P9-BE-NEXT: lis r4, -15264
4108 ; CHECK-P9-BE-NEXT: and r3, r3, r4
4109 ; CHECK-P9-BE-NEXT: lis r4, 15258
4110 ; CHECK-P9-BE-NEXT: ori r4, r4, 41715
4111 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
4112 ; CHECK-P9-BE-NEXT: blr
4114 ; CHECK-P8-LE-LABEL: ld_disjoint_align32_uint8_t_uint32_t:
4115 ; CHECK-P8-LE: # %bb.0: # %entry
4116 ; CHECK-P8-LE-NEXT: lis r4, -15264
4117 ; CHECK-P8-LE-NEXT: and r3, r3, r4
4118 ; CHECK-P8-LE-NEXT: lis r4, 15258
4119 ; CHECK-P8-LE-NEXT: ori r4, r4, 41712
4120 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
4121 ; CHECK-P8-LE-NEXT: blr
4123 ; CHECK-P8-BE-LABEL: ld_disjoint_align32_uint8_t_uint32_t:
4124 ; CHECK-P8-BE: # %bb.0: # %entry
4125 ; CHECK-P8-BE-NEXT: lis r4, -15264
4126 ; CHECK-P8-BE-NEXT: and r3, r3, r4
4127 ; CHECK-P8-BE-NEXT: lis r4, 15258
4128 ; CHECK-P8-BE-NEXT: ori r4, r4, 41715
4129 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
4130 ; CHECK-P8-BE-NEXT: blr
4132 %and = and i64 %ptr, -1000341504
4133 %or = or i64 %and, 999990000
4134 %0 = inttoptr i64 %or to ptr
4135 %1 = load i32, ptr %0, align 16
4136 %conv = trunc i32 %1 to i8
4140 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4141 define dso_local zeroext i8 @ld_not_disjoint64_uint8_t_uint32_t(i64 %ptr) {
4142 ; CHECK-P10-LE-LABEL: ld_not_disjoint64_uint8_t_uint32_t:
4143 ; CHECK-P10-LE: # %bb.0: # %entry
4144 ; CHECK-P10-LE-NEXT: pli r4, 232
4145 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
4146 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
4147 ; CHECK-P10-LE-NEXT: or r3, r3, r5
4148 ; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
4149 ; CHECK-P10-LE-NEXT: blr
4151 ; CHECK-P10-BE-LABEL: ld_not_disjoint64_uint8_t_uint32_t:
4152 ; CHECK-P10-BE: # %bb.0: # %entry
4153 ; CHECK-P10-BE-NEXT: pli r4, 232
4154 ; CHECK-P10-BE-NEXT: pli r5, 3567587329
4155 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
4156 ; CHECK-P10-BE-NEXT: or r3, r3, r5
4157 ; CHECK-P10-BE-NEXT: lbz r3, 3(r3)
4158 ; CHECK-P10-BE-NEXT: blr
4160 ; CHECK-P9-LE-LABEL: ld_not_disjoint64_uint8_t_uint32_t:
4161 ; CHECK-P9-LE: # %bb.0: # %entry
4162 ; CHECK-P9-LE-NEXT: li r4, 29
4163 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
4164 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
4165 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
4166 ; CHECK-P9-LE-NEXT: or r3, r3, r4
4167 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
4168 ; CHECK-P9-LE-NEXT: blr
4170 ; CHECK-P9-BE-LABEL: ld_not_disjoint64_uint8_t_uint32_t:
4171 ; CHECK-P9-BE: # %bb.0: # %entry
4172 ; CHECK-P9-BE-NEXT: li r4, 29
4173 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
4174 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
4175 ; CHECK-P9-BE-NEXT: ori r4, r4, 4097
4176 ; CHECK-P9-BE-NEXT: or r3, r3, r4
4177 ; CHECK-P9-BE-NEXT: lbz r3, 3(r3)
4178 ; CHECK-P9-BE-NEXT: blr
4180 ; CHECK-P8-LE-LABEL: ld_not_disjoint64_uint8_t_uint32_t:
4181 ; CHECK-P8-LE: # %bb.0: # %entry
4182 ; CHECK-P8-LE-NEXT: li r4, 29
4183 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
4184 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
4185 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
4186 ; CHECK-P8-LE-NEXT: or r3, r3, r4
4187 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
4188 ; CHECK-P8-LE-NEXT: blr
4190 ; CHECK-P8-BE-LABEL: ld_not_disjoint64_uint8_t_uint32_t:
4191 ; CHECK-P8-BE: # %bb.0: # %entry
4192 ; CHECK-P8-BE-NEXT: li r4, 29
4193 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
4194 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
4195 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
4196 ; CHECK-P8-BE-NEXT: or r3, r3, r4
4197 ; CHECK-P8-BE-NEXT: lbz r3, 3(r3)
4198 ; CHECK-P8-BE-NEXT: blr
4200 %or = or i64 %ptr, 1000000000001
4201 %0 = inttoptr i64 %or to ptr
4202 %1 = load i32, ptr %0, align 4
4203 %conv = trunc i32 %1 to i8
4207 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4208 define dso_local zeroext i8 @ld_disjoint_unalign64_uint8_t_uint32_t(i64 %ptr) {
4209 ; CHECK-P10-LE-LABEL: ld_disjoint_unalign64_uint8_t_uint32_t:
4210 ; CHECK-P10-LE: # %bb.0: # %entry
4211 ; CHECK-P10-LE-NEXT: pli r4, 232
4212 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
4213 ; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
4214 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
4215 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r5
4216 ; CHECK-P10-LE-NEXT: blr
4218 ; CHECK-P10-BE-LABEL: ld_disjoint_unalign64_uint8_t_uint32_t:
4219 ; CHECK-P10-BE: # %bb.0: # %entry
4220 ; CHECK-P10-BE-NEXT: pli r4, 232
4221 ; CHECK-P10-BE-NEXT: pli r5, 3567587332
4222 ; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
4223 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
4224 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
4225 ; CHECK-P10-BE-NEXT: blr
4227 ; CHECK-P9-LE-LABEL: ld_disjoint_unalign64_uint8_t_uint32_t:
4228 ; CHECK-P9-LE: # %bb.0: # %entry
4229 ; CHECK-P9-LE-NEXT: li r4, 29
4230 ; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
4231 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
4232 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
4233 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
4234 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
4235 ; CHECK-P9-LE-NEXT: blr
4237 ; CHECK-P9-BE-LABEL: ld_disjoint_unalign64_uint8_t_uint32_t:
4238 ; CHECK-P9-BE: # %bb.0: # %entry
4239 ; CHECK-P9-BE-NEXT: li r4, 29
4240 ; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
4241 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
4242 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
4243 ; CHECK-P9-BE-NEXT: ori r4, r4, 4100
4244 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
4245 ; CHECK-P9-BE-NEXT: blr
4247 ; CHECK-P8-LE-LABEL: ld_disjoint_unalign64_uint8_t_uint32_t:
4248 ; CHECK-P8-LE: # %bb.0: # %entry
4249 ; CHECK-P8-LE-NEXT: li r4, 29
4250 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
4251 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
4252 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
4253 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
4254 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
4255 ; CHECK-P8-LE-NEXT: blr
4257 ; CHECK-P8-BE-LABEL: ld_disjoint_unalign64_uint8_t_uint32_t:
4258 ; CHECK-P8-BE: # %bb.0: # %entry
4259 ; CHECK-P8-BE-NEXT: li r4, 29
4260 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
4261 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
4262 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
4263 ; CHECK-P8-BE-NEXT: ori r4, r4, 4100
4264 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
4265 ; CHECK-P8-BE-NEXT: blr
4267 %and = and i64 %ptr, -1099511627776
4268 %or = or i64 %and, 1000000000001
4269 %0 = inttoptr i64 %or to ptr
4270 %1 = load i32, ptr %0, align 4
4271 %conv = trunc i32 %1 to i8
4275 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4276 define dso_local zeroext i8 @ld_disjoint_align64_uint8_t_uint32_t(i64 %ptr) {
4277 ; CHECK-P10-LE-LABEL: ld_disjoint_align64_uint8_t_uint32_t:
4278 ; CHECK-P10-LE: # %bb.0: # %entry
4279 ; CHECK-P10-LE-NEXT: pli r4, 244140625
4280 ; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
4281 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
4282 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
4283 ; CHECK-P10-LE-NEXT: blr
4285 ; CHECK-P10-BE-LABEL: ld_disjoint_align64_uint8_t_uint32_t:
4286 ; CHECK-P10-BE: # %bb.0: # %entry
4287 ; CHECK-P10-BE-NEXT: pli r4, 232
4288 ; CHECK-P10-BE-NEXT: pli r5, 3567587331
4289 ; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
4290 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
4291 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
4292 ; CHECK-P10-BE-NEXT: blr
4294 ; CHECK-P9-LE-LABEL: ld_disjoint_align64_uint8_t_uint32_t:
4295 ; CHECK-P9-LE: # %bb.0: # %entry
4296 ; CHECK-P9-LE-NEXT: lis r4, 3725
4297 ; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
4298 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
4299 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
4300 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
4301 ; CHECK-P9-LE-NEXT: blr
4303 ; CHECK-P9-BE-LABEL: ld_disjoint_align64_uint8_t_uint32_t:
4304 ; CHECK-P9-BE: # %bb.0: # %entry
4305 ; CHECK-P9-BE-NEXT: li r4, 29
4306 ; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
4307 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
4308 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
4309 ; CHECK-P9-BE-NEXT: ori r4, r4, 4099
4310 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
4311 ; CHECK-P9-BE-NEXT: blr
4313 ; CHECK-P8-LE-LABEL: ld_disjoint_align64_uint8_t_uint32_t:
4314 ; CHECK-P8-LE: # %bb.0: # %entry
4315 ; CHECK-P8-LE-NEXT: lis r4, 3725
4316 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
4317 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
4318 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
4319 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
4320 ; CHECK-P8-LE-NEXT: blr
4322 ; CHECK-P8-BE-LABEL: ld_disjoint_align64_uint8_t_uint32_t:
4323 ; CHECK-P8-BE: # %bb.0: # %entry
4324 ; CHECK-P8-BE-NEXT: li r4, 29
4325 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
4326 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
4327 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
4328 ; CHECK-P8-BE-NEXT: ori r4, r4, 4099
4329 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
4330 ; CHECK-P8-BE-NEXT: blr
4332 %and = and i64 %ptr, -1099511627776
4333 %or = or i64 %and, 1000000000000
4334 %0 = inttoptr i64 %or to ptr
4335 %1 = load i32, ptr %0, align 4096
4336 %conv = trunc i32 %1 to i8
4340 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4341 define dso_local zeroext i8 @ld_cst_align16_uint8_t_uint32_t() {
4342 ; CHECK-LE-LABEL: ld_cst_align16_uint8_t_uint32_t:
4343 ; CHECK-LE: # %bb.0: # %entry
4344 ; CHECK-LE-NEXT: lbz r3, 4080(0)
4345 ; CHECK-LE-NEXT: blr
4347 ; CHECK-BE-LABEL: ld_cst_align16_uint8_t_uint32_t:
4348 ; CHECK-BE: # %bb.0: # %entry
4349 ; CHECK-BE-NEXT: lbz r3, 4083(0)
4350 ; CHECK-BE-NEXT: blr
4352 %0 = load i32, ptr inttoptr (i64 4080 to ptr), align 16
4353 %conv = trunc i32 %0 to i8
4357 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4358 define dso_local zeroext i8 @ld_cst_align32_uint8_t_uint32_t() {
4359 ; CHECK-LE-LABEL: ld_cst_align32_uint8_t_uint32_t:
4360 ; CHECK-LE: # %bb.0: # %entry
4361 ; CHECK-LE-NEXT: lis r3, 153
4362 ; CHECK-LE-NEXT: lbz r3, -27108(r3)
4363 ; CHECK-LE-NEXT: blr
4365 ; CHECK-BE-LABEL: ld_cst_align32_uint8_t_uint32_t:
4366 ; CHECK-BE: # %bb.0: # %entry
4367 ; CHECK-BE-NEXT: lis r3, 153
4368 ; CHECK-BE-NEXT: lbz r3, -27105(r3)
4369 ; CHECK-BE-NEXT: blr
4371 %0 = load i32, ptr inttoptr (i64 9999900 to ptr), align 4
4372 %conv = trunc i32 %0 to i8
4376 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4377 define dso_local zeroext i8 @ld_cst_unalign64_uint8_t_uint32_t() {
4378 ; CHECK-P10-LE-LABEL: ld_cst_unalign64_uint8_t_uint32_t:
4379 ; CHECK-P10-LE: # %bb.0: # %entry
4380 ; CHECK-P10-LE-NEXT: pli r3, 232
4381 ; CHECK-P10-LE-NEXT: pli r4, 3567587329
4382 ; CHECK-P10-LE-NEXT: rldimi r4, r3, 32, 0
4383 ; CHECK-P10-LE-NEXT: lbz r3, 0(r4)
4384 ; CHECK-P10-LE-NEXT: blr
4386 ; CHECK-P10-BE-LABEL: ld_cst_unalign64_uint8_t_uint32_t:
4387 ; CHECK-P10-BE: # %bb.0: # %entry
4388 ; CHECK-P10-BE-NEXT: pli r3, 232
4389 ; CHECK-P10-BE-NEXT: pli r4, 3567587332
4390 ; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
4391 ; CHECK-P10-BE-NEXT: lbz r3, 0(r4)
4392 ; CHECK-P10-BE-NEXT: blr
4394 ; CHECK-P9-LE-LABEL: ld_cst_unalign64_uint8_t_uint32_t:
4395 ; CHECK-P9-LE: # %bb.0: # %entry
4396 ; CHECK-P9-LE-NEXT: li r3, 29
4397 ; CHECK-P9-LE-NEXT: rldic r3, r3, 35, 24
4398 ; CHECK-P9-LE-NEXT: oris r3, r3, 54437
4399 ; CHECK-P9-LE-NEXT: ori r3, r3, 4097
4400 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
4401 ; CHECK-P9-LE-NEXT: blr
4403 ; CHECK-P9-BE-LABEL: ld_cst_unalign64_uint8_t_uint32_t:
4404 ; CHECK-P9-BE: # %bb.0: # %entry
4405 ; CHECK-P9-BE-NEXT: li r3, 29
4406 ; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
4407 ; CHECK-P9-BE-NEXT: oris r3, r3, 54437
4408 ; CHECK-P9-BE-NEXT: ori r3, r3, 4100
4409 ; CHECK-P9-BE-NEXT: lbz r3, 0(r3)
4410 ; CHECK-P9-BE-NEXT: blr
4412 ; CHECK-P8-LE-LABEL: ld_cst_unalign64_uint8_t_uint32_t:
4413 ; CHECK-P8-LE: # %bb.0: # %entry
4414 ; CHECK-P8-LE-NEXT: li r3, 29
4415 ; CHECK-P8-LE-NEXT: rldic r3, r3, 35, 24
4416 ; CHECK-P8-LE-NEXT: oris r3, r3, 54437
4417 ; CHECK-P8-LE-NEXT: ori r3, r3, 4097
4418 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
4419 ; CHECK-P8-LE-NEXT: blr
4421 ; CHECK-P8-BE-LABEL: ld_cst_unalign64_uint8_t_uint32_t:
4422 ; CHECK-P8-BE: # %bb.0: # %entry
4423 ; CHECK-P8-BE-NEXT: li r3, 29
4424 ; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
4425 ; CHECK-P8-BE-NEXT: oris r3, r3, 54437
4426 ; CHECK-P8-BE-NEXT: ori r3, r3, 4100
4427 ; CHECK-P8-BE-NEXT: lbz r3, 0(r3)
4428 ; CHECK-P8-BE-NEXT: blr
4430 %0 = load i32, ptr inttoptr (i64 1000000000001 to ptr), align 4
4431 %conv = trunc i32 %0 to i8
4435 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4436 define dso_local zeroext i8 @ld_cst_align64_uint8_t_uint32_t() {
4437 ; CHECK-P10-LE-LABEL: ld_cst_align64_uint8_t_uint32_t:
4438 ; CHECK-P10-LE: # %bb.0: # %entry
4439 ; CHECK-P10-LE-NEXT: pli r3, 244140625
4440 ; CHECK-P10-LE-NEXT: rldic r3, r3, 12, 24
4441 ; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
4442 ; CHECK-P10-LE-NEXT: blr
4444 ; CHECK-P10-BE-LABEL: ld_cst_align64_uint8_t_uint32_t:
4445 ; CHECK-P10-BE: # %bb.0: # %entry
4446 ; CHECK-P10-BE-NEXT: pli r3, 232
4447 ; CHECK-P10-BE-NEXT: pli r4, 3567587331
4448 ; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
4449 ; CHECK-P10-BE-NEXT: lbz r3, 0(r4)
4450 ; CHECK-P10-BE-NEXT: blr
4452 ; CHECK-P9-LE-LABEL: ld_cst_align64_uint8_t_uint32_t:
4453 ; CHECK-P9-LE: # %bb.0: # %entry
4454 ; CHECK-P9-LE-NEXT: lis r3, 3725
4455 ; CHECK-P9-LE-NEXT: ori r3, r3, 19025
4456 ; CHECK-P9-LE-NEXT: rldic r3, r3, 12, 24
4457 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
4458 ; CHECK-P9-LE-NEXT: blr
4460 ; CHECK-P9-BE-LABEL: ld_cst_align64_uint8_t_uint32_t:
4461 ; CHECK-P9-BE: # %bb.0: # %entry
4462 ; CHECK-P9-BE-NEXT: li r3, 29
4463 ; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
4464 ; CHECK-P9-BE-NEXT: oris r3, r3, 54437
4465 ; CHECK-P9-BE-NEXT: ori r3, r3, 4099
4466 ; CHECK-P9-BE-NEXT: lbz r3, 0(r3)
4467 ; CHECK-P9-BE-NEXT: blr
4469 ; CHECK-P8-LE-LABEL: ld_cst_align64_uint8_t_uint32_t:
4470 ; CHECK-P8-LE: # %bb.0: # %entry
4471 ; CHECK-P8-LE-NEXT: lis r3, 3725
4472 ; CHECK-P8-LE-NEXT: ori r3, r3, 19025
4473 ; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
4474 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
4475 ; CHECK-P8-LE-NEXT: blr
4477 ; CHECK-P8-BE-LABEL: ld_cst_align64_uint8_t_uint32_t:
4478 ; CHECK-P8-BE: # %bb.0: # %entry
4479 ; CHECK-P8-BE-NEXT: li r3, 29
4480 ; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
4481 ; CHECK-P8-BE-NEXT: oris r3, r3, 54437
4482 ; CHECK-P8-BE-NEXT: ori r3, r3, 4099
4483 ; CHECK-P8-BE-NEXT: lbz r3, 0(r3)
4484 ; CHECK-P8-BE-NEXT: blr
4486 %0 = load i32, ptr inttoptr (i64 1000000000000 to ptr), align 4096
4487 %conv = trunc i32 %0 to i8
4491 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4492 define dso_local zeroext i8 @ld_0_uint8_t_uint64_t(i64 %ptr) {
4493 ; CHECK-LE-LABEL: ld_0_uint8_t_uint64_t:
4494 ; CHECK-LE: # %bb.0: # %entry
4495 ; CHECK-LE-NEXT: lbz r3, 0(r3)
4496 ; CHECK-LE-NEXT: blr
4498 ; CHECK-BE-LABEL: ld_0_uint8_t_uint64_t:
4499 ; CHECK-BE: # %bb.0: # %entry
4500 ; CHECK-BE-NEXT: lbz r3, 7(r3)
4501 ; CHECK-BE-NEXT: blr
4503 %0 = inttoptr i64 %ptr to ptr
4504 %1 = load i64, ptr %0, align 8
4505 %conv = trunc i64 %1 to i8
4509 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4510 define dso_local zeroext i8 @ld_align16_uint8_t_uint64_t(ptr nocapture readonly %ptr) {
4511 ; CHECK-LE-LABEL: ld_align16_uint8_t_uint64_t:
4512 ; CHECK-LE: # %bb.0: # %entry
4513 ; CHECK-LE-NEXT: lbz r3, 8(r3)
4514 ; CHECK-LE-NEXT: blr
4516 ; CHECK-BE-LABEL: ld_align16_uint8_t_uint64_t:
4517 ; CHECK-BE: # %bb.0: # %entry
4518 ; CHECK-BE-NEXT: lbz r3, 15(r3)
4519 ; CHECK-BE-NEXT: blr
4521 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
4522 %0 = load i64, ptr %add.ptr, align 8
4523 %conv = trunc i64 %0 to i8
4527 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4528 define dso_local zeroext i8 @ld_align32_uint8_t_uint64_t(ptr nocapture readonly %ptr) {
4529 ; CHECK-P10-LE-LABEL: ld_align32_uint8_t_uint64_t:
4530 ; CHECK-P10-LE: # %bb.0: # %entry
4531 ; CHECK-P10-LE-NEXT: plbz r3, 99999000(r3), 0
4532 ; CHECK-P10-LE-NEXT: blr
4534 ; CHECK-P10-BE-LABEL: ld_align32_uint8_t_uint64_t:
4535 ; CHECK-P10-BE: # %bb.0: # %entry
4536 ; CHECK-P10-BE-NEXT: plbz r3, 99999007(r3), 0
4537 ; CHECK-P10-BE-NEXT: blr
4539 ; CHECK-P9-LE-LABEL: ld_align32_uint8_t_uint64_t:
4540 ; CHECK-P9-LE: # %bb.0: # %entry
4541 ; CHECK-P9-LE-NEXT: lis r4, 1525
4542 ; CHECK-P9-LE-NEXT: ori r4, r4, 56600
4543 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
4544 ; CHECK-P9-LE-NEXT: blr
4546 ; CHECK-P9-BE-LABEL: ld_align32_uint8_t_uint64_t:
4547 ; CHECK-P9-BE: # %bb.0: # %entry
4548 ; CHECK-P9-BE-NEXT: lis r4, 1525
4549 ; CHECK-P9-BE-NEXT: ori r4, r4, 56607
4550 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
4551 ; CHECK-P9-BE-NEXT: blr
4553 ; CHECK-P8-LE-LABEL: ld_align32_uint8_t_uint64_t:
4554 ; CHECK-P8-LE: # %bb.0: # %entry
4555 ; CHECK-P8-LE-NEXT: lis r4, 1525
4556 ; CHECK-P8-LE-NEXT: ori r4, r4, 56600
4557 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
4558 ; CHECK-P8-LE-NEXT: blr
4560 ; CHECK-P8-BE-LABEL: ld_align32_uint8_t_uint64_t:
4561 ; CHECK-P8-BE: # %bb.0: # %entry
4562 ; CHECK-P8-BE-NEXT: lis r4, 1525
4563 ; CHECK-P8-BE-NEXT: ori r4, r4, 56607
4564 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
4565 ; CHECK-P8-BE-NEXT: blr
4567 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
4568 %0 = load i64, ptr %add.ptr, align 8
4569 %conv = trunc i64 %0 to i8
4573 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4574 define dso_local zeroext i8 @ld_unalign64_uint8_t_uint64_t(ptr nocapture readonly %ptr) {
4575 ; CHECK-P10-LE-LABEL: ld_unalign64_uint8_t_uint64_t:
4576 ; CHECK-P10-LE: # %bb.0: # %entry
4577 ; CHECK-P10-LE-NEXT: pli r4, 232
4578 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
4579 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
4580 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r5
4581 ; CHECK-P10-LE-NEXT: blr
4583 ; CHECK-P10-BE-LABEL: ld_unalign64_uint8_t_uint64_t:
4584 ; CHECK-P10-BE: # %bb.0: # %entry
4585 ; CHECK-P10-BE-NEXT: pli r4, 232
4586 ; CHECK-P10-BE-NEXT: pli r5, 3567587336
4587 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
4588 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
4589 ; CHECK-P10-BE-NEXT: blr
4591 ; CHECK-P9-LE-LABEL: ld_unalign64_uint8_t_uint64_t:
4592 ; CHECK-P9-LE: # %bb.0: # %entry
4593 ; CHECK-P9-LE-NEXT: li r4, 29
4594 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
4595 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
4596 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
4597 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
4598 ; CHECK-P9-LE-NEXT: blr
4600 ; CHECK-P9-BE-LABEL: ld_unalign64_uint8_t_uint64_t:
4601 ; CHECK-P9-BE: # %bb.0: # %entry
4602 ; CHECK-P9-BE-NEXT: li r4, 29
4603 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
4604 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
4605 ; CHECK-P9-BE-NEXT: ori r4, r4, 4104
4606 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
4607 ; CHECK-P9-BE-NEXT: blr
4609 ; CHECK-P8-LE-LABEL: ld_unalign64_uint8_t_uint64_t:
4610 ; CHECK-P8-LE: # %bb.0: # %entry
4611 ; CHECK-P8-LE-NEXT: li r4, 29
4612 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
4613 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
4614 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
4615 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
4616 ; CHECK-P8-LE-NEXT: blr
4618 ; CHECK-P8-BE-LABEL: ld_unalign64_uint8_t_uint64_t:
4619 ; CHECK-P8-BE: # %bb.0: # %entry
4620 ; CHECK-P8-BE-NEXT: li r4, 29
4621 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
4622 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
4623 ; CHECK-P8-BE-NEXT: ori r4, r4, 4104
4624 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
4625 ; CHECK-P8-BE-NEXT: blr
4627 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000001
4628 %0 = load i64, ptr %add.ptr, align 8
4629 %conv = trunc i64 %0 to i8
4633 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4634 define dso_local zeroext i8 @ld_align64_uint8_t_uint64_t(ptr nocapture readonly %ptr) {
4635 ; CHECK-P10-LE-LABEL: ld_align64_uint8_t_uint64_t:
4636 ; CHECK-P10-LE: # %bb.0: # %entry
4637 ; CHECK-P10-LE-NEXT: pli r4, 244140625
4638 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
4639 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
4640 ; CHECK-P10-LE-NEXT: blr
4642 ; CHECK-P10-BE-LABEL: ld_align64_uint8_t_uint64_t:
4643 ; CHECK-P10-BE: # %bb.0: # %entry
4644 ; CHECK-P10-BE-NEXT: pli r4, 232
4645 ; CHECK-P10-BE-NEXT: pli r5, 3567587335
4646 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
4647 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
4648 ; CHECK-P10-BE-NEXT: blr
4650 ; CHECK-P9-LE-LABEL: ld_align64_uint8_t_uint64_t:
4651 ; CHECK-P9-LE: # %bb.0: # %entry
4652 ; CHECK-P9-LE-NEXT: lis r4, 3725
4653 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
4654 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
4655 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
4656 ; CHECK-P9-LE-NEXT: blr
4658 ; CHECK-P9-BE-LABEL: ld_align64_uint8_t_uint64_t:
4659 ; CHECK-P9-BE: # %bb.0: # %entry
4660 ; CHECK-P9-BE-NEXT: li r4, 29
4661 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
4662 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
4663 ; CHECK-P9-BE-NEXT: ori r4, r4, 4103
4664 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
4665 ; CHECK-P9-BE-NEXT: blr
4667 ; CHECK-P8-LE-LABEL: ld_align64_uint8_t_uint64_t:
4668 ; CHECK-P8-LE: # %bb.0: # %entry
4669 ; CHECK-P8-LE-NEXT: lis r4, 3725
4670 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
4671 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
4672 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
4673 ; CHECK-P8-LE-NEXT: blr
4675 ; CHECK-P8-BE-LABEL: ld_align64_uint8_t_uint64_t:
4676 ; CHECK-P8-BE: # %bb.0: # %entry
4677 ; CHECK-P8-BE-NEXT: li r4, 29
4678 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
4679 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
4680 ; CHECK-P8-BE-NEXT: ori r4, r4, 4103
4681 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
4682 ; CHECK-P8-BE-NEXT: blr
4684 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
4685 %0 = load i64, ptr %add.ptr, align 8
4686 %conv = trunc i64 %0 to i8
4690 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4691 define dso_local zeroext i8 @ld_reg_uint8_t_uint64_t(ptr nocapture readonly %ptr, i64 %off) {
4692 ; CHECK-LE-LABEL: ld_reg_uint8_t_uint64_t:
4693 ; CHECK-LE: # %bb.0: # %entry
4694 ; CHECK-LE-NEXT: lbzx r3, r3, r4
4695 ; CHECK-LE-NEXT: blr
4697 ; CHECK-BE-LABEL: ld_reg_uint8_t_uint64_t:
4698 ; CHECK-BE: # %bb.0: # %entry
4699 ; CHECK-BE-NEXT: add r3, r3, r4
4700 ; CHECK-BE-NEXT: lbz r3, 7(r3)
4701 ; CHECK-BE-NEXT: blr
4703 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
4704 %0 = load i64, ptr %add.ptr, align 8
4705 %conv = trunc i64 %0 to i8
4709 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4710 define dso_local zeroext i8 @ld_or_uint8_t_uint64_t(i64 %ptr, i8 zeroext %off) {
4711 ; CHECK-LE-LABEL: ld_or_uint8_t_uint64_t:
4712 ; CHECK-LE: # %bb.0: # %entry
4713 ; CHECK-LE-NEXT: or r3, r4, r3
4714 ; CHECK-LE-NEXT: lbz r3, 0(r3)
4715 ; CHECK-LE-NEXT: blr
4717 ; CHECK-BE-LABEL: ld_or_uint8_t_uint64_t:
4718 ; CHECK-BE: # %bb.0: # %entry
4719 ; CHECK-BE-NEXT: or r3, r4, r3
4720 ; CHECK-BE-NEXT: lbz r3, 7(r3)
4721 ; CHECK-BE-NEXT: blr
4723 %conv = zext i8 %off to i64
4724 %or = or i64 %conv, %ptr
4725 %0 = inttoptr i64 %or to ptr
4726 %1 = load i64, ptr %0, align 8
4727 %conv1 = trunc i64 %1 to i8
4731 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4732 define dso_local zeroext i8 @ld_not_disjoint16_uint8_t_uint64_t(i64 %ptr) {
4733 ; CHECK-LE-LABEL: ld_not_disjoint16_uint8_t_uint64_t:
4734 ; CHECK-LE: # %bb.0: # %entry
4735 ; CHECK-LE-NEXT: ori r3, r3, 6
4736 ; CHECK-LE-NEXT: lbz r3, 0(r3)
4737 ; CHECK-LE-NEXT: blr
4739 ; CHECK-BE-LABEL: ld_not_disjoint16_uint8_t_uint64_t:
4740 ; CHECK-BE: # %bb.0: # %entry
4741 ; CHECK-BE-NEXT: ori r3, r3, 6
4742 ; CHECK-BE-NEXT: lbz r3, 7(r3)
4743 ; CHECK-BE-NEXT: blr
4745 %or = or i64 %ptr, 6
4746 %0 = inttoptr i64 %or to ptr
4747 %1 = load i64, ptr %0, align 8
4748 %conv = trunc i64 %1 to i8
4752 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4753 define dso_local zeroext i8 @ld_disjoint_align16_uint8_t_uint64_t(i64 %ptr) {
4754 ; CHECK-LE-LABEL: ld_disjoint_align16_uint8_t_uint64_t:
4755 ; CHECK-LE: # %bb.0: # %entry
4756 ; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
4757 ; CHECK-LE-NEXT: lbz r3, 24(r3)
4758 ; CHECK-LE-NEXT: blr
4760 ; CHECK-BE-LABEL: ld_disjoint_align16_uint8_t_uint64_t:
4761 ; CHECK-BE: # %bb.0: # %entry
4762 ; CHECK-BE-NEXT: rldicr r3, r3, 0, 51
4763 ; CHECK-BE-NEXT: lbz r3, 31(r3)
4764 ; CHECK-BE-NEXT: blr
4766 %and = and i64 %ptr, -4096
4767 %or = or i64 %and, 24
4768 %0 = inttoptr i64 %or to ptr
4769 %1 = load i64, ptr %0, align 8
4770 %conv = trunc i64 %1 to i8
4774 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4775 define dso_local zeroext i8 @ld_not_disjoint32_uint8_t_uint64_t(i64 %ptr) {
4776 ; CHECK-LE-LABEL: ld_not_disjoint32_uint8_t_uint64_t:
4777 ; CHECK-LE: # %bb.0: # %entry
4778 ; CHECK-LE-NEXT: ori r3, r3, 34463
4779 ; CHECK-LE-NEXT: oris r3, r3, 1
4780 ; CHECK-LE-NEXT: lbz r3, 0(r3)
4781 ; CHECK-LE-NEXT: blr
4783 ; CHECK-BE-LABEL: ld_not_disjoint32_uint8_t_uint64_t:
4784 ; CHECK-BE: # %bb.0: # %entry
4785 ; CHECK-BE-NEXT: ori r3, r3, 34463
4786 ; CHECK-BE-NEXT: oris r3, r3, 1
4787 ; CHECK-BE-NEXT: lbz r3, 7(r3)
4788 ; CHECK-BE-NEXT: blr
4790 %or = or i64 %ptr, 99999
4791 %0 = inttoptr i64 %or to ptr
4792 %1 = load i64, ptr %0, align 8
4793 %conv = trunc i64 %1 to i8
4797 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4798 define dso_local zeroext i8 @ld_disjoint_align32_uint8_t_uint64_t(i64 %ptr) {
4799 ; CHECK-P10-LE-LABEL: ld_disjoint_align32_uint8_t_uint64_t:
4800 ; CHECK-P10-LE: # %bb.0: # %entry
4801 ; CHECK-P10-LE-NEXT: lis r4, -15264
4802 ; CHECK-P10-LE-NEXT: and r3, r3, r4
4803 ; CHECK-P10-LE-NEXT: plbz r3, 999990000(r3), 0
4804 ; CHECK-P10-LE-NEXT: blr
4806 ; CHECK-P10-BE-LABEL: ld_disjoint_align32_uint8_t_uint64_t:
4807 ; CHECK-P10-BE: # %bb.0: # %entry
4808 ; CHECK-P10-BE-NEXT: lis r4, -15264
4809 ; CHECK-P10-BE-NEXT: and r3, r3, r4
4810 ; CHECK-P10-BE-NEXT: plbz r3, 999990007(r3), 0
4811 ; CHECK-P10-BE-NEXT: blr
4813 ; CHECK-P9-LE-LABEL: ld_disjoint_align32_uint8_t_uint64_t:
4814 ; CHECK-P9-LE: # %bb.0: # %entry
4815 ; CHECK-P9-LE-NEXT: lis r4, -15264
4816 ; CHECK-P9-LE-NEXT: and r3, r3, r4
4817 ; CHECK-P9-LE-NEXT: lis r4, 15258
4818 ; CHECK-P9-LE-NEXT: ori r4, r4, 41712
4819 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
4820 ; CHECK-P9-LE-NEXT: blr
4822 ; CHECK-P9-BE-LABEL: ld_disjoint_align32_uint8_t_uint64_t:
4823 ; CHECK-P9-BE: # %bb.0: # %entry
4824 ; CHECK-P9-BE-NEXT: lis r4, -15264
4825 ; CHECK-P9-BE-NEXT: and r3, r3, r4
4826 ; CHECK-P9-BE-NEXT: lis r4, 15258
4827 ; CHECK-P9-BE-NEXT: ori r4, r4, 41719
4828 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
4829 ; CHECK-P9-BE-NEXT: blr
4831 ; CHECK-P8-LE-LABEL: ld_disjoint_align32_uint8_t_uint64_t:
4832 ; CHECK-P8-LE: # %bb.0: # %entry
4833 ; CHECK-P8-LE-NEXT: lis r4, -15264
4834 ; CHECK-P8-LE-NEXT: and r3, r3, r4
4835 ; CHECK-P8-LE-NEXT: lis r4, 15258
4836 ; CHECK-P8-LE-NEXT: ori r4, r4, 41712
4837 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
4838 ; CHECK-P8-LE-NEXT: blr
4840 ; CHECK-P8-BE-LABEL: ld_disjoint_align32_uint8_t_uint64_t:
4841 ; CHECK-P8-BE: # %bb.0: # %entry
4842 ; CHECK-P8-BE-NEXT: lis r4, -15264
4843 ; CHECK-P8-BE-NEXT: and r3, r3, r4
4844 ; CHECK-P8-BE-NEXT: lis r4, 15258
4845 ; CHECK-P8-BE-NEXT: ori r4, r4, 41719
4846 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
4847 ; CHECK-P8-BE-NEXT: blr
4849 %and = and i64 %ptr, -1000341504
4850 %or = or i64 %and, 999990000
4851 %0 = inttoptr i64 %or to ptr
4852 %1 = load i64, ptr %0, align 16
4853 %conv = trunc i64 %1 to i8
4857 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4858 define dso_local zeroext i8 @ld_not_disjoint64_uint8_t_uint64_t(i64 %ptr) {
4859 ; CHECK-P10-LE-LABEL: ld_not_disjoint64_uint8_t_uint64_t:
4860 ; CHECK-P10-LE: # %bb.0: # %entry
4861 ; CHECK-P10-LE-NEXT: pli r4, 232
4862 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
4863 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
4864 ; CHECK-P10-LE-NEXT: or r3, r3, r5
4865 ; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
4866 ; CHECK-P10-LE-NEXT: blr
4868 ; CHECK-P10-BE-LABEL: ld_not_disjoint64_uint8_t_uint64_t:
4869 ; CHECK-P10-BE: # %bb.0: # %entry
4870 ; CHECK-P10-BE-NEXT: pli r4, 232
4871 ; CHECK-P10-BE-NEXT: pli r5, 3567587329
4872 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
4873 ; CHECK-P10-BE-NEXT: or r3, r3, r5
4874 ; CHECK-P10-BE-NEXT: lbz r3, 7(r3)
4875 ; CHECK-P10-BE-NEXT: blr
4877 ; CHECK-P9-LE-LABEL: ld_not_disjoint64_uint8_t_uint64_t:
4878 ; CHECK-P9-LE: # %bb.0: # %entry
4879 ; CHECK-P9-LE-NEXT: li r4, 29
4880 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
4881 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
4882 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
4883 ; CHECK-P9-LE-NEXT: or r3, r3, r4
4884 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
4885 ; CHECK-P9-LE-NEXT: blr
4887 ; CHECK-P9-BE-LABEL: ld_not_disjoint64_uint8_t_uint64_t:
4888 ; CHECK-P9-BE: # %bb.0: # %entry
4889 ; CHECK-P9-BE-NEXT: li r4, 29
4890 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
4891 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
4892 ; CHECK-P9-BE-NEXT: ori r4, r4, 4097
4893 ; CHECK-P9-BE-NEXT: or r3, r3, r4
4894 ; CHECK-P9-BE-NEXT: lbz r3, 7(r3)
4895 ; CHECK-P9-BE-NEXT: blr
4897 ; CHECK-P8-LE-LABEL: ld_not_disjoint64_uint8_t_uint64_t:
4898 ; CHECK-P8-LE: # %bb.0: # %entry
4899 ; CHECK-P8-LE-NEXT: li r4, 29
4900 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
4901 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
4902 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
4903 ; CHECK-P8-LE-NEXT: or r3, r3, r4
4904 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
4905 ; CHECK-P8-LE-NEXT: blr
4907 ; CHECK-P8-BE-LABEL: ld_not_disjoint64_uint8_t_uint64_t:
4908 ; CHECK-P8-BE: # %bb.0: # %entry
4909 ; CHECK-P8-BE-NEXT: li r4, 29
4910 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
4911 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
4912 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
4913 ; CHECK-P8-BE-NEXT: or r3, r3, r4
4914 ; CHECK-P8-BE-NEXT: lbz r3, 7(r3)
4915 ; CHECK-P8-BE-NEXT: blr
4917 %or = or i64 %ptr, 1000000000001
4918 %0 = inttoptr i64 %or to ptr
4919 %1 = load i64, ptr %0, align 8
4920 %conv = trunc i64 %1 to i8
4924 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4925 define dso_local zeroext i8 @ld_disjoint_unalign64_uint8_t_uint64_t(i64 %ptr) {
4926 ; CHECK-P10-LE-LABEL: ld_disjoint_unalign64_uint8_t_uint64_t:
4927 ; CHECK-P10-LE: # %bb.0: # %entry
4928 ; CHECK-P10-LE-NEXT: pli r4, 232
4929 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
4930 ; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
4931 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
4932 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r5
4933 ; CHECK-P10-LE-NEXT: blr
4935 ; CHECK-P10-BE-LABEL: ld_disjoint_unalign64_uint8_t_uint64_t:
4936 ; CHECK-P10-BE: # %bb.0: # %entry
4937 ; CHECK-P10-BE-NEXT: pli r4, 232
4938 ; CHECK-P10-BE-NEXT: pli r5, 3567587336
4939 ; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
4940 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
4941 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
4942 ; CHECK-P10-BE-NEXT: blr
4944 ; CHECK-P9-LE-LABEL: ld_disjoint_unalign64_uint8_t_uint64_t:
4945 ; CHECK-P9-LE: # %bb.0: # %entry
4946 ; CHECK-P9-LE-NEXT: li r4, 29
4947 ; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
4948 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
4949 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
4950 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
4951 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
4952 ; CHECK-P9-LE-NEXT: blr
4954 ; CHECK-P9-BE-LABEL: ld_disjoint_unalign64_uint8_t_uint64_t:
4955 ; CHECK-P9-BE: # %bb.0: # %entry
4956 ; CHECK-P9-BE-NEXT: li r4, 29
4957 ; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
4958 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
4959 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
4960 ; CHECK-P9-BE-NEXT: ori r4, r4, 4104
4961 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
4962 ; CHECK-P9-BE-NEXT: blr
4964 ; CHECK-P8-LE-LABEL: ld_disjoint_unalign64_uint8_t_uint64_t:
4965 ; CHECK-P8-LE: # %bb.0: # %entry
4966 ; CHECK-P8-LE-NEXT: li r4, 29
4967 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
4968 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
4969 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
4970 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
4971 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
4972 ; CHECK-P8-LE-NEXT: blr
4974 ; CHECK-P8-BE-LABEL: ld_disjoint_unalign64_uint8_t_uint64_t:
4975 ; CHECK-P8-BE: # %bb.0: # %entry
4976 ; CHECK-P8-BE-NEXT: li r4, 29
4977 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
4978 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
4979 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
4980 ; CHECK-P8-BE-NEXT: ori r4, r4, 4104
4981 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
4982 ; CHECK-P8-BE-NEXT: blr
4984 %and = and i64 %ptr, -1099511627776
4985 %or = or i64 %and, 1000000000001
4986 %0 = inttoptr i64 %or to ptr
4987 %1 = load i64, ptr %0, align 8
4988 %conv = trunc i64 %1 to i8
4992 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4993 define dso_local zeroext i8 @ld_disjoint_align64_uint8_t_uint64_t(i64 %ptr) {
4994 ; CHECK-P10-LE-LABEL: ld_disjoint_align64_uint8_t_uint64_t:
4995 ; CHECK-P10-LE: # %bb.0: # %entry
4996 ; CHECK-P10-LE-NEXT: pli r4, 244140625
4997 ; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
4998 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
4999 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
5000 ; CHECK-P10-LE-NEXT: blr
5002 ; CHECK-P10-BE-LABEL: ld_disjoint_align64_uint8_t_uint64_t:
5003 ; CHECK-P10-BE: # %bb.0: # %entry
5004 ; CHECK-P10-BE-NEXT: pli r4, 232
5005 ; CHECK-P10-BE-NEXT: pli r5, 3567587335
5006 ; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
5007 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
5008 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
5009 ; CHECK-P10-BE-NEXT: blr
5011 ; CHECK-P9-LE-LABEL: ld_disjoint_align64_uint8_t_uint64_t:
5012 ; CHECK-P9-LE: # %bb.0: # %entry
5013 ; CHECK-P9-LE-NEXT: lis r4, 3725
5014 ; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
5015 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
5016 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
5017 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
5018 ; CHECK-P9-LE-NEXT: blr
5020 ; CHECK-P9-BE-LABEL: ld_disjoint_align64_uint8_t_uint64_t:
5021 ; CHECK-P9-BE: # %bb.0: # %entry
5022 ; CHECK-P9-BE-NEXT: li r4, 29
5023 ; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
5024 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
5025 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
5026 ; CHECK-P9-BE-NEXT: ori r4, r4, 4103
5027 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
5028 ; CHECK-P9-BE-NEXT: blr
5030 ; CHECK-P8-LE-LABEL: ld_disjoint_align64_uint8_t_uint64_t:
5031 ; CHECK-P8-LE: # %bb.0: # %entry
5032 ; CHECK-P8-LE-NEXT: lis r4, 3725
5033 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
5034 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
5035 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
5036 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
5037 ; CHECK-P8-LE-NEXT: blr
5039 ; CHECK-P8-BE-LABEL: ld_disjoint_align64_uint8_t_uint64_t:
5040 ; CHECK-P8-BE: # %bb.0: # %entry
5041 ; CHECK-P8-BE-NEXT: li r4, 29
5042 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
5043 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
5044 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
5045 ; CHECK-P8-BE-NEXT: ori r4, r4, 4103
5046 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
5047 ; CHECK-P8-BE-NEXT: blr
5049 %and = and i64 %ptr, -1099511627776
5050 %or = or i64 %and, 1000000000000
5051 %0 = inttoptr i64 %or to ptr
5052 %1 = load i64, ptr %0, align 4096
5053 %conv = trunc i64 %1 to i8
5057 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5058 define dso_local zeroext i8 @ld_cst_align16_uint8_t_uint64_t() {
5059 ; CHECK-LE-LABEL: ld_cst_align16_uint8_t_uint64_t:
5060 ; CHECK-LE: # %bb.0: # %entry
5061 ; CHECK-LE-NEXT: lbz r3, 4080(0)
5062 ; CHECK-LE-NEXT: blr
5064 ; CHECK-BE-LABEL: ld_cst_align16_uint8_t_uint64_t:
5065 ; CHECK-BE: # %bb.0: # %entry
5066 ; CHECK-BE-NEXT: lbz r3, 4087(0)
5067 ; CHECK-BE-NEXT: blr
5069 %0 = load i64, ptr inttoptr (i64 4080 to ptr), align 16
5070 %conv = trunc i64 %0 to i8
5074 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5075 define dso_local zeroext i8 @ld_cst_align32_uint8_t_uint64_t() {
5076 ; CHECK-LE-LABEL: ld_cst_align32_uint8_t_uint64_t:
5077 ; CHECK-LE: # %bb.0: # %entry
5078 ; CHECK-LE-NEXT: lis r3, 153
5079 ; CHECK-LE-NEXT: lbz r3, -27108(r3)
5080 ; CHECK-LE-NEXT: blr
5082 ; CHECK-BE-LABEL: ld_cst_align32_uint8_t_uint64_t:
5083 ; CHECK-BE: # %bb.0: # %entry
5084 ; CHECK-BE-NEXT: lis r3, 153
5085 ; CHECK-BE-NEXT: lbz r3, -27101(r3)
5086 ; CHECK-BE-NEXT: blr
5088 %0 = load i64, ptr inttoptr (i64 9999900 to ptr), align 8
5089 %conv = trunc i64 %0 to i8
5093 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5094 define dso_local zeroext i8 @ld_cst_unalign64_uint8_t_uint64_t() {
5095 ; CHECK-P10-LE-LABEL: ld_cst_unalign64_uint8_t_uint64_t:
5096 ; CHECK-P10-LE: # %bb.0: # %entry
5097 ; CHECK-P10-LE-NEXT: pli r3, 232
5098 ; CHECK-P10-LE-NEXT: pli r4, 3567587329
5099 ; CHECK-P10-LE-NEXT: rldimi r4, r3, 32, 0
5100 ; CHECK-P10-LE-NEXT: lbz r3, 0(r4)
5101 ; CHECK-P10-LE-NEXT: blr
5103 ; CHECK-P10-BE-LABEL: ld_cst_unalign64_uint8_t_uint64_t:
5104 ; CHECK-P10-BE: # %bb.0: # %entry
5105 ; CHECK-P10-BE-NEXT: pli r3, 232
5106 ; CHECK-P10-BE-NEXT: pli r4, 3567587336
5107 ; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
5108 ; CHECK-P10-BE-NEXT: lbz r3, 0(r4)
5109 ; CHECK-P10-BE-NEXT: blr
5111 ; CHECK-P9-LE-LABEL: ld_cst_unalign64_uint8_t_uint64_t:
5112 ; CHECK-P9-LE: # %bb.0: # %entry
5113 ; CHECK-P9-LE-NEXT: li r3, 29
5114 ; CHECK-P9-LE-NEXT: rldic r3, r3, 35, 24
5115 ; CHECK-P9-LE-NEXT: oris r3, r3, 54437
5116 ; CHECK-P9-LE-NEXT: ori r3, r3, 4097
5117 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
5118 ; CHECK-P9-LE-NEXT: blr
5120 ; CHECK-P9-BE-LABEL: ld_cst_unalign64_uint8_t_uint64_t:
5121 ; CHECK-P9-BE: # %bb.0: # %entry
5122 ; CHECK-P9-BE-NEXT: li r3, 29
5123 ; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
5124 ; CHECK-P9-BE-NEXT: oris r3, r3, 54437
5125 ; CHECK-P9-BE-NEXT: ori r3, r3, 4104
5126 ; CHECK-P9-BE-NEXT: lbz r3, 0(r3)
5127 ; CHECK-P9-BE-NEXT: blr
5129 ; CHECK-P8-LE-LABEL: ld_cst_unalign64_uint8_t_uint64_t:
5130 ; CHECK-P8-LE: # %bb.0: # %entry
5131 ; CHECK-P8-LE-NEXT: li r3, 29
5132 ; CHECK-P8-LE-NEXT: rldic r3, r3, 35, 24
5133 ; CHECK-P8-LE-NEXT: oris r3, r3, 54437
5134 ; CHECK-P8-LE-NEXT: ori r3, r3, 4097
5135 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
5136 ; CHECK-P8-LE-NEXT: blr
5138 ; CHECK-P8-BE-LABEL: ld_cst_unalign64_uint8_t_uint64_t:
5139 ; CHECK-P8-BE: # %bb.0: # %entry
5140 ; CHECK-P8-BE-NEXT: li r3, 29
5141 ; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
5142 ; CHECK-P8-BE-NEXT: oris r3, r3, 54437
5143 ; CHECK-P8-BE-NEXT: ori r3, r3, 4104
5144 ; CHECK-P8-BE-NEXT: lbz r3, 0(r3)
5145 ; CHECK-P8-BE-NEXT: blr
5147 %0 = load i64, ptr inttoptr (i64 1000000000001 to ptr), align 8
5148 %conv = trunc i64 %0 to i8
5152 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5153 define dso_local zeroext i8 @ld_cst_align64_uint8_t_uint64_t() {
5154 ; CHECK-P10-LE-LABEL: ld_cst_align64_uint8_t_uint64_t:
5155 ; CHECK-P10-LE: # %bb.0: # %entry
5156 ; CHECK-P10-LE-NEXT: pli r3, 244140625
5157 ; CHECK-P10-LE-NEXT: rldic r3, r3, 12, 24
5158 ; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
5159 ; CHECK-P10-LE-NEXT: blr
5161 ; CHECK-P10-BE-LABEL: ld_cst_align64_uint8_t_uint64_t:
5162 ; CHECK-P10-BE: # %bb.0: # %entry
5163 ; CHECK-P10-BE-NEXT: pli r3, 232
5164 ; CHECK-P10-BE-NEXT: pli r4, 3567587335
5165 ; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
5166 ; CHECK-P10-BE-NEXT: lbz r3, 0(r4)
5167 ; CHECK-P10-BE-NEXT: blr
5169 ; CHECK-P9-LE-LABEL: ld_cst_align64_uint8_t_uint64_t:
5170 ; CHECK-P9-LE: # %bb.0: # %entry
5171 ; CHECK-P9-LE-NEXT: lis r3, 3725
5172 ; CHECK-P9-LE-NEXT: ori r3, r3, 19025
5173 ; CHECK-P9-LE-NEXT: rldic r3, r3, 12, 24
5174 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
5175 ; CHECK-P9-LE-NEXT: blr
5177 ; CHECK-P9-BE-LABEL: ld_cst_align64_uint8_t_uint64_t:
5178 ; CHECK-P9-BE: # %bb.0: # %entry
5179 ; CHECK-P9-BE-NEXT: li r3, 29
5180 ; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
5181 ; CHECK-P9-BE-NEXT: oris r3, r3, 54437
5182 ; CHECK-P9-BE-NEXT: ori r3, r3, 4103
5183 ; CHECK-P9-BE-NEXT: lbz r3, 0(r3)
5184 ; CHECK-P9-BE-NEXT: blr
5186 ; CHECK-P8-LE-LABEL: ld_cst_align64_uint8_t_uint64_t:
5187 ; CHECK-P8-LE: # %bb.0: # %entry
5188 ; CHECK-P8-LE-NEXT: lis r3, 3725
5189 ; CHECK-P8-LE-NEXT: ori r3, r3, 19025
5190 ; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
5191 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
5192 ; CHECK-P8-LE-NEXT: blr
5194 ; CHECK-P8-BE-LABEL: ld_cst_align64_uint8_t_uint64_t:
5195 ; CHECK-P8-BE: # %bb.0: # %entry
5196 ; CHECK-P8-BE-NEXT: li r3, 29
5197 ; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
5198 ; CHECK-P8-BE-NEXT: oris r3, r3, 54437
5199 ; CHECK-P8-BE-NEXT: ori r3, r3, 4103
5200 ; CHECK-P8-BE-NEXT: lbz r3, 0(r3)
5201 ; CHECK-P8-BE-NEXT: blr
5203 %0 = load i64, ptr inttoptr (i64 1000000000000 to ptr), align 4096
5204 %conv = trunc i64 %0 to i8
5208 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5209 define dso_local zeroext i8 @ld_0_uint8_t_float(i64 %ptr) {
5210 ; CHECK-LABEL: ld_0_uint8_t_float:
5211 ; CHECK: # %bb.0: # %entry
5212 ; CHECK-NEXT: lfs f0, 0(r3)
5213 ; CHECK-NEXT: xscvdpsxws f0, f0
5214 ; CHECK-NEXT: mffprwz r3, f0
5217 %0 = inttoptr i64 %ptr to ptr
5218 %1 = load float, ptr %0, align 4
5219 %conv = fptoui float %1 to i8
5223 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5224 define dso_local zeroext i8 @ld_align16_uint8_t_float(ptr nocapture readonly %ptr) {
5225 ; CHECK-LABEL: ld_align16_uint8_t_float:
5226 ; CHECK: # %bb.0: # %entry
5227 ; CHECK-NEXT: lfs f0, 8(r3)
5228 ; CHECK-NEXT: xscvdpsxws f0, f0
5229 ; CHECK-NEXT: mffprwz r3, f0
5232 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
5233 %0 = load float, ptr %add.ptr, align 4
5234 %conv = fptoui float %0 to i8
5238 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5239 define dso_local zeroext i8 @ld_align32_uint8_t_float(ptr nocapture readonly %ptr) {
5240 ; CHECK-P10-LABEL: ld_align32_uint8_t_float:
5241 ; CHECK-P10: # %bb.0: # %entry
5242 ; CHECK-P10-NEXT: plfs f0, 99999000(r3), 0
5243 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5244 ; CHECK-P10-NEXT: mffprwz r3, f0
5245 ; CHECK-P10-NEXT: blr
5247 ; CHECK-PREP10-LABEL: ld_align32_uint8_t_float:
5248 ; CHECK-PREP10: # %bb.0: # %entry
5249 ; CHECK-PREP10-NEXT: lis r4, 1525
5250 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
5251 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
5252 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5253 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5254 ; CHECK-PREP10-NEXT: blr
5256 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
5257 %0 = load float, ptr %add.ptr, align 4
5258 %conv = fptoui float %0 to i8
5262 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5263 define dso_local zeroext i8 @ld_unalign64_uint8_t_float(ptr nocapture readonly %ptr) {
5264 ; CHECK-P10-LABEL: ld_unalign64_uint8_t_float:
5265 ; CHECK-P10: # %bb.0: # %entry
5266 ; CHECK-P10-NEXT: pli r4, 232
5267 ; CHECK-P10-NEXT: pli r5, 3567587329
5268 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
5269 ; CHECK-P10-NEXT: lfsx f0, r3, r5
5270 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5271 ; CHECK-P10-NEXT: mffprwz r3, f0
5272 ; CHECK-P10-NEXT: blr
5274 ; CHECK-PREP10-LABEL: ld_unalign64_uint8_t_float:
5275 ; CHECK-PREP10: # %bb.0: # %entry
5276 ; CHECK-PREP10-NEXT: li r4, 29
5277 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
5278 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
5279 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
5280 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
5281 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5282 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5283 ; CHECK-PREP10-NEXT: blr
5285 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000001
5286 %0 = load float, ptr %add.ptr, align 4
5287 %conv = fptoui float %0 to i8
5291 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5292 define dso_local zeroext i8 @ld_align64_uint8_t_float(ptr nocapture readonly %ptr) {
5293 ; CHECK-P10-LABEL: ld_align64_uint8_t_float:
5294 ; CHECK-P10: # %bb.0: # %entry
5295 ; CHECK-P10-NEXT: pli r4, 244140625
5296 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5297 ; CHECK-P10-NEXT: lfsx f0, r3, r4
5298 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5299 ; CHECK-P10-NEXT: mffprwz r3, f0
5300 ; CHECK-P10-NEXT: blr
5302 ; CHECK-PREP10-LABEL: ld_align64_uint8_t_float:
5303 ; CHECK-PREP10: # %bb.0: # %entry
5304 ; CHECK-PREP10-NEXT: lis r4, 3725
5305 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
5306 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
5307 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
5308 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5309 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5310 ; CHECK-PREP10-NEXT: blr
5312 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
5313 %0 = load float, ptr %add.ptr, align 4
5314 %conv = fptoui float %0 to i8
5318 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5319 define dso_local zeroext i8 @ld_reg_uint8_t_float(ptr nocapture readonly %ptr, i64 %off) {
5320 ; CHECK-LABEL: ld_reg_uint8_t_float:
5321 ; CHECK: # %bb.0: # %entry
5322 ; CHECK-NEXT: lfsx f0, r3, r4
5323 ; CHECK-NEXT: xscvdpsxws f0, f0
5324 ; CHECK-NEXT: mffprwz r3, f0
5327 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
5328 %0 = load float, ptr %add.ptr, align 4
5329 %conv = fptoui float %0 to i8
5333 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5334 define dso_local zeroext i8 @ld_or_uint8_t_float(i64 %ptr, i8 zeroext %off) {
5335 ; CHECK-LABEL: ld_or_uint8_t_float:
5336 ; CHECK: # %bb.0: # %entry
5337 ; CHECK-NEXT: or r3, r4, r3
5338 ; CHECK-NEXT: lfs f0, 0(r3)
5339 ; CHECK-NEXT: xscvdpsxws f0, f0
5340 ; CHECK-NEXT: mffprwz r3, f0
5343 %conv = zext i8 %off to i64
5344 %or = or i64 %conv, %ptr
5345 %0 = inttoptr i64 %or to ptr
5346 %1 = load float, ptr %0, align 4
5347 %conv1 = fptoui float %1 to i8
5351 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5352 define dso_local zeroext i8 @ld_not_disjoint16_uint8_t_float(i64 %ptr) {
5353 ; CHECK-LABEL: ld_not_disjoint16_uint8_t_float:
5354 ; CHECK: # %bb.0: # %entry
5355 ; CHECK-NEXT: ori r3, r3, 6
5356 ; CHECK-NEXT: lfs f0, 0(r3)
5357 ; CHECK-NEXT: xscvdpsxws f0, f0
5358 ; CHECK-NEXT: mffprwz r3, f0
5361 %or = or i64 %ptr, 6
5362 %0 = inttoptr i64 %or to ptr
5363 %1 = load float, ptr %0, align 4
5364 %conv = fptoui float %1 to i8
5368 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5369 define dso_local zeroext i8 @ld_disjoint_align16_uint8_t_float(i64 %ptr) {
5370 ; CHECK-LABEL: ld_disjoint_align16_uint8_t_float:
5371 ; CHECK: # %bb.0: # %entry
5372 ; CHECK-NEXT: rldicr r3, r3, 0, 51
5373 ; CHECK-NEXT: lfs f0, 24(r3)
5374 ; CHECK-NEXT: xscvdpsxws f0, f0
5375 ; CHECK-NEXT: mffprwz r3, f0
5378 %and = and i64 %ptr, -4096
5379 %or = or i64 %and, 24
5380 %0 = inttoptr i64 %or to ptr
5381 %1 = load float, ptr %0, align 8
5382 %conv = fptoui float %1 to i8
5386 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5387 define dso_local zeroext i8 @ld_not_disjoint32_uint8_t_float(i64 %ptr) {
5388 ; CHECK-LABEL: ld_not_disjoint32_uint8_t_float:
5389 ; CHECK: # %bb.0: # %entry
5390 ; CHECK-NEXT: ori r3, r3, 34463
5391 ; CHECK-NEXT: oris r3, r3, 1
5392 ; CHECK-NEXT: lfs f0, 0(r3)
5393 ; CHECK-NEXT: xscvdpsxws f0, f0
5394 ; CHECK-NEXT: mffprwz r3, f0
5397 %or = or i64 %ptr, 99999
5398 %0 = inttoptr i64 %or to ptr
5399 %1 = load float, ptr %0, align 4
5400 %conv = fptoui float %1 to i8
5404 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5405 define dso_local zeroext i8 @ld_disjoint_align32_uint8_t_float(i64 %ptr) {
5406 ; CHECK-P10-LABEL: ld_disjoint_align32_uint8_t_float:
5407 ; CHECK-P10: # %bb.0: # %entry
5408 ; CHECK-P10-NEXT: lis r4, -15264
5409 ; CHECK-P10-NEXT: and r3, r3, r4
5410 ; CHECK-P10-NEXT: plfs f0, 999990000(r3), 0
5411 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5412 ; CHECK-P10-NEXT: mffprwz r3, f0
5413 ; CHECK-P10-NEXT: blr
5415 ; CHECK-PREP10-LABEL: ld_disjoint_align32_uint8_t_float:
5416 ; CHECK-PREP10: # %bb.0: # %entry
5417 ; CHECK-PREP10-NEXT: lis r4, -15264
5418 ; CHECK-PREP10-NEXT: and r3, r3, r4
5419 ; CHECK-PREP10-NEXT: lis r4, 15258
5420 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
5421 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
5422 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5423 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5424 ; CHECK-PREP10-NEXT: blr
5426 %and = and i64 %ptr, -1000341504
5427 %or = or i64 %and, 999990000
5428 %0 = inttoptr i64 %or to ptr
5429 %1 = load float, ptr %0, align 16
5430 %conv = fptoui float %1 to i8
5434 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5435 define dso_local zeroext i8 @ld_not_disjoint64_uint8_t_float(i64 %ptr) {
5436 ; CHECK-P10-LABEL: ld_not_disjoint64_uint8_t_float:
5437 ; CHECK-P10: # %bb.0: # %entry
5438 ; CHECK-P10-NEXT: pli r4, 232
5439 ; CHECK-P10-NEXT: pli r5, 3567587329
5440 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
5441 ; CHECK-P10-NEXT: or r3, r3, r5
5442 ; CHECK-P10-NEXT: lfs f0, 0(r3)
5443 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5444 ; CHECK-P10-NEXT: mffprwz r3, f0
5445 ; CHECK-P10-NEXT: blr
5447 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint8_t_float:
5448 ; CHECK-PREP10: # %bb.0: # %entry
5449 ; CHECK-PREP10-NEXT: li r4, 29
5450 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
5451 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
5452 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
5453 ; CHECK-PREP10-NEXT: or r3, r3, r4
5454 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
5455 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5456 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5457 ; CHECK-PREP10-NEXT: blr
5459 %or = or i64 %ptr, 1000000000001
5460 %0 = inttoptr i64 %or to ptr
5461 %1 = load float, ptr %0, align 4
5462 %conv = fptoui float %1 to i8
5466 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5467 define dso_local zeroext i8 @ld_disjoint_unalign64_uint8_t_float(i64 %ptr) {
5468 ; CHECK-P10-LABEL: ld_disjoint_unalign64_uint8_t_float:
5469 ; CHECK-P10: # %bb.0: # %entry
5470 ; CHECK-P10-NEXT: pli r4, 232
5471 ; CHECK-P10-NEXT: pli r5, 3567587329
5472 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
5473 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
5474 ; CHECK-P10-NEXT: lfsx f0, r3, r5
5475 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5476 ; CHECK-P10-NEXT: mffprwz r3, f0
5477 ; CHECK-P10-NEXT: blr
5479 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint8_t_float:
5480 ; CHECK-PREP10: # %bb.0: # %entry
5481 ; CHECK-PREP10-NEXT: li r4, 29
5482 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
5483 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
5484 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
5485 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
5486 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
5487 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5488 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5489 ; CHECK-PREP10-NEXT: blr
5491 %and = and i64 %ptr, -1099511627776
5492 %or = or i64 %and, 1000000000001
5493 %0 = inttoptr i64 %or to ptr
5494 %1 = load float, ptr %0, align 4
5495 %conv = fptoui float %1 to i8
5499 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5500 define dso_local zeroext i8 @ld_disjoint_align64_uint8_t_float(i64 %ptr) {
5501 ; CHECK-P10-LABEL: ld_disjoint_align64_uint8_t_float:
5502 ; CHECK-P10: # %bb.0: # %entry
5503 ; CHECK-P10-NEXT: pli r4, 244140625
5504 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
5505 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5506 ; CHECK-P10-NEXT: lfsx f0, r3, r4
5507 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5508 ; CHECK-P10-NEXT: mffprwz r3, f0
5509 ; CHECK-P10-NEXT: blr
5511 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint8_t_float:
5512 ; CHECK-PREP10: # %bb.0: # %entry
5513 ; CHECK-PREP10-NEXT: lis r4, 3725
5514 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
5515 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
5516 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
5517 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
5518 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5519 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5520 ; CHECK-PREP10-NEXT: blr
5522 %and = and i64 %ptr, -1099511627776
5523 %or = or i64 %and, 1000000000000
5524 %0 = inttoptr i64 %or to ptr
5525 %1 = load float, ptr %0, align 4096
5526 %conv = fptoui float %1 to i8
5530 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5531 define dso_local zeroext i8 @ld_cst_align16_uint8_t_float() {
5532 ; CHECK-LABEL: ld_cst_align16_uint8_t_float:
5533 ; CHECK: # %bb.0: # %entry
5534 ; CHECK-NEXT: lfs f0, 4080(0)
5535 ; CHECK-NEXT: xscvdpsxws f0, f0
5536 ; CHECK-NEXT: mffprwz r3, f0
5539 %0 = load float, ptr inttoptr (i64 4080 to ptr), align 16
5540 %conv = fptoui float %0 to i8
5544 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5545 define dso_local zeroext i8 @ld_cst_align32_uint8_t_float() {
5546 ; CHECK-LABEL: ld_cst_align32_uint8_t_float:
5547 ; CHECK: # %bb.0: # %entry
5548 ; CHECK-NEXT: lis r3, 153
5549 ; CHECK-NEXT: lfs f0, -27108(r3)
5550 ; CHECK-NEXT: xscvdpsxws f0, f0
5551 ; CHECK-NEXT: mffprwz r3, f0
5554 %0 = load float, ptr inttoptr (i64 9999900 to ptr), align 4
5555 %conv = fptoui float %0 to i8
5559 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5560 define dso_local zeroext i8 @ld_cst_unalign64_uint8_t_float() {
5561 ; CHECK-P10-LABEL: ld_cst_unalign64_uint8_t_float:
5562 ; CHECK-P10: # %bb.0: # %entry
5563 ; CHECK-P10-NEXT: pli r3, 232
5564 ; CHECK-P10-NEXT: pli r4, 3567587329
5565 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
5566 ; CHECK-P10-NEXT: lfs f0, 0(r4)
5567 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5568 ; CHECK-P10-NEXT: mffprwz r3, f0
5569 ; CHECK-P10-NEXT: blr
5571 ; CHECK-PREP10-LABEL: ld_cst_unalign64_uint8_t_float:
5572 ; CHECK-PREP10: # %bb.0: # %entry
5573 ; CHECK-PREP10-NEXT: li r3, 29
5574 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
5575 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
5576 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
5577 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
5578 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5579 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5580 ; CHECK-PREP10-NEXT: blr
5582 %0 = load float, ptr inttoptr (i64 1000000000001 to ptr), align 4
5583 %conv = fptoui float %0 to i8
5587 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5588 define dso_local zeroext i8 @ld_cst_align64_uint8_t_float() {
5589 ; CHECK-P10-LABEL: ld_cst_align64_uint8_t_float:
5590 ; CHECK-P10: # %bb.0: # %entry
5591 ; CHECK-P10-NEXT: pli r3, 244140625
5592 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
5593 ; CHECK-P10-NEXT: lfs f0, 0(r3)
5594 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5595 ; CHECK-P10-NEXT: mffprwz r3, f0
5596 ; CHECK-P10-NEXT: blr
5598 ; CHECK-PREP10-LABEL: ld_cst_align64_uint8_t_float:
5599 ; CHECK-PREP10: # %bb.0: # %entry
5600 ; CHECK-PREP10-NEXT: lis r3, 3725
5601 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
5602 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
5603 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
5604 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5605 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5606 ; CHECK-PREP10-NEXT: blr
5608 %0 = load float, ptr inttoptr (i64 1000000000000 to ptr), align 4096
5609 %conv = fptoui float %0 to i8
5613 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5614 define dso_local zeroext i8 @ld_0_uint8_t_double(i64 %ptr) {
5615 ; CHECK-LABEL: ld_0_uint8_t_double:
5616 ; CHECK: # %bb.0: # %entry
5617 ; CHECK-NEXT: lfd f0, 0(r3)
5618 ; CHECK-NEXT: xscvdpsxws f0, f0
5619 ; CHECK-NEXT: mffprwz r3, f0
5622 %0 = inttoptr i64 %ptr to ptr
5623 %1 = load double, ptr %0, align 8
5624 %conv = fptoui double %1 to i8
5628 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5629 define dso_local zeroext i8 @ld_align16_uint8_t_double(ptr nocapture readonly %ptr) {
5630 ; CHECK-LABEL: ld_align16_uint8_t_double:
5631 ; CHECK: # %bb.0: # %entry
5632 ; CHECK-NEXT: lfd f0, 8(r3)
5633 ; CHECK-NEXT: xscvdpsxws f0, f0
5634 ; CHECK-NEXT: mffprwz r3, f0
5637 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
5638 %0 = load double, ptr %add.ptr, align 8
5639 %conv = fptoui double %0 to i8
5643 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5644 define dso_local zeroext i8 @ld_align32_uint8_t_double(ptr nocapture readonly %ptr) {
5645 ; CHECK-P10-LABEL: ld_align32_uint8_t_double:
5646 ; CHECK-P10: # %bb.0: # %entry
5647 ; CHECK-P10-NEXT: plfd f0, 99999000(r3), 0
5648 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5649 ; CHECK-P10-NEXT: mffprwz r3, f0
5650 ; CHECK-P10-NEXT: blr
5652 ; CHECK-PREP10-LABEL: ld_align32_uint8_t_double:
5653 ; CHECK-PREP10: # %bb.0: # %entry
5654 ; CHECK-PREP10-NEXT: lis r4, 1525
5655 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
5656 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
5657 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5658 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5659 ; CHECK-PREP10-NEXT: blr
5661 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
5662 %0 = load double, ptr %add.ptr, align 8
5663 %conv = fptoui double %0 to i8
5667 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5668 define dso_local zeroext i8 @ld_unalign64_uint8_t_double(ptr nocapture readonly %ptr) {
5669 ; CHECK-P10-LABEL: ld_unalign64_uint8_t_double:
5670 ; CHECK-P10: # %bb.0: # %entry
5671 ; CHECK-P10-NEXT: pli r4, 232
5672 ; CHECK-P10-NEXT: pli r5, 3567587329
5673 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
5674 ; CHECK-P10-NEXT: lfdx f0, r3, r5
5675 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5676 ; CHECK-P10-NEXT: mffprwz r3, f0
5677 ; CHECK-P10-NEXT: blr
5679 ; CHECK-PREP10-LABEL: ld_unalign64_uint8_t_double:
5680 ; CHECK-PREP10: # %bb.0: # %entry
5681 ; CHECK-PREP10-NEXT: li r4, 29
5682 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
5683 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
5684 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
5685 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
5686 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5687 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5688 ; CHECK-PREP10-NEXT: blr
5690 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000001
5691 %0 = load double, ptr %add.ptr, align 8
5692 %conv = fptoui double %0 to i8
5696 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5697 define dso_local zeroext i8 @ld_align64_uint8_t_double(ptr nocapture readonly %ptr) {
5698 ; CHECK-P10-LABEL: ld_align64_uint8_t_double:
5699 ; CHECK-P10: # %bb.0: # %entry
5700 ; CHECK-P10-NEXT: pli r4, 244140625
5701 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5702 ; CHECK-P10-NEXT: lfdx f0, r3, r4
5703 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5704 ; CHECK-P10-NEXT: mffprwz r3, f0
5705 ; CHECK-P10-NEXT: blr
5707 ; CHECK-PREP10-LABEL: ld_align64_uint8_t_double:
5708 ; CHECK-PREP10: # %bb.0: # %entry
5709 ; CHECK-PREP10-NEXT: lis r4, 3725
5710 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
5711 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
5712 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
5713 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5714 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5715 ; CHECK-PREP10-NEXT: blr
5717 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
5718 %0 = load double, ptr %add.ptr, align 8
5719 %conv = fptoui double %0 to i8
5723 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5724 define dso_local zeroext i8 @ld_reg_uint8_t_double(ptr nocapture readonly %ptr, i64 %off) {
5725 ; CHECK-LABEL: ld_reg_uint8_t_double:
5726 ; CHECK: # %bb.0: # %entry
5727 ; CHECK-NEXT: lfdx f0, r3, r4
5728 ; CHECK-NEXT: xscvdpsxws f0, f0
5729 ; CHECK-NEXT: mffprwz r3, f0
5732 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
5733 %0 = load double, ptr %add.ptr, align 8
5734 %conv = fptoui double %0 to i8
5738 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5739 define dso_local zeroext i8 @ld_or_uint8_t_double(i64 %ptr, i8 zeroext %off) {
5740 ; CHECK-LABEL: ld_or_uint8_t_double:
5741 ; CHECK: # %bb.0: # %entry
5742 ; CHECK-NEXT: or r3, r4, r3
5743 ; CHECK-NEXT: lfd f0, 0(r3)
5744 ; CHECK-NEXT: xscvdpsxws f0, f0
5745 ; CHECK-NEXT: mffprwz r3, f0
5748 %conv = zext i8 %off to i64
5749 %or = or i64 %conv, %ptr
5750 %0 = inttoptr i64 %or to ptr
5751 %1 = load double, ptr %0, align 8
5752 %conv1 = fptoui double %1 to i8
5756 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5757 define dso_local zeroext i8 @ld_not_disjoint16_uint8_t_double(i64 %ptr) {
5758 ; CHECK-LABEL: ld_not_disjoint16_uint8_t_double:
5759 ; CHECK: # %bb.0: # %entry
5760 ; CHECK-NEXT: ori r3, r3, 6
5761 ; CHECK-NEXT: lfd f0, 0(r3)
5762 ; CHECK-NEXT: xscvdpsxws f0, f0
5763 ; CHECK-NEXT: mffprwz r3, f0
5766 %or = or i64 %ptr, 6
5767 %0 = inttoptr i64 %or to ptr
5768 %1 = load double, ptr %0, align 8
5769 %conv = fptoui double %1 to i8
5773 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5774 define dso_local zeroext i8 @ld_disjoint_align16_uint8_t_double(i64 %ptr) {
5775 ; CHECK-LABEL: ld_disjoint_align16_uint8_t_double:
5776 ; CHECK: # %bb.0: # %entry
5777 ; CHECK-NEXT: rldicr r3, r3, 0, 51
5778 ; CHECK-NEXT: lfd f0, 24(r3)
5779 ; CHECK-NEXT: xscvdpsxws f0, f0
5780 ; CHECK-NEXT: mffprwz r3, f0
5783 %and = and i64 %ptr, -4096
5784 %or = or i64 %and, 24
5785 %0 = inttoptr i64 %or to ptr
5786 %1 = load double, ptr %0, align 8
5787 %conv = fptoui double %1 to i8
5791 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5792 define dso_local zeroext i8 @ld_not_disjoint32_uint8_t_double(i64 %ptr) {
5793 ; CHECK-LABEL: ld_not_disjoint32_uint8_t_double:
5794 ; CHECK: # %bb.0: # %entry
5795 ; CHECK-NEXT: ori r3, r3, 34463
5796 ; CHECK-NEXT: oris r3, r3, 1
5797 ; CHECK-NEXT: lfd f0, 0(r3)
5798 ; CHECK-NEXT: xscvdpsxws f0, f0
5799 ; CHECK-NEXT: mffprwz r3, f0
5802 %or = or i64 %ptr, 99999
5803 %0 = inttoptr i64 %or to ptr
5804 %1 = load double, ptr %0, align 8
5805 %conv = fptoui double %1 to i8
5809 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5810 define dso_local zeroext i8 @ld_disjoint_align32_uint8_t_double(i64 %ptr) {
5811 ; CHECK-P10-LABEL: ld_disjoint_align32_uint8_t_double:
5812 ; CHECK-P10: # %bb.0: # %entry
5813 ; CHECK-P10-NEXT: lis r4, -15264
5814 ; CHECK-P10-NEXT: and r3, r3, r4
5815 ; CHECK-P10-NEXT: plfd f0, 999990000(r3), 0
5816 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5817 ; CHECK-P10-NEXT: mffprwz r3, f0
5818 ; CHECK-P10-NEXT: blr
5820 ; CHECK-PREP10-LABEL: ld_disjoint_align32_uint8_t_double:
5821 ; CHECK-PREP10: # %bb.0: # %entry
5822 ; CHECK-PREP10-NEXT: lis r4, -15264
5823 ; CHECK-PREP10-NEXT: and r3, r3, r4
5824 ; CHECK-PREP10-NEXT: lis r4, 15258
5825 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
5826 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
5827 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5828 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5829 ; CHECK-PREP10-NEXT: blr
5831 %and = and i64 %ptr, -1000341504
5832 %or = or i64 %and, 999990000
5833 %0 = inttoptr i64 %or to ptr
5834 %1 = load double, ptr %0, align 16
5835 %conv = fptoui double %1 to i8
5839 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5840 define dso_local zeroext i8 @ld_not_disjoint64_uint8_t_double(i64 %ptr) {
5841 ; CHECK-P10-LABEL: ld_not_disjoint64_uint8_t_double:
5842 ; CHECK-P10: # %bb.0: # %entry
5843 ; CHECK-P10-NEXT: pli r4, 232
5844 ; CHECK-P10-NEXT: pli r5, 3567587329
5845 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
5846 ; CHECK-P10-NEXT: or r3, r3, r5
5847 ; CHECK-P10-NEXT: lfd f0, 0(r3)
5848 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5849 ; CHECK-P10-NEXT: mffprwz r3, f0
5850 ; CHECK-P10-NEXT: blr
5852 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint8_t_double:
5853 ; CHECK-PREP10: # %bb.0: # %entry
5854 ; CHECK-PREP10-NEXT: li r4, 29
5855 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
5856 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
5857 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
5858 ; CHECK-PREP10-NEXT: or r3, r3, r4
5859 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
5860 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5861 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5862 ; CHECK-PREP10-NEXT: blr
5864 %or = or i64 %ptr, 1000000000001
5865 %0 = inttoptr i64 %or to ptr
5866 %1 = load double, ptr %0, align 8
5867 %conv = fptoui double %1 to i8
5871 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5872 define dso_local zeroext i8 @ld_disjoint_unalign64_uint8_t_double(i64 %ptr) {
5873 ; CHECK-P10-LABEL: ld_disjoint_unalign64_uint8_t_double:
5874 ; CHECK-P10: # %bb.0: # %entry
5875 ; CHECK-P10-NEXT: pli r4, 232
5876 ; CHECK-P10-NEXT: pli r5, 3567587329
5877 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
5878 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
5879 ; CHECK-P10-NEXT: lfdx f0, r3, r5
5880 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5881 ; CHECK-P10-NEXT: mffprwz r3, f0
5882 ; CHECK-P10-NEXT: blr
5884 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint8_t_double:
5885 ; CHECK-PREP10: # %bb.0: # %entry
5886 ; CHECK-PREP10-NEXT: li r4, 29
5887 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
5888 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
5889 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
5890 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
5891 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
5892 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5893 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5894 ; CHECK-PREP10-NEXT: blr
5896 %and = and i64 %ptr, -1099511627776
5897 %or = or i64 %and, 1000000000001
5898 %0 = inttoptr i64 %or to ptr
5899 %1 = load double, ptr %0, align 8
5900 %conv = fptoui double %1 to i8
5904 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5905 define dso_local zeroext i8 @ld_disjoint_align64_uint8_t_double(i64 %ptr) {
5906 ; CHECK-P10-LABEL: ld_disjoint_align64_uint8_t_double:
5907 ; CHECK-P10: # %bb.0: # %entry
5908 ; CHECK-P10-NEXT: pli r4, 244140625
5909 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
5910 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5911 ; CHECK-P10-NEXT: lfdx f0, r3, r4
5912 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5913 ; CHECK-P10-NEXT: mffprwz r3, f0
5914 ; CHECK-P10-NEXT: blr
5916 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint8_t_double:
5917 ; CHECK-PREP10: # %bb.0: # %entry
5918 ; CHECK-PREP10-NEXT: lis r4, 3725
5919 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
5920 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
5921 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
5922 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
5923 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5924 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5925 ; CHECK-PREP10-NEXT: blr
5927 %and = and i64 %ptr, -1099511627776
5928 %or = or i64 %and, 1000000000000
5929 %0 = inttoptr i64 %or to ptr
5930 %1 = load double, ptr %0, align 4096
5931 %conv = fptoui double %1 to i8
5935 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5936 define dso_local zeroext i8 @ld_cst_align16_uint8_t_double() {
5937 ; CHECK-LABEL: ld_cst_align16_uint8_t_double:
5938 ; CHECK: # %bb.0: # %entry
5939 ; CHECK-NEXT: lfd f0, 4080(0)
5940 ; CHECK-NEXT: xscvdpsxws f0, f0
5941 ; CHECK-NEXT: mffprwz r3, f0
5944 %0 = load double, ptr inttoptr (i64 4080 to ptr), align 16
5945 %conv = fptoui double %0 to i8
5949 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5950 define dso_local zeroext i8 @ld_cst_align32_uint8_t_double() {
5951 ; CHECK-LABEL: ld_cst_align32_uint8_t_double:
5952 ; CHECK: # %bb.0: # %entry
5953 ; CHECK-NEXT: lis r3, 153
5954 ; CHECK-NEXT: lfd f0, -27108(r3)
5955 ; CHECK-NEXT: xscvdpsxws f0, f0
5956 ; CHECK-NEXT: mffprwz r3, f0
5959 %0 = load double, ptr inttoptr (i64 9999900 to ptr), align 8
5960 %conv = fptoui double %0 to i8
5964 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5965 define dso_local zeroext i8 @ld_cst_unalign64_uint8_t_double() {
5966 ; CHECK-P10-LABEL: ld_cst_unalign64_uint8_t_double:
5967 ; CHECK-P10: # %bb.0: # %entry
5968 ; CHECK-P10-NEXT: pli r3, 232
5969 ; CHECK-P10-NEXT: pli r4, 3567587329
5970 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
5971 ; CHECK-P10-NEXT: lfd f0, 0(r4)
5972 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5973 ; CHECK-P10-NEXT: mffprwz r3, f0
5974 ; CHECK-P10-NEXT: blr
5976 ; CHECK-PREP10-LABEL: ld_cst_unalign64_uint8_t_double:
5977 ; CHECK-PREP10: # %bb.0: # %entry
5978 ; CHECK-PREP10-NEXT: li r3, 29
5979 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
5980 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
5981 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
5982 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
5983 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5984 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5985 ; CHECK-PREP10-NEXT: blr
5987 %0 = load double, ptr inttoptr (i64 1000000000001 to ptr), align 8
5988 %conv = fptoui double %0 to i8
5992 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5993 define dso_local zeroext i8 @ld_cst_align64_uint8_t_double() {
5994 ; CHECK-P10-LABEL: ld_cst_align64_uint8_t_double:
5995 ; CHECK-P10: # %bb.0: # %entry
5996 ; CHECK-P10-NEXT: pli r3, 244140625
5997 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
5998 ; CHECK-P10-NEXT: lfd f0, 0(r3)
5999 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
6000 ; CHECK-P10-NEXT: mffprwz r3, f0
6001 ; CHECK-P10-NEXT: blr
6003 ; CHECK-PREP10-LABEL: ld_cst_align64_uint8_t_double:
6004 ; CHECK-PREP10: # %bb.0: # %entry
6005 ; CHECK-PREP10-NEXT: lis r3, 3725
6006 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
6007 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
6008 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
6009 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
6010 ; CHECK-PREP10-NEXT: mffprwz r3, f0
6011 ; CHECK-PREP10-NEXT: blr
6013 %0 = load double, ptr inttoptr (i64 1000000000000 to ptr), align 4096
6014 %conv = fptoui double %0 to i8
6018 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6019 define dso_local void @st_0_uint8_t_uint8_t(i64 %ptr, i8 zeroext %str) {
6020 ; CHECK-LABEL: st_0_uint8_t_uint8_t:
6021 ; CHECK: # %bb.0: # %entry
6022 ; CHECK-NEXT: stb r4, 0(r3)
6025 %0 = inttoptr i64 %ptr to ptr
6026 store i8 %str, ptr %0, align 1
6030 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6031 define dso_local void @st_align16_uint8_t_uint8_t(ptr nocapture %ptr, i8 zeroext %str) {
6032 ; CHECK-LABEL: st_align16_uint8_t_uint8_t:
6033 ; CHECK: # %bb.0: # %entry
6034 ; CHECK-NEXT: stb r4, 8(r3)
6037 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
6038 store i8 %str, ptr %add.ptr, align 1
6042 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6043 define dso_local void @st_align32_uint8_t_uint8_t(ptr nocapture %ptr, i8 zeroext %str) {
6044 ; CHECK-P10-LABEL: st_align32_uint8_t_uint8_t:
6045 ; CHECK-P10: # %bb.0: # %entry
6046 ; CHECK-P10-NEXT: pstb r4, 99999000(r3), 0
6047 ; CHECK-P10-NEXT: blr
6049 ; CHECK-PREP10-LABEL: st_align32_uint8_t_uint8_t:
6050 ; CHECK-PREP10: # %bb.0: # %entry
6051 ; CHECK-PREP10-NEXT: lis r5, 1525
6052 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
6053 ; CHECK-PREP10-NEXT: stbx r4, r3, r5
6054 ; CHECK-PREP10-NEXT: blr
6056 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
6057 store i8 %str, ptr %add.ptr, align 1
6061 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6062 define dso_local void @st_align64_uint8_t_uint8_t(ptr nocapture %ptr, i8 zeroext %str) {
6063 ; CHECK-P10-LABEL: st_align64_uint8_t_uint8_t:
6064 ; CHECK-P10: # %bb.0: # %entry
6065 ; CHECK-P10-NEXT: pli r5, 244140625
6066 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6067 ; CHECK-P10-NEXT: stbx r4, r3, r5
6068 ; CHECK-P10-NEXT: blr
6070 ; CHECK-PREP10-LABEL: st_align64_uint8_t_uint8_t:
6071 ; CHECK-PREP10: # %bb.0: # %entry
6072 ; CHECK-PREP10-NEXT: lis r5, 3725
6073 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6074 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6075 ; CHECK-PREP10-NEXT: stbx r4, r3, r5
6076 ; CHECK-PREP10-NEXT: blr
6078 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
6079 store i8 %str, ptr %add.ptr, align 1
6083 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6084 define dso_local void @st_reg_uint8_t_uint8_t(ptr nocapture %ptr, i64 %off, i8 zeroext %str) {
6085 ; CHECK-LABEL: st_reg_uint8_t_uint8_t:
6086 ; CHECK: # %bb.0: # %entry
6087 ; CHECK-NEXT: stbx r5, r3, r4
6090 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
6091 store i8 %str, ptr %add.ptr, align 1
6095 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6096 define dso_local void @st_or1_uint8_t_uint8_t(i64 %ptr, i8 zeroext %off, i8 zeroext %str) {
6097 ; CHECK-LABEL: st_or1_uint8_t_uint8_t:
6098 ; CHECK: # %bb.0: # %entry
6099 ; CHECK-NEXT: or r3, r4, r3
6100 ; CHECK-NEXT: stb r5, 0(r3)
6103 %conv = zext i8 %off to i64
6104 %or = or i64 %conv, %ptr
6105 %0 = inttoptr i64 %or to ptr
6106 store i8 %str, ptr %0, align 1
6110 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6111 define dso_local void @st_not_disjoint16_uint8_t_uint8_t(i64 %ptr, i8 zeroext %str) {
6112 ; CHECK-LABEL: st_not_disjoint16_uint8_t_uint8_t:
6113 ; CHECK: # %bb.0: # %entry
6114 ; CHECK-NEXT: ori r3, r3, 6
6115 ; CHECK-NEXT: stb r4, 0(r3)
6118 %or = or i64 %ptr, 6
6119 %0 = inttoptr i64 %or to ptr
6120 store i8 %str, ptr %0, align 1
6124 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6125 define dso_local void @st_disjoint_align16_uint8_t_uint8_t(i64 %ptr, i8 zeroext %str) {
6126 ; CHECK-LABEL: st_disjoint_align16_uint8_t_uint8_t:
6127 ; CHECK: # %bb.0: # %entry
6128 ; CHECK-NEXT: rldicr r3, r3, 0, 51
6129 ; CHECK-NEXT: stb r4, 24(r3)
6132 %and = and i64 %ptr, -4096
6133 %or = or i64 %and, 24
6134 %0 = inttoptr i64 %or to ptr
6135 store i8 %str, ptr %0, align 8
6139 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6140 define dso_local void @st_not_disjoint32_uint8_t_uint8_t(i64 %ptr, i8 zeroext %str) {
6141 ; CHECK-LABEL: st_not_disjoint32_uint8_t_uint8_t:
6142 ; CHECK: # %bb.0: # %entry
6143 ; CHECK-NEXT: ori r3, r3, 34463
6144 ; CHECK-NEXT: oris r3, r3, 1
6145 ; CHECK-NEXT: stb r4, 0(r3)
6148 %or = or i64 %ptr, 99999
6149 %0 = inttoptr i64 %or to ptr
6150 store i8 %str, ptr %0, align 1
6154 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6155 define dso_local void @st_disjoint_align32_uint8_t_uint8_t(i64 %ptr, i8 zeroext %str) {
6156 ; CHECK-P10-LABEL: st_disjoint_align32_uint8_t_uint8_t:
6157 ; CHECK-P10: # %bb.0: # %entry
6158 ; CHECK-P10-NEXT: lis r5, -15264
6159 ; CHECK-P10-NEXT: and r3, r3, r5
6160 ; CHECK-P10-NEXT: pstb r4, 999990000(r3), 0
6161 ; CHECK-P10-NEXT: blr
6163 ; CHECK-PREP10-LABEL: st_disjoint_align32_uint8_t_uint8_t:
6164 ; CHECK-PREP10: # %bb.0: # %entry
6165 ; CHECK-PREP10-NEXT: lis r5, -15264
6166 ; CHECK-PREP10-NEXT: and r3, r3, r5
6167 ; CHECK-PREP10-NEXT: lis r5, 15258
6168 ; CHECK-PREP10-NEXT: ori r5, r5, 41712
6169 ; CHECK-PREP10-NEXT: stbx r4, r3, r5
6170 ; CHECK-PREP10-NEXT: blr
6172 %and = and i64 %ptr, -1000341504
6173 %or = or i64 %and, 999990000
6174 %0 = inttoptr i64 %or to ptr
6175 store i8 %str, ptr %0, align 16
6179 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6180 define dso_local void @st_not_disjoint64_uint8_t_uint8_t(i64 %ptr, i8 zeroext %str) {
6181 ; CHECK-P10-LABEL: st_not_disjoint64_uint8_t_uint8_t:
6182 ; CHECK-P10: # %bb.0: # %entry
6183 ; CHECK-P10-NEXT: pli r5, 232
6184 ; CHECK-P10-NEXT: pli r6, 3567587329
6185 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
6186 ; CHECK-P10-NEXT: or r3, r3, r6
6187 ; CHECK-P10-NEXT: stb r4, 0(r3)
6188 ; CHECK-P10-NEXT: blr
6190 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint8_t_uint8_t:
6191 ; CHECK-PREP10: # %bb.0: # %entry
6192 ; CHECK-PREP10-NEXT: li r5, 29
6193 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
6194 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
6195 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
6196 ; CHECK-PREP10-NEXT: or r3, r3, r5
6197 ; CHECK-PREP10-NEXT: stb r4, 0(r3)
6198 ; CHECK-PREP10-NEXT: blr
6200 %or = or i64 %ptr, 1000000000001
6201 %0 = inttoptr i64 %or to ptr
6202 store i8 %str, ptr %0, align 1
6206 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6207 define dso_local void @st_disjoint_align64_uint8_t_uint8_t(i64 %ptr, i8 zeroext %str) {
6208 ; CHECK-P10-LABEL: st_disjoint_align64_uint8_t_uint8_t:
6209 ; CHECK-P10: # %bb.0: # %entry
6210 ; CHECK-P10-NEXT: pli r5, 244140625
6211 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
6212 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6213 ; CHECK-P10-NEXT: stbx r4, r3, r5
6214 ; CHECK-P10-NEXT: blr
6216 ; CHECK-PREP10-LABEL: st_disjoint_align64_uint8_t_uint8_t:
6217 ; CHECK-PREP10: # %bb.0: # %entry
6218 ; CHECK-PREP10-NEXT: lis r5, 3725
6219 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
6220 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6221 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6222 ; CHECK-PREP10-NEXT: stbx r4, r3, r5
6223 ; CHECK-PREP10-NEXT: blr
6225 %and = and i64 %ptr, -1099511627776
6226 %or = or i64 %and, 1000000000000
6227 %0 = inttoptr i64 %or to ptr
6228 store i8 %str, ptr %0, align 4096
6232 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6233 define dso_local void @st_cst_align16_uint8_t_uint8_t(i8 zeroext %str) {
6234 ; CHECK-LABEL: st_cst_align16_uint8_t_uint8_t:
6235 ; CHECK: # %bb.0: # %entry
6236 ; CHECK-NEXT: stb r3, 4080(0)
6239 store i8 %str, ptr inttoptr (i64 4080 to ptr), align 16
6243 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6244 define dso_local void @st_cst_align32_uint8_t_uint8_t(i8 zeroext %str) {
6245 ; CHECK-LABEL: st_cst_align32_uint8_t_uint8_t:
6246 ; CHECK: # %bb.0: # %entry
6247 ; CHECK-NEXT: lis r4, 153
6248 ; CHECK-NEXT: stb r3, -27108(r4)
6251 store i8 %str, ptr inttoptr (i64 9999900 to ptr), align 4
6255 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6256 define dso_local void @st_cst_align64_uint8_t_uint8_t(i8 zeroext %str) {
6257 ; CHECK-P10-LABEL: st_cst_align64_uint8_t_uint8_t:
6258 ; CHECK-P10: # %bb.0: # %entry
6259 ; CHECK-P10-NEXT: pli r4, 244140625
6260 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6261 ; CHECK-P10-NEXT: stb r3, 0(r4)
6262 ; CHECK-P10-NEXT: blr
6264 ; CHECK-PREP10-LABEL: st_cst_align64_uint8_t_uint8_t:
6265 ; CHECK-PREP10: # %bb.0: # %entry
6266 ; CHECK-PREP10-NEXT: lis r4, 3725
6267 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
6268 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
6269 ; CHECK-PREP10-NEXT: stb r3, 0(r4)
6270 ; CHECK-PREP10-NEXT: blr
6272 store i8 %str, ptr inttoptr (i64 1000000000000 to ptr), align 4096
6276 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6277 define dso_local void @st_0_uint8_t_uint16_t(i64 %ptr, i8 zeroext %str) {
6278 ; CHECK-LABEL: st_0_uint8_t_uint16_t:
6279 ; CHECK: # %bb.0: # %entry
6280 ; CHECK-NEXT: sth r4, 0(r3)
6283 %conv = zext i8 %str to i16
6284 %0 = inttoptr i64 %ptr to ptr
6285 store i16 %conv, ptr %0, align 2
6289 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6290 define dso_local void @st_align16_uint8_t_uint16_t(ptr nocapture %ptr, i8 zeroext %str) {
6291 ; CHECK-LABEL: st_align16_uint8_t_uint16_t:
6292 ; CHECK: # %bb.0: # %entry
6293 ; CHECK-NEXT: sth r4, 8(r3)
6296 %conv = zext i8 %str to i16
6297 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
6298 store i16 %conv, ptr %add.ptr, align 2
6302 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6303 define dso_local void @st_align32_uint8_t_uint16_t(ptr nocapture %ptr, i8 zeroext %str) {
6304 ; CHECK-P10-LABEL: st_align32_uint8_t_uint16_t:
6305 ; CHECK-P10: # %bb.0: # %entry
6306 ; CHECK-P10-NEXT: psth r4, 99999000(r3), 0
6307 ; CHECK-P10-NEXT: blr
6309 ; CHECK-PREP10-LABEL: st_align32_uint8_t_uint16_t:
6310 ; CHECK-PREP10: # %bb.0: # %entry
6311 ; CHECK-PREP10-NEXT: lis r5, 1525
6312 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
6313 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
6314 ; CHECK-PREP10-NEXT: blr
6316 %conv = zext i8 %str to i16
6317 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
6318 store i16 %conv, ptr %add.ptr, align 2
6322 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6323 define dso_local void @st_align64_uint8_t_uint16_t(ptr nocapture %ptr, i8 zeroext %str) {
6324 ; CHECK-P10-LABEL: st_align64_uint8_t_uint16_t:
6325 ; CHECK-P10: # %bb.0: # %entry
6326 ; CHECK-P10-NEXT: pli r5, 244140625
6327 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6328 ; CHECK-P10-NEXT: sthx r4, r3, r5
6329 ; CHECK-P10-NEXT: blr
6331 ; CHECK-PREP10-LABEL: st_align64_uint8_t_uint16_t:
6332 ; CHECK-PREP10: # %bb.0: # %entry
6333 ; CHECK-PREP10-NEXT: lis r5, 3725
6334 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6335 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6336 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
6337 ; CHECK-PREP10-NEXT: blr
6339 %conv = zext i8 %str to i16
6340 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
6341 store i16 %conv, ptr %add.ptr, align 2
6345 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6346 define dso_local void @st_reg_uint8_t_uint16_t(ptr nocapture %ptr, i64 %off, i8 zeroext %str) {
6347 ; CHECK-LABEL: st_reg_uint8_t_uint16_t:
6348 ; CHECK: # %bb.0: # %entry
6349 ; CHECK-NEXT: sthx r5, r3, r4
6352 %conv = zext i8 %str to i16
6353 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
6354 store i16 %conv, ptr %add.ptr, align 2
6358 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6359 define dso_local void @st_or1_uint8_t_uint16_t(i64 %ptr, i8 zeroext %off, i8 zeroext %str) {
6360 ; CHECK-LABEL: st_or1_uint8_t_uint16_t:
6361 ; CHECK: # %bb.0: # %entry
6362 ; CHECK-NEXT: or r3, r4, r3
6363 ; CHECK-NEXT: sth r5, 0(r3)
6366 %conv = zext i8 %str to i16
6367 %conv1 = zext i8 %off to i64
6368 %or = or i64 %conv1, %ptr
6369 %0 = inttoptr i64 %or to ptr
6370 store i16 %conv, ptr %0, align 2
6374 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6375 define dso_local void @st_not_disjoint16_uint8_t_uint16_t(i64 %ptr, i8 zeroext %str) {
6376 ; CHECK-LABEL: st_not_disjoint16_uint8_t_uint16_t:
6377 ; CHECK: # %bb.0: # %entry
6378 ; CHECK-NEXT: ori r3, r3, 6
6379 ; CHECK-NEXT: sth r4, 0(r3)
6382 %conv = zext i8 %str to i16
6383 %or = or i64 %ptr, 6
6384 %0 = inttoptr i64 %or to ptr
6385 store i16 %conv, ptr %0, align 2
6389 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6390 define dso_local void @st_disjoint_align16_uint8_t_uint16_t(i64 %ptr, i8 zeroext %str) {
6391 ; CHECK-LABEL: st_disjoint_align16_uint8_t_uint16_t:
6392 ; CHECK: # %bb.0: # %entry
6393 ; CHECK-NEXT: rldicr r3, r3, 0, 51
6394 ; CHECK-NEXT: sth r4, 24(r3)
6397 %and = and i64 %ptr, -4096
6398 %conv = zext i8 %str to i16
6399 %or = or i64 %and, 24
6400 %0 = inttoptr i64 %or to ptr
6401 store i16 %conv, ptr %0, align 8
6405 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6406 define dso_local void @st_not_disjoint32_uint8_t_uint16_t(i64 %ptr, i8 zeroext %str) {
6407 ; CHECK-LABEL: st_not_disjoint32_uint8_t_uint16_t:
6408 ; CHECK: # %bb.0: # %entry
6409 ; CHECK-NEXT: ori r3, r3, 34463
6410 ; CHECK-NEXT: oris r3, r3, 1
6411 ; CHECK-NEXT: sth r4, 0(r3)
6414 %conv = zext i8 %str to i16
6415 %or = or i64 %ptr, 99999
6416 %0 = inttoptr i64 %or to ptr
6417 store i16 %conv, ptr %0, align 2
6421 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6422 define dso_local void @st_disjoint_align32_uint8_t_uint16_t(i64 %ptr, i8 zeroext %str) {
6423 ; CHECK-P10-LABEL: st_disjoint_align32_uint8_t_uint16_t:
6424 ; CHECK-P10: # %bb.0: # %entry
6425 ; CHECK-P10-NEXT: lis r5, -15264
6426 ; CHECK-P10-NEXT: and r3, r3, r5
6427 ; CHECK-P10-NEXT: psth r4, 999990000(r3), 0
6428 ; CHECK-P10-NEXT: blr
6430 ; CHECK-PREP10-LABEL: st_disjoint_align32_uint8_t_uint16_t:
6431 ; CHECK-PREP10: # %bb.0: # %entry
6432 ; CHECK-PREP10-NEXT: lis r5, -15264
6433 ; CHECK-PREP10-NEXT: and r3, r3, r5
6434 ; CHECK-PREP10-NEXT: lis r5, 15258
6435 ; CHECK-PREP10-NEXT: ori r5, r5, 41712
6436 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
6437 ; CHECK-PREP10-NEXT: blr
6439 %and = and i64 %ptr, -1000341504
6440 %conv = zext i8 %str to i16
6441 %or = or i64 %and, 999990000
6442 %0 = inttoptr i64 %or to ptr
6443 store i16 %conv, ptr %0, align 16
6447 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6448 define dso_local void @st_not_disjoint64_uint8_t_uint16_t(i64 %ptr, i8 zeroext %str) {
6449 ; CHECK-P10-LABEL: st_not_disjoint64_uint8_t_uint16_t:
6450 ; CHECK-P10: # %bb.0: # %entry
6451 ; CHECK-P10-NEXT: pli r5, 232
6452 ; CHECK-P10-NEXT: pli r6, 3567587329
6453 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
6454 ; CHECK-P10-NEXT: or r3, r3, r6
6455 ; CHECK-P10-NEXT: sth r4, 0(r3)
6456 ; CHECK-P10-NEXT: blr
6458 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint8_t_uint16_t:
6459 ; CHECK-PREP10: # %bb.0: # %entry
6460 ; CHECK-PREP10-NEXT: li r5, 29
6461 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
6462 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
6463 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
6464 ; CHECK-PREP10-NEXT: or r3, r3, r5
6465 ; CHECK-PREP10-NEXT: sth r4, 0(r3)
6466 ; CHECK-PREP10-NEXT: blr
6468 %conv = zext i8 %str to i16
6469 %or = or i64 %ptr, 1000000000001
6470 %0 = inttoptr i64 %or to ptr
6471 store i16 %conv, ptr %0, align 2
6475 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6476 define dso_local void @st_disjoint_align64_uint8_t_uint16_t(i64 %ptr, i8 zeroext %str) {
6477 ; CHECK-P10-LABEL: st_disjoint_align64_uint8_t_uint16_t:
6478 ; CHECK-P10: # %bb.0: # %entry
6479 ; CHECK-P10-NEXT: pli r5, 244140625
6480 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
6481 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6482 ; CHECK-P10-NEXT: sthx r4, r3, r5
6483 ; CHECK-P10-NEXT: blr
6485 ; CHECK-PREP10-LABEL: st_disjoint_align64_uint8_t_uint16_t:
6486 ; CHECK-PREP10: # %bb.0: # %entry
6487 ; CHECK-PREP10-NEXT: lis r5, 3725
6488 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
6489 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6490 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6491 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
6492 ; CHECK-PREP10-NEXT: blr
6494 %and = and i64 %ptr, -1099511627776
6495 %conv = zext i8 %str to i16
6496 %or = or i64 %and, 1000000000000
6497 %0 = inttoptr i64 %or to ptr
6498 store i16 %conv, ptr %0, align 4096
6502 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6503 define dso_local void @st_cst_align16_uint8_t_uint16_t(i8 zeroext %str) {
6504 ; CHECK-LABEL: st_cst_align16_uint8_t_uint16_t:
6505 ; CHECK: # %bb.0: # %entry
6506 ; CHECK-NEXT: sth r3, 4080(0)
6509 %conv = zext i8 %str to i16
6510 store i16 %conv, ptr inttoptr (i64 4080 to ptr), align 16
6514 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6515 define dso_local void @st_cst_align32_uint8_t_uint16_t(i8 zeroext %str) {
6516 ; CHECK-LABEL: st_cst_align32_uint8_t_uint16_t:
6517 ; CHECK: # %bb.0: # %entry
6518 ; CHECK-NEXT: lis r4, 153
6519 ; CHECK-NEXT: sth r3, -27108(r4)
6522 %conv = zext i8 %str to i16
6523 store i16 %conv, ptr inttoptr (i64 9999900 to ptr), align 4
6527 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6528 define dso_local void @st_cst_align64_uint8_t_uint16_t(i8 zeroext %str) {
6529 ; CHECK-P10-LABEL: st_cst_align64_uint8_t_uint16_t:
6530 ; CHECK-P10: # %bb.0: # %entry
6531 ; CHECK-P10-NEXT: pli r4, 244140625
6532 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6533 ; CHECK-P10-NEXT: sth r3, 0(r4)
6534 ; CHECK-P10-NEXT: blr
6536 ; CHECK-PREP10-LABEL: st_cst_align64_uint8_t_uint16_t:
6537 ; CHECK-PREP10: # %bb.0: # %entry
6538 ; CHECK-PREP10-NEXT: lis r4, 3725
6539 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
6540 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
6541 ; CHECK-PREP10-NEXT: sth r3, 0(r4)
6542 ; CHECK-PREP10-NEXT: blr
6544 %conv = zext i8 %str to i16
6545 store i16 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
6549 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6550 define dso_local void @st_0_uint8_t_uint32_t(i64 %ptr, i8 zeroext %str) {
6551 ; CHECK-LABEL: st_0_uint8_t_uint32_t:
6552 ; CHECK: # %bb.0: # %entry
6553 ; CHECK-NEXT: stw r4, 0(r3)
6556 %conv = zext i8 %str to i32
6557 %0 = inttoptr i64 %ptr to ptr
6558 store i32 %conv, ptr %0, align 4
6562 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6563 define dso_local void @st_align16_uint8_t_uint32_t(ptr nocapture %ptr, i8 zeroext %str) {
6564 ; CHECK-LABEL: st_align16_uint8_t_uint32_t:
6565 ; CHECK: # %bb.0: # %entry
6566 ; CHECK-NEXT: stw r4, 8(r3)
6569 %conv = zext i8 %str to i32
6570 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
6571 store i32 %conv, ptr %add.ptr, align 4
6575 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6576 define dso_local void @st_align32_uint8_t_uint32_t(ptr nocapture %ptr, i8 zeroext %str) {
6577 ; CHECK-P10-LABEL: st_align32_uint8_t_uint32_t:
6578 ; CHECK-P10: # %bb.0: # %entry
6579 ; CHECK-P10-NEXT: pstw r4, 99999000(r3), 0
6580 ; CHECK-P10-NEXT: blr
6582 ; CHECK-PREP10-LABEL: st_align32_uint8_t_uint32_t:
6583 ; CHECK-PREP10: # %bb.0: # %entry
6584 ; CHECK-PREP10-NEXT: lis r5, 1525
6585 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
6586 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
6587 ; CHECK-PREP10-NEXT: blr
6589 %conv = zext i8 %str to i32
6590 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
6591 store i32 %conv, ptr %add.ptr, align 4
6595 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6596 define dso_local void @st_align64_uint8_t_uint32_t(ptr nocapture %ptr, i8 zeroext %str) {
6597 ; CHECK-P10-LABEL: st_align64_uint8_t_uint32_t:
6598 ; CHECK-P10: # %bb.0: # %entry
6599 ; CHECK-P10-NEXT: pli r5, 244140625
6600 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6601 ; CHECK-P10-NEXT: stwx r4, r3, r5
6602 ; CHECK-P10-NEXT: blr
6604 ; CHECK-PREP10-LABEL: st_align64_uint8_t_uint32_t:
6605 ; CHECK-PREP10: # %bb.0: # %entry
6606 ; CHECK-PREP10-NEXT: lis r5, 3725
6607 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6608 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6609 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
6610 ; CHECK-PREP10-NEXT: blr
6612 %conv = zext i8 %str to i32
6613 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
6614 store i32 %conv, ptr %add.ptr, align 4
6618 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6619 define dso_local void @st_reg_uint8_t_uint32_t(ptr nocapture %ptr, i64 %off, i8 zeroext %str) {
6620 ; CHECK-LABEL: st_reg_uint8_t_uint32_t:
6621 ; CHECK: # %bb.0: # %entry
6622 ; CHECK-NEXT: stwx r5, r3, r4
6625 %conv = zext i8 %str to i32
6626 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
6627 store i32 %conv, ptr %add.ptr, align 4
6631 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6632 define dso_local void @st_or1_uint8_t_uint32_t(i64 %ptr, i8 zeroext %off, i8 zeroext %str) {
6633 ; CHECK-LABEL: st_or1_uint8_t_uint32_t:
6634 ; CHECK: # %bb.0: # %entry
6635 ; CHECK-NEXT: or r3, r4, r3
6636 ; CHECK-NEXT: stw r5, 0(r3)
6639 %conv = zext i8 %str to i32
6640 %conv1 = zext i8 %off to i64
6641 %or = or i64 %conv1, %ptr
6642 %0 = inttoptr i64 %or to ptr
6643 store i32 %conv, ptr %0, align 4
6647 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6648 define dso_local void @st_not_disjoint16_uint8_t_uint32_t(i64 %ptr, i8 zeroext %str) {
6649 ; CHECK-LABEL: st_not_disjoint16_uint8_t_uint32_t:
6650 ; CHECK: # %bb.0: # %entry
6651 ; CHECK-NEXT: ori r3, r3, 6
6652 ; CHECK-NEXT: stw r4, 0(r3)
6655 %conv = zext i8 %str to i32
6656 %or = or i64 %ptr, 6
6657 %0 = inttoptr i64 %or to ptr
6658 store i32 %conv, ptr %0, align 4
6662 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6663 define dso_local void @st_disjoint_align16_uint8_t_uint32_t(i64 %ptr, i8 zeroext %str) {
6664 ; CHECK-LABEL: st_disjoint_align16_uint8_t_uint32_t:
6665 ; CHECK: # %bb.0: # %entry
6666 ; CHECK-NEXT: rldicr r3, r3, 0, 51
6667 ; CHECK-NEXT: stw r4, 24(r3)
6670 %and = and i64 %ptr, -4096
6671 %conv = zext i8 %str to i32
6672 %or = or i64 %and, 24
6673 %0 = inttoptr i64 %or to ptr
6674 store i32 %conv, ptr %0, align 8
6678 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6679 define dso_local void @st_not_disjoint32_uint8_t_uint32_t(i64 %ptr, i8 zeroext %str) {
6680 ; CHECK-LABEL: st_not_disjoint32_uint8_t_uint32_t:
6681 ; CHECK: # %bb.0: # %entry
6682 ; CHECK-NEXT: ori r3, r3, 34463
6683 ; CHECK-NEXT: oris r3, r3, 1
6684 ; CHECK-NEXT: stw r4, 0(r3)
6687 %conv = zext i8 %str to i32
6688 %or = or i64 %ptr, 99999
6689 %0 = inttoptr i64 %or to ptr
6690 store i32 %conv, ptr %0, align 4
6694 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6695 define dso_local void @st_disjoint_align32_uint8_t_uint32_t(i64 %ptr, i8 zeroext %str) {
6696 ; CHECK-P10-LABEL: st_disjoint_align32_uint8_t_uint32_t:
6697 ; CHECK-P10: # %bb.0: # %entry
6698 ; CHECK-P10-NEXT: lis r5, -15264
6699 ; CHECK-P10-NEXT: and r3, r3, r5
6700 ; CHECK-P10-NEXT: pstw r4, 999990000(r3), 0
6701 ; CHECK-P10-NEXT: blr
6703 ; CHECK-PREP10-LABEL: st_disjoint_align32_uint8_t_uint32_t:
6704 ; CHECK-PREP10: # %bb.0: # %entry
6705 ; CHECK-PREP10-NEXT: lis r5, -15264
6706 ; CHECK-PREP10-NEXT: and r3, r3, r5
6707 ; CHECK-PREP10-NEXT: lis r5, 15258
6708 ; CHECK-PREP10-NEXT: ori r5, r5, 41712
6709 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
6710 ; CHECK-PREP10-NEXT: blr
6712 %and = and i64 %ptr, -1000341504
6713 %conv = zext i8 %str to i32
6714 %or = or i64 %and, 999990000
6715 %0 = inttoptr i64 %or to ptr
6716 store i32 %conv, ptr %0, align 16
6720 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6721 define dso_local void @st_not_disjoint64_uint8_t_uint32_t(i64 %ptr, i8 zeroext %str) {
6722 ; CHECK-P10-LABEL: st_not_disjoint64_uint8_t_uint32_t:
6723 ; CHECK-P10: # %bb.0: # %entry
6724 ; CHECK-P10-NEXT: pli r5, 232
6725 ; CHECK-P10-NEXT: pli r6, 3567587329
6726 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
6727 ; CHECK-P10-NEXT: or r3, r3, r6
6728 ; CHECK-P10-NEXT: stw r4, 0(r3)
6729 ; CHECK-P10-NEXT: blr
6731 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint8_t_uint32_t:
6732 ; CHECK-PREP10: # %bb.0: # %entry
6733 ; CHECK-PREP10-NEXT: li r5, 29
6734 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
6735 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
6736 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
6737 ; CHECK-PREP10-NEXT: or r3, r3, r5
6738 ; CHECK-PREP10-NEXT: stw r4, 0(r3)
6739 ; CHECK-PREP10-NEXT: blr
6741 %conv = zext i8 %str to i32
6742 %or = or i64 %ptr, 1000000000001
6743 %0 = inttoptr i64 %or to ptr
6744 store i32 %conv, ptr %0, align 4
6748 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6749 define dso_local void @st_disjoint_align64_uint8_t_uint32_t(i64 %ptr, i8 zeroext %str) {
6750 ; CHECK-P10-LABEL: st_disjoint_align64_uint8_t_uint32_t:
6751 ; CHECK-P10: # %bb.0: # %entry
6752 ; CHECK-P10-NEXT: pli r5, 244140625
6753 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
6754 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6755 ; CHECK-P10-NEXT: stwx r4, r3, r5
6756 ; CHECK-P10-NEXT: blr
6758 ; CHECK-PREP10-LABEL: st_disjoint_align64_uint8_t_uint32_t:
6759 ; CHECK-PREP10: # %bb.0: # %entry
6760 ; CHECK-PREP10-NEXT: lis r5, 3725
6761 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
6762 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6763 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6764 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
6765 ; CHECK-PREP10-NEXT: blr
6767 %and = and i64 %ptr, -1099511627776
6768 %conv = zext i8 %str to i32
6769 %or = or i64 %and, 1000000000000
6770 %0 = inttoptr i64 %or to ptr
6771 store i32 %conv, ptr %0, align 4096
6775 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6776 define dso_local void @st_cst_align16_uint8_t_uint32_t(i8 zeroext %str) {
6777 ; CHECK-LABEL: st_cst_align16_uint8_t_uint32_t:
6778 ; CHECK: # %bb.0: # %entry
6779 ; CHECK-NEXT: stw r3, 4080(0)
6782 %conv = zext i8 %str to i32
6783 store i32 %conv, ptr inttoptr (i64 4080 to ptr), align 16
6787 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6788 define dso_local void @st_cst_align32_uint8_t_uint32_t(i8 zeroext %str) {
6789 ; CHECK-LABEL: st_cst_align32_uint8_t_uint32_t:
6790 ; CHECK: # %bb.0: # %entry
6791 ; CHECK-NEXT: lis r4, 153
6792 ; CHECK-NEXT: stw r3, -27108(r4)
6795 %conv = zext i8 %str to i32
6796 store i32 %conv, ptr inttoptr (i64 9999900 to ptr), align 4
6800 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6801 define dso_local void @st_cst_align64_uint8_t_uint32_t(i8 zeroext %str) {
6802 ; CHECK-P10-LABEL: st_cst_align64_uint8_t_uint32_t:
6803 ; CHECK-P10: # %bb.0: # %entry
6804 ; CHECK-P10-NEXT: pli r4, 244140625
6805 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6806 ; CHECK-P10-NEXT: stw r3, 0(r4)
6807 ; CHECK-P10-NEXT: blr
6809 ; CHECK-PREP10-LABEL: st_cst_align64_uint8_t_uint32_t:
6810 ; CHECK-PREP10: # %bb.0: # %entry
6811 ; CHECK-PREP10-NEXT: lis r4, 3725
6812 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
6813 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
6814 ; CHECK-PREP10-NEXT: stw r3, 0(r4)
6815 ; CHECK-PREP10-NEXT: blr
6817 %conv = zext i8 %str to i32
6818 store i32 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
6822 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6823 define dso_local void @st_0_uint8_t_uint64_t(i64 %ptr, i8 zeroext %str) {
6824 ; CHECK-LABEL: st_0_uint8_t_uint64_t:
6825 ; CHECK: # %bb.0: # %entry
6826 ; CHECK-NEXT: std r4, 0(r3)
6829 %conv = zext i8 %str to i64
6830 %0 = inttoptr i64 %ptr to ptr
6831 store i64 %conv, ptr %0, align 8
6835 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6836 define dso_local void @st_align16_uint8_t_uint64_t(ptr nocapture %ptr, i8 zeroext %str) {
6837 ; CHECK-LABEL: st_align16_uint8_t_uint64_t:
6838 ; CHECK: # %bb.0: # %entry
6839 ; CHECK-NEXT: std r4, 8(r3)
6842 %conv = zext i8 %str to i64
6843 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
6844 store i64 %conv, ptr %add.ptr, align 8
6848 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6849 define dso_local void @st_align32_uint8_t_uint64_t(ptr nocapture %ptr, i8 zeroext %str) {
6850 ; CHECK-P10-LABEL: st_align32_uint8_t_uint64_t:
6851 ; CHECK-P10: # %bb.0: # %entry
6852 ; CHECK-P10-NEXT: pstd r4, 99999000(r3), 0
6853 ; CHECK-P10-NEXT: blr
6855 ; CHECK-PREP10-LABEL: st_align32_uint8_t_uint64_t:
6856 ; CHECK-PREP10: # %bb.0: # %entry
6857 ; CHECK-PREP10-NEXT: lis r5, 1525
6858 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
6859 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
6860 ; CHECK-PREP10-NEXT: blr
6862 %conv = zext i8 %str to i64
6863 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
6864 store i64 %conv, ptr %add.ptr, align 8
6868 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6869 define dso_local void @st_align64_uint8_t_uint64_t(ptr nocapture %ptr, i8 zeroext %str) {
6870 ; CHECK-P10-LABEL: st_align64_uint8_t_uint64_t:
6871 ; CHECK-P10: # %bb.0: # %entry
6872 ; CHECK-P10-NEXT: pli r5, 244140625
6873 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6874 ; CHECK-P10-NEXT: stdx r4, r3, r5
6875 ; CHECK-P10-NEXT: blr
6877 ; CHECK-PREP10-LABEL: st_align64_uint8_t_uint64_t:
6878 ; CHECK-PREP10: # %bb.0: # %entry
6879 ; CHECK-PREP10-NEXT: lis r5, 3725
6880 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6881 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6882 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
6883 ; CHECK-PREP10-NEXT: blr
6885 %conv = zext i8 %str to i64
6886 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
6887 store i64 %conv, ptr %add.ptr, align 8
6891 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6892 define dso_local void @st_reg_uint8_t_uint64_t(ptr nocapture %ptr, i64 %off, i8 zeroext %str) {
6893 ; CHECK-LABEL: st_reg_uint8_t_uint64_t:
6894 ; CHECK: # %bb.0: # %entry
6895 ; CHECK-NEXT: stdx r5, r3, r4
6898 %conv = zext i8 %str to i64
6899 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
6900 store i64 %conv, ptr %add.ptr, align 8
6904 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6905 define dso_local void @st_or1_uint8_t_uint64_t(i64 %ptr, i8 zeroext %off, i8 zeroext %str) {
6906 ; CHECK-LABEL: st_or1_uint8_t_uint64_t:
6907 ; CHECK: # %bb.0: # %entry
6908 ; CHECK-NEXT: or r3, r4, r3
6909 ; CHECK-NEXT: std r5, 0(r3)
6912 %conv = zext i8 %str to i64
6913 %conv1 = zext i8 %off to i64
6914 %or = or i64 %conv1, %ptr
6915 %0 = inttoptr i64 %or to ptr
6916 store i64 %conv, ptr %0, align 8
6920 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6921 define dso_local void @st_not_disjoint16_uint8_t_uint64_t(i64 %ptr, i8 zeroext %str) {
6922 ; CHECK-LABEL: st_not_disjoint16_uint8_t_uint64_t:
6923 ; CHECK: # %bb.0: # %entry
6924 ; CHECK-NEXT: ori r3, r3, 6
6925 ; CHECK-NEXT: std r4, 0(r3)
6928 %conv = zext i8 %str to i64
6929 %or = or i64 %ptr, 6
6930 %0 = inttoptr i64 %or to ptr
6931 store i64 %conv, ptr %0, align 8
6935 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6936 define dso_local void @st_disjoint_align16_uint8_t_uint64_t(i64 %ptr, i8 zeroext %str) {
6937 ; CHECK-LABEL: st_disjoint_align16_uint8_t_uint64_t:
6938 ; CHECK: # %bb.0: # %entry
6939 ; CHECK-NEXT: rldicr r3, r3, 0, 51
6940 ; CHECK-NEXT: std r4, 24(r3)
6943 %and = and i64 %ptr, -4096
6944 %conv = zext i8 %str to i64
6945 %or = or i64 %and, 24
6946 %0 = inttoptr i64 %or to ptr
6947 store i64 %conv, ptr %0, align 8
6951 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6952 define dso_local void @st_not_disjoint32_uint8_t_uint64_t(i64 %ptr, i8 zeroext %str) {
6953 ; CHECK-LABEL: st_not_disjoint32_uint8_t_uint64_t:
6954 ; CHECK: # %bb.0: # %entry
6955 ; CHECK-NEXT: ori r3, r3, 34463
6956 ; CHECK-NEXT: oris r3, r3, 1
6957 ; CHECK-NEXT: std r4, 0(r3)
6960 %conv = zext i8 %str to i64
6961 %or = or i64 %ptr, 99999
6962 %0 = inttoptr i64 %or to ptr
6963 store i64 %conv, ptr %0, align 8
6967 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6968 define dso_local void @st_disjoint_align32_uint8_t_uint64_t(i64 %ptr, i8 zeroext %str) {
6969 ; CHECK-P10-LABEL: st_disjoint_align32_uint8_t_uint64_t:
6970 ; CHECK-P10: # %bb.0: # %entry
6971 ; CHECK-P10-NEXT: lis r5, -15264
6972 ; CHECK-P10-NEXT: and r3, r3, r5
6973 ; CHECK-P10-NEXT: pstd r4, 999990000(r3), 0
6974 ; CHECK-P10-NEXT: blr
6976 ; CHECK-PREP10-LABEL: st_disjoint_align32_uint8_t_uint64_t:
6977 ; CHECK-PREP10: # %bb.0: # %entry
6978 ; CHECK-PREP10-NEXT: lis r5, -15264
6979 ; CHECK-PREP10-NEXT: and r3, r3, r5
6980 ; CHECK-PREP10-NEXT: lis r5, 15258
6981 ; CHECK-PREP10-NEXT: ori r5, r5, 41712
6982 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
6983 ; CHECK-PREP10-NEXT: blr
6985 %and = and i64 %ptr, -1000341504
6986 %conv = zext i8 %str to i64
6987 %or = or i64 %and, 999990000
6988 %0 = inttoptr i64 %or to ptr
6989 store i64 %conv, ptr %0, align 16
6993 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6994 define dso_local void @st_not_disjoint64_uint8_t_uint64_t(i64 %ptr, i8 zeroext %str) {
6995 ; CHECK-P10-LABEL: st_not_disjoint64_uint8_t_uint64_t:
6996 ; CHECK-P10: # %bb.0: # %entry
6997 ; CHECK-P10-NEXT: pli r5, 232
6998 ; CHECK-P10-NEXT: pli r6, 3567587329
6999 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
7000 ; CHECK-P10-NEXT: or r3, r3, r6
7001 ; CHECK-P10-NEXT: std r4, 0(r3)
7002 ; CHECK-P10-NEXT: blr
7004 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint8_t_uint64_t:
7005 ; CHECK-PREP10: # %bb.0: # %entry
7006 ; CHECK-PREP10-NEXT: li r5, 29
7007 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
7008 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
7009 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
7010 ; CHECK-PREP10-NEXT: or r3, r3, r5
7011 ; CHECK-PREP10-NEXT: std r4, 0(r3)
7012 ; CHECK-PREP10-NEXT: blr
7014 %conv = zext i8 %str to i64
7015 %or = or i64 %ptr, 1000000000001
7016 %0 = inttoptr i64 %or to ptr
7017 store i64 %conv, ptr %0, align 8
7021 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7022 define dso_local void @st_disjoint_align64_uint8_t_uint64_t(i64 %ptr, i8 zeroext %str) {
7023 ; CHECK-P10-LABEL: st_disjoint_align64_uint8_t_uint64_t:
7024 ; CHECK-P10: # %bb.0: # %entry
7025 ; CHECK-P10-NEXT: pli r5, 244140625
7026 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
7027 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
7028 ; CHECK-P10-NEXT: stdx r4, r3, r5
7029 ; CHECK-P10-NEXT: blr
7031 ; CHECK-PREP10-LABEL: st_disjoint_align64_uint8_t_uint64_t:
7032 ; CHECK-PREP10: # %bb.0: # %entry
7033 ; CHECK-PREP10-NEXT: lis r5, 3725
7034 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
7035 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
7036 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
7037 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
7038 ; CHECK-PREP10-NEXT: blr
7040 %and = and i64 %ptr, -1099511627776
7041 %conv = zext i8 %str to i64
7042 %or = or i64 %and, 1000000000000
7043 %0 = inttoptr i64 %or to ptr
7044 store i64 %conv, ptr %0, align 4096
7048 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7049 define dso_local void @st_cst_align16_uint8_t_uint64_t(i8 zeroext %str) {
7050 ; CHECK-LABEL: st_cst_align16_uint8_t_uint64_t:
7051 ; CHECK: # %bb.0: # %entry
7052 ; CHECK-NEXT: std r3, 4080(0)
7055 %conv = zext i8 %str to i64
7056 store i64 %conv, ptr inttoptr (i64 4080 to ptr), align 16
7060 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7061 define dso_local void @st_cst_align32_uint8_t_uint64_t(i8 zeroext %str) {
7062 ; CHECK-LABEL: st_cst_align32_uint8_t_uint64_t:
7063 ; CHECK: # %bb.0: # %entry
7064 ; CHECK-NEXT: lis r4, 153
7065 ; CHECK-NEXT: std r3, -27108(r4)
7068 %conv = zext i8 %str to i64
7069 store i64 %conv, ptr inttoptr (i64 9999900 to ptr), align 8
7073 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7074 define dso_local void @st_cst_align64_uint8_t_uint64_t(i8 zeroext %str) {
7075 ; CHECK-P10-LABEL: st_cst_align64_uint8_t_uint64_t:
7076 ; CHECK-P10: # %bb.0: # %entry
7077 ; CHECK-P10-NEXT: pli r4, 244140625
7078 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7079 ; CHECK-P10-NEXT: std r3, 0(r4)
7080 ; CHECK-P10-NEXT: blr
7082 ; CHECK-PREP10-LABEL: st_cst_align64_uint8_t_uint64_t:
7083 ; CHECK-PREP10: # %bb.0: # %entry
7084 ; CHECK-PREP10-NEXT: lis r4, 3725
7085 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
7086 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
7087 ; CHECK-PREP10-NEXT: std r3, 0(r4)
7088 ; CHECK-PREP10-NEXT: blr
7090 %conv = zext i8 %str to i64
7091 store i64 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
7095 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7096 define dso_local void @st_0_uint8_t_float(i64 %ptr, i8 zeroext %str) {
7097 ; CHECK-LABEL: st_0_uint8_t_float:
7098 ; CHECK: # %bb.0: # %entry
7099 ; CHECK-NEXT: mtfprwz f0, r4
7100 ; CHECK-NEXT: xscvuxdsp f0, f0
7101 ; CHECK-NEXT: stfs f0, 0(r3)
7104 %conv = uitofp i8 %str to float
7105 %0 = inttoptr i64 %ptr to ptr
7106 store float %conv, ptr %0, align 4
7110 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7111 define dso_local void @st_align16_uint8_t_float(ptr nocapture %ptr, i8 zeroext %str) {
7112 ; CHECK-LABEL: st_align16_uint8_t_float:
7113 ; CHECK: # %bb.0: # %entry
7114 ; CHECK-NEXT: mtfprwz f0, r4
7115 ; CHECK-NEXT: xscvuxdsp f0, f0
7116 ; CHECK-NEXT: stfs f0, 8(r3)
7119 %conv = uitofp i8 %str to float
7120 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
7121 store float %conv, ptr %add.ptr, align 4
7125 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7126 define dso_local void @st_align32_uint8_t_float(ptr nocapture %ptr, i8 zeroext %str) {
7127 ; CHECK-P10-LABEL: st_align32_uint8_t_float:
7128 ; CHECK-P10: # %bb.0: # %entry
7129 ; CHECK-P10-NEXT: mtfprwz f0, r4
7130 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
7131 ; CHECK-P10-NEXT: pstfs f0, 99999000(r3), 0
7132 ; CHECK-P10-NEXT: blr
7134 ; CHECK-P9-LABEL: st_align32_uint8_t_float:
7135 ; CHECK-P9: # %bb.0: # %entry
7136 ; CHECK-P9-NEXT: mtfprwz f0, r4
7137 ; CHECK-P9-NEXT: lis r4, 1525
7138 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
7139 ; CHECK-P9-NEXT: ori r4, r4, 56600
7140 ; CHECK-P9-NEXT: stfsx f0, r3, r4
7141 ; CHECK-P9-NEXT: blr
7143 ; CHECK-P8-LABEL: st_align32_uint8_t_float:
7144 ; CHECK-P8: # %bb.0: # %entry
7145 ; CHECK-P8-NEXT: mtfprwz f0, r4
7146 ; CHECK-P8-NEXT: lis r4, 1525
7147 ; CHECK-P8-NEXT: ori r4, r4, 56600
7148 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
7149 ; CHECK-P8-NEXT: stfsx f0, r3, r4
7150 ; CHECK-P8-NEXT: blr
7152 %conv = uitofp i8 %str to float
7153 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
7154 store float %conv, ptr %add.ptr, align 4
7158 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7159 define dso_local void @st_align64_uint8_t_float(ptr nocapture %ptr, i8 zeroext %str) {
7160 ; CHECK-P10-LABEL: st_align64_uint8_t_float:
7161 ; CHECK-P10: # %bb.0: # %entry
7162 ; CHECK-P10-NEXT: mtfprwz f0, r4
7163 ; CHECK-P10-NEXT: pli r4, 244140625
7164 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7165 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
7166 ; CHECK-P10-NEXT: stfsx f0, r3, r4
7167 ; CHECK-P10-NEXT: blr
7169 ; CHECK-P9-LABEL: st_align64_uint8_t_float:
7170 ; CHECK-P9: # %bb.0: # %entry
7171 ; CHECK-P9-NEXT: mtfprwz f0, r4
7172 ; CHECK-P9-NEXT: lis r4, 3725
7173 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
7174 ; CHECK-P9-NEXT: ori r4, r4, 19025
7175 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
7176 ; CHECK-P9-NEXT: stfsx f0, r3, r4
7177 ; CHECK-P9-NEXT: blr
7179 ; CHECK-P8-LABEL: st_align64_uint8_t_float:
7180 ; CHECK-P8: # %bb.0: # %entry
7181 ; CHECK-P8-NEXT: mtfprwz f0, r4
7182 ; CHECK-P8-NEXT: lis r4, 3725
7183 ; CHECK-P8-NEXT: ori r4, r4, 19025
7184 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
7185 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
7186 ; CHECK-P8-NEXT: stfsx f0, r3, r4
7187 ; CHECK-P8-NEXT: blr
7189 %conv = uitofp i8 %str to float
7190 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
7191 store float %conv, ptr %add.ptr, align 4
7195 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7196 define dso_local void @st_reg_uint8_t_float(ptr nocapture %ptr, i64 %off, i8 zeroext %str) {
7197 ; CHECK-LABEL: st_reg_uint8_t_float:
7198 ; CHECK: # %bb.0: # %entry
7199 ; CHECK-NEXT: mtfprwz f0, r5
7200 ; CHECK-NEXT: xscvuxdsp f0, f0
7201 ; CHECK-NEXT: stfsx f0, r3, r4
7204 %conv = uitofp i8 %str to float
7205 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
7206 store float %conv, ptr %add.ptr, align 4
7210 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7211 define dso_local void @st_or1_uint8_t_float(i64 %ptr, i8 zeroext %off, i8 zeroext %str) {
7212 ; CHECK-LABEL: st_or1_uint8_t_float:
7213 ; CHECK: # %bb.0: # %entry
7214 ; CHECK-NEXT: mtfprwz f0, r5
7215 ; CHECK-NEXT: or r3, r4, r3
7216 ; CHECK-NEXT: xscvuxdsp f0, f0
7217 ; CHECK-NEXT: stfs f0, 0(r3)
7220 %conv = uitofp i8 %str to float
7221 %conv1 = zext i8 %off to i64
7222 %or = or i64 %conv1, %ptr
7223 %0 = inttoptr i64 %or to ptr
7224 store float %conv, ptr %0, align 4
7228 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7229 define dso_local void @st_not_disjoint16_uint8_t_float(i64 %ptr, i8 zeroext %str) {
7230 ; CHECK-LABEL: st_not_disjoint16_uint8_t_float:
7231 ; CHECK: # %bb.0: # %entry
7232 ; CHECK-NEXT: mtfprwz f0, r4
7233 ; CHECK-NEXT: ori r3, r3, 6
7234 ; CHECK-NEXT: xscvuxdsp f0, f0
7235 ; CHECK-NEXT: stfs f0, 0(r3)
7238 %conv = uitofp i8 %str to float
7239 %or = or i64 %ptr, 6
7240 %0 = inttoptr i64 %or to ptr
7241 store float %conv, ptr %0, align 4
7245 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7246 define dso_local void @st_disjoint_align16_uint8_t_float(i64 %ptr, i8 zeroext %str) {
7247 ; CHECK-LABEL: st_disjoint_align16_uint8_t_float:
7248 ; CHECK: # %bb.0: # %entry
7249 ; CHECK-NEXT: mtfprwz f0, r4
7250 ; CHECK-NEXT: rldicr r3, r3, 0, 51
7251 ; CHECK-NEXT: xscvuxdsp f0, f0
7252 ; CHECK-NEXT: stfs f0, 24(r3)
7255 %and = and i64 %ptr, -4096
7256 %conv = uitofp i8 %str to float
7257 %or = or i64 %and, 24
7258 %0 = inttoptr i64 %or to ptr
7259 store float %conv, ptr %0, align 8
7263 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7264 define dso_local void @st_not_disjoint32_uint8_t_float(i64 %ptr, i8 zeroext %str) {
7265 ; CHECK-P10-LABEL: st_not_disjoint32_uint8_t_float:
7266 ; CHECK-P10: # %bb.0: # %entry
7267 ; CHECK-P10-NEXT: mtfprwz f0, r4
7268 ; CHECK-P10-NEXT: ori r3, r3, 34463
7269 ; CHECK-P10-NEXT: oris r3, r3, 1
7270 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
7271 ; CHECK-P10-NEXT: stfs f0, 0(r3)
7272 ; CHECK-P10-NEXT: blr
7274 ; CHECK-P9-LABEL: st_not_disjoint32_uint8_t_float:
7275 ; CHECK-P9: # %bb.0: # %entry
7276 ; CHECK-P9-NEXT: mtfprwz f0, r4
7277 ; CHECK-P9-NEXT: ori r3, r3, 34463
7278 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
7279 ; CHECK-P9-NEXT: oris r3, r3, 1
7280 ; CHECK-P9-NEXT: stfs f0, 0(r3)
7281 ; CHECK-P9-NEXT: blr
7283 ; CHECK-P8-LABEL: st_not_disjoint32_uint8_t_float:
7284 ; CHECK-P8: # %bb.0: # %entry
7285 ; CHECK-P8-NEXT: mtfprwz f0, r4
7286 ; CHECK-P8-NEXT: ori r3, r3, 34463
7287 ; CHECK-P8-NEXT: oris r3, r3, 1
7288 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
7289 ; CHECK-P8-NEXT: stfs f0, 0(r3)
7290 ; CHECK-P8-NEXT: blr
7292 %conv = uitofp i8 %str to float
7293 %or = or i64 %ptr, 99999
7294 %0 = inttoptr i64 %or to ptr
7295 store float %conv, ptr %0, align 4
7299 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7300 define dso_local void @st_disjoint_align32_uint8_t_float(i64 %ptr, i8 zeroext %str) {
7301 ; CHECK-P10-LABEL: st_disjoint_align32_uint8_t_float:
7302 ; CHECK-P10: # %bb.0: # %entry
7303 ; CHECK-P10-NEXT: mtfprwz f0, r4
7304 ; CHECK-P10-NEXT: lis r5, -15264
7305 ; CHECK-P10-NEXT: and r3, r3, r5
7306 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
7307 ; CHECK-P10-NEXT: pstfs f0, 999990000(r3), 0
7308 ; CHECK-P10-NEXT: blr
7310 ; CHECK-P9-LABEL: st_disjoint_align32_uint8_t_float:
7311 ; CHECK-P9: # %bb.0: # %entry
7312 ; CHECK-P9-NEXT: mtfprwz f0, r4
7313 ; CHECK-P9-NEXT: lis r5, -15264
7314 ; CHECK-P9-NEXT: lis r4, 15258
7315 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
7316 ; CHECK-P9-NEXT: and r3, r3, r5
7317 ; CHECK-P9-NEXT: ori r4, r4, 41712
7318 ; CHECK-P9-NEXT: stfsx f0, r3, r4
7319 ; CHECK-P9-NEXT: blr
7321 ; CHECK-P8-LABEL: st_disjoint_align32_uint8_t_float:
7322 ; CHECK-P8: # %bb.0: # %entry
7323 ; CHECK-P8-NEXT: mtfprwz f0, r4
7324 ; CHECK-P8-NEXT: lis r5, -15264
7325 ; CHECK-P8-NEXT: lis r4, 15258
7326 ; CHECK-P8-NEXT: and r3, r3, r5
7327 ; CHECK-P8-NEXT: ori r4, r4, 41712
7328 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
7329 ; CHECK-P8-NEXT: stfsx f0, r3, r4
7330 ; CHECK-P8-NEXT: blr
7332 %and = and i64 %ptr, -1000341504
7333 %conv = uitofp i8 %str to float
7334 %or = or i64 %and, 999990000
7335 %0 = inttoptr i64 %or to ptr
7336 store float %conv, ptr %0, align 16
7340 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7341 define dso_local void @st_not_disjoint64_uint8_t_float(i64 %ptr, i8 zeroext %str) {
7342 ; CHECK-P10-LABEL: st_not_disjoint64_uint8_t_float:
7343 ; CHECK-P10: # %bb.0: # %entry
7344 ; CHECK-P10-NEXT: mtfprwz f0, r4
7345 ; CHECK-P10-NEXT: pli r4, 232
7346 ; CHECK-P10-NEXT: pli r5, 3567587329
7347 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
7348 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
7349 ; CHECK-P10-NEXT: or r3, r3, r5
7350 ; CHECK-P10-NEXT: stfs f0, 0(r3)
7351 ; CHECK-P10-NEXT: blr
7353 ; CHECK-P9-LABEL: st_not_disjoint64_uint8_t_float:
7354 ; CHECK-P9: # %bb.0: # %entry
7355 ; CHECK-P9-NEXT: mtfprwz f0, r4
7356 ; CHECK-P9-NEXT: li r4, 29
7357 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
7358 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
7359 ; CHECK-P9-NEXT: oris r4, r4, 54437
7360 ; CHECK-P9-NEXT: ori r4, r4, 4097
7361 ; CHECK-P9-NEXT: or r3, r3, r4
7362 ; CHECK-P9-NEXT: stfs f0, 0(r3)
7363 ; CHECK-P9-NEXT: blr
7365 ; CHECK-P8-LABEL: st_not_disjoint64_uint8_t_float:
7366 ; CHECK-P8: # %bb.0: # %entry
7367 ; CHECK-P8-NEXT: mtfprwz f0, r4
7368 ; CHECK-P8-NEXT: li r4, 29
7369 ; CHECK-P8-NEXT: rldic r4, r4, 35, 24
7370 ; CHECK-P8-NEXT: oris r4, r4, 54437
7371 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
7372 ; CHECK-P8-NEXT: ori r4, r4, 4097
7373 ; CHECK-P8-NEXT: or r3, r3, r4
7374 ; CHECK-P8-NEXT: stfs f0, 0(r3)
7375 ; CHECK-P8-NEXT: blr
7377 %conv = uitofp i8 %str to float
7378 %or = or i64 %ptr, 1000000000001
7379 %0 = inttoptr i64 %or to ptr
7380 store float %conv, ptr %0, align 4
7384 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7385 define dso_local void @st_disjoint_align64_uint8_t_float(i64 %ptr, i8 zeroext %str) {
7386 ; CHECK-P10-LABEL: st_disjoint_align64_uint8_t_float:
7387 ; CHECK-P10: # %bb.0: # %entry
7388 ; CHECK-P10-NEXT: mtfprwz f0, r4
7389 ; CHECK-P10-NEXT: pli r4, 244140625
7390 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
7391 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7392 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
7393 ; CHECK-P10-NEXT: stfsx f0, r3, r4
7394 ; CHECK-P10-NEXT: blr
7396 ; CHECK-P9-LABEL: st_disjoint_align64_uint8_t_float:
7397 ; CHECK-P9: # %bb.0: # %entry
7398 ; CHECK-P9-NEXT: mtfprwz f0, r4
7399 ; CHECK-P9-NEXT: lis r4, 3725
7400 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
7401 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
7402 ; CHECK-P9-NEXT: ori r4, r4, 19025
7403 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
7404 ; CHECK-P9-NEXT: stfsx f0, r3, r4
7405 ; CHECK-P9-NEXT: blr
7407 ; CHECK-P8-LABEL: st_disjoint_align64_uint8_t_float:
7408 ; CHECK-P8: # %bb.0: # %entry
7409 ; CHECK-P8-NEXT: mtfprwz f0, r4
7410 ; CHECK-P8-NEXT: lis r4, 3725
7411 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
7412 ; CHECK-P8-NEXT: ori r4, r4, 19025
7413 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
7414 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
7415 ; CHECK-P8-NEXT: stfsx f0, r3, r4
7416 ; CHECK-P8-NEXT: blr
7418 %and = and i64 %ptr, -1099511627776
7419 %conv = uitofp i8 %str to float
7420 %or = or i64 %and, 1000000000000
7421 %0 = inttoptr i64 %or to ptr
7422 store float %conv, ptr %0, align 4096
7426 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7427 define dso_local void @st_cst_align16_uint8_t_float(i8 zeroext %str) {
7428 ; CHECK-LABEL: st_cst_align16_uint8_t_float:
7429 ; CHECK: # %bb.0: # %entry
7430 ; CHECK-NEXT: mtfprwz f0, r3
7431 ; CHECK-NEXT: xscvuxdsp f0, f0
7432 ; CHECK-NEXT: stfs f0, 4080(0)
7435 %conv = uitofp i8 %str to float
7436 store float %conv, ptr inttoptr (i64 4080 to ptr), align 16
7440 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7441 define dso_local void @st_cst_align32_uint8_t_float(i8 zeroext %str) {
7442 ; CHECK-LABEL: st_cst_align32_uint8_t_float:
7443 ; CHECK: # %bb.0: # %entry
7444 ; CHECK-NEXT: mtfprwz f0, r3
7445 ; CHECK-NEXT: lis r3, 153
7446 ; CHECK-NEXT: xscvuxdsp f0, f0
7447 ; CHECK-NEXT: stfs f0, -27108(r3)
7450 %conv = uitofp i8 %str to float
7451 store float %conv, ptr inttoptr (i64 9999900 to ptr), align 4
7455 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7456 define dso_local void @st_cst_align64_uint8_t_float(i8 zeroext %str) {
7457 ; CHECK-P10-LABEL: st_cst_align64_uint8_t_float:
7458 ; CHECK-P10: # %bb.0: # %entry
7459 ; CHECK-P10-NEXT: mtfprwz f0, r3
7460 ; CHECK-P10-NEXT: pli r3, 244140625
7461 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
7462 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
7463 ; CHECK-P10-NEXT: stfs f0, 0(r3)
7464 ; CHECK-P10-NEXT: blr
7466 ; CHECK-P9-LABEL: st_cst_align64_uint8_t_float:
7467 ; CHECK-P9: # %bb.0: # %entry
7468 ; CHECK-P9-NEXT: mtfprwz f0, r3
7469 ; CHECK-P9-NEXT: lis r3, 3725
7470 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
7471 ; CHECK-P9-NEXT: ori r3, r3, 19025
7472 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
7473 ; CHECK-P9-NEXT: stfs f0, 0(r3)
7474 ; CHECK-P9-NEXT: blr
7476 ; CHECK-P8-LABEL: st_cst_align64_uint8_t_float:
7477 ; CHECK-P8: # %bb.0: # %entry
7478 ; CHECK-P8-NEXT: mtfprwz f0, r3
7479 ; CHECK-P8-NEXT: lis r3, 3725
7480 ; CHECK-P8-NEXT: ori r3, r3, 19025
7481 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
7482 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
7483 ; CHECK-P8-NEXT: stfs f0, 0(r3)
7484 ; CHECK-P8-NEXT: blr
7486 %conv = uitofp i8 %str to float
7487 store float %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
7491 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7492 define dso_local void @st_0_uint8_t_double(i64 %ptr, i8 zeroext %str) {
7493 ; CHECK-LABEL: st_0_uint8_t_double:
7494 ; CHECK: # %bb.0: # %entry
7495 ; CHECK-NEXT: mtfprwz f0, r4
7496 ; CHECK-NEXT: xscvuxddp f0, f0
7497 ; CHECK-NEXT: stfd f0, 0(r3)
7500 %conv = uitofp i8 %str to double
7501 %0 = inttoptr i64 %ptr to ptr
7502 store double %conv, ptr %0, align 8
7506 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7507 define dso_local void @st_align16_uint8_t_double(ptr nocapture %ptr, i8 zeroext %str) {
7508 ; CHECK-LABEL: st_align16_uint8_t_double:
7509 ; CHECK: # %bb.0: # %entry
7510 ; CHECK-NEXT: mtfprwz f0, r4
7511 ; CHECK-NEXT: xscvuxddp f0, f0
7512 ; CHECK-NEXT: stfd f0, 8(r3)
7515 %conv = uitofp i8 %str to double
7516 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
7517 store double %conv, ptr %add.ptr, align 8
7521 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7522 define dso_local void @st_align32_uint8_t_double(ptr nocapture %ptr, i8 zeroext %str) {
7523 ; CHECK-P10-LABEL: st_align32_uint8_t_double:
7524 ; CHECK-P10: # %bb.0: # %entry
7525 ; CHECK-P10-NEXT: mtfprwz f0, r4
7526 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7527 ; CHECK-P10-NEXT: pstfd f0, 99999000(r3), 0
7528 ; CHECK-P10-NEXT: blr
7530 ; CHECK-P9-LABEL: st_align32_uint8_t_double:
7531 ; CHECK-P9: # %bb.0: # %entry
7532 ; CHECK-P9-NEXT: mtfprwz f0, r4
7533 ; CHECK-P9-NEXT: lis r4, 1525
7534 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7535 ; CHECK-P9-NEXT: ori r4, r4, 56600
7536 ; CHECK-P9-NEXT: stfdx f0, r3, r4
7537 ; CHECK-P9-NEXT: blr
7539 ; CHECK-P8-LABEL: st_align32_uint8_t_double:
7540 ; CHECK-P8: # %bb.0: # %entry
7541 ; CHECK-P8-NEXT: mtfprwz f0, r4
7542 ; CHECK-P8-NEXT: lis r4, 1525
7543 ; CHECK-P8-NEXT: ori r4, r4, 56600
7544 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7545 ; CHECK-P8-NEXT: stfdx f0, r3, r4
7546 ; CHECK-P8-NEXT: blr
7548 %conv = uitofp i8 %str to double
7549 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
7550 store double %conv, ptr %add.ptr, align 8
7554 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7555 define dso_local void @st_align64_uint8_t_double(ptr nocapture %ptr, i8 zeroext %str) {
7556 ; CHECK-P10-LABEL: st_align64_uint8_t_double:
7557 ; CHECK-P10: # %bb.0: # %entry
7558 ; CHECK-P10-NEXT: mtfprwz f0, r4
7559 ; CHECK-P10-NEXT: pli r4, 244140625
7560 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7561 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7562 ; CHECK-P10-NEXT: stfdx f0, r3, r4
7563 ; CHECK-P10-NEXT: blr
7565 ; CHECK-P9-LABEL: st_align64_uint8_t_double:
7566 ; CHECK-P9: # %bb.0: # %entry
7567 ; CHECK-P9-NEXT: mtfprwz f0, r4
7568 ; CHECK-P9-NEXT: lis r4, 3725
7569 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7570 ; CHECK-P9-NEXT: ori r4, r4, 19025
7571 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
7572 ; CHECK-P9-NEXT: stfdx f0, r3, r4
7573 ; CHECK-P9-NEXT: blr
7575 ; CHECK-P8-LABEL: st_align64_uint8_t_double:
7576 ; CHECK-P8: # %bb.0: # %entry
7577 ; CHECK-P8-NEXT: mtfprwz f0, r4
7578 ; CHECK-P8-NEXT: lis r4, 3725
7579 ; CHECK-P8-NEXT: ori r4, r4, 19025
7580 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
7581 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7582 ; CHECK-P8-NEXT: stfdx f0, r3, r4
7583 ; CHECK-P8-NEXT: blr
7585 %conv = uitofp i8 %str to double
7586 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
7587 store double %conv, ptr %add.ptr, align 8
7591 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7592 define dso_local void @st_reg_uint8_t_double(ptr nocapture %ptr, i64 %off, i8 zeroext %str) {
7593 ; CHECK-LABEL: st_reg_uint8_t_double:
7594 ; CHECK: # %bb.0: # %entry
7595 ; CHECK-NEXT: mtfprwz f0, r5
7596 ; CHECK-NEXT: xscvuxddp f0, f0
7597 ; CHECK-NEXT: stfdx f0, r3, r4
7600 %conv = uitofp i8 %str to double
7601 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
7602 store double %conv, ptr %add.ptr, align 8
7606 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7607 define dso_local void @st_or1_uint8_t_double(i64 %ptr, i8 zeroext %off, i8 zeroext %str) {
7608 ; CHECK-LABEL: st_or1_uint8_t_double:
7609 ; CHECK: # %bb.0: # %entry
7610 ; CHECK-NEXT: mtfprwz f0, r5
7611 ; CHECK-NEXT: or r3, r4, r3
7612 ; CHECK-NEXT: xscvuxddp f0, f0
7613 ; CHECK-NEXT: stfd f0, 0(r3)
7616 %conv = uitofp i8 %str to double
7617 %conv1 = zext i8 %off to i64
7618 %or = or i64 %conv1, %ptr
7619 %0 = inttoptr i64 %or to ptr
7620 store double %conv, ptr %0, align 8
7624 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7625 define dso_local void @st_not_disjoint16_uint8_t_double(i64 %ptr, i8 zeroext %str) {
7626 ; CHECK-LABEL: st_not_disjoint16_uint8_t_double:
7627 ; CHECK: # %bb.0: # %entry
7628 ; CHECK-NEXT: mtfprwz f0, r4
7629 ; CHECK-NEXT: ori r3, r3, 6
7630 ; CHECK-NEXT: xscvuxddp f0, f0
7631 ; CHECK-NEXT: stfd f0, 0(r3)
7634 %conv = uitofp i8 %str to double
7635 %or = or i64 %ptr, 6
7636 %0 = inttoptr i64 %or to ptr
7637 store double %conv, ptr %0, align 8
7641 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7642 define dso_local void @st_disjoint_align16_uint8_t_double(i64 %ptr, i8 zeroext %str) {
7643 ; CHECK-LABEL: st_disjoint_align16_uint8_t_double:
7644 ; CHECK: # %bb.0: # %entry
7645 ; CHECK-NEXT: mtfprwz f0, r4
7646 ; CHECK-NEXT: rldicr r3, r3, 0, 51
7647 ; CHECK-NEXT: xscvuxddp f0, f0
7648 ; CHECK-NEXT: stfd f0, 24(r3)
7651 %and = and i64 %ptr, -4096
7652 %conv = uitofp i8 %str to double
7653 %or = or i64 %and, 24
7654 %0 = inttoptr i64 %or to ptr
7655 store double %conv, ptr %0, align 8
7659 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7660 define dso_local void @st_not_disjoint32_uint8_t_double(i64 %ptr, i8 zeroext %str) {
7661 ; CHECK-P10-LABEL: st_not_disjoint32_uint8_t_double:
7662 ; CHECK-P10: # %bb.0: # %entry
7663 ; CHECK-P10-NEXT: mtfprwz f0, r4
7664 ; CHECK-P10-NEXT: ori r3, r3, 34463
7665 ; CHECK-P10-NEXT: oris r3, r3, 1
7666 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7667 ; CHECK-P10-NEXT: stfd f0, 0(r3)
7668 ; CHECK-P10-NEXT: blr
7670 ; CHECK-P9-LABEL: st_not_disjoint32_uint8_t_double:
7671 ; CHECK-P9: # %bb.0: # %entry
7672 ; CHECK-P9-NEXT: mtfprwz f0, r4
7673 ; CHECK-P9-NEXT: ori r3, r3, 34463
7674 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7675 ; CHECK-P9-NEXT: oris r3, r3, 1
7676 ; CHECK-P9-NEXT: stfd f0, 0(r3)
7677 ; CHECK-P9-NEXT: blr
7679 ; CHECK-P8-LABEL: st_not_disjoint32_uint8_t_double:
7680 ; CHECK-P8: # %bb.0: # %entry
7681 ; CHECK-P8-NEXT: mtfprwz f0, r4
7682 ; CHECK-P8-NEXT: ori r3, r3, 34463
7683 ; CHECK-P8-NEXT: oris r3, r3, 1
7684 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7685 ; CHECK-P8-NEXT: stfd f0, 0(r3)
7686 ; CHECK-P8-NEXT: blr
7688 %conv = uitofp i8 %str to double
7689 %or = or i64 %ptr, 99999
7690 %0 = inttoptr i64 %or to ptr
7691 store double %conv, ptr %0, align 8
7695 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7696 define dso_local void @st_disjoint_align32_uint8_t_double(i64 %ptr, i8 zeroext %str) {
7697 ; CHECK-P10-LABEL: st_disjoint_align32_uint8_t_double:
7698 ; CHECK-P10: # %bb.0: # %entry
7699 ; CHECK-P10-NEXT: mtfprwz f0, r4
7700 ; CHECK-P10-NEXT: lis r5, -15264
7701 ; CHECK-P10-NEXT: and r3, r3, r5
7702 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7703 ; CHECK-P10-NEXT: pstfd f0, 999990000(r3), 0
7704 ; CHECK-P10-NEXT: blr
7706 ; CHECK-P9-LABEL: st_disjoint_align32_uint8_t_double:
7707 ; CHECK-P9: # %bb.0: # %entry
7708 ; CHECK-P9-NEXT: mtfprwz f0, r4
7709 ; CHECK-P9-NEXT: lis r5, -15264
7710 ; CHECK-P9-NEXT: lis r4, 15258
7711 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7712 ; CHECK-P9-NEXT: and r3, r3, r5
7713 ; CHECK-P9-NEXT: ori r4, r4, 41712
7714 ; CHECK-P9-NEXT: stfdx f0, r3, r4
7715 ; CHECK-P9-NEXT: blr
7717 ; CHECK-P8-LABEL: st_disjoint_align32_uint8_t_double:
7718 ; CHECK-P8: # %bb.0: # %entry
7719 ; CHECK-P8-NEXT: mtfprwz f0, r4
7720 ; CHECK-P8-NEXT: lis r5, -15264
7721 ; CHECK-P8-NEXT: lis r4, 15258
7722 ; CHECK-P8-NEXT: and r3, r3, r5
7723 ; CHECK-P8-NEXT: ori r4, r4, 41712
7724 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7725 ; CHECK-P8-NEXT: stfdx f0, r3, r4
7726 ; CHECK-P8-NEXT: blr
7728 %and = and i64 %ptr, -1000341504
7729 %conv = uitofp i8 %str to double
7730 %or = or i64 %and, 999990000
7731 %0 = inttoptr i64 %or to ptr
7732 store double %conv, ptr %0, align 16
7736 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7737 define dso_local void @st_not_disjoint64_uint8_t_double(i64 %ptr, i8 zeroext %str) {
7738 ; CHECK-P10-LABEL: st_not_disjoint64_uint8_t_double:
7739 ; CHECK-P10: # %bb.0: # %entry
7740 ; CHECK-P10-NEXT: mtfprwz f0, r4
7741 ; CHECK-P10-NEXT: pli r4, 232
7742 ; CHECK-P10-NEXT: pli r5, 3567587329
7743 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
7744 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7745 ; CHECK-P10-NEXT: or r3, r3, r5
7746 ; CHECK-P10-NEXT: stfd f0, 0(r3)
7747 ; CHECK-P10-NEXT: blr
7749 ; CHECK-P9-LABEL: st_not_disjoint64_uint8_t_double:
7750 ; CHECK-P9: # %bb.0: # %entry
7751 ; CHECK-P9-NEXT: mtfprwz f0, r4
7752 ; CHECK-P9-NEXT: li r4, 29
7753 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
7754 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7755 ; CHECK-P9-NEXT: oris r4, r4, 54437
7756 ; CHECK-P9-NEXT: ori r4, r4, 4097
7757 ; CHECK-P9-NEXT: or r3, r3, r4
7758 ; CHECK-P9-NEXT: stfd f0, 0(r3)
7759 ; CHECK-P9-NEXT: blr
7761 ; CHECK-P8-LABEL: st_not_disjoint64_uint8_t_double:
7762 ; CHECK-P8: # %bb.0: # %entry
7763 ; CHECK-P8-NEXT: mtfprwz f0, r4
7764 ; CHECK-P8-NEXT: li r4, 29
7765 ; CHECK-P8-NEXT: rldic r4, r4, 35, 24
7766 ; CHECK-P8-NEXT: oris r4, r4, 54437
7767 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7768 ; CHECK-P8-NEXT: ori r4, r4, 4097
7769 ; CHECK-P8-NEXT: or r3, r3, r4
7770 ; CHECK-P8-NEXT: stfd f0, 0(r3)
7771 ; CHECK-P8-NEXT: blr
7773 %conv = uitofp i8 %str to double
7774 %or = or i64 %ptr, 1000000000001
7775 %0 = inttoptr i64 %or to ptr
7776 store double %conv, ptr %0, align 8
7780 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7781 define dso_local void @st_disjoint_align64_uint8_t_double(i64 %ptr, i8 zeroext %str) {
7782 ; CHECK-P10-LABEL: st_disjoint_align64_uint8_t_double:
7783 ; CHECK-P10: # %bb.0: # %entry
7784 ; CHECK-P10-NEXT: mtfprwz f0, r4
7785 ; CHECK-P10-NEXT: pli r4, 244140625
7786 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
7787 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7788 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7789 ; CHECK-P10-NEXT: stfdx f0, r3, r4
7790 ; CHECK-P10-NEXT: blr
7792 ; CHECK-P9-LABEL: st_disjoint_align64_uint8_t_double:
7793 ; CHECK-P9: # %bb.0: # %entry
7794 ; CHECK-P9-NEXT: mtfprwz f0, r4
7795 ; CHECK-P9-NEXT: lis r4, 3725
7796 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
7797 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7798 ; CHECK-P9-NEXT: ori r4, r4, 19025
7799 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
7800 ; CHECK-P9-NEXT: stfdx f0, r3, r4
7801 ; CHECK-P9-NEXT: blr
7803 ; CHECK-P8-LABEL: st_disjoint_align64_uint8_t_double:
7804 ; CHECK-P8: # %bb.0: # %entry
7805 ; CHECK-P8-NEXT: mtfprwz f0, r4
7806 ; CHECK-P8-NEXT: lis r4, 3725
7807 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
7808 ; CHECK-P8-NEXT: ori r4, r4, 19025
7809 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
7810 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7811 ; CHECK-P8-NEXT: stfdx f0, r3, r4
7812 ; CHECK-P8-NEXT: blr
7814 %and = and i64 %ptr, -1099511627776
7815 %conv = uitofp i8 %str to double
7816 %or = or i64 %and, 1000000000000
7817 %0 = inttoptr i64 %or to ptr
7818 store double %conv, ptr %0, align 4096
7822 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7823 define dso_local void @st_cst_align16_uint8_t_double(i8 zeroext %str) {
7824 ; CHECK-LABEL: st_cst_align16_uint8_t_double:
7825 ; CHECK: # %bb.0: # %entry
7826 ; CHECK-NEXT: mtfprwz f0, r3
7827 ; CHECK-NEXT: xscvuxddp f0, f0
7828 ; CHECK-NEXT: stfd f0, 4080(0)
7831 %conv = uitofp i8 %str to double
7832 store double %conv, ptr inttoptr (i64 4080 to ptr), align 16
7836 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7837 define dso_local void @st_cst_align32_uint8_t_double(i8 zeroext %str) {
7838 ; CHECK-LABEL: st_cst_align32_uint8_t_double:
7839 ; CHECK: # %bb.0: # %entry
7840 ; CHECK-NEXT: mtfprwz f0, r3
7841 ; CHECK-NEXT: lis r3, 153
7842 ; CHECK-NEXT: xscvuxddp f0, f0
7843 ; CHECK-NEXT: stfd f0, -27108(r3)
7846 %conv = uitofp i8 %str to double
7847 store double %conv, ptr inttoptr (i64 9999900 to ptr), align 8
7851 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7852 define dso_local void @st_cst_align64_uint8_t_double(i8 zeroext %str) {
7853 ; CHECK-P10-LABEL: st_cst_align64_uint8_t_double:
7854 ; CHECK-P10: # %bb.0: # %entry
7855 ; CHECK-P10-NEXT: mtfprwz f0, r3
7856 ; CHECK-P10-NEXT: pli r3, 244140625
7857 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
7858 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7859 ; CHECK-P10-NEXT: stfd f0, 0(r3)
7860 ; CHECK-P10-NEXT: blr
7862 ; CHECK-P9-LABEL: st_cst_align64_uint8_t_double:
7863 ; CHECK-P9: # %bb.0: # %entry
7864 ; CHECK-P9-NEXT: mtfprwz f0, r3
7865 ; CHECK-P9-NEXT: lis r3, 3725
7866 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7867 ; CHECK-P9-NEXT: ori r3, r3, 19025
7868 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
7869 ; CHECK-P9-NEXT: stfd f0, 0(r3)
7870 ; CHECK-P9-NEXT: blr
7872 ; CHECK-P8-LABEL: st_cst_align64_uint8_t_double:
7873 ; CHECK-P8: # %bb.0: # %entry
7874 ; CHECK-P8-NEXT: mtfprwz f0, r3
7875 ; CHECK-P8-NEXT: lis r3, 3725
7876 ; CHECK-P8-NEXT: ori r3, r3, 19025
7877 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
7878 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7879 ; CHECK-P8-NEXT: stfd f0, 0(r3)
7880 ; CHECK-P8-NEXT: blr
7882 %conv = uitofp i8 %str to double
7883 store double %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
7887 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7888 define dso_local void @st_0_int8_t_uint16_t(i64 %ptr, i8 signext %str) {
7889 ; CHECK-LABEL: st_0_int8_t_uint16_t:
7890 ; CHECK: # %bb.0: # %entry
7891 ; CHECK-NEXT: sth r4, 0(r3)
7894 %conv = sext i8 %str to i16
7895 %0 = inttoptr i64 %ptr to ptr
7896 store i16 %conv, ptr %0, align 2
7900 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7901 define dso_local void @st_align16_int8_t_uint16_t(ptr nocapture %ptr, i8 signext %str) {
7902 ; CHECK-LABEL: st_align16_int8_t_uint16_t:
7903 ; CHECK: # %bb.0: # %entry
7904 ; CHECK-NEXT: sth r4, 8(r3)
7907 %conv = sext i8 %str to i16
7908 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
7909 store i16 %conv, ptr %add.ptr, align 2
7913 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7914 define dso_local void @st_align32_int8_t_uint16_t(ptr nocapture %ptr, i8 signext %str) {
7915 ; CHECK-P10-LABEL: st_align32_int8_t_uint16_t:
7916 ; CHECK-P10: # %bb.0: # %entry
7917 ; CHECK-P10-NEXT: psth r4, 99999000(r3), 0
7918 ; CHECK-P10-NEXT: blr
7920 ; CHECK-PREP10-LABEL: st_align32_int8_t_uint16_t:
7921 ; CHECK-PREP10: # %bb.0: # %entry
7922 ; CHECK-PREP10-NEXT: lis r5, 1525
7923 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
7924 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
7925 ; CHECK-PREP10-NEXT: blr
7927 %conv = sext i8 %str to i16
7928 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
7929 store i16 %conv, ptr %add.ptr, align 2
7933 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7934 define dso_local void @st_align64_int8_t_uint16_t(ptr nocapture %ptr, i8 signext %str) {
7935 ; CHECK-P10-LABEL: st_align64_int8_t_uint16_t:
7936 ; CHECK-P10: # %bb.0: # %entry
7937 ; CHECK-P10-NEXT: pli r5, 244140625
7938 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
7939 ; CHECK-P10-NEXT: sthx r4, r3, r5
7940 ; CHECK-P10-NEXT: blr
7942 ; CHECK-PREP10-LABEL: st_align64_int8_t_uint16_t:
7943 ; CHECK-PREP10: # %bb.0: # %entry
7944 ; CHECK-PREP10-NEXT: lis r5, 3725
7945 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
7946 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
7947 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
7948 ; CHECK-PREP10-NEXT: blr
7950 %conv = sext i8 %str to i16
7951 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
7952 store i16 %conv, ptr %add.ptr, align 2
7956 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7957 define dso_local void @st_reg_int8_t_uint16_t(ptr nocapture %ptr, i64 %off, i8 signext %str) {
7958 ; CHECK-LABEL: st_reg_int8_t_uint16_t:
7959 ; CHECK: # %bb.0: # %entry
7960 ; CHECK-NEXT: sthx r5, r3, r4
7963 %conv = sext i8 %str to i16
7964 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
7965 store i16 %conv, ptr %add.ptr, align 2
7969 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7970 define dso_local void @st_or1_int8_t_uint16_t(i64 %ptr, i8 zeroext %off, i8 signext %str) {
7971 ; CHECK-LABEL: st_or1_int8_t_uint16_t:
7972 ; CHECK: # %bb.0: # %entry
7973 ; CHECK-NEXT: or r3, r4, r3
7974 ; CHECK-NEXT: sth r5, 0(r3)
7977 %conv = sext i8 %str to i16
7978 %conv1 = zext i8 %off to i64
7979 %or = or i64 %conv1, %ptr
7980 %0 = inttoptr i64 %or to ptr
7981 store i16 %conv, ptr %0, align 2
7985 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7986 define dso_local void @st_not_disjoint16_int8_t_uint16_t(i64 %ptr, i8 signext %str) {
7987 ; CHECK-LABEL: st_not_disjoint16_int8_t_uint16_t:
7988 ; CHECK: # %bb.0: # %entry
7989 ; CHECK-NEXT: ori r3, r3, 6
7990 ; CHECK-NEXT: sth r4, 0(r3)
7993 %conv = sext i8 %str to i16
7994 %or = or i64 %ptr, 6
7995 %0 = inttoptr i64 %or to ptr
7996 store i16 %conv, ptr %0, align 2
8000 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8001 define dso_local void @st_disjoint_align16_int8_t_uint16_t(i64 %ptr, i8 signext %str) {
8002 ; CHECK-LABEL: st_disjoint_align16_int8_t_uint16_t:
8003 ; CHECK: # %bb.0: # %entry
8004 ; CHECK-NEXT: rldicr r3, r3, 0, 51
8005 ; CHECK-NEXT: sth r4, 24(r3)
8008 %and = and i64 %ptr, -4096
8009 %conv = sext i8 %str to i16
8010 %or = or i64 %and, 24
8011 %0 = inttoptr i64 %or to ptr
8012 store i16 %conv, ptr %0, align 8
8016 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8017 define dso_local void @st_not_disjoint32_int8_t_uint16_t(i64 %ptr, i8 signext %str) {
8018 ; CHECK-LABEL: st_not_disjoint32_int8_t_uint16_t:
8019 ; CHECK: # %bb.0: # %entry
8020 ; CHECK-NEXT: ori r3, r3, 34463
8021 ; CHECK-NEXT: oris r3, r3, 1
8022 ; CHECK-NEXT: sth r4, 0(r3)
8025 %conv = sext i8 %str to i16
8026 %or = or i64 %ptr, 99999
8027 %0 = inttoptr i64 %or to ptr
8028 store i16 %conv, ptr %0, align 2
8032 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8033 define dso_local void @st_disjoint_align32_int8_t_uint16_t(i64 %ptr, i8 signext %str) {
8034 ; CHECK-P10-LABEL: st_disjoint_align32_int8_t_uint16_t:
8035 ; CHECK-P10: # %bb.0: # %entry
8036 ; CHECK-P10-NEXT: lis r5, -15264
8037 ; CHECK-P10-NEXT: and r3, r3, r5
8038 ; CHECK-P10-NEXT: psth r4, 999990000(r3), 0
8039 ; CHECK-P10-NEXT: blr
8041 ; CHECK-PREP10-LABEL: st_disjoint_align32_int8_t_uint16_t:
8042 ; CHECK-PREP10: # %bb.0: # %entry
8043 ; CHECK-PREP10-NEXT: lis r5, -15264
8044 ; CHECK-PREP10-NEXT: and r3, r3, r5
8045 ; CHECK-PREP10-NEXT: lis r5, 15258
8046 ; CHECK-PREP10-NEXT: ori r5, r5, 41712
8047 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
8048 ; CHECK-PREP10-NEXT: blr
8050 %and = and i64 %ptr, -1000341504
8051 %conv = sext i8 %str to i16
8052 %or = or i64 %and, 999990000
8053 %0 = inttoptr i64 %or to ptr
8054 store i16 %conv, ptr %0, align 16
8058 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8059 define dso_local void @st_not_disjoint64_int8_t_uint16_t(i64 %ptr, i8 signext %str) {
8060 ; CHECK-P10-LABEL: st_not_disjoint64_int8_t_uint16_t:
8061 ; CHECK-P10: # %bb.0: # %entry
8062 ; CHECK-P10-NEXT: pli r5, 232
8063 ; CHECK-P10-NEXT: pli r6, 3567587329
8064 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
8065 ; CHECK-P10-NEXT: or r3, r3, r6
8066 ; CHECK-P10-NEXT: sth r4, 0(r3)
8067 ; CHECK-P10-NEXT: blr
8069 ; CHECK-PREP10-LABEL: st_not_disjoint64_int8_t_uint16_t:
8070 ; CHECK-PREP10: # %bb.0: # %entry
8071 ; CHECK-PREP10-NEXT: li r5, 29
8072 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
8073 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
8074 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
8075 ; CHECK-PREP10-NEXT: or r3, r3, r5
8076 ; CHECK-PREP10-NEXT: sth r4, 0(r3)
8077 ; CHECK-PREP10-NEXT: blr
8079 %conv = sext i8 %str to i16
8080 %or = or i64 %ptr, 1000000000001
8081 %0 = inttoptr i64 %or to ptr
8082 store i16 %conv, ptr %0, align 2
8086 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8087 define dso_local void @st_disjoint_align64_int8_t_uint16_t(i64 %ptr, i8 signext %str) {
8088 ; CHECK-P10-LABEL: st_disjoint_align64_int8_t_uint16_t:
8089 ; CHECK-P10: # %bb.0: # %entry
8090 ; CHECK-P10-NEXT: pli r5, 244140625
8091 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
8092 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
8093 ; CHECK-P10-NEXT: sthx r4, r3, r5
8094 ; CHECK-P10-NEXT: blr
8096 ; CHECK-PREP10-LABEL: st_disjoint_align64_int8_t_uint16_t:
8097 ; CHECK-PREP10: # %bb.0: # %entry
8098 ; CHECK-PREP10-NEXT: lis r5, 3725
8099 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
8100 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
8101 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
8102 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
8103 ; CHECK-PREP10-NEXT: blr
8105 %and = and i64 %ptr, -1099511627776
8106 %conv = sext i8 %str to i16
8107 %or = or i64 %and, 1000000000000
8108 %0 = inttoptr i64 %or to ptr
8109 store i16 %conv, ptr %0, align 4096
8113 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8114 define dso_local void @st_cst_align16_int8_t_uint16_t(i8 signext %str) {
8115 ; CHECK-LABEL: st_cst_align16_int8_t_uint16_t:
8116 ; CHECK: # %bb.0: # %entry
8117 ; CHECK-NEXT: sth r3, 4080(0)
8120 %conv = sext i8 %str to i16
8121 store i16 %conv, ptr inttoptr (i64 4080 to ptr), align 16
8125 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8126 define dso_local void @st_cst_align32_int8_t_uint16_t(i8 signext %str) {
8127 ; CHECK-LABEL: st_cst_align32_int8_t_uint16_t:
8128 ; CHECK: # %bb.0: # %entry
8129 ; CHECK-NEXT: lis r4, 153
8130 ; CHECK-NEXT: sth r3, -27108(r4)
8133 %conv = sext i8 %str to i16
8134 store i16 %conv, ptr inttoptr (i64 9999900 to ptr), align 4
8138 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8139 define dso_local void @st_cst_align64_int8_t_uint16_t(i8 signext %str) {
8140 ; CHECK-P10-LABEL: st_cst_align64_int8_t_uint16_t:
8141 ; CHECK-P10: # %bb.0: # %entry
8142 ; CHECK-P10-NEXT: pli r4, 244140625
8143 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
8144 ; CHECK-P10-NEXT: sth r3, 0(r4)
8145 ; CHECK-P10-NEXT: blr
8147 ; CHECK-PREP10-LABEL: st_cst_align64_int8_t_uint16_t:
8148 ; CHECK-PREP10: # %bb.0: # %entry
8149 ; CHECK-PREP10-NEXT: lis r4, 3725
8150 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
8151 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
8152 ; CHECK-PREP10-NEXT: sth r3, 0(r4)
8153 ; CHECK-PREP10-NEXT: blr
8155 %conv = sext i8 %str to i16
8156 store i16 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
8160 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8161 define dso_local void @st_0_int8_t_uint32_t(i64 %ptr, i8 signext %str) {
8162 ; CHECK-LABEL: st_0_int8_t_uint32_t:
8163 ; CHECK: # %bb.0: # %entry
8164 ; CHECK-NEXT: stw r4, 0(r3)
8167 %conv = sext i8 %str to i32
8168 %0 = inttoptr i64 %ptr to ptr
8169 store i32 %conv, ptr %0, align 4
8173 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8174 define dso_local void @st_align16_int8_t_uint32_t(ptr nocapture %ptr, i8 signext %str) {
8175 ; CHECK-LABEL: st_align16_int8_t_uint32_t:
8176 ; CHECK: # %bb.0: # %entry
8177 ; CHECK-NEXT: stw r4, 8(r3)
8180 %conv = sext i8 %str to i32
8181 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
8182 store i32 %conv, ptr %add.ptr, align 4
8186 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8187 define dso_local void @st_align32_int8_t_uint32_t(ptr nocapture %ptr, i8 signext %str) {
8188 ; CHECK-P10-LABEL: st_align32_int8_t_uint32_t:
8189 ; CHECK-P10: # %bb.0: # %entry
8190 ; CHECK-P10-NEXT: pstw r4, 99999000(r3), 0
8191 ; CHECK-P10-NEXT: blr
8193 ; CHECK-PREP10-LABEL: st_align32_int8_t_uint32_t:
8194 ; CHECK-PREP10: # %bb.0: # %entry
8195 ; CHECK-PREP10-NEXT: lis r5, 1525
8196 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
8197 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
8198 ; CHECK-PREP10-NEXT: blr
8200 %conv = sext i8 %str to i32
8201 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
8202 store i32 %conv, ptr %add.ptr, align 4
8206 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8207 define dso_local void @st_align64_int8_t_uint32_t(ptr nocapture %ptr, i8 signext %str) {
8208 ; CHECK-P10-LABEL: st_align64_int8_t_uint32_t:
8209 ; CHECK-P10: # %bb.0: # %entry
8210 ; CHECK-P10-NEXT: pli r5, 244140625
8211 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
8212 ; CHECK-P10-NEXT: stwx r4, r3, r5
8213 ; CHECK-P10-NEXT: blr
8215 ; CHECK-PREP10-LABEL: st_align64_int8_t_uint32_t:
8216 ; CHECK-PREP10: # %bb.0: # %entry
8217 ; CHECK-PREP10-NEXT: lis r5, 3725
8218 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
8219 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
8220 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
8221 ; CHECK-PREP10-NEXT: blr
8223 %conv = sext i8 %str to i32
8224 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
8225 store i32 %conv, ptr %add.ptr, align 4
8229 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8230 define dso_local void @st_reg_int8_t_uint32_t(ptr nocapture %ptr, i64 %off, i8 signext %str) {
8231 ; CHECK-LABEL: st_reg_int8_t_uint32_t:
8232 ; CHECK: # %bb.0: # %entry
8233 ; CHECK-NEXT: stwx r5, r3, r4
8236 %conv = sext i8 %str to i32
8237 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
8238 store i32 %conv, ptr %add.ptr, align 4
8242 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8243 define dso_local void @st_or1_int8_t_uint32_t(i64 %ptr, i8 zeroext %off, i8 signext %str) {
8244 ; CHECK-LABEL: st_or1_int8_t_uint32_t:
8245 ; CHECK: # %bb.0: # %entry
8246 ; CHECK-NEXT: or r3, r4, r3
8247 ; CHECK-NEXT: stw r5, 0(r3)
8250 %conv = sext i8 %str to i32
8251 %conv1 = zext i8 %off to i64
8252 %or = or i64 %conv1, %ptr
8253 %0 = inttoptr i64 %or to ptr
8254 store i32 %conv, ptr %0, align 4
8258 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8259 define dso_local void @st_not_disjoint16_int8_t_uint32_t(i64 %ptr, i8 signext %str) {
8260 ; CHECK-LABEL: st_not_disjoint16_int8_t_uint32_t:
8261 ; CHECK: # %bb.0: # %entry
8262 ; CHECK-NEXT: ori r3, r3, 6
8263 ; CHECK-NEXT: stw r4, 0(r3)
8266 %conv = sext i8 %str to i32
8267 %or = or i64 %ptr, 6
8268 %0 = inttoptr i64 %or to ptr
8269 store i32 %conv, ptr %0, align 4
8273 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8274 define dso_local void @st_disjoint_align16_int8_t_uint32_t(i64 %ptr, i8 signext %str) {
8275 ; CHECK-LABEL: st_disjoint_align16_int8_t_uint32_t:
8276 ; CHECK: # %bb.0: # %entry
8277 ; CHECK-NEXT: rldicr r3, r3, 0, 51
8278 ; CHECK-NEXT: stw r4, 24(r3)
8281 %and = and i64 %ptr, -4096
8282 %conv = sext i8 %str to i32
8283 %or = or i64 %and, 24
8284 %0 = inttoptr i64 %or to ptr
8285 store i32 %conv, ptr %0, align 8
8289 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8290 define dso_local void @st_not_disjoint32_int8_t_uint32_t(i64 %ptr, i8 signext %str) {
8291 ; CHECK-LABEL: st_not_disjoint32_int8_t_uint32_t:
8292 ; CHECK: # %bb.0: # %entry
8293 ; CHECK-NEXT: ori r3, r3, 34463
8294 ; CHECK-NEXT: oris r3, r3, 1
8295 ; CHECK-NEXT: stw r4, 0(r3)
8298 %conv = sext i8 %str to i32
8299 %or = or i64 %ptr, 99999
8300 %0 = inttoptr i64 %or to ptr
8301 store i32 %conv, ptr %0, align 4
8305 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8306 define dso_local void @st_disjoint_align32_int8_t_uint32_t(i64 %ptr, i8 signext %str) {
8307 ; CHECK-P10-LABEL: st_disjoint_align32_int8_t_uint32_t:
8308 ; CHECK-P10: # %bb.0: # %entry
8309 ; CHECK-P10-NEXT: lis r5, -15264
8310 ; CHECK-P10-NEXT: and r3, r3, r5
8311 ; CHECK-P10-NEXT: pstw r4, 999990000(r3), 0
8312 ; CHECK-P10-NEXT: blr
8314 ; CHECK-PREP10-LABEL: st_disjoint_align32_int8_t_uint32_t:
8315 ; CHECK-PREP10: # %bb.0: # %entry
8316 ; CHECK-PREP10-NEXT: lis r5, -15264
8317 ; CHECK-PREP10-NEXT: and r3, r3, r5
8318 ; CHECK-PREP10-NEXT: lis r5, 15258
8319 ; CHECK-PREP10-NEXT: ori r5, r5, 41712
8320 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
8321 ; CHECK-PREP10-NEXT: blr
8323 %and = and i64 %ptr, -1000341504
8324 %conv = sext i8 %str to i32
8325 %or = or i64 %and, 999990000
8326 %0 = inttoptr i64 %or to ptr
8327 store i32 %conv, ptr %0, align 16
8331 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8332 define dso_local void @st_not_disjoint64_int8_t_uint32_t(i64 %ptr, i8 signext %str) {
8333 ; CHECK-P10-LABEL: st_not_disjoint64_int8_t_uint32_t:
8334 ; CHECK-P10: # %bb.0: # %entry
8335 ; CHECK-P10-NEXT: pli r5, 232
8336 ; CHECK-P10-NEXT: pli r6, 3567587329
8337 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
8338 ; CHECK-P10-NEXT: or r3, r3, r6
8339 ; CHECK-P10-NEXT: stw r4, 0(r3)
8340 ; CHECK-P10-NEXT: blr
8342 ; CHECK-PREP10-LABEL: st_not_disjoint64_int8_t_uint32_t:
8343 ; CHECK-PREP10: # %bb.0: # %entry
8344 ; CHECK-PREP10-NEXT: li r5, 29
8345 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
8346 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
8347 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
8348 ; CHECK-PREP10-NEXT: or r3, r3, r5
8349 ; CHECK-PREP10-NEXT: stw r4, 0(r3)
8350 ; CHECK-PREP10-NEXT: blr
8352 %conv = sext i8 %str to i32
8353 %or = or i64 %ptr, 1000000000001
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_align64_int8_t_uint32_t(i64 %ptr, i8 signext %str) {
8361 ; CHECK-P10-LABEL: st_disjoint_align64_int8_t_uint32_t:
8362 ; CHECK-P10: # %bb.0: # %entry
8363 ; CHECK-P10-NEXT: pli r5, 244140625
8364 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
8365 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
8366 ; CHECK-P10-NEXT: stwx r4, r3, r5
8367 ; CHECK-P10-NEXT: blr
8369 ; CHECK-PREP10-LABEL: st_disjoint_align64_int8_t_uint32_t:
8370 ; CHECK-PREP10: # %bb.0: # %entry
8371 ; CHECK-PREP10-NEXT: lis r5, 3725
8372 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
8373 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
8374 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
8375 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
8376 ; CHECK-PREP10-NEXT: blr
8378 %and = and i64 %ptr, -1099511627776
8379 %conv = sext i8 %str to i32
8380 %or = or i64 %and, 1000000000000
8381 %0 = inttoptr i64 %or to ptr
8382 store i32 %conv, ptr %0, align 4096
8386 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8387 define dso_local void @st_cst_align16_int8_t_uint32_t(i8 signext %str) {
8388 ; CHECK-LABEL: st_cst_align16_int8_t_uint32_t:
8389 ; CHECK: # %bb.0: # %entry
8390 ; CHECK-NEXT: stw r3, 4080(0)
8393 %conv = sext i8 %str to i32
8394 store i32 %conv, ptr inttoptr (i64 4080 to ptr), align 16
8398 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8399 define dso_local void @st_cst_align32_int8_t_uint32_t(i8 signext %str) {
8400 ; CHECK-LABEL: st_cst_align32_int8_t_uint32_t:
8401 ; CHECK: # %bb.0: # %entry
8402 ; CHECK-NEXT: lis r4, 153
8403 ; CHECK-NEXT: stw r3, -27108(r4)
8406 %conv = sext i8 %str to i32
8407 store i32 %conv, ptr inttoptr (i64 9999900 to ptr), align 4
8411 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8412 define dso_local void @st_cst_align64_int8_t_uint32_t(i8 signext %str) {
8413 ; CHECK-P10-LABEL: st_cst_align64_int8_t_uint32_t:
8414 ; CHECK-P10: # %bb.0: # %entry
8415 ; CHECK-P10-NEXT: pli r4, 244140625
8416 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
8417 ; CHECK-P10-NEXT: stw r3, 0(r4)
8418 ; CHECK-P10-NEXT: blr
8420 ; CHECK-PREP10-LABEL: st_cst_align64_int8_t_uint32_t:
8421 ; CHECK-PREP10: # %bb.0: # %entry
8422 ; CHECK-PREP10-NEXT: lis r4, 3725
8423 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
8424 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
8425 ; CHECK-PREP10-NEXT: stw r3, 0(r4)
8426 ; CHECK-PREP10-NEXT: blr
8428 %conv = sext i8 %str to i32
8429 store i32 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
8433 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8434 define dso_local void @st_0_int8_t_uint64_t(i64 %ptr, i8 signext %str) {
8435 ; CHECK-LABEL: st_0_int8_t_uint64_t:
8436 ; CHECK: # %bb.0: # %entry
8437 ; CHECK-NEXT: std r4, 0(r3)
8440 %conv = sext i8 %str to i64
8441 %0 = inttoptr i64 %ptr to ptr
8442 store i64 %conv, ptr %0, align 8
8446 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8447 define dso_local void @st_align16_int8_t_uint64_t(ptr nocapture %ptr, i8 signext %str) {
8448 ; CHECK-LABEL: st_align16_int8_t_uint64_t:
8449 ; CHECK: # %bb.0: # %entry
8450 ; CHECK-NEXT: std r4, 8(r3)
8453 %conv = sext i8 %str to i64
8454 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
8455 store i64 %conv, ptr %add.ptr, align 8
8459 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8460 define dso_local void @st_align32_int8_t_uint64_t(ptr nocapture %ptr, i8 signext %str) {
8461 ; CHECK-P10-LABEL: st_align32_int8_t_uint64_t:
8462 ; CHECK-P10: # %bb.0: # %entry
8463 ; CHECK-P10-NEXT: pstd r4, 99999000(r3), 0
8464 ; CHECK-P10-NEXT: blr
8466 ; CHECK-PREP10-LABEL: st_align32_int8_t_uint64_t:
8467 ; CHECK-PREP10: # %bb.0: # %entry
8468 ; CHECK-PREP10-NEXT: lis r5, 1525
8469 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
8470 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
8471 ; CHECK-PREP10-NEXT: blr
8473 %conv = sext i8 %str to i64
8474 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
8475 store i64 %conv, ptr %add.ptr, align 8
8479 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8480 define dso_local void @st_align64_int8_t_uint64_t(ptr nocapture %ptr, i8 signext %str) {
8481 ; CHECK-P10-LABEL: st_align64_int8_t_uint64_t:
8482 ; CHECK-P10: # %bb.0: # %entry
8483 ; CHECK-P10-NEXT: pli r5, 244140625
8484 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
8485 ; CHECK-P10-NEXT: stdx r4, r3, r5
8486 ; CHECK-P10-NEXT: blr
8488 ; CHECK-PREP10-LABEL: st_align64_int8_t_uint64_t:
8489 ; CHECK-PREP10: # %bb.0: # %entry
8490 ; CHECK-PREP10-NEXT: lis r5, 3725
8491 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
8492 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
8493 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
8494 ; CHECK-PREP10-NEXT: blr
8496 %conv = sext i8 %str to i64
8497 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
8498 store i64 %conv, ptr %add.ptr, align 8
8502 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8503 define dso_local void @st_reg_int8_t_uint64_t(ptr nocapture %ptr, i64 %off, i8 signext %str) {
8504 ; CHECK-LABEL: st_reg_int8_t_uint64_t:
8505 ; CHECK: # %bb.0: # %entry
8506 ; CHECK-NEXT: stdx r5, r3, r4
8509 %conv = sext i8 %str to i64
8510 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
8511 store i64 %conv, ptr %add.ptr, align 8
8515 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8516 define dso_local void @st_or1_int8_t_uint64_t(i64 %ptr, i8 zeroext %off, i8 signext %str) {
8517 ; CHECK-LABEL: st_or1_int8_t_uint64_t:
8518 ; CHECK: # %bb.0: # %entry
8519 ; CHECK-NEXT: or r3, r4, r3
8520 ; CHECK-NEXT: std r5, 0(r3)
8523 %conv = sext i8 %str to i64
8524 %conv1 = zext i8 %off to i64
8525 %or = or i64 %conv1, %ptr
8526 %0 = inttoptr i64 %or to ptr
8527 store i64 %conv, ptr %0, align 8
8531 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8532 define dso_local void @st_not_disjoint16_int8_t_uint64_t(i64 %ptr, i8 signext %str) {
8533 ; CHECK-LABEL: st_not_disjoint16_int8_t_uint64_t:
8534 ; CHECK: # %bb.0: # %entry
8535 ; CHECK-NEXT: ori r3, r3, 6
8536 ; CHECK-NEXT: std r4, 0(r3)
8539 %conv = sext i8 %str to i64
8540 %or = or i64 %ptr, 6
8541 %0 = inttoptr i64 %or to ptr
8542 store i64 %conv, ptr %0, align 8
8546 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8547 define dso_local void @st_disjoint_align16_int8_t_uint64_t(i64 %ptr, i8 signext %str) {
8548 ; CHECK-LABEL: st_disjoint_align16_int8_t_uint64_t:
8549 ; CHECK: # %bb.0: # %entry
8550 ; CHECK-NEXT: rldicr r3, r3, 0, 51
8551 ; CHECK-NEXT: std r4, 24(r3)
8554 %and = and i64 %ptr, -4096
8555 %conv = sext i8 %str to i64
8556 %or = or i64 %and, 24
8557 %0 = inttoptr i64 %or to ptr
8558 store i64 %conv, ptr %0, align 8
8562 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8563 define dso_local void @st_not_disjoint32_int8_t_uint64_t(i64 %ptr, i8 signext %str) {
8564 ; CHECK-LABEL: st_not_disjoint32_int8_t_uint64_t:
8565 ; CHECK: # %bb.0: # %entry
8566 ; CHECK-NEXT: ori r3, r3, 34463
8567 ; CHECK-NEXT: oris r3, r3, 1
8568 ; CHECK-NEXT: std r4, 0(r3)
8571 %conv = sext i8 %str to i64
8572 %or = or i64 %ptr, 99999
8573 %0 = inttoptr i64 %or to ptr
8574 store i64 %conv, ptr %0, align 8
8578 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8579 define dso_local void @st_disjoint_align32_int8_t_uint64_t(i64 %ptr, i8 signext %str) {
8580 ; CHECK-P10-LABEL: st_disjoint_align32_int8_t_uint64_t:
8581 ; CHECK-P10: # %bb.0: # %entry
8582 ; CHECK-P10-NEXT: lis r5, -15264
8583 ; CHECK-P10-NEXT: and r3, r3, r5
8584 ; CHECK-P10-NEXT: pstd r4, 999990000(r3), 0
8585 ; CHECK-P10-NEXT: blr
8587 ; CHECK-PREP10-LABEL: st_disjoint_align32_int8_t_uint64_t:
8588 ; CHECK-PREP10: # %bb.0: # %entry
8589 ; CHECK-PREP10-NEXT: lis r5, -15264
8590 ; CHECK-PREP10-NEXT: and r3, r3, r5
8591 ; CHECK-PREP10-NEXT: lis r5, 15258
8592 ; CHECK-PREP10-NEXT: ori r5, r5, 41712
8593 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
8594 ; CHECK-PREP10-NEXT: blr
8596 %and = and i64 %ptr, -1000341504
8597 %conv = sext i8 %str to i64
8598 %or = or i64 %and, 999990000
8599 %0 = inttoptr i64 %or to ptr
8600 store i64 %conv, ptr %0, align 16
8604 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8605 define dso_local void @st_not_disjoint64_int8_t_uint64_t(i64 %ptr, i8 signext %str) {
8606 ; CHECK-P10-LABEL: st_not_disjoint64_int8_t_uint64_t:
8607 ; CHECK-P10: # %bb.0: # %entry
8608 ; CHECK-P10-NEXT: pli r5, 232
8609 ; CHECK-P10-NEXT: pli r6, 3567587329
8610 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
8611 ; CHECK-P10-NEXT: or r3, r3, r6
8612 ; CHECK-P10-NEXT: std r4, 0(r3)
8613 ; CHECK-P10-NEXT: blr
8615 ; CHECK-PREP10-LABEL: st_not_disjoint64_int8_t_uint64_t:
8616 ; CHECK-PREP10: # %bb.0: # %entry
8617 ; CHECK-PREP10-NEXT: li r5, 29
8618 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
8619 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
8620 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
8621 ; CHECK-PREP10-NEXT: or r3, r3, r5
8622 ; CHECK-PREP10-NEXT: std r4, 0(r3)
8623 ; CHECK-PREP10-NEXT: blr
8625 %conv = sext i8 %str to i64
8626 %or = or i64 %ptr, 1000000000001
8627 %0 = inttoptr i64 %or to ptr
8628 store i64 %conv, ptr %0, align 8
8632 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8633 define dso_local void @st_disjoint_align64_int8_t_uint64_t(i64 %ptr, i8 signext %str) {
8634 ; CHECK-P10-LABEL: st_disjoint_align64_int8_t_uint64_t:
8635 ; CHECK-P10: # %bb.0: # %entry
8636 ; CHECK-P10-NEXT: pli r5, 244140625
8637 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
8638 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
8639 ; CHECK-P10-NEXT: stdx r4, r3, r5
8640 ; CHECK-P10-NEXT: blr
8642 ; CHECK-PREP10-LABEL: st_disjoint_align64_int8_t_uint64_t:
8643 ; CHECK-PREP10: # %bb.0: # %entry
8644 ; CHECK-PREP10-NEXT: lis r5, 3725
8645 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
8646 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
8647 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
8648 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
8649 ; CHECK-PREP10-NEXT: blr
8651 %and = and i64 %ptr, -1099511627776
8652 %conv = sext i8 %str to i64
8653 %or = or i64 %and, 1000000000000
8654 %0 = inttoptr i64 %or to ptr
8655 store i64 %conv, ptr %0, align 4096
8659 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8660 define dso_local void @st_cst_align16_int8_t_uint64_t(i8 signext %str) {
8661 ; CHECK-LABEL: st_cst_align16_int8_t_uint64_t:
8662 ; CHECK: # %bb.0: # %entry
8663 ; CHECK-NEXT: std r3, 4080(0)
8666 %conv = sext i8 %str to i64
8667 store i64 %conv, ptr inttoptr (i64 4080 to ptr), align 16
8671 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8672 define dso_local void @st_cst_align32_int8_t_uint64_t(i8 signext %str) {
8673 ; CHECK-LABEL: st_cst_align32_int8_t_uint64_t:
8674 ; CHECK: # %bb.0: # %entry
8675 ; CHECK-NEXT: lis r4, 153
8676 ; CHECK-NEXT: std r3, -27108(r4)
8679 %conv = sext i8 %str to i64
8680 store i64 %conv, ptr inttoptr (i64 9999900 to ptr), align 8
8684 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8685 define dso_local void @st_cst_align64_int8_t_uint64_t(i8 signext %str) {
8686 ; CHECK-P10-LABEL: st_cst_align64_int8_t_uint64_t:
8687 ; CHECK-P10: # %bb.0: # %entry
8688 ; CHECK-P10-NEXT: pli r4, 244140625
8689 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
8690 ; CHECK-P10-NEXT: std r3, 0(r4)
8691 ; CHECK-P10-NEXT: blr
8693 ; CHECK-PREP10-LABEL: st_cst_align64_int8_t_uint64_t:
8694 ; CHECK-PREP10: # %bb.0: # %entry
8695 ; CHECK-PREP10-NEXT: lis r4, 3725
8696 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
8697 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
8698 ; CHECK-PREP10-NEXT: std r3, 0(r4)
8699 ; CHECK-PREP10-NEXT: blr
8701 %conv = sext i8 %str to i64
8702 store i64 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
8706 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8707 define dso_local void @st_0_int8_t_float(i64 %ptr, i8 signext %str) {
8708 ; CHECK-LABEL: st_0_int8_t_float:
8709 ; CHECK: # %bb.0: # %entry
8710 ; CHECK-NEXT: mtfprwa f0, r4
8711 ; CHECK-NEXT: xscvsxdsp f0, f0
8712 ; CHECK-NEXT: stfs f0, 0(r3)
8715 %conv = sitofp i8 %str to float
8716 %0 = inttoptr i64 %ptr to ptr
8717 store float %conv, ptr %0, align 4
8721 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8722 define dso_local void @st_align16_int8_t_float(ptr nocapture %ptr, i8 signext %str) {
8723 ; CHECK-LABEL: st_align16_int8_t_float:
8724 ; CHECK: # %bb.0: # %entry
8725 ; CHECK-NEXT: mtfprwa f0, r4
8726 ; CHECK-NEXT: xscvsxdsp f0, f0
8727 ; CHECK-NEXT: stfs f0, 8(r3)
8730 %conv = sitofp i8 %str to float
8731 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
8732 store float %conv, ptr %add.ptr, align 4
8736 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8737 define dso_local void @st_align32_int8_t_float(ptr nocapture %ptr, i8 signext %str) {
8738 ; CHECK-P10-LABEL: st_align32_int8_t_float:
8739 ; CHECK-P10: # %bb.0: # %entry
8740 ; CHECK-P10-NEXT: mtfprwa f0, r4
8741 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
8742 ; CHECK-P10-NEXT: pstfs f0, 99999000(r3), 0
8743 ; CHECK-P10-NEXT: blr
8745 ; CHECK-P9-LABEL: st_align32_int8_t_float:
8746 ; CHECK-P9: # %bb.0: # %entry
8747 ; CHECK-P9-NEXT: mtfprwa f0, r4
8748 ; CHECK-P9-NEXT: lis r4, 1525
8749 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
8750 ; CHECK-P9-NEXT: ori r4, r4, 56600
8751 ; CHECK-P9-NEXT: stfsx f0, r3, r4
8752 ; CHECK-P9-NEXT: blr
8754 ; CHECK-P8-LABEL: st_align32_int8_t_float:
8755 ; CHECK-P8: # %bb.0: # %entry
8756 ; CHECK-P8-NEXT: mtfprwa f0, r4
8757 ; CHECK-P8-NEXT: lis r4, 1525
8758 ; CHECK-P8-NEXT: ori r4, r4, 56600
8759 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
8760 ; CHECK-P8-NEXT: stfsx f0, r3, r4
8761 ; CHECK-P8-NEXT: blr
8763 %conv = sitofp i8 %str to float
8764 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
8765 store float %conv, ptr %add.ptr, align 4
8769 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8770 define dso_local void @st_align64_int8_t_float(ptr nocapture %ptr, i8 signext %str) {
8771 ; CHECK-P10-LABEL: st_align64_int8_t_float:
8772 ; CHECK-P10: # %bb.0: # %entry
8773 ; CHECK-P10-NEXT: mtfprwa f0, r4
8774 ; CHECK-P10-NEXT: pli r4, 244140625
8775 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
8776 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
8777 ; CHECK-P10-NEXT: stfsx f0, r3, r4
8778 ; CHECK-P10-NEXT: blr
8780 ; CHECK-P9-LABEL: st_align64_int8_t_float:
8781 ; CHECK-P9: # %bb.0: # %entry
8782 ; CHECK-P9-NEXT: mtfprwa f0, r4
8783 ; CHECK-P9-NEXT: lis r4, 3725
8784 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
8785 ; CHECK-P9-NEXT: ori r4, r4, 19025
8786 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
8787 ; CHECK-P9-NEXT: stfsx f0, r3, r4
8788 ; CHECK-P9-NEXT: blr
8790 ; CHECK-P8-LABEL: st_align64_int8_t_float:
8791 ; CHECK-P8: # %bb.0: # %entry
8792 ; CHECK-P8-NEXT: mtfprwa f0, r4
8793 ; CHECK-P8-NEXT: lis r4, 3725
8794 ; CHECK-P8-NEXT: ori r4, r4, 19025
8795 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
8796 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
8797 ; CHECK-P8-NEXT: stfsx f0, r3, r4
8798 ; CHECK-P8-NEXT: blr
8800 %conv = sitofp i8 %str to float
8801 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
8802 store float %conv, ptr %add.ptr, align 4
8806 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8807 define dso_local void @st_reg_int8_t_float(ptr nocapture %ptr, i64 %off, i8 signext %str) {
8808 ; CHECK-LABEL: st_reg_int8_t_float:
8809 ; CHECK: # %bb.0: # %entry
8810 ; CHECK-NEXT: mtfprwa f0, r5
8811 ; CHECK-NEXT: xscvsxdsp f0, f0
8812 ; CHECK-NEXT: stfsx f0, r3, r4
8815 %conv = sitofp i8 %str to float
8816 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
8817 store float %conv, ptr %add.ptr, align 4
8821 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8822 define dso_local void @st_or1_int8_t_float(i64 %ptr, i8 zeroext %off, i8 signext %str) {
8823 ; CHECK-LABEL: st_or1_int8_t_float:
8824 ; CHECK: # %bb.0: # %entry
8825 ; CHECK-NEXT: mtfprwa f0, r5
8826 ; CHECK-NEXT: or r3, r4, r3
8827 ; CHECK-NEXT: xscvsxdsp f0, f0
8828 ; CHECK-NEXT: stfs f0, 0(r3)
8831 %conv = sitofp i8 %str to float
8832 %conv1 = zext i8 %off to i64
8833 %or = or i64 %conv1, %ptr
8834 %0 = inttoptr i64 %or to ptr
8835 store float %conv, ptr %0, align 4
8839 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8840 define dso_local void @st_not_disjoint16_int8_t_float(i64 %ptr, i8 signext %str) {
8841 ; CHECK-LABEL: st_not_disjoint16_int8_t_float:
8842 ; CHECK: # %bb.0: # %entry
8843 ; CHECK-NEXT: mtfprwa f0, r4
8844 ; CHECK-NEXT: ori r3, r3, 6
8845 ; CHECK-NEXT: xscvsxdsp f0, f0
8846 ; CHECK-NEXT: stfs f0, 0(r3)
8849 %conv = sitofp i8 %str to float
8850 %or = or i64 %ptr, 6
8851 %0 = inttoptr i64 %or to ptr
8852 store float %conv, ptr %0, align 4
8856 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8857 define dso_local void @st_disjoint_align16_int8_t_float(i64 %ptr, i8 signext %str) {
8858 ; CHECK-LABEL: st_disjoint_align16_int8_t_float:
8859 ; CHECK: # %bb.0: # %entry
8860 ; CHECK-NEXT: mtfprwa f0, r4
8861 ; CHECK-NEXT: rldicr r3, r3, 0, 51
8862 ; CHECK-NEXT: xscvsxdsp f0, f0
8863 ; CHECK-NEXT: stfs f0, 24(r3)
8866 %and = and i64 %ptr, -4096
8867 %conv = sitofp i8 %str to float
8868 %or = or i64 %and, 24
8869 %0 = inttoptr i64 %or to ptr
8870 store float %conv, ptr %0, align 8
8874 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8875 define dso_local void @st_not_disjoint32_int8_t_float(i64 %ptr, i8 signext %str) {
8876 ; CHECK-P10-LABEL: st_not_disjoint32_int8_t_float:
8877 ; CHECK-P10: # %bb.0: # %entry
8878 ; CHECK-P10-NEXT: mtfprwa f0, r4
8879 ; CHECK-P10-NEXT: ori r3, r3, 34463
8880 ; CHECK-P10-NEXT: oris r3, r3, 1
8881 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
8882 ; CHECK-P10-NEXT: stfs f0, 0(r3)
8883 ; CHECK-P10-NEXT: blr
8885 ; CHECK-P9-LABEL: st_not_disjoint32_int8_t_float:
8886 ; CHECK-P9: # %bb.0: # %entry
8887 ; CHECK-P9-NEXT: mtfprwa f0, r4
8888 ; CHECK-P9-NEXT: ori r3, r3, 34463
8889 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
8890 ; CHECK-P9-NEXT: oris r3, r3, 1
8891 ; CHECK-P9-NEXT: stfs f0, 0(r3)
8892 ; CHECK-P9-NEXT: blr
8894 ; CHECK-P8-LABEL: st_not_disjoint32_int8_t_float:
8895 ; CHECK-P8: # %bb.0: # %entry
8896 ; CHECK-P8-NEXT: mtfprwa f0, r4
8897 ; CHECK-P8-NEXT: ori r3, r3, 34463
8898 ; CHECK-P8-NEXT: oris r3, r3, 1
8899 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
8900 ; CHECK-P8-NEXT: stfs f0, 0(r3)
8901 ; CHECK-P8-NEXT: blr
8903 %conv = sitofp i8 %str to float
8904 %or = or i64 %ptr, 99999
8905 %0 = inttoptr i64 %or to ptr
8906 store float %conv, ptr %0, align 4
8910 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8911 define dso_local void @st_disjoint_align32_int8_t_float(i64 %ptr, i8 signext %str) {
8912 ; CHECK-P10-LABEL: st_disjoint_align32_int8_t_float:
8913 ; CHECK-P10: # %bb.0: # %entry
8914 ; CHECK-P10-NEXT: mtfprwa f0, r4
8915 ; CHECK-P10-NEXT: lis r5, -15264
8916 ; CHECK-P10-NEXT: and r3, r3, r5
8917 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
8918 ; CHECK-P10-NEXT: pstfs f0, 999990000(r3), 0
8919 ; CHECK-P10-NEXT: blr
8921 ; CHECK-P9-LABEL: st_disjoint_align32_int8_t_float:
8922 ; CHECK-P9: # %bb.0: # %entry
8923 ; CHECK-P9-NEXT: mtfprwa f0, r4
8924 ; CHECK-P9-NEXT: lis r5, -15264
8925 ; CHECK-P9-NEXT: lis r4, 15258
8926 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
8927 ; CHECK-P9-NEXT: and r3, r3, r5
8928 ; CHECK-P9-NEXT: ori r4, r4, 41712
8929 ; CHECK-P9-NEXT: stfsx f0, r3, r4
8930 ; CHECK-P9-NEXT: blr
8932 ; CHECK-P8-LABEL: st_disjoint_align32_int8_t_float:
8933 ; CHECK-P8: # %bb.0: # %entry
8934 ; CHECK-P8-NEXT: mtfprwa f0, r4
8935 ; CHECK-P8-NEXT: lis r5, -15264
8936 ; CHECK-P8-NEXT: lis r4, 15258
8937 ; CHECK-P8-NEXT: and r3, r3, r5
8938 ; CHECK-P8-NEXT: ori r4, r4, 41712
8939 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
8940 ; CHECK-P8-NEXT: stfsx f0, r3, r4
8941 ; CHECK-P8-NEXT: blr
8943 %and = and i64 %ptr, -1000341504
8944 %conv = sitofp i8 %str to float
8945 %or = or i64 %and, 999990000
8946 %0 = inttoptr i64 %or to ptr
8947 store float %conv, ptr %0, align 16
8951 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8952 define dso_local void @st_not_disjoint64_int8_t_float(i64 %ptr, i8 signext %str) {
8953 ; CHECK-P10-LABEL: st_not_disjoint64_int8_t_float:
8954 ; CHECK-P10: # %bb.0: # %entry
8955 ; CHECK-P10-NEXT: mtfprwa f0, r4
8956 ; CHECK-P10-NEXT: pli r4, 232
8957 ; CHECK-P10-NEXT: pli r5, 3567587329
8958 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
8959 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
8960 ; CHECK-P10-NEXT: or r3, r3, r5
8961 ; CHECK-P10-NEXT: stfs f0, 0(r3)
8962 ; CHECK-P10-NEXT: blr
8964 ; CHECK-P9-LABEL: st_not_disjoint64_int8_t_float:
8965 ; CHECK-P9: # %bb.0: # %entry
8966 ; CHECK-P9-NEXT: mtfprwa f0, r4
8967 ; CHECK-P9-NEXT: li r4, 29
8968 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
8969 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
8970 ; CHECK-P9-NEXT: oris r4, r4, 54437
8971 ; CHECK-P9-NEXT: ori r4, r4, 4097
8972 ; CHECK-P9-NEXT: or r3, r3, r4
8973 ; CHECK-P9-NEXT: stfs f0, 0(r3)
8974 ; CHECK-P9-NEXT: blr
8976 ; CHECK-P8-LABEL: st_not_disjoint64_int8_t_float:
8977 ; CHECK-P8: # %bb.0: # %entry
8978 ; CHECK-P8-NEXT: mtfprwa f0, r4
8979 ; CHECK-P8-NEXT: li r4, 29
8980 ; CHECK-P8-NEXT: rldic r4, r4, 35, 24
8981 ; CHECK-P8-NEXT: oris r4, r4, 54437
8982 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
8983 ; CHECK-P8-NEXT: ori r4, r4, 4097
8984 ; CHECK-P8-NEXT: or r3, r3, r4
8985 ; CHECK-P8-NEXT: stfs f0, 0(r3)
8986 ; CHECK-P8-NEXT: blr
8988 %conv = sitofp i8 %str to float
8989 %or = or i64 %ptr, 1000000000001
8990 %0 = inttoptr i64 %or to ptr
8991 store float %conv, ptr %0, align 4
8995 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8996 define dso_local void @st_disjoint_align64_int8_t_float(i64 %ptr, i8 signext %str) {
8997 ; CHECK-P10-LABEL: st_disjoint_align64_int8_t_float:
8998 ; CHECK-P10: # %bb.0: # %entry
8999 ; CHECK-P10-NEXT: mtfprwa f0, r4
9000 ; CHECK-P10-NEXT: pli r4, 244140625
9001 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
9002 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
9003 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
9004 ; CHECK-P10-NEXT: stfsx f0, r3, r4
9005 ; CHECK-P10-NEXT: blr
9007 ; CHECK-P9-LABEL: st_disjoint_align64_int8_t_float:
9008 ; CHECK-P9: # %bb.0: # %entry
9009 ; CHECK-P9-NEXT: mtfprwa f0, r4
9010 ; CHECK-P9-NEXT: lis r4, 3725
9011 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
9012 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
9013 ; CHECK-P9-NEXT: ori r4, r4, 19025
9014 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
9015 ; CHECK-P9-NEXT: stfsx f0, r3, r4
9016 ; CHECK-P9-NEXT: blr
9018 ; CHECK-P8-LABEL: st_disjoint_align64_int8_t_float:
9019 ; CHECK-P8: # %bb.0: # %entry
9020 ; CHECK-P8-NEXT: mtfprwa f0, r4
9021 ; CHECK-P8-NEXT: lis r4, 3725
9022 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
9023 ; CHECK-P8-NEXT: ori r4, r4, 19025
9024 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
9025 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
9026 ; CHECK-P8-NEXT: stfsx f0, r3, r4
9027 ; CHECK-P8-NEXT: blr
9029 %and = and i64 %ptr, -1099511627776
9030 %conv = sitofp i8 %str to float
9031 %or = or i64 %and, 1000000000000
9032 %0 = inttoptr i64 %or to ptr
9033 store float %conv, ptr %0, align 4096
9037 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9038 define dso_local void @st_cst_align16_int8_t_float(i8 signext %str) {
9039 ; CHECK-LABEL: st_cst_align16_int8_t_float:
9040 ; CHECK: # %bb.0: # %entry
9041 ; CHECK-NEXT: mtfprwa f0, r3
9042 ; CHECK-NEXT: xscvsxdsp f0, f0
9043 ; CHECK-NEXT: stfs f0, 4080(0)
9046 %conv = sitofp i8 %str to float
9047 store float %conv, ptr inttoptr (i64 4080 to ptr), align 16
9051 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9052 define dso_local void @st_cst_align32_int8_t_float(i8 signext %str) {
9053 ; CHECK-LABEL: st_cst_align32_int8_t_float:
9054 ; CHECK: # %bb.0: # %entry
9055 ; CHECK-NEXT: mtfprwa f0, r3
9056 ; CHECK-NEXT: lis r3, 153
9057 ; CHECK-NEXT: xscvsxdsp f0, f0
9058 ; CHECK-NEXT: stfs f0, -27108(r3)
9061 %conv = sitofp i8 %str to float
9062 store float %conv, ptr inttoptr (i64 9999900 to ptr), align 4
9066 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9067 define dso_local void @st_cst_align64_int8_t_float(i8 signext %str) {
9068 ; CHECK-P10-LABEL: st_cst_align64_int8_t_float:
9069 ; CHECK-P10: # %bb.0: # %entry
9070 ; CHECK-P10-NEXT: mtfprwa f0, r3
9071 ; CHECK-P10-NEXT: pli r3, 244140625
9072 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
9073 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
9074 ; CHECK-P10-NEXT: stfs f0, 0(r3)
9075 ; CHECK-P10-NEXT: blr
9077 ; CHECK-P9-LABEL: st_cst_align64_int8_t_float:
9078 ; CHECK-P9: # %bb.0: # %entry
9079 ; CHECK-P9-NEXT: mtfprwa f0, r3
9080 ; CHECK-P9-NEXT: lis r3, 3725
9081 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
9082 ; CHECK-P9-NEXT: ori r3, r3, 19025
9083 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
9084 ; CHECK-P9-NEXT: stfs f0, 0(r3)
9085 ; CHECK-P9-NEXT: blr
9087 ; CHECK-P8-LABEL: st_cst_align64_int8_t_float:
9088 ; CHECK-P8: # %bb.0: # %entry
9089 ; CHECK-P8-NEXT: mtfprwa f0, r3
9090 ; CHECK-P8-NEXT: lis r3, 3725
9091 ; CHECK-P8-NEXT: ori r3, r3, 19025
9092 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
9093 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
9094 ; CHECK-P8-NEXT: stfs f0, 0(r3)
9095 ; CHECK-P8-NEXT: blr
9097 %conv = sitofp i8 %str to float
9098 store float %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
9102 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9103 define dso_local void @st_0_int8_t_double(i64 %ptr, i8 signext %str) {
9104 ; CHECK-LABEL: st_0_int8_t_double:
9105 ; CHECK: # %bb.0: # %entry
9106 ; CHECK-NEXT: mtfprwa f0, r4
9107 ; CHECK-NEXT: xscvsxddp f0, f0
9108 ; CHECK-NEXT: stfd f0, 0(r3)
9111 %conv = sitofp i8 %str to double
9112 %0 = inttoptr i64 %ptr to ptr
9113 store double %conv, ptr %0, align 8
9117 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9118 define dso_local void @st_align16_int8_t_double(ptr nocapture %ptr, i8 signext %str) {
9119 ; CHECK-LABEL: st_align16_int8_t_double:
9120 ; CHECK: # %bb.0: # %entry
9121 ; CHECK-NEXT: mtfprwa f0, r4
9122 ; CHECK-NEXT: xscvsxddp f0, f0
9123 ; CHECK-NEXT: stfd f0, 8(r3)
9126 %conv = sitofp i8 %str to double
9127 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
9128 store double %conv, ptr %add.ptr, align 8
9132 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9133 define dso_local void @st_align32_int8_t_double(ptr nocapture %ptr, i8 signext %str) {
9134 ; CHECK-P10-LABEL: st_align32_int8_t_double:
9135 ; CHECK-P10: # %bb.0: # %entry
9136 ; CHECK-P10-NEXT: mtfprwa f0, r4
9137 ; CHECK-P10-NEXT: xscvsxddp f0, f0
9138 ; CHECK-P10-NEXT: pstfd f0, 99999000(r3), 0
9139 ; CHECK-P10-NEXT: blr
9141 ; CHECK-P9-LABEL: st_align32_int8_t_double:
9142 ; CHECK-P9: # %bb.0: # %entry
9143 ; CHECK-P9-NEXT: mtfprwa f0, r4
9144 ; CHECK-P9-NEXT: lis r4, 1525
9145 ; CHECK-P9-NEXT: xscvsxddp f0, f0
9146 ; CHECK-P9-NEXT: ori r4, r4, 56600
9147 ; CHECK-P9-NEXT: stfdx f0, r3, r4
9148 ; CHECK-P9-NEXT: blr
9150 ; CHECK-P8-LABEL: st_align32_int8_t_double:
9151 ; CHECK-P8: # %bb.0: # %entry
9152 ; CHECK-P8-NEXT: mtfprwa f0, r4
9153 ; CHECK-P8-NEXT: lis r4, 1525
9154 ; CHECK-P8-NEXT: ori r4, r4, 56600
9155 ; CHECK-P8-NEXT: xscvsxddp f0, f0
9156 ; CHECK-P8-NEXT: stfdx f0, r3, r4
9157 ; CHECK-P8-NEXT: blr
9159 %conv = sitofp i8 %str to double
9160 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
9161 store double %conv, ptr %add.ptr, align 8
9165 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9166 define dso_local void @st_align64_int8_t_double(ptr nocapture %ptr, i8 signext %str) {
9167 ; CHECK-P10-LABEL: st_align64_int8_t_double:
9168 ; CHECK-P10: # %bb.0: # %entry
9169 ; CHECK-P10-NEXT: mtfprwa f0, r4
9170 ; CHECK-P10-NEXT: pli r4, 244140625
9171 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
9172 ; CHECK-P10-NEXT: xscvsxddp f0, f0
9173 ; CHECK-P10-NEXT: stfdx f0, r3, r4
9174 ; CHECK-P10-NEXT: blr
9176 ; CHECK-P9-LABEL: st_align64_int8_t_double:
9177 ; CHECK-P9: # %bb.0: # %entry
9178 ; CHECK-P9-NEXT: mtfprwa f0, r4
9179 ; CHECK-P9-NEXT: lis r4, 3725
9180 ; CHECK-P9-NEXT: xscvsxddp f0, f0
9181 ; CHECK-P9-NEXT: ori r4, r4, 19025
9182 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
9183 ; CHECK-P9-NEXT: stfdx f0, r3, r4
9184 ; CHECK-P9-NEXT: blr
9186 ; CHECK-P8-LABEL: st_align64_int8_t_double:
9187 ; CHECK-P8: # %bb.0: # %entry
9188 ; CHECK-P8-NEXT: mtfprwa f0, r4
9189 ; CHECK-P8-NEXT: lis r4, 3725
9190 ; CHECK-P8-NEXT: ori r4, r4, 19025
9191 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
9192 ; CHECK-P8-NEXT: xscvsxddp f0, f0
9193 ; CHECK-P8-NEXT: stfdx f0, r3, r4
9194 ; CHECK-P8-NEXT: blr
9196 %conv = sitofp i8 %str to double
9197 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
9198 store double %conv, ptr %add.ptr, align 8
9202 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9203 define dso_local void @st_reg_int8_t_double(ptr nocapture %ptr, i64 %off, i8 signext %str) {
9204 ; CHECK-LABEL: st_reg_int8_t_double:
9205 ; CHECK: # %bb.0: # %entry
9206 ; CHECK-NEXT: mtfprwa f0, r5
9207 ; CHECK-NEXT: xscvsxddp f0, f0
9208 ; CHECK-NEXT: stfdx f0, r3, r4
9211 %conv = sitofp i8 %str to double
9212 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
9213 store double %conv, ptr %add.ptr, align 8
9217 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9218 define dso_local void @st_or1_int8_t_double(i64 %ptr, i8 zeroext %off, i8 signext %str) {
9219 ; CHECK-LABEL: st_or1_int8_t_double:
9220 ; CHECK: # %bb.0: # %entry
9221 ; CHECK-NEXT: mtfprwa f0, r5
9222 ; CHECK-NEXT: or r3, r4, r3
9223 ; CHECK-NEXT: xscvsxddp f0, f0
9224 ; CHECK-NEXT: stfd f0, 0(r3)
9227 %conv = sitofp i8 %str to double
9228 %conv1 = zext i8 %off to i64
9229 %or = or i64 %conv1, %ptr
9230 %0 = inttoptr i64 %or to ptr
9231 store double %conv, ptr %0, align 8
9235 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9236 define dso_local void @st_not_disjoint16_int8_t_double(i64 %ptr, i8 signext %str) {
9237 ; CHECK-LABEL: st_not_disjoint16_int8_t_double:
9238 ; CHECK: # %bb.0: # %entry
9239 ; CHECK-NEXT: mtfprwa f0, r4
9240 ; CHECK-NEXT: ori r3, r3, 6
9241 ; CHECK-NEXT: xscvsxddp f0, f0
9242 ; CHECK-NEXT: stfd f0, 0(r3)
9245 %conv = sitofp i8 %str to double
9246 %or = or i64 %ptr, 6
9247 %0 = inttoptr i64 %or to ptr
9248 store double %conv, ptr %0, align 8
9252 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9253 define dso_local void @st_disjoint_align16_int8_t_double(i64 %ptr, i8 signext %str) {
9254 ; CHECK-LABEL: st_disjoint_align16_int8_t_double:
9255 ; CHECK: # %bb.0: # %entry
9256 ; CHECK-NEXT: mtfprwa f0, r4
9257 ; CHECK-NEXT: rldicr r3, r3, 0, 51
9258 ; CHECK-NEXT: xscvsxddp f0, f0
9259 ; CHECK-NEXT: stfd f0, 24(r3)
9262 %and = and i64 %ptr, -4096
9263 %conv = sitofp i8 %str to double
9264 %or = or i64 %and, 24
9265 %0 = inttoptr i64 %or to ptr
9266 store double %conv, ptr %0, align 8
9270 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9271 define dso_local void @st_not_disjoint32_int8_t_double(i64 %ptr, i8 signext %str) {
9272 ; CHECK-P10-LABEL: st_not_disjoint32_int8_t_double:
9273 ; CHECK-P10: # %bb.0: # %entry
9274 ; CHECK-P10-NEXT: mtfprwa f0, r4
9275 ; CHECK-P10-NEXT: ori r3, r3, 34463
9276 ; CHECK-P10-NEXT: oris r3, r3, 1
9277 ; CHECK-P10-NEXT: xscvsxddp f0, f0
9278 ; CHECK-P10-NEXT: stfd f0, 0(r3)
9279 ; CHECK-P10-NEXT: blr
9281 ; CHECK-P9-LABEL: st_not_disjoint32_int8_t_double:
9282 ; CHECK-P9: # %bb.0: # %entry
9283 ; CHECK-P9-NEXT: mtfprwa f0, r4
9284 ; CHECK-P9-NEXT: ori r3, r3, 34463
9285 ; CHECK-P9-NEXT: xscvsxddp f0, f0
9286 ; CHECK-P9-NEXT: oris r3, r3, 1
9287 ; CHECK-P9-NEXT: stfd f0, 0(r3)
9288 ; CHECK-P9-NEXT: blr
9290 ; CHECK-P8-LABEL: st_not_disjoint32_int8_t_double:
9291 ; CHECK-P8: # %bb.0: # %entry
9292 ; CHECK-P8-NEXT: mtfprwa f0, r4
9293 ; CHECK-P8-NEXT: ori r3, r3, 34463
9294 ; CHECK-P8-NEXT: oris r3, r3, 1
9295 ; CHECK-P8-NEXT: xscvsxddp f0, f0
9296 ; CHECK-P8-NEXT: stfd f0, 0(r3)
9297 ; CHECK-P8-NEXT: blr
9299 %conv = sitofp i8 %str to double
9300 %or = or i64 %ptr, 99999
9301 %0 = inttoptr i64 %or to ptr
9302 store double %conv, ptr %0, align 8
9306 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9307 define dso_local void @st_disjoint_align32_int8_t_double(i64 %ptr, i8 signext %str) {
9308 ; CHECK-P10-LABEL: st_disjoint_align32_int8_t_double:
9309 ; CHECK-P10: # %bb.0: # %entry
9310 ; CHECK-P10-NEXT: mtfprwa f0, r4
9311 ; CHECK-P10-NEXT: lis r5, -15264
9312 ; CHECK-P10-NEXT: and r3, r3, r5
9313 ; CHECK-P10-NEXT: xscvsxddp f0, f0
9314 ; CHECK-P10-NEXT: pstfd f0, 999990000(r3), 0
9315 ; CHECK-P10-NEXT: blr
9317 ; CHECK-P9-LABEL: st_disjoint_align32_int8_t_double:
9318 ; CHECK-P9: # %bb.0: # %entry
9319 ; CHECK-P9-NEXT: mtfprwa f0, r4
9320 ; CHECK-P9-NEXT: lis r5, -15264
9321 ; CHECK-P9-NEXT: lis r4, 15258
9322 ; CHECK-P9-NEXT: xscvsxddp f0, f0
9323 ; CHECK-P9-NEXT: and r3, r3, r5
9324 ; CHECK-P9-NEXT: ori r4, r4, 41712
9325 ; CHECK-P9-NEXT: stfdx f0, r3, r4
9326 ; CHECK-P9-NEXT: blr
9328 ; CHECK-P8-LABEL: st_disjoint_align32_int8_t_double:
9329 ; CHECK-P8: # %bb.0: # %entry
9330 ; CHECK-P8-NEXT: mtfprwa f0, r4
9331 ; CHECK-P8-NEXT: lis r5, -15264
9332 ; CHECK-P8-NEXT: lis r4, 15258
9333 ; CHECK-P8-NEXT: and r3, r3, r5
9334 ; CHECK-P8-NEXT: ori r4, r4, 41712
9335 ; CHECK-P8-NEXT: xscvsxddp f0, f0
9336 ; CHECK-P8-NEXT: stfdx f0, r3, r4
9337 ; CHECK-P8-NEXT: blr
9339 %and = and i64 %ptr, -1000341504
9340 %conv = sitofp i8 %str to double
9341 %or = or i64 %and, 999990000
9342 %0 = inttoptr i64 %or to ptr
9343 store double %conv, ptr %0, align 16
9347 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9348 define dso_local void @st_not_disjoint64_int8_t_double(i64 %ptr, i8 signext %str) {
9349 ; CHECK-P10-LABEL: st_not_disjoint64_int8_t_double:
9350 ; CHECK-P10: # %bb.0: # %entry
9351 ; CHECK-P10-NEXT: mtfprwa f0, r4
9352 ; CHECK-P10-NEXT: pli r4, 232
9353 ; CHECK-P10-NEXT: pli r5, 3567587329
9354 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
9355 ; CHECK-P10-NEXT: xscvsxddp f0, f0
9356 ; CHECK-P10-NEXT: or r3, r3, r5
9357 ; CHECK-P10-NEXT: stfd f0, 0(r3)
9358 ; CHECK-P10-NEXT: blr
9360 ; CHECK-P9-LABEL: st_not_disjoint64_int8_t_double:
9361 ; CHECK-P9: # %bb.0: # %entry
9362 ; CHECK-P9-NEXT: mtfprwa f0, r4
9363 ; CHECK-P9-NEXT: li r4, 29
9364 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
9365 ; CHECK-P9-NEXT: xscvsxddp f0, f0
9366 ; CHECK-P9-NEXT: oris r4, r4, 54437
9367 ; CHECK-P9-NEXT: ori r4, r4, 4097
9368 ; CHECK-P9-NEXT: or r3, r3, r4
9369 ; CHECK-P9-NEXT: stfd f0, 0(r3)
9370 ; CHECK-P9-NEXT: blr
9372 ; CHECK-P8-LABEL: st_not_disjoint64_int8_t_double:
9373 ; CHECK-P8: # %bb.0: # %entry
9374 ; CHECK-P8-NEXT: mtfprwa f0, r4
9375 ; CHECK-P8-NEXT: li r4, 29
9376 ; CHECK-P8-NEXT: rldic r4, r4, 35, 24
9377 ; CHECK-P8-NEXT: oris r4, r4, 54437
9378 ; CHECK-P8-NEXT: xscvsxddp f0, f0
9379 ; CHECK-P8-NEXT: ori r4, r4, 4097
9380 ; CHECK-P8-NEXT: or r3, r3, r4
9381 ; CHECK-P8-NEXT: stfd f0, 0(r3)
9382 ; CHECK-P8-NEXT: blr
9384 %conv = sitofp i8 %str to double
9385 %or = or i64 %ptr, 1000000000001
9386 %0 = inttoptr i64 %or to ptr
9387 store double %conv, ptr %0, align 8
9391 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9392 define dso_local void @st_disjoint_align64_int8_t_double(i64 %ptr, i8 signext %str) {
9393 ; CHECK-P10-LABEL: st_disjoint_align64_int8_t_double:
9394 ; CHECK-P10: # %bb.0: # %entry
9395 ; CHECK-P10-NEXT: mtfprwa f0, r4
9396 ; CHECK-P10-NEXT: pli r4, 244140625
9397 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
9398 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
9399 ; CHECK-P10-NEXT: xscvsxddp f0, f0
9400 ; CHECK-P10-NEXT: stfdx f0, r3, r4
9401 ; CHECK-P10-NEXT: blr
9403 ; CHECK-P9-LABEL: st_disjoint_align64_int8_t_double:
9404 ; CHECK-P9: # %bb.0: # %entry
9405 ; CHECK-P9-NEXT: mtfprwa f0, r4
9406 ; CHECK-P9-NEXT: lis r4, 3725
9407 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
9408 ; CHECK-P9-NEXT: xscvsxddp f0, f0
9409 ; CHECK-P9-NEXT: ori r4, r4, 19025
9410 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
9411 ; CHECK-P9-NEXT: stfdx f0, r3, r4
9412 ; CHECK-P9-NEXT: blr
9414 ; CHECK-P8-LABEL: st_disjoint_align64_int8_t_double:
9415 ; CHECK-P8: # %bb.0: # %entry
9416 ; CHECK-P8-NEXT: mtfprwa f0, r4
9417 ; CHECK-P8-NEXT: lis r4, 3725
9418 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
9419 ; CHECK-P8-NEXT: ori r4, r4, 19025
9420 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
9421 ; CHECK-P8-NEXT: xscvsxddp f0, f0
9422 ; CHECK-P8-NEXT: stfdx f0, r3, r4
9423 ; CHECK-P8-NEXT: blr
9425 %and = and i64 %ptr, -1099511627776
9426 %conv = sitofp i8 %str to double
9427 %or = or i64 %and, 1000000000000
9428 %0 = inttoptr i64 %or to ptr
9429 store double %conv, ptr %0, align 4096
9433 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9434 define dso_local void @st_cst_align16_int8_t_double(i8 signext %str) {
9435 ; CHECK-LABEL: st_cst_align16_int8_t_double:
9436 ; CHECK: # %bb.0: # %entry
9437 ; CHECK-NEXT: mtfprwa f0, r3
9438 ; CHECK-NEXT: xscvsxddp f0, f0
9439 ; CHECK-NEXT: stfd f0, 4080(0)
9442 %conv = sitofp i8 %str to double
9443 store double %conv, ptr inttoptr (i64 4080 to ptr), align 16
9447 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9448 define dso_local void @st_cst_align32_int8_t_double(i8 signext %str) {
9449 ; CHECK-LABEL: st_cst_align32_int8_t_double:
9450 ; CHECK: # %bb.0: # %entry
9451 ; CHECK-NEXT: mtfprwa f0, r3
9452 ; CHECK-NEXT: lis r3, 153
9453 ; CHECK-NEXT: xscvsxddp f0, f0
9454 ; CHECK-NEXT: stfd f0, -27108(r3)
9457 %conv = sitofp i8 %str to double
9458 store double %conv, ptr inttoptr (i64 9999900 to ptr), align 8
9462 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9463 define dso_local void @st_cst_align64_int8_t_double(i8 signext %str) {
9464 ; CHECK-P10-LABEL: st_cst_align64_int8_t_double:
9465 ; CHECK-P10: # %bb.0: # %entry
9466 ; CHECK-P10-NEXT: mtfprwa f0, r3
9467 ; CHECK-P10-NEXT: pli r3, 244140625
9468 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
9469 ; CHECK-P10-NEXT: xscvsxddp f0, f0
9470 ; CHECK-P10-NEXT: stfd f0, 0(r3)
9471 ; CHECK-P10-NEXT: blr
9473 ; CHECK-P9-LABEL: st_cst_align64_int8_t_double:
9474 ; CHECK-P9: # %bb.0: # %entry
9475 ; CHECK-P9-NEXT: mtfprwa f0, r3
9476 ; CHECK-P9-NEXT: lis r3, 3725
9477 ; CHECK-P9-NEXT: xscvsxddp f0, f0
9478 ; CHECK-P9-NEXT: ori r3, r3, 19025
9479 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
9480 ; CHECK-P9-NEXT: stfd f0, 0(r3)
9481 ; CHECK-P9-NEXT: blr
9483 ; CHECK-P8-LABEL: st_cst_align64_int8_t_double:
9484 ; CHECK-P8: # %bb.0: # %entry
9485 ; CHECK-P8-NEXT: mtfprwa f0, r3
9486 ; CHECK-P8-NEXT: lis r3, 3725
9487 ; CHECK-P8-NEXT: ori r3, r3, 19025
9488 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
9489 ; CHECK-P8-NEXT: xscvsxddp f0, f0
9490 ; CHECK-P8-NEXT: stfd f0, 0(r3)
9491 ; CHECK-P8-NEXT: blr
9493 %conv = sitofp i8 %str to double
9494 store double %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096