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 i8*
30 %1 = load i8, i8* %0, align 1
34 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
35 define dso_local signext i8 @ld_align16_int8_t_uint8_t(i8* 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, i8* %ptr, i64 8
43 %0 = load i8, i8* %add.ptr, align 1
47 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
48 define dso_local signext i8 @ld_align32_int8_t_uint8_t(i8* nocapture readonly %ptr) {
49 ; CHECK-P10-LABEL: ld_align32_int8_t_uint8_t:
50 ; CHECK-P10: # %bb.0: # %entry
51 ; CHECK-P10-NEXT: pli r4, 99999000
52 ; CHECK-P10-NEXT: lbzx r3, r3, r4
53 ; CHECK-P10-NEXT: extsb r3, r3
56 ; CHECK-PREP10-LABEL: ld_align32_int8_t_uint8_t:
57 ; CHECK-PREP10: # %bb.0: # %entry
58 ; CHECK-PREP10-NEXT: lis r4, 1525
59 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
60 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
61 ; CHECK-PREP10-NEXT: extsb r3, r3
62 ; CHECK-PREP10-NEXT: blr
64 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
65 %0 = load i8, i8* %add.ptr, align 1
69 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
70 define dso_local signext i8 @ld_align64_int8_t_uint8_t(i8* nocapture readonly %ptr) {
71 ; CHECK-P10-LABEL: ld_align64_int8_t_uint8_t:
72 ; CHECK-P10: # %bb.0: # %entry
73 ; CHECK-P10-NEXT: pli r4, 244140625
74 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
75 ; CHECK-P10-NEXT: lbzx r3, r3, r4
76 ; CHECK-P10-NEXT: extsb r3, r3
79 ; CHECK-PREP10-LABEL: ld_align64_int8_t_uint8_t:
80 ; CHECK-PREP10: # %bb.0: # %entry
81 ; CHECK-PREP10-NEXT: lis r4, 3725
82 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
83 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
84 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
85 ; CHECK-PREP10-NEXT: extsb r3, r3
86 ; CHECK-PREP10-NEXT: blr
88 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
89 %0 = load i8, i8* %add.ptr, align 1
93 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
94 define dso_local signext i8 @ld_reg_int8_t_uint8_t(i8* nocapture readonly %ptr, i64 %off) {
95 ; CHECK-LABEL: ld_reg_int8_t_uint8_t:
96 ; CHECK: # %bb.0: # %entry
97 ; CHECK-NEXT: lbzx r3, r3, r4
98 ; CHECK-NEXT: extsb r3, r3
101 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
102 %0 = load i8, i8* %add.ptr, align 1
106 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
107 define dso_local signext i8 @ld_or_int8_t_uint8_t(i64 %ptr, i8 zeroext %off) {
108 ; CHECK-LABEL: ld_or_int8_t_uint8_t:
109 ; CHECK: # %bb.0: # %entry
110 ; CHECK-NEXT: or r3, r4, r3
111 ; CHECK-NEXT: lbz r3, 0(r3)
112 ; CHECK-NEXT: extsb r3, r3
115 %conv = zext i8 %off to i64
116 %or = or i64 %conv, %ptr
117 %0 = inttoptr i64 %or to i8*
118 %1 = load i8, i8* %0, align 1
122 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
123 define dso_local signext i8 @ld_not_disjoint16_int8_t_uint8_t(i64 %ptr) {
124 ; CHECK-LABEL: ld_not_disjoint16_int8_t_uint8_t:
125 ; CHECK: # %bb.0: # %entry
126 ; CHECK-NEXT: ori r3, r3, 6
127 ; CHECK-NEXT: lbz r3, 0(r3)
128 ; CHECK-NEXT: extsb r3, r3
132 %0 = inttoptr i64 %or to i8*
133 %1 = load i8, i8* %0, align 1
137 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
138 define dso_local signext i8 @ld_disjoint_align16_int8_t_uint8_t(i64 %ptr) {
139 ; CHECK-LABEL: ld_disjoint_align16_int8_t_uint8_t:
140 ; CHECK: # %bb.0: # %entry
141 ; CHECK-NEXT: rldicr r3, r3, 0, 51
142 ; CHECK-NEXT: lbz r3, 24(r3)
143 ; CHECK-NEXT: extsb r3, r3
146 %and = and i64 %ptr, -4096
147 %or = or i64 %and, 24
148 %0 = inttoptr i64 %or to i8*
149 %1 = load i8, i8* %0, align 8
153 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
154 define dso_local signext i8 @ld_not_disjoint32_int8_t_uint8_t(i64 %ptr) {
155 ; CHECK-LABEL: ld_not_disjoint32_int8_t_uint8_t:
156 ; CHECK: # %bb.0: # %entry
157 ; CHECK-NEXT: ori r3, r3, 34463
158 ; CHECK-NEXT: oris r3, r3, 1
159 ; CHECK-NEXT: lbz r3, 0(r3)
160 ; CHECK-NEXT: extsb r3, r3
163 %or = or i64 %ptr, 99999
164 %0 = inttoptr i64 %or to i8*
165 %1 = load i8, i8* %0, align 1
169 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
170 define dso_local signext i8 @ld_disjoint_align32_int8_t_uint8_t(i64 %ptr) {
171 ; CHECK-P10-LABEL: ld_disjoint_align32_int8_t_uint8_t:
172 ; CHECK-P10: # %bb.0: # %entry
173 ; CHECK-P10-NEXT: lis r4, -15264
174 ; CHECK-P10-NEXT: and r3, r3, r4
175 ; CHECK-P10-NEXT: pli r4, 999990000
176 ; CHECK-P10-NEXT: lbzx r3, r3, r4
177 ; CHECK-P10-NEXT: extsb r3, r3
178 ; CHECK-P10-NEXT: blr
180 ; CHECK-P9-LABEL: ld_disjoint_align32_int8_t_uint8_t:
181 ; CHECK-P9: # %bb.0: # %entry
182 ; CHECK-P9-NEXT: lis r4, -15264
183 ; CHECK-P9-NEXT: and r3, r3, r4
184 ; CHECK-P9-NEXT: lis r4, 15258
185 ; CHECK-P9-NEXT: ori r4, r4, 41712
186 ; CHECK-P9-NEXT: lbzx r3, r3, r4
187 ; CHECK-P9-NEXT: extsb r3, r3
190 ; CHECK-P8-LABEL: ld_disjoint_align32_int8_t_uint8_t:
191 ; CHECK-P8: # %bb.0: # %entry
192 ; CHECK-P8-NEXT: lis r4, -15264
193 ; CHECK-P8-NEXT: lis r5, 15258
194 ; CHECK-P8-NEXT: and r3, r3, r4
195 ; CHECK-P8-NEXT: ori r4, r5, 41712
196 ; CHECK-P8-NEXT: lbzx r3, r3, r4
197 ; CHECK-P8-NEXT: extsb r3, r3
200 %and = and i64 %ptr, -1000341504
201 %or = or i64 %and, 999990000
202 %0 = inttoptr i64 %or to i8*
203 %1 = load i8, i8* %0, align 16
207 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
208 define dso_local signext i8 @ld_not_disjoint64_int8_t_uint8_t(i64 %ptr) {
209 ; CHECK-P10-LABEL: ld_not_disjoint64_int8_t_uint8_t:
210 ; CHECK-P10: # %bb.0: # %entry
211 ; CHECK-P10-NEXT: pli r4, 232
212 ; CHECK-P10-NEXT: pli r5, 3567587329
213 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
214 ; CHECK-P10-NEXT: or r3, r3, r5
215 ; CHECK-P10-NEXT: lbz r3, 0(r3)
216 ; CHECK-P10-NEXT: extsb r3, r3
217 ; CHECK-P10-NEXT: blr
219 ; CHECK-PREP10-LABEL: ld_not_disjoint64_int8_t_uint8_t:
220 ; CHECK-PREP10: # %bb.0: # %entry
221 ; CHECK-PREP10-NEXT: li r4, 29
222 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
223 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
224 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
225 ; CHECK-PREP10-NEXT: or r3, r3, r4
226 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
227 ; CHECK-PREP10-NEXT: extsb r3, r3
228 ; CHECK-PREP10-NEXT: blr
230 %or = or i64 %ptr, 1000000000001
231 %0 = inttoptr i64 %or to i8*
232 %1 = load i8, i8* %0, align 1
236 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
237 define dso_local signext i8 @ld_disjoint_align64_int8_t_uint8_t(i64 %ptr) {
238 ; CHECK-P10-LABEL: ld_disjoint_align64_int8_t_uint8_t:
239 ; CHECK-P10: # %bb.0: # %entry
240 ; CHECK-P10-NEXT: pli r4, 244140625
241 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
242 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
243 ; CHECK-P10-NEXT: lbzx r3, r3, r4
244 ; CHECK-P10-NEXT: extsb r3, r3
245 ; CHECK-P10-NEXT: blr
247 ; CHECK-PREP10-LABEL: ld_disjoint_align64_int8_t_uint8_t:
248 ; CHECK-PREP10: # %bb.0: # %entry
249 ; CHECK-PREP10-NEXT: lis r4, 3725
250 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
251 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
252 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
253 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
254 ; CHECK-PREP10-NEXT: extsb r3, r3
255 ; CHECK-PREP10-NEXT: blr
257 %and = and i64 %ptr, -1099511627776
258 %or = or i64 %and, 1000000000000
259 %0 = inttoptr i64 %or to i8*
260 %1 = load i8, i8* %0, align 4096
264 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
265 define dso_local signext i8 @ld_cst_align16_int8_t_uint8_t() {
266 ; CHECK-LABEL: ld_cst_align16_int8_t_uint8_t:
267 ; CHECK: # %bb.0: # %entry
268 ; CHECK-NEXT: lbz r3, 4080(0)
269 ; CHECK-NEXT: extsb r3, r3
272 %0 = load i8, i8* inttoptr (i64 4080 to i8*), align 16
276 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
277 define dso_local signext i8 @ld_cst_align32_int8_t_uint8_t() {
278 ; CHECK-LABEL: ld_cst_align32_int8_t_uint8_t:
279 ; CHECK: # %bb.0: # %entry
280 ; CHECK-NEXT: lis r3, 153
281 ; CHECK-NEXT: lbz r3, -27108(r3)
282 ; CHECK-NEXT: extsb r3, r3
285 %0 = load i8, i8* inttoptr (i64 9999900 to i8*), align 4
289 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
290 define dso_local signext i8 @ld_cst_align64_int8_t_uint8_t() {
291 ; CHECK-P10-LABEL: ld_cst_align64_int8_t_uint8_t:
292 ; CHECK-P10: # %bb.0: # %entry
293 ; CHECK-P10-NEXT: pli r3, 244140625
294 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
295 ; CHECK-P10-NEXT: lbz r3, 0(r3)
296 ; CHECK-P10-NEXT: extsb r3, r3
297 ; CHECK-P10-NEXT: blr
299 ; CHECK-PREP10-LABEL: ld_cst_align64_int8_t_uint8_t:
300 ; CHECK-PREP10: # %bb.0: # %entry
301 ; CHECK-PREP10-NEXT: lis r3, 3725
302 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
303 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
304 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
305 ; CHECK-PREP10-NEXT: extsb r3, r3
306 ; CHECK-PREP10-NEXT: blr
308 %0 = load i8, i8* inttoptr (i64 1000000000000 to i8*), align 4096
312 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
313 define dso_local signext i8 @ld_0_int8_t_uint16_t(i64 %ptr) {
314 ; CHECK-LE-LABEL: ld_0_int8_t_uint16_t:
315 ; CHECK-LE: # %bb.0: # %entry
316 ; CHECK-LE-NEXT: lbz r3, 0(r3)
317 ; CHECK-LE-NEXT: extsb r3, r3
320 ; CHECK-BE-LABEL: ld_0_int8_t_uint16_t:
321 ; CHECK-BE: # %bb.0: # %entry
322 ; CHECK-BE-NEXT: lbz r3, 1(r3)
323 ; CHECK-BE-NEXT: extsb r3, r3
326 %0 = inttoptr i64 %ptr to i16*
327 %1 = load i16, i16* %0, align 2
328 %conv = trunc i16 %1 to i8
332 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
333 define dso_local signext i8 @ld_align16_int8_t_uint16_t(i8* nocapture readonly %ptr) {
334 ; CHECK-LE-LABEL: ld_align16_int8_t_uint16_t:
335 ; CHECK-LE: # %bb.0: # %entry
336 ; CHECK-LE-NEXT: lbz r3, 8(r3)
337 ; CHECK-LE-NEXT: extsb r3, r3
340 ; CHECK-BE-LABEL: ld_align16_int8_t_uint16_t:
341 ; CHECK-BE: # %bb.0: # %entry
342 ; CHECK-BE-NEXT: lbz r3, 9(r3)
343 ; CHECK-BE-NEXT: extsb r3, r3
346 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
347 %0 = bitcast i8* %add.ptr to i16*
348 %1 = load i16, i16* %0, align 2
349 %conv = trunc i16 %1 to i8
353 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
354 define dso_local signext i8 @ld_align32_int8_t_uint16_t(i8* nocapture readonly %ptr) {
355 ; CHECK-P10-LE-LABEL: ld_align32_int8_t_uint16_t:
356 ; CHECK-P10-LE: # %bb.0: # %entry
357 ; CHECK-P10-LE-NEXT: pli r4, 99999000
358 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
359 ; CHECK-P10-LE-NEXT: extsb r3, r3
360 ; CHECK-P10-LE-NEXT: blr
362 ; CHECK-P10-BE-LABEL: ld_align32_int8_t_uint16_t:
363 ; CHECK-P10-BE: # %bb.0: # %entry
364 ; CHECK-P10-BE-NEXT: pli r4, 99999001
365 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r4
366 ; CHECK-P10-BE-NEXT: extsb r3, r3
367 ; CHECK-P10-BE-NEXT: blr
369 ; CHECK-P9-LE-LABEL: ld_align32_int8_t_uint16_t:
370 ; CHECK-P9-LE: # %bb.0: # %entry
371 ; CHECK-P9-LE-NEXT: lis r4, 1525
372 ; CHECK-P9-LE-NEXT: ori r4, r4, 56600
373 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
374 ; CHECK-P9-LE-NEXT: extsb r3, r3
375 ; CHECK-P9-LE-NEXT: blr
377 ; CHECK-P9-BE-LABEL: ld_align32_int8_t_uint16_t:
378 ; CHECK-P9-BE: # %bb.0: # %entry
379 ; CHECK-P9-BE-NEXT: lis r4, 1525
380 ; CHECK-P9-BE-NEXT: ori r4, r4, 56601
381 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
382 ; CHECK-P9-BE-NEXT: extsb r3, r3
383 ; CHECK-P9-BE-NEXT: blr
385 ; CHECK-P8-LE-LABEL: ld_align32_int8_t_uint16_t:
386 ; CHECK-P8-LE: # %bb.0: # %entry
387 ; CHECK-P8-LE-NEXT: lis r4, 1525
388 ; CHECK-P8-LE-NEXT: ori r4, r4, 56600
389 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
390 ; CHECK-P8-LE-NEXT: extsb r3, r3
391 ; CHECK-P8-LE-NEXT: blr
393 ; CHECK-P8-BE-LABEL: ld_align32_int8_t_uint16_t:
394 ; CHECK-P8-BE: # %bb.0: # %entry
395 ; CHECK-P8-BE-NEXT: lis r4, 1525
396 ; CHECK-P8-BE-NEXT: ori r4, r4, 56601
397 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
398 ; CHECK-P8-BE-NEXT: extsb r3, r3
399 ; CHECK-P8-BE-NEXT: blr
401 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
402 %0 = bitcast i8* %add.ptr to i16*
403 %1 = load i16, i16* %0, align 2
404 %conv = trunc i16 %1 to i8
408 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
409 define dso_local signext i8 @ld_align64_int8_t_uint16_t(i8* nocapture readonly %ptr) {
410 ; CHECK-P10-LE-LABEL: ld_align64_int8_t_uint16_t:
411 ; CHECK-P10-LE: # %bb.0: # %entry
412 ; CHECK-P10-LE-NEXT: pli r4, 244140625
413 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
414 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
415 ; CHECK-P10-LE-NEXT: extsb r3, r3
416 ; CHECK-P10-LE-NEXT: blr
418 ; CHECK-P10-BE-LABEL: ld_align64_int8_t_uint16_t:
419 ; CHECK-P10-BE: # %bb.0: # %entry
420 ; CHECK-P10-BE-NEXT: pli r4, 232
421 ; CHECK-P10-BE-NEXT: pli r5, 3567587329
422 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
423 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
424 ; CHECK-P10-BE-NEXT: extsb r3, r3
425 ; CHECK-P10-BE-NEXT: blr
427 ; CHECK-P9-LE-LABEL: ld_align64_int8_t_uint16_t:
428 ; CHECK-P9-LE: # %bb.0: # %entry
429 ; CHECK-P9-LE-NEXT: lis r4, 3725
430 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
431 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
432 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
433 ; CHECK-P9-LE-NEXT: extsb r3, r3
434 ; CHECK-P9-LE-NEXT: blr
436 ; CHECK-P9-BE-LABEL: ld_align64_int8_t_uint16_t:
437 ; CHECK-P9-BE: # %bb.0: # %entry
438 ; CHECK-P9-BE-NEXT: li r4, 29
439 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
440 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
441 ; CHECK-P9-BE-NEXT: ori r4, r4, 4097
442 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
443 ; CHECK-P9-BE-NEXT: extsb r3, r3
444 ; CHECK-P9-BE-NEXT: blr
446 ; CHECK-P8-LE-LABEL: ld_align64_int8_t_uint16_t:
447 ; CHECK-P8-LE: # %bb.0: # %entry
448 ; CHECK-P8-LE-NEXT: lis r4, 3725
449 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
450 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
451 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
452 ; CHECK-P8-LE-NEXT: extsb r3, r3
453 ; CHECK-P8-LE-NEXT: blr
455 ; CHECK-P8-BE-LABEL: ld_align64_int8_t_uint16_t:
456 ; CHECK-P8-BE: # %bb.0: # %entry
457 ; CHECK-P8-BE-NEXT: li r4, 29
458 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
459 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
460 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
461 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
462 ; CHECK-P8-BE-NEXT: extsb r3, r3
463 ; CHECK-P8-BE-NEXT: blr
465 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
466 %0 = bitcast i8* %add.ptr to i16*
467 %1 = load i16, i16* %0, align 2
468 %conv = trunc i16 %1 to i8
472 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
473 define dso_local signext i8 @ld_reg_int8_t_uint16_t(i8* nocapture readonly %ptr, i64 %off) {
474 ; CHECK-LE-LABEL: ld_reg_int8_t_uint16_t:
475 ; CHECK-LE: # %bb.0: # %entry
476 ; CHECK-LE-NEXT: lbzx r3, r3, r4
477 ; CHECK-LE-NEXT: extsb r3, r3
480 ; CHECK-BE-LABEL: ld_reg_int8_t_uint16_t:
481 ; CHECK-BE: # %bb.0: # %entry
482 ; CHECK-BE-NEXT: add r3, r3, r4
483 ; CHECK-BE-NEXT: lbz r3, 1(r3)
484 ; CHECK-BE-NEXT: extsb r3, r3
487 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
488 %0 = bitcast i8* %add.ptr to i16*
489 %1 = load i16, i16* %0, align 2
490 %conv = trunc i16 %1 to i8
494 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
495 define dso_local signext i8 @ld_or_int8_t_uint16_t(i64 %ptr, i8 zeroext %off) {
496 ; CHECK-LE-LABEL: ld_or_int8_t_uint16_t:
497 ; CHECK-LE: # %bb.0: # %entry
498 ; CHECK-LE-NEXT: or r3, r4, r3
499 ; CHECK-LE-NEXT: lbz r3, 0(r3)
500 ; CHECK-LE-NEXT: extsb r3, r3
503 ; CHECK-BE-LABEL: ld_or_int8_t_uint16_t:
504 ; CHECK-BE: # %bb.0: # %entry
505 ; CHECK-BE-NEXT: or r3, r4, r3
506 ; CHECK-BE-NEXT: lbz r3, 1(r3)
507 ; CHECK-BE-NEXT: extsb r3, r3
510 %conv = zext i8 %off to i64
511 %or = or i64 %conv, %ptr
512 %0 = inttoptr i64 %or to i16*
513 %1 = load i16, i16* %0, align 2
514 %conv1 = trunc i16 %1 to i8
518 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
519 define dso_local signext i8 @ld_not_disjoint16_int8_t_uint16_t(i64 %ptr) {
520 ; CHECK-LE-LABEL: ld_not_disjoint16_int8_t_uint16_t:
521 ; CHECK-LE: # %bb.0: # %entry
522 ; CHECK-LE-NEXT: ori r3, r3, 6
523 ; CHECK-LE-NEXT: lbz r3, 0(r3)
524 ; CHECK-LE-NEXT: extsb r3, r3
527 ; CHECK-BE-LABEL: ld_not_disjoint16_int8_t_uint16_t:
528 ; CHECK-BE: # %bb.0: # %entry
529 ; CHECK-BE-NEXT: ori r3, r3, 6
530 ; CHECK-BE-NEXT: lbz r3, 1(r3)
531 ; CHECK-BE-NEXT: extsb r3, r3
535 %0 = inttoptr i64 %or to i16*
536 %1 = load i16, i16* %0, align 2
537 %conv = trunc i16 %1 to i8
541 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
542 define dso_local signext i8 @ld_disjoint_align16_int8_t_uint16_t(i64 %ptr) {
543 ; CHECK-LE-LABEL: ld_disjoint_align16_int8_t_uint16_t:
544 ; CHECK-LE: # %bb.0: # %entry
545 ; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
546 ; CHECK-LE-NEXT: lbz r3, 24(r3)
547 ; CHECK-LE-NEXT: extsb r3, r3
550 ; CHECK-BE-LABEL: ld_disjoint_align16_int8_t_uint16_t:
551 ; CHECK-BE: # %bb.0: # %entry
552 ; CHECK-BE-NEXT: rldicr r3, r3, 0, 51
553 ; CHECK-BE-NEXT: lbz r3, 25(r3)
554 ; CHECK-BE-NEXT: extsb r3, r3
557 %and = and i64 %ptr, -4096
558 %or = or i64 %and, 24
559 %0 = inttoptr i64 %or to i16*
560 %1 = load i16, i16* %0, align 8
561 %conv = trunc i16 %1 to i8
565 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
566 define dso_local signext i8 @ld_not_disjoint32_int8_t_uint16_t(i64 %ptr) {
567 ; CHECK-LE-LABEL: ld_not_disjoint32_int8_t_uint16_t:
568 ; CHECK-LE: # %bb.0: # %entry
569 ; CHECK-LE-NEXT: ori r3, r3, 34463
570 ; CHECK-LE-NEXT: oris r3, r3, 1
571 ; CHECK-LE-NEXT: lbz r3, 0(r3)
572 ; CHECK-LE-NEXT: extsb r3, r3
575 ; CHECK-BE-LABEL: ld_not_disjoint32_int8_t_uint16_t:
576 ; CHECK-BE: # %bb.0: # %entry
577 ; CHECK-BE-NEXT: ori r3, r3, 34463
578 ; CHECK-BE-NEXT: oris r3, r3, 1
579 ; CHECK-BE-NEXT: lbz r3, 1(r3)
580 ; CHECK-BE-NEXT: extsb r3, r3
583 %or = or i64 %ptr, 99999
584 %0 = inttoptr i64 %or to i16*
585 %1 = load i16, i16* %0, align 2
586 %conv = trunc i16 %1 to i8
590 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
591 define dso_local signext i8 @ld_disjoint_align32_int8_t_uint16_t(i64 %ptr) {
592 ; CHECK-P10-LE-LABEL: ld_disjoint_align32_int8_t_uint16_t:
593 ; CHECK-P10-LE: # %bb.0: # %entry
594 ; CHECK-P10-LE-NEXT: lis r4, -15264
595 ; CHECK-P10-LE-NEXT: and r3, r3, r4
596 ; CHECK-P10-LE-NEXT: pli r4, 999990000
597 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
598 ; CHECK-P10-LE-NEXT: extsb r3, r3
599 ; CHECK-P10-LE-NEXT: blr
601 ; CHECK-P10-BE-LABEL: ld_disjoint_align32_int8_t_uint16_t:
602 ; CHECK-P10-BE: # %bb.0: # %entry
603 ; CHECK-P10-BE-NEXT: lis r4, -15264
604 ; CHECK-P10-BE-NEXT: and r3, r3, r4
605 ; CHECK-P10-BE-NEXT: pli r4, 999990001
606 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r4
607 ; CHECK-P10-BE-NEXT: extsb r3, r3
608 ; CHECK-P10-BE-NEXT: blr
610 ; CHECK-P9-LE-LABEL: ld_disjoint_align32_int8_t_uint16_t:
611 ; CHECK-P9-LE: # %bb.0: # %entry
612 ; CHECK-P9-LE-NEXT: lis r4, -15264
613 ; CHECK-P9-LE-NEXT: and r3, r3, r4
614 ; CHECK-P9-LE-NEXT: lis r4, 15258
615 ; CHECK-P9-LE-NEXT: ori r4, r4, 41712
616 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
617 ; CHECK-P9-LE-NEXT: extsb r3, r3
618 ; CHECK-P9-LE-NEXT: blr
620 ; CHECK-P9-BE-LABEL: ld_disjoint_align32_int8_t_uint16_t:
621 ; CHECK-P9-BE: # %bb.0: # %entry
622 ; CHECK-P9-BE-NEXT: lis r4, -15264
623 ; CHECK-P9-BE-NEXT: and r3, r3, r4
624 ; CHECK-P9-BE-NEXT: lis r4, 15258
625 ; CHECK-P9-BE-NEXT: ori r4, r4, 41713
626 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
627 ; CHECK-P9-BE-NEXT: extsb r3, r3
628 ; CHECK-P9-BE-NEXT: blr
630 ; CHECK-P8-LE-LABEL: ld_disjoint_align32_int8_t_uint16_t:
631 ; CHECK-P8-LE: # %bb.0: # %entry
632 ; CHECK-P8-LE-NEXT: lis r4, -15264
633 ; CHECK-P8-LE-NEXT: lis r5, 15258
634 ; CHECK-P8-LE-NEXT: and r3, r3, r4
635 ; CHECK-P8-LE-NEXT: ori r4, r5, 41712
636 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
637 ; CHECK-P8-LE-NEXT: extsb r3, r3
638 ; CHECK-P8-LE-NEXT: blr
640 ; CHECK-P8-BE-LABEL: ld_disjoint_align32_int8_t_uint16_t:
641 ; CHECK-P8-BE: # %bb.0: # %entry
642 ; CHECK-P8-BE-NEXT: lis r4, -15264
643 ; CHECK-P8-BE-NEXT: lis r5, 15258
644 ; CHECK-P8-BE-NEXT: and r3, r3, r4
645 ; CHECK-P8-BE-NEXT: ori r4, r5, 41713
646 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
647 ; CHECK-P8-BE-NEXT: extsb r3, r3
648 ; CHECK-P8-BE-NEXT: blr
650 %and = and i64 %ptr, -1000341504
651 %or = or i64 %and, 999990000
652 %0 = inttoptr i64 %or to i16*
653 %1 = load i16, i16* %0, align 16
654 %conv = trunc i16 %1 to i8
658 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
659 define dso_local signext i8 @ld_not_disjoint64_int8_t_uint16_t(i64 %ptr) {
660 ; CHECK-P10-LE-LABEL: ld_not_disjoint64_int8_t_uint16_t:
661 ; CHECK-P10-LE: # %bb.0: # %entry
662 ; CHECK-P10-LE-NEXT: pli r4, 232
663 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
664 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
665 ; CHECK-P10-LE-NEXT: or r3, r3, r5
666 ; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
667 ; CHECK-P10-LE-NEXT: extsb r3, r3
668 ; CHECK-P10-LE-NEXT: blr
670 ; CHECK-P10-BE-LABEL: ld_not_disjoint64_int8_t_uint16_t:
671 ; CHECK-P10-BE: # %bb.0: # %entry
672 ; CHECK-P10-BE-NEXT: pli r4, 232
673 ; CHECK-P10-BE-NEXT: pli r5, 3567587329
674 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
675 ; CHECK-P10-BE-NEXT: or r3, r3, r5
676 ; CHECK-P10-BE-NEXT: lbz r3, 1(r3)
677 ; CHECK-P10-BE-NEXT: extsb r3, r3
678 ; CHECK-P10-BE-NEXT: blr
680 ; CHECK-P9-LE-LABEL: ld_not_disjoint64_int8_t_uint16_t:
681 ; CHECK-P9-LE: # %bb.0: # %entry
682 ; CHECK-P9-LE-NEXT: li r4, 29
683 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
684 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
685 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
686 ; CHECK-P9-LE-NEXT: or r3, r3, r4
687 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
688 ; CHECK-P9-LE-NEXT: extsb r3, r3
689 ; CHECK-P9-LE-NEXT: blr
691 ; CHECK-P9-BE-LABEL: ld_not_disjoint64_int8_t_uint16_t:
692 ; CHECK-P9-BE: # %bb.0: # %entry
693 ; CHECK-P9-BE-NEXT: li r4, 29
694 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
695 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
696 ; CHECK-P9-BE-NEXT: ori r4, r4, 4097
697 ; CHECK-P9-BE-NEXT: or r3, r3, r4
698 ; CHECK-P9-BE-NEXT: lbz r3, 1(r3)
699 ; CHECK-P9-BE-NEXT: extsb r3, r3
700 ; CHECK-P9-BE-NEXT: blr
702 ; CHECK-P8-LE-LABEL: ld_not_disjoint64_int8_t_uint16_t:
703 ; CHECK-P8-LE: # %bb.0: # %entry
704 ; CHECK-P8-LE-NEXT: li r4, 29
705 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
706 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
707 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
708 ; CHECK-P8-LE-NEXT: or r3, r3, r4
709 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
710 ; CHECK-P8-LE-NEXT: extsb r3, r3
711 ; CHECK-P8-LE-NEXT: blr
713 ; CHECK-P8-BE-LABEL: ld_not_disjoint64_int8_t_uint16_t:
714 ; CHECK-P8-BE: # %bb.0: # %entry
715 ; CHECK-P8-BE-NEXT: li r4, 29
716 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
717 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
718 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
719 ; CHECK-P8-BE-NEXT: or r3, r3, r4
720 ; CHECK-P8-BE-NEXT: lbz r3, 1(r3)
721 ; CHECK-P8-BE-NEXT: extsb r3, r3
722 ; CHECK-P8-BE-NEXT: blr
724 %or = or i64 %ptr, 1000000000001
725 %0 = inttoptr i64 %or to i16*
726 %1 = load i16, i16* %0, align 2
727 %conv = trunc i16 %1 to i8
731 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
732 define dso_local signext i8 @ld_disjoint_align64_int8_t_uint16_t(i64 %ptr) {
733 ; CHECK-P10-LE-LABEL: ld_disjoint_align64_int8_t_uint16_t:
734 ; CHECK-P10-LE: # %bb.0: # %entry
735 ; CHECK-P10-LE-NEXT: pli r4, 244140625
736 ; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
737 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
738 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
739 ; CHECK-P10-LE-NEXT: extsb r3, r3
740 ; CHECK-P10-LE-NEXT: blr
742 ; CHECK-P10-BE-LABEL: ld_disjoint_align64_int8_t_uint16_t:
743 ; CHECK-P10-BE: # %bb.0: # %entry
744 ; CHECK-P10-BE-NEXT: pli r4, 232
745 ; CHECK-P10-BE-NEXT: pli r5, 3567587329
746 ; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
747 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
748 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
749 ; CHECK-P10-BE-NEXT: extsb r3, r3
750 ; CHECK-P10-BE-NEXT: blr
752 ; CHECK-P9-LE-LABEL: ld_disjoint_align64_int8_t_uint16_t:
753 ; CHECK-P9-LE: # %bb.0: # %entry
754 ; CHECK-P9-LE-NEXT: lis r4, 3725
755 ; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
756 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
757 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
758 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
759 ; CHECK-P9-LE-NEXT: extsb r3, r3
760 ; CHECK-P9-LE-NEXT: blr
762 ; CHECK-P9-BE-LABEL: ld_disjoint_align64_int8_t_uint16_t:
763 ; CHECK-P9-BE: # %bb.0: # %entry
764 ; CHECK-P9-BE-NEXT: li r4, 29
765 ; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
766 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
767 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
768 ; CHECK-P9-BE-NEXT: ori r4, r4, 4097
769 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
770 ; CHECK-P9-BE-NEXT: extsb r3, r3
771 ; CHECK-P9-BE-NEXT: blr
773 ; CHECK-P8-LE-LABEL: ld_disjoint_align64_int8_t_uint16_t:
774 ; CHECK-P8-LE: # %bb.0: # %entry
775 ; CHECK-P8-LE-NEXT: lis r4, 3725
776 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
777 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
778 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
779 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
780 ; CHECK-P8-LE-NEXT: extsb r3, r3
781 ; CHECK-P8-LE-NEXT: blr
783 ; CHECK-P8-BE-LABEL: ld_disjoint_align64_int8_t_uint16_t:
784 ; CHECK-P8-BE: # %bb.0: # %entry
785 ; CHECK-P8-BE-NEXT: li r4, 29
786 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
787 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
788 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
789 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
790 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
791 ; CHECK-P8-BE-NEXT: extsb r3, r3
792 ; CHECK-P8-BE-NEXT: blr
794 %and = and i64 %ptr, -1099511627776
795 %or = or i64 %and, 1000000000000
796 %0 = inttoptr i64 %or to i16*
797 %1 = load i16, i16* %0, align 4096
798 %conv = trunc i16 %1 to i8
802 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
803 define dso_local signext i8 @ld_cst_align16_int8_t_uint16_t() {
804 ; CHECK-LE-LABEL: ld_cst_align16_int8_t_uint16_t:
805 ; CHECK-LE: # %bb.0: # %entry
806 ; CHECK-LE-NEXT: lbz r3, 4080(0)
807 ; CHECK-LE-NEXT: extsb r3, r3
810 ; CHECK-BE-LABEL: ld_cst_align16_int8_t_uint16_t:
811 ; CHECK-BE: # %bb.0: # %entry
812 ; CHECK-BE-NEXT: lbz r3, 4081(0)
813 ; CHECK-BE-NEXT: extsb r3, r3
816 %0 = load i16, i16* inttoptr (i64 4080 to i16*), align 16
817 %conv = trunc i16 %0 to i8
821 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
822 define dso_local signext i8 @ld_cst_align32_int8_t_uint16_t() {
823 ; CHECK-LE-LABEL: ld_cst_align32_int8_t_uint16_t:
824 ; CHECK-LE: # %bb.0: # %entry
825 ; CHECK-LE-NEXT: lis r3, 153
826 ; CHECK-LE-NEXT: lbz r3, -27108(r3)
827 ; CHECK-LE-NEXT: extsb r3, r3
830 ; CHECK-BE-LABEL: ld_cst_align32_int8_t_uint16_t:
831 ; CHECK-BE: # %bb.0: # %entry
832 ; CHECK-BE-NEXT: lis r3, 153
833 ; CHECK-BE-NEXT: lbz r3, -27107(r3)
834 ; CHECK-BE-NEXT: extsb r3, r3
837 %0 = load i16, i16* inttoptr (i64 9999900 to i16*), align 4
838 %conv = trunc i16 %0 to i8
842 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
843 define dso_local signext i8 @ld_cst_align64_int8_t_uint16_t() {
844 ; CHECK-P10-LE-LABEL: ld_cst_align64_int8_t_uint16_t:
845 ; CHECK-P10-LE: # %bb.0: # %entry
846 ; CHECK-P10-LE-NEXT: pli r3, 244140625
847 ; CHECK-P10-LE-NEXT: rldic r3, r3, 12, 24
848 ; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
849 ; CHECK-P10-LE-NEXT: extsb r3, r3
850 ; CHECK-P10-LE-NEXT: blr
852 ; CHECK-P10-BE-LABEL: ld_cst_align64_int8_t_uint16_t:
853 ; CHECK-P10-BE: # %bb.0: # %entry
854 ; CHECK-P10-BE-NEXT: pli r3, 232
855 ; CHECK-P10-BE-NEXT: pli r4, 3567587329
856 ; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
857 ; CHECK-P10-BE-NEXT: lbz r3, 0(r4)
858 ; CHECK-P10-BE-NEXT: extsb r3, r3
859 ; CHECK-P10-BE-NEXT: blr
861 ; CHECK-P9-LE-LABEL: ld_cst_align64_int8_t_uint16_t:
862 ; CHECK-P9-LE: # %bb.0: # %entry
863 ; CHECK-P9-LE-NEXT: lis r3, 3725
864 ; CHECK-P9-LE-NEXT: ori r3, r3, 19025
865 ; CHECK-P9-LE-NEXT: rldic r3, r3, 12, 24
866 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
867 ; CHECK-P9-LE-NEXT: extsb r3, r3
868 ; CHECK-P9-LE-NEXT: blr
870 ; CHECK-P9-BE-LABEL: ld_cst_align64_int8_t_uint16_t:
871 ; CHECK-P9-BE: # %bb.0: # %entry
872 ; CHECK-P9-BE-NEXT: li r3, 29
873 ; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
874 ; CHECK-P9-BE-NEXT: oris r3, r3, 54437
875 ; CHECK-P9-BE-NEXT: ori r3, r3, 4097
876 ; CHECK-P9-BE-NEXT: lbz r3, 0(r3)
877 ; CHECK-P9-BE-NEXT: extsb r3, r3
878 ; CHECK-P9-BE-NEXT: blr
880 ; CHECK-P8-LE-LABEL: ld_cst_align64_int8_t_uint16_t:
881 ; CHECK-P8-LE: # %bb.0: # %entry
882 ; CHECK-P8-LE-NEXT: lis r3, 3725
883 ; CHECK-P8-LE-NEXT: ori r3, r3, 19025
884 ; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
885 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
886 ; CHECK-P8-LE-NEXT: extsb r3, r3
887 ; CHECK-P8-LE-NEXT: blr
889 ; CHECK-P8-BE-LABEL: ld_cst_align64_int8_t_uint16_t:
890 ; CHECK-P8-BE: # %bb.0: # %entry
891 ; CHECK-P8-BE-NEXT: li r3, 29
892 ; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
893 ; CHECK-P8-BE-NEXT: oris r3, r3, 54437
894 ; CHECK-P8-BE-NEXT: ori r3, r3, 4097
895 ; CHECK-P8-BE-NEXT: lbz r3, 0(r3)
896 ; CHECK-P8-BE-NEXT: extsb r3, r3
897 ; CHECK-P8-BE-NEXT: blr
899 %0 = load i16, i16* inttoptr (i64 1000000000000 to i16*), align 4096
900 %conv = trunc i16 %0 to i8
904 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
905 define dso_local signext i8 @ld_0_int8_t_uint32_t(i64 %ptr) {
906 ; CHECK-LE-LABEL: ld_0_int8_t_uint32_t:
907 ; CHECK-LE: # %bb.0: # %entry
908 ; CHECK-LE-NEXT: lbz r3, 0(r3)
909 ; CHECK-LE-NEXT: extsb r3, r3
912 ; CHECK-BE-LABEL: ld_0_int8_t_uint32_t:
913 ; CHECK-BE: # %bb.0: # %entry
914 ; CHECK-BE-NEXT: lbz r3, 3(r3)
915 ; CHECK-BE-NEXT: extsb r3, r3
918 %0 = inttoptr i64 %ptr to i32*
919 %1 = load i32, i32* %0, align 4
920 %conv = trunc i32 %1 to i8
924 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
925 define dso_local signext i8 @ld_align16_int8_t_uint32_t(i8* nocapture readonly %ptr) {
926 ; CHECK-LE-LABEL: ld_align16_int8_t_uint32_t:
927 ; CHECK-LE: # %bb.0: # %entry
928 ; CHECK-LE-NEXT: lbz r3, 8(r3)
929 ; CHECK-LE-NEXT: extsb r3, r3
932 ; CHECK-BE-LABEL: ld_align16_int8_t_uint32_t:
933 ; CHECK-BE: # %bb.0: # %entry
934 ; CHECK-BE-NEXT: lbz r3, 11(r3)
935 ; CHECK-BE-NEXT: extsb r3, r3
938 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
939 %0 = bitcast i8* %add.ptr to i32*
940 %1 = load i32, i32* %0, align 4
941 %conv = trunc i32 %1 to i8
945 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
946 define dso_local signext i8 @ld_align32_int8_t_uint32_t(i8* nocapture readonly %ptr) {
947 ; CHECK-P10-LE-LABEL: ld_align32_int8_t_uint32_t:
948 ; CHECK-P10-LE: # %bb.0: # %entry
949 ; CHECK-P10-LE-NEXT: pli r4, 99999000
950 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
951 ; CHECK-P10-LE-NEXT: extsb r3, r3
952 ; CHECK-P10-LE-NEXT: blr
954 ; CHECK-P10-BE-LABEL: ld_align32_int8_t_uint32_t:
955 ; CHECK-P10-BE: # %bb.0: # %entry
956 ; CHECK-P10-BE-NEXT: pli r4, 99999003
957 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r4
958 ; CHECK-P10-BE-NEXT: extsb r3, r3
959 ; CHECK-P10-BE-NEXT: blr
961 ; CHECK-P9-LE-LABEL: ld_align32_int8_t_uint32_t:
962 ; CHECK-P9-LE: # %bb.0: # %entry
963 ; CHECK-P9-LE-NEXT: lis r4, 1525
964 ; CHECK-P9-LE-NEXT: ori r4, r4, 56600
965 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
966 ; CHECK-P9-LE-NEXT: extsb r3, r3
967 ; CHECK-P9-LE-NEXT: blr
969 ; CHECK-P9-BE-LABEL: ld_align32_int8_t_uint32_t:
970 ; CHECK-P9-BE: # %bb.0: # %entry
971 ; CHECK-P9-BE-NEXT: lis r4, 1525
972 ; CHECK-P9-BE-NEXT: ori r4, r4, 56603
973 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
974 ; CHECK-P9-BE-NEXT: extsb r3, r3
975 ; CHECK-P9-BE-NEXT: blr
977 ; CHECK-P8-LE-LABEL: ld_align32_int8_t_uint32_t:
978 ; CHECK-P8-LE: # %bb.0: # %entry
979 ; CHECK-P8-LE-NEXT: lis r4, 1525
980 ; CHECK-P8-LE-NEXT: ori r4, r4, 56600
981 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
982 ; CHECK-P8-LE-NEXT: extsb r3, r3
983 ; CHECK-P8-LE-NEXT: blr
985 ; CHECK-P8-BE-LABEL: ld_align32_int8_t_uint32_t:
986 ; CHECK-P8-BE: # %bb.0: # %entry
987 ; CHECK-P8-BE-NEXT: lis r4, 1525
988 ; CHECK-P8-BE-NEXT: ori r4, r4, 56603
989 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
990 ; CHECK-P8-BE-NEXT: extsb r3, r3
991 ; CHECK-P8-BE-NEXT: blr
993 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
994 %0 = bitcast i8* %add.ptr to i32*
995 %1 = load i32, i32* %0, align 4
996 %conv = trunc i32 %1 to i8
1000 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1001 define dso_local signext i8 @ld_align64_int8_t_uint32_t(i8* nocapture readonly %ptr) {
1002 ; CHECK-P10-LE-LABEL: ld_align64_int8_t_uint32_t:
1003 ; CHECK-P10-LE: # %bb.0: # %entry
1004 ; CHECK-P10-LE-NEXT: pli r4, 244140625
1005 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
1006 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
1007 ; CHECK-P10-LE-NEXT: extsb r3, r3
1008 ; CHECK-P10-LE-NEXT: blr
1010 ; CHECK-P10-BE-LABEL: ld_align64_int8_t_uint32_t:
1011 ; CHECK-P10-BE: # %bb.0: # %entry
1012 ; CHECK-P10-BE-NEXT: pli r4, 232
1013 ; CHECK-P10-BE-NEXT: pli r5, 3567587331
1014 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
1015 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
1016 ; CHECK-P10-BE-NEXT: extsb r3, r3
1017 ; CHECK-P10-BE-NEXT: blr
1019 ; CHECK-P9-LE-LABEL: ld_align64_int8_t_uint32_t:
1020 ; CHECK-P9-LE: # %bb.0: # %entry
1021 ; CHECK-P9-LE-NEXT: lis r4, 3725
1022 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
1023 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
1024 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
1025 ; CHECK-P9-LE-NEXT: extsb r3, r3
1026 ; CHECK-P9-LE-NEXT: blr
1028 ; CHECK-P9-BE-LABEL: ld_align64_int8_t_uint32_t:
1029 ; CHECK-P9-BE: # %bb.0: # %entry
1030 ; CHECK-P9-BE-NEXT: li r4, 29
1031 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
1032 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
1033 ; CHECK-P9-BE-NEXT: ori r4, r4, 4099
1034 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
1035 ; CHECK-P9-BE-NEXT: extsb r3, r3
1036 ; CHECK-P9-BE-NEXT: blr
1038 ; CHECK-P8-LE-LABEL: ld_align64_int8_t_uint32_t:
1039 ; CHECK-P8-LE: # %bb.0: # %entry
1040 ; CHECK-P8-LE-NEXT: lis r4, 3725
1041 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
1042 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
1043 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
1044 ; CHECK-P8-LE-NEXT: extsb r3, r3
1045 ; CHECK-P8-LE-NEXT: blr
1047 ; CHECK-P8-BE-LABEL: ld_align64_int8_t_uint32_t:
1048 ; CHECK-P8-BE: # %bb.0: # %entry
1049 ; CHECK-P8-BE-NEXT: li r4, 29
1050 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
1051 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
1052 ; CHECK-P8-BE-NEXT: ori r4, r4, 4099
1053 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
1054 ; CHECK-P8-BE-NEXT: extsb r3, r3
1055 ; CHECK-P8-BE-NEXT: blr
1057 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
1058 %0 = bitcast i8* %add.ptr to i32*
1059 %1 = load i32, i32* %0, align 4
1060 %conv = trunc i32 %1 to i8
1064 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1065 define dso_local signext i8 @ld_reg_int8_t_uint32_t(i8* nocapture readonly %ptr, i64 %off) {
1066 ; CHECK-LE-LABEL: ld_reg_int8_t_uint32_t:
1067 ; CHECK-LE: # %bb.0: # %entry
1068 ; CHECK-LE-NEXT: lbzx r3, r3, r4
1069 ; CHECK-LE-NEXT: extsb r3, r3
1070 ; CHECK-LE-NEXT: blr
1072 ; CHECK-BE-LABEL: ld_reg_int8_t_uint32_t:
1073 ; CHECK-BE: # %bb.0: # %entry
1074 ; CHECK-BE-NEXT: add r3, r3, r4
1075 ; CHECK-BE-NEXT: lbz r3, 3(r3)
1076 ; CHECK-BE-NEXT: extsb r3, r3
1077 ; CHECK-BE-NEXT: blr
1079 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
1080 %0 = bitcast i8* %add.ptr to i32*
1081 %1 = load i32, i32* %0, align 4
1082 %conv = trunc i32 %1 to i8
1086 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1087 define dso_local signext i8 @ld_or_int8_t_uint32_t(i64 %ptr, i8 zeroext %off) {
1088 ; CHECK-LE-LABEL: ld_or_int8_t_uint32_t:
1089 ; CHECK-LE: # %bb.0: # %entry
1090 ; CHECK-LE-NEXT: or r3, r4, r3
1091 ; CHECK-LE-NEXT: lbz r3, 0(r3)
1092 ; CHECK-LE-NEXT: extsb r3, r3
1093 ; CHECK-LE-NEXT: blr
1095 ; CHECK-BE-LABEL: ld_or_int8_t_uint32_t:
1096 ; CHECK-BE: # %bb.0: # %entry
1097 ; CHECK-BE-NEXT: or r3, r4, r3
1098 ; CHECK-BE-NEXT: lbz r3, 3(r3)
1099 ; CHECK-BE-NEXT: extsb r3, r3
1100 ; CHECK-BE-NEXT: blr
1102 %conv = zext i8 %off to i64
1103 %or = or i64 %conv, %ptr
1104 %0 = inttoptr i64 %or to i32*
1105 %1 = load i32, i32* %0, align 4
1106 %conv1 = trunc i32 %1 to i8
1110 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1111 define dso_local signext i8 @ld_not_disjoint16_int8_t_uint32_t(i64 %ptr) {
1112 ; CHECK-LE-LABEL: ld_not_disjoint16_int8_t_uint32_t:
1113 ; CHECK-LE: # %bb.0: # %entry
1114 ; CHECK-LE-NEXT: ori r3, r3, 6
1115 ; CHECK-LE-NEXT: lbz r3, 0(r3)
1116 ; CHECK-LE-NEXT: extsb r3, r3
1117 ; CHECK-LE-NEXT: blr
1119 ; CHECK-BE-LABEL: ld_not_disjoint16_int8_t_uint32_t:
1120 ; CHECK-BE: # %bb.0: # %entry
1121 ; CHECK-BE-NEXT: ori r3, r3, 6
1122 ; CHECK-BE-NEXT: lbz r3, 3(r3)
1123 ; CHECK-BE-NEXT: extsb r3, r3
1124 ; CHECK-BE-NEXT: blr
1126 %or = or i64 %ptr, 6
1127 %0 = inttoptr i64 %or to i32*
1128 %1 = load i32, i32* %0, align 4
1129 %conv = trunc i32 %1 to i8
1133 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1134 define dso_local signext i8 @ld_disjoint_align16_int8_t_uint32_t(i64 %ptr) {
1135 ; CHECK-LE-LABEL: ld_disjoint_align16_int8_t_uint32_t:
1136 ; CHECK-LE: # %bb.0: # %entry
1137 ; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
1138 ; CHECK-LE-NEXT: lbz r3, 24(r3)
1139 ; CHECK-LE-NEXT: extsb r3, r3
1140 ; CHECK-LE-NEXT: blr
1142 ; CHECK-BE-LABEL: ld_disjoint_align16_int8_t_uint32_t:
1143 ; CHECK-BE: # %bb.0: # %entry
1144 ; CHECK-BE-NEXT: rldicr r3, r3, 0, 51
1145 ; CHECK-BE-NEXT: lbz r3, 27(r3)
1146 ; CHECK-BE-NEXT: extsb r3, r3
1147 ; CHECK-BE-NEXT: blr
1149 %and = and i64 %ptr, -4096
1150 %or = or i64 %and, 24
1151 %0 = inttoptr i64 %or to i32*
1152 %1 = load i32, i32* %0, align 8
1153 %conv = trunc i32 %1 to i8
1157 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1158 define dso_local signext i8 @ld_not_disjoint32_int8_t_uint32_t(i64 %ptr) {
1159 ; CHECK-LE-LABEL: ld_not_disjoint32_int8_t_uint32_t:
1160 ; CHECK-LE: # %bb.0: # %entry
1161 ; CHECK-LE-NEXT: ori r3, r3, 34463
1162 ; CHECK-LE-NEXT: oris r3, r3, 1
1163 ; CHECK-LE-NEXT: lbz r3, 0(r3)
1164 ; CHECK-LE-NEXT: extsb r3, r3
1165 ; CHECK-LE-NEXT: blr
1167 ; CHECK-BE-LABEL: ld_not_disjoint32_int8_t_uint32_t:
1168 ; CHECK-BE: # %bb.0: # %entry
1169 ; CHECK-BE-NEXT: ori r3, r3, 34463
1170 ; CHECK-BE-NEXT: oris r3, r3, 1
1171 ; CHECK-BE-NEXT: lbz r3, 3(r3)
1172 ; CHECK-BE-NEXT: extsb r3, r3
1173 ; CHECK-BE-NEXT: blr
1175 %or = or i64 %ptr, 99999
1176 %0 = inttoptr i64 %or to i32*
1177 %1 = load i32, i32* %0, align 4
1178 %conv = trunc i32 %1 to i8
1182 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1183 define dso_local signext i8 @ld_disjoint_align32_int8_t_uint32_t(i64 %ptr) {
1184 ; CHECK-P10-LE-LABEL: ld_disjoint_align32_int8_t_uint32_t:
1185 ; CHECK-P10-LE: # %bb.0: # %entry
1186 ; CHECK-P10-LE-NEXT: lis r4, -15264
1187 ; CHECK-P10-LE-NEXT: and r3, r3, r4
1188 ; CHECK-P10-LE-NEXT: pli r4, 999990000
1189 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
1190 ; CHECK-P10-LE-NEXT: extsb r3, r3
1191 ; CHECK-P10-LE-NEXT: blr
1193 ; CHECK-P10-BE-LABEL: ld_disjoint_align32_int8_t_uint32_t:
1194 ; CHECK-P10-BE: # %bb.0: # %entry
1195 ; CHECK-P10-BE-NEXT: lis r4, -15264
1196 ; CHECK-P10-BE-NEXT: and r3, r3, r4
1197 ; CHECK-P10-BE-NEXT: pli r4, 999990003
1198 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r4
1199 ; CHECK-P10-BE-NEXT: extsb r3, r3
1200 ; CHECK-P10-BE-NEXT: blr
1202 ; CHECK-P9-LE-LABEL: ld_disjoint_align32_int8_t_uint32_t:
1203 ; CHECK-P9-LE: # %bb.0: # %entry
1204 ; CHECK-P9-LE-NEXT: lis r4, -15264
1205 ; CHECK-P9-LE-NEXT: and r3, r3, r4
1206 ; CHECK-P9-LE-NEXT: lis r4, 15258
1207 ; CHECK-P9-LE-NEXT: ori r4, r4, 41712
1208 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
1209 ; CHECK-P9-LE-NEXT: extsb r3, r3
1210 ; CHECK-P9-LE-NEXT: blr
1212 ; CHECK-P9-BE-LABEL: ld_disjoint_align32_int8_t_uint32_t:
1213 ; CHECK-P9-BE: # %bb.0: # %entry
1214 ; CHECK-P9-BE-NEXT: lis r4, -15264
1215 ; CHECK-P9-BE-NEXT: and r3, r3, r4
1216 ; CHECK-P9-BE-NEXT: lis r4, 15258
1217 ; CHECK-P9-BE-NEXT: ori r4, r4, 41715
1218 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
1219 ; CHECK-P9-BE-NEXT: extsb r3, r3
1220 ; CHECK-P9-BE-NEXT: blr
1222 ; CHECK-P8-LE-LABEL: ld_disjoint_align32_int8_t_uint32_t:
1223 ; CHECK-P8-LE: # %bb.0: # %entry
1224 ; CHECK-P8-LE-NEXT: lis r4, -15264
1225 ; CHECK-P8-LE-NEXT: lis r5, 15258
1226 ; CHECK-P8-LE-NEXT: and r3, r3, r4
1227 ; CHECK-P8-LE-NEXT: ori r4, r5, 41712
1228 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
1229 ; CHECK-P8-LE-NEXT: extsb r3, r3
1230 ; CHECK-P8-LE-NEXT: blr
1232 ; CHECK-P8-BE-LABEL: ld_disjoint_align32_int8_t_uint32_t:
1233 ; CHECK-P8-BE: # %bb.0: # %entry
1234 ; CHECK-P8-BE-NEXT: lis r4, -15264
1235 ; CHECK-P8-BE-NEXT: lis r5, 15258
1236 ; CHECK-P8-BE-NEXT: and r3, r3, r4
1237 ; CHECK-P8-BE-NEXT: ori r4, r5, 41715
1238 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
1239 ; CHECK-P8-BE-NEXT: extsb r3, r3
1240 ; CHECK-P8-BE-NEXT: blr
1242 %and = and i64 %ptr, -1000341504
1243 %or = or i64 %and, 999990000
1244 %0 = inttoptr i64 %or to i32*
1245 %1 = load i32, i32* %0, align 16
1246 %conv = trunc i32 %1 to i8
1250 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1251 define dso_local signext i8 @ld_not_disjoint64_int8_t_uint32_t(i64 %ptr) {
1252 ; CHECK-P10-LE-LABEL: ld_not_disjoint64_int8_t_uint32_t:
1253 ; CHECK-P10-LE: # %bb.0: # %entry
1254 ; CHECK-P10-LE-NEXT: pli r4, 232
1255 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
1256 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
1257 ; CHECK-P10-LE-NEXT: or r3, r3, r5
1258 ; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
1259 ; CHECK-P10-LE-NEXT: extsb r3, r3
1260 ; CHECK-P10-LE-NEXT: blr
1262 ; CHECK-P10-BE-LABEL: ld_not_disjoint64_int8_t_uint32_t:
1263 ; CHECK-P10-BE: # %bb.0: # %entry
1264 ; CHECK-P10-BE-NEXT: pli r4, 232
1265 ; CHECK-P10-BE-NEXT: pli r5, 3567587329
1266 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
1267 ; CHECK-P10-BE-NEXT: or r3, r3, r5
1268 ; CHECK-P10-BE-NEXT: lbz r3, 3(r3)
1269 ; CHECK-P10-BE-NEXT: extsb r3, r3
1270 ; CHECK-P10-BE-NEXT: blr
1272 ; CHECK-P9-LE-LABEL: ld_not_disjoint64_int8_t_uint32_t:
1273 ; CHECK-P9-LE: # %bb.0: # %entry
1274 ; CHECK-P9-LE-NEXT: li r4, 29
1275 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
1276 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
1277 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
1278 ; CHECK-P9-LE-NEXT: or r3, r3, r4
1279 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
1280 ; CHECK-P9-LE-NEXT: extsb r3, r3
1281 ; CHECK-P9-LE-NEXT: blr
1283 ; CHECK-P9-BE-LABEL: ld_not_disjoint64_int8_t_uint32_t:
1284 ; CHECK-P9-BE: # %bb.0: # %entry
1285 ; CHECK-P9-BE-NEXT: li r4, 29
1286 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
1287 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
1288 ; CHECK-P9-BE-NEXT: ori r4, r4, 4097
1289 ; CHECK-P9-BE-NEXT: or r3, r3, r4
1290 ; CHECK-P9-BE-NEXT: lbz r3, 3(r3)
1291 ; CHECK-P9-BE-NEXT: extsb r3, r3
1292 ; CHECK-P9-BE-NEXT: blr
1294 ; CHECK-P8-LE-LABEL: ld_not_disjoint64_int8_t_uint32_t:
1295 ; CHECK-P8-LE: # %bb.0: # %entry
1296 ; CHECK-P8-LE-NEXT: li r4, 29
1297 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
1298 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
1299 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
1300 ; CHECK-P8-LE-NEXT: or r3, r3, r4
1301 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
1302 ; CHECK-P8-LE-NEXT: extsb r3, r3
1303 ; CHECK-P8-LE-NEXT: blr
1305 ; CHECK-P8-BE-LABEL: ld_not_disjoint64_int8_t_uint32_t:
1306 ; CHECK-P8-BE: # %bb.0: # %entry
1307 ; CHECK-P8-BE-NEXT: li r4, 29
1308 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
1309 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
1310 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
1311 ; CHECK-P8-BE-NEXT: or r3, r3, r4
1312 ; CHECK-P8-BE-NEXT: lbz r3, 3(r3)
1313 ; CHECK-P8-BE-NEXT: extsb r3, r3
1314 ; CHECK-P8-BE-NEXT: blr
1316 %or = or i64 %ptr, 1000000000001
1317 %0 = inttoptr i64 %or to i32*
1318 %1 = load i32, i32* %0, align 4
1319 %conv = trunc i32 %1 to i8
1323 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1324 define dso_local signext i8 @ld_disjoint_align64_int8_t_uint32_t(i64 %ptr) {
1325 ; CHECK-P10-LE-LABEL: ld_disjoint_align64_int8_t_uint32_t:
1326 ; CHECK-P10-LE: # %bb.0: # %entry
1327 ; CHECK-P10-LE-NEXT: pli r4, 244140625
1328 ; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
1329 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
1330 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
1331 ; CHECK-P10-LE-NEXT: extsb r3, r3
1332 ; CHECK-P10-LE-NEXT: blr
1334 ; CHECK-P10-BE-LABEL: ld_disjoint_align64_int8_t_uint32_t:
1335 ; CHECK-P10-BE: # %bb.0: # %entry
1336 ; CHECK-P10-BE-NEXT: pli r4, 232
1337 ; CHECK-P10-BE-NEXT: pli r5, 3567587331
1338 ; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
1339 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
1340 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
1341 ; CHECK-P10-BE-NEXT: extsb r3, r3
1342 ; CHECK-P10-BE-NEXT: blr
1344 ; CHECK-P9-LE-LABEL: ld_disjoint_align64_int8_t_uint32_t:
1345 ; CHECK-P9-LE: # %bb.0: # %entry
1346 ; CHECK-P9-LE-NEXT: lis r4, 3725
1347 ; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
1348 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
1349 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
1350 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
1351 ; CHECK-P9-LE-NEXT: extsb r3, r3
1352 ; CHECK-P9-LE-NEXT: blr
1354 ; CHECK-P9-BE-LABEL: ld_disjoint_align64_int8_t_uint32_t:
1355 ; CHECK-P9-BE: # %bb.0: # %entry
1356 ; CHECK-P9-BE-NEXT: li r4, 29
1357 ; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
1358 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
1359 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
1360 ; CHECK-P9-BE-NEXT: ori r4, r4, 4099
1361 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
1362 ; CHECK-P9-BE-NEXT: extsb r3, r3
1363 ; CHECK-P9-BE-NEXT: blr
1365 ; CHECK-P8-LE-LABEL: ld_disjoint_align64_int8_t_uint32_t:
1366 ; CHECK-P8-LE: # %bb.0: # %entry
1367 ; CHECK-P8-LE-NEXT: lis r4, 3725
1368 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
1369 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
1370 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
1371 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
1372 ; CHECK-P8-LE-NEXT: extsb r3, r3
1373 ; CHECK-P8-LE-NEXT: blr
1375 ; CHECK-P8-BE-LABEL: ld_disjoint_align64_int8_t_uint32_t:
1376 ; CHECK-P8-BE: # %bb.0: # %entry
1377 ; CHECK-P8-BE-NEXT: li r4, 29
1378 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
1379 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
1380 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
1381 ; CHECK-P8-BE-NEXT: ori r4, r4, 4099
1382 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
1383 ; CHECK-P8-BE-NEXT: extsb r3, r3
1384 ; CHECK-P8-BE-NEXT: blr
1386 %and = and i64 %ptr, -1099511627776
1387 %or = or i64 %and, 1000000000000
1388 %0 = inttoptr i64 %or to i32*
1389 %1 = load i32, i32* %0, align 4096
1390 %conv = trunc i32 %1 to i8
1394 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1395 define dso_local signext i8 @ld_cst_align16_int8_t_uint32_t() {
1396 ; CHECK-LE-LABEL: ld_cst_align16_int8_t_uint32_t:
1397 ; CHECK-LE: # %bb.0: # %entry
1398 ; CHECK-LE-NEXT: lbz r3, 4080(0)
1399 ; CHECK-LE-NEXT: extsb r3, r3
1400 ; CHECK-LE-NEXT: blr
1402 ; CHECK-BE-LABEL: ld_cst_align16_int8_t_uint32_t:
1403 ; CHECK-BE: # %bb.0: # %entry
1404 ; CHECK-BE-NEXT: lbz r3, 4083(0)
1405 ; CHECK-BE-NEXT: extsb r3, r3
1406 ; CHECK-BE-NEXT: blr
1408 %0 = load i32, i32* inttoptr (i64 4080 to i32*), align 16
1409 %conv = trunc i32 %0 to i8
1413 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1414 define dso_local signext i8 @ld_cst_align32_int8_t_uint32_t() {
1415 ; CHECK-LE-LABEL: ld_cst_align32_int8_t_uint32_t:
1416 ; CHECK-LE: # %bb.0: # %entry
1417 ; CHECK-LE-NEXT: lis r3, 153
1418 ; CHECK-LE-NEXT: lbz r3, -27108(r3)
1419 ; CHECK-LE-NEXT: extsb r3, r3
1420 ; CHECK-LE-NEXT: blr
1422 ; CHECK-BE-LABEL: ld_cst_align32_int8_t_uint32_t:
1423 ; CHECK-BE: # %bb.0: # %entry
1424 ; CHECK-BE-NEXT: lis r3, 153
1425 ; CHECK-BE-NEXT: lbz r3, -27105(r3)
1426 ; CHECK-BE-NEXT: extsb r3, r3
1427 ; CHECK-BE-NEXT: blr
1429 %0 = load i32, i32* inttoptr (i64 9999900 to i32*), align 4
1430 %conv = trunc i32 %0 to i8
1434 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1435 define dso_local signext i8 @ld_cst_align64_int8_t_uint32_t() {
1436 ; CHECK-P10-LE-LABEL: ld_cst_align64_int8_t_uint32_t:
1437 ; CHECK-P10-LE: # %bb.0: # %entry
1438 ; CHECK-P10-LE-NEXT: pli r3, 244140625
1439 ; CHECK-P10-LE-NEXT: rldic r3, r3, 12, 24
1440 ; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
1441 ; CHECK-P10-LE-NEXT: extsb r3, r3
1442 ; CHECK-P10-LE-NEXT: blr
1444 ; CHECK-P10-BE-LABEL: ld_cst_align64_int8_t_uint32_t:
1445 ; CHECK-P10-BE: # %bb.0: # %entry
1446 ; CHECK-P10-BE-NEXT: pli r3, 232
1447 ; CHECK-P10-BE-NEXT: pli r4, 3567587331
1448 ; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
1449 ; CHECK-P10-BE-NEXT: lbz r3, 0(r4)
1450 ; CHECK-P10-BE-NEXT: extsb r3, r3
1451 ; CHECK-P10-BE-NEXT: blr
1453 ; CHECK-P9-LE-LABEL: ld_cst_align64_int8_t_uint32_t:
1454 ; CHECK-P9-LE: # %bb.0: # %entry
1455 ; CHECK-P9-LE-NEXT: lis r3, 3725
1456 ; CHECK-P9-LE-NEXT: ori r3, r3, 19025
1457 ; CHECK-P9-LE-NEXT: rldic r3, r3, 12, 24
1458 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
1459 ; CHECK-P9-LE-NEXT: extsb r3, r3
1460 ; CHECK-P9-LE-NEXT: blr
1462 ; CHECK-P9-BE-LABEL: ld_cst_align64_int8_t_uint32_t:
1463 ; CHECK-P9-BE: # %bb.0: # %entry
1464 ; CHECK-P9-BE-NEXT: li r3, 29
1465 ; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
1466 ; CHECK-P9-BE-NEXT: oris r3, r3, 54437
1467 ; CHECK-P9-BE-NEXT: ori r3, r3, 4099
1468 ; CHECK-P9-BE-NEXT: lbz r3, 0(r3)
1469 ; CHECK-P9-BE-NEXT: extsb r3, r3
1470 ; CHECK-P9-BE-NEXT: blr
1472 ; CHECK-P8-LE-LABEL: ld_cst_align64_int8_t_uint32_t:
1473 ; CHECK-P8-LE: # %bb.0: # %entry
1474 ; CHECK-P8-LE-NEXT: lis r3, 3725
1475 ; CHECK-P8-LE-NEXT: ori r3, r3, 19025
1476 ; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
1477 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
1478 ; CHECK-P8-LE-NEXT: extsb r3, r3
1479 ; CHECK-P8-LE-NEXT: blr
1481 ; CHECK-P8-BE-LABEL: ld_cst_align64_int8_t_uint32_t:
1482 ; CHECK-P8-BE: # %bb.0: # %entry
1483 ; CHECK-P8-BE-NEXT: li r3, 29
1484 ; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
1485 ; CHECK-P8-BE-NEXT: oris r3, r3, 54437
1486 ; CHECK-P8-BE-NEXT: ori r3, r3, 4099
1487 ; CHECK-P8-BE-NEXT: lbz r3, 0(r3)
1488 ; CHECK-P8-BE-NEXT: extsb r3, r3
1489 ; CHECK-P8-BE-NEXT: blr
1491 %0 = load i32, i32* inttoptr (i64 1000000000000 to i32*), align 4096
1492 %conv = trunc i32 %0 to i8
1496 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1497 define dso_local signext i8 @ld_0_int8_t_uint64_t(i64 %ptr) {
1498 ; CHECK-LE-LABEL: ld_0_int8_t_uint64_t:
1499 ; CHECK-LE: # %bb.0: # %entry
1500 ; CHECK-LE-NEXT: lbz r3, 0(r3)
1501 ; CHECK-LE-NEXT: extsb r3, r3
1502 ; CHECK-LE-NEXT: blr
1504 ; CHECK-BE-LABEL: ld_0_int8_t_uint64_t:
1505 ; CHECK-BE: # %bb.0: # %entry
1506 ; CHECK-BE-NEXT: lbz r3, 7(r3)
1507 ; CHECK-BE-NEXT: extsb r3, r3
1508 ; CHECK-BE-NEXT: blr
1510 %0 = inttoptr i64 %ptr to i64*
1511 %1 = load i64, i64* %0, align 8
1512 %conv = trunc i64 %1 to i8
1516 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1517 define dso_local signext i8 @ld_align16_int8_t_uint64_t(i8* nocapture readonly %ptr) {
1518 ; CHECK-LE-LABEL: ld_align16_int8_t_uint64_t:
1519 ; CHECK-LE: # %bb.0: # %entry
1520 ; CHECK-LE-NEXT: lbz r3, 8(r3)
1521 ; CHECK-LE-NEXT: extsb r3, r3
1522 ; CHECK-LE-NEXT: blr
1524 ; CHECK-BE-LABEL: ld_align16_int8_t_uint64_t:
1525 ; CHECK-BE: # %bb.0: # %entry
1526 ; CHECK-BE-NEXT: lbz r3, 15(r3)
1527 ; CHECK-BE-NEXT: extsb r3, r3
1528 ; CHECK-BE-NEXT: blr
1530 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
1531 %0 = bitcast i8* %add.ptr to i64*
1532 %1 = load i64, i64* %0, align 8
1533 %conv = trunc i64 %1 to i8
1537 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1538 define dso_local signext i8 @ld_align32_int8_t_uint64_t(i8* nocapture readonly %ptr) {
1539 ; CHECK-P10-LE-LABEL: ld_align32_int8_t_uint64_t:
1540 ; CHECK-P10-LE: # %bb.0: # %entry
1541 ; CHECK-P10-LE-NEXT: pli r4, 99999000
1542 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
1543 ; CHECK-P10-LE-NEXT: extsb r3, r3
1544 ; CHECK-P10-LE-NEXT: blr
1546 ; CHECK-P10-BE-LABEL: ld_align32_int8_t_uint64_t:
1547 ; CHECK-P10-BE: # %bb.0: # %entry
1548 ; CHECK-P10-BE-NEXT: pli r4, 99999007
1549 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r4
1550 ; CHECK-P10-BE-NEXT: extsb r3, r3
1551 ; CHECK-P10-BE-NEXT: blr
1553 ; CHECK-P9-LE-LABEL: ld_align32_int8_t_uint64_t:
1554 ; CHECK-P9-LE: # %bb.0: # %entry
1555 ; CHECK-P9-LE-NEXT: lis r4, 1525
1556 ; CHECK-P9-LE-NEXT: ori r4, r4, 56600
1557 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
1558 ; CHECK-P9-LE-NEXT: extsb r3, r3
1559 ; CHECK-P9-LE-NEXT: blr
1561 ; CHECK-P9-BE-LABEL: ld_align32_int8_t_uint64_t:
1562 ; CHECK-P9-BE: # %bb.0: # %entry
1563 ; CHECK-P9-BE-NEXT: lis r4, 1525
1564 ; CHECK-P9-BE-NEXT: ori r4, r4, 56607
1565 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
1566 ; CHECK-P9-BE-NEXT: extsb r3, r3
1567 ; CHECK-P9-BE-NEXT: blr
1569 ; CHECK-P8-LE-LABEL: ld_align32_int8_t_uint64_t:
1570 ; CHECK-P8-LE: # %bb.0: # %entry
1571 ; CHECK-P8-LE-NEXT: lis r4, 1525
1572 ; CHECK-P8-LE-NEXT: ori r4, r4, 56600
1573 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
1574 ; CHECK-P8-LE-NEXT: extsb r3, r3
1575 ; CHECK-P8-LE-NEXT: blr
1577 ; CHECK-P8-BE-LABEL: ld_align32_int8_t_uint64_t:
1578 ; CHECK-P8-BE: # %bb.0: # %entry
1579 ; CHECK-P8-BE-NEXT: lis r4, 1525
1580 ; CHECK-P8-BE-NEXT: ori r4, r4, 56607
1581 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
1582 ; CHECK-P8-BE-NEXT: extsb r3, r3
1583 ; CHECK-P8-BE-NEXT: blr
1585 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
1586 %0 = bitcast i8* %add.ptr to i64*
1587 %1 = load i64, i64* %0, align 8
1588 %conv = trunc i64 %1 to i8
1592 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1593 define dso_local signext i8 @ld_align64_int8_t_uint64_t(i8* nocapture readonly %ptr) {
1594 ; CHECK-P10-LE-LABEL: ld_align64_int8_t_uint64_t:
1595 ; CHECK-P10-LE: # %bb.0: # %entry
1596 ; CHECK-P10-LE-NEXT: pli r4, 244140625
1597 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
1598 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
1599 ; CHECK-P10-LE-NEXT: extsb r3, r3
1600 ; CHECK-P10-LE-NEXT: blr
1602 ; CHECK-P10-BE-LABEL: ld_align64_int8_t_uint64_t:
1603 ; CHECK-P10-BE: # %bb.0: # %entry
1604 ; CHECK-P10-BE-NEXT: pli r4, 232
1605 ; CHECK-P10-BE-NEXT: pli r5, 3567587335
1606 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
1607 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
1608 ; CHECK-P10-BE-NEXT: extsb r3, r3
1609 ; CHECK-P10-BE-NEXT: blr
1611 ; CHECK-P9-LE-LABEL: ld_align64_int8_t_uint64_t:
1612 ; CHECK-P9-LE: # %bb.0: # %entry
1613 ; CHECK-P9-LE-NEXT: lis r4, 3725
1614 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
1615 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
1616 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
1617 ; CHECK-P9-LE-NEXT: extsb r3, r3
1618 ; CHECK-P9-LE-NEXT: blr
1620 ; CHECK-P9-BE-LABEL: ld_align64_int8_t_uint64_t:
1621 ; CHECK-P9-BE: # %bb.0: # %entry
1622 ; CHECK-P9-BE-NEXT: li r4, 29
1623 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
1624 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
1625 ; CHECK-P9-BE-NEXT: ori r4, r4, 4103
1626 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
1627 ; CHECK-P9-BE-NEXT: extsb r3, r3
1628 ; CHECK-P9-BE-NEXT: blr
1630 ; CHECK-P8-LE-LABEL: ld_align64_int8_t_uint64_t:
1631 ; CHECK-P8-LE: # %bb.0: # %entry
1632 ; CHECK-P8-LE-NEXT: lis r4, 3725
1633 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
1634 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
1635 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
1636 ; CHECK-P8-LE-NEXT: extsb r3, r3
1637 ; CHECK-P8-LE-NEXT: blr
1639 ; CHECK-P8-BE-LABEL: ld_align64_int8_t_uint64_t:
1640 ; CHECK-P8-BE: # %bb.0: # %entry
1641 ; CHECK-P8-BE-NEXT: li r4, 29
1642 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
1643 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
1644 ; CHECK-P8-BE-NEXT: ori r4, r4, 4103
1645 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
1646 ; CHECK-P8-BE-NEXT: extsb r3, r3
1647 ; CHECK-P8-BE-NEXT: blr
1649 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
1650 %0 = bitcast i8* %add.ptr to i64*
1651 %1 = load i64, i64* %0, align 8
1652 %conv = trunc i64 %1 to i8
1656 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1657 define dso_local signext i8 @ld_reg_int8_t_uint64_t(i8* nocapture readonly %ptr, i64 %off) {
1658 ; CHECK-LE-LABEL: ld_reg_int8_t_uint64_t:
1659 ; CHECK-LE: # %bb.0: # %entry
1660 ; CHECK-LE-NEXT: lbzx r3, r3, r4
1661 ; CHECK-LE-NEXT: extsb r3, r3
1662 ; CHECK-LE-NEXT: blr
1664 ; CHECK-BE-LABEL: ld_reg_int8_t_uint64_t:
1665 ; CHECK-BE: # %bb.0: # %entry
1666 ; CHECK-BE-NEXT: add r3, r3, r4
1667 ; CHECK-BE-NEXT: lbz r3, 7(r3)
1668 ; CHECK-BE-NEXT: extsb r3, r3
1669 ; CHECK-BE-NEXT: blr
1671 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
1672 %0 = bitcast i8* %add.ptr to i64*
1673 %1 = load i64, i64* %0, align 8
1674 %conv = trunc i64 %1 to i8
1678 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1679 define dso_local signext i8 @ld_or_int8_t_uint64_t(i64 %ptr, i8 zeroext %off) {
1680 ; CHECK-LE-LABEL: ld_or_int8_t_uint64_t:
1681 ; CHECK-LE: # %bb.0: # %entry
1682 ; CHECK-LE-NEXT: or r3, r4, r3
1683 ; CHECK-LE-NEXT: lbz r3, 0(r3)
1684 ; CHECK-LE-NEXT: extsb r3, r3
1685 ; CHECK-LE-NEXT: blr
1687 ; CHECK-BE-LABEL: ld_or_int8_t_uint64_t:
1688 ; CHECK-BE: # %bb.0: # %entry
1689 ; CHECK-BE-NEXT: or r3, r4, r3
1690 ; CHECK-BE-NEXT: lbz r3, 7(r3)
1691 ; CHECK-BE-NEXT: extsb r3, r3
1692 ; CHECK-BE-NEXT: blr
1694 %conv = zext i8 %off to i64
1695 %or = or i64 %conv, %ptr
1696 %0 = inttoptr i64 %or to i64*
1697 %1 = load i64, i64* %0, align 8
1698 %conv1 = trunc i64 %1 to i8
1702 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1703 define dso_local signext i8 @ld_not_disjoint16_int8_t_uint64_t(i64 %ptr) {
1704 ; CHECK-LE-LABEL: ld_not_disjoint16_int8_t_uint64_t:
1705 ; CHECK-LE: # %bb.0: # %entry
1706 ; CHECK-LE-NEXT: ori r3, r3, 6
1707 ; CHECK-LE-NEXT: lbz r3, 0(r3)
1708 ; CHECK-LE-NEXT: extsb r3, r3
1709 ; CHECK-LE-NEXT: blr
1711 ; CHECK-BE-LABEL: ld_not_disjoint16_int8_t_uint64_t:
1712 ; CHECK-BE: # %bb.0: # %entry
1713 ; CHECK-BE-NEXT: ori r3, r3, 6
1714 ; CHECK-BE-NEXT: lbz r3, 7(r3)
1715 ; CHECK-BE-NEXT: extsb r3, r3
1716 ; CHECK-BE-NEXT: blr
1718 %or = or i64 %ptr, 6
1719 %0 = inttoptr i64 %or to i64*
1720 %1 = load i64, i64* %0, align 8
1721 %conv = trunc i64 %1 to i8
1725 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1726 define dso_local signext i8 @ld_disjoint_align16_int8_t_uint64_t(i64 %ptr) {
1727 ; CHECK-LE-LABEL: ld_disjoint_align16_int8_t_uint64_t:
1728 ; CHECK-LE: # %bb.0: # %entry
1729 ; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
1730 ; CHECK-LE-NEXT: lbz r3, 24(r3)
1731 ; CHECK-LE-NEXT: extsb r3, r3
1732 ; CHECK-LE-NEXT: blr
1734 ; CHECK-BE-LABEL: ld_disjoint_align16_int8_t_uint64_t:
1735 ; CHECK-BE: # %bb.0: # %entry
1736 ; CHECK-BE-NEXT: rldicr r3, r3, 0, 51
1737 ; CHECK-BE-NEXT: lbz r3, 31(r3)
1738 ; CHECK-BE-NEXT: extsb r3, r3
1739 ; CHECK-BE-NEXT: blr
1741 %and = and i64 %ptr, -4096
1742 %or = or i64 %and, 24
1743 %0 = inttoptr i64 %or to i64*
1744 %1 = load i64, i64* %0, align 8
1745 %conv = trunc i64 %1 to i8
1749 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1750 define dso_local signext i8 @ld_not_disjoint32_int8_t_uint64_t(i64 %ptr) {
1751 ; CHECK-LE-LABEL: ld_not_disjoint32_int8_t_uint64_t:
1752 ; CHECK-LE: # %bb.0: # %entry
1753 ; CHECK-LE-NEXT: ori r3, r3, 34463
1754 ; CHECK-LE-NEXT: oris r3, r3, 1
1755 ; CHECK-LE-NEXT: lbz r3, 0(r3)
1756 ; CHECK-LE-NEXT: extsb r3, r3
1757 ; CHECK-LE-NEXT: blr
1759 ; CHECK-BE-LABEL: ld_not_disjoint32_int8_t_uint64_t:
1760 ; CHECK-BE: # %bb.0: # %entry
1761 ; CHECK-BE-NEXT: ori r3, r3, 34463
1762 ; CHECK-BE-NEXT: oris r3, r3, 1
1763 ; CHECK-BE-NEXT: lbz r3, 7(r3)
1764 ; CHECK-BE-NEXT: extsb r3, r3
1765 ; CHECK-BE-NEXT: blr
1767 %or = or i64 %ptr, 99999
1768 %0 = inttoptr i64 %or to i64*
1769 %1 = load i64, i64* %0, align 8
1770 %conv = trunc i64 %1 to i8
1774 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1775 define dso_local signext i8 @ld_disjoint_align32_int8_t_uint64_t(i64 %ptr) {
1776 ; CHECK-P10-LE-LABEL: ld_disjoint_align32_int8_t_uint64_t:
1777 ; CHECK-P10-LE: # %bb.0: # %entry
1778 ; CHECK-P10-LE-NEXT: lis r4, -15264
1779 ; CHECK-P10-LE-NEXT: and r3, r3, r4
1780 ; CHECK-P10-LE-NEXT: pli r4, 999990000
1781 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
1782 ; CHECK-P10-LE-NEXT: extsb r3, r3
1783 ; CHECK-P10-LE-NEXT: blr
1785 ; CHECK-P10-BE-LABEL: ld_disjoint_align32_int8_t_uint64_t:
1786 ; CHECK-P10-BE: # %bb.0: # %entry
1787 ; CHECK-P10-BE-NEXT: lis r4, -15264
1788 ; CHECK-P10-BE-NEXT: and r3, r3, r4
1789 ; CHECK-P10-BE-NEXT: pli r4, 999990007
1790 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r4
1791 ; CHECK-P10-BE-NEXT: extsb r3, r3
1792 ; CHECK-P10-BE-NEXT: blr
1794 ; CHECK-P9-LE-LABEL: ld_disjoint_align32_int8_t_uint64_t:
1795 ; CHECK-P9-LE: # %bb.0: # %entry
1796 ; CHECK-P9-LE-NEXT: lis r4, -15264
1797 ; CHECK-P9-LE-NEXT: and r3, r3, r4
1798 ; CHECK-P9-LE-NEXT: lis r4, 15258
1799 ; CHECK-P9-LE-NEXT: ori r4, r4, 41712
1800 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
1801 ; CHECK-P9-LE-NEXT: extsb r3, r3
1802 ; CHECK-P9-LE-NEXT: blr
1804 ; CHECK-P9-BE-LABEL: ld_disjoint_align32_int8_t_uint64_t:
1805 ; CHECK-P9-BE: # %bb.0: # %entry
1806 ; CHECK-P9-BE-NEXT: lis r4, -15264
1807 ; CHECK-P9-BE-NEXT: and r3, r3, r4
1808 ; CHECK-P9-BE-NEXT: lis r4, 15258
1809 ; CHECK-P9-BE-NEXT: ori r4, r4, 41719
1810 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
1811 ; CHECK-P9-BE-NEXT: extsb r3, r3
1812 ; CHECK-P9-BE-NEXT: blr
1814 ; CHECK-P8-LE-LABEL: ld_disjoint_align32_int8_t_uint64_t:
1815 ; CHECK-P8-LE: # %bb.0: # %entry
1816 ; CHECK-P8-LE-NEXT: lis r4, -15264
1817 ; CHECK-P8-LE-NEXT: lis r5, 15258
1818 ; CHECK-P8-LE-NEXT: and r3, r3, r4
1819 ; CHECK-P8-LE-NEXT: ori r4, r5, 41712
1820 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
1821 ; CHECK-P8-LE-NEXT: extsb r3, r3
1822 ; CHECK-P8-LE-NEXT: blr
1824 ; CHECK-P8-BE-LABEL: ld_disjoint_align32_int8_t_uint64_t:
1825 ; CHECK-P8-BE: # %bb.0: # %entry
1826 ; CHECK-P8-BE-NEXT: lis r4, -15264
1827 ; CHECK-P8-BE-NEXT: lis r5, 15258
1828 ; CHECK-P8-BE-NEXT: and r3, r3, r4
1829 ; CHECK-P8-BE-NEXT: ori r4, r5, 41719
1830 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
1831 ; CHECK-P8-BE-NEXT: extsb r3, r3
1832 ; CHECK-P8-BE-NEXT: blr
1834 %and = and i64 %ptr, -1000341504
1835 %or = or i64 %and, 999990000
1836 %0 = inttoptr i64 %or to i64*
1837 %1 = load i64, i64* %0, align 16
1838 %conv = trunc i64 %1 to i8
1842 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1843 define dso_local signext i8 @ld_not_disjoint64_int8_t_uint64_t(i64 %ptr) {
1844 ; CHECK-P10-LE-LABEL: ld_not_disjoint64_int8_t_uint64_t:
1845 ; CHECK-P10-LE: # %bb.0: # %entry
1846 ; CHECK-P10-LE-NEXT: pli r4, 232
1847 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
1848 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
1849 ; CHECK-P10-LE-NEXT: or r3, r3, r5
1850 ; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
1851 ; CHECK-P10-LE-NEXT: extsb r3, r3
1852 ; CHECK-P10-LE-NEXT: blr
1854 ; CHECK-P10-BE-LABEL: ld_not_disjoint64_int8_t_uint64_t:
1855 ; CHECK-P10-BE: # %bb.0: # %entry
1856 ; CHECK-P10-BE-NEXT: pli r4, 232
1857 ; CHECK-P10-BE-NEXT: pli r5, 3567587329
1858 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
1859 ; CHECK-P10-BE-NEXT: or r3, r3, r5
1860 ; CHECK-P10-BE-NEXT: lbz r3, 7(r3)
1861 ; CHECK-P10-BE-NEXT: extsb r3, r3
1862 ; CHECK-P10-BE-NEXT: blr
1864 ; CHECK-P9-LE-LABEL: ld_not_disjoint64_int8_t_uint64_t:
1865 ; CHECK-P9-LE: # %bb.0: # %entry
1866 ; CHECK-P9-LE-NEXT: li r4, 29
1867 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
1868 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
1869 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
1870 ; CHECK-P9-LE-NEXT: or r3, r3, r4
1871 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
1872 ; CHECK-P9-LE-NEXT: extsb r3, r3
1873 ; CHECK-P9-LE-NEXT: blr
1875 ; CHECK-P9-BE-LABEL: ld_not_disjoint64_int8_t_uint64_t:
1876 ; CHECK-P9-BE: # %bb.0: # %entry
1877 ; CHECK-P9-BE-NEXT: li r4, 29
1878 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
1879 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
1880 ; CHECK-P9-BE-NEXT: ori r4, r4, 4097
1881 ; CHECK-P9-BE-NEXT: or r3, r3, r4
1882 ; CHECK-P9-BE-NEXT: lbz r3, 7(r3)
1883 ; CHECK-P9-BE-NEXT: extsb r3, r3
1884 ; CHECK-P9-BE-NEXT: blr
1886 ; CHECK-P8-LE-LABEL: ld_not_disjoint64_int8_t_uint64_t:
1887 ; CHECK-P8-LE: # %bb.0: # %entry
1888 ; CHECK-P8-LE-NEXT: li r4, 29
1889 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
1890 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
1891 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
1892 ; CHECK-P8-LE-NEXT: or r3, r3, r4
1893 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
1894 ; CHECK-P8-LE-NEXT: extsb r3, r3
1895 ; CHECK-P8-LE-NEXT: blr
1897 ; CHECK-P8-BE-LABEL: ld_not_disjoint64_int8_t_uint64_t:
1898 ; CHECK-P8-BE: # %bb.0: # %entry
1899 ; CHECK-P8-BE-NEXT: li r4, 29
1900 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
1901 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
1902 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
1903 ; CHECK-P8-BE-NEXT: or r3, r3, r4
1904 ; CHECK-P8-BE-NEXT: lbz r3, 7(r3)
1905 ; CHECK-P8-BE-NEXT: extsb r3, r3
1906 ; CHECK-P8-BE-NEXT: blr
1908 %or = or i64 %ptr, 1000000000001
1909 %0 = inttoptr i64 %or to i64*
1910 %1 = load i64, i64* %0, align 8
1911 %conv = trunc i64 %1 to i8
1915 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1916 define dso_local signext i8 @ld_disjoint_align64_int8_t_uint64_t(i64 %ptr) {
1917 ; CHECK-P10-LE-LABEL: ld_disjoint_align64_int8_t_uint64_t:
1918 ; CHECK-P10-LE: # %bb.0: # %entry
1919 ; CHECK-P10-LE-NEXT: pli r4, 244140625
1920 ; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
1921 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
1922 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
1923 ; CHECK-P10-LE-NEXT: extsb r3, r3
1924 ; CHECK-P10-LE-NEXT: blr
1926 ; CHECK-P10-BE-LABEL: ld_disjoint_align64_int8_t_uint64_t:
1927 ; CHECK-P10-BE: # %bb.0: # %entry
1928 ; CHECK-P10-BE-NEXT: pli r4, 232
1929 ; CHECK-P10-BE-NEXT: pli r5, 3567587335
1930 ; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
1931 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
1932 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
1933 ; CHECK-P10-BE-NEXT: extsb r3, r3
1934 ; CHECK-P10-BE-NEXT: blr
1936 ; CHECK-P9-LE-LABEL: ld_disjoint_align64_int8_t_uint64_t:
1937 ; CHECK-P9-LE: # %bb.0: # %entry
1938 ; CHECK-P9-LE-NEXT: lis r4, 3725
1939 ; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
1940 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
1941 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
1942 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
1943 ; CHECK-P9-LE-NEXT: extsb r3, r3
1944 ; CHECK-P9-LE-NEXT: blr
1946 ; CHECK-P9-BE-LABEL: ld_disjoint_align64_int8_t_uint64_t:
1947 ; CHECK-P9-BE: # %bb.0: # %entry
1948 ; CHECK-P9-BE-NEXT: li r4, 29
1949 ; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
1950 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
1951 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
1952 ; CHECK-P9-BE-NEXT: ori r4, r4, 4103
1953 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
1954 ; CHECK-P9-BE-NEXT: extsb r3, r3
1955 ; CHECK-P9-BE-NEXT: blr
1957 ; CHECK-P8-LE-LABEL: ld_disjoint_align64_int8_t_uint64_t:
1958 ; CHECK-P8-LE: # %bb.0: # %entry
1959 ; CHECK-P8-LE-NEXT: lis r4, 3725
1960 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
1961 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
1962 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
1963 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
1964 ; CHECK-P8-LE-NEXT: extsb r3, r3
1965 ; CHECK-P8-LE-NEXT: blr
1967 ; CHECK-P8-BE-LABEL: ld_disjoint_align64_int8_t_uint64_t:
1968 ; CHECK-P8-BE: # %bb.0: # %entry
1969 ; CHECK-P8-BE-NEXT: li r4, 29
1970 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
1971 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
1972 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
1973 ; CHECK-P8-BE-NEXT: ori r4, r4, 4103
1974 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
1975 ; CHECK-P8-BE-NEXT: extsb r3, r3
1976 ; CHECK-P8-BE-NEXT: blr
1978 %and = and i64 %ptr, -1099511627776
1979 %or = or i64 %and, 1000000000000
1980 %0 = inttoptr i64 %or to i64*
1981 %1 = load i64, i64* %0, align 4096
1982 %conv = trunc i64 %1 to i8
1986 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1987 define dso_local signext i8 @ld_cst_align16_int8_t_uint64_t() {
1988 ; CHECK-LE-LABEL: ld_cst_align16_int8_t_uint64_t:
1989 ; CHECK-LE: # %bb.0: # %entry
1990 ; CHECK-LE-NEXT: lbz r3, 4080(0)
1991 ; CHECK-LE-NEXT: extsb r3, r3
1992 ; CHECK-LE-NEXT: blr
1994 ; CHECK-BE-LABEL: ld_cst_align16_int8_t_uint64_t:
1995 ; CHECK-BE: # %bb.0: # %entry
1996 ; CHECK-BE-NEXT: lbz r3, 4087(0)
1997 ; CHECK-BE-NEXT: extsb r3, r3
1998 ; CHECK-BE-NEXT: blr
2000 %0 = load i64, i64* inttoptr (i64 4080 to i64*), align 16
2001 %conv = trunc i64 %0 to i8
2005 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2006 define dso_local signext i8 @ld_cst_align32_int8_t_uint64_t() {
2007 ; CHECK-LE-LABEL: ld_cst_align32_int8_t_uint64_t:
2008 ; CHECK-LE: # %bb.0: # %entry
2009 ; CHECK-LE-NEXT: lis r3, 153
2010 ; CHECK-LE-NEXT: lbz r3, -27108(r3)
2011 ; CHECK-LE-NEXT: extsb r3, r3
2012 ; CHECK-LE-NEXT: blr
2014 ; CHECK-BE-LABEL: ld_cst_align32_int8_t_uint64_t:
2015 ; CHECK-BE: # %bb.0: # %entry
2016 ; CHECK-BE-NEXT: lis r3, 153
2017 ; CHECK-BE-NEXT: lbz r3, -27101(r3)
2018 ; CHECK-BE-NEXT: extsb r3, r3
2019 ; CHECK-BE-NEXT: blr
2021 %0 = load i64, i64* inttoptr (i64 9999900 to i64*), align 8
2022 %conv = trunc i64 %0 to i8
2026 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2027 define dso_local signext i8 @ld_cst_align64_int8_t_uint64_t() {
2028 ; CHECK-P10-LE-LABEL: ld_cst_align64_int8_t_uint64_t:
2029 ; CHECK-P10-LE: # %bb.0: # %entry
2030 ; CHECK-P10-LE-NEXT: pli r3, 244140625
2031 ; CHECK-P10-LE-NEXT: rldic r3, r3, 12, 24
2032 ; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
2033 ; CHECK-P10-LE-NEXT: extsb r3, r3
2034 ; CHECK-P10-LE-NEXT: blr
2036 ; CHECK-P10-BE-LABEL: ld_cst_align64_int8_t_uint64_t:
2037 ; CHECK-P10-BE: # %bb.0: # %entry
2038 ; CHECK-P10-BE-NEXT: pli r3, 232
2039 ; CHECK-P10-BE-NEXT: pli r4, 3567587335
2040 ; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
2041 ; CHECK-P10-BE-NEXT: lbz r3, 0(r4)
2042 ; CHECK-P10-BE-NEXT: extsb r3, r3
2043 ; CHECK-P10-BE-NEXT: blr
2045 ; CHECK-P9-LE-LABEL: ld_cst_align64_int8_t_uint64_t:
2046 ; CHECK-P9-LE: # %bb.0: # %entry
2047 ; CHECK-P9-LE-NEXT: lis r3, 3725
2048 ; CHECK-P9-LE-NEXT: ori r3, r3, 19025
2049 ; CHECK-P9-LE-NEXT: rldic r3, r3, 12, 24
2050 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
2051 ; CHECK-P9-LE-NEXT: extsb r3, r3
2052 ; CHECK-P9-LE-NEXT: blr
2054 ; CHECK-P9-BE-LABEL: ld_cst_align64_int8_t_uint64_t:
2055 ; CHECK-P9-BE: # %bb.0: # %entry
2056 ; CHECK-P9-BE-NEXT: li r3, 29
2057 ; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
2058 ; CHECK-P9-BE-NEXT: oris r3, r3, 54437
2059 ; CHECK-P9-BE-NEXT: ori r3, r3, 4103
2060 ; CHECK-P9-BE-NEXT: lbz r3, 0(r3)
2061 ; CHECK-P9-BE-NEXT: extsb r3, r3
2062 ; CHECK-P9-BE-NEXT: blr
2064 ; CHECK-P8-LE-LABEL: ld_cst_align64_int8_t_uint64_t:
2065 ; CHECK-P8-LE: # %bb.0: # %entry
2066 ; CHECK-P8-LE-NEXT: lis r3, 3725
2067 ; CHECK-P8-LE-NEXT: ori r3, r3, 19025
2068 ; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
2069 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
2070 ; CHECK-P8-LE-NEXT: extsb r3, r3
2071 ; CHECK-P8-LE-NEXT: blr
2073 ; CHECK-P8-BE-LABEL: ld_cst_align64_int8_t_uint64_t:
2074 ; CHECK-P8-BE: # %bb.0: # %entry
2075 ; CHECK-P8-BE-NEXT: li r3, 29
2076 ; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
2077 ; CHECK-P8-BE-NEXT: oris r3, r3, 54437
2078 ; CHECK-P8-BE-NEXT: ori r3, r3, 4103
2079 ; CHECK-P8-BE-NEXT: lbz r3, 0(r3)
2080 ; CHECK-P8-BE-NEXT: extsb r3, r3
2081 ; CHECK-P8-BE-NEXT: blr
2083 %0 = load i64, i64* inttoptr (i64 1000000000000 to i64*), align 4096
2084 %conv = trunc i64 %0 to i8
2088 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2089 define dso_local signext i8 @ld_0_int8_t_float(i64 %ptr) {
2090 ; CHECK-LABEL: ld_0_int8_t_float:
2091 ; CHECK: # %bb.0: # %entry
2092 ; CHECK-NEXT: lfs f0, 0(r3)
2093 ; CHECK-NEXT: xscvdpsxws f0, f0
2094 ; CHECK-NEXT: mffprwz r3, f0
2095 ; CHECK-NEXT: extsw r3, r3
2098 %0 = inttoptr i64 %ptr to float*
2099 %1 = load float, float* %0, align 4
2100 %conv = fptosi float %1 to i8
2104 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2105 define dso_local signext i8 @ld_align16_int8_t_float(i8* nocapture readonly %ptr) {
2106 ; CHECK-LABEL: ld_align16_int8_t_float:
2107 ; CHECK: # %bb.0: # %entry
2108 ; CHECK-NEXT: lfs f0, 8(r3)
2109 ; CHECK-NEXT: xscvdpsxws f0, f0
2110 ; CHECK-NEXT: mffprwz r3, f0
2111 ; CHECK-NEXT: extsw r3, r3
2114 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
2115 %0 = bitcast i8* %add.ptr to float*
2116 %1 = load float, float* %0, align 4
2117 %conv = fptosi float %1 to i8
2121 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2122 define dso_local signext i8 @ld_align32_int8_t_float(i8* nocapture readonly %ptr) {
2123 ; CHECK-P10-LABEL: ld_align32_int8_t_float:
2124 ; CHECK-P10: # %bb.0: # %entry
2125 ; CHECK-P10-NEXT: pli r4, 99999000
2126 ; CHECK-P10-NEXT: lfsx f0, r3, r4
2127 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2128 ; CHECK-P10-NEXT: mffprwz r3, f0
2129 ; CHECK-P10-NEXT: extsw r3, r3
2130 ; CHECK-P10-NEXT: blr
2132 ; CHECK-PREP10-LABEL: ld_align32_int8_t_float:
2133 ; CHECK-PREP10: # %bb.0: # %entry
2134 ; CHECK-PREP10-NEXT: lis r4, 1525
2135 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
2136 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
2137 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2138 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2139 ; CHECK-PREP10-NEXT: extsw r3, r3
2140 ; CHECK-PREP10-NEXT: blr
2142 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
2143 %0 = bitcast i8* %add.ptr to float*
2144 %1 = load float, float* %0, align 4
2145 %conv = fptosi float %1 to i8
2149 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2150 define dso_local signext i8 @ld_align64_int8_t_float(i8* nocapture readonly %ptr) {
2151 ; CHECK-P10-LABEL: ld_align64_int8_t_float:
2152 ; CHECK-P10: # %bb.0: # %entry
2153 ; CHECK-P10-NEXT: pli r4, 244140625
2154 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2155 ; CHECK-P10-NEXT: lfsx f0, r3, r4
2156 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2157 ; CHECK-P10-NEXT: mffprwz r3, f0
2158 ; CHECK-P10-NEXT: extsw r3, r3
2159 ; CHECK-P10-NEXT: blr
2161 ; CHECK-PREP10-LABEL: ld_align64_int8_t_float:
2162 ; CHECK-PREP10: # %bb.0: # %entry
2163 ; CHECK-PREP10-NEXT: lis r4, 3725
2164 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2165 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2166 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
2167 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2168 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2169 ; CHECK-PREP10-NEXT: extsw r3, r3
2170 ; CHECK-PREP10-NEXT: blr
2172 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
2173 %0 = bitcast i8* %add.ptr to float*
2174 %1 = load float, float* %0, align 4
2175 %conv = fptosi float %1 to i8
2179 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2180 define dso_local signext i8 @ld_reg_int8_t_float(i8* nocapture readonly %ptr, i64 %off) {
2181 ; CHECK-LABEL: ld_reg_int8_t_float:
2182 ; CHECK: # %bb.0: # %entry
2183 ; CHECK-NEXT: lfsx f0, r3, r4
2184 ; CHECK-NEXT: xscvdpsxws f0, f0
2185 ; CHECK-NEXT: mffprwz r3, f0
2186 ; CHECK-NEXT: extsw r3, r3
2189 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
2190 %0 = bitcast i8* %add.ptr to float*
2191 %1 = load float, float* %0, align 4
2192 %conv = fptosi float %1 to i8
2196 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2197 define dso_local signext i8 @ld_or_int8_t_float(i64 %ptr, i8 zeroext %off) {
2198 ; CHECK-LABEL: ld_or_int8_t_float:
2199 ; CHECK: # %bb.0: # %entry
2200 ; CHECK-NEXT: or r3, r4, r3
2201 ; CHECK-NEXT: lfs f0, 0(r3)
2202 ; CHECK-NEXT: xscvdpsxws f0, f0
2203 ; CHECK-NEXT: mffprwz r3, f0
2204 ; CHECK-NEXT: extsw r3, r3
2207 %conv = zext i8 %off to i64
2208 %or = or i64 %conv, %ptr
2209 %0 = inttoptr i64 %or to float*
2210 %1 = load float, float* %0, align 4
2211 %conv1 = fptosi float %1 to i8
2215 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2216 define dso_local signext i8 @ld_not_disjoint16_int8_t_float(i64 %ptr) {
2217 ; CHECK-LABEL: ld_not_disjoint16_int8_t_float:
2218 ; CHECK: # %bb.0: # %entry
2219 ; CHECK-NEXT: ori r3, r3, 6
2220 ; CHECK-NEXT: lfs f0, 0(r3)
2221 ; CHECK-NEXT: xscvdpsxws f0, f0
2222 ; CHECK-NEXT: mffprwz r3, f0
2223 ; CHECK-NEXT: extsw r3, r3
2226 %or = or i64 %ptr, 6
2227 %0 = inttoptr i64 %or to float*
2228 %1 = load float, float* %0, align 4
2229 %conv = fptosi float %1 to i8
2233 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2234 define dso_local signext i8 @ld_disjoint_align16_int8_t_float(i64 %ptr) {
2235 ; CHECK-LABEL: ld_disjoint_align16_int8_t_float:
2236 ; CHECK: # %bb.0: # %entry
2237 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2238 ; CHECK-NEXT: lfs f0, 24(r3)
2239 ; CHECK-NEXT: xscvdpsxws f0, f0
2240 ; CHECK-NEXT: mffprwz r3, f0
2241 ; CHECK-NEXT: extsw r3, r3
2244 %and = and i64 %ptr, -4096
2245 %or = or i64 %and, 24
2246 %0 = inttoptr i64 %or to float*
2247 %1 = load float, float* %0, align 8
2248 %conv = fptosi float %1 to i8
2252 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2253 define dso_local signext i8 @ld_not_disjoint32_int8_t_float(i64 %ptr) {
2254 ; CHECK-LABEL: ld_not_disjoint32_int8_t_float:
2255 ; CHECK: # %bb.0: # %entry
2256 ; CHECK-NEXT: ori r3, r3, 34463
2257 ; CHECK-NEXT: oris r3, r3, 1
2258 ; CHECK-NEXT: lfs f0, 0(r3)
2259 ; CHECK-NEXT: xscvdpsxws f0, f0
2260 ; CHECK-NEXT: mffprwz r3, f0
2261 ; CHECK-NEXT: extsw r3, r3
2264 %or = or i64 %ptr, 99999
2265 %0 = inttoptr i64 %or to float*
2266 %1 = load float, float* %0, align 4
2267 %conv = fptosi float %1 to i8
2271 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2272 define dso_local signext i8 @ld_disjoint_align32_int8_t_float(i64 %ptr) {
2273 ; CHECK-P10-LABEL: ld_disjoint_align32_int8_t_float:
2274 ; CHECK-P10: # %bb.0: # %entry
2275 ; CHECK-P10-NEXT: lis r4, -15264
2276 ; CHECK-P10-NEXT: and r3, r3, r4
2277 ; CHECK-P10-NEXT: pli r4, 999990000
2278 ; CHECK-P10-NEXT: lfsx f0, r3, r4
2279 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2280 ; CHECK-P10-NEXT: mffprwz r3, f0
2281 ; CHECK-P10-NEXT: extsw r3, r3
2282 ; CHECK-P10-NEXT: blr
2284 ; CHECK-P9-LABEL: ld_disjoint_align32_int8_t_float:
2285 ; CHECK-P9: # %bb.0: # %entry
2286 ; CHECK-P9-NEXT: lis r4, -15264
2287 ; CHECK-P9-NEXT: and r3, r3, r4
2288 ; CHECK-P9-NEXT: lis r4, 15258
2289 ; CHECK-P9-NEXT: ori r4, r4, 41712
2290 ; CHECK-P9-NEXT: lfsx f0, r3, r4
2291 ; CHECK-P9-NEXT: xscvdpsxws f0, f0
2292 ; CHECK-P9-NEXT: mffprwz r3, f0
2293 ; CHECK-P9-NEXT: extsw r3, r3
2294 ; CHECK-P9-NEXT: blr
2296 ; CHECK-P8-LABEL: ld_disjoint_align32_int8_t_float:
2297 ; CHECK-P8: # %bb.0: # %entry
2298 ; CHECK-P8-NEXT: lis r4, -15264
2299 ; CHECK-P8-NEXT: lis r5, 15258
2300 ; CHECK-P8-NEXT: and r3, r3, r4
2301 ; CHECK-P8-NEXT: ori r4, r5, 41712
2302 ; CHECK-P8-NEXT: lfsx f0, r3, r4
2303 ; CHECK-P8-NEXT: xscvdpsxws f0, f0
2304 ; CHECK-P8-NEXT: mffprwz r3, f0
2305 ; CHECK-P8-NEXT: extsw r3, r3
2306 ; CHECK-P8-NEXT: blr
2308 %and = and i64 %ptr, -1000341504
2309 %or = or i64 %and, 999990000
2310 %0 = inttoptr i64 %or to float*
2311 %1 = load float, float* %0, align 16
2312 %conv = fptosi float %1 to i8
2316 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2317 define dso_local signext i8 @ld_not_disjoint64_int8_t_float(i64 %ptr) {
2318 ; CHECK-P10-LABEL: ld_not_disjoint64_int8_t_float:
2319 ; CHECK-P10: # %bb.0: # %entry
2320 ; CHECK-P10-NEXT: pli r4, 232
2321 ; CHECK-P10-NEXT: pli r5, 3567587329
2322 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2323 ; CHECK-P10-NEXT: or r3, r3, r5
2324 ; CHECK-P10-NEXT: lfs f0, 0(r3)
2325 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2326 ; CHECK-P10-NEXT: mffprwz r3, f0
2327 ; CHECK-P10-NEXT: extsw r3, r3
2328 ; CHECK-P10-NEXT: blr
2330 ; CHECK-PREP10-LABEL: ld_not_disjoint64_int8_t_float:
2331 ; CHECK-PREP10: # %bb.0: # %entry
2332 ; CHECK-PREP10-NEXT: li r4, 29
2333 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2334 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2335 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2336 ; CHECK-PREP10-NEXT: or r3, r3, r4
2337 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
2338 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2339 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2340 ; CHECK-PREP10-NEXT: extsw r3, r3
2341 ; CHECK-PREP10-NEXT: blr
2343 %or = or i64 %ptr, 1000000000001
2344 %0 = inttoptr i64 %or to float*
2345 %1 = load float, float* %0, align 4
2346 %conv = fptosi float %1 to i8
2350 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2351 define dso_local signext i8 @ld_disjoint_align64_int8_t_float(i64 %ptr) {
2352 ; CHECK-P10-LABEL: ld_disjoint_align64_int8_t_float:
2353 ; CHECK-P10: # %bb.0: # %entry
2354 ; CHECK-P10-NEXT: pli r4, 244140625
2355 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
2356 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2357 ; CHECK-P10-NEXT: lfsx f0, r3, r4
2358 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2359 ; CHECK-P10-NEXT: mffprwz r3, f0
2360 ; CHECK-P10-NEXT: extsw r3, r3
2361 ; CHECK-P10-NEXT: blr
2363 ; CHECK-PREP10-LABEL: ld_disjoint_align64_int8_t_float:
2364 ; CHECK-PREP10: # %bb.0: # %entry
2365 ; CHECK-PREP10-NEXT: lis r4, 3725
2366 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
2367 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2368 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2369 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
2370 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2371 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2372 ; CHECK-PREP10-NEXT: extsw r3, r3
2373 ; CHECK-PREP10-NEXT: blr
2375 %and = and i64 %ptr, -1099511627776
2376 %or = or i64 %and, 1000000000000
2377 %0 = inttoptr i64 %or to float*
2378 %1 = load float, float* %0, align 4096
2379 %conv = fptosi float %1 to i8
2383 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2384 define dso_local signext i8 @ld_cst_align16_int8_t_float() {
2385 ; CHECK-LABEL: ld_cst_align16_int8_t_float:
2386 ; CHECK: # %bb.0: # %entry
2387 ; CHECK-NEXT: lfs f0, 4080(0)
2388 ; CHECK-NEXT: xscvdpsxws f0, f0
2389 ; CHECK-NEXT: mffprwz r3, f0
2390 ; CHECK-NEXT: extsw r3, r3
2393 %0 = load float, float* inttoptr (i64 4080 to float*), align 16
2394 %conv = fptosi float %0 to i8
2398 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2399 define dso_local signext i8 @ld_cst_align32_int8_t_float() {
2400 ; CHECK-LABEL: ld_cst_align32_int8_t_float:
2401 ; CHECK: # %bb.0: # %entry
2402 ; CHECK-NEXT: lis r3, 153
2403 ; CHECK-NEXT: lfs f0, -27108(r3)
2404 ; CHECK-NEXT: xscvdpsxws f0, f0
2405 ; CHECK-NEXT: mffprwz r3, f0
2406 ; CHECK-NEXT: extsw r3, r3
2409 %0 = load float, float* inttoptr (i64 9999900 to float*), align 4
2410 %conv = fptosi float %0 to i8
2414 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2415 define dso_local signext i8 @ld_cst_align64_int8_t_float() {
2416 ; CHECK-P10-LABEL: ld_cst_align64_int8_t_float:
2417 ; CHECK-P10: # %bb.0: # %entry
2418 ; CHECK-P10-NEXT: pli r3, 244140625
2419 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
2420 ; CHECK-P10-NEXT: lfs f0, 0(r3)
2421 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2422 ; CHECK-P10-NEXT: mffprwz r3, f0
2423 ; CHECK-P10-NEXT: extsw r3, r3
2424 ; CHECK-P10-NEXT: blr
2426 ; CHECK-PREP10-LABEL: ld_cst_align64_int8_t_float:
2427 ; CHECK-PREP10: # %bb.0: # %entry
2428 ; CHECK-PREP10-NEXT: lis r3, 3725
2429 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
2430 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
2431 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
2432 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2433 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2434 ; CHECK-PREP10-NEXT: extsw r3, r3
2435 ; CHECK-PREP10-NEXT: blr
2437 %0 = load float, float* inttoptr (i64 1000000000000 to float*), align 4096
2438 %conv = fptosi float %0 to i8
2442 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2443 define dso_local signext i8 @ld_0_int8_t_double(i64 %ptr) {
2444 ; CHECK-LABEL: ld_0_int8_t_double:
2445 ; CHECK: # %bb.0: # %entry
2446 ; CHECK-NEXT: lfd f0, 0(r3)
2447 ; CHECK-NEXT: xscvdpsxws f0, f0
2448 ; CHECK-NEXT: mffprwz r3, f0
2449 ; CHECK-NEXT: extsw r3, r3
2452 %0 = inttoptr i64 %ptr to double*
2453 %1 = load double, double* %0, align 8
2454 %conv = fptosi double %1 to i8
2458 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2459 define dso_local signext i8 @ld_align16_int8_t_double(i8* nocapture readonly %ptr) {
2460 ; CHECK-LABEL: ld_align16_int8_t_double:
2461 ; CHECK: # %bb.0: # %entry
2462 ; CHECK-NEXT: lfd f0, 8(r3)
2463 ; CHECK-NEXT: xscvdpsxws f0, f0
2464 ; CHECK-NEXT: mffprwz r3, f0
2465 ; CHECK-NEXT: extsw r3, r3
2468 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
2469 %0 = bitcast i8* %add.ptr to double*
2470 %1 = load double, double* %0, align 8
2471 %conv = fptosi double %1 to i8
2475 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2476 define dso_local signext i8 @ld_align32_int8_t_double(i8* nocapture readonly %ptr) {
2477 ; CHECK-P10-LABEL: ld_align32_int8_t_double:
2478 ; CHECK-P10: # %bb.0: # %entry
2479 ; CHECK-P10-NEXT: pli r4, 99999000
2480 ; CHECK-P10-NEXT: lfdx f0, r3, r4
2481 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2482 ; CHECK-P10-NEXT: mffprwz r3, f0
2483 ; CHECK-P10-NEXT: extsw r3, r3
2484 ; CHECK-P10-NEXT: blr
2486 ; CHECK-PREP10-LABEL: ld_align32_int8_t_double:
2487 ; CHECK-PREP10: # %bb.0: # %entry
2488 ; CHECK-PREP10-NEXT: lis r4, 1525
2489 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
2490 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
2491 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2492 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2493 ; CHECK-PREP10-NEXT: extsw r3, r3
2494 ; CHECK-PREP10-NEXT: blr
2496 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
2497 %0 = bitcast i8* %add.ptr to double*
2498 %1 = load double, double* %0, align 8
2499 %conv = fptosi double %1 to i8
2503 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2504 define dso_local signext i8 @ld_align64_int8_t_double(i8* nocapture readonly %ptr) {
2505 ; CHECK-P10-LABEL: ld_align64_int8_t_double:
2506 ; CHECK-P10: # %bb.0: # %entry
2507 ; CHECK-P10-NEXT: pli r4, 244140625
2508 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2509 ; CHECK-P10-NEXT: lfdx f0, r3, r4
2510 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2511 ; CHECK-P10-NEXT: mffprwz r3, f0
2512 ; CHECK-P10-NEXT: extsw r3, r3
2513 ; CHECK-P10-NEXT: blr
2515 ; CHECK-PREP10-LABEL: ld_align64_int8_t_double:
2516 ; CHECK-PREP10: # %bb.0: # %entry
2517 ; CHECK-PREP10-NEXT: lis r4, 3725
2518 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2519 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2520 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
2521 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2522 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2523 ; CHECK-PREP10-NEXT: extsw r3, r3
2524 ; CHECK-PREP10-NEXT: blr
2526 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
2527 %0 = bitcast i8* %add.ptr to double*
2528 %1 = load double, double* %0, align 8
2529 %conv = fptosi double %1 to i8
2533 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2534 define dso_local signext i8 @ld_reg_int8_t_double(i8* nocapture readonly %ptr, i64 %off) {
2535 ; CHECK-LABEL: ld_reg_int8_t_double:
2536 ; CHECK: # %bb.0: # %entry
2537 ; CHECK-NEXT: lfdx f0, r3, r4
2538 ; CHECK-NEXT: xscvdpsxws f0, f0
2539 ; CHECK-NEXT: mffprwz r3, f0
2540 ; CHECK-NEXT: extsw r3, r3
2543 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
2544 %0 = bitcast i8* %add.ptr to double*
2545 %1 = load double, double* %0, align 8
2546 %conv = fptosi double %1 to i8
2550 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2551 define dso_local signext i8 @ld_or_int8_t_double(i64 %ptr, i8 zeroext %off) {
2552 ; CHECK-LABEL: ld_or_int8_t_double:
2553 ; CHECK: # %bb.0: # %entry
2554 ; CHECK-NEXT: or r3, r4, r3
2555 ; CHECK-NEXT: lfd f0, 0(r3)
2556 ; CHECK-NEXT: xscvdpsxws f0, f0
2557 ; CHECK-NEXT: mffprwz r3, f0
2558 ; CHECK-NEXT: extsw r3, r3
2561 %conv = zext i8 %off to i64
2562 %or = or i64 %conv, %ptr
2563 %0 = inttoptr i64 %or to double*
2564 %1 = load double, double* %0, align 8
2565 %conv1 = fptosi double %1 to i8
2569 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2570 define dso_local signext i8 @ld_not_disjoint16_int8_t_double(i64 %ptr) {
2571 ; CHECK-LABEL: ld_not_disjoint16_int8_t_double:
2572 ; CHECK: # %bb.0: # %entry
2573 ; CHECK-NEXT: ori r3, r3, 6
2574 ; CHECK-NEXT: lfd f0, 0(r3)
2575 ; CHECK-NEXT: xscvdpsxws f0, f0
2576 ; CHECK-NEXT: mffprwz r3, f0
2577 ; CHECK-NEXT: extsw r3, r3
2580 %or = or i64 %ptr, 6
2581 %0 = inttoptr i64 %or to double*
2582 %1 = load double, double* %0, align 8
2583 %conv = fptosi double %1 to i8
2587 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2588 define dso_local signext i8 @ld_disjoint_align16_int8_t_double(i64 %ptr) {
2589 ; CHECK-LABEL: ld_disjoint_align16_int8_t_double:
2590 ; CHECK: # %bb.0: # %entry
2591 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2592 ; CHECK-NEXT: lfd f0, 24(r3)
2593 ; CHECK-NEXT: xscvdpsxws f0, f0
2594 ; CHECK-NEXT: mffprwz r3, f0
2595 ; CHECK-NEXT: extsw r3, r3
2598 %and = and i64 %ptr, -4096
2599 %or = or i64 %and, 24
2600 %0 = inttoptr i64 %or to double*
2601 %1 = load double, double* %0, align 8
2602 %conv = fptosi double %1 to i8
2606 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2607 define dso_local signext i8 @ld_not_disjoint32_int8_t_double(i64 %ptr) {
2608 ; CHECK-LABEL: ld_not_disjoint32_int8_t_double:
2609 ; CHECK: # %bb.0: # %entry
2610 ; CHECK-NEXT: ori r3, r3, 34463
2611 ; CHECK-NEXT: oris r3, r3, 1
2612 ; CHECK-NEXT: lfd f0, 0(r3)
2613 ; CHECK-NEXT: xscvdpsxws f0, f0
2614 ; CHECK-NEXT: mffprwz r3, f0
2615 ; CHECK-NEXT: extsw r3, r3
2618 %or = or i64 %ptr, 99999
2619 %0 = inttoptr i64 %or to double*
2620 %1 = load double, double* %0, align 8
2621 %conv = fptosi double %1 to i8
2625 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2626 define dso_local signext i8 @ld_disjoint_align32_int8_t_double(i64 %ptr) {
2627 ; CHECK-P10-LABEL: ld_disjoint_align32_int8_t_double:
2628 ; CHECK-P10: # %bb.0: # %entry
2629 ; CHECK-P10-NEXT: lis r4, -15264
2630 ; CHECK-P10-NEXT: and r3, r3, r4
2631 ; CHECK-P10-NEXT: pli r4, 999990000
2632 ; CHECK-P10-NEXT: lfdx f0, r3, r4
2633 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2634 ; CHECK-P10-NEXT: mffprwz r3, f0
2635 ; CHECK-P10-NEXT: extsw r3, r3
2636 ; CHECK-P10-NEXT: blr
2638 ; CHECK-P9-LABEL: ld_disjoint_align32_int8_t_double:
2639 ; CHECK-P9: # %bb.0: # %entry
2640 ; CHECK-P9-NEXT: lis r4, -15264
2641 ; CHECK-P9-NEXT: and r3, r3, r4
2642 ; CHECK-P9-NEXT: lis r4, 15258
2643 ; CHECK-P9-NEXT: ori r4, r4, 41712
2644 ; CHECK-P9-NEXT: lfdx f0, r3, r4
2645 ; CHECK-P9-NEXT: xscvdpsxws f0, f0
2646 ; CHECK-P9-NEXT: mffprwz r3, f0
2647 ; CHECK-P9-NEXT: extsw r3, r3
2648 ; CHECK-P9-NEXT: blr
2650 ; CHECK-P8-LABEL: ld_disjoint_align32_int8_t_double:
2651 ; CHECK-P8: # %bb.0: # %entry
2652 ; CHECK-P8-NEXT: lis r4, -15264
2653 ; CHECK-P8-NEXT: lis r5, 15258
2654 ; CHECK-P8-NEXT: and r3, r3, r4
2655 ; CHECK-P8-NEXT: ori r4, r5, 41712
2656 ; CHECK-P8-NEXT: lfdx f0, r3, r4
2657 ; CHECK-P8-NEXT: xscvdpsxws f0, f0
2658 ; CHECK-P8-NEXT: mffprwz r3, f0
2659 ; CHECK-P8-NEXT: extsw r3, r3
2660 ; CHECK-P8-NEXT: blr
2662 %and = and i64 %ptr, -1000341504
2663 %or = or i64 %and, 999990000
2664 %0 = inttoptr i64 %or to double*
2665 %1 = load double, double* %0, align 16
2666 %conv = fptosi double %1 to i8
2670 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2671 define dso_local signext i8 @ld_not_disjoint64_int8_t_double(i64 %ptr) {
2672 ; CHECK-P10-LABEL: ld_not_disjoint64_int8_t_double:
2673 ; CHECK-P10: # %bb.0: # %entry
2674 ; CHECK-P10-NEXT: pli r4, 232
2675 ; CHECK-P10-NEXT: pli r5, 3567587329
2676 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2677 ; CHECK-P10-NEXT: or r3, r3, r5
2678 ; CHECK-P10-NEXT: lfd f0, 0(r3)
2679 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2680 ; CHECK-P10-NEXT: mffprwz r3, f0
2681 ; CHECK-P10-NEXT: extsw r3, r3
2682 ; CHECK-P10-NEXT: blr
2684 ; CHECK-PREP10-LABEL: ld_not_disjoint64_int8_t_double:
2685 ; CHECK-PREP10: # %bb.0: # %entry
2686 ; CHECK-PREP10-NEXT: li r4, 29
2687 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2688 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2689 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2690 ; CHECK-PREP10-NEXT: or r3, r3, r4
2691 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
2692 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2693 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2694 ; CHECK-PREP10-NEXT: extsw r3, r3
2695 ; CHECK-PREP10-NEXT: blr
2697 %or = or i64 %ptr, 1000000000001
2698 %0 = inttoptr i64 %or to double*
2699 %1 = load double, double* %0, align 8
2700 %conv = fptosi double %1 to i8
2704 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2705 define dso_local signext i8 @ld_disjoint_align64_int8_t_double(i64 %ptr) {
2706 ; CHECK-P10-LABEL: ld_disjoint_align64_int8_t_double:
2707 ; CHECK-P10: # %bb.0: # %entry
2708 ; CHECK-P10-NEXT: pli r4, 244140625
2709 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
2710 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2711 ; CHECK-P10-NEXT: lfdx f0, r3, r4
2712 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2713 ; CHECK-P10-NEXT: mffprwz r3, f0
2714 ; CHECK-P10-NEXT: extsw r3, r3
2715 ; CHECK-P10-NEXT: blr
2717 ; CHECK-PREP10-LABEL: ld_disjoint_align64_int8_t_double:
2718 ; CHECK-PREP10: # %bb.0: # %entry
2719 ; CHECK-PREP10-NEXT: lis r4, 3725
2720 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
2721 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2722 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2723 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
2724 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2725 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2726 ; CHECK-PREP10-NEXT: extsw r3, r3
2727 ; CHECK-PREP10-NEXT: blr
2729 %and = and i64 %ptr, -1099511627776
2730 %or = or i64 %and, 1000000000000
2731 %0 = inttoptr i64 %or to double*
2732 %1 = load double, double* %0, align 4096
2733 %conv = fptosi double %1 to i8
2737 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2738 define dso_local signext i8 @ld_cst_align16_int8_t_double() {
2739 ; CHECK-LABEL: ld_cst_align16_int8_t_double:
2740 ; CHECK: # %bb.0: # %entry
2741 ; CHECK-NEXT: lfd f0, 4080(0)
2742 ; CHECK-NEXT: xscvdpsxws f0, f0
2743 ; CHECK-NEXT: mffprwz r3, f0
2744 ; CHECK-NEXT: extsw r3, r3
2747 %0 = load double, double* inttoptr (i64 4080 to double*), align 16
2748 %conv = fptosi double %0 to i8
2752 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2753 define dso_local signext i8 @ld_cst_align32_int8_t_double() {
2754 ; CHECK-LABEL: ld_cst_align32_int8_t_double:
2755 ; CHECK: # %bb.0: # %entry
2756 ; CHECK-NEXT: lis r3, 153
2757 ; CHECK-NEXT: lfd f0, -27108(r3)
2758 ; CHECK-NEXT: xscvdpsxws f0, f0
2759 ; CHECK-NEXT: mffprwz r3, f0
2760 ; CHECK-NEXT: extsw r3, r3
2763 %0 = load double, double* inttoptr (i64 9999900 to double*), align 8
2764 %conv = fptosi double %0 to i8
2768 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2769 define dso_local signext i8 @ld_cst_align64_int8_t_double() {
2770 ; CHECK-P10-LABEL: ld_cst_align64_int8_t_double:
2771 ; CHECK-P10: # %bb.0: # %entry
2772 ; CHECK-P10-NEXT: pli r3, 244140625
2773 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
2774 ; CHECK-P10-NEXT: lfd f0, 0(r3)
2775 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2776 ; CHECK-P10-NEXT: mffprwz r3, f0
2777 ; CHECK-P10-NEXT: extsw r3, r3
2778 ; CHECK-P10-NEXT: blr
2780 ; CHECK-PREP10-LABEL: ld_cst_align64_int8_t_double:
2781 ; CHECK-PREP10: # %bb.0: # %entry
2782 ; CHECK-PREP10-NEXT: lis r3, 3725
2783 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
2784 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
2785 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
2786 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2787 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2788 ; CHECK-PREP10-NEXT: extsw r3, r3
2789 ; CHECK-PREP10-NEXT: blr
2791 %0 = load double, double* inttoptr (i64 1000000000000 to double*), align 4096
2792 %conv = fptosi double %0 to i8
2796 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2797 define dso_local zeroext i8 @ld_0_uint8_t_uint8_t(i64 %ptr) {
2798 ; CHECK-LABEL: ld_0_uint8_t_uint8_t:
2799 ; CHECK: # %bb.0: # %entry
2800 ; CHECK-NEXT: lbz r3, 0(r3)
2803 %0 = inttoptr i64 %ptr to i8*
2804 %1 = load i8, i8* %0, align 1
2808 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2809 define dso_local zeroext i8 @ld_align16_uint8_t_uint8_t(i8* nocapture readonly %ptr) {
2810 ; CHECK-LABEL: ld_align16_uint8_t_uint8_t:
2811 ; CHECK: # %bb.0: # %entry
2812 ; CHECK-NEXT: lbz r3, 8(r3)
2815 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
2816 %0 = load i8, i8* %add.ptr, align 1
2820 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2821 define dso_local zeroext i8 @ld_align32_uint8_t_uint8_t(i8* nocapture readonly %ptr) {
2822 ; CHECK-P10-LABEL: ld_align32_uint8_t_uint8_t:
2823 ; CHECK-P10: # %bb.0: # %entry
2824 ; CHECK-P10-NEXT: pli r4, 99999000
2825 ; CHECK-P10-NEXT: lbzx r3, r3, r4
2826 ; CHECK-P10-NEXT: blr
2828 ; CHECK-PREP10-LABEL: ld_align32_uint8_t_uint8_t:
2829 ; CHECK-PREP10: # %bb.0: # %entry
2830 ; CHECK-PREP10-NEXT: lis r4, 1525
2831 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
2832 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
2833 ; CHECK-PREP10-NEXT: blr
2835 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
2836 %0 = load i8, i8* %add.ptr, align 1
2840 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2841 define dso_local zeroext i8 @ld_unalign64_uint8_t_uint8_t(i8* nocapture readonly %ptr) {
2842 ; CHECK-P10-LABEL: ld_unalign64_uint8_t_uint8_t:
2843 ; CHECK-P10: # %bb.0: # %entry
2844 ; CHECK-P10-NEXT: pli r4, 232
2845 ; CHECK-P10-NEXT: pli r5, 3567587329
2846 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2847 ; CHECK-P10-NEXT: lbzx r3, r3, r5
2848 ; CHECK-P10-NEXT: blr
2850 ; CHECK-PREP10-LABEL: ld_unalign64_uint8_t_uint8_t:
2851 ; CHECK-PREP10: # %bb.0: # %entry
2852 ; CHECK-PREP10-NEXT: li r4, 29
2853 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2854 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2855 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2856 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
2857 ; CHECK-PREP10-NEXT: blr
2859 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
2860 %0 = load i8, i8* %add.ptr, align 1
2864 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2865 define dso_local zeroext i8 @ld_align64_uint8_t_uint8_t(i8* nocapture readonly %ptr) {
2866 ; CHECK-P10-LABEL: ld_align64_uint8_t_uint8_t:
2867 ; CHECK-P10: # %bb.0: # %entry
2868 ; CHECK-P10-NEXT: pli r4, 244140625
2869 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2870 ; CHECK-P10-NEXT: lbzx r3, r3, r4
2871 ; CHECK-P10-NEXT: blr
2873 ; CHECK-PREP10-LABEL: ld_align64_uint8_t_uint8_t:
2874 ; CHECK-PREP10: # %bb.0: # %entry
2875 ; CHECK-PREP10-NEXT: lis r4, 3725
2876 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2877 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2878 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
2879 ; CHECK-PREP10-NEXT: blr
2881 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
2882 %0 = load i8, i8* %add.ptr, align 1
2886 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2887 define dso_local zeroext i8 @ld_reg_uint8_t_uint8_t(i8* nocapture readonly %ptr, i64 %off) {
2888 ; CHECK-LABEL: ld_reg_uint8_t_uint8_t:
2889 ; CHECK: # %bb.0: # %entry
2890 ; CHECK-NEXT: lbzx r3, r3, r4
2893 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
2894 %0 = load i8, i8* %add.ptr, align 1
2898 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2899 define dso_local zeroext i8 @ld_or_uint8_t_uint8_t(i64 %ptr, i8 zeroext %off) {
2900 ; CHECK-LABEL: ld_or_uint8_t_uint8_t:
2901 ; CHECK: # %bb.0: # %entry
2902 ; CHECK-NEXT: or r3, r4, r3
2903 ; CHECK-NEXT: lbz r3, 0(r3)
2906 %conv = zext i8 %off to i64
2907 %or = or i64 %conv, %ptr
2908 %0 = inttoptr i64 %or to i8*
2909 %1 = load i8, i8* %0, align 1
2913 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2914 define dso_local zeroext i8 @ld_not_disjoint16_uint8_t_uint8_t(i64 %ptr) {
2915 ; CHECK-LABEL: ld_not_disjoint16_uint8_t_uint8_t:
2916 ; CHECK: # %bb.0: # %entry
2917 ; CHECK-NEXT: ori r3, r3, 6
2918 ; CHECK-NEXT: lbz r3, 0(r3)
2921 %or = or i64 %ptr, 6
2922 %0 = inttoptr i64 %or to i8*
2923 %1 = load i8, i8* %0, align 1
2927 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2928 define dso_local zeroext i8 @ld_disjoint_align16_uint8_t_uint8_t(i64 %ptr) {
2929 ; CHECK-LABEL: ld_disjoint_align16_uint8_t_uint8_t:
2930 ; CHECK: # %bb.0: # %entry
2931 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2932 ; CHECK-NEXT: lbz r3, 24(r3)
2935 %and = and i64 %ptr, -4096
2936 %or = or i64 %and, 24
2937 %0 = inttoptr i64 %or to i8*
2938 %1 = load i8, i8* %0, align 8
2942 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2943 define dso_local zeroext i8 @ld_not_disjoint32_uint8_t_uint8_t(i64 %ptr) {
2944 ; CHECK-LABEL: ld_not_disjoint32_uint8_t_uint8_t:
2945 ; CHECK: # %bb.0: # %entry
2946 ; CHECK-NEXT: ori r3, r3, 34463
2947 ; CHECK-NEXT: oris r3, r3, 1
2948 ; CHECK-NEXT: lbz r3, 0(r3)
2951 %or = or i64 %ptr, 99999
2952 %0 = inttoptr i64 %or to i8*
2953 %1 = load i8, i8* %0, align 1
2957 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2958 define dso_local zeroext i8 @ld_disjoint_align32_uint8_t_uint8_t(i64 %ptr) {
2959 ; CHECK-P10-LABEL: ld_disjoint_align32_uint8_t_uint8_t:
2960 ; CHECK-P10: # %bb.0: # %entry
2961 ; CHECK-P10-NEXT: lis r4, -15264
2962 ; CHECK-P10-NEXT: and r3, r3, r4
2963 ; CHECK-P10-NEXT: pli r4, 999990000
2964 ; CHECK-P10-NEXT: lbzx r3, r3, r4
2965 ; CHECK-P10-NEXT: blr
2967 ; CHECK-P9-LABEL: ld_disjoint_align32_uint8_t_uint8_t:
2968 ; CHECK-P9: # %bb.0: # %entry
2969 ; CHECK-P9-NEXT: lis r4, -15264
2970 ; CHECK-P9-NEXT: and r3, r3, r4
2971 ; CHECK-P9-NEXT: lis r4, 15258
2972 ; CHECK-P9-NEXT: ori r4, r4, 41712
2973 ; CHECK-P9-NEXT: lbzx r3, r3, r4
2974 ; CHECK-P9-NEXT: blr
2976 ; CHECK-P8-LABEL: ld_disjoint_align32_uint8_t_uint8_t:
2977 ; CHECK-P8: # %bb.0: # %entry
2978 ; CHECK-P8-NEXT: lis r4, -15264
2979 ; CHECK-P8-NEXT: lis r5, 15258
2980 ; CHECK-P8-NEXT: and r3, r3, r4
2981 ; CHECK-P8-NEXT: ori r4, r5, 41712
2982 ; CHECK-P8-NEXT: lbzx r3, r3, r4
2983 ; CHECK-P8-NEXT: blr
2985 %and = and i64 %ptr, -1000341504
2986 %or = or i64 %and, 999990000
2987 %0 = inttoptr i64 %or to i8*
2988 %1 = load i8, i8* %0, align 16
2992 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2993 define dso_local zeroext i8 @ld_not_disjoint64_uint8_t_uint8_t(i64 %ptr) {
2994 ; CHECK-P10-LABEL: ld_not_disjoint64_uint8_t_uint8_t:
2995 ; CHECK-P10: # %bb.0: # %entry
2996 ; CHECK-P10-NEXT: pli r4, 232
2997 ; CHECK-P10-NEXT: pli r5, 3567587329
2998 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2999 ; CHECK-P10-NEXT: or r3, r3, r5
3000 ; CHECK-P10-NEXT: lbz r3, 0(r3)
3001 ; CHECK-P10-NEXT: blr
3003 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint8_t_uint8_t:
3004 ; CHECK-PREP10: # %bb.0: # %entry
3005 ; CHECK-PREP10-NEXT: li r4, 29
3006 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
3007 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
3008 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
3009 ; CHECK-PREP10-NEXT: or r3, r3, r4
3010 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
3011 ; CHECK-PREP10-NEXT: blr
3013 %or = or i64 %ptr, 1000000000001
3014 %0 = inttoptr i64 %or to i8*
3015 %1 = load i8, i8* %0, align 1
3019 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3020 define dso_local zeroext i8 @ld_disjoint_unalign64_uint8_t_uint8_t(i64 %ptr) {
3021 ; CHECK-P10-LABEL: ld_disjoint_unalign64_uint8_t_uint8_t:
3022 ; CHECK-P10: # %bb.0: # %entry
3023 ; CHECK-P10-NEXT: pli r4, 232
3024 ; CHECK-P10-NEXT: pli r5, 3567587329
3025 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
3026 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
3027 ; CHECK-P10-NEXT: lbzx r3, r3, r5
3028 ; CHECK-P10-NEXT: blr
3030 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint8_t_uint8_t:
3031 ; CHECK-PREP10: # %bb.0: # %entry
3032 ; CHECK-PREP10-NEXT: li r4, 29
3033 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
3034 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
3035 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
3036 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
3037 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
3038 ; CHECK-PREP10-NEXT: blr
3040 %and = and i64 %ptr, -1099511627776
3041 %or = or i64 %and, 1000000000001
3042 %0 = inttoptr i64 %or to i8*
3043 %1 = load i8, i8* %0, align 1
3047 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3048 define dso_local zeroext i8 @ld_disjoint_align64_uint8_t_uint8_t(i64 %ptr) {
3049 ; CHECK-P10-LABEL: ld_disjoint_align64_uint8_t_uint8_t:
3050 ; CHECK-P10: # %bb.0: # %entry
3051 ; CHECK-P10-NEXT: pli r4, 244140625
3052 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
3053 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
3054 ; CHECK-P10-NEXT: lbzx r3, r3, r4
3055 ; CHECK-P10-NEXT: blr
3057 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint8_t_uint8_t:
3058 ; CHECK-PREP10: # %bb.0: # %entry
3059 ; CHECK-PREP10-NEXT: lis r4, 3725
3060 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
3061 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
3062 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
3063 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
3064 ; CHECK-PREP10-NEXT: blr
3066 %and = and i64 %ptr, -1099511627776
3067 %or = or i64 %and, 1000000000000
3068 %0 = inttoptr i64 %or to i8*
3069 %1 = load i8, i8* %0, align 4096
3073 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3074 define dso_local zeroext i8 @ld_cst_align16_uint8_t_uint8_t() {
3075 ; CHECK-LABEL: ld_cst_align16_uint8_t_uint8_t:
3076 ; CHECK: # %bb.0: # %entry
3077 ; CHECK-NEXT: lbz r3, 4080(0)
3080 %0 = load i8, i8* inttoptr (i64 4080 to i8*), align 16
3084 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3085 define dso_local zeroext i8 @ld_cst_align32_uint8_t_uint8_t() {
3086 ; CHECK-LABEL: ld_cst_align32_uint8_t_uint8_t:
3087 ; CHECK: # %bb.0: # %entry
3088 ; CHECK-NEXT: lis r3, 153
3089 ; CHECK-NEXT: lbz r3, -27108(r3)
3092 %0 = load i8, i8* inttoptr (i64 9999900 to i8*), align 4
3096 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3097 define dso_local zeroext i8 @ld_cst_unalign64_uint8_t_uint8_t() {
3098 ; CHECK-P10-LABEL: ld_cst_unalign64_uint8_t_uint8_t:
3099 ; CHECK-P10: # %bb.0: # %entry
3100 ; CHECK-P10-NEXT: pli r3, 232
3101 ; CHECK-P10-NEXT: pli r4, 3567587329
3102 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
3103 ; CHECK-P10-NEXT: lbz r3, 0(r4)
3104 ; CHECK-P10-NEXT: blr
3106 ; CHECK-PREP10-LABEL: ld_cst_unalign64_uint8_t_uint8_t:
3107 ; CHECK-PREP10: # %bb.0: # %entry
3108 ; CHECK-PREP10-NEXT: li r3, 29
3109 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
3110 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
3111 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
3112 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
3113 ; CHECK-PREP10-NEXT: blr
3115 %0 = load i8, i8* inttoptr (i64 1000000000001 to i8*), align 1
3119 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3120 define dso_local zeroext i8 @ld_cst_align64_uint8_t_uint8_t() {
3121 ; CHECK-P10-LABEL: ld_cst_align64_uint8_t_uint8_t:
3122 ; CHECK-P10: # %bb.0: # %entry
3123 ; CHECK-P10-NEXT: pli r3, 244140625
3124 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
3125 ; CHECK-P10-NEXT: lbz r3, 0(r3)
3126 ; CHECK-P10-NEXT: blr
3128 ; CHECK-PREP10-LABEL: ld_cst_align64_uint8_t_uint8_t:
3129 ; CHECK-PREP10: # %bb.0: # %entry
3130 ; CHECK-PREP10-NEXT: lis r3, 3725
3131 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
3132 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
3133 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
3134 ; CHECK-PREP10-NEXT: blr
3136 %0 = load i8, i8* inttoptr (i64 1000000000000 to i8*), align 4096
3140 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3141 define dso_local zeroext i8 @ld_0_uint8_t_uint16_t(i64 %ptr) {
3142 ; CHECK-LE-LABEL: ld_0_uint8_t_uint16_t:
3143 ; CHECK-LE: # %bb.0: # %entry
3144 ; CHECK-LE-NEXT: lbz r3, 0(r3)
3145 ; CHECK-LE-NEXT: blr
3147 ; CHECK-BE-LABEL: ld_0_uint8_t_uint16_t:
3148 ; CHECK-BE: # %bb.0: # %entry
3149 ; CHECK-BE-NEXT: lbz r3, 1(r3)
3150 ; CHECK-BE-NEXT: blr
3152 %0 = inttoptr i64 %ptr to i16*
3153 %1 = load i16, i16* %0, align 2
3154 %conv = trunc i16 %1 to i8
3158 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3159 define dso_local zeroext i8 @ld_align16_uint8_t_uint16_t(i8* nocapture readonly %ptr) {
3160 ; CHECK-LE-LABEL: ld_align16_uint8_t_uint16_t:
3161 ; CHECK-LE: # %bb.0: # %entry
3162 ; CHECK-LE-NEXT: lbz r3, 8(r3)
3163 ; CHECK-LE-NEXT: blr
3165 ; CHECK-BE-LABEL: ld_align16_uint8_t_uint16_t:
3166 ; CHECK-BE: # %bb.0: # %entry
3167 ; CHECK-BE-NEXT: lbz r3, 9(r3)
3168 ; CHECK-BE-NEXT: blr
3170 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
3171 %0 = bitcast i8* %add.ptr to i16*
3172 %1 = load i16, i16* %0, align 2
3173 %conv = trunc i16 %1 to i8
3177 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3178 define dso_local zeroext i8 @ld_align32_uint8_t_uint16_t(i8* nocapture readonly %ptr) {
3179 ; CHECK-P10-LE-LABEL: ld_align32_uint8_t_uint16_t:
3180 ; CHECK-P10-LE: # %bb.0: # %entry
3181 ; CHECK-P10-LE-NEXT: pli r4, 99999000
3182 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
3183 ; CHECK-P10-LE-NEXT: blr
3185 ; CHECK-P10-BE-LABEL: ld_align32_uint8_t_uint16_t:
3186 ; CHECK-P10-BE: # %bb.0: # %entry
3187 ; CHECK-P10-BE-NEXT: pli r4, 99999001
3188 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r4
3189 ; CHECK-P10-BE-NEXT: blr
3191 ; CHECK-P9-LE-LABEL: ld_align32_uint8_t_uint16_t:
3192 ; CHECK-P9-LE: # %bb.0: # %entry
3193 ; CHECK-P9-LE-NEXT: lis r4, 1525
3194 ; CHECK-P9-LE-NEXT: ori r4, r4, 56600
3195 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
3196 ; CHECK-P9-LE-NEXT: blr
3198 ; CHECK-P9-BE-LABEL: ld_align32_uint8_t_uint16_t:
3199 ; CHECK-P9-BE: # %bb.0: # %entry
3200 ; CHECK-P9-BE-NEXT: lis r4, 1525
3201 ; CHECK-P9-BE-NEXT: ori r4, r4, 56601
3202 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
3203 ; CHECK-P9-BE-NEXT: blr
3205 ; CHECK-P8-LE-LABEL: ld_align32_uint8_t_uint16_t:
3206 ; CHECK-P8-LE: # %bb.0: # %entry
3207 ; CHECK-P8-LE-NEXT: lis r4, 1525
3208 ; CHECK-P8-LE-NEXT: ori r4, r4, 56600
3209 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
3210 ; CHECK-P8-LE-NEXT: blr
3212 ; CHECK-P8-BE-LABEL: ld_align32_uint8_t_uint16_t:
3213 ; CHECK-P8-BE: # %bb.0: # %entry
3214 ; CHECK-P8-BE-NEXT: lis r4, 1525
3215 ; CHECK-P8-BE-NEXT: ori r4, r4, 56601
3216 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
3217 ; CHECK-P8-BE-NEXT: blr
3219 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
3220 %0 = bitcast i8* %add.ptr to i16*
3221 %1 = load i16, i16* %0, align 2
3222 %conv = trunc i16 %1 to i8
3226 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3227 define dso_local zeroext i8 @ld_unalign64_uint8_t_uint16_t(i8* nocapture readonly %ptr) {
3228 ; CHECK-P10-LE-LABEL: ld_unalign64_uint8_t_uint16_t:
3229 ; CHECK-P10-LE: # %bb.0: # %entry
3230 ; CHECK-P10-LE-NEXT: pli r4, 232
3231 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
3232 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
3233 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r5
3234 ; CHECK-P10-LE-NEXT: blr
3236 ; CHECK-P10-BE-LABEL: ld_unalign64_uint8_t_uint16_t:
3237 ; CHECK-P10-BE: # %bb.0: # %entry
3238 ; CHECK-P10-BE-NEXT: pli r4, 232
3239 ; CHECK-P10-BE-NEXT: pli r5, 3567587330
3240 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
3241 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
3242 ; CHECK-P10-BE-NEXT: blr
3244 ; CHECK-P9-LE-LABEL: ld_unalign64_uint8_t_uint16_t:
3245 ; CHECK-P9-LE: # %bb.0: # %entry
3246 ; CHECK-P9-LE-NEXT: li r4, 29
3247 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
3248 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
3249 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
3250 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
3251 ; CHECK-P9-LE-NEXT: blr
3253 ; CHECK-P9-BE-LABEL: ld_unalign64_uint8_t_uint16_t:
3254 ; CHECK-P9-BE: # %bb.0: # %entry
3255 ; CHECK-P9-BE-NEXT: li r4, 29
3256 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
3257 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
3258 ; CHECK-P9-BE-NEXT: ori r4, r4, 4098
3259 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
3260 ; CHECK-P9-BE-NEXT: blr
3262 ; CHECK-P8-LE-LABEL: ld_unalign64_uint8_t_uint16_t:
3263 ; CHECK-P8-LE: # %bb.0: # %entry
3264 ; CHECK-P8-LE-NEXT: li r4, 29
3265 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
3266 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
3267 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
3268 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
3269 ; CHECK-P8-LE-NEXT: blr
3271 ; CHECK-P8-BE-LABEL: ld_unalign64_uint8_t_uint16_t:
3272 ; CHECK-P8-BE: # %bb.0: # %entry
3273 ; CHECK-P8-BE-NEXT: li r4, 29
3274 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
3275 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
3276 ; CHECK-P8-BE-NEXT: ori r4, r4, 4098
3277 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
3278 ; CHECK-P8-BE-NEXT: blr
3280 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
3281 %0 = bitcast i8* %add.ptr to i16*
3282 %1 = load i16, i16* %0, align 2
3283 %conv = trunc i16 %1 to i8
3287 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3288 define dso_local zeroext i8 @ld_align64_uint8_t_uint16_t(i8* nocapture readonly %ptr) {
3289 ; CHECK-P10-LE-LABEL: ld_align64_uint8_t_uint16_t:
3290 ; CHECK-P10-LE: # %bb.0: # %entry
3291 ; CHECK-P10-LE-NEXT: pli r4, 244140625
3292 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
3293 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
3294 ; CHECK-P10-LE-NEXT: blr
3296 ; CHECK-P10-BE-LABEL: ld_align64_uint8_t_uint16_t:
3297 ; CHECK-P10-BE: # %bb.0: # %entry
3298 ; CHECK-P10-BE-NEXT: pli r4, 232
3299 ; CHECK-P10-BE-NEXT: pli r5, 3567587329
3300 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
3301 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
3302 ; CHECK-P10-BE-NEXT: blr
3304 ; CHECK-P9-LE-LABEL: ld_align64_uint8_t_uint16_t:
3305 ; CHECK-P9-LE: # %bb.0: # %entry
3306 ; CHECK-P9-LE-NEXT: lis r4, 3725
3307 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
3308 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
3309 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
3310 ; CHECK-P9-LE-NEXT: blr
3312 ; CHECK-P9-BE-LABEL: ld_align64_uint8_t_uint16_t:
3313 ; CHECK-P9-BE: # %bb.0: # %entry
3314 ; CHECK-P9-BE-NEXT: li r4, 29
3315 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
3316 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
3317 ; CHECK-P9-BE-NEXT: ori r4, r4, 4097
3318 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
3319 ; CHECK-P9-BE-NEXT: blr
3321 ; CHECK-P8-LE-LABEL: ld_align64_uint8_t_uint16_t:
3322 ; CHECK-P8-LE: # %bb.0: # %entry
3323 ; CHECK-P8-LE-NEXT: lis r4, 3725
3324 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
3325 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
3326 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
3327 ; CHECK-P8-LE-NEXT: blr
3329 ; CHECK-P8-BE-LABEL: ld_align64_uint8_t_uint16_t:
3330 ; CHECK-P8-BE: # %bb.0: # %entry
3331 ; CHECK-P8-BE-NEXT: li r4, 29
3332 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
3333 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
3334 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
3335 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
3336 ; CHECK-P8-BE-NEXT: blr
3338 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
3339 %0 = bitcast i8* %add.ptr to i16*
3340 %1 = load i16, i16* %0, align 2
3341 %conv = trunc i16 %1 to i8
3345 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3346 define dso_local zeroext i8 @ld_reg_uint8_t_uint16_t(i8* nocapture readonly %ptr, i64 %off) {
3347 ; CHECK-LE-LABEL: ld_reg_uint8_t_uint16_t:
3348 ; CHECK-LE: # %bb.0: # %entry
3349 ; CHECK-LE-NEXT: lbzx r3, r3, r4
3350 ; CHECK-LE-NEXT: blr
3352 ; CHECK-BE-LABEL: ld_reg_uint8_t_uint16_t:
3353 ; CHECK-BE: # %bb.0: # %entry
3354 ; CHECK-BE-NEXT: add r3, r3, r4
3355 ; CHECK-BE-NEXT: lbz r3, 1(r3)
3356 ; CHECK-BE-NEXT: blr
3358 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
3359 %0 = bitcast i8* %add.ptr to i16*
3360 %1 = load i16, i16* %0, align 2
3361 %conv = trunc i16 %1 to i8
3365 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3366 define dso_local zeroext i8 @ld_or_uint8_t_uint16_t(i64 %ptr, i8 zeroext %off) {
3367 ; CHECK-LE-LABEL: ld_or_uint8_t_uint16_t:
3368 ; CHECK-LE: # %bb.0: # %entry
3369 ; CHECK-LE-NEXT: or r3, r4, r3
3370 ; CHECK-LE-NEXT: lbz r3, 0(r3)
3371 ; CHECK-LE-NEXT: blr
3373 ; CHECK-BE-LABEL: ld_or_uint8_t_uint16_t:
3374 ; CHECK-BE: # %bb.0: # %entry
3375 ; CHECK-BE-NEXT: or r3, r4, r3
3376 ; CHECK-BE-NEXT: lbz r3, 1(r3)
3377 ; CHECK-BE-NEXT: blr
3379 %conv = zext i8 %off to i64
3380 %or = or i64 %conv, %ptr
3381 %0 = inttoptr i64 %or to i16*
3382 %1 = load i16, i16* %0, align 2
3383 %conv1 = trunc i16 %1 to i8
3387 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3388 define dso_local zeroext i8 @ld_not_disjoint16_uint8_t_uint16_t(i64 %ptr) {
3389 ; CHECK-LE-LABEL: ld_not_disjoint16_uint8_t_uint16_t:
3390 ; CHECK-LE: # %bb.0: # %entry
3391 ; CHECK-LE-NEXT: ori r3, r3, 6
3392 ; CHECK-LE-NEXT: lbz r3, 0(r3)
3393 ; CHECK-LE-NEXT: blr
3395 ; CHECK-BE-LABEL: ld_not_disjoint16_uint8_t_uint16_t:
3396 ; CHECK-BE: # %bb.0: # %entry
3397 ; CHECK-BE-NEXT: ori r3, r3, 6
3398 ; CHECK-BE-NEXT: lbz r3, 1(r3)
3399 ; CHECK-BE-NEXT: blr
3401 %or = or i64 %ptr, 6
3402 %0 = inttoptr i64 %or to i16*
3403 %1 = load i16, i16* %0, align 2
3404 %conv = trunc i16 %1 to i8
3408 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3409 define dso_local zeroext i8 @ld_disjoint_align16_uint8_t_uint16_t(i64 %ptr) {
3410 ; CHECK-LE-LABEL: ld_disjoint_align16_uint8_t_uint16_t:
3411 ; CHECK-LE: # %bb.0: # %entry
3412 ; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
3413 ; CHECK-LE-NEXT: lbz r3, 24(r3)
3414 ; CHECK-LE-NEXT: blr
3416 ; CHECK-BE-LABEL: ld_disjoint_align16_uint8_t_uint16_t:
3417 ; CHECK-BE: # %bb.0: # %entry
3418 ; CHECK-BE-NEXT: rldicr r3, r3, 0, 51
3419 ; CHECK-BE-NEXT: lbz r3, 25(r3)
3420 ; CHECK-BE-NEXT: blr
3422 %and = and i64 %ptr, -4096
3423 %or = or i64 %and, 24
3424 %0 = inttoptr i64 %or to i16*
3425 %1 = load i16, i16* %0, align 8
3426 %conv = trunc i16 %1 to i8
3430 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3431 define dso_local zeroext i8 @ld_not_disjoint32_uint8_t_uint16_t(i64 %ptr) {
3432 ; CHECK-LE-LABEL: ld_not_disjoint32_uint8_t_uint16_t:
3433 ; CHECK-LE: # %bb.0: # %entry
3434 ; CHECK-LE-NEXT: ori r3, r3, 34463
3435 ; CHECK-LE-NEXT: oris r3, r3, 1
3436 ; CHECK-LE-NEXT: lbz r3, 0(r3)
3437 ; CHECK-LE-NEXT: blr
3439 ; CHECK-BE-LABEL: ld_not_disjoint32_uint8_t_uint16_t:
3440 ; CHECK-BE: # %bb.0: # %entry
3441 ; CHECK-BE-NEXT: ori r3, r3, 34463
3442 ; CHECK-BE-NEXT: oris r3, r3, 1
3443 ; CHECK-BE-NEXT: lbz r3, 1(r3)
3444 ; CHECK-BE-NEXT: blr
3446 %or = or i64 %ptr, 99999
3447 %0 = inttoptr i64 %or to i16*
3448 %1 = load i16, i16* %0, align 2
3449 %conv = trunc i16 %1 to i8
3453 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3454 define dso_local zeroext i8 @ld_disjoint_align32_uint8_t_uint16_t(i64 %ptr) {
3455 ; CHECK-P10-LE-LABEL: ld_disjoint_align32_uint8_t_uint16_t:
3456 ; CHECK-P10-LE: # %bb.0: # %entry
3457 ; CHECK-P10-LE-NEXT: lis r4, -15264
3458 ; CHECK-P10-LE-NEXT: and r3, r3, r4
3459 ; CHECK-P10-LE-NEXT: pli r4, 999990000
3460 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
3461 ; CHECK-P10-LE-NEXT: blr
3463 ; CHECK-P10-BE-LABEL: ld_disjoint_align32_uint8_t_uint16_t:
3464 ; CHECK-P10-BE: # %bb.0: # %entry
3465 ; CHECK-P10-BE-NEXT: lis r4, -15264
3466 ; CHECK-P10-BE-NEXT: and r3, r3, r4
3467 ; CHECK-P10-BE-NEXT: pli r4, 999990001
3468 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r4
3469 ; CHECK-P10-BE-NEXT: blr
3471 ; CHECK-P9-LE-LABEL: ld_disjoint_align32_uint8_t_uint16_t:
3472 ; CHECK-P9-LE: # %bb.0: # %entry
3473 ; CHECK-P9-LE-NEXT: lis r4, -15264
3474 ; CHECK-P9-LE-NEXT: and r3, r3, r4
3475 ; CHECK-P9-LE-NEXT: lis r4, 15258
3476 ; CHECK-P9-LE-NEXT: ori r4, r4, 41712
3477 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
3478 ; CHECK-P9-LE-NEXT: blr
3480 ; CHECK-P9-BE-LABEL: ld_disjoint_align32_uint8_t_uint16_t:
3481 ; CHECK-P9-BE: # %bb.0: # %entry
3482 ; CHECK-P9-BE-NEXT: lis r4, -15264
3483 ; CHECK-P9-BE-NEXT: and r3, r3, r4
3484 ; CHECK-P9-BE-NEXT: lis r4, 15258
3485 ; CHECK-P9-BE-NEXT: ori r4, r4, 41713
3486 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
3487 ; CHECK-P9-BE-NEXT: blr
3489 ; CHECK-P8-LE-LABEL: ld_disjoint_align32_uint8_t_uint16_t:
3490 ; CHECK-P8-LE: # %bb.0: # %entry
3491 ; CHECK-P8-LE-NEXT: lis r4, -15264
3492 ; CHECK-P8-LE-NEXT: lis r5, 15258
3493 ; CHECK-P8-LE-NEXT: and r3, r3, r4
3494 ; CHECK-P8-LE-NEXT: ori r4, r5, 41712
3495 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
3496 ; CHECK-P8-LE-NEXT: blr
3498 ; CHECK-P8-BE-LABEL: ld_disjoint_align32_uint8_t_uint16_t:
3499 ; CHECK-P8-BE: # %bb.0: # %entry
3500 ; CHECK-P8-BE-NEXT: lis r4, -15264
3501 ; CHECK-P8-BE-NEXT: lis r5, 15258
3502 ; CHECK-P8-BE-NEXT: and r3, r3, r4
3503 ; CHECK-P8-BE-NEXT: ori r4, r5, 41713
3504 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
3505 ; CHECK-P8-BE-NEXT: blr
3507 %and = and i64 %ptr, -1000341504
3508 %or = or i64 %and, 999990000
3509 %0 = inttoptr i64 %or to i16*
3510 %1 = load i16, i16* %0, align 16
3511 %conv = trunc i16 %1 to i8
3515 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3516 define dso_local zeroext i8 @ld_not_disjoint64_uint8_t_uint16_t(i64 %ptr) {
3517 ; CHECK-P10-LE-LABEL: ld_not_disjoint64_uint8_t_uint16_t:
3518 ; CHECK-P10-LE: # %bb.0: # %entry
3519 ; CHECK-P10-LE-NEXT: pli r4, 232
3520 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
3521 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
3522 ; CHECK-P10-LE-NEXT: or r3, r3, r5
3523 ; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
3524 ; CHECK-P10-LE-NEXT: blr
3526 ; CHECK-P10-BE-LABEL: ld_not_disjoint64_uint8_t_uint16_t:
3527 ; CHECK-P10-BE: # %bb.0: # %entry
3528 ; CHECK-P10-BE-NEXT: pli r4, 232
3529 ; CHECK-P10-BE-NEXT: pli r5, 3567587329
3530 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
3531 ; CHECK-P10-BE-NEXT: or r3, r3, r5
3532 ; CHECK-P10-BE-NEXT: lbz r3, 1(r3)
3533 ; CHECK-P10-BE-NEXT: blr
3535 ; CHECK-P9-LE-LABEL: ld_not_disjoint64_uint8_t_uint16_t:
3536 ; CHECK-P9-LE: # %bb.0: # %entry
3537 ; CHECK-P9-LE-NEXT: li r4, 29
3538 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
3539 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
3540 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
3541 ; CHECK-P9-LE-NEXT: or r3, r3, r4
3542 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
3543 ; CHECK-P9-LE-NEXT: blr
3545 ; CHECK-P9-BE-LABEL: ld_not_disjoint64_uint8_t_uint16_t:
3546 ; CHECK-P9-BE: # %bb.0: # %entry
3547 ; CHECK-P9-BE-NEXT: li r4, 29
3548 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
3549 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
3550 ; CHECK-P9-BE-NEXT: ori r4, r4, 4097
3551 ; CHECK-P9-BE-NEXT: or r3, r3, r4
3552 ; CHECK-P9-BE-NEXT: lbz r3, 1(r3)
3553 ; CHECK-P9-BE-NEXT: blr
3555 ; CHECK-P8-LE-LABEL: ld_not_disjoint64_uint8_t_uint16_t:
3556 ; CHECK-P8-LE: # %bb.0: # %entry
3557 ; CHECK-P8-LE-NEXT: li r4, 29
3558 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
3559 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
3560 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
3561 ; CHECK-P8-LE-NEXT: or r3, r3, r4
3562 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
3563 ; CHECK-P8-LE-NEXT: blr
3565 ; CHECK-P8-BE-LABEL: ld_not_disjoint64_uint8_t_uint16_t:
3566 ; CHECK-P8-BE: # %bb.0: # %entry
3567 ; CHECK-P8-BE-NEXT: li r4, 29
3568 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
3569 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
3570 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
3571 ; CHECK-P8-BE-NEXT: or r3, r3, r4
3572 ; CHECK-P8-BE-NEXT: lbz r3, 1(r3)
3573 ; CHECK-P8-BE-NEXT: blr
3575 %or = or i64 %ptr, 1000000000001
3576 %0 = inttoptr i64 %or to i16*
3577 %1 = load i16, i16* %0, align 2
3578 %conv = trunc i16 %1 to i8
3582 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3583 define dso_local zeroext i8 @ld_disjoint_unalign64_uint8_t_uint16_t(i64 %ptr) {
3584 ; CHECK-P10-LE-LABEL: ld_disjoint_unalign64_uint8_t_uint16_t:
3585 ; CHECK-P10-LE: # %bb.0: # %entry
3586 ; CHECK-P10-LE-NEXT: pli r4, 232
3587 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
3588 ; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
3589 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
3590 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r5
3591 ; CHECK-P10-LE-NEXT: blr
3593 ; CHECK-P10-BE-LABEL: ld_disjoint_unalign64_uint8_t_uint16_t:
3594 ; CHECK-P10-BE: # %bb.0: # %entry
3595 ; CHECK-P10-BE-NEXT: pli r4, 232
3596 ; CHECK-P10-BE-NEXT: pli r5, 3567587330
3597 ; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
3598 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
3599 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
3600 ; CHECK-P10-BE-NEXT: blr
3602 ; CHECK-P9-LE-LABEL: ld_disjoint_unalign64_uint8_t_uint16_t:
3603 ; CHECK-P9-LE: # %bb.0: # %entry
3604 ; CHECK-P9-LE-NEXT: li r4, 29
3605 ; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
3606 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
3607 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
3608 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
3609 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
3610 ; CHECK-P9-LE-NEXT: blr
3612 ; CHECK-P9-BE-LABEL: ld_disjoint_unalign64_uint8_t_uint16_t:
3613 ; CHECK-P9-BE: # %bb.0: # %entry
3614 ; CHECK-P9-BE-NEXT: li r4, 29
3615 ; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
3616 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
3617 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
3618 ; CHECK-P9-BE-NEXT: ori r4, r4, 4098
3619 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
3620 ; CHECK-P9-BE-NEXT: blr
3622 ; CHECK-P8-LE-LABEL: ld_disjoint_unalign64_uint8_t_uint16_t:
3623 ; CHECK-P8-LE: # %bb.0: # %entry
3624 ; CHECK-P8-LE-NEXT: li r4, 29
3625 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
3626 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
3627 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
3628 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
3629 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
3630 ; CHECK-P8-LE-NEXT: blr
3632 ; CHECK-P8-BE-LABEL: ld_disjoint_unalign64_uint8_t_uint16_t:
3633 ; CHECK-P8-BE: # %bb.0: # %entry
3634 ; CHECK-P8-BE-NEXT: li r4, 29
3635 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
3636 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
3637 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
3638 ; CHECK-P8-BE-NEXT: ori r4, r4, 4098
3639 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
3640 ; CHECK-P8-BE-NEXT: blr
3642 %and = and i64 %ptr, -1099511627776
3643 %or = or i64 %and, 1000000000001
3644 %0 = inttoptr i64 %or to i16*
3645 %1 = load i16, i16* %0, align 2
3646 %conv = trunc i16 %1 to i8
3650 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3651 define dso_local zeroext i8 @ld_disjoint_align64_uint8_t_uint16_t(i64 %ptr) {
3652 ; CHECK-P10-LE-LABEL: ld_disjoint_align64_uint8_t_uint16_t:
3653 ; CHECK-P10-LE: # %bb.0: # %entry
3654 ; CHECK-P10-LE-NEXT: pli r4, 244140625
3655 ; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
3656 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
3657 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
3658 ; CHECK-P10-LE-NEXT: blr
3660 ; CHECK-P10-BE-LABEL: ld_disjoint_align64_uint8_t_uint16_t:
3661 ; CHECK-P10-BE: # %bb.0: # %entry
3662 ; CHECK-P10-BE-NEXT: pli r4, 232
3663 ; CHECK-P10-BE-NEXT: pli r5, 3567587329
3664 ; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
3665 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
3666 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
3667 ; CHECK-P10-BE-NEXT: blr
3669 ; CHECK-P9-LE-LABEL: ld_disjoint_align64_uint8_t_uint16_t:
3670 ; CHECK-P9-LE: # %bb.0: # %entry
3671 ; CHECK-P9-LE-NEXT: lis r4, 3725
3672 ; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
3673 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
3674 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
3675 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
3676 ; CHECK-P9-LE-NEXT: blr
3678 ; CHECK-P9-BE-LABEL: ld_disjoint_align64_uint8_t_uint16_t:
3679 ; CHECK-P9-BE: # %bb.0: # %entry
3680 ; CHECK-P9-BE-NEXT: li r4, 29
3681 ; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
3682 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
3683 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
3684 ; CHECK-P9-BE-NEXT: ori r4, r4, 4097
3685 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
3686 ; CHECK-P9-BE-NEXT: blr
3688 ; CHECK-P8-LE-LABEL: ld_disjoint_align64_uint8_t_uint16_t:
3689 ; CHECK-P8-LE: # %bb.0: # %entry
3690 ; CHECK-P8-LE-NEXT: lis r4, 3725
3691 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
3692 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
3693 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
3694 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
3695 ; CHECK-P8-LE-NEXT: blr
3697 ; CHECK-P8-BE-LABEL: ld_disjoint_align64_uint8_t_uint16_t:
3698 ; CHECK-P8-BE: # %bb.0: # %entry
3699 ; CHECK-P8-BE-NEXT: li r4, 29
3700 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
3701 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
3702 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
3703 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
3704 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
3705 ; CHECK-P8-BE-NEXT: blr
3707 %and = and i64 %ptr, -1099511627776
3708 %or = or i64 %and, 1000000000000
3709 %0 = inttoptr i64 %or to i16*
3710 %1 = load i16, i16* %0, align 4096
3711 %conv = trunc i16 %1 to i8
3715 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3716 define dso_local zeroext i8 @ld_cst_align16_uint8_t_uint16_t() {
3717 ; CHECK-LE-LABEL: ld_cst_align16_uint8_t_uint16_t:
3718 ; CHECK-LE: # %bb.0: # %entry
3719 ; CHECK-LE-NEXT: lbz r3, 4080(0)
3720 ; CHECK-LE-NEXT: blr
3722 ; CHECK-BE-LABEL: ld_cst_align16_uint8_t_uint16_t:
3723 ; CHECK-BE: # %bb.0: # %entry
3724 ; CHECK-BE-NEXT: lbz r3, 4081(0)
3725 ; CHECK-BE-NEXT: blr
3727 %0 = load i16, i16* inttoptr (i64 4080 to i16*), align 16
3728 %conv = trunc i16 %0 to i8
3732 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3733 define dso_local zeroext i8 @ld_cst_align32_uint8_t_uint16_t() {
3734 ; CHECK-LE-LABEL: ld_cst_align32_uint8_t_uint16_t:
3735 ; CHECK-LE: # %bb.0: # %entry
3736 ; CHECK-LE-NEXT: lis r3, 153
3737 ; CHECK-LE-NEXT: lbz r3, -27108(r3)
3738 ; CHECK-LE-NEXT: blr
3740 ; CHECK-BE-LABEL: ld_cst_align32_uint8_t_uint16_t:
3741 ; CHECK-BE: # %bb.0: # %entry
3742 ; CHECK-BE-NEXT: lis r3, 153
3743 ; CHECK-BE-NEXT: lbz r3, -27107(r3)
3744 ; CHECK-BE-NEXT: blr
3746 %0 = load i16, i16* inttoptr (i64 9999900 to i16*), align 4
3747 %conv = trunc i16 %0 to i8
3751 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3752 define dso_local zeroext i8 @ld_cst_unalign64_uint8_t_uint16_t() {
3753 ; CHECK-P10-LE-LABEL: ld_cst_unalign64_uint8_t_uint16_t:
3754 ; CHECK-P10-LE: # %bb.0: # %entry
3755 ; CHECK-P10-LE-NEXT: pli r3, 232
3756 ; CHECK-P10-LE-NEXT: pli r4, 3567587329
3757 ; CHECK-P10-LE-NEXT: rldimi r4, r3, 32, 0
3758 ; CHECK-P10-LE-NEXT: lbz r3, 0(r4)
3759 ; CHECK-P10-LE-NEXT: blr
3761 ; CHECK-P10-BE-LABEL: ld_cst_unalign64_uint8_t_uint16_t:
3762 ; CHECK-P10-BE: # %bb.0: # %entry
3763 ; CHECK-P10-BE-NEXT: pli r3, 232
3764 ; CHECK-P10-BE-NEXT: pli r4, 3567587330
3765 ; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
3766 ; CHECK-P10-BE-NEXT: lbz r3, 0(r4)
3767 ; CHECK-P10-BE-NEXT: blr
3769 ; CHECK-P9-LE-LABEL: ld_cst_unalign64_uint8_t_uint16_t:
3770 ; CHECK-P9-LE: # %bb.0: # %entry
3771 ; CHECK-P9-LE-NEXT: li r3, 29
3772 ; CHECK-P9-LE-NEXT: rldic r3, r3, 35, 24
3773 ; CHECK-P9-LE-NEXT: oris r3, r3, 54437
3774 ; CHECK-P9-LE-NEXT: ori r3, r3, 4097
3775 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
3776 ; CHECK-P9-LE-NEXT: blr
3778 ; CHECK-P9-BE-LABEL: ld_cst_unalign64_uint8_t_uint16_t:
3779 ; CHECK-P9-BE: # %bb.0: # %entry
3780 ; CHECK-P9-BE-NEXT: li r3, 29
3781 ; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
3782 ; CHECK-P9-BE-NEXT: oris r3, r3, 54437
3783 ; CHECK-P9-BE-NEXT: ori r3, r3, 4098
3784 ; CHECK-P9-BE-NEXT: lbz r3, 0(r3)
3785 ; CHECK-P9-BE-NEXT: blr
3787 ; CHECK-P8-LE-LABEL: ld_cst_unalign64_uint8_t_uint16_t:
3788 ; CHECK-P8-LE: # %bb.0: # %entry
3789 ; CHECK-P8-LE-NEXT: li r3, 29
3790 ; CHECK-P8-LE-NEXT: rldic r3, r3, 35, 24
3791 ; CHECK-P8-LE-NEXT: oris r3, r3, 54437
3792 ; CHECK-P8-LE-NEXT: ori r3, r3, 4097
3793 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
3794 ; CHECK-P8-LE-NEXT: blr
3796 ; CHECK-P8-BE-LABEL: ld_cst_unalign64_uint8_t_uint16_t:
3797 ; CHECK-P8-BE: # %bb.0: # %entry
3798 ; CHECK-P8-BE-NEXT: li r3, 29
3799 ; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
3800 ; CHECK-P8-BE-NEXT: oris r3, r3, 54437
3801 ; CHECK-P8-BE-NEXT: ori r3, r3, 4098
3802 ; CHECK-P8-BE-NEXT: lbz r3, 0(r3)
3803 ; CHECK-P8-BE-NEXT: blr
3805 %0 = load i16, i16* inttoptr (i64 1000000000001 to i16*), align 2
3806 %conv = trunc i16 %0 to i8
3810 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3811 define dso_local zeroext i8 @ld_cst_align64_uint8_t_uint16_t() {
3812 ; CHECK-P10-LE-LABEL: ld_cst_align64_uint8_t_uint16_t:
3813 ; CHECK-P10-LE: # %bb.0: # %entry
3814 ; CHECK-P10-LE-NEXT: pli r3, 244140625
3815 ; CHECK-P10-LE-NEXT: rldic r3, r3, 12, 24
3816 ; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
3817 ; CHECK-P10-LE-NEXT: blr
3819 ; CHECK-P10-BE-LABEL: ld_cst_align64_uint8_t_uint16_t:
3820 ; CHECK-P10-BE: # %bb.0: # %entry
3821 ; CHECK-P10-BE-NEXT: pli r3, 232
3822 ; CHECK-P10-BE-NEXT: pli r4, 3567587329
3823 ; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
3824 ; CHECK-P10-BE-NEXT: lbz r3, 0(r4)
3825 ; CHECK-P10-BE-NEXT: blr
3827 ; CHECK-P9-LE-LABEL: ld_cst_align64_uint8_t_uint16_t:
3828 ; CHECK-P9-LE: # %bb.0: # %entry
3829 ; CHECK-P9-LE-NEXT: lis r3, 3725
3830 ; CHECK-P9-LE-NEXT: ori r3, r3, 19025
3831 ; CHECK-P9-LE-NEXT: rldic r3, r3, 12, 24
3832 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
3833 ; CHECK-P9-LE-NEXT: blr
3835 ; CHECK-P9-BE-LABEL: ld_cst_align64_uint8_t_uint16_t:
3836 ; CHECK-P9-BE: # %bb.0: # %entry
3837 ; CHECK-P9-BE-NEXT: li r3, 29
3838 ; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
3839 ; CHECK-P9-BE-NEXT: oris r3, r3, 54437
3840 ; CHECK-P9-BE-NEXT: ori r3, r3, 4097
3841 ; CHECK-P9-BE-NEXT: lbz r3, 0(r3)
3842 ; CHECK-P9-BE-NEXT: blr
3844 ; CHECK-P8-LE-LABEL: ld_cst_align64_uint8_t_uint16_t:
3845 ; CHECK-P8-LE: # %bb.0: # %entry
3846 ; CHECK-P8-LE-NEXT: lis r3, 3725
3847 ; CHECK-P8-LE-NEXT: ori r3, r3, 19025
3848 ; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
3849 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
3850 ; CHECK-P8-LE-NEXT: blr
3852 ; CHECK-P8-BE-LABEL: ld_cst_align64_uint8_t_uint16_t:
3853 ; CHECK-P8-BE: # %bb.0: # %entry
3854 ; CHECK-P8-BE-NEXT: li r3, 29
3855 ; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
3856 ; CHECK-P8-BE-NEXT: oris r3, r3, 54437
3857 ; CHECK-P8-BE-NEXT: ori r3, r3, 4097
3858 ; CHECK-P8-BE-NEXT: lbz r3, 0(r3)
3859 ; CHECK-P8-BE-NEXT: blr
3861 %0 = load i16, i16* inttoptr (i64 1000000000000 to i16*), align 4096
3862 %conv = trunc i16 %0 to i8
3866 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3867 define dso_local zeroext i8 @ld_0_uint8_t_uint32_t(i64 %ptr) {
3868 ; CHECK-LE-LABEL: ld_0_uint8_t_uint32_t:
3869 ; CHECK-LE: # %bb.0: # %entry
3870 ; CHECK-LE-NEXT: lbz r3, 0(r3)
3871 ; CHECK-LE-NEXT: blr
3873 ; CHECK-BE-LABEL: ld_0_uint8_t_uint32_t:
3874 ; CHECK-BE: # %bb.0: # %entry
3875 ; CHECK-BE-NEXT: lbz r3, 3(r3)
3876 ; CHECK-BE-NEXT: blr
3878 %0 = inttoptr i64 %ptr to i32*
3879 %1 = load i32, i32* %0, align 4
3880 %conv = trunc i32 %1 to i8
3884 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3885 define dso_local zeroext i8 @ld_align16_uint8_t_uint32_t(i8* nocapture readonly %ptr) {
3886 ; CHECK-LE-LABEL: ld_align16_uint8_t_uint32_t:
3887 ; CHECK-LE: # %bb.0: # %entry
3888 ; CHECK-LE-NEXT: lbz r3, 8(r3)
3889 ; CHECK-LE-NEXT: blr
3891 ; CHECK-BE-LABEL: ld_align16_uint8_t_uint32_t:
3892 ; CHECK-BE: # %bb.0: # %entry
3893 ; CHECK-BE-NEXT: lbz r3, 11(r3)
3894 ; CHECK-BE-NEXT: blr
3896 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
3897 %0 = bitcast i8* %add.ptr to i32*
3898 %1 = load i32, i32* %0, align 4
3899 %conv = trunc i32 %1 to i8
3903 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3904 define dso_local zeroext i8 @ld_align32_uint8_t_uint32_t(i8* nocapture readonly %ptr) {
3905 ; CHECK-P10-LE-LABEL: ld_align32_uint8_t_uint32_t:
3906 ; CHECK-P10-LE: # %bb.0: # %entry
3907 ; CHECK-P10-LE-NEXT: pli r4, 99999000
3908 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
3909 ; CHECK-P10-LE-NEXT: blr
3911 ; CHECK-P10-BE-LABEL: ld_align32_uint8_t_uint32_t:
3912 ; CHECK-P10-BE: # %bb.0: # %entry
3913 ; CHECK-P10-BE-NEXT: pli r4, 99999003
3914 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r4
3915 ; CHECK-P10-BE-NEXT: blr
3917 ; CHECK-P9-LE-LABEL: ld_align32_uint8_t_uint32_t:
3918 ; CHECK-P9-LE: # %bb.0: # %entry
3919 ; CHECK-P9-LE-NEXT: lis r4, 1525
3920 ; CHECK-P9-LE-NEXT: ori r4, r4, 56600
3921 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
3922 ; CHECK-P9-LE-NEXT: blr
3924 ; CHECK-P9-BE-LABEL: ld_align32_uint8_t_uint32_t:
3925 ; CHECK-P9-BE: # %bb.0: # %entry
3926 ; CHECK-P9-BE-NEXT: lis r4, 1525
3927 ; CHECK-P9-BE-NEXT: ori r4, r4, 56603
3928 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
3929 ; CHECK-P9-BE-NEXT: blr
3931 ; CHECK-P8-LE-LABEL: ld_align32_uint8_t_uint32_t:
3932 ; CHECK-P8-LE: # %bb.0: # %entry
3933 ; CHECK-P8-LE-NEXT: lis r4, 1525
3934 ; CHECK-P8-LE-NEXT: ori r4, r4, 56600
3935 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
3936 ; CHECK-P8-LE-NEXT: blr
3938 ; CHECK-P8-BE-LABEL: ld_align32_uint8_t_uint32_t:
3939 ; CHECK-P8-BE: # %bb.0: # %entry
3940 ; CHECK-P8-BE-NEXT: lis r4, 1525
3941 ; CHECK-P8-BE-NEXT: ori r4, r4, 56603
3942 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
3943 ; CHECK-P8-BE-NEXT: blr
3945 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
3946 %0 = bitcast i8* %add.ptr to i32*
3947 %1 = load i32, i32* %0, align 4
3948 %conv = trunc i32 %1 to i8
3952 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3953 define dso_local zeroext i8 @ld_unalign64_uint8_t_uint32_t(i8* nocapture readonly %ptr) {
3954 ; CHECK-P10-LE-LABEL: ld_unalign64_uint8_t_uint32_t:
3955 ; CHECK-P10-LE: # %bb.0: # %entry
3956 ; CHECK-P10-LE-NEXT: pli r4, 232
3957 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
3958 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
3959 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r5
3960 ; CHECK-P10-LE-NEXT: blr
3962 ; CHECK-P10-BE-LABEL: ld_unalign64_uint8_t_uint32_t:
3963 ; CHECK-P10-BE: # %bb.0: # %entry
3964 ; CHECK-P10-BE-NEXT: pli r4, 232
3965 ; CHECK-P10-BE-NEXT: pli r5, 3567587332
3966 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
3967 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
3968 ; CHECK-P10-BE-NEXT: blr
3970 ; CHECK-P9-LE-LABEL: ld_unalign64_uint8_t_uint32_t:
3971 ; CHECK-P9-LE: # %bb.0: # %entry
3972 ; CHECK-P9-LE-NEXT: li r4, 29
3973 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
3974 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
3975 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
3976 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
3977 ; CHECK-P9-LE-NEXT: blr
3979 ; CHECK-P9-BE-LABEL: ld_unalign64_uint8_t_uint32_t:
3980 ; CHECK-P9-BE: # %bb.0: # %entry
3981 ; CHECK-P9-BE-NEXT: li r4, 29
3982 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
3983 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
3984 ; CHECK-P9-BE-NEXT: ori r4, r4, 4100
3985 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
3986 ; CHECK-P9-BE-NEXT: blr
3988 ; CHECK-P8-LE-LABEL: ld_unalign64_uint8_t_uint32_t:
3989 ; CHECK-P8-LE: # %bb.0: # %entry
3990 ; CHECK-P8-LE-NEXT: li r4, 29
3991 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
3992 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
3993 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
3994 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
3995 ; CHECK-P8-LE-NEXT: blr
3997 ; CHECK-P8-BE-LABEL: ld_unalign64_uint8_t_uint32_t:
3998 ; CHECK-P8-BE: # %bb.0: # %entry
3999 ; CHECK-P8-BE-NEXT: li r4, 29
4000 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
4001 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
4002 ; CHECK-P8-BE-NEXT: ori r4, r4, 4100
4003 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
4004 ; CHECK-P8-BE-NEXT: blr
4006 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
4007 %0 = bitcast i8* %add.ptr to i32*
4008 %1 = load i32, i32* %0, align 4
4009 %conv = trunc i32 %1 to i8
4013 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4014 define dso_local zeroext i8 @ld_align64_uint8_t_uint32_t(i8* nocapture readonly %ptr) {
4015 ; CHECK-P10-LE-LABEL: ld_align64_uint8_t_uint32_t:
4016 ; CHECK-P10-LE: # %bb.0: # %entry
4017 ; CHECK-P10-LE-NEXT: pli r4, 244140625
4018 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
4019 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
4020 ; CHECK-P10-LE-NEXT: blr
4022 ; CHECK-P10-BE-LABEL: ld_align64_uint8_t_uint32_t:
4023 ; CHECK-P10-BE: # %bb.0: # %entry
4024 ; CHECK-P10-BE-NEXT: pli r4, 232
4025 ; CHECK-P10-BE-NEXT: pli r5, 3567587331
4026 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
4027 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
4028 ; CHECK-P10-BE-NEXT: blr
4030 ; CHECK-P9-LE-LABEL: ld_align64_uint8_t_uint32_t:
4031 ; CHECK-P9-LE: # %bb.0: # %entry
4032 ; CHECK-P9-LE-NEXT: lis r4, 3725
4033 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
4034 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
4035 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
4036 ; CHECK-P9-LE-NEXT: blr
4038 ; CHECK-P9-BE-LABEL: ld_align64_uint8_t_uint32_t:
4039 ; CHECK-P9-BE: # %bb.0: # %entry
4040 ; CHECK-P9-BE-NEXT: li r4, 29
4041 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
4042 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
4043 ; CHECK-P9-BE-NEXT: ori r4, r4, 4099
4044 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
4045 ; CHECK-P9-BE-NEXT: blr
4047 ; CHECK-P8-LE-LABEL: ld_align64_uint8_t_uint32_t:
4048 ; CHECK-P8-LE: # %bb.0: # %entry
4049 ; CHECK-P8-LE-NEXT: lis r4, 3725
4050 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
4051 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
4052 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
4053 ; CHECK-P8-LE-NEXT: blr
4055 ; CHECK-P8-BE-LABEL: ld_align64_uint8_t_uint32_t:
4056 ; CHECK-P8-BE: # %bb.0: # %entry
4057 ; CHECK-P8-BE-NEXT: li r4, 29
4058 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
4059 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
4060 ; CHECK-P8-BE-NEXT: ori r4, r4, 4099
4061 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
4062 ; CHECK-P8-BE-NEXT: blr
4064 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
4065 %0 = bitcast i8* %add.ptr to i32*
4066 %1 = load i32, i32* %0, align 4
4067 %conv = trunc i32 %1 to i8
4071 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4072 define dso_local zeroext i8 @ld_reg_uint8_t_uint32_t(i8* nocapture readonly %ptr, i64 %off) {
4073 ; CHECK-LE-LABEL: ld_reg_uint8_t_uint32_t:
4074 ; CHECK-LE: # %bb.0: # %entry
4075 ; CHECK-LE-NEXT: lbzx r3, r3, r4
4076 ; CHECK-LE-NEXT: blr
4078 ; CHECK-BE-LABEL: ld_reg_uint8_t_uint32_t:
4079 ; CHECK-BE: # %bb.0: # %entry
4080 ; CHECK-BE-NEXT: add r3, r3, r4
4081 ; CHECK-BE-NEXT: lbz r3, 3(r3)
4082 ; CHECK-BE-NEXT: blr
4084 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
4085 %0 = bitcast i8* %add.ptr to i32*
4086 %1 = load i32, i32* %0, align 4
4087 %conv = trunc i32 %1 to i8
4091 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4092 define dso_local zeroext i8 @ld_or_uint8_t_uint32_t(i64 %ptr, i8 zeroext %off) {
4093 ; CHECK-LE-LABEL: ld_or_uint8_t_uint32_t:
4094 ; CHECK-LE: # %bb.0: # %entry
4095 ; CHECK-LE-NEXT: or r3, r4, r3
4096 ; CHECK-LE-NEXT: lbz r3, 0(r3)
4097 ; CHECK-LE-NEXT: blr
4099 ; CHECK-BE-LABEL: ld_or_uint8_t_uint32_t:
4100 ; CHECK-BE: # %bb.0: # %entry
4101 ; CHECK-BE-NEXT: or r3, r4, r3
4102 ; CHECK-BE-NEXT: lbz r3, 3(r3)
4103 ; CHECK-BE-NEXT: blr
4105 %conv = zext i8 %off to i64
4106 %or = or i64 %conv, %ptr
4107 %0 = inttoptr i64 %or to i32*
4108 %1 = load i32, i32* %0, align 4
4109 %conv1 = trunc i32 %1 to i8
4113 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4114 define dso_local zeroext i8 @ld_not_disjoint16_uint8_t_uint32_t(i64 %ptr) {
4115 ; CHECK-LE-LABEL: ld_not_disjoint16_uint8_t_uint32_t:
4116 ; CHECK-LE: # %bb.0: # %entry
4117 ; CHECK-LE-NEXT: ori r3, r3, 6
4118 ; CHECK-LE-NEXT: lbz r3, 0(r3)
4119 ; CHECK-LE-NEXT: blr
4121 ; CHECK-BE-LABEL: ld_not_disjoint16_uint8_t_uint32_t:
4122 ; CHECK-BE: # %bb.0: # %entry
4123 ; CHECK-BE-NEXT: ori r3, r3, 6
4124 ; CHECK-BE-NEXT: lbz r3, 3(r3)
4125 ; CHECK-BE-NEXT: blr
4127 %or = or i64 %ptr, 6
4128 %0 = inttoptr i64 %or to i32*
4129 %1 = load i32, i32* %0, align 4
4130 %conv = trunc i32 %1 to i8
4134 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4135 define dso_local zeroext i8 @ld_disjoint_align16_uint8_t_uint32_t(i64 %ptr) {
4136 ; CHECK-LE-LABEL: ld_disjoint_align16_uint8_t_uint32_t:
4137 ; CHECK-LE: # %bb.0: # %entry
4138 ; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
4139 ; CHECK-LE-NEXT: lbz r3, 24(r3)
4140 ; CHECK-LE-NEXT: blr
4142 ; CHECK-BE-LABEL: ld_disjoint_align16_uint8_t_uint32_t:
4143 ; CHECK-BE: # %bb.0: # %entry
4144 ; CHECK-BE-NEXT: rldicr r3, r3, 0, 51
4145 ; CHECK-BE-NEXT: lbz r3, 27(r3)
4146 ; CHECK-BE-NEXT: blr
4148 %and = and i64 %ptr, -4096
4149 %or = or i64 %and, 24
4150 %0 = inttoptr i64 %or to i32*
4151 %1 = load i32, i32* %0, align 8
4152 %conv = trunc i32 %1 to i8
4156 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4157 define dso_local zeroext i8 @ld_not_disjoint32_uint8_t_uint32_t(i64 %ptr) {
4158 ; CHECK-LE-LABEL: ld_not_disjoint32_uint8_t_uint32_t:
4159 ; CHECK-LE: # %bb.0: # %entry
4160 ; CHECK-LE-NEXT: ori r3, r3, 34463
4161 ; CHECK-LE-NEXT: oris r3, r3, 1
4162 ; CHECK-LE-NEXT: lbz r3, 0(r3)
4163 ; CHECK-LE-NEXT: blr
4165 ; CHECK-BE-LABEL: ld_not_disjoint32_uint8_t_uint32_t:
4166 ; CHECK-BE: # %bb.0: # %entry
4167 ; CHECK-BE-NEXT: ori r3, r3, 34463
4168 ; CHECK-BE-NEXT: oris r3, r3, 1
4169 ; CHECK-BE-NEXT: lbz r3, 3(r3)
4170 ; CHECK-BE-NEXT: blr
4172 %or = or i64 %ptr, 99999
4173 %0 = inttoptr i64 %or to i32*
4174 %1 = load i32, i32* %0, align 4
4175 %conv = trunc i32 %1 to i8
4179 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4180 define dso_local zeroext i8 @ld_disjoint_align32_uint8_t_uint32_t(i64 %ptr) {
4181 ; CHECK-P10-LE-LABEL: ld_disjoint_align32_uint8_t_uint32_t:
4182 ; CHECK-P10-LE: # %bb.0: # %entry
4183 ; CHECK-P10-LE-NEXT: lis r4, -15264
4184 ; CHECK-P10-LE-NEXT: and r3, r3, r4
4185 ; CHECK-P10-LE-NEXT: pli r4, 999990000
4186 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
4187 ; CHECK-P10-LE-NEXT: blr
4189 ; CHECK-P10-BE-LABEL: ld_disjoint_align32_uint8_t_uint32_t:
4190 ; CHECK-P10-BE: # %bb.0: # %entry
4191 ; CHECK-P10-BE-NEXT: lis r4, -15264
4192 ; CHECK-P10-BE-NEXT: and r3, r3, r4
4193 ; CHECK-P10-BE-NEXT: pli r4, 999990003
4194 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r4
4195 ; CHECK-P10-BE-NEXT: blr
4197 ; CHECK-P9-LE-LABEL: ld_disjoint_align32_uint8_t_uint32_t:
4198 ; CHECK-P9-LE: # %bb.0: # %entry
4199 ; CHECK-P9-LE-NEXT: lis r4, -15264
4200 ; CHECK-P9-LE-NEXT: and r3, r3, r4
4201 ; CHECK-P9-LE-NEXT: lis r4, 15258
4202 ; CHECK-P9-LE-NEXT: ori r4, r4, 41712
4203 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
4204 ; CHECK-P9-LE-NEXT: blr
4206 ; CHECK-P9-BE-LABEL: ld_disjoint_align32_uint8_t_uint32_t:
4207 ; CHECK-P9-BE: # %bb.0: # %entry
4208 ; CHECK-P9-BE-NEXT: lis r4, -15264
4209 ; CHECK-P9-BE-NEXT: and r3, r3, r4
4210 ; CHECK-P9-BE-NEXT: lis r4, 15258
4211 ; CHECK-P9-BE-NEXT: ori r4, r4, 41715
4212 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
4213 ; CHECK-P9-BE-NEXT: blr
4215 ; CHECK-P8-LE-LABEL: ld_disjoint_align32_uint8_t_uint32_t:
4216 ; CHECK-P8-LE: # %bb.0: # %entry
4217 ; CHECK-P8-LE-NEXT: lis r4, -15264
4218 ; CHECK-P8-LE-NEXT: lis r5, 15258
4219 ; CHECK-P8-LE-NEXT: and r3, r3, r4
4220 ; CHECK-P8-LE-NEXT: ori r4, r5, 41712
4221 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
4222 ; CHECK-P8-LE-NEXT: blr
4224 ; CHECK-P8-BE-LABEL: ld_disjoint_align32_uint8_t_uint32_t:
4225 ; CHECK-P8-BE: # %bb.0: # %entry
4226 ; CHECK-P8-BE-NEXT: lis r4, -15264
4227 ; CHECK-P8-BE-NEXT: lis r5, 15258
4228 ; CHECK-P8-BE-NEXT: and r3, r3, r4
4229 ; CHECK-P8-BE-NEXT: ori r4, r5, 41715
4230 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
4231 ; CHECK-P8-BE-NEXT: blr
4233 %and = and i64 %ptr, -1000341504
4234 %or = or i64 %and, 999990000
4235 %0 = inttoptr i64 %or to i32*
4236 %1 = load i32, i32* %0, align 16
4237 %conv = trunc i32 %1 to i8
4241 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4242 define dso_local zeroext i8 @ld_not_disjoint64_uint8_t_uint32_t(i64 %ptr) {
4243 ; CHECK-P10-LE-LABEL: ld_not_disjoint64_uint8_t_uint32_t:
4244 ; CHECK-P10-LE: # %bb.0: # %entry
4245 ; CHECK-P10-LE-NEXT: pli r4, 232
4246 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
4247 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
4248 ; CHECK-P10-LE-NEXT: or r3, r3, r5
4249 ; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
4250 ; CHECK-P10-LE-NEXT: blr
4252 ; CHECK-P10-BE-LABEL: ld_not_disjoint64_uint8_t_uint32_t:
4253 ; CHECK-P10-BE: # %bb.0: # %entry
4254 ; CHECK-P10-BE-NEXT: pli r4, 232
4255 ; CHECK-P10-BE-NEXT: pli r5, 3567587329
4256 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
4257 ; CHECK-P10-BE-NEXT: or r3, r3, r5
4258 ; CHECK-P10-BE-NEXT: lbz r3, 3(r3)
4259 ; CHECK-P10-BE-NEXT: blr
4261 ; CHECK-P9-LE-LABEL: ld_not_disjoint64_uint8_t_uint32_t:
4262 ; CHECK-P9-LE: # %bb.0: # %entry
4263 ; CHECK-P9-LE-NEXT: li r4, 29
4264 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
4265 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
4266 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
4267 ; CHECK-P9-LE-NEXT: or r3, r3, r4
4268 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
4269 ; CHECK-P9-LE-NEXT: blr
4271 ; CHECK-P9-BE-LABEL: ld_not_disjoint64_uint8_t_uint32_t:
4272 ; CHECK-P9-BE: # %bb.0: # %entry
4273 ; CHECK-P9-BE-NEXT: li r4, 29
4274 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
4275 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
4276 ; CHECK-P9-BE-NEXT: ori r4, r4, 4097
4277 ; CHECK-P9-BE-NEXT: or r3, r3, r4
4278 ; CHECK-P9-BE-NEXT: lbz r3, 3(r3)
4279 ; CHECK-P9-BE-NEXT: blr
4281 ; CHECK-P8-LE-LABEL: ld_not_disjoint64_uint8_t_uint32_t:
4282 ; CHECK-P8-LE: # %bb.0: # %entry
4283 ; CHECK-P8-LE-NEXT: li r4, 29
4284 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
4285 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
4286 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
4287 ; CHECK-P8-LE-NEXT: or r3, r3, r4
4288 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
4289 ; CHECK-P8-LE-NEXT: blr
4291 ; CHECK-P8-BE-LABEL: ld_not_disjoint64_uint8_t_uint32_t:
4292 ; CHECK-P8-BE: # %bb.0: # %entry
4293 ; CHECK-P8-BE-NEXT: li r4, 29
4294 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
4295 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
4296 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
4297 ; CHECK-P8-BE-NEXT: or r3, r3, r4
4298 ; CHECK-P8-BE-NEXT: lbz r3, 3(r3)
4299 ; CHECK-P8-BE-NEXT: blr
4301 %or = or i64 %ptr, 1000000000001
4302 %0 = inttoptr i64 %or to i32*
4303 %1 = load i32, i32* %0, align 4
4304 %conv = trunc i32 %1 to i8
4308 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4309 define dso_local zeroext i8 @ld_disjoint_unalign64_uint8_t_uint32_t(i64 %ptr) {
4310 ; CHECK-P10-LE-LABEL: ld_disjoint_unalign64_uint8_t_uint32_t:
4311 ; CHECK-P10-LE: # %bb.0: # %entry
4312 ; CHECK-P10-LE-NEXT: pli r4, 232
4313 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
4314 ; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
4315 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
4316 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r5
4317 ; CHECK-P10-LE-NEXT: blr
4319 ; CHECK-P10-BE-LABEL: ld_disjoint_unalign64_uint8_t_uint32_t:
4320 ; CHECK-P10-BE: # %bb.0: # %entry
4321 ; CHECK-P10-BE-NEXT: pli r4, 232
4322 ; CHECK-P10-BE-NEXT: pli r5, 3567587332
4323 ; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
4324 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
4325 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
4326 ; CHECK-P10-BE-NEXT: blr
4328 ; CHECK-P9-LE-LABEL: ld_disjoint_unalign64_uint8_t_uint32_t:
4329 ; CHECK-P9-LE: # %bb.0: # %entry
4330 ; CHECK-P9-LE-NEXT: li r4, 29
4331 ; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
4332 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
4333 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
4334 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
4335 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
4336 ; CHECK-P9-LE-NEXT: blr
4338 ; CHECK-P9-BE-LABEL: ld_disjoint_unalign64_uint8_t_uint32_t:
4339 ; CHECK-P9-BE: # %bb.0: # %entry
4340 ; CHECK-P9-BE-NEXT: li r4, 29
4341 ; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
4342 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
4343 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
4344 ; CHECK-P9-BE-NEXT: ori r4, r4, 4100
4345 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
4346 ; CHECK-P9-BE-NEXT: blr
4348 ; CHECK-P8-LE-LABEL: ld_disjoint_unalign64_uint8_t_uint32_t:
4349 ; CHECK-P8-LE: # %bb.0: # %entry
4350 ; CHECK-P8-LE-NEXT: li r4, 29
4351 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
4352 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
4353 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
4354 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
4355 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
4356 ; CHECK-P8-LE-NEXT: blr
4358 ; CHECK-P8-BE-LABEL: ld_disjoint_unalign64_uint8_t_uint32_t:
4359 ; CHECK-P8-BE: # %bb.0: # %entry
4360 ; CHECK-P8-BE-NEXT: li r4, 29
4361 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
4362 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
4363 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
4364 ; CHECK-P8-BE-NEXT: ori r4, r4, 4100
4365 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
4366 ; CHECK-P8-BE-NEXT: blr
4368 %and = and i64 %ptr, -1099511627776
4369 %or = or i64 %and, 1000000000001
4370 %0 = inttoptr i64 %or to i32*
4371 %1 = load i32, i32* %0, align 4
4372 %conv = trunc i32 %1 to i8
4376 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4377 define dso_local zeroext i8 @ld_disjoint_align64_uint8_t_uint32_t(i64 %ptr) {
4378 ; CHECK-P10-LE-LABEL: ld_disjoint_align64_uint8_t_uint32_t:
4379 ; CHECK-P10-LE: # %bb.0: # %entry
4380 ; CHECK-P10-LE-NEXT: pli r4, 244140625
4381 ; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
4382 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
4383 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
4384 ; CHECK-P10-LE-NEXT: blr
4386 ; CHECK-P10-BE-LABEL: ld_disjoint_align64_uint8_t_uint32_t:
4387 ; CHECK-P10-BE: # %bb.0: # %entry
4388 ; CHECK-P10-BE-NEXT: pli r4, 232
4389 ; CHECK-P10-BE-NEXT: pli r5, 3567587331
4390 ; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
4391 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
4392 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
4393 ; CHECK-P10-BE-NEXT: blr
4395 ; CHECK-P9-LE-LABEL: ld_disjoint_align64_uint8_t_uint32_t:
4396 ; CHECK-P9-LE: # %bb.0: # %entry
4397 ; CHECK-P9-LE-NEXT: lis r4, 3725
4398 ; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
4399 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
4400 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
4401 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
4402 ; CHECK-P9-LE-NEXT: blr
4404 ; CHECK-P9-BE-LABEL: ld_disjoint_align64_uint8_t_uint32_t:
4405 ; CHECK-P9-BE: # %bb.0: # %entry
4406 ; CHECK-P9-BE-NEXT: li r4, 29
4407 ; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
4408 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
4409 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
4410 ; CHECK-P9-BE-NEXT: ori r4, r4, 4099
4411 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
4412 ; CHECK-P9-BE-NEXT: blr
4414 ; CHECK-P8-LE-LABEL: ld_disjoint_align64_uint8_t_uint32_t:
4415 ; CHECK-P8-LE: # %bb.0: # %entry
4416 ; CHECK-P8-LE-NEXT: lis r4, 3725
4417 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
4418 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
4419 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
4420 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
4421 ; CHECK-P8-LE-NEXT: blr
4423 ; CHECK-P8-BE-LABEL: ld_disjoint_align64_uint8_t_uint32_t:
4424 ; CHECK-P8-BE: # %bb.0: # %entry
4425 ; CHECK-P8-BE-NEXT: li r4, 29
4426 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
4427 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
4428 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
4429 ; CHECK-P8-BE-NEXT: ori r4, r4, 4099
4430 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
4431 ; CHECK-P8-BE-NEXT: blr
4433 %and = and i64 %ptr, -1099511627776
4434 %or = or i64 %and, 1000000000000
4435 %0 = inttoptr i64 %or to i32*
4436 %1 = load i32, i32* %0, align 4096
4437 %conv = trunc i32 %1 to i8
4441 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4442 define dso_local zeroext i8 @ld_cst_align16_uint8_t_uint32_t() {
4443 ; CHECK-LE-LABEL: ld_cst_align16_uint8_t_uint32_t:
4444 ; CHECK-LE: # %bb.0: # %entry
4445 ; CHECK-LE-NEXT: lbz r3, 4080(0)
4446 ; CHECK-LE-NEXT: blr
4448 ; CHECK-BE-LABEL: ld_cst_align16_uint8_t_uint32_t:
4449 ; CHECK-BE: # %bb.0: # %entry
4450 ; CHECK-BE-NEXT: lbz r3, 4083(0)
4451 ; CHECK-BE-NEXT: blr
4453 %0 = load i32, i32* inttoptr (i64 4080 to i32*), align 16
4454 %conv = trunc i32 %0 to i8
4458 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4459 define dso_local zeroext i8 @ld_cst_align32_uint8_t_uint32_t() {
4460 ; CHECK-LE-LABEL: ld_cst_align32_uint8_t_uint32_t:
4461 ; CHECK-LE: # %bb.0: # %entry
4462 ; CHECK-LE-NEXT: lis r3, 153
4463 ; CHECK-LE-NEXT: lbz r3, -27108(r3)
4464 ; CHECK-LE-NEXT: blr
4466 ; CHECK-BE-LABEL: ld_cst_align32_uint8_t_uint32_t:
4467 ; CHECK-BE: # %bb.0: # %entry
4468 ; CHECK-BE-NEXT: lis r3, 153
4469 ; CHECK-BE-NEXT: lbz r3, -27105(r3)
4470 ; CHECK-BE-NEXT: blr
4472 %0 = load i32, i32* inttoptr (i64 9999900 to i32*), align 4
4473 %conv = trunc i32 %0 to i8
4477 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4478 define dso_local zeroext i8 @ld_cst_unalign64_uint8_t_uint32_t() {
4479 ; CHECK-P10-LE-LABEL: ld_cst_unalign64_uint8_t_uint32_t:
4480 ; CHECK-P10-LE: # %bb.0: # %entry
4481 ; CHECK-P10-LE-NEXT: pli r3, 232
4482 ; CHECK-P10-LE-NEXT: pli r4, 3567587329
4483 ; CHECK-P10-LE-NEXT: rldimi r4, r3, 32, 0
4484 ; CHECK-P10-LE-NEXT: lbz r3, 0(r4)
4485 ; CHECK-P10-LE-NEXT: blr
4487 ; CHECK-P10-BE-LABEL: ld_cst_unalign64_uint8_t_uint32_t:
4488 ; CHECK-P10-BE: # %bb.0: # %entry
4489 ; CHECK-P10-BE-NEXT: pli r3, 232
4490 ; CHECK-P10-BE-NEXT: pli r4, 3567587332
4491 ; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
4492 ; CHECK-P10-BE-NEXT: lbz r3, 0(r4)
4493 ; CHECK-P10-BE-NEXT: blr
4495 ; CHECK-P9-LE-LABEL: ld_cst_unalign64_uint8_t_uint32_t:
4496 ; CHECK-P9-LE: # %bb.0: # %entry
4497 ; CHECK-P9-LE-NEXT: li r3, 29
4498 ; CHECK-P9-LE-NEXT: rldic r3, r3, 35, 24
4499 ; CHECK-P9-LE-NEXT: oris r3, r3, 54437
4500 ; CHECK-P9-LE-NEXT: ori r3, r3, 4097
4501 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
4502 ; CHECK-P9-LE-NEXT: blr
4504 ; CHECK-P9-BE-LABEL: ld_cst_unalign64_uint8_t_uint32_t:
4505 ; CHECK-P9-BE: # %bb.0: # %entry
4506 ; CHECK-P9-BE-NEXT: li r3, 29
4507 ; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
4508 ; CHECK-P9-BE-NEXT: oris r3, r3, 54437
4509 ; CHECK-P9-BE-NEXT: ori r3, r3, 4100
4510 ; CHECK-P9-BE-NEXT: lbz r3, 0(r3)
4511 ; CHECK-P9-BE-NEXT: blr
4513 ; CHECK-P8-LE-LABEL: ld_cst_unalign64_uint8_t_uint32_t:
4514 ; CHECK-P8-LE: # %bb.0: # %entry
4515 ; CHECK-P8-LE-NEXT: li r3, 29
4516 ; CHECK-P8-LE-NEXT: rldic r3, r3, 35, 24
4517 ; CHECK-P8-LE-NEXT: oris r3, r3, 54437
4518 ; CHECK-P8-LE-NEXT: ori r3, r3, 4097
4519 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
4520 ; CHECK-P8-LE-NEXT: blr
4522 ; CHECK-P8-BE-LABEL: ld_cst_unalign64_uint8_t_uint32_t:
4523 ; CHECK-P8-BE: # %bb.0: # %entry
4524 ; CHECK-P8-BE-NEXT: li r3, 29
4525 ; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
4526 ; CHECK-P8-BE-NEXT: oris r3, r3, 54437
4527 ; CHECK-P8-BE-NEXT: ori r3, r3, 4100
4528 ; CHECK-P8-BE-NEXT: lbz r3, 0(r3)
4529 ; CHECK-P8-BE-NEXT: blr
4531 %0 = load i32, i32* inttoptr (i64 1000000000001 to i32*), align 4
4532 %conv = trunc i32 %0 to i8
4536 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4537 define dso_local zeroext i8 @ld_cst_align64_uint8_t_uint32_t() {
4538 ; CHECK-P10-LE-LABEL: ld_cst_align64_uint8_t_uint32_t:
4539 ; CHECK-P10-LE: # %bb.0: # %entry
4540 ; CHECK-P10-LE-NEXT: pli r3, 244140625
4541 ; CHECK-P10-LE-NEXT: rldic r3, r3, 12, 24
4542 ; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
4543 ; CHECK-P10-LE-NEXT: blr
4545 ; CHECK-P10-BE-LABEL: ld_cst_align64_uint8_t_uint32_t:
4546 ; CHECK-P10-BE: # %bb.0: # %entry
4547 ; CHECK-P10-BE-NEXT: pli r3, 232
4548 ; CHECK-P10-BE-NEXT: pli r4, 3567587331
4549 ; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
4550 ; CHECK-P10-BE-NEXT: lbz r3, 0(r4)
4551 ; CHECK-P10-BE-NEXT: blr
4553 ; CHECK-P9-LE-LABEL: ld_cst_align64_uint8_t_uint32_t:
4554 ; CHECK-P9-LE: # %bb.0: # %entry
4555 ; CHECK-P9-LE-NEXT: lis r3, 3725
4556 ; CHECK-P9-LE-NEXT: ori r3, r3, 19025
4557 ; CHECK-P9-LE-NEXT: rldic r3, r3, 12, 24
4558 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
4559 ; CHECK-P9-LE-NEXT: blr
4561 ; CHECK-P9-BE-LABEL: ld_cst_align64_uint8_t_uint32_t:
4562 ; CHECK-P9-BE: # %bb.0: # %entry
4563 ; CHECK-P9-BE-NEXT: li r3, 29
4564 ; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
4565 ; CHECK-P9-BE-NEXT: oris r3, r3, 54437
4566 ; CHECK-P9-BE-NEXT: ori r3, r3, 4099
4567 ; CHECK-P9-BE-NEXT: lbz r3, 0(r3)
4568 ; CHECK-P9-BE-NEXT: blr
4570 ; CHECK-P8-LE-LABEL: ld_cst_align64_uint8_t_uint32_t:
4571 ; CHECK-P8-LE: # %bb.0: # %entry
4572 ; CHECK-P8-LE-NEXT: lis r3, 3725
4573 ; CHECK-P8-LE-NEXT: ori r3, r3, 19025
4574 ; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
4575 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
4576 ; CHECK-P8-LE-NEXT: blr
4578 ; CHECK-P8-BE-LABEL: ld_cst_align64_uint8_t_uint32_t:
4579 ; CHECK-P8-BE: # %bb.0: # %entry
4580 ; CHECK-P8-BE-NEXT: li r3, 29
4581 ; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
4582 ; CHECK-P8-BE-NEXT: oris r3, r3, 54437
4583 ; CHECK-P8-BE-NEXT: ori r3, r3, 4099
4584 ; CHECK-P8-BE-NEXT: lbz r3, 0(r3)
4585 ; CHECK-P8-BE-NEXT: blr
4587 %0 = load i32, i32* inttoptr (i64 1000000000000 to i32*), align 4096
4588 %conv = trunc i32 %0 to i8
4592 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4593 define dso_local zeroext i8 @ld_0_uint8_t_uint64_t(i64 %ptr) {
4594 ; CHECK-LE-LABEL: ld_0_uint8_t_uint64_t:
4595 ; CHECK-LE: # %bb.0: # %entry
4596 ; CHECK-LE-NEXT: lbz r3, 0(r3)
4597 ; CHECK-LE-NEXT: blr
4599 ; CHECK-BE-LABEL: ld_0_uint8_t_uint64_t:
4600 ; CHECK-BE: # %bb.0: # %entry
4601 ; CHECK-BE-NEXT: lbz r3, 7(r3)
4602 ; CHECK-BE-NEXT: blr
4604 %0 = inttoptr i64 %ptr to i64*
4605 %1 = load i64, i64* %0, align 8
4606 %conv = trunc i64 %1 to i8
4610 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4611 define dso_local zeroext i8 @ld_align16_uint8_t_uint64_t(i8* nocapture readonly %ptr) {
4612 ; CHECK-LE-LABEL: ld_align16_uint8_t_uint64_t:
4613 ; CHECK-LE: # %bb.0: # %entry
4614 ; CHECK-LE-NEXT: lbz r3, 8(r3)
4615 ; CHECK-LE-NEXT: blr
4617 ; CHECK-BE-LABEL: ld_align16_uint8_t_uint64_t:
4618 ; CHECK-BE: # %bb.0: # %entry
4619 ; CHECK-BE-NEXT: lbz r3, 15(r3)
4620 ; CHECK-BE-NEXT: blr
4622 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
4623 %0 = bitcast i8* %add.ptr to i64*
4624 %1 = load i64, i64* %0, align 8
4625 %conv = trunc i64 %1 to i8
4629 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4630 define dso_local zeroext i8 @ld_align32_uint8_t_uint64_t(i8* nocapture readonly %ptr) {
4631 ; CHECK-P10-LE-LABEL: ld_align32_uint8_t_uint64_t:
4632 ; CHECK-P10-LE: # %bb.0: # %entry
4633 ; CHECK-P10-LE-NEXT: pli r4, 99999000
4634 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
4635 ; CHECK-P10-LE-NEXT: blr
4637 ; CHECK-P10-BE-LABEL: ld_align32_uint8_t_uint64_t:
4638 ; CHECK-P10-BE: # %bb.0: # %entry
4639 ; CHECK-P10-BE-NEXT: pli r4, 99999007
4640 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r4
4641 ; CHECK-P10-BE-NEXT: blr
4643 ; CHECK-P9-LE-LABEL: ld_align32_uint8_t_uint64_t:
4644 ; CHECK-P9-LE: # %bb.0: # %entry
4645 ; CHECK-P9-LE-NEXT: lis r4, 1525
4646 ; CHECK-P9-LE-NEXT: ori r4, r4, 56600
4647 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
4648 ; CHECK-P9-LE-NEXT: blr
4650 ; CHECK-P9-BE-LABEL: ld_align32_uint8_t_uint64_t:
4651 ; CHECK-P9-BE: # %bb.0: # %entry
4652 ; CHECK-P9-BE-NEXT: lis r4, 1525
4653 ; CHECK-P9-BE-NEXT: ori r4, r4, 56607
4654 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
4655 ; CHECK-P9-BE-NEXT: blr
4657 ; CHECK-P8-LE-LABEL: ld_align32_uint8_t_uint64_t:
4658 ; CHECK-P8-LE: # %bb.0: # %entry
4659 ; CHECK-P8-LE-NEXT: lis r4, 1525
4660 ; CHECK-P8-LE-NEXT: ori r4, r4, 56600
4661 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
4662 ; CHECK-P8-LE-NEXT: blr
4664 ; CHECK-P8-BE-LABEL: ld_align32_uint8_t_uint64_t:
4665 ; CHECK-P8-BE: # %bb.0: # %entry
4666 ; CHECK-P8-BE-NEXT: lis r4, 1525
4667 ; CHECK-P8-BE-NEXT: ori r4, r4, 56607
4668 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
4669 ; CHECK-P8-BE-NEXT: blr
4671 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
4672 %0 = bitcast i8* %add.ptr to i64*
4673 %1 = load i64, i64* %0, align 8
4674 %conv = trunc i64 %1 to i8
4678 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4679 define dso_local zeroext i8 @ld_unalign64_uint8_t_uint64_t(i8* nocapture readonly %ptr) {
4680 ; CHECK-P10-LE-LABEL: ld_unalign64_uint8_t_uint64_t:
4681 ; CHECK-P10-LE: # %bb.0: # %entry
4682 ; CHECK-P10-LE-NEXT: pli r4, 232
4683 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
4684 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
4685 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r5
4686 ; CHECK-P10-LE-NEXT: blr
4688 ; CHECK-P10-BE-LABEL: ld_unalign64_uint8_t_uint64_t:
4689 ; CHECK-P10-BE: # %bb.0: # %entry
4690 ; CHECK-P10-BE-NEXT: pli r4, 232
4691 ; CHECK-P10-BE-NEXT: pli r5, 3567587336
4692 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
4693 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
4694 ; CHECK-P10-BE-NEXT: blr
4696 ; CHECK-P9-LE-LABEL: ld_unalign64_uint8_t_uint64_t:
4697 ; CHECK-P9-LE: # %bb.0: # %entry
4698 ; CHECK-P9-LE-NEXT: li r4, 29
4699 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
4700 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
4701 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
4702 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
4703 ; CHECK-P9-LE-NEXT: blr
4705 ; CHECK-P9-BE-LABEL: ld_unalign64_uint8_t_uint64_t:
4706 ; CHECK-P9-BE: # %bb.0: # %entry
4707 ; CHECK-P9-BE-NEXT: li r4, 29
4708 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
4709 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
4710 ; CHECK-P9-BE-NEXT: ori r4, r4, 4104
4711 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
4712 ; CHECK-P9-BE-NEXT: blr
4714 ; CHECK-P8-LE-LABEL: ld_unalign64_uint8_t_uint64_t:
4715 ; CHECK-P8-LE: # %bb.0: # %entry
4716 ; CHECK-P8-LE-NEXT: li r4, 29
4717 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
4718 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
4719 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
4720 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
4721 ; CHECK-P8-LE-NEXT: blr
4723 ; CHECK-P8-BE-LABEL: ld_unalign64_uint8_t_uint64_t:
4724 ; CHECK-P8-BE: # %bb.0: # %entry
4725 ; CHECK-P8-BE-NEXT: li r4, 29
4726 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
4727 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
4728 ; CHECK-P8-BE-NEXT: ori r4, r4, 4104
4729 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
4730 ; CHECK-P8-BE-NEXT: blr
4732 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
4733 %0 = bitcast i8* %add.ptr to i64*
4734 %1 = load i64, i64* %0, align 8
4735 %conv = trunc i64 %1 to i8
4739 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4740 define dso_local zeroext i8 @ld_align64_uint8_t_uint64_t(i8* nocapture readonly %ptr) {
4741 ; CHECK-P10-LE-LABEL: ld_align64_uint8_t_uint64_t:
4742 ; CHECK-P10-LE: # %bb.0: # %entry
4743 ; CHECK-P10-LE-NEXT: pli r4, 244140625
4744 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
4745 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
4746 ; CHECK-P10-LE-NEXT: blr
4748 ; CHECK-P10-BE-LABEL: ld_align64_uint8_t_uint64_t:
4749 ; CHECK-P10-BE: # %bb.0: # %entry
4750 ; CHECK-P10-BE-NEXT: pli r4, 232
4751 ; CHECK-P10-BE-NEXT: pli r5, 3567587335
4752 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
4753 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
4754 ; CHECK-P10-BE-NEXT: blr
4756 ; CHECK-P9-LE-LABEL: ld_align64_uint8_t_uint64_t:
4757 ; CHECK-P9-LE: # %bb.0: # %entry
4758 ; CHECK-P9-LE-NEXT: lis r4, 3725
4759 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
4760 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
4761 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
4762 ; CHECK-P9-LE-NEXT: blr
4764 ; CHECK-P9-BE-LABEL: ld_align64_uint8_t_uint64_t:
4765 ; CHECK-P9-BE: # %bb.0: # %entry
4766 ; CHECK-P9-BE-NEXT: li r4, 29
4767 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
4768 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
4769 ; CHECK-P9-BE-NEXT: ori r4, r4, 4103
4770 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
4771 ; CHECK-P9-BE-NEXT: blr
4773 ; CHECK-P8-LE-LABEL: ld_align64_uint8_t_uint64_t:
4774 ; CHECK-P8-LE: # %bb.0: # %entry
4775 ; CHECK-P8-LE-NEXT: lis r4, 3725
4776 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
4777 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
4778 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
4779 ; CHECK-P8-LE-NEXT: blr
4781 ; CHECK-P8-BE-LABEL: ld_align64_uint8_t_uint64_t:
4782 ; CHECK-P8-BE: # %bb.0: # %entry
4783 ; CHECK-P8-BE-NEXT: li r4, 29
4784 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
4785 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
4786 ; CHECK-P8-BE-NEXT: ori r4, r4, 4103
4787 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
4788 ; CHECK-P8-BE-NEXT: blr
4790 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
4791 %0 = bitcast i8* %add.ptr to i64*
4792 %1 = load i64, i64* %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_reg_uint8_t_uint64_t(i8* nocapture readonly %ptr, i64 %off) {
4799 ; CHECK-LE-LABEL: ld_reg_uint8_t_uint64_t:
4800 ; CHECK-LE: # %bb.0: # %entry
4801 ; CHECK-LE-NEXT: lbzx r3, r3, r4
4802 ; CHECK-LE-NEXT: blr
4804 ; CHECK-BE-LABEL: ld_reg_uint8_t_uint64_t:
4805 ; CHECK-BE: # %bb.0: # %entry
4806 ; CHECK-BE-NEXT: add r3, r3, r4
4807 ; CHECK-BE-NEXT: lbz r3, 7(r3)
4808 ; CHECK-BE-NEXT: blr
4810 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
4811 %0 = bitcast i8* %add.ptr to i64*
4812 %1 = load i64, i64* %0, align 8
4813 %conv = trunc i64 %1 to i8
4817 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4818 define dso_local zeroext i8 @ld_or_uint8_t_uint64_t(i64 %ptr, i8 zeroext %off) {
4819 ; CHECK-LE-LABEL: ld_or_uint8_t_uint64_t:
4820 ; CHECK-LE: # %bb.0: # %entry
4821 ; CHECK-LE-NEXT: or r3, r4, r3
4822 ; CHECK-LE-NEXT: lbz r3, 0(r3)
4823 ; CHECK-LE-NEXT: blr
4825 ; CHECK-BE-LABEL: ld_or_uint8_t_uint64_t:
4826 ; CHECK-BE: # %bb.0: # %entry
4827 ; CHECK-BE-NEXT: or r3, r4, r3
4828 ; CHECK-BE-NEXT: lbz r3, 7(r3)
4829 ; CHECK-BE-NEXT: blr
4831 %conv = zext i8 %off to i64
4832 %or = or i64 %conv, %ptr
4833 %0 = inttoptr i64 %or to i64*
4834 %1 = load i64, i64* %0, align 8
4835 %conv1 = trunc i64 %1 to i8
4839 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4840 define dso_local zeroext i8 @ld_not_disjoint16_uint8_t_uint64_t(i64 %ptr) {
4841 ; CHECK-LE-LABEL: ld_not_disjoint16_uint8_t_uint64_t:
4842 ; CHECK-LE: # %bb.0: # %entry
4843 ; CHECK-LE-NEXT: ori r3, r3, 6
4844 ; CHECK-LE-NEXT: lbz r3, 0(r3)
4845 ; CHECK-LE-NEXT: blr
4847 ; CHECK-BE-LABEL: ld_not_disjoint16_uint8_t_uint64_t:
4848 ; CHECK-BE: # %bb.0: # %entry
4849 ; CHECK-BE-NEXT: ori r3, r3, 6
4850 ; CHECK-BE-NEXT: lbz r3, 7(r3)
4851 ; CHECK-BE-NEXT: blr
4853 %or = or i64 %ptr, 6
4854 %0 = inttoptr i64 %or to i64*
4855 %1 = load i64, i64* %0, align 8
4856 %conv = trunc i64 %1 to i8
4860 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4861 define dso_local zeroext i8 @ld_disjoint_align16_uint8_t_uint64_t(i64 %ptr) {
4862 ; CHECK-LE-LABEL: ld_disjoint_align16_uint8_t_uint64_t:
4863 ; CHECK-LE: # %bb.0: # %entry
4864 ; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
4865 ; CHECK-LE-NEXT: lbz r3, 24(r3)
4866 ; CHECK-LE-NEXT: blr
4868 ; CHECK-BE-LABEL: ld_disjoint_align16_uint8_t_uint64_t:
4869 ; CHECK-BE: # %bb.0: # %entry
4870 ; CHECK-BE-NEXT: rldicr r3, r3, 0, 51
4871 ; CHECK-BE-NEXT: lbz r3, 31(r3)
4872 ; CHECK-BE-NEXT: blr
4874 %and = and i64 %ptr, -4096
4875 %or = or i64 %and, 24
4876 %0 = inttoptr i64 %or to i64*
4877 %1 = load i64, i64* %0, align 8
4878 %conv = trunc i64 %1 to i8
4882 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4883 define dso_local zeroext i8 @ld_not_disjoint32_uint8_t_uint64_t(i64 %ptr) {
4884 ; CHECK-LE-LABEL: ld_not_disjoint32_uint8_t_uint64_t:
4885 ; CHECK-LE: # %bb.0: # %entry
4886 ; CHECK-LE-NEXT: ori r3, r3, 34463
4887 ; CHECK-LE-NEXT: oris r3, r3, 1
4888 ; CHECK-LE-NEXT: lbz r3, 0(r3)
4889 ; CHECK-LE-NEXT: blr
4891 ; CHECK-BE-LABEL: ld_not_disjoint32_uint8_t_uint64_t:
4892 ; CHECK-BE: # %bb.0: # %entry
4893 ; CHECK-BE-NEXT: ori r3, r3, 34463
4894 ; CHECK-BE-NEXT: oris r3, r3, 1
4895 ; CHECK-BE-NEXT: lbz r3, 7(r3)
4896 ; CHECK-BE-NEXT: blr
4898 %or = or i64 %ptr, 99999
4899 %0 = inttoptr i64 %or to i64*
4900 %1 = load i64, i64* %0, align 8
4901 %conv = trunc i64 %1 to i8
4905 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4906 define dso_local zeroext i8 @ld_disjoint_align32_uint8_t_uint64_t(i64 %ptr) {
4907 ; CHECK-P10-LE-LABEL: ld_disjoint_align32_uint8_t_uint64_t:
4908 ; CHECK-P10-LE: # %bb.0: # %entry
4909 ; CHECK-P10-LE-NEXT: lis r4, -15264
4910 ; CHECK-P10-LE-NEXT: and r3, r3, r4
4911 ; CHECK-P10-LE-NEXT: pli r4, 999990000
4912 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
4913 ; CHECK-P10-LE-NEXT: blr
4915 ; CHECK-P10-BE-LABEL: ld_disjoint_align32_uint8_t_uint64_t:
4916 ; CHECK-P10-BE: # %bb.0: # %entry
4917 ; CHECK-P10-BE-NEXT: lis r4, -15264
4918 ; CHECK-P10-BE-NEXT: and r3, r3, r4
4919 ; CHECK-P10-BE-NEXT: pli r4, 999990007
4920 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r4
4921 ; CHECK-P10-BE-NEXT: blr
4923 ; CHECK-P9-LE-LABEL: ld_disjoint_align32_uint8_t_uint64_t:
4924 ; CHECK-P9-LE: # %bb.0: # %entry
4925 ; CHECK-P9-LE-NEXT: lis r4, -15264
4926 ; CHECK-P9-LE-NEXT: and r3, r3, r4
4927 ; CHECK-P9-LE-NEXT: lis r4, 15258
4928 ; CHECK-P9-LE-NEXT: ori r4, r4, 41712
4929 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
4930 ; CHECK-P9-LE-NEXT: blr
4932 ; CHECK-P9-BE-LABEL: ld_disjoint_align32_uint8_t_uint64_t:
4933 ; CHECK-P9-BE: # %bb.0: # %entry
4934 ; CHECK-P9-BE-NEXT: lis r4, -15264
4935 ; CHECK-P9-BE-NEXT: and r3, r3, r4
4936 ; CHECK-P9-BE-NEXT: lis r4, 15258
4937 ; CHECK-P9-BE-NEXT: ori r4, r4, 41719
4938 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
4939 ; CHECK-P9-BE-NEXT: blr
4941 ; CHECK-P8-LE-LABEL: ld_disjoint_align32_uint8_t_uint64_t:
4942 ; CHECK-P8-LE: # %bb.0: # %entry
4943 ; CHECK-P8-LE-NEXT: lis r4, -15264
4944 ; CHECK-P8-LE-NEXT: lis r5, 15258
4945 ; CHECK-P8-LE-NEXT: and r3, r3, r4
4946 ; CHECK-P8-LE-NEXT: ori r4, r5, 41712
4947 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
4948 ; CHECK-P8-LE-NEXT: blr
4950 ; CHECK-P8-BE-LABEL: ld_disjoint_align32_uint8_t_uint64_t:
4951 ; CHECK-P8-BE: # %bb.0: # %entry
4952 ; CHECK-P8-BE-NEXT: lis r4, -15264
4953 ; CHECK-P8-BE-NEXT: lis r5, 15258
4954 ; CHECK-P8-BE-NEXT: and r3, r3, r4
4955 ; CHECK-P8-BE-NEXT: ori r4, r5, 41719
4956 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
4957 ; CHECK-P8-BE-NEXT: blr
4959 %and = and i64 %ptr, -1000341504
4960 %or = or i64 %and, 999990000
4961 %0 = inttoptr i64 %or to i64*
4962 %1 = load i64, i64* %0, align 16
4963 %conv = trunc i64 %1 to i8
4967 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4968 define dso_local zeroext i8 @ld_not_disjoint64_uint8_t_uint64_t(i64 %ptr) {
4969 ; CHECK-P10-LE-LABEL: ld_not_disjoint64_uint8_t_uint64_t:
4970 ; CHECK-P10-LE: # %bb.0: # %entry
4971 ; CHECK-P10-LE-NEXT: pli r4, 232
4972 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
4973 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
4974 ; CHECK-P10-LE-NEXT: or r3, r3, r5
4975 ; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
4976 ; CHECK-P10-LE-NEXT: blr
4978 ; CHECK-P10-BE-LABEL: ld_not_disjoint64_uint8_t_uint64_t:
4979 ; CHECK-P10-BE: # %bb.0: # %entry
4980 ; CHECK-P10-BE-NEXT: pli r4, 232
4981 ; CHECK-P10-BE-NEXT: pli r5, 3567587329
4982 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
4983 ; CHECK-P10-BE-NEXT: or r3, r3, r5
4984 ; CHECK-P10-BE-NEXT: lbz r3, 7(r3)
4985 ; CHECK-P10-BE-NEXT: blr
4987 ; CHECK-P9-LE-LABEL: ld_not_disjoint64_uint8_t_uint64_t:
4988 ; CHECK-P9-LE: # %bb.0: # %entry
4989 ; CHECK-P9-LE-NEXT: li r4, 29
4990 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
4991 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
4992 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
4993 ; CHECK-P9-LE-NEXT: or r3, r3, r4
4994 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
4995 ; CHECK-P9-LE-NEXT: blr
4997 ; CHECK-P9-BE-LABEL: ld_not_disjoint64_uint8_t_uint64_t:
4998 ; CHECK-P9-BE: # %bb.0: # %entry
4999 ; CHECK-P9-BE-NEXT: li r4, 29
5000 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
5001 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
5002 ; CHECK-P9-BE-NEXT: ori r4, r4, 4097
5003 ; CHECK-P9-BE-NEXT: or r3, r3, r4
5004 ; CHECK-P9-BE-NEXT: lbz r3, 7(r3)
5005 ; CHECK-P9-BE-NEXT: blr
5007 ; CHECK-P8-LE-LABEL: ld_not_disjoint64_uint8_t_uint64_t:
5008 ; CHECK-P8-LE: # %bb.0: # %entry
5009 ; CHECK-P8-LE-NEXT: li r4, 29
5010 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
5011 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
5012 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
5013 ; CHECK-P8-LE-NEXT: or r3, r3, r4
5014 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
5015 ; CHECK-P8-LE-NEXT: blr
5017 ; CHECK-P8-BE-LABEL: ld_not_disjoint64_uint8_t_uint64_t:
5018 ; CHECK-P8-BE: # %bb.0: # %entry
5019 ; CHECK-P8-BE-NEXT: li r4, 29
5020 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
5021 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
5022 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
5023 ; CHECK-P8-BE-NEXT: or r3, r3, r4
5024 ; CHECK-P8-BE-NEXT: lbz r3, 7(r3)
5025 ; CHECK-P8-BE-NEXT: blr
5027 %or = or i64 %ptr, 1000000000001
5028 %0 = inttoptr i64 %or to i64*
5029 %1 = load i64, i64* %0, align 8
5030 %conv = trunc i64 %1 to i8
5034 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5035 define dso_local zeroext i8 @ld_disjoint_unalign64_uint8_t_uint64_t(i64 %ptr) {
5036 ; CHECK-P10-LE-LABEL: ld_disjoint_unalign64_uint8_t_uint64_t:
5037 ; CHECK-P10-LE: # %bb.0: # %entry
5038 ; CHECK-P10-LE-NEXT: pli r4, 232
5039 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
5040 ; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
5041 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
5042 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r5
5043 ; CHECK-P10-LE-NEXT: blr
5045 ; CHECK-P10-BE-LABEL: ld_disjoint_unalign64_uint8_t_uint64_t:
5046 ; CHECK-P10-BE: # %bb.0: # %entry
5047 ; CHECK-P10-BE-NEXT: pli r4, 232
5048 ; CHECK-P10-BE-NEXT: pli r5, 3567587336
5049 ; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
5050 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
5051 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
5052 ; CHECK-P10-BE-NEXT: blr
5054 ; CHECK-P9-LE-LABEL: ld_disjoint_unalign64_uint8_t_uint64_t:
5055 ; CHECK-P9-LE: # %bb.0: # %entry
5056 ; CHECK-P9-LE-NEXT: li r4, 29
5057 ; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
5058 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
5059 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
5060 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
5061 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
5062 ; CHECK-P9-LE-NEXT: blr
5064 ; CHECK-P9-BE-LABEL: ld_disjoint_unalign64_uint8_t_uint64_t:
5065 ; CHECK-P9-BE: # %bb.0: # %entry
5066 ; CHECK-P9-BE-NEXT: li r4, 29
5067 ; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
5068 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
5069 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
5070 ; CHECK-P9-BE-NEXT: ori r4, r4, 4104
5071 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
5072 ; CHECK-P9-BE-NEXT: blr
5074 ; CHECK-P8-LE-LABEL: ld_disjoint_unalign64_uint8_t_uint64_t:
5075 ; CHECK-P8-LE: # %bb.0: # %entry
5076 ; CHECK-P8-LE-NEXT: li r4, 29
5077 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
5078 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
5079 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
5080 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
5081 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
5082 ; CHECK-P8-LE-NEXT: blr
5084 ; CHECK-P8-BE-LABEL: ld_disjoint_unalign64_uint8_t_uint64_t:
5085 ; CHECK-P8-BE: # %bb.0: # %entry
5086 ; CHECK-P8-BE-NEXT: li r4, 29
5087 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
5088 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
5089 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
5090 ; CHECK-P8-BE-NEXT: ori r4, r4, 4104
5091 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
5092 ; CHECK-P8-BE-NEXT: blr
5094 %and = and i64 %ptr, -1099511627776
5095 %or = or i64 %and, 1000000000001
5096 %0 = inttoptr i64 %or to i64*
5097 %1 = load i64, i64* %0, align 8
5098 %conv = trunc i64 %1 to i8
5102 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5103 define dso_local zeroext i8 @ld_disjoint_align64_uint8_t_uint64_t(i64 %ptr) {
5104 ; CHECK-P10-LE-LABEL: ld_disjoint_align64_uint8_t_uint64_t:
5105 ; CHECK-P10-LE: # %bb.0: # %entry
5106 ; CHECK-P10-LE-NEXT: pli r4, 244140625
5107 ; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
5108 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
5109 ; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
5110 ; CHECK-P10-LE-NEXT: blr
5112 ; CHECK-P10-BE-LABEL: ld_disjoint_align64_uint8_t_uint64_t:
5113 ; CHECK-P10-BE: # %bb.0: # %entry
5114 ; CHECK-P10-BE-NEXT: pli r4, 232
5115 ; CHECK-P10-BE-NEXT: pli r5, 3567587335
5116 ; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
5117 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
5118 ; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
5119 ; CHECK-P10-BE-NEXT: blr
5121 ; CHECK-P9-LE-LABEL: ld_disjoint_align64_uint8_t_uint64_t:
5122 ; CHECK-P9-LE: # %bb.0: # %entry
5123 ; CHECK-P9-LE-NEXT: lis r4, 3725
5124 ; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
5125 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
5126 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
5127 ; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
5128 ; CHECK-P9-LE-NEXT: blr
5130 ; CHECK-P9-BE-LABEL: ld_disjoint_align64_uint8_t_uint64_t:
5131 ; CHECK-P9-BE: # %bb.0: # %entry
5132 ; CHECK-P9-BE-NEXT: li r4, 29
5133 ; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
5134 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
5135 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
5136 ; CHECK-P9-BE-NEXT: ori r4, r4, 4103
5137 ; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
5138 ; CHECK-P9-BE-NEXT: blr
5140 ; CHECK-P8-LE-LABEL: ld_disjoint_align64_uint8_t_uint64_t:
5141 ; CHECK-P8-LE: # %bb.0: # %entry
5142 ; CHECK-P8-LE-NEXT: lis r4, 3725
5143 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
5144 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
5145 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
5146 ; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
5147 ; CHECK-P8-LE-NEXT: blr
5149 ; CHECK-P8-BE-LABEL: ld_disjoint_align64_uint8_t_uint64_t:
5150 ; CHECK-P8-BE: # %bb.0: # %entry
5151 ; CHECK-P8-BE-NEXT: li r4, 29
5152 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
5153 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
5154 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
5155 ; CHECK-P8-BE-NEXT: ori r4, r4, 4103
5156 ; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
5157 ; CHECK-P8-BE-NEXT: blr
5159 %and = and i64 %ptr, -1099511627776
5160 %or = or i64 %and, 1000000000000
5161 %0 = inttoptr i64 %or to i64*
5162 %1 = load i64, i64* %0, align 4096
5163 %conv = trunc i64 %1 to i8
5167 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5168 define dso_local zeroext i8 @ld_cst_align16_uint8_t_uint64_t() {
5169 ; CHECK-LE-LABEL: ld_cst_align16_uint8_t_uint64_t:
5170 ; CHECK-LE: # %bb.0: # %entry
5171 ; CHECK-LE-NEXT: lbz r3, 4080(0)
5172 ; CHECK-LE-NEXT: blr
5174 ; CHECK-BE-LABEL: ld_cst_align16_uint8_t_uint64_t:
5175 ; CHECK-BE: # %bb.0: # %entry
5176 ; CHECK-BE-NEXT: lbz r3, 4087(0)
5177 ; CHECK-BE-NEXT: blr
5179 %0 = load i64, i64* inttoptr (i64 4080 to i64*), align 16
5180 %conv = trunc i64 %0 to i8
5184 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5185 define dso_local zeroext i8 @ld_cst_align32_uint8_t_uint64_t() {
5186 ; CHECK-LE-LABEL: ld_cst_align32_uint8_t_uint64_t:
5187 ; CHECK-LE: # %bb.0: # %entry
5188 ; CHECK-LE-NEXT: lis r3, 153
5189 ; CHECK-LE-NEXT: lbz r3, -27108(r3)
5190 ; CHECK-LE-NEXT: blr
5192 ; CHECK-BE-LABEL: ld_cst_align32_uint8_t_uint64_t:
5193 ; CHECK-BE: # %bb.0: # %entry
5194 ; CHECK-BE-NEXT: lis r3, 153
5195 ; CHECK-BE-NEXT: lbz r3, -27101(r3)
5196 ; CHECK-BE-NEXT: blr
5198 %0 = load i64, i64* inttoptr (i64 9999900 to i64*), align 8
5199 %conv = trunc i64 %0 to i8
5203 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5204 define dso_local zeroext i8 @ld_cst_unalign64_uint8_t_uint64_t() {
5205 ; CHECK-P10-LE-LABEL: ld_cst_unalign64_uint8_t_uint64_t:
5206 ; CHECK-P10-LE: # %bb.0: # %entry
5207 ; CHECK-P10-LE-NEXT: pli r3, 232
5208 ; CHECK-P10-LE-NEXT: pli r4, 3567587329
5209 ; CHECK-P10-LE-NEXT: rldimi r4, r3, 32, 0
5210 ; CHECK-P10-LE-NEXT: lbz r3, 0(r4)
5211 ; CHECK-P10-LE-NEXT: blr
5213 ; CHECK-P10-BE-LABEL: ld_cst_unalign64_uint8_t_uint64_t:
5214 ; CHECK-P10-BE: # %bb.0: # %entry
5215 ; CHECK-P10-BE-NEXT: pli r3, 232
5216 ; CHECK-P10-BE-NEXT: pli r4, 3567587336
5217 ; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
5218 ; CHECK-P10-BE-NEXT: lbz r3, 0(r4)
5219 ; CHECK-P10-BE-NEXT: blr
5221 ; CHECK-P9-LE-LABEL: ld_cst_unalign64_uint8_t_uint64_t:
5222 ; CHECK-P9-LE: # %bb.0: # %entry
5223 ; CHECK-P9-LE-NEXT: li r3, 29
5224 ; CHECK-P9-LE-NEXT: rldic r3, r3, 35, 24
5225 ; CHECK-P9-LE-NEXT: oris r3, r3, 54437
5226 ; CHECK-P9-LE-NEXT: ori r3, r3, 4097
5227 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
5228 ; CHECK-P9-LE-NEXT: blr
5230 ; CHECK-P9-BE-LABEL: ld_cst_unalign64_uint8_t_uint64_t:
5231 ; CHECK-P9-BE: # %bb.0: # %entry
5232 ; CHECK-P9-BE-NEXT: li r3, 29
5233 ; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
5234 ; CHECK-P9-BE-NEXT: oris r3, r3, 54437
5235 ; CHECK-P9-BE-NEXT: ori r3, r3, 4104
5236 ; CHECK-P9-BE-NEXT: lbz r3, 0(r3)
5237 ; CHECK-P9-BE-NEXT: blr
5239 ; CHECK-P8-LE-LABEL: ld_cst_unalign64_uint8_t_uint64_t:
5240 ; CHECK-P8-LE: # %bb.0: # %entry
5241 ; CHECK-P8-LE-NEXT: li r3, 29
5242 ; CHECK-P8-LE-NEXT: rldic r3, r3, 35, 24
5243 ; CHECK-P8-LE-NEXT: oris r3, r3, 54437
5244 ; CHECK-P8-LE-NEXT: ori r3, r3, 4097
5245 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
5246 ; CHECK-P8-LE-NEXT: blr
5248 ; CHECK-P8-BE-LABEL: ld_cst_unalign64_uint8_t_uint64_t:
5249 ; CHECK-P8-BE: # %bb.0: # %entry
5250 ; CHECK-P8-BE-NEXT: li r3, 29
5251 ; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
5252 ; CHECK-P8-BE-NEXT: oris r3, r3, 54437
5253 ; CHECK-P8-BE-NEXT: ori r3, r3, 4104
5254 ; CHECK-P8-BE-NEXT: lbz r3, 0(r3)
5255 ; CHECK-P8-BE-NEXT: blr
5257 %0 = load i64, i64* inttoptr (i64 1000000000001 to i64*), align 8
5258 %conv = trunc i64 %0 to i8
5262 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5263 define dso_local zeroext i8 @ld_cst_align64_uint8_t_uint64_t() {
5264 ; CHECK-P10-LE-LABEL: ld_cst_align64_uint8_t_uint64_t:
5265 ; CHECK-P10-LE: # %bb.0: # %entry
5266 ; CHECK-P10-LE-NEXT: pli r3, 244140625
5267 ; CHECK-P10-LE-NEXT: rldic r3, r3, 12, 24
5268 ; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
5269 ; CHECK-P10-LE-NEXT: blr
5271 ; CHECK-P10-BE-LABEL: ld_cst_align64_uint8_t_uint64_t:
5272 ; CHECK-P10-BE: # %bb.0: # %entry
5273 ; CHECK-P10-BE-NEXT: pli r3, 232
5274 ; CHECK-P10-BE-NEXT: pli r4, 3567587335
5275 ; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
5276 ; CHECK-P10-BE-NEXT: lbz r3, 0(r4)
5277 ; CHECK-P10-BE-NEXT: blr
5279 ; CHECK-P9-LE-LABEL: ld_cst_align64_uint8_t_uint64_t:
5280 ; CHECK-P9-LE: # %bb.0: # %entry
5281 ; CHECK-P9-LE-NEXT: lis r3, 3725
5282 ; CHECK-P9-LE-NEXT: ori r3, r3, 19025
5283 ; CHECK-P9-LE-NEXT: rldic r3, r3, 12, 24
5284 ; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
5285 ; CHECK-P9-LE-NEXT: blr
5287 ; CHECK-P9-BE-LABEL: ld_cst_align64_uint8_t_uint64_t:
5288 ; CHECK-P9-BE: # %bb.0: # %entry
5289 ; CHECK-P9-BE-NEXT: li r3, 29
5290 ; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
5291 ; CHECK-P9-BE-NEXT: oris r3, r3, 54437
5292 ; CHECK-P9-BE-NEXT: ori r3, r3, 4103
5293 ; CHECK-P9-BE-NEXT: lbz r3, 0(r3)
5294 ; CHECK-P9-BE-NEXT: blr
5296 ; CHECK-P8-LE-LABEL: ld_cst_align64_uint8_t_uint64_t:
5297 ; CHECK-P8-LE: # %bb.0: # %entry
5298 ; CHECK-P8-LE-NEXT: lis r3, 3725
5299 ; CHECK-P8-LE-NEXT: ori r3, r3, 19025
5300 ; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
5301 ; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
5302 ; CHECK-P8-LE-NEXT: blr
5304 ; CHECK-P8-BE-LABEL: ld_cst_align64_uint8_t_uint64_t:
5305 ; CHECK-P8-BE: # %bb.0: # %entry
5306 ; CHECK-P8-BE-NEXT: li r3, 29
5307 ; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
5308 ; CHECK-P8-BE-NEXT: oris r3, r3, 54437
5309 ; CHECK-P8-BE-NEXT: ori r3, r3, 4103
5310 ; CHECK-P8-BE-NEXT: lbz r3, 0(r3)
5311 ; CHECK-P8-BE-NEXT: blr
5313 %0 = load i64, i64* inttoptr (i64 1000000000000 to i64*), align 4096
5314 %conv = trunc i64 %0 to i8
5318 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5319 define dso_local zeroext i8 @ld_0_uint8_t_float(i64 %ptr) {
5320 ; CHECK-LABEL: ld_0_uint8_t_float:
5321 ; CHECK: # %bb.0: # %entry
5322 ; CHECK-NEXT: lfs f0, 0(r3)
5323 ; CHECK-NEXT: xscvdpsxws f0, f0
5324 ; CHECK-NEXT: mffprwz r3, f0
5325 ; CHECK-NEXT: clrldi r3, r3, 32
5328 %0 = inttoptr i64 %ptr to float*
5329 %1 = load float, float* %0, align 4
5330 %conv = fptoui float %1 to i8
5334 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5335 define dso_local zeroext i8 @ld_align16_uint8_t_float(i8* nocapture readonly %ptr) {
5336 ; CHECK-LABEL: ld_align16_uint8_t_float:
5337 ; CHECK: # %bb.0: # %entry
5338 ; CHECK-NEXT: lfs f0, 8(r3)
5339 ; CHECK-NEXT: xscvdpsxws f0, f0
5340 ; CHECK-NEXT: mffprwz r3, f0
5341 ; CHECK-NEXT: clrldi r3, r3, 32
5344 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
5345 %0 = bitcast i8* %add.ptr to float*
5346 %1 = load float, float* %0, align 4
5347 %conv = fptoui float %1 to i8
5351 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5352 define dso_local zeroext i8 @ld_align32_uint8_t_float(i8* nocapture readonly %ptr) {
5353 ; CHECK-P10-LABEL: ld_align32_uint8_t_float:
5354 ; CHECK-P10: # %bb.0: # %entry
5355 ; CHECK-P10-NEXT: pli r4, 99999000
5356 ; CHECK-P10-NEXT: lfsx f0, r3, r4
5357 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5358 ; CHECK-P10-NEXT: mffprwz r3, f0
5359 ; CHECK-P10-NEXT: clrldi r3, r3, 32
5360 ; CHECK-P10-NEXT: blr
5362 ; CHECK-PREP10-LABEL: ld_align32_uint8_t_float:
5363 ; CHECK-PREP10: # %bb.0: # %entry
5364 ; CHECK-PREP10-NEXT: lis r4, 1525
5365 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
5366 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
5367 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5368 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5369 ; CHECK-PREP10-NEXT: clrldi r3, r3, 32
5370 ; CHECK-PREP10-NEXT: blr
5372 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
5373 %0 = bitcast i8* %add.ptr to float*
5374 %1 = load float, float* %0, align 4
5375 %conv = fptoui float %1 to i8
5379 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5380 define dso_local zeroext i8 @ld_unalign64_uint8_t_float(i8* nocapture readonly %ptr) {
5381 ; CHECK-P10-LABEL: ld_unalign64_uint8_t_float:
5382 ; CHECK-P10: # %bb.0: # %entry
5383 ; CHECK-P10-NEXT: pli r4, 232
5384 ; CHECK-P10-NEXT: pli r5, 3567587329
5385 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
5386 ; CHECK-P10-NEXT: lfsx f0, r3, r5
5387 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5388 ; CHECK-P10-NEXT: mffprwz r3, f0
5389 ; CHECK-P10-NEXT: clrldi r3, r3, 32
5390 ; CHECK-P10-NEXT: blr
5392 ; CHECK-PREP10-LABEL: ld_unalign64_uint8_t_float:
5393 ; CHECK-PREP10: # %bb.0: # %entry
5394 ; CHECK-PREP10-NEXT: li r4, 29
5395 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
5396 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
5397 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
5398 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
5399 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5400 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5401 ; CHECK-PREP10-NEXT: clrldi r3, r3, 32
5402 ; CHECK-PREP10-NEXT: blr
5404 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
5405 %0 = bitcast i8* %add.ptr to float*
5406 %1 = load float, float* %0, align 4
5407 %conv = fptoui float %1 to i8
5411 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5412 define dso_local zeroext i8 @ld_align64_uint8_t_float(i8* nocapture readonly %ptr) {
5413 ; CHECK-P10-LABEL: ld_align64_uint8_t_float:
5414 ; CHECK-P10: # %bb.0: # %entry
5415 ; CHECK-P10-NEXT: pli r4, 244140625
5416 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5417 ; CHECK-P10-NEXT: lfsx f0, r3, r4
5418 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5419 ; CHECK-P10-NEXT: mffprwz r3, f0
5420 ; CHECK-P10-NEXT: clrldi r3, r3, 32
5421 ; CHECK-P10-NEXT: blr
5423 ; CHECK-PREP10-LABEL: ld_align64_uint8_t_float:
5424 ; CHECK-PREP10: # %bb.0: # %entry
5425 ; CHECK-PREP10-NEXT: lis r4, 3725
5426 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
5427 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
5428 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
5429 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5430 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5431 ; CHECK-PREP10-NEXT: clrldi r3, r3, 32
5432 ; CHECK-PREP10-NEXT: blr
5434 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
5435 %0 = bitcast i8* %add.ptr to float*
5436 %1 = load float, float* %0, align 4
5437 %conv = fptoui float %1 to i8
5441 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5442 define dso_local zeroext i8 @ld_reg_uint8_t_float(i8* nocapture readonly %ptr, i64 %off) {
5443 ; CHECK-LABEL: ld_reg_uint8_t_float:
5444 ; CHECK: # %bb.0: # %entry
5445 ; CHECK-NEXT: lfsx f0, r3, r4
5446 ; CHECK-NEXT: xscvdpsxws f0, f0
5447 ; CHECK-NEXT: mffprwz r3, f0
5448 ; CHECK-NEXT: clrldi r3, r3, 32
5451 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
5452 %0 = bitcast i8* %add.ptr to float*
5453 %1 = load float, float* %0, align 4
5454 %conv = fptoui float %1 to i8
5458 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5459 define dso_local zeroext i8 @ld_or_uint8_t_float(i64 %ptr, i8 zeroext %off) {
5460 ; CHECK-LABEL: ld_or_uint8_t_float:
5461 ; CHECK: # %bb.0: # %entry
5462 ; CHECK-NEXT: or r3, r4, r3
5463 ; CHECK-NEXT: lfs f0, 0(r3)
5464 ; CHECK-NEXT: xscvdpsxws f0, f0
5465 ; CHECK-NEXT: mffprwz r3, f0
5466 ; CHECK-NEXT: clrldi r3, r3, 32
5469 %conv = zext i8 %off to i64
5470 %or = or i64 %conv, %ptr
5471 %0 = inttoptr i64 %or to float*
5472 %1 = load float, float* %0, align 4
5473 %conv1 = fptoui float %1 to i8
5477 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5478 define dso_local zeroext i8 @ld_not_disjoint16_uint8_t_float(i64 %ptr) {
5479 ; CHECK-LABEL: ld_not_disjoint16_uint8_t_float:
5480 ; CHECK: # %bb.0: # %entry
5481 ; CHECK-NEXT: ori r3, r3, 6
5482 ; CHECK-NEXT: lfs f0, 0(r3)
5483 ; CHECK-NEXT: xscvdpsxws f0, f0
5484 ; CHECK-NEXT: mffprwz r3, f0
5485 ; CHECK-NEXT: clrldi r3, r3, 32
5488 %or = or i64 %ptr, 6
5489 %0 = inttoptr i64 %or to float*
5490 %1 = load float, float* %0, align 4
5491 %conv = fptoui float %1 to i8
5495 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5496 define dso_local zeroext i8 @ld_disjoint_align16_uint8_t_float(i64 %ptr) {
5497 ; CHECK-LABEL: ld_disjoint_align16_uint8_t_float:
5498 ; CHECK: # %bb.0: # %entry
5499 ; CHECK-NEXT: rldicr r3, r3, 0, 51
5500 ; CHECK-NEXT: lfs f0, 24(r3)
5501 ; CHECK-NEXT: xscvdpsxws f0, f0
5502 ; CHECK-NEXT: mffprwz r3, f0
5503 ; CHECK-NEXT: clrldi r3, r3, 32
5506 %and = and i64 %ptr, -4096
5507 %or = or i64 %and, 24
5508 %0 = inttoptr i64 %or to float*
5509 %1 = load float, float* %0, align 8
5510 %conv = fptoui float %1 to i8
5514 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5515 define dso_local zeroext i8 @ld_not_disjoint32_uint8_t_float(i64 %ptr) {
5516 ; CHECK-LABEL: ld_not_disjoint32_uint8_t_float:
5517 ; CHECK: # %bb.0: # %entry
5518 ; CHECK-NEXT: ori r3, r3, 34463
5519 ; CHECK-NEXT: oris r3, r3, 1
5520 ; CHECK-NEXT: lfs f0, 0(r3)
5521 ; CHECK-NEXT: xscvdpsxws f0, f0
5522 ; CHECK-NEXT: mffprwz r3, f0
5523 ; CHECK-NEXT: clrldi r3, r3, 32
5526 %or = or i64 %ptr, 99999
5527 %0 = inttoptr i64 %or to float*
5528 %1 = load float, float* %0, align 4
5529 %conv = fptoui float %1 to i8
5533 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5534 define dso_local zeroext i8 @ld_disjoint_align32_uint8_t_float(i64 %ptr) {
5535 ; CHECK-P10-LABEL: ld_disjoint_align32_uint8_t_float:
5536 ; CHECK-P10: # %bb.0: # %entry
5537 ; CHECK-P10-NEXT: lis r4, -15264
5538 ; CHECK-P10-NEXT: and r3, r3, r4
5539 ; CHECK-P10-NEXT: pli r4, 999990000
5540 ; CHECK-P10-NEXT: lfsx f0, r3, r4
5541 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5542 ; CHECK-P10-NEXT: mffprwz r3, f0
5543 ; CHECK-P10-NEXT: clrldi r3, r3, 32
5544 ; CHECK-P10-NEXT: blr
5546 ; CHECK-P9-LABEL: ld_disjoint_align32_uint8_t_float:
5547 ; CHECK-P9: # %bb.0: # %entry
5548 ; CHECK-P9-NEXT: lis r4, -15264
5549 ; CHECK-P9-NEXT: and r3, r3, r4
5550 ; CHECK-P9-NEXT: lis r4, 15258
5551 ; CHECK-P9-NEXT: ori r4, r4, 41712
5552 ; CHECK-P9-NEXT: lfsx f0, r3, r4
5553 ; CHECK-P9-NEXT: xscvdpsxws f0, f0
5554 ; CHECK-P9-NEXT: mffprwz r3, f0
5555 ; CHECK-P9-NEXT: clrldi r3, r3, 32
5556 ; CHECK-P9-NEXT: blr
5558 ; CHECK-P8-LABEL: ld_disjoint_align32_uint8_t_float:
5559 ; CHECK-P8: # %bb.0: # %entry
5560 ; CHECK-P8-NEXT: lis r4, -15264
5561 ; CHECK-P8-NEXT: lis r5, 15258
5562 ; CHECK-P8-NEXT: and r3, r3, r4
5563 ; CHECK-P8-NEXT: ori r4, r5, 41712
5564 ; CHECK-P8-NEXT: lfsx f0, r3, r4
5565 ; CHECK-P8-NEXT: xscvdpsxws f0, f0
5566 ; CHECK-P8-NEXT: mffprwz r3, f0
5567 ; CHECK-P8-NEXT: clrldi r3, r3, 32
5568 ; CHECK-P8-NEXT: blr
5570 %and = and i64 %ptr, -1000341504
5571 %or = or i64 %and, 999990000
5572 %0 = inttoptr i64 %or to float*
5573 %1 = load float, float* %0, align 16
5574 %conv = fptoui float %1 to i8
5578 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5579 define dso_local zeroext i8 @ld_not_disjoint64_uint8_t_float(i64 %ptr) {
5580 ; CHECK-P10-LABEL: ld_not_disjoint64_uint8_t_float:
5581 ; CHECK-P10: # %bb.0: # %entry
5582 ; CHECK-P10-NEXT: pli r4, 232
5583 ; CHECK-P10-NEXT: pli r5, 3567587329
5584 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
5585 ; CHECK-P10-NEXT: or r3, r3, r5
5586 ; CHECK-P10-NEXT: lfs f0, 0(r3)
5587 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5588 ; CHECK-P10-NEXT: mffprwz r3, f0
5589 ; CHECK-P10-NEXT: clrldi r3, r3, 32
5590 ; CHECK-P10-NEXT: blr
5592 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint8_t_float:
5593 ; CHECK-PREP10: # %bb.0: # %entry
5594 ; CHECK-PREP10-NEXT: li r4, 29
5595 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
5596 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
5597 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
5598 ; CHECK-PREP10-NEXT: or r3, r3, r4
5599 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
5600 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5601 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5602 ; CHECK-PREP10-NEXT: clrldi r3, r3, 32
5603 ; CHECK-PREP10-NEXT: blr
5605 %or = or i64 %ptr, 1000000000001
5606 %0 = inttoptr i64 %or to float*
5607 %1 = load float, float* %0, align 4
5608 %conv = fptoui float %1 to i8
5612 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5613 define dso_local zeroext i8 @ld_disjoint_unalign64_uint8_t_float(i64 %ptr) {
5614 ; CHECK-P10-LABEL: ld_disjoint_unalign64_uint8_t_float:
5615 ; CHECK-P10: # %bb.0: # %entry
5616 ; CHECK-P10-NEXT: pli r4, 232
5617 ; CHECK-P10-NEXT: pli r5, 3567587329
5618 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
5619 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
5620 ; CHECK-P10-NEXT: lfsx f0, r3, r5
5621 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5622 ; CHECK-P10-NEXT: mffprwz r3, f0
5623 ; CHECK-P10-NEXT: clrldi r3, r3, 32
5624 ; CHECK-P10-NEXT: blr
5626 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint8_t_float:
5627 ; CHECK-PREP10: # %bb.0: # %entry
5628 ; CHECK-PREP10-NEXT: li r4, 29
5629 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
5630 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
5631 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
5632 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
5633 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
5634 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5635 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5636 ; CHECK-PREP10-NEXT: clrldi r3, r3, 32
5637 ; CHECK-PREP10-NEXT: blr
5639 %and = and i64 %ptr, -1099511627776
5640 %or = or i64 %and, 1000000000001
5641 %0 = inttoptr i64 %or to float*
5642 %1 = load float, float* %0, align 4
5643 %conv = fptoui float %1 to i8
5647 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5648 define dso_local zeroext i8 @ld_disjoint_align64_uint8_t_float(i64 %ptr) {
5649 ; CHECK-P10-LABEL: ld_disjoint_align64_uint8_t_float:
5650 ; CHECK-P10: # %bb.0: # %entry
5651 ; CHECK-P10-NEXT: pli r4, 244140625
5652 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
5653 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5654 ; CHECK-P10-NEXT: lfsx f0, r3, r4
5655 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5656 ; CHECK-P10-NEXT: mffprwz r3, f0
5657 ; CHECK-P10-NEXT: clrldi r3, r3, 32
5658 ; CHECK-P10-NEXT: blr
5660 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint8_t_float:
5661 ; CHECK-PREP10: # %bb.0: # %entry
5662 ; CHECK-PREP10-NEXT: lis r4, 3725
5663 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
5664 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
5665 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
5666 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
5667 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5668 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5669 ; CHECK-PREP10-NEXT: clrldi r3, r3, 32
5670 ; CHECK-PREP10-NEXT: blr
5672 %and = and i64 %ptr, -1099511627776
5673 %or = or i64 %and, 1000000000000
5674 %0 = inttoptr i64 %or to float*
5675 %1 = load float, float* %0, align 4096
5676 %conv = fptoui float %1 to i8
5680 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5681 define dso_local zeroext i8 @ld_cst_align16_uint8_t_float() {
5682 ; CHECK-LABEL: ld_cst_align16_uint8_t_float:
5683 ; CHECK: # %bb.0: # %entry
5684 ; CHECK-NEXT: lfs f0, 4080(0)
5685 ; CHECK-NEXT: xscvdpsxws f0, f0
5686 ; CHECK-NEXT: mffprwz r3, f0
5687 ; CHECK-NEXT: clrldi r3, r3, 32
5690 %0 = load float, float* inttoptr (i64 4080 to float*), align 16
5691 %conv = fptoui float %0 to i8
5695 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5696 define dso_local zeroext i8 @ld_cst_align32_uint8_t_float() {
5697 ; CHECK-LABEL: ld_cst_align32_uint8_t_float:
5698 ; CHECK: # %bb.0: # %entry
5699 ; CHECK-NEXT: lis r3, 153
5700 ; CHECK-NEXT: lfs f0, -27108(r3)
5701 ; CHECK-NEXT: xscvdpsxws f0, f0
5702 ; CHECK-NEXT: mffprwz r3, f0
5703 ; CHECK-NEXT: clrldi r3, r3, 32
5706 %0 = load float, float* inttoptr (i64 9999900 to float*), align 4
5707 %conv = fptoui float %0 to i8
5711 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5712 define dso_local zeroext i8 @ld_cst_unalign64_uint8_t_float() {
5713 ; CHECK-P10-LABEL: ld_cst_unalign64_uint8_t_float:
5714 ; CHECK-P10: # %bb.0: # %entry
5715 ; CHECK-P10-NEXT: pli r3, 232
5716 ; CHECK-P10-NEXT: pli r4, 3567587329
5717 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
5718 ; CHECK-P10-NEXT: lfs f0, 0(r4)
5719 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5720 ; CHECK-P10-NEXT: mffprwz r3, f0
5721 ; CHECK-P10-NEXT: clrldi r3, r3, 32
5722 ; CHECK-P10-NEXT: blr
5724 ; CHECK-PREP10-LABEL: ld_cst_unalign64_uint8_t_float:
5725 ; CHECK-PREP10: # %bb.0: # %entry
5726 ; CHECK-PREP10-NEXT: li r3, 29
5727 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
5728 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
5729 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
5730 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
5731 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5732 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5733 ; CHECK-PREP10-NEXT: clrldi r3, r3, 32
5734 ; CHECK-PREP10-NEXT: blr
5736 %0 = load float, float* inttoptr (i64 1000000000001 to float*), align 4
5737 %conv = fptoui float %0 to i8
5741 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5742 define dso_local zeroext i8 @ld_cst_align64_uint8_t_float() {
5743 ; CHECK-P10-LABEL: ld_cst_align64_uint8_t_float:
5744 ; CHECK-P10: # %bb.0: # %entry
5745 ; CHECK-P10-NEXT: pli r3, 244140625
5746 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
5747 ; CHECK-P10-NEXT: lfs f0, 0(r3)
5748 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5749 ; CHECK-P10-NEXT: mffprwz r3, f0
5750 ; CHECK-P10-NEXT: clrldi r3, r3, 32
5751 ; CHECK-P10-NEXT: blr
5753 ; CHECK-PREP10-LABEL: ld_cst_align64_uint8_t_float:
5754 ; CHECK-PREP10: # %bb.0: # %entry
5755 ; CHECK-PREP10-NEXT: lis r3, 3725
5756 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
5757 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
5758 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
5759 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5760 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5761 ; CHECK-PREP10-NEXT: clrldi r3, r3, 32
5762 ; CHECK-PREP10-NEXT: blr
5764 %0 = load float, float* inttoptr (i64 1000000000000 to float*), align 4096
5765 %conv = fptoui float %0 to i8
5769 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5770 define dso_local zeroext i8 @ld_0_uint8_t_double(i64 %ptr) {
5771 ; CHECK-LABEL: ld_0_uint8_t_double:
5772 ; CHECK: # %bb.0: # %entry
5773 ; CHECK-NEXT: lfd f0, 0(r3)
5774 ; CHECK-NEXT: xscvdpsxws f0, f0
5775 ; CHECK-NEXT: mffprwz r3, f0
5776 ; CHECK-NEXT: clrldi r3, r3, 32
5779 %0 = inttoptr i64 %ptr to double*
5780 %1 = load double, double* %0, align 8
5781 %conv = fptoui double %1 to i8
5785 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5786 define dso_local zeroext i8 @ld_align16_uint8_t_double(i8* nocapture readonly %ptr) {
5787 ; CHECK-LABEL: ld_align16_uint8_t_double:
5788 ; CHECK: # %bb.0: # %entry
5789 ; CHECK-NEXT: lfd f0, 8(r3)
5790 ; CHECK-NEXT: xscvdpsxws f0, f0
5791 ; CHECK-NEXT: mffprwz r3, f0
5792 ; CHECK-NEXT: clrldi r3, r3, 32
5795 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
5796 %0 = bitcast i8* %add.ptr to double*
5797 %1 = load double, double* %0, align 8
5798 %conv = fptoui double %1 to i8
5802 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5803 define dso_local zeroext i8 @ld_align32_uint8_t_double(i8* nocapture readonly %ptr) {
5804 ; CHECK-P10-LABEL: ld_align32_uint8_t_double:
5805 ; CHECK-P10: # %bb.0: # %entry
5806 ; CHECK-P10-NEXT: pli r4, 99999000
5807 ; CHECK-P10-NEXT: lfdx f0, r3, r4
5808 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5809 ; CHECK-P10-NEXT: mffprwz r3, f0
5810 ; CHECK-P10-NEXT: clrldi r3, r3, 32
5811 ; CHECK-P10-NEXT: blr
5813 ; CHECK-PREP10-LABEL: ld_align32_uint8_t_double:
5814 ; CHECK-PREP10: # %bb.0: # %entry
5815 ; CHECK-PREP10-NEXT: lis r4, 1525
5816 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
5817 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
5818 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5819 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5820 ; CHECK-PREP10-NEXT: clrldi r3, r3, 32
5821 ; CHECK-PREP10-NEXT: blr
5823 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
5824 %0 = bitcast i8* %add.ptr to double*
5825 %1 = load double, double* %0, align 8
5826 %conv = fptoui double %1 to i8
5830 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5831 define dso_local zeroext i8 @ld_unalign64_uint8_t_double(i8* nocapture readonly %ptr) {
5832 ; CHECK-P10-LABEL: ld_unalign64_uint8_t_double:
5833 ; CHECK-P10: # %bb.0: # %entry
5834 ; CHECK-P10-NEXT: pli r4, 232
5835 ; CHECK-P10-NEXT: pli r5, 3567587329
5836 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
5837 ; CHECK-P10-NEXT: lfdx f0, r3, r5
5838 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5839 ; CHECK-P10-NEXT: mffprwz r3, f0
5840 ; CHECK-P10-NEXT: clrldi r3, r3, 32
5841 ; CHECK-P10-NEXT: blr
5843 ; CHECK-PREP10-LABEL: ld_unalign64_uint8_t_double:
5844 ; CHECK-PREP10: # %bb.0: # %entry
5845 ; CHECK-PREP10-NEXT: li r4, 29
5846 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
5847 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
5848 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
5849 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
5850 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5851 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5852 ; CHECK-PREP10-NEXT: clrldi r3, r3, 32
5853 ; CHECK-PREP10-NEXT: blr
5855 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
5856 %0 = bitcast i8* %add.ptr to double*
5857 %1 = load double, double* %0, align 8
5858 %conv = fptoui double %1 to i8
5862 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5863 define dso_local zeroext i8 @ld_align64_uint8_t_double(i8* nocapture readonly %ptr) {
5864 ; CHECK-P10-LABEL: ld_align64_uint8_t_double:
5865 ; CHECK-P10: # %bb.0: # %entry
5866 ; CHECK-P10-NEXT: pli r4, 244140625
5867 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5868 ; CHECK-P10-NEXT: lfdx f0, r3, r4
5869 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5870 ; CHECK-P10-NEXT: mffprwz r3, f0
5871 ; CHECK-P10-NEXT: clrldi r3, r3, 32
5872 ; CHECK-P10-NEXT: blr
5874 ; CHECK-PREP10-LABEL: ld_align64_uint8_t_double:
5875 ; CHECK-PREP10: # %bb.0: # %entry
5876 ; CHECK-PREP10-NEXT: lis r4, 3725
5877 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
5878 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
5879 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
5880 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
5881 ; CHECK-PREP10-NEXT: mffprwz r3, f0
5882 ; CHECK-PREP10-NEXT: clrldi r3, r3, 32
5883 ; CHECK-PREP10-NEXT: blr
5885 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
5886 %0 = bitcast i8* %add.ptr to double*
5887 %1 = load double, double* %0, align 8
5888 %conv = fptoui double %1 to i8
5892 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5893 define dso_local zeroext i8 @ld_reg_uint8_t_double(i8* nocapture readonly %ptr, i64 %off) {
5894 ; CHECK-LABEL: ld_reg_uint8_t_double:
5895 ; CHECK: # %bb.0: # %entry
5896 ; CHECK-NEXT: lfdx f0, r3, r4
5897 ; CHECK-NEXT: xscvdpsxws f0, f0
5898 ; CHECK-NEXT: mffprwz r3, f0
5899 ; CHECK-NEXT: clrldi r3, r3, 32
5902 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
5903 %0 = bitcast i8* %add.ptr to double*
5904 %1 = load double, double* %0, align 8
5905 %conv = fptoui double %1 to i8
5909 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5910 define dso_local zeroext i8 @ld_or_uint8_t_double(i64 %ptr, i8 zeroext %off) {
5911 ; CHECK-LABEL: ld_or_uint8_t_double:
5912 ; CHECK: # %bb.0: # %entry
5913 ; CHECK-NEXT: or r3, r4, r3
5914 ; CHECK-NEXT: lfd f0, 0(r3)
5915 ; CHECK-NEXT: xscvdpsxws f0, f0
5916 ; CHECK-NEXT: mffprwz r3, f0
5917 ; CHECK-NEXT: clrldi r3, r3, 32
5920 %conv = zext i8 %off to i64
5921 %or = or i64 %conv, %ptr
5922 %0 = inttoptr i64 %or to double*
5923 %1 = load double, double* %0, align 8
5924 %conv1 = fptoui double %1 to i8
5928 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5929 define dso_local zeroext i8 @ld_not_disjoint16_uint8_t_double(i64 %ptr) {
5930 ; CHECK-LABEL: ld_not_disjoint16_uint8_t_double:
5931 ; CHECK: # %bb.0: # %entry
5932 ; CHECK-NEXT: ori r3, r3, 6
5933 ; CHECK-NEXT: lfd f0, 0(r3)
5934 ; CHECK-NEXT: xscvdpsxws f0, f0
5935 ; CHECK-NEXT: mffprwz r3, f0
5936 ; CHECK-NEXT: clrldi r3, r3, 32
5939 %or = or i64 %ptr, 6
5940 %0 = inttoptr i64 %or to double*
5941 %1 = load double, double* %0, align 8
5942 %conv = fptoui double %1 to i8
5946 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5947 define dso_local zeroext i8 @ld_disjoint_align16_uint8_t_double(i64 %ptr) {
5948 ; CHECK-LABEL: ld_disjoint_align16_uint8_t_double:
5949 ; CHECK: # %bb.0: # %entry
5950 ; CHECK-NEXT: rldicr r3, r3, 0, 51
5951 ; CHECK-NEXT: lfd f0, 24(r3)
5952 ; CHECK-NEXT: xscvdpsxws f0, f0
5953 ; CHECK-NEXT: mffprwz r3, f0
5954 ; CHECK-NEXT: clrldi r3, r3, 32
5957 %and = and i64 %ptr, -4096
5958 %or = or i64 %and, 24
5959 %0 = inttoptr i64 %or to double*
5960 %1 = load double, double* %0, align 8
5961 %conv = fptoui double %1 to i8
5965 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5966 define dso_local zeroext i8 @ld_not_disjoint32_uint8_t_double(i64 %ptr) {
5967 ; CHECK-LABEL: ld_not_disjoint32_uint8_t_double:
5968 ; CHECK: # %bb.0: # %entry
5969 ; CHECK-NEXT: ori r3, r3, 34463
5970 ; CHECK-NEXT: oris r3, r3, 1
5971 ; CHECK-NEXT: lfd f0, 0(r3)
5972 ; CHECK-NEXT: xscvdpsxws f0, f0
5973 ; CHECK-NEXT: mffprwz r3, f0
5974 ; CHECK-NEXT: clrldi r3, r3, 32
5977 %or = or i64 %ptr, 99999
5978 %0 = inttoptr i64 %or to double*
5979 %1 = load double, double* %0, align 8
5980 %conv = fptoui double %1 to i8
5984 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
5985 define dso_local zeroext i8 @ld_disjoint_align32_uint8_t_double(i64 %ptr) {
5986 ; CHECK-P10-LABEL: ld_disjoint_align32_uint8_t_double:
5987 ; CHECK-P10: # %bb.0: # %entry
5988 ; CHECK-P10-NEXT: lis r4, -15264
5989 ; CHECK-P10-NEXT: and r3, r3, r4
5990 ; CHECK-P10-NEXT: pli r4, 999990000
5991 ; CHECK-P10-NEXT: lfdx f0, r3, r4
5992 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
5993 ; CHECK-P10-NEXT: mffprwz r3, f0
5994 ; CHECK-P10-NEXT: clrldi r3, r3, 32
5995 ; CHECK-P10-NEXT: blr
5997 ; CHECK-P9-LABEL: ld_disjoint_align32_uint8_t_double:
5998 ; CHECK-P9: # %bb.0: # %entry
5999 ; CHECK-P9-NEXT: lis r4, -15264
6000 ; CHECK-P9-NEXT: and r3, r3, r4
6001 ; CHECK-P9-NEXT: lis r4, 15258
6002 ; CHECK-P9-NEXT: ori r4, r4, 41712
6003 ; CHECK-P9-NEXT: lfdx f0, r3, r4
6004 ; CHECK-P9-NEXT: xscvdpsxws f0, f0
6005 ; CHECK-P9-NEXT: mffprwz r3, f0
6006 ; CHECK-P9-NEXT: clrldi r3, r3, 32
6007 ; CHECK-P9-NEXT: blr
6009 ; CHECK-P8-LABEL: ld_disjoint_align32_uint8_t_double:
6010 ; CHECK-P8: # %bb.0: # %entry
6011 ; CHECK-P8-NEXT: lis r4, -15264
6012 ; CHECK-P8-NEXT: lis r5, 15258
6013 ; CHECK-P8-NEXT: and r3, r3, r4
6014 ; CHECK-P8-NEXT: ori r4, r5, 41712
6015 ; CHECK-P8-NEXT: lfdx f0, r3, r4
6016 ; CHECK-P8-NEXT: xscvdpsxws f0, f0
6017 ; CHECK-P8-NEXT: mffprwz r3, f0
6018 ; CHECK-P8-NEXT: clrldi r3, r3, 32
6019 ; CHECK-P8-NEXT: blr
6021 %and = and i64 %ptr, -1000341504
6022 %or = or i64 %and, 999990000
6023 %0 = inttoptr i64 %or to double*
6024 %1 = load double, double* %0, align 16
6025 %conv = fptoui double %1 to i8
6029 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
6030 define dso_local zeroext i8 @ld_not_disjoint64_uint8_t_double(i64 %ptr) {
6031 ; CHECK-P10-LABEL: ld_not_disjoint64_uint8_t_double:
6032 ; CHECK-P10: # %bb.0: # %entry
6033 ; CHECK-P10-NEXT: pli r4, 232
6034 ; CHECK-P10-NEXT: pli r5, 3567587329
6035 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
6036 ; CHECK-P10-NEXT: or r3, r3, r5
6037 ; CHECK-P10-NEXT: lfd f0, 0(r3)
6038 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
6039 ; CHECK-P10-NEXT: mffprwz r3, f0
6040 ; CHECK-P10-NEXT: clrldi r3, r3, 32
6041 ; CHECK-P10-NEXT: blr
6043 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint8_t_double:
6044 ; CHECK-PREP10: # %bb.0: # %entry
6045 ; CHECK-PREP10-NEXT: li r4, 29
6046 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
6047 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
6048 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
6049 ; CHECK-PREP10-NEXT: or r3, r3, r4
6050 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
6051 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
6052 ; CHECK-PREP10-NEXT: mffprwz r3, f0
6053 ; CHECK-PREP10-NEXT: clrldi r3, r3, 32
6054 ; CHECK-PREP10-NEXT: blr
6056 %or = or i64 %ptr, 1000000000001
6057 %0 = inttoptr i64 %or to double*
6058 %1 = load double, double* %0, align 8
6059 %conv = fptoui double %1 to i8
6063 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
6064 define dso_local zeroext i8 @ld_disjoint_unalign64_uint8_t_double(i64 %ptr) {
6065 ; CHECK-P10-LABEL: ld_disjoint_unalign64_uint8_t_double:
6066 ; CHECK-P10: # %bb.0: # %entry
6067 ; CHECK-P10-NEXT: pli r4, 232
6068 ; CHECK-P10-NEXT: pli r5, 3567587329
6069 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
6070 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
6071 ; CHECK-P10-NEXT: lfdx f0, r3, r5
6072 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
6073 ; CHECK-P10-NEXT: mffprwz r3, f0
6074 ; CHECK-P10-NEXT: clrldi r3, r3, 32
6075 ; CHECK-P10-NEXT: blr
6077 ; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint8_t_double:
6078 ; CHECK-PREP10: # %bb.0: # %entry
6079 ; CHECK-PREP10-NEXT: li r4, 29
6080 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
6081 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
6082 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
6083 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
6084 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
6085 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
6086 ; CHECK-PREP10-NEXT: mffprwz r3, f0
6087 ; CHECK-PREP10-NEXT: clrldi r3, r3, 32
6088 ; CHECK-PREP10-NEXT: blr
6090 %and = and i64 %ptr, -1099511627776
6091 %or = or i64 %and, 1000000000001
6092 %0 = inttoptr i64 %or to double*
6093 %1 = load double, double* %0, align 8
6094 %conv = fptoui double %1 to i8
6098 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
6099 define dso_local zeroext i8 @ld_disjoint_align64_uint8_t_double(i64 %ptr) {
6100 ; CHECK-P10-LABEL: ld_disjoint_align64_uint8_t_double:
6101 ; CHECK-P10: # %bb.0: # %entry
6102 ; CHECK-P10-NEXT: pli r4, 244140625
6103 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
6104 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6105 ; CHECK-P10-NEXT: lfdx f0, r3, r4
6106 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
6107 ; CHECK-P10-NEXT: mffprwz r3, f0
6108 ; CHECK-P10-NEXT: clrldi r3, r3, 32
6109 ; CHECK-P10-NEXT: blr
6111 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint8_t_double:
6112 ; CHECK-PREP10: # %bb.0: # %entry
6113 ; CHECK-PREP10-NEXT: lis r4, 3725
6114 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
6115 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
6116 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
6117 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
6118 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
6119 ; CHECK-PREP10-NEXT: mffprwz r3, f0
6120 ; CHECK-PREP10-NEXT: clrldi r3, r3, 32
6121 ; CHECK-PREP10-NEXT: blr
6123 %and = and i64 %ptr, -1099511627776
6124 %or = or i64 %and, 1000000000000
6125 %0 = inttoptr i64 %or to double*
6126 %1 = load double, double* %0, align 4096
6127 %conv = fptoui double %1 to i8
6131 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
6132 define dso_local zeroext i8 @ld_cst_align16_uint8_t_double() {
6133 ; CHECK-LABEL: ld_cst_align16_uint8_t_double:
6134 ; CHECK: # %bb.0: # %entry
6135 ; CHECK-NEXT: lfd f0, 4080(0)
6136 ; CHECK-NEXT: xscvdpsxws f0, f0
6137 ; CHECK-NEXT: mffprwz r3, f0
6138 ; CHECK-NEXT: clrldi r3, r3, 32
6141 %0 = load double, double* inttoptr (i64 4080 to double*), align 16
6142 %conv = fptoui double %0 to i8
6146 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
6147 define dso_local zeroext i8 @ld_cst_align32_uint8_t_double() {
6148 ; CHECK-LABEL: ld_cst_align32_uint8_t_double:
6149 ; CHECK: # %bb.0: # %entry
6150 ; CHECK-NEXT: lis r3, 153
6151 ; CHECK-NEXT: lfd f0, -27108(r3)
6152 ; CHECK-NEXT: xscvdpsxws f0, f0
6153 ; CHECK-NEXT: mffprwz r3, f0
6154 ; CHECK-NEXT: clrldi r3, r3, 32
6157 %0 = load double, double* inttoptr (i64 9999900 to double*), align 8
6158 %conv = fptoui double %0 to i8
6162 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
6163 define dso_local zeroext i8 @ld_cst_unalign64_uint8_t_double() {
6164 ; CHECK-P10-LABEL: ld_cst_unalign64_uint8_t_double:
6165 ; CHECK-P10: # %bb.0: # %entry
6166 ; CHECK-P10-NEXT: pli r3, 232
6167 ; CHECK-P10-NEXT: pli r4, 3567587329
6168 ; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
6169 ; CHECK-P10-NEXT: lfd f0, 0(r4)
6170 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
6171 ; CHECK-P10-NEXT: mffprwz r3, f0
6172 ; CHECK-P10-NEXT: clrldi r3, r3, 32
6173 ; CHECK-P10-NEXT: blr
6175 ; CHECK-PREP10-LABEL: ld_cst_unalign64_uint8_t_double:
6176 ; CHECK-PREP10: # %bb.0: # %entry
6177 ; CHECK-PREP10-NEXT: li r3, 29
6178 ; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
6179 ; CHECK-PREP10-NEXT: oris r3, r3, 54437
6180 ; CHECK-PREP10-NEXT: ori r3, r3, 4097
6181 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
6182 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
6183 ; CHECK-PREP10-NEXT: mffprwz r3, f0
6184 ; CHECK-PREP10-NEXT: clrldi r3, r3, 32
6185 ; CHECK-PREP10-NEXT: blr
6187 %0 = load double, double* inttoptr (i64 1000000000001 to double*), align 8
6188 %conv = fptoui double %0 to i8
6192 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
6193 define dso_local zeroext i8 @ld_cst_align64_uint8_t_double() {
6194 ; CHECK-P10-LABEL: ld_cst_align64_uint8_t_double:
6195 ; CHECK-P10: # %bb.0: # %entry
6196 ; CHECK-P10-NEXT: pli r3, 244140625
6197 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
6198 ; CHECK-P10-NEXT: lfd f0, 0(r3)
6199 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
6200 ; CHECK-P10-NEXT: mffprwz r3, f0
6201 ; CHECK-P10-NEXT: clrldi r3, r3, 32
6202 ; CHECK-P10-NEXT: blr
6204 ; CHECK-PREP10-LABEL: ld_cst_align64_uint8_t_double:
6205 ; CHECK-PREP10: # %bb.0: # %entry
6206 ; CHECK-PREP10-NEXT: lis r3, 3725
6207 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
6208 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
6209 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
6210 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
6211 ; CHECK-PREP10-NEXT: mffprwz r3, f0
6212 ; CHECK-PREP10-NEXT: clrldi r3, r3, 32
6213 ; CHECK-PREP10-NEXT: blr
6215 %0 = load double, double* inttoptr (i64 1000000000000 to double*), align 4096
6216 %conv = fptoui double %0 to i8
6220 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6221 define dso_local void @st_0_uint8_t_uint8_t(i64 %ptr, i8 zeroext %str) {
6222 ; CHECK-LABEL: st_0_uint8_t_uint8_t:
6223 ; CHECK: # %bb.0: # %entry
6224 ; CHECK-NEXT: stb r4, 0(r3)
6227 %0 = inttoptr i64 %ptr to i8*
6228 store i8 %str, i8* %0, align 1
6232 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6233 define dso_local void @st_align16_uint8_t_uint8_t(i8* nocapture %ptr, i8 zeroext %str) {
6234 ; CHECK-LABEL: st_align16_uint8_t_uint8_t:
6235 ; CHECK: # %bb.0: # %entry
6236 ; CHECK-NEXT: stb r4, 8(r3)
6239 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
6240 store i8 %str, i8* %add.ptr, align 1
6244 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6245 define dso_local void @st_align32_uint8_t_uint8_t(i8* nocapture %ptr, i8 zeroext %str) {
6246 ; CHECK-P10-LABEL: st_align32_uint8_t_uint8_t:
6247 ; CHECK-P10: # %bb.0: # %entry
6248 ; CHECK-P10-NEXT: pli r5, 99999000
6249 ; CHECK-P10-NEXT: stbx r4, r3, r5
6250 ; CHECK-P10-NEXT: blr
6252 ; CHECK-PREP10-LABEL: st_align32_uint8_t_uint8_t:
6253 ; CHECK-PREP10: # %bb.0: # %entry
6254 ; CHECK-PREP10-NEXT: lis r5, 1525
6255 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
6256 ; CHECK-PREP10-NEXT: stbx r4, r3, r5
6257 ; CHECK-PREP10-NEXT: blr
6259 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
6260 store i8 %str, i8* %add.ptr, align 1
6264 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6265 define dso_local void @st_align64_uint8_t_uint8_t(i8* nocapture %ptr, i8 zeroext %str) {
6266 ; CHECK-P10-LABEL: st_align64_uint8_t_uint8_t:
6267 ; CHECK-P10: # %bb.0: # %entry
6268 ; CHECK-P10-NEXT: pli r5, 244140625
6269 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6270 ; CHECK-P10-NEXT: stbx r4, r3, r5
6271 ; CHECK-P10-NEXT: blr
6273 ; CHECK-PREP10-LABEL: st_align64_uint8_t_uint8_t:
6274 ; CHECK-PREP10: # %bb.0: # %entry
6275 ; CHECK-PREP10-NEXT: lis r5, 3725
6276 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6277 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6278 ; CHECK-PREP10-NEXT: stbx r4, r3, r5
6279 ; CHECK-PREP10-NEXT: blr
6281 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
6282 store i8 %str, i8* %add.ptr, align 1
6286 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6287 define dso_local void @st_reg_uint8_t_uint8_t(i8* nocapture %ptr, i64 %off, i8 zeroext %str) {
6288 ; CHECK-LABEL: st_reg_uint8_t_uint8_t:
6289 ; CHECK: # %bb.0: # %entry
6290 ; CHECK-NEXT: stbx r5, r3, r4
6293 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
6294 store i8 %str, i8* %add.ptr, align 1
6298 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6299 define dso_local void @st_or1_uint8_t_uint8_t(i64 %ptr, i8 zeroext %off, i8 zeroext %str) {
6300 ; CHECK-LABEL: st_or1_uint8_t_uint8_t:
6301 ; CHECK: # %bb.0: # %entry
6302 ; CHECK-NEXT: or r3, r4, r3
6303 ; CHECK-NEXT: stb r5, 0(r3)
6306 %conv = zext i8 %off to i64
6307 %or = or i64 %conv, %ptr
6308 %0 = inttoptr i64 %or to i8*
6309 store i8 %str, i8* %0, align 1
6313 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6314 define dso_local void @st_not_disjoint16_uint8_t_uint8_t(i64 %ptr, i8 zeroext %str) {
6315 ; CHECK-LABEL: st_not_disjoint16_uint8_t_uint8_t:
6316 ; CHECK: # %bb.0: # %entry
6317 ; CHECK-NEXT: ori r3, r3, 6
6318 ; CHECK-NEXT: stb r4, 0(r3)
6321 %or = or i64 %ptr, 6
6322 %0 = inttoptr i64 %or to i8*
6323 store i8 %str, i8* %0, align 1
6327 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6328 define dso_local void @st_disjoint_align16_uint8_t_uint8_t(i64 %ptr, i8 zeroext %str) {
6329 ; CHECK-LABEL: st_disjoint_align16_uint8_t_uint8_t:
6330 ; CHECK: # %bb.0: # %entry
6331 ; CHECK-NEXT: rldicr r3, r3, 0, 51
6332 ; CHECK-NEXT: stb r4, 24(r3)
6335 %and = and i64 %ptr, -4096
6336 %or = or i64 %and, 24
6337 %0 = inttoptr i64 %or to i8*
6338 store i8 %str, i8* %0, align 8
6342 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6343 define dso_local void @st_not_disjoint32_uint8_t_uint8_t(i64 %ptr, i8 zeroext %str) {
6344 ; CHECK-LABEL: st_not_disjoint32_uint8_t_uint8_t:
6345 ; CHECK: # %bb.0: # %entry
6346 ; CHECK-NEXT: ori r3, r3, 34463
6347 ; CHECK-NEXT: oris r3, r3, 1
6348 ; CHECK-NEXT: stb r4, 0(r3)
6351 %or = or i64 %ptr, 99999
6352 %0 = inttoptr i64 %or to i8*
6353 store i8 %str, i8* %0, align 1
6357 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6358 define dso_local void @st_disjoint_align32_uint8_t_uint8_t(i64 %ptr, i8 zeroext %str) {
6359 ; CHECK-P10-LABEL: st_disjoint_align32_uint8_t_uint8_t:
6360 ; CHECK-P10: # %bb.0: # %entry
6361 ; CHECK-P10-NEXT: lis r5, -15264
6362 ; CHECK-P10-NEXT: and r3, r3, r5
6363 ; CHECK-P10-NEXT: pli r5, 999990000
6364 ; CHECK-P10-NEXT: stbx r4, r3, r5
6365 ; CHECK-P10-NEXT: blr
6367 ; CHECK-P9-LABEL: st_disjoint_align32_uint8_t_uint8_t:
6368 ; CHECK-P9: # %bb.0: # %entry
6369 ; CHECK-P9-NEXT: lis r5, -15264
6370 ; CHECK-P9-NEXT: and r3, r3, r5
6371 ; CHECK-P9-NEXT: lis r5, 15258
6372 ; CHECK-P9-NEXT: ori r5, r5, 41712
6373 ; CHECK-P9-NEXT: stbx r4, r3, r5
6374 ; CHECK-P9-NEXT: blr
6376 ; CHECK-P8-LABEL: st_disjoint_align32_uint8_t_uint8_t:
6377 ; CHECK-P8: # %bb.0: # %entry
6378 ; CHECK-P8-NEXT: lis r5, -15264
6379 ; CHECK-P8-NEXT: lis r6, 15258
6380 ; CHECK-P8-NEXT: and r3, r3, r5
6381 ; CHECK-P8-NEXT: ori r5, r6, 41712
6382 ; CHECK-P8-NEXT: stbx r4, r3, r5
6383 ; CHECK-P8-NEXT: blr
6385 %and = and i64 %ptr, -1000341504
6386 %or = or i64 %and, 999990000
6387 %0 = inttoptr i64 %or to i8*
6388 store i8 %str, i8* %0, align 16
6392 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6393 define dso_local void @st_not_disjoint64_uint8_t_uint8_t(i64 %ptr, i8 zeroext %str) {
6394 ; CHECK-P10-LABEL: st_not_disjoint64_uint8_t_uint8_t:
6395 ; CHECK-P10: # %bb.0: # %entry
6396 ; CHECK-P10-NEXT: pli r5, 232
6397 ; CHECK-P10-NEXT: pli r6, 3567587329
6398 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
6399 ; CHECK-P10-NEXT: or r3, r3, r6
6400 ; CHECK-P10-NEXT: stb r4, 0(r3)
6401 ; CHECK-P10-NEXT: blr
6403 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint8_t_uint8_t:
6404 ; CHECK-PREP10: # %bb.0: # %entry
6405 ; CHECK-PREP10-NEXT: li r5, 29
6406 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
6407 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
6408 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
6409 ; CHECK-PREP10-NEXT: or r3, r3, r5
6410 ; CHECK-PREP10-NEXT: stb r4, 0(r3)
6411 ; CHECK-PREP10-NEXT: blr
6413 %or = or i64 %ptr, 1000000000001
6414 %0 = inttoptr i64 %or to i8*
6415 store i8 %str, i8* %0, align 1
6419 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6420 define dso_local void @st_disjoint_align64_uint8_t_uint8_t(i64 %ptr, i8 zeroext %str) {
6421 ; CHECK-P10-LABEL: st_disjoint_align64_uint8_t_uint8_t:
6422 ; CHECK-P10: # %bb.0: # %entry
6423 ; CHECK-P10-NEXT: pli r5, 244140625
6424 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
6425 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6426 ; CHECK-P10-NEXT: stbx r4, r3, r5
6427 ; CHECK-P10-NEXT: blr
6429 ; CHECK-PREP10-LABEL: st_disjoint_align64_uint8_t_uint8_t:
6430 ; CHECK-PREP10: # %bb.0: # %entry
6431 ; CHECK-PREP10-NEXT: lis r5, 3725
6432 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
6433 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6434 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6435 ; CHECK-PREP10-NEXT: stbx r4, r3, r5
6436 ; CHECK-PREP10-NEXT: blr
6438 %and = and i64 %ptr, -1099511627776
6439 %or = or i64 %and, 1000000000000
6440 %0 = inttoptr i64 %or to i8*
6441 store i8 %str, i8* %0, align 4096
6445 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6446 define dso_local void @st_cst_align16_uint8_t_uint8_t(i8 zeroext %str) {
6447 ; CHECK-LABEL: st_cst_align16_uint8_t_uint8_t:
6448 ; CHECK: # %bb.0: # %entry
6449 ; CHECK-NEXT: stb r3, 4080(0)
6452 store i8 %str, i8* inttoptr (i64 4080 to i8*), align 16
6456 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6457 define dso_local void @st_cst_align32_uint8_t_uint8_t(i8 zeroext %str) {
6458 ; CHECK-LABEL: st_cst_align32_uint8_t_uint8_t:
6459 ; CHECK: # %bb.0: # %entry
6460 ; CHECK-NEXT: lis r4, 153
6461 ; CHECK-NEXT: stb r3, -27108(r4)
6464 store i8 %str, i8* inttoptr (i64 9999900 to i8*), align 4
6468 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6469 define dso_local void @st_cst_align64_uint8_t_uint8_t(i8 zeroext %str) {
6470 ; CHECK-P10-LABEL: st_cst_align64_uint8_t_uint8_t:
6471 ; CHECK-P10: # %bb.0: # %entry
6472 ; CHECK-P10-NEXT: pli r4, 244140625
6473 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6474 ; CHECK-P10-NEXT: stb r3, 0(r4)
6475 ; CHECK-P10-NEXT: blr
6477 ; CHECK-PREP10-LABEL: st_cst_align64_uint8_t_uint8_t:
6478 ; CHECK-PREP10: # %bb.0: # %entry
6479 ; CHECK-PREP10-NEXT: lis r4, 3725
6480 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
6481 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
6482 ; CHECK-PREP10-NEXT: stb r3, 0(r4)
6483 ; CHECK-PREP10-NEXT: blr
6485 store i8 %str, i8* inttoptr (i64 1000000000000 to i8*), align 4096
6489 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6490 define dso_local void @st_0_uint8_t_uint16_t(i64 %ptr, i8 zeroext %str) {
6491 ; CHECK-LABEL: st_0_uint8_t_uint16_t:
6492 ; CHECK: # %bb.0: # %entry
6493 ; CHECK-NEXT: sth r4, 0(r3)
6496 %conv = zext i8 %str to i16
6497 %0 = inttoptr i64 %ptr to i16*
6498 store i16 %conv, i16* %0, align 2
6502 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6503 define dso_local void @st_align16_uint8_t_uint16_t(i8* nocapture %ptr, i8 zeroext %str) {
6504 ; CHECK-LABEL: st_align16_uint8_t_uint16_t:
6505 ; CHECK: # %bb.0: # %entry
6506 ; CHECK-NEXT: sth r4, 8(r3)
6509 %conv = zext i8 %str to i16
6510 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
6511 %0 = bitcast i8* %add.ptr to i16*
6512 store i16 %conv, i16* %0, align 2
6516 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6517 define dso_local void @st_align32_uint8_t_uint16_t(i8* nocapture %ptr, i8 zeroext %str) {
6518 ; CHECK-P10-LABEL: st_align32_uint8_t_uint16_t:
6519 ; CHECK-P10: # %bb.0: # %entry
6520 ; CHECK-P10-NEXT: pli r5, 99999000
6521 ; CHECK-P10-NEXT: sthx r4, r3, r5
6522 ; CHECK-P10-NEXT: blr
6524 ; CHECK-PREP10-LABEL: st_align32_uint8_t_uint16_t:
6525 ; CHECK-PREP10: # %bb.0: # %entry
6526 ; CHECK-PREP10-NEXT: lis r5, 1525
6527 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
6528 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
6529 ; CHECK-PREP10-NEXT: blr
6531 %conv = zext i8 %str to i16
6532 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
6533 %0 = bitcast i8* %add.ptr to i16*
6534 store i16 %conv, i16* %0, align 2
6538 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6539 define dso_local void @st_align64_uint8_t_uint16_t(i8* nocapture %ptr, i8 zeroext %str) {
6540 ; CHECK-P10-LABEL: st_align64_uint8_t_uint16_t:
6541 ; CHECK-P10: # %bb.0: # %entry
6542 ; CHECK-P10-NEXT: pli r5, 244140625
6543 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6544 ; CHECK-P10-NEXT: sthx r4, r3, r5
6545 ; CHECK-P10-NEXT: blr
6547 ; CHECK-PREP10-LABEL: st_align64_uint8_t_uint16_t:
6548 ; CHECK-PREP10: # %bb.0: # %entry
6549 ; CHECK-PREP10-NEXT: lis r5, 3725
6550 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6551 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6552 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
6553 ; CHECK-PREP10-NEXT: blr
6555 %conv = zext i8 %str to i16
6556 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
6557 %0 = bitcast i8* %add.ptr to i16*
6558 store i16 %conv, i16* %0, align 2
6562 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6563 define dso_local void @st_reg_uint8_t_uint16_t(i8* nocapture %ptr, i64 %off, i8 zeroext %str) {
6564 ; CHECK-LABEL: st_reg_uint8_t_uint16_t:
6565 ; CHECK: # %bb.0: # %entry
6566 ; CHECK-NEXT: sthx r5, r3, r4
6569 %conv = zext i8 %str to i16
6570 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
6571 %0 = bitcast i8* %add.ptr to i16*
6572 store i16 %conv, i16* %0, align 2
6576 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6577 define dso_local void @st_or1_uint8_t_uint16_t(i64 %ptr, i8 zeroext %off, i8 zeroext %str) {
6578 ; CHECK-LABEL: st_or1_uint8_t_uint16_t:
6579 ; CHECK: # %bb.0: # %entry
6580 ; CHECK-NEXT: or r3, r4, r3
6581 ; CHECK-NEXT: sth r5, 0(r3)
6584 %conv = zext i8 %str to i16
6585 %conv1 = zext i8 %off to i64
6586 %or = or i64 %conv1, %ptr
6587 %0 = inttoptr i64 %or to i16*
6588 store i16 %conv, i16* %0, align 2
6592 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6593 define dso_local void @st_not_disjoint16_uint8_t_uint16_t(i64 %ptr, i8 zeroext %str) {
6594 ; CHECK-LABEL: st_not_disjoint16_uint8_t_uint16_t:
6595 ; CHECK: # %bb.0: # %entry
6596 ; CHECK-NEXT: ori r3, r3, 6
6597 ; CHECK-NEXT: sth r4, 0(r3)
6600 %conv = zext i8 %str to i16
6601 %or = or i64 %ptr, 6
6602 %0 = inttoptr i64 %or to i16*
6603 store i16 %conv, i16* %0, align 2
6607 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6608 define dso_local void @st_disjoint_align16_uint8_t_uint16_t(i64 %ptr, i8 zeroext %str) {
6609 ; CHECK-LABEL: st_disjoint_align16_uint8_t_uint16_t:
6610 ; CHECK: # %bb.0: # %entry
6611 ; CHECK-NEXT: rldicr r3, r3, 0, 51
6612 ; CHECK-NEXT: sth r4, 24(r3)
6615 %and = and i64 %ptr, -4096
6616 %conv = zext i8 %str to i16
6617 %or = or i64 %and, 24
6618 %0 = inttoptr i64 %or to i16*
6619 store i16 %conv, i16* %0, align 8
6623 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6624 define dso_local void @st_not_disjoint32_uint8_t_uint16_t(i64 %ptr, i8 zeroext %str) {
6625 ; CHECK-LABEL: st_not_disjoint32_uint8_t_uint16_t:
6626 ; CHECK: # %bb.0: # %entry
6627 ; CHECK-NEXT: ori r3, r3, 34463
6628 ; CHECK-NEXT: oris r3, r3, 1
6629 ; CHECK-NEXT: sth r4, 0(r3)
6632 %conv = zext i8 %str to i16
6633 %or = or i64 %ptr, 99999
6634 %0 = inttoptr i64 %or to i16*
6635 store i16 %conv, i16* %0, align 2
6639 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6640 define dso_local void @st_disjoint_align32_uint8_t_uint16_t(i64 %ptr, i8 zeroext %str) {
6641 ; CHECK-P10-LABEL: st_disjoint_align32_uint8_t_uint16_t:
6642 ; CHECK-P10: # %bb.0: # %entry
6643 ; CHECK-P10-NEXT: lis r5, -15264
6644 ; CHECK-P10-NEXT: and r3, r3, r5
6645 ; CHECK-P10-NEXT: pli r5, 999990000
6646 ; CHECK-P10-NEXT: sthx r4, r3, r5
6647 ; CHECK-P10-NEXT: blr
6649 ; CHECK-P9-LABEL: st_disjoint_align32_uint8_t_uint16_t:
6650 ; CHECK-P9: # %bb.0: # %entry
6651 ; CHECK-P9-NEXT: lis r5, -15264
6652 ; CHECK-P9-NEXT: and r3, r3, r5
6653 ; CHECK-P9-NEXT: lis r5, 15258
6654 ; CHECK-P9-NEXT: ori r5, r5, 41712
6655 ; CHECK-P9-NEXT: sthx r4, r3, r5
6656 ; CHECK-P9-NEXT: blr
6658 ; CHECK-P8-LABEL: st_disjoint_align32_uint8_t_uint16_t:
6659 ; CHECK-P8: # %bb.0: # %entry
6660 ; CHECK-P8-NEXT: lis r5, -15264
6661 ; CHECK-P8-NEXT: lis r6, 15258
6662 ; CHECK-P8-NEXT: and r3, r3, r5
6663 ; CHECK-P8-NEXT: ori r5, r6, 41712
6664 ; CHECK-P8-NEXT: sthx r4, r3, r5
6665 ; CHECK-P8-NEXT: blr
6667 %and = and i64 %ptr, -1000341504
6668 %conv = zext i8 %str to i16
6669 %or = or i64 %and, 999990000
6670 %0 = inttoptr i64 %or to i16*
6671 store i16 %conv, i16* %0, align 16
6675 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6676 define dso_local void @st_not_disjoint64_uint8_t_uint16_t(i64 %ptr, i8 zeroext %str) {
6677 ; CHECK-P10-LABEL: st_not_disjoint64_uint8_t_uint16_t:
6678 ; CHECK-P10: # %bb.0: # %entry
6679 ; CHECK-P10-NEXT: pli r5, 232
6680 ; CHECK-P10-NEXT: pli r6, 3567587329
6681 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
6682 ; CHECK-P10-NEXT: or r3, r3, r6
6683 ; CHECK-P10-NEXT: sth r4, 0(r3)
6684 ; CHECK-P10-NEXT: blr
6686 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint8_t_uint16_t:
6687 ; CHECK-PREP10: # %bb.0: # %entry
6688 ; CHECK-PREP10-NEXT: li r5, 29
6689 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
6690 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
6691 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
6692 ; CHECK-PREP10-NEXT: or r3, r3, r5
6693 ; CHECK-PREP10-NEXT: sth r4, 0(r3)
6694 ; CHECK-PREP10-NEXT: blr
6696 %conv = zext i8 %str to i16
6697 %or = or i64 %ptr, 1000000000001
6698 %0 = inttoptr i64 %or to i16*
6699 store i16 %conv, i16* %0, align 2
6703 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6704 define dso_local void @st_disjoint_align64_uint8_t_uint16_t(i64 %ptr, i8 zeroext %str) {
6705 ; CHECK-P10-LABEL: st_disjoint_align64_uint8_t_uint16_t:
6706 ; CHECK-P10: # %bb.0: # %entry
6707 ; CHECK-P10-NEXT: pli r5, 244140625
6708 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
6709 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6710 ; CHECK-P10-NEXT: sthx r4, r3, r5
6711 ; CHECK-P10-NEXT: blr
6713 ; CHECK-PREP10-LABEL: st_disjoint_align64_uint8_t_uint16_t:
6714 ; CHECK-PREP10: # %bb.0: # %entry
6715 ; CHECK-PREP10-NEXT: lis r5, 3725
6716 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
6717 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6718 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6719 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
6720 ; CHECK-PREP10-NEXT: blr
6722 %and = and i64 %ptr, -1099511627776
6723 %conv = zext i8 %str to i16
6724 %or = or i64 %and, 1000000000000
6725 %0 = inttoptr i64 %or to i16*
6726 store i16 %conv, i16* %0, align 4096
6730 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6731 define dso_local void @st_cst_align16_uint8_t_uint16_t(i8 zeroext %str) {
6732 ; CHECK-LABEL: st_cst_align16_uint8_t_uint16_t:
6733 ; CHECK: # %bb.0: # %entry
6734 ; CHECK-NEXT: sth r3, 4080(0)
6737 %conv = zext i8 %str to i16
6738 store i16 %conv, i16* inttoptr (i64 4080 to i16*), align 16
6742 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6743 define dso_local void @st_cst_align32_uint8_t_uint16_t(i8 zeroext %str) {
6744 ; CHECK-LABEL: st_cst_align32_uint8_t_uint16_t:
6745 ; CHECK: # %bb.0: # %entry
6746 ; CHECK-NEXT: lis r4, 153
6747 ; CHECK-NEXT: sth r3, -27108(r4)
6750 %conv = zext i8 %str to i16
6751 store i16 %conv, i16* inttoptr (i64 9999900 to i16*), align 4
6755 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6756 define dso_local void @st_cst_align64_uint8_t_uint16_t(i8 zeroext %str) {
6757 ; CHECK-P10-LABEL: st_cst_align64_uint8_t_uint16_t:
6758 ; CHECK-P10: # %bb.0: # %entry
6759 ; CHECK-P10-NEXT: pli r4, 244140625
6760 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6761 ; CHECK-P10-NEXT: sth r3, 0(r4)
6762 ; CHECK-P10-NEXT: blr
6764 ; CHECK-PREP10-LABEL: st_cst_align64_uint8_t_uint16_t:
6765 ; CHECK-PREP10: # %bb.0: # %entry
6766 ; CHECK-PREP10-NEXT: lis r4, 3725
6767 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
6768 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
6769 ; CHECK-PREP10-NEXT: sth r3, 0(r4)
6770 ; CHECK-PREP10-NEXT: blr
6772 %conv = zext i8 %str to i16
6773 store i16 %conv, i16* inttoptr (i64 1000000000000 to i16*), align 4096
6777 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6778 define dso_local void @st_0_uint8_t_uint32_t(i64 %ptr, i8 zeroext %str) {
6779 ; CHECK-LABEL: st_0_uint8_t_uint32_t:
6780 ; CHECK: # %bb.0: # %entry
6781 ; CHECK-NEXT: stw r4, 0(r3)
6784 %conv = zext i8 %str to i32
6785 %0 = inttoptr i64 %ptr to i32*
6786 store i32 %conv, i32* %0, align 4
6790 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6791 define dso_local void @st_align16_uint8_t_uint32_t(i8* nocapture %ptr, i8 zeroext %str) {
6792 ; CHECK-LABEL: st_align16_uint8_t_uint32_t:
6793 ; CHECK: # %bb.0: # %entry
6794 ; CHECK-NEXT: stw r4, 8(r3)
6797 %conv = zext i8 %str to i32
6798 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
6799 %0 = bitcast i8* %add.ptr to i32*
6800 store i32 %conv, i32* %0, align 4
6804 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6805 define dso_local void @st_align32_uint8_t_uint32_t(i8* nocapture %ptr, i8 zeroext %str) {
6806 ; CHECK-P10-LABEL: st_align32_uint8_t_uint32_t:
6807 ; CHECK-P10: # %bb.0: # %entry
6808 ; CHECK-P10-NEXT: pli r5, 99999000
6809 ; CHECK-P10-NEXT: stwx r4, r3, r5
6810 ; CHECK-P10-NEXT: blr
6812 ; CHECK-PREP10-LABEL: st_align32_uint8_t_uint32_t:
6813 ; CHECK-PREP10: # %bb.0: # %entry
6814 ; CHECK-PREP10-NEXT: lis r5, 1525
6815 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
6816 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
6817 ; CHECK-PREP10-NEXT: blr
6819 %conv = zext i8 %str to i32
6820 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
6821 %0 = bitcast i8* %add.ptr to i32*
6822 store i32 %conv, i32* %0, align 4
6826 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6827 define dso_local void @st_align64_uint8_t_uint32_t(i8* nocapture %ptr, i8 zeroext %str) {
6828 ; CHECK-P10-LABEL: st_align64_uint8_t_uint32_t:
6829 ; CHECK-P10: # %bb.0: # %entry
6830 ; CHECK-P10-NEXT: pli r5, 244140625
6831 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6832 ; CHECK-P10-NEXT: stwx r4, r3, r5
6833 ; CHECK-P10-NEXT: blr
6835 ; CHECK-PREP10-LABEL: st_align64_uint8_t_uint32_t:
6836 ; CHECK-PREP10: # %bb.0: # %entry
6837 ; CHECK-PREP10-NEXT: lis r5, 3725
6838 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6839 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6840 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
6841 ; CHECK-PREP10-NEXT: blr
6843 %conv = zext i8 %str to i32
6844 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
6845 %0 = bitcast i8* %add.ptr to i32*
6846 store i32 %conv, i32* %0, align 4
6850 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6851 define dso_local void @st_reg_uint8_t_uint32_t(i8* nocapture %ptr, i64 %off, i8 zeroext %str) {
6852 ; CHECK-LABEL: st_reg_uint8_t_uint32_t:
6853 ; CHECK: # %bb.0: # %entry
6854 ; CHECK-NEXT: stwx r5, r3, r4
6857 %conv = zext i8 %str to i32
6858 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
6859 %0 = bitcast i8* %add.ptr to i32*
6860 store i32 %conv, i32* %0, align 4
6864 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6865 define dso_local void @st_or1_uint8_t_uint32_t(i64 %ptr, i8 zeroext %off, i8 zeroext %str) {
6866 ; CHECK-LABEL: st_or1_uint8_t_uint32_t:
6867 ; CHECK: # %bb.0: # %entry
6868 ; CHECK-NEXT: or r3, r4, r3
6869 ; CHECK-NEXT: stw r5, 0(r3)
6872 %conv = zext i8 %str to i32
6873 %conv1 = zext i8 %off to i64
6874 %or = or i64 %conv1, %ptr
6875 %0 = inttoptr i64 %or to i32*
6876 store i32 %conv, i32* %0, align 4
6880 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6881 define dso_local void @st_not_disjoint16_uint8_t_uint32_t(i64 %ptr, i8 zeroext %str) {
6882 ; CHECK-LABEL: st_not_disjoint16_uint8_t_uint32_t:
6883 ; CHECK: # %bb.0: # %entry
6884 ; CHECK-NEXT: ori r3, r3, 6
6885 ; CHECK-NEXT: stw r4, 0(r3)
6888 %conv = zext i8 %str to i32
6889 %or = or i64 %ptr, 6
6890 %0 = inttoptr i64 %or to i32*
6891 store i32 %conv, i32* %0, align 4
6895 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6896 define dso_local void @st_disjoint_align16_uint8_t_uint32_t(i64 %ptr, i8 zeroext %str) {
6897 ; CHECK-LABEL: st_disjoint_align16_uint8_t_uint32_t:
6898 ; CHECK: # %bb.0: # %entry
6899 ; CHECK-NEXT: rldicr r3, r3, 0, 51
6900 ; CHECK-NEXT: stw r4, 24(r3)
6903 %and = and i64 %ptr, -4096
6904 %conv = zext i8 %str to i32
6905 %or = or i64 %and, 24
6906 %0 = inttoptr i64 %or to i32*
6907 store i32 %conv, i32* %0, align 8
6911 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6912 define dso_local void @st_not_disjoint32_uint8_t_uint32_t(i64 %ptr, i8 zeroext %str) {
6913 ; CHECK-LABEL: st_not_disjoint32_uint8_t_uint32_t:
6914 ; CHECK: # %bb.0: # %entry
6915 ; CHECK-NEXT: ori r3, r3, 34463
6916 ; CHECK-NEXT: oris r3, r3, 1
6917 ; CHECK-NEXT: stw r4, 0(r3)
6920 %conv = zext i8 %str to i32
6921 %or = or i64 %ptr, 99999
6922 %0 = inttoptr i64 %or to i32*
6923 store i32 %conv, i32* %0, align 4
6927 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6928 define dso_local void @st_disjoint_align32_uint8_t_uint32_t(i64 %ptr, i8 zeroext %str) {
6929 ; CHECK-P10-LABEL: st_disjoint_align32_uint8_t_uint32_t:
6930 ; CHECK-P10: # %bb.0: # %entry
6931 ; CHECK-P10-NEXT: lis r5, -15264
6932 ; CHECK-P10-NEXT: and r3, r3, r5
6933 ; CHECK-P10-NEXT: pli r5, 999990000
6934 ; CHECK-P10-NEXT: stwx r4, r3, r5
6935 ; CHECK-P10-NEXT: blr
6937 ; CHECK-P9-LABEL: st_disjoint_align32_uint8_t_uint32_t:
6938 ; CHECK-P9: # %bb.0: # %entry
6939 ; CHECK-P9-NEXT: lis r5, -15264
6940 ; CHECK-P9-NEXT: and r3, r3, r5
6941 ; CHECK-P9-NEXT: lis r5, 15258
6942 ; CHECK-P9-NEXT: ori r5, r5, 41712
6943 ; CHECK-P9-NEXT: stwx r4, r3, r5
6944 ; CHECK-P9-NEXT: blr
6946 ; CHECK-P8-LABEL: st_disjoint_align32_uint8_t_uint32_t:
6947 ; CHECK-P8: # %bb.0: # %entry
6948 ; CHECK-P8-NEXT: lis r5, -15264
6949 ; CHECK-P8-NEXT: lis r6, 15258
6950 ; CHECK-P8-NEXT: and r3, r3, r5
6951 ; CHECK-P8-NEXT: ori r5, r6, 41712
6952 ; CHECK-P8-NEXT: stwx r4, r3, r5
6953 ; CHECK-P8-NEXT: blr
6955 %and = and i64 %ptr, -1000341504
6956 %conv = zext i8 %str to i32
6957 %or = or i64 %and, 999990000
6958 %0 = inttoptr i64 %or to i32*
6959 store i32 %conv, i32* %0, align 16
6963 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6964 define dso_local void @st_not_disjoint64_uint8_t_uint32_t(i64 %ptr, i8 zeroext %str) {
6965 ; CHECK-P10-LABEL: st_not_disjoint64_uint8_t_uint32_t:
6966 ; CHECK-P10: # %bb.0: # %entry
6967 ; CHECK-P10-NEXT: pli r5, 232
6968 ; CHECK-P10-NEXT: pli r6, 3567587329
6969 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
6970 ; CHECK-P10-NEXT: or r3, r3, r6
6971 ; CHECK-P10-NEXT: stw r4, 0(r3)
6972 ; CHECK-P10-NEXT: blr
6974 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint8_t_uint32_t:
6975 ; CHECK-PREP10: # %bb.0: # %entry
6976 ; CHECK-PREP10-NEXT: li r5, 29
6977 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
6978 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
6979 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
6980 ; CHECK-PREP10-NEXT: or r3, r3, r5
6981 ; CHECK-PREP10-NEXT: stw r4, 0(r3)
6982 ; CHECK-PREP10-NEXT: blr
6984 %conv = zext i8 %str to i32
6985 %or = or i64 %ptr, 1000000000001
6986 %0 = inttoptr i64 %or to i32*
6987 store i32 %conv, i32* %0, align 4
6991 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6992 define dso_local void @st_disjoint_align64_uint8_t_uint32_t(i64 %ptr, i8 zeroext %str) {
6993 ; CHECK-P10-LABEL: st_disjoint_align64_uint8_t_uint32_t:
6994 ; CHECK-P10: # %bb.0: # %entry
6995 ; CHECK-P10-NEXT: pli r5, 244140625
6996 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
6997 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6998 ; CHECK-P10-NEXT: stwx r4, r3, r5
6999 ; CHECK-P10-NEXT: blr
7001 ; CHECK-PREP10-LABEL: st_disjoint_align64_uint8_t_uint32_t:
7002 ; CHECK-PREP10: # %bb.0: # %entry
7003 ; CHECK-PREP10-NEXT: lis r5, 3725
7004 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
7005 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
7006 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
7007 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
7008 ; CHECK-PREP10-NEXT: blr
7010 %and = and i64 %ptr, -1099511627776
7011 %conv = zext i8 %str to i32
7012 %or = or i64 %and, 1000000000000
7013 %0 = inttoptr i64 %or to i32*
7014 store i32 %conv, i32* %0, align 4096
7018 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7019 define dso_local void @st_cst_align16_uint8_t_uint32_t(i8 zeroext %str) {
7020 ; CHECK-LABEL: st_cst_align16_uint8_t_uint32_t:
7021 ; CHECK: # %bb.0: # %entry
7022 ; CHECK-NEXT: stw r3, 4080(0)
7025 %conv = zext i8 %str to i32
7026 store i32 %conv, i32* inttoptr (i64 4080 to i32*), align 16
7030 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7031 define dso_local void @st_cst_align32_uint8_t_uint32_t(i8 zeroext %str) {
7032 ; CHECK-LABEL: st_cst_align32_uint8_t_uint32_t:
7033 ; CHECK: # %bb.0: # %entry
7034 ; CHECK-NEXT: lis r4, 153
7035 ; CHECK-NEXT: stw r3, -27108(r4)
7038 %conv = zext i8 %str to i32
7039 store i32 %conv, i32* inttoptr (i64 9999900 to i32*), align 4
7043 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7044 define dso_local void @st_cst_align64_uint8_t_uint32_t(i8 zeroext %str) {
7045 ; CHECK-P10-LABEL: st_cst_align64_uint8_t_uint32_t:
7046 ; CHECK-P10: # %bb.0: # %entry
7047 ; CHECK-P10-NEXT: pli r4, 244140625
7048 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7049 ; CHECK-P10-NEXT: stw r3, 0(r4)
7050 ; CHECK-P10-NEXT: blr
7052 ; CHECK-PREP10-LABEL: st_cst_align64_uint8_t_uint32_t:
7053 ; CHECK-PREP10: # %bb.0: # %entry
7054 ; CHECK-PREP10-NEXT: lis r4, 3725
7055 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
7056 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
7057 ; CHECK-PREP10-NEXT: stw r3, 0(r4)
7058 ; CHECK-PREP10-NEXT: blr
7060 %conv = zext i8 %str to i32
7061 store i32 %conv, i32* inttoptr (i64 1000000000000 to i32*), align 4096
7065 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7066 define dso_local void @st_0_uint8_t_uint64_t(i64 %ptr, i8 zeroext %str) {
7067 ; CHECK-LABEL: st_0_uint8_t_uint64_t:
7068 ; CHECK: # %bb.0: # %entry
7069 ; CHECK-NEXT: std r4, 0(r3)
7072 %conv = zext i8 %str to i64
7073 %0 = inttoptr i64 %ptr to i64*
7074 store i64 %conv, i64* %0, align 8
7078 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7079 define dso_local void @st_align16_uint8_t_uint64_t(i8* nocapture %ptr, i8 zeroext %str) {
7080 ; CHECK-LABEL: st_align16_uint8_t_uint64_t:
7081 ; CHECK: # %bb.0: # %entry
7082 ; CHECK-NEXT: std r4, 8(r3)
7085 %conv = zext i8 %str to i64
7086 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
7087 %0 = bitcast i8* %add.ptr to i64*
7088 store i64 %conv, i64* %0, align 8
7092 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7093 define dso_local void @st_align32_uint8_t_uint64_t(i8* nocapture %ptr, i8 zeroext %str) {
7094 ; CHECK-P10-LABEL: st_align32_uint8_t_uint64_t:
7095 ; CHECK-P10: # %bb.0: # %entry
7096 ; CHECK-P10-NEXT: pli r5, 99999000
7097 ; CHECK-P10-NEXT: stdx r4, r3, r5
7098 ; CHECK-P10-NEXT: blr
7100 ; CHECK-PREP10-LABEL: st_align32_uint8_t_uint64_t:
7101 ; CHECK-PREP10: # %bb.0: # %entry
7102 ; CHECK-PREP10-NEXT: lis r5, 1525
7103 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
7104 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
7105 ; CHECK-PREP10-NEXT: blr
7107 %conv = zext i8 %str to i64
7108 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
7109 %0 = bitcast i8* %add.ptr to i64*
7110 store i64 %conv, i64* %0, align 8
7114 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7115 define dso_local void @st_align64_uint8_t_uint64_t(i8* nocapture %ptr, i8 zeroext %str) {
7116 ; CHECK-P10-LABEL: st_align64_uint8_t_uint64_t:
7117 ; CHECK-P10: # %bb.0: # %entry
7118 ; CHECK-P10-NEXT: pli r5, 244140625
7119 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
7120 ; CHECK-P10-NEXT: stdx r4, r3, r5
7121 ; CHECK-P10-NEXT: blr
7123 ; CHECK-PREP10-LABEL: st_align64_uint8_t_uint64_t:
7124 ; CHECK-PREP10: # %bb.0: # %entry
7125 ; CHECK-PREP10-NEXT: lis r5, 3725
7126 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
7127 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
7128 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
7129 ; CHECK-PREP10-NEXT: blr
7131 %conv = zext i8 %str to i64
7132 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
7133 %0 = bitcast i8* %add.ptr to i64*
7134 store i64 %conv, i64* %0, align 8
7138 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7139 define dso_local void @st_reg_uint8_t_uint64_t(i8* nocapture %ptr, i64 %off, i8 zeroext %str) {
7140 ; CHECK-LABEL: st_reg_uint8_t_uint64_t:
7141 ; CHECK: # %bb.0: # %entry
7142 ; CHECK-NEXT: stdx r5, r3, r4
7145 %conv = zext i8 %str to i64
7146 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
7147 %0 = bitcast i8* %add.ptr to i64*
7148 store i64 %conv, i64* %0, align 8
7152 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7153 define dso_local void @st_or1_uint8_t_uint64_t(i64 %ptr, i8 zeroext %off, i8 zeroext %str) {
7154 ; CHECK-LABEL: st_or1_uint8_t_uint64_t:
7155 ; CHECK: # %bb.0: # %entry
7156 ; CHECK-NEXT: or r3, r4, r3
7157 ; CHECK-NEXT: std r5, 0(r3)
7160 %conv = zext i8 %str to i64
7161 %conv1 = zext i8 %off to i64
7162 %or = or i64 %conv1, %ptr
7163 %0 = inttoptr i64 %or to i64*
7164 store i64 %conv, i64* %0, align 8
7168 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7169 define dso_local void @st_not_disjoint16_uint8_t_uint64_t(i64 %ptr, i8 zeroext %str) {
7170 ; CHECK-LABEL: st_not_disjoint16_uint8_t_uint64_t:
7171 ; CHECK: # %bb.0: # %entry
7172 ; CHECK-NEXT: ori r3, r3, 6
7173 ; CHECK-NEXT: std r4, 0(r3)
7176 %conv = zext i8 %str to i64
7177 %or = or i64 %ptr, 6
7178 %0 = inttoptr i64 %or to i64*
7179 store i64 %conv, i64* %0, align 8
7183 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7184 define dso_local void @st_disjoint_align16_uint8_t_uint64_t(i64 %ptr, i8 zeroext %str) {
7185 ; CHECK-LABEL: st_disjoint_align16_uint8_t_uint64_t:
7186 ; CHECK: # %bb.0: # %entry
7187 ; CHECK-NEXT: rldicr r3, r3, 0, 51
7188 ; CHECK-NEXT: std r4, 24(r3)
7191 %and = and i64 %ptr, -4096
7192 %conv = zext i8 %str to i64
7193 %or = or i64 %and, 24
7194 %0 = inttoptr i64 %or to i64*
7195 store i64 %conv, i64* %0, align 8
7199 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7200 define dso_local void @st_not_disjoint32_uint8_t_uint64_t(i64 %ptr, i8 zeroext %str) {
7201 ; CHECK-LABEL: st_not_disjoint32_uint8_t_uint64_t:
7202 ; CHECK: # %bb.0: # %entry
7203 ; CHECK-NEXT: ori r3, r3, 34463
7204 ; CHECK-NEXT: oris r3, r3, 1
7205 ; CHECK-NEXT: std r4, 0(r3)
7208 %conv = zext i8 %str to i64
7209 %or = or i64 %ptr, 99999
7210 %0 = inttoptr i64 %or to i64*
7211 store i64 %conv, i64* %0, align 8
7215 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7216 define dso_local void @st_disjoint_align32_uint8_t_uint64_t(i64 %ptr, i8 zeroext %str) {
7217 ; CHECK-P10-LABEL: st_disjoint_align32_uint8_t_uint64_t:
7218 ; CHECK-P10: # %bb.0: # %entry
7219 ; CHECK-P10-NEXT: lis r5, -15264
7220 ; CHECK-P10-NEXT: and r3, r3, r5
7221 ; CHECK-P10-NEXT: pli r5, 999990000
7222 ; CHECK-P10-NEXT: stdx r4, r3, r5
7223 ; CHECK-P10-NEXT: blr
7225 ; CHECK-P9-LABEL: st_disjoint_align32_uint8_t_uint64_t:
7226 ; CHECK-P9: # %bb.0: # %entry
7227 ; CHECK-P9-NEXT: lis r5, -15264
7228 ; CHECK-P9-NEXT: and r3, r3, r5
7229 ; CHECK-P9-NEXT: lis r5, 15258
7230 ; CHECK-P9-NEXT: ori r5, r5, 41712
7231 ; CHECK-P9-NEXT: stdx r4, r3, r5
7232 ; CHECK-P9-NEXT: blr
7234 ; CHECK-P8-LABEL: st_disjoint_align32_uint8_t_uint64_t:
7235 ; CHECK-P8: # %bb.0: # %entry
7236 ; CHECK-P8-NEXT: lis r5, -15264
7237 ; CHECK-P8-NEXT: lis r6, 15258
7238 ; CHECK-P8-NEXT: and r3, r3, r5
7239 ; CHECK-P8-NEXT: ori r5, r6, 41712
7240 ; CHECK-P8-NEXT: stdx r4, r3, r5
7241 ; CHECK-P8-NEXT: blr
7243 %and = and i64 %ptr, -1000341504
7244 %conv = zext i8 %str to i64
7245 %or = or i64 %and, 999990000
7246 %0 = inttoptr i64 %or to i64*
7247 store i64 %conv, i64* %0, align 16
7251 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7252 define dso_local void @st_not_disjoint64_uint8_t_uint64_t(i64 %ptr, i8 zeroext %str) {
7253 ; CHECK-P10-LABEL: st_not_disjoint64_uint8_t_uint64_t:
7254 ; CHECK-P10: # %bb.0: # %entry
7255 ; CHECK-P10-NEXT: pli r5, 232
7256 ; CHECK-P10-NEXT: pli r6, 3567587329
7257 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
7258 ; CHECK-P10-NEXT: or r3, r3, r6
7259 ; CHECK-P10-NEXT: std r4, 0(r3)
7260 ; CHECK-P10-NEXT: blr
7262 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint8_t_uint64_t:
7263 ; CHECK-PREP10: # %bb.0: # %entry
7264 ; CHECK-PREP10-NEXT: li r5, 29
7265 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
7266 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
7267 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
7268 ; CHECK-PREP10-NEXT: or r3, r3, r5
7269 ; CHECK-PREP10-NEXT: std r4, 0(r3)
7270 ; CHECK-PREP10-NEXT: blr
7272 %conv = zext i8 %str to i64
7273 %or = or i64 %ptr, 1000000000001
7274 %0 = inttoptr i64 %or to i64*
7275 store i64 %conv, i64* %0, align 8
7279 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7280 define dso_local void @st_disjoint_align64_uint8_t_uint64_t(i64 %ptr, i8 zeroext %str) {
7281 ; CHECK-P10-LABEL: st_disjoint_align64_uint8_t_uint64_t:
7282 ; CHECK-P10: # %bb.0: # %entry
7283 ; CHECK-P10-NEXT: pli r5, 244140625
7284 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
7285 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
7286 ; CHECK-P10-NEXT: stdx r4, r3, r5
7287 ; CHECK-P10-NEXT: blr
7289 ; CHECK-PREP10-LABEL: st_disjoint_align64_uint8_t_uint64_t:
7290 ; CHECK-PREP10: # %bb.0: # %entry
7291 ; CHECK-PREP10-NEXT: lis r5, 3725
7292 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
7293 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
7294 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
7295 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
7296 ; CHECK-PREP10-NEXT: blr
7298 %and = and i64 %ptr, -1099511627776
7299 %conv = zext i8 %str to i64
7300 %or = or i64 %and, 1000000000000
7301 %0 = inttoptr i64 %or to i64*
7302 store i64 %conv, i64* %0, align 4096
7306 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7307 define dso_local void @st_cst_align16_uint8_t_uint64_t(i8 zeroext %str) {
7308 ; CHECK-LABEL: st_cst_align16_uint8_t_uint64_t:
7309 ; CHECK: # %bb.0: # %entry
7310 ; CHECK-NEXT: std r3, 4080(0)
7313 %conv = zext i8 %str to i64
7314 store i64 %conv, i64* inttoptr (i64 4080 to i64*), align 16
7318 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7319 define dso_local void @st_cst_align32_uint8_t_uint64_t(i8 zeroext %str) {
7320 ; CHECK-LABEL: st_cst_align32_uint8_t_uint64_t:
7321 ; CHECK: # %bb.0: # %entry
7322 ; CHECK-NEXT: lis r4, 153
7323 ; CHECK-NEXT: std r3, -27108(r4)
7326 %conv = zext i8 %str to i64
7327 store i64 %conv, i64* inttoptr (i64 9999900 to i64*), align 8
7331 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7332 define dso_local void @st_cst_align64_uint8_t_uint64_t(i8 zeroext %str) {
7333 ; CHECK-P10-LABEL: st_cst_align64_uint8_t_uint64_t:
7334 ; CHECK-P10: # %bb.0: # %entry
7335 ; CHECK-P10-NEXT: pli r4, 244140625
7336 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7337 ; CHECK-P10-NEXT: std r3, 0(r4)
7338 ; CHECK-P10-NEXT: blr
7340 ; CHECK-PREP10-LABEL: st_cst_align64_uint8_t_uint64_t:
7341 ; CHECK-PREP10: # %bb.0: # %entry
7342 ; CHECK-PREP10-NEXT: lis r4, 3725
7343 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
7344 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
7345 ; CHECK-PREP10-NEXT: std r3, 0(r4)
7346 ; CHECK-PREP10-NEXT: blr
7348 %conv = zext i8 %str to i64
7349 store i64 %conv, i64* inttoptr (i64 1000000000000 to i64*), align 4096
7353 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7354 define dso_local void @st_0_uint8_t_float(i64 %ptr, i8 zeroext %str) {
7355 ; CHECK-LABEL: st_0_uint8_t_float:
7356 ; CHECK: # %bb.0: # %entry
7357 ; CHECK-NEXT: mtfprwz f0, r4
7358 ; CHECK-NEXT: xscvuxdsp f0, f0
7359 ; CHECK-NEXT: stfs f0, 0(r3)
7362 %conv = uitofp i8 %str to float
7363 %0 = inttoptr i64 %ptr to float*
7364 store float %conv, float* %0, align 4
7368 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7369 define dso_local void @st_align16_uint8_t_float(i8* nocapture %ptr, i8 zeroext %str) {
7370 ; CHECK-LABEL: st_align16_uint8_t_float:
7371 ; CHECK: # %bb.0: # %entry
7372 ; CHECK-NEXT: mtfprwz f0, r4
7373 ; CHECK-NEXT: xscvuxdsp f0, f0
7374 ; CHECK-NEXT: stfs f0, 8(r3)
7377 %conv = uitofp i8 %str to float
7378 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
7379 %0 = bitcast i8* %add.ptr to float*
7380 store float %conv, float* %0, align 4
7384 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7385 define dso_local void @st_align32_uint8_t_float(i8* nocapture %ptr, i8 zeroext %str) {
7386 ; CHECK-P10-LABEL: st_align32_uint8_t_float:
7387 ; CHECK-P10: # %bb.0: # %entry
7388 ; CHECK-P10-NEXT: mtfprwz f0, r4
7389 ; CHECK-P10-NEXT: pli r4, 99999000
7390 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
7391 ; CHECK-P10-NEXT: stfsx f0, r3, r4
7392 ; CHECK-P10-NEXT: blr
7394 ; CHECK-P9-LABEL: st_align32_uint8_t_float:
7395 ; CHECK-P9: # %bb.0: # %entry
7396 ; CHECK-P9-NEXT: mtfprwz f0, r4
7397 ; CHECK-P9-NEXT: lis r4, 1525
7398 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
7399 ; CHECK-P9-NEXT: ori r4, r4, 56600
7400 ; CHECK-P9-NEXT: stfsx f0, r3, r4
7401 ; CHECK-P9-NEXT: blr
7403 ; CHECK-P8-LABEL: st_align32_uint8_t_float:
7404 ; CHECK-P8: # %bb.0: # %entry
7405 ; CHECK-P8-NEXT: mtfprwz f0, r4
7406 ; CHECK-P8-NEXT: lis r4, 1525
7407 ; CHECK-P8-NEXT: ori r4, r4, 56600
7408 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
7409 ; CHECK-P8-NEXT: stfsx f0, r3, r4
7410 ; CHECK-P8-NEXT: blr
7412 %conv = uitofp i8 %str to float
7413 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
7414 %0 = bitcast i8* %add.ptr to float*
7415 store float %conv, float* %0, align 4
7419 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7420 define dso_local void @st_align64_uint8_t_float(i8* nocapture %ptr, i8 zeroext %str) {
7421 ; CHECK-P10-LABEL: st_align64_uint8_t_float:
7422 ; CHECK-P10: # %bb.0: # %entry
7423 ; CHECK-P10-NEXT: mtfprwz f0, r4
7424 ; CHECK-P10-NEXT: pli r4, 244140625
7425 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7426 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
7427 ; CHECK-P10-NEXT: stfsx f0, r3, r4
7428 ; CHECK-P10-NEXT: blr
7430 ; CHECK-P9-LABEL: st_align64_uint8_t_float:
7431 ; CHECK-P9: # %bb.0: # %entry
7432 ; CHECK-P9-NEXT: mtfprwz f0, r4
7433 ; CHECK-P9-NEXT: lis r4, 3725
7434 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
7435 ; CHECK-P9-NEXT: ori r4, r4, 19025
7436 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
7437 ; CHECK-P9-NEXT: stfsx f0, r3, r4
7438 ; CHECK-P9-NEXT: blr
7440 ; CHECK-P8-LABEL: st_align64_uint8_t_float:
7441 ; CHECK-P8: # %bb.0: # %entry
7442 ; CHECK-P8-NEXT: mtfprwz f0, r4
7443 ; CHECK-P8-NEXT: lis r4, 3725
7444 ; CHECK-P8-NEXT: ori r4, r4, 19025
7445 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
7446 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
7447 ; CHECK-P8-NEXT: stfsx f0, r3, r4
7448 ; CHECK-P8-NEXT: blr
7450 %conv = uitofp i8 %str to float
7451 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
7452 %0 = bitcast i8* %add.ptr to float*
7453 store float %conv, float* %0, align 4
7457 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7458 define dso_local void @st_reg_uint8_t_float(i8* nocapture %ptr, i64 %off, i8 zeroext %str) {
7459 ; CHECK-LABEL: st_reg_uint8_t_float:
7460 ; CHECK: # %bb.0: # %entry
7461 ; CHECK-NEXT: mtfprwz f0, r5
7462 ; CHECK-NEXT: xscvuxdsp f0, f0
7463 ; CHECK-NEXT: stfsx f0, r3, r4
7466 %conv = uitofp i8 %str to float
7467 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
7468 %0 = bitcast i8* %add.ptr to float*
7469 store float %conv, float* %0, align 4
7473 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7474 define dso_local void @st_or1_uint8_t_float(i64 %ptr, i8 zeroext %off, i8 zeroext %str) {
7475 ; CHECK-LABEL: st_or1_uint8_t_float:
7476 ; CHECK: # %bb.0: # %entry
7477 ; CHECK-NEXT: mtfprwz f0, r5
7478 ; CHECK-NEXT: or r3, r4, r3
7479 ; CHECK-NEXT: xscvuxdsp f0, f0
7480 ; CHECK-NEXT: stfs f0, 0(r3)
7483 %conv = uitofp i8 %str to float
7484 %conv1 = zext i8 %off to i64
7485 %or = or i64 %conv1, %ptr
7486 %0 = inttoptr i64 %or to float*
7487 store float %conv, float* %0, align 4
7491 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7492 define dso_local void @st_not_disjoint16_uint8_t_float(i64 %ptr, i8 zeroext %str) {
7493 ; CHECK-LABEL: st_not_disjoint16_uint8_t_float:
7494 ; CHECK: # %bb.0: # %entry
7495 ; CHECK-NEXT: mtfprwz f0, r4
7496 ; CHECK-NEXT: ori r3, r3, 6
7497 ; CHECK-NEXT: xscvuxdsp f0, f0
7498 ; CHECK-NEXT: stfs f0, 0(r3)
7501 %conv = uitofp i8 %str to float
7502 %or = or i64 %ptr, 6
7503 %0 = inttoptr i64 %or to float*
7504 store float %conv, float* %0, align 4
7508 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7509 define dso_local void @st_disjoint_align16_uint8_t_float(i64 %ptr, i8 zeroext %str) {
7510 ; CHECK-LABEL: st_disjoint_align16_uint8_t_float:
7511 ; CHECK: # %bb.0: # %entry
7512 ; CHECK-NEXT: mtfprwz f0, r4
7513 ; CHECK-NEXT: rldicr r3, r3, 0, 51
7514 ; CHECK-NEXT: xscvuxdsp f0, f0
7515 ; CHECK-NEXT: stfs f0, 24(r3)
7518 %and = and i64 %ptr, -4096
7519 %conv = uitofp i8 %str to float
7520 %or = or i64 %and, 24
7521 %0 = inttoptr i64 %or to float*
7522 store float %conv, float* %0, align 8
7526 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7527 define dso_local void @st_not_disjoint32_uint8_t_float(i64 %ptr, i8 zeroext %str) {
7528 ; CHECK-P10-LABEL: st_not_disjoint32_uint8_t_float:
7529 ; CHECK-P10: # %bb.0: # %entry
7530 ; CHECK-P10-NEXT: mtfprwz f0, r4
7531 ; CHECK-P10-NEXT: ori r3, r3, 34463
7532 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
7533 ; CHECK-P10-NEXT: oris r3, r3, 1
7534 ; CHECK-P10-NEXT: stfs f0, 0(r3)
7535 ; CHECK-P10-NEXT: blr
7537 ; CHECK-P9-LABEL: st_not_disjoint32_uint8_t_float:
7538 ; CHECK-P9: # %bb.0: # %entry
7539 ; CHECK-P9-NEXT: mtfprwz f0, r4
7540 ; CHECK-P9-NEXT: ori r3, r3, 34463
7541 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
7542 ; CHECK-P9-NEXT: oris r3, r3, 1
7543 ; CHECK-P9-NEXT: stfs f0, 0(r3)
7544 ; CHECK-P9-NEXT: blr
7546 ; CHECK-P8-LABEL: st_not_disjoint32_uint8_t_float:
7547 ; CHECK-P8: # %bb.0: # %entry
7548 ; CHECK-P8-NEXT: mtfprwz f0, r4
7549 ; CHECK-P8-NEXT: ori r3, r3, 34463
7550 ; CHECK-P8-NEXT: oris r3, r3, 1
7551 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
7552 ; CHECK-P8-NEXT: stfs f0, 0(r3)
7553 ; CHECK-P8-NEXT: blr
7555 %conv = uitofp i8 %str to float
7556 %or = or i64 %ptr, 99999
7557 %0 = inttoptr i64 %or to float*
7558 store float %conv, float* %0, align 4
7562 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7563 define dso_local void @st_disjoint_align32_uint8_t_float(i64 %ptr, i8 zeroext %str) {
7564 ; CHECK-P10-LABEL: st_disjoint_align32_uint8_t_float:
7565 ; CHECK-P10: # %bb.0: # %entry
7566 ; CHECK-P10-NEXT: mtfprwz f0, r4
7567 ; CHECK-P10-NEXT: lis r5, -15264
7568 ; CHECK-P10-NEXT: pli r4, 999990000
7569 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
7570 ; CHECK-P10-NEXT: and r3, r3, r5
7571 ; CHECK-P10-NEXT: stfsx f0, r3, r4
7572 ; CHECK-P10-NEXT: blr
7574 ; CHECK-P9-LABEL: st_disjoint_align32_uint8_t_float:
7575 ; CHECK-P9: # %bb.0: # %entry
7576 ; CHECK-P9-NEXT: mtfprwz f0, r4
7577 ; CHECK-P9-NEXT: lis r5, -15264
7578 ; CHECK-P9-NEXT: lis r4, 15258
7579 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
7580 ; CHECK-P9-NEXT: and r3, r3, r5
7581 ; CHECK-P9-NEXT: ori r4, r4, 41712
7582 ; CHECK-P9-NEXT: stfsx f0, r3, r4
7583 ; CHECK-P9-NEXT: blr
7585 ; CHECK-P8-LABEL: st_disjoint_align32_uint8_t_float:
7586 ; CHECK-P8: # %bb.0: # %entry
7587 ; CHECK-P8-NEXT: mtfprwz f0, r4
7588 ; CHECK-P8-NEXT: lis r4, -15264
7589 ; CHECK-P8-NEXT: lis r5, 15258
7590 ; CHECK-P8-NEXT: and r3, r3, r4
7591 ; CHECK-P8-NEXT: ori r4, r5, 41712
7592 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
7593 ; CHECK-P8-NEXT: stfsx f0, r3, r4
7594 ; CHECK-P8-NEXT: blr
7596 %and = and i64 %ptr, -1000341504
7597 %conv = uitofp i8 %str to float
7598 %or = or i64 %and, 999990000
7599 %0 = inttoptr i64 %or to float*
7600 store float %conv, float* %0, align 16
7604 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7605 define dso_local void @st_not_disjoint64_uint8_t_float(i64 %ptr, i8 zeroext %str) {
7606 ; CHECK-P10-LABEL: st_not_disjoint64_uint8_t_float:
7607 ; CHECK-P10: # %bb.0: # %entry
7608 ; CHECK-P10-NEXT: mtfprwz f0, r4
7609 ; CHECK-P10-NEXT: pli r4, 232
7610 ; CHECK-P10-NEXT: pli r5, 3567587329
7611 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
7612 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
7613 ; CHECK-P10-NEXT: or r3, r3, r5
7614 ; CHECK-P10-NEXT: stfs f0, 0(r3)
7615 ; CHECK-P10-NEXT: blr
7617 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint8_t_float:
7618 ; CHECK-PREP10: # %bb.0: # %entry
7619 ; CHECK-PREP10-NEXT: mtfprwz f0, r4
7620 ; CHECK-PREP10-NEXT: li r4, 29
7621 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
7622 ; CHECK-PREP10-NEXT: xscvuxdsp f0, f0
7623 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
7624 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
7625 ; CHECK-PREP10-NEXT: or r3, r3, r4
7626 ; CHECK-PREP10-NEXT: stfs f0, 0(r3)
7627 ; CHECK-PREP10-NEXT: blr
7629 %conv = uitofp i8 %str to float
7630 %or = or i64 %ptr, 1000000000001
7631 %0 = inttoptr i64 %or to float*
7632 store float %conv, float* %0, align 4
7636 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7637 define dso_local void @st_disjoint_align64_uint8_t_float(i64 %ptr, i8 zeroext %str) {
7638 ; CHECK-P10-LABEL: st_disjoint_align64_uint8_t_float:
7639 ; CHECK-P10: # %bb.0: # %entry
7640 ; CHECK-P10-NEXT: mtfprwz f0, r4
7641 ; CHECK-P10-NEXT: pli r4, 244140625
7642 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
7643 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7644 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
7645 ; CHECK-P10-NEXT: stfsx f0, r3, r4
7646 ; CHECK-P10-NEXT: blr
7648 ; CHECK-P9-LABEL: st_disjoint_align64_uint8_t_float:
7649 ; CHECK-P9: # %bb.0: # %entry
7650 ; CHECK-P9-NEXT: mtfprwz f0, r4
7651 ; CHECK-P9-NEXT: lis r4, 3725
7652 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
7653 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
7654 ; CHECK-P9-NEXT: ori r4, r4, 19025
7655 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
7656 ; CHECK-P9-NEXT: stfsx f0, r3, r4
7657 ; CHECK-P9-NEXT: blr
7659 ; CHECK-P8-LABEL: st_disjoint_align64_uint8_t_float:
7660 ; CHECK-P8: # %bb.0: # %entry
7661 ; CHECK-P8-NEXT: mtfprwz f0, r4
7662 ; CHECK-P8-NEXT: lis r5, 3725
7663 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
7664 ; CHECK-P8-NEXT: ori r4, r5, 19025
7665 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
7666 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
7667 ; CHECK-P8-NEXT: stfsx f0, r3, r4
7668 ; CHECK-P8-NEXT: blr
7670 %and = and i64 %ptr, -1099511627776
7671 %conv = uitofp i8 %str to float
7672 %or = or i64 %and, 1000000000000
7673 %0 = inttoptr i64 %or to float*
7674 store float %conv, float* %0, align 4096
7678 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7679 define dso_local void @st_cst_align16_uint8_t_float(i8 zeroext %str) {
7680 ; CHECK-LABEL: st_cst_align16_uint8_t_float:
7681 ; CHECK: # %bb.0: # %entry
7682 ; CHECK-NEXT: mtfprwz f0, r3
7683 ; CHECK-NEXT: xscvuxdsp f0, f0
7684 ; CHECK-NEXT: stfs f0, 4080(0)
7687 %conv = uitofp i8 %str to float
7688 store float %conv, float* inttoptr (i64 4080 to float*), align 16
7692 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7693 define dso_local void @st_cst_align32_uint8_t_float(i8 zeroext %str) {
7694 ; CHECK-LABEL: st_cst_align32_uint8_t_float:
7695 ; CHECK: # %bb.0: # %entry
7696 ; CHECK-NEXT: mtfprwz f0, r3
7697 ; CHECK-NEXT: lis r3, 153
7698 ; CHECK-NEXT: xscvuxdsp f0, f0
7699 ; CHECK-NEXT: stfs f0, -27108(r3)
7702 %conv = uitofp i8 %str to float
7703 store float %conv, float* inttoptr (i64 9999900 to float*), align 4
7707 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7708 define dso_local void @st_cst_align64_uint8_t_float(i8 zeroext %str) {
7709 ; CHECK-P10-LABEL: st_cst_align64_uint8_t_float:
7710 ; CHECK-P10: # %bb.0: # %entry
7711 ; CHECK-P10-NEXT: mtfprwz f0, r3
7712 ; CHECK-P10-NEXT: pli r3, 244140625
7713 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
7714 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
7715 ; CHECK-P10-NEXT: stfs f0, 0(r3)
7716 ; CHECK-P10-NEXT: blr
7718 ; CHECK-P9-LABEL: st_cst_align64_uint8_t_float:
7719 ; CHECK-P9: # %bb.0: # %entry
7720 ; CHECK-P9-NEXT: mtfprwz f0, r3
7721 ; CHECK-P9-NEXT: lis r3, 3725
7722 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
7723 ; CHECK-P9-NEXT: ori r3, r3, 19025
7724 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
7725 ; CHECK-P9-NEXT: stfs f0, 0(r3)
7726 ; CHECK-P9-NEXT: blr
7728 ; CHECK-P8-LABEL: st_cst_align64_uint8_t_float:
7729 ; CHECK-P8: # %bb.0: # %entry
7730 ; CHECK-P8-NEXT: mtfprwz f0, r3
7731 ; CHECK-P8-NEXT: lis r3, 3725
7732 ; CHECK-P8-NEXT: ori r3, r3, 19025
7733 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
7734 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
7735 ; CHECK-P8-NEXT: stfs f0, 0(r3)
7736 ; CHECK-P8-NEXT: blr
7738 %conv = uitofp i8 %str to float
7739 store float %conv, float* inttoptr (i64 1000000000000 to float*), align 4096
7743 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7744 define dso_local void @st_0_uint8_t_double(i64 %ptr, i8 zeroext %str) {
7745 ; CHECK-LABEL: st_0_uint8_t_double:
7746 ; CHECK: # %bb.0: # %entry
7747 ; CHECK-NEXT: mtfprwz f0, r4
7748 ; CHECK-NEXT: xscvuxddp f0, f0
7749 ; CHECK-NEXT: stfd f0, 0(r3)
7752 %conv = uitofp i8 %str to double
7753 %0 = inttoptr i64 %ptr to double*
7754 store double %conv, double* %0, align 8
7758 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7759 define dso_local void @st_align16_uint8_t_double(i8* nocapture %ptr, i8 zeroext %str) {
7760 ; CHECK-LABEL: st_align16_uint8_t_double:
7761 ; CHECK: # %bb.0: # %entry
7762 ; CHECK-NEXT: mtfprwz f0, r4
7763 ; CHECK-NEXT: xscvuxddp f0, f0
7764 ; CHECK-NEXT: stfd f0, 8(r3)
7767 %conv = uitofp i8 %str to double
7768 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
7769 %0 = bitcast i8* %add.ptr to double*
7770 store double %conv, double* %0, align 8
7774 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7775 define dso_local void @st_align32_uint8_t_double(i8* nocapture %ptr, i8 zeroext %str) {
7776 ; CHECK-P10-LABEL: st_align32_uint8_t_double:
7777 ; CHECK-P10: # %bb.0: # %entry
7778 ; CHECK-P10-NEXT: mtfprwz f0, r4
7779 ; CHECK-P10-NEXT: pli r4, 99999000
7780 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7781 ; CHECK-P10-NEXT: stfdx f0, r3, r4
7782 ; CHECK-P10-NEXT: blr
7784 ; CHECK-P9-LABEL: st_align32_uint8_t_double:
7785 ; CHECK-P9: # %bb.0: # %entry
7786 ; CHECK-P9-NEXT: mtfprwz f0, r4
7787 ; CHECK-P9-NEXT: lis r4, 1525
7788 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7789 ; CHECK-P9-NEXT: ori r4, r4, 56600
7790 ; CHECK-P9-NEXT: stfdx f0, r3, r4
7791 ; CHECK-P9-NEXT: blr
7793 ; CHECK-P8-LABEL: st_align32_uint8_t_double:
7794 ; CHECK-P8: # %bb.0: # %entry
7795 ; CHECK-P8-NEXT: mtfprwz f0, r4
7796 ; CHECK-P8-NEXT: lis r4, 1525
7797 ; CHECK-P8-NEXT: ori r4, r4, 56600
7798 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7799 ; CHECK-P8-NEXT: stfdx f0, r3, r4
7800 ; CHECK-P8-NEXT: blr
7802 %conv = uitofp i8 %str to double
7803 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
7804 %0 = bitcast i8* %add.ptr to double*
7805 store double %conv, double* %0, align 8
7809 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7810 define dso_local void @st_align64_uint8_t_double(i8* nocapture %ptr, i8 zeroext %str) {
7811 ; CHECK-P10-LABEL: st_align64_uint8_t_double:
7812 ; CHECK-P10: # %bb.0: # %entry
7813 ; CHECK-P10-NEXT: mtfprwz f0, r4
7814 ; CHECK-P10-NEXT: pli r4, 244140625
7815 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7816 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7817 ; CHECK-P10-NEXT: stfdx f0, r3, r4
7818 ; CHECK-P10-NEXT: blr
7820 ; CHECK-P9-LABEL: st_align64_uint8_t_double:
7821 ; CHECK-P9: # %bb.0: # %entry
7822 ; CHECK-P9-NEXT: mtfprwz f0, r4
7823 ; CHECK-P9-NEXT: lis r4, 3725
7824 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7825 ; CHECK-P9-NEXT: ori r4, r4, 19025
7826 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
7827 ; CHECK-P9-NEXT: stfdx f0, r3, r4
7828 ; CHECK-P9-NEXT: blr
7830 ; CHECK-P8-LABEL: st_align64_uint8_t_double:
7831 ; CHECK-P8: # %bb.0: # %entry
7832 ; CHECK-P8-NEXT: mtfprwz f0, r4
7833 ; CHECK-P8-NEXT: lis r4, 3725
7834 ; CHECK-P8-NEXT: ori r4, r4, 19025
7835 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7836 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
7837 ; CHECK-P8-NEXT: stfdx f0, r3, r4
7838 ; CHECK-P8-NEXT: blr
7840 %conv = uitofp i8 %str to double
7841 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
7842 %0 = bitcast i8* %add.ptr to double*
7843 store double %conv, double* %0, align 8
7847 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7848 define dso_local void @st_reg_uint8_t_double(i8* nocapture %ptr, i64 %off, i8 zeroext %str) {
7849 ; CHECK-LABEL: st_reg_uint8_t_double:
7850 ; CHECK: # %bb.0: # %entry
7851 ; CHECK-NEXT: mtfprwz f0, r5
7852 ; CHECK-NEXT: xscvuxddp f0, f0
7853 ; CHECK-NEXT: stfdx f0, r3, r4
7856 %conv = uitofp i8 %str to double
7857 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
7858 %0 = bitcast i8* %add.ptr to double*
7859 store double %conv, double* %0, align 8
7863 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7864 define dso_local void @st_or1_uint8_t_double(i64 %ptr, i8 zeroext %off, i8 zeroext %str) {
7865 ; CHECK-LABEL: st_or1_uint8_t_double:
7866 ; CHECK: # %bb.0: # %entry
7867 ; CHECK-NEXT: mtfprwz f0, r5
7868 ; CHECK-NEXT: or r3, r4, r3
7869 ; CHECK-NEXT: xscvuxddp f0, f0
7870 ; CHECK-NEXT: stfd f0, 0(r3)
7873 %conv = uitofp i8 %str to double
7874 %conv1 = zext i8 %off to i64
7875 %or = or i64 %conv1, %ptr
7876 %0 = inttoptr i64 %or to double*
7877 store double %conv, double* %0, align 8
7881 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7882 define dso_local void @st_not_disjoint16_uint8_t_double(i64 %ptr, i8 zeroext %str) {
7883 ; CHECK-LABEL: st_not_disjoint16_uint8_t_double:
7884 ; CHECK: # %bb.0: # %entry
7885 ; CHECK-NEXT: mtfprwz f0, r4
7886 ; CHECK-NEXT: ori r3, r3, 6
7887 ; CHECK-NEXT: xscvuxddp f0, f0
7888 ; CHECK-NEXT: stfd f0, 0(r3)
7891 %conv = uitofp i8 %str to double
7892 %or = or i64 %ptr, 6
7893 %0 = inttoptr i64 %or to double*
7894 store double %conv, double* %0, align 8
7898 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7899 define dso_local void @st_disjoint_align16_uint8_t_double(i64 %ptr, i8 zeroext %str) {
7900 ; CHECK-LABEL: st_disjoint_align16_uint8_t_double:
7901 ; CHECK: # %bb.0: # %entry
7902 ; CHECK-NEXT: mtfprwz f0, r4
7903 ; CHECK-NEXT: rldicr r3, r3, 0, 51
7904 ; CHECK-NEXT: xscvuxddp f0, f0
7905 ; CHECK-NEXT: stfd f0, 24(r3)
7908 %and = and i64 %ptr, -4096
7909 %conv = uitofp i8 %str to double
7910 %or = or i64 %and, 24
7911 %0 = inttoptr i64 %or to double*
7912 store double %conv, double* %0, align 8
7916 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7917 define dso_local void @st_not_disjoint32_uint8_t_double(i64 %ptr, i8 zeroext %str) {
7918 ; CHECK-P10-LABEL: st_not_disjoint32_uint8_t_double:
7919 ; CHECK-P10: # %bb.0: # %entry
7920 ; CHECK-P10-NEXT: mtfprwz f0, r4
7921 ; CHECK-P10-NEXT: ori r3, r3, 34463
7922 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7923 ; CHECK-P10-NEXT: oris r3, r3, 1
7924 ; CHECK-P10-NEXT: stfd f0, 0(r3)
7925 ; CHECK-P10-NEXT: blr
7927 ; CHECK-P9-LABEL: st_not_disjoint32_uint8_t_double:
7928 ; CHECK-P9: # %bb.0: # %entry
7929 ; CHECK-P9-NEXT: mtfprwz f0, r4
7930 ; CHECK-P9-NEXT: ori r3, r3, 34463
7931 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7932 ; CHECK-P9-NEXT: oris r3, r3, 1
7933 ; CHECK-P9-NEXT: stfd f0, 0(r3)
7934 ; CHECK-P9-NEXT: blr
7936 ; CHECK-P8-LABEL: st_not_disjoint32_uint8_t_double:
7937 ; CHECK-P8: # %bb.0: # %entry
7938 ; CHECK-P8-NEXT: mtfprwz f0, r4
7939 ; CHECK-P8-NEXT: ori r3, r3, 34463
7940 ; CHECK-P8-NEXT: oris r3, r3, 1
7941 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7942 ; CHECK-P8-NEXT: stfd f0, 0(r3)
7943 ; CHECK-P8-NEXT: blr
7945 %conv = uitofp i8 %str to double
7946 %or = or i64 %ptr, 99999
7947 %0 = inttoptr i64 %or to double*
7948 store double %conv, double* %0, align 8
7952 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7953 define dso_local void @st_disjoint_align32_uint8_t_double(i64 %ptr, i8 zeroext %str) {
7954 ; CHECK-P10-LABEL: st_disjoint_align32_uint8_t_double:
7955 ; CHECK-P10: # %bb.0: # %entry
7956 ; CHECK-P10-NEXT: mtfprwz f0, r4
7957 ; CHECK-P10-NEXT: lis r5, -15264
7958 ; CHECK-P10-NEXT: pli r4, 999990000
7959 ; CHECK-P10-NEXT: xscvuxddp f0, f0
7960 ; CHECK-P10-NEXT: and r3, r3, r5
7961 ; CHECK-P10-NEXT: stfdx f0, r3, r4
7962 ; CHECK-P10-NEXT: blr
7964 ; CHECK-P9-LABEL: st_disjoint_align32_uint8_t_double:
7965 ; CHECK-P9: # %bb.0: # %entry
7966 ; CHECK-P9-NEXT: mtfprwz f0, r4
7967 ; CHECK-P9-NEXT: lis r5, -15264
7968 ; CHECK-P9-NEXT: lis r4, 15258
7969 ; CHECK-P9-NEXT: xscvuxddp f0, f0
7970 ; CHECK-P9-NEXT: and r3, r3, r5
7971 ; CHECK-P9-NEXT: ori r4, r4, 41712
7972 ; CHECK-P9-NEXT: stfdx f0, r3, r4
7973 ; CHECK-P9-NEXT: blr
7975 ; CHECK-P8-LABEL: st_disjoint_align32_uint8_t_double:
7976 ; CHECK-P8: # %bb.0: # %entry
7977 ; CHECK-P8-NEXT: mtfprwz f0, r4
7978 ; CHECK-P8-NEXT: lis r4, -15264
7979 ; CHECK-P8-NEXT: lis r5, 15258
7980 ; CHECK-P8-NEXT: and r3, r3, r4
7981 ; CHECK-P8-NEXT: ori r4, r5, 41712
7982 ; CHECK-P8-NEXT: xscvuxddp f0, f0
7983 ; CHECK-P8-NEXT: stfdx f0, r3, r4
7984 ; CHECK-P8-NEXT: blr
7986 %and = and i64 %ptr, -1000341504
7987 %conv = uitofp i8 %str to double
7988 %or = or i64 %and, 999990000
7989 %0 = inttoptr i64 %or to double*
7990 store double %conv, double* %0, align 16
7994 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7995 define dso_local void @st_not_disjoint64_uint8_t_double(i64 %ptr, i8 zeroext %str) {
7996 ; CHECK-P10-LABEL: st_not_disjoint64_uint8_t_double:
7997 ; CHECK-P10: # %bb.0: # %entry
7998 ; CHECK-P10-NEXT: mtfprwz f0, r4
7999 ; CHECK-P10-NEXT: pli r4, 232
8000 ; CHECK-P10-NEXT: pli r5, 3567587329
8001 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
8002 ; CHECK-P10-NEXT: xscvuxddp f0, f0
8003 ; CHECK-P10-NEXT: or r3, r3, r5
8004 ; CHECK-P10-NEXT: stfd f0, 0(r3)
8005 ; CHECK-P10-NEXT: blr
8007 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint8_t_double:
8008 ; CHECK-PREP10: # %bb.0: # %entry
8009 ; CHECK-PREP10-NEXT: mtfprwz f0, r4
8010 ; CHECK-PREP10-NEXT: li r4, 29
8011 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
8012 ; CHECK-PREP10-NEXT: xscvuxddp f0, f0
8013 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
8014 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
8015 ; CHECK-PREP10-NEXT: or r3, r3, r4
8016 ; CHECK-PREP10-NEXT: stfd f0, 0(r3)
8017 ; CHECK-PREP10-NEXT: blr
8019 %conv = uitofp i8 %str to double
8020 %or = or i64 %ptr, 1000000000001
8021 %0 = inttoptr i64 %or to double*
8022 store double %conv, double* %0, align 8
8026 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8027 define dso_local void @st_disjoint_align64_uint8_t_double(i64 %ptr, i8 zeroext %str) {
8028 ; CHECK-P10-LABEL: st_disjoint_align64_uint8_t_double:
8029 ; CHECK-P10: # %bb.0: # %entry
8030 ; CHECK-P10-NEXT: mtfprwz f0, r4
8031 ; CHECK-P10-NEXT: pli r4, 244140625
8032 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
8033 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
8034 ; CHECK-P10-NEXT: xscvuxddp f0, f0
8035 ; CHECK-P10-NEXT: stfdx f0, r3, r4
8036 ; CHECK-P10-NEXT: blr
8038 ; CHECK-P9-LABEL: st_disjoint_align64_uint8_t_double:
8039 ; CHECK-P9: # %bb.0: # %entry
8040 ; CHECK-P9-NEXT: mtfprwz f0, r4
8041 ; CHECK-P9-NEXT: lis r4, 3725
8042 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
8043 ; CHECK-P9-NEXT: xscvuxddp f0, f0
8044 ; CHECK-P9-NEXT: ori r4, r4, 19025
8045 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
8046 ; CHECK-P9-NEXT: stfdx f0, r3, r4
8047 ; CHECK-P9-NEXT: blr
8049 ; CHECK-P8-LABEL: st_disjoint_align64_uint8_t_double:
8050 ; CHECK-P8: # %bb.0: # %entry
8051 ; CHECK-P8-NEXT: mtfprwz f0, r4
8052 ; CHECK-P8-NEXT: lis r5, 3725
8053 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
8054 ; CHECK-P8-NEXT: ori r4, r5, 19025
8055 ; CHECK-P8-NEXT: xscvuxddp f0, f0
8056 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
8057 ; CHECK-P8-NEXT: stfdx f0, r3, r4
8058 ; CHECK-P8-NEXT: blr
8060 %and = and i64 %ptr, -1099511627776
8061 %conv = uitofp i8 %str to double
8062 %or = or i64 %and, 1000000000000
8063 %0 = inttoptr i64 %or to double*
8064 store double %conv, double* %0, align 4096
8068 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8069 define dso_local void @st_cst_align16_uint8_t_double(i8 zeroext %str) {
8070 ; CHECK-LABEL: st_cst_align16_uint8_t_double:
8071 ; CHECK: # %bb.0: # %entry
8072 ; CHECK-NEXT: mtfprwz f0, r3
8073 ; CHECK-NEXT: xscvuxddp f0, f0
8074 ; CHECK-NEXT: stfd f0, 4080(0)
8077 %conv = uitofp i8 %str to double
8078 store double %conv, double* inttoptr (i64 4080 to double*), align 16
8082 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8083 define dso_local void @st_cst_align32_uint8_t_double(i8 zeroext %str) {
8084 ; CHECK-LABEL: st_cst_align32_uint8_t_double:
8085 ; CHECK: # %bb.0: # %entry
8086 ; CHECK-NEXT: mtfprwz f0, r3
8087 ; CHECK-NEXT: lis r3, 153
8088 ; CHECK-NEXT: xscvuxddp f0, f0
8089 ; CHECK-NEXT: stfd f0, -27108(r3)
8092 %conv = uitofp i8 %str to double
8093 store double %conv, double* inttoptr (i64 9999900 to double*), align 8
8097 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8098 define dso_local void @st_cst_align64_uint8_t_double(i8 zeroext %str) {
8099 ; CHECK-P10-LABEL: st_cst_align64_uint8_t_double:
8100 ; CHECK-P10: # %bb.0: # %entry
8101 ; CHECK-P10-NEXT: mtfprwz f0, r3
8102 ; CHECK-P10-NEXT: pli r3, 244140625
8103 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
8104 ; CHECK-P10-NEXT: xscvuxddp f0, f0
8105 ; CHECK-P10-NEXT: stfd f0, 0(r3)
8106 ; CHECK-P10-NEXT: blr
8108 ; CHECK-P9-LABEL: st_cst_align64_uint8_t_double:
8109 ; CHECK-P9: # %bb.0: # %entry
8110 ; CHECK-P9-NEXT: mtfprwz f0, r3
8111 ; CHECK-P9-NEXT: lis r3, 3725
8112 ; CHECK-P9-NEXT: xscvuxddp f0, f0
8113 ; CHECK-P9-NEXT: ori r3, r3, 19025
8114 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
8115 ; CHECK-P9-NEXT: stfd f0, 0(r3)
8116 ; CHECK-P9-NEXT: blr
8118 ; CHECK-P8-LABEL: st_cst_align64_uint8_t_double:
8119 ; CHECK-P8: # %bb.0: # %entry
8120 ; CHECK-P8-NEXT: mtfprwz f0, r3
8121 ; CHECK-P8-NEXT: lis r3, 3725
8122 ; CHECK-P8-NEXT: ori r3, r3, 19025
8123 ; CHECK-P8-NEXT: xscvuxddp f0, f0
8124 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
8125 ; CHECK-P8-NEXT: stfd f0, 0(r3)
8126 ; CHECK-P8-NEXT: blr
8128 %conv = uitofp i8 %str to double
8129 store double %conv, double* inttoptr (i64 1000000000000 to double*), align 4096
8133 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8134 define dso_local void @st_0_int8_t_uint16_t(i64 %ptr, i8 signext %str) {
8135 ; CHECK-LABEL: st_0_int8_t_uint16_t:
8136 ; CHECK: # %bb.0: # %entry
8137 ; CHECK-NEXT: sth r4, 0(r3)
8140 %conv = sext i8 %str to i16
8141 %0 = inttoptr i64 %ptr to i16*
8142 store i16 %conv, i16* %0, align 2
8146 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8147 define dso_local void @st_align16_int8_t_uint16_t(i8* nocapture %ptr, i8 signext %str) {
8148 ; CHECK-LABEL: st_align16_int8_t_uint16_t:
8149 ; CHECK: # %bb.0: # %entry
8150 ; CHECK-NEXT: sth r4, 8(r3)
8153 %conv = sext i8 %str to i16
8154 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
8155 %0 = bitcast i8* %add.ptr to i16*
8156 store i16 %conv, i16* %0, align 2
8160 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8161 define dso_local void @st_align32_int8_t_uint16_t(i8* nocapture %ptr, i8 signext %str) {
8162 ; CHECK-P10-LABEL: st_align32_int8_t_uint16_t:
8163 ; CHECK-P10: # %bb.0: # %entry
8164 ; CHECK-P10-NEXT: pli r5, 99999000
8165 ; CHECK-P10-NEXT: sthx r4, r3, r5
8166 ; CHECK-P10-NEXT: blr
8168 ; CHECK-PREP10-LABEL: st_align32_int8_t_uint16_t:
8169 ; CHECK-PREP10: # %bb.0: # %entry
8170 ; CHECK-PREP10-NEXT: lis r5, 1525
8171 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
8172 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
8173 ; CHECK-PREP10-NEXT: blr
8175 %conv = sext i8 %str to i16
8176 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
8177 %0 = bitcast i8* %add.ptr to i16*
8178 store i16 %conv, i16* %0, align 2
8182 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8183 define dso_local void @st_align64_int8_t_uint16_t(i8* nocapture %ptr, i8 signext %str) {
8184 ; CHECK-P10-LABEL: st_align64_int8_t_uint16_t:
8185 ; CHECK-P10: # %bb.0: # %entry
8186 ; CHECK-P10-NEXT: pli r5, 244140625
8187 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
8188 ; CHECK-P10-NEXT: sthx r4, r3, r5
8189 ; CHECK-P10-NEXT: blr
8191 ; CHECK-PREP10-LABEL: st_align64_int8_t_uint16_t:
8192 ; CHECK-PREP10: # %bb.0: # %entry
8193 ; CHECK-PREP10-NEXT: lis r5, 3725
8194 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
8195 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
8196 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
8197 ; CHECK-PREP10-NEXT: blr
8199 %conv = sext i8 %str to i16
8200 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
8201 %0 = bitcast i8* %add.ptr to i16*
8202 store i16 %conv, i16* %0, align 2
8206 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8207 define dso_local void @st_reg_int8_t_uint16_t(i8* nocapture %ptr, i64 %off, i8 signext %str) {
8208 ; CHECK-LABEL: st_reg_int8_t_uint16_t:
8209 ; CHECK: # %bb.0: # %entry
8210 ; CHECK-NEXT: sthx r5, r3, r4
8213 %conv = sext i8 %str to i16
8214 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
8215 %0 = bitcast i8* %add.ptr to i16*
8216 store i16 %conv, i16* %0, align 2
8220 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8221 define dso_local void @st_or1_int8_t_uint16_t(i64 %ptr, i8 zeroext %off, i8 signext %str) {
8222 ; CHECK-LABEL: st_or1_int8_t_uint16_t:
8223 ; CHECK: # %bb.0: # %entry
8224 ; CHECK-NEXT: or r3, r4, r3
8225 ; CHECK-NEXT: sth r5, 0(r3)
8228 %conv = sext i8 %str to i16
8229 %conv1 = zext i8 %off to i64
8230 %or = or i64 %conv1, %ptr
8231 %0 = inttoptr i64 %or to i16*
8232 store i16 %conv, i16* %0, align 2
8236 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8237 define dso_local void @st_not_disjoint16_int8_t_uint16_t(i64 %ptr, i8 signext %str) {
8238 ; CHECK-LABEL: st_not_disjoint16_int8_t_uint16_t:
8239 ; CHECK: # %bb.0: # %entry
8240 ; CHECK-NEXT: ori r3, r3, 6
8241 ; CHECK-NEXT: sth r4, 0(r3)
8244 %conv = sext i8 %str to i16
8245 %or = or i64 %ptr, 6
8246 %0 = inttoptr i64 %or to i16*
8247 store i16 %conv, i16* %0, align 2
8251 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8252 define dso_local void @st_disjoint_align16_int8_t_uint16_t(i64 %ptr, i8 signext %str) {
8253 ; CHECK-LABEL: st_disjoint_align16_int8_t_uint16_t:
8254 ; CHECK: # %bb.0: # %entry
8255 ; CHECK-NEXT: rldicr r3, r3, 0, 51
8256 ; CHECK-NEXT: sth r4, 24(r3)
8259 %and = and i64 %ptr, -4096
8260 %conv = sext i8 %str to i16
8261 %or = or i64 %and, 24
8262 %0 = inttoptr i64 %or to i16*
8263 store i16 %conv, i16* %0, align 8
8267 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8268 define dso_local void @st_not_disjoint32_int8_t_uint16_t(i64 %ptr, i8 signext %str) {
8269 ; CHECK-LABEL: st_not_disjoint32_int8_t_uint16_t:
8270 ; CHECK: # %bb.0: # %entry
8271 ; CHECK-NEXT: ori r3, r3, 34463
8272 ; CHECK-NEXT: oris r3, r3, 1
8273 ; CHECK-NEXT: sth r4, 0(r3)
8276 %conv = sext i8 %str to i16
8277 %or = or i64 %ptr, 99999
8278 %0 = inttoptr i64 %or to i16*
8279 store i16 %conv, i16* %0, align 2
8283 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8284 define dso_local void @st_disjoint_align32_int8_t_uint16_t(i64 %ptr, i8 signext %str) {
8285 ; CHECK-P10-LABEL: st_disjoint_align32_int8_t_uint16_t:
8286 ; CHECK-P10: # %bb.0: # %entry
8287 ; CHECK-P10-NEXT: lis r5, -15264
8288 ; CHECK-P10-NEXT: and r3, r3, r5
8289 ; CHECK-P10-NEXT: pli r5, 999990000
8290 ; CHECK-P10-NEXT: sthx r4, r3, r5
8291 ; CHECK-P10-NEXT: blr
8293 ; CHECK-P9-LABEL: st_disjoint_align32_int8_t_uint16_t:
8294 ; CHECK-P9: # %bb.0: # %entry
8295 ; CHECK-P9-NEXT: lis r5, -15264
8296 ; CHECK-P9-NEXT: and r3, r3, r5
8297 ; CHECK-P9-NEXT: lis r5, 15258
8298 ; CHECK-P9-NEXT: ori r5, r5, 41712
8299 ; CHECK-P9-NEXT: sthx r4, r3, r5
8300 ; CHECK-P9-NEXT: blr
8302 ; CHECK-P8-LABEL: st_disjoint_align32_int8_t_uint16_t:
8303 ; CHECK-P8: # %bb.0: # %entry
8304 ; CHECK-P8-NEXT: lis r5, -15264
8305 ; CHECK-P8-NEXT: lis r6, 15258
8306 ; CHECK-P8-NEXT: and r3, r3, r5
8307 ; CHECK-P8-NEXT: ori r5, r6, 41712
8308 ; CHECK-P8-NEXT: sthx r4, r3, r5
8309 ; CHECK-P8-NEXT: blr
8311 %and = and i64 %ptr, -1000341504
8312 %conv = sext i8 %str to i16
8313 %or = or i64 %and, 999990000
8314 %0 = inttoptr i64 %or to i16*
8315 store i16 %conv, i16* %0, align 16
8319 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8320 define dso_local void @st_not_disjoint64_int8_t_uint16_t(i64 %ptr, i8 signext %str) {
8321 ; CHECK-P10-LABEL: st_not_disjoint64_int8_t_uint16_t:
8322 ; CHECK-P10: # %bb.0: # %entry
8323 ; CHECK-P10-NEXT: pli r5, 232
8324 ; CHECK-P10-NEXT: pli r6, 3567587329
8325 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
8326 ; CHECK-P10-NEXT: or r3, r3, r6
8327 ; CHECK-P10-NEXT: sth r4, 0(r3)
8328 ; CHECK-P10-NEXT: blr
8330 ; CHECK-PREP10-LABEL: st_not_disjoint64_int8_t_uint16_t:
8331 ; CHECK-PREP10: # %bb.0: # %entry
8332 ; CHECK-PREP10-NEXT: li r5, 29
8333 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
8334 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
8335 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
8336 ; CHECK-PREP10-NEXT: or r3, r3, r5
8337 ; CHECK-PREP10-NEXT: sth r4, 0(r3)
8338 ; CHECK-PREP10-NEXT: blr
8340 %conv = sext i8 %str to i16
8341 %or = or i64 %ptr, 1000000000001
8342 %0 = inttoptr i64 %or to i16*
8343 store i16 %conv, i16* %0, align 2
8347 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8348 define dso_local void @st_disjoint_align64_int8_t_uint16_t(i64 %ptr, i8 signext %str) {
8349 ; CHECK-P10-LABEL: st_disjoint_align64_int8_t_uint16_t:
8350 ; CHECK-P10: # %bb.0: # %entry
8351 ; CHECK-P10-NEXT: pli r5, 244140625
8352 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
8353 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
8354 ; CHECK-P10-NEXT: sthx r4, r3, r5
8355 ; CHECK-P10-NEXT: blr
8357 ; CHECK-PREP10-LABEL: st_disjoint_align64_int8_t_uint16_t:
8358 ; CHECK-PREP10: # %bb.0: # %entry
8359 ; CHECK-PREP10-NEXT: lis r5, 3725
8360 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
8361 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
8362 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
8363 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
8364 ; CHECK-PREP10-NEXT: blr
8366 %and = and i64 %ptr, -1099511627776
8367 %conv = sext i8 %str to i16
8368 %or = or i64 %and, 1000000000000
8369 %0 = inttoptr i64 %or to i16*
8370 store i16 %conv, i16* %0, align 4096
8374 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8375 define dso_local void @st_cst_align16_int8_t_uint16_t(i8 signext %str) {
8376 ; CHECK-LABEL: st_cst_align16_int8_t_uint16_t:
8377 ; CHECK: # %bb.0: # %entry
8378 ; CHECK-NEXT: sth r3, 4080(0)
8381 %conv = sext i8 %str to i16
8382 store i16 %conv, i16* inttoptr (i64 4080 to i16*), align 16
8386 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8387 define dso_local void @st_cst_align32_int8_t_uint16_t(i8 signext %str) {
8388 ; CHECK-LABEL: st_cst_align32_int8_t_uint16_t:
8389 ; CHECK: # %bb.0: # %entry
8390 ; CHECK-NEXT: lis r4, 153
8391 ; CHECK-NEXT: sth r3, -27108(r4)
8394 %conv = sext i8 %str to i16
8395 store i16 %conv, i16* inttoptr (i64 9999900 to i16*), align 4
8399 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8400 define dso_local void @st_cst_align64_int8_t_uint16_t(i8 signext %str) {
8401 ; CHECK-P10-LABEL: st_cst_align64_int8_t_uint16_t:
8402 ; CHECK-P10: # %bb.0: # %entry
8403 ; CHECK-P10-NEXT: pli r4, 244140625
8404 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
8405 ; CHECK-P10-NEXT: sth r3, 0(r4)
8406 ; CHECK-P10-NEXT: blr
8408 ; CHECK-PREP10-LABEL: st_cst_align64_int8_t_uint16_t:
8409 ; CHECK-PREP10: # %bb.0: # %entry
8410 ; CHECK-PREP10-NEXT: lis r4, 3725
8411 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
8412 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
8413 ; CHECK-PREP10-NEXT: sth r3, 0(r4)
8414 ; CHECK-PREP10-NEXT: blr
8416 %conv = sext i8 %str to i16
8417 store i16 %conv, i16* inttoptr (i64 1000000000000 to i16*), align 4096
8421 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8422 define dso_local void @st_0_int8_t_uint32_t(i64 %ptr, i8 signext %str) {
8423 ; CHECK-LABEL: st_0_int8_t_uint32_t:
8424 ; CHECK: # %bb.0: # %entry
8425 ; CHECK-NEXT: stw r4, 0(r3)
8428 %conv = sext i8 %str to i32
8429 %0 = inttoptr i64 %ptr to i32*
8430 store i32 %conv, i32* %0, align 4
8434 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8435 define dso_local void @st_align16_int8_t_uint32_t(i8* nocapture %ptr, i8 signext %str) {
8436 ; CHECK-LABEL: st_align16_int8_t_uint32_t:
8437 ; CHECK: # %bb.0: # %entry
8438 ; CHECK-NEXT: stw r4, 8(r3)
8441 %conv = sext i8 %str to i32
8442 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
8443 %0 = bitcast i8* %add.ptr to i32*
8444 store i32 %conv, i32* %0, align 4
8448 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8449 define dso_local void @st_align32_int8_t_uint32_t(i8* nocapture %ptr, i8 signext %str) {
8450 ; CHECK-P10-LABEL: st_align32_int8_t_uint32_t:
8451 ; CHECK-P10: # %bb.0: # %entry
8452 ; CHECK-P10-NEXT: pli r5, 99999000
8453 ; CHECK-P10-NEXT: stwx r4, r3, r5
8454 ; CHECK-P10-NEXT: blr
8456 ; CHECK-PREP10-LABEL: st_align32_int8_t_uint32_t:
8457 ; CHECK-PREP10: # %bb.0: # %entry
8458 ; CHECK-PREP10-NEXT: lis r5, 1525
8459 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
8460 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
8461 ; CHECK-PREP10-NEXT: blr
8463 %conv = sext i8 %str to i32
8464 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
8465 %0 = bitcast i8* %add.ptr to i32*
8466 store i32 %conv, i32* %0, align 4
8470 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8471 define dso_local void @st_align64_int8_t_uint32_t(i8* nocapture %ptr, i8 signext %str) {
8472 ; CHECK-P10-LABEL: st_align64_int8_t_uint32_t:
8473 ; CHECK-P10: # %bb.0: # %entry
8474 ; CHECK-P10-NEXT: pli r5, 244140625
8475 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
8476 ; CHECK-P10-NEXT: stwx r4, r3, r5
8477 ; CHECK-P10-NEXT: blr
8479 ; CHECK-PREP10-LABEL: st_align64_int8_t_uint32_t:
8480 ; CHECK-PREP10: # %bb.0: # %entry
8481 ; CHECK-PREP10-NEXT: lis r5, 3725
8482 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
8483 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
8484 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
8485 ; CHECK-PREP10-NEXT: blr
8487 %conv = sext i8 %str to i32
8488 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
8489 %0 = bitcast i8* %add.ptr to i32*
8490 store i32 %conv, i32* %0, align 4
8494 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8495 define dso_local void @st_reg_int8_t_uint32_t(i8* nocapture %ptr, i64 %off, i8 signext %str) {
8496 ; CHECK-LABEL: st_reg_int8_t_uint32_t:
8497 ; CHECK: # %bb.0: # %entry
8498 ; CHECK-NEXT: stwx r5, r3, r4
8501 %conv = sext i8 %str to i32
8502 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
8503 %0 = bitcast i8* %add.ptr to i32*
8504 store i32 %conv, i32* %0, align 4
8508 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8509 define dso_local void @st_or1_int8_t_uint32_t(i64 %ptr, i8 zeroext %off, i8 signext %str) {
8510 ; CHECK-LABEL: st_or1_int8_t_uint32_t:
8511 ; CHECK: # %bb.0: # %entry
8512 ; CHECK-NEXT: or r3, r4, r3
8513 ; CHECK-NEXT: stw r5, 0(r3)
8516 %conv = sext i8 %str to i32
8517 %conv1 = zext i8 %off to i64
8518 %or = or i64 %conv1, %ptr
8519 %0 = inttoptr i64 %or to i32*
8520 store i32 %conv, i32* %0, align 4
8524 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8525 define dso_local void @st_not_disjoint16_int8_t_uint32_t(i64 %ptr, i8 signext %str) {
8526 ; CHECK-LABEL: st_not_disjoint16_int8_t_uint32_t:
8527 ; CHECK: # %bb.0: # %entry
8528 ; CHECK-NEXT: ori r3, r3, 6
8529 ; CHECK-NEXT: stw r4, 0(r3)
8532 %conv = sext i8 %str to i32
8533 %or = or i64 %ptr, 6
8534 %0 = inttoptr i64 %or to i32*
8535 store i32 %conv, i32* %0, align 4
8539 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8540 define dso_local void @st_disjoint_align16_int8_t_uint32_t(i64 %ptr, i8 signext %str) {
8541 ; CHECK-LABEL: st_disjoint_align16_int8_t_uint32_t:
8542 ; CHECK: # %bb.0: # %entry
8543 ; CHECK-NEXT: rldicr r3, r3, 0, 51
8544 ; CHECK-NEXT: stw r4, 24(r3)
8547 %and = and i64 %ptr, -4096
8548 %conv = sext i8 %str to i32
8549 %or = or i64 %and, 24
8550 %0 = inttoptr i64 %or to i32*
8551 store i32 %conv, i32* %0, align 8
8555 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8556 define dso_local void @st_not_disjoint32_int8_t_uint32_t(i64 %ptr, i8 signext %str) {
8557 ; CHECK-LABEL: st_not_disjoint32_int8_t_uint32_t:
8558 ; CHECK: # %bb.0: # %entry
8559 ; CHECK-NEXT: ori r3, r3, 34463
8560 ; CHECK-NEXT: oris r3, r3, 1
8561 ; CHECK-NEXT: stw r4, 0(r3)
8564 %conv = sext i8 %str to i32
8565 %or = or i64 %ptr, 99999
8566 %0 = inttoptr i64 %or to i32*
8567 store i32 %conv, i32* %0, align 4
8571 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8572 define dso_local void @st_disjoint_align32_int8_t_uint32_t(i64 %ptr, i8 signext %str) {
8573 ; CHECK-P10-LABEL: st_disjoint_align32_int8_t_uint32_t:
8574 ; CHECK-P10: # %bb.0: # %entry
8575 ; CHECK-P10-NEXT: lis r5, -15264
8576 ; CHECK-P10-NEXT: and r3, r3, r5
8577 ; CHECK-P10-NEXT: pli r5, 999990000
8578 ; CHECK-P10-NEXT: stwx r4, r3, r5
8579 ; CHECK-P10-NEXT: blr
8581 ; CHECK-P9-LABEL: st_disjoint_align32_int8_t_uint32_t:
8582 ; CHECK-P9: # %bb.0: # %entry
8583 ; CHECK-P9-NEXT: lis r5, -15264
8584 ; CHECK-P9-NEXT: and r3, r3, r5
8585 ; CHECK-P9-NEXT: lis r5, 15258
8586 ; CHECK-P9-NEXT: ori r5, r5, 41712
8587 ; CHECK-P9-NEXT: stwx r4, r3, r5
8588 ; CHECK-P9-NEXT: blr
8590 ; CHECK-P8-LABEL: st_disjoint_align32_int8_t_uint32_t:
8591 ; CHECK-P8: # %bb.0: # %entry
8592 ; CHECK-P8-NEXT: lis r5, -15264
8593 ; CHECK-P8-NEXT: lis r6, 15258
8594 ; CHECK-P8-NEXT: and r3, r3, r5
8595 ; CHECK-P8-NEXT: ori r5, r6, 41712
8596 ; CHECK-P8-NEXT: stwx r4, r3, r5
8597 ; CHECK-P8-NEXT: blr
8599 %and = and i64 %ptr, -1000341504
8600 %conv = sext i8 %str to i32
8601 %or = or i64 %and, 999990000
8602 %0 = inttoptr i64 %or to i32*
8603 store i32 %conv, i32* %0, align 16
8607 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8608 define dso_local void @st_not_disjoint64_int8_t_uint32_t(i64 %ptr, i8 signext %str) {
8609 ; CHECK-P10-LABEL: st_not_disjoint64_int8_t_uint32_t:
8610 ; CHECK-P10: # %bb.0: # %entry
8611 ; CHECK-P10-NEXT: pli r5, 232
8612 ; CHECK-P10-NEXT: pli r6, 3567587329
8613 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
8614 ; CHECK-P10-NEXT: or r3, r3, r6
8615 ; CHECK-P10-NEXT: stw r4, 0(r3)
8616 ; CHECK-P10-NEXT: blr
8618 ; CHECK-PREP10-LABEL: st_not_disjoint64_int8_t_uint32_t:
8619 ; CHECK-PREP10: # %bb.0: # %entry
8620 ; CHECK-PREP10-NEXT: li r5, 29
8621 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
8622 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
8623 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
8624 ; CHECK-PREP10-NEXT: or r3, r3, r5
8625 ; CHECK-PREP10-NEXT: stw r4, 0(r3)
8626 ; CHECK-PREP10-NEXT: blr
8628 %conv = sext i8 %str to i32
8629 %or = or i64 %ptr, 1000000000001
8630 %0 = inttoptr i64 %or to i32*
8631 store i32 %conv, i32* %0, align 4
8635 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8636 define dso_local void @st_disjoint_align64_int8_t_uint32_t(i64 %ptr, i8 signext %str) {
8637 ; CHECK-P10-LABEL: st_disjoint_align64_int8_t_uint32_t:
8638 ; CHECK-P10: # %bb.0: # %entry
8639 ; CHECK-P10-NEXT: pli r5, 244140625
8640 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
8641 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
8642 ; CHECK-P10-NEXT: stwx r4, r3, r5
8643 ; CHECK-P10-NEXT: blr
8645 ; CHECK-PREP10-LABEL: st_disjoint_align64_int8_t_uint32_t:
8646 ; CHECK-PREP10: # %bb.0: # %entry
8647 ; CHECK-PREP10-NEXT: lis r5, 3725
8648 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
8649 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
8650 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
8651 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
8652 ; CHECK-PREP10-NEXT: blr
8654 %and = and i64 %ptr, -1099511627776
8655 %conv = sext i8 %str to i32
8656 %or = or i64 %and, 1000000000000
8657 %0 = inttoptr i64 %or to i32*
8658 store i32 %conv, i32* %0, align 4096
8662 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8663 define dso_local void @st_cst_align16_int8_t_uint32_t(i8 signext %str) {
8664 ; CHECK-LABEL: st_cst_align16_int8_t_uint32_t:
8665 ; CHECK: # %bb.0: # %entry
8666 ; CHECK-NEXT: stw r3, 4080(0)
8669 %conv = sext i8 %str to i32
8670 store i32 %conv, i32* inttoptr (i64 4080 to i32*), align 16
8674 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8675 define dso_local void @st_cst_align32_int8_t_uint32_t(i8 signext %str) {
8676 ; CHECK-LABEL: st_cst_align32_int8_t_uint32_t:
8677 ; CHECK: # %bb.0: # %entry
8678 ; CHECK-NEXT: lis r4, 153
8679 ; CHECK-NEXT: stw r3, -27108(r4)
8682 %conv = sext i8 %str to i32
8683 store i32 %conv, i32* inttoptr (i64 9999900 to i32*), align 4
8687 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8688 define dso_local void @st_cst_align64_int8_t_uint32_t(i8 signext %str) {
8689 ; CHECK-P10-LABEL: st_cst_align64_int8_t_uint32_t:
8690 ; CHECK-P10: # %bb.0: # %entry
8691 ; CHECK-P10-NEXT: pli r4, 244140625
8692 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
8693 ; CHECK-P10-NEXT: stw r3, 0(r4)
8694 ; CHECK-P10-NEXT: blr
8696 ; CHECK-PREP10-LABEL: st_cst_align64_int8_t_uint32_t:
8697 ; CHECK-PREP10: # %bb.0: # %entry
8698 ; CHECK-PREP10-NEXT: lis r4, 3725
8699 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
8700 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
8701 ; CHECK-PREP10-NEXT: stw r3, 0(r4)
8702 ; CHECK-PREP10-NEXT: blr
8704 %conv = sext i8 %str to i32
8705 store i32 %conv, i32* inttoptr (i64 1000000000000 to i32*), align 4096
8709 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8710 define dso_local void @st_0_int8_t_uint64_t(i64 %ptr, i8 signext %str) {
8711 ; CHECK-LABEL: st_0_int8_t_uint64_t:
8712 ; CHECK: # %bb.0: # %entry
8713 ; CHECK-NEXT: std r4, 0(r3)
8716 %conv = sext i8 %str to i64
8717 %0 = inttoptr i64 %ptr to i64*
8718 store i64 %conv, i64* %0, align 8
8722 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8723 define dso_local void @st_align16_int8_t_uint64_t(i8* nocapture %ptr, i8 signext %str) {
8724 ; CHECK-LABEL: st_align16_int8_t_uint64_t:
8725 ; CHECK: # %bb.0: # %entry
8726 ; CHECK-NEXT: std r4, 8(r3)
8729 %conv = sext i8 %str to i64
8730 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
8731 %0 = bitcast i8* %add.ptr to i64*
8732 store i64 %conv, i64* %0, align 8
8736 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8737 define dso_local void @st_align32_int8_t_uint64_t(i8* nocapture %ptr, i8 signext %str) {
8738 ; CHECK-P10-LABEL: st_align32_int8_t_uint64_t:
8739 ; CHECK-P10: # %bb.0: # %entry
8740 ; CHECK-P10-NEXT: pli r5, 99999000
8741 ; CHECK-P10-NEXT: stdx r4, r3, r5
8742 ; CHECK-P10-NEXT: blr
8744 ; CHECK-PREP10-LABEL: st_align32_int8_t_uint64_t:
8745 ; CHECK-PREP10: # %bb.0: # %entry
8746 ; CHECK-PREP10-NEXT: lis r5, 1525
8747 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
8748 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
8749 ; CHECK-PREP10-NEXT: blr
8751 %conv = sext i8 %str to i64
8752 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
8753 %0 = bitcast i8* %add.ptr to i64*
8754 store i64 %conv, i64* %0, align 8
8758 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8759 define dso_local void @st_align64_int8_t_uint64_t(i8* nocapture %ptr, i8 signext %str) {
8760 ; CHECK-P10-LABEL: st_align64_int8_t_uint64_t:
8761 ; CHECK-P10: # %bb.0: # %entry
8762 ; CHECK-P10-NEXT: pli r5, 244140625
8763 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
8764 ; CHECK-P10-NEXT: stdx r4, r3, r5
8765 ; CHECK-P10-NEXT: blr
8767 ; CHECK-PREP10-LABEL: st_align64_int8_t_uint64_t:
8768 ; CHECK-PREP10: # %bb.0: # %entry
8769 ; CHECK-PREP10-NEXT: lis r5, 3725
8770 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
8771 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
8772 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
8773 ; CHECK-PREP10-NEXT: blr
8775 %conv = sext i8 %str to i64
8776 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
8777 %0 = bitcast i8* %add.ptr to i64*
8778 store i64 %conv, i64* %0, align 8
8782 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8783 define dso_local void @st_reg_int8_t_uint64_t(i8* nocapture %ptr, i64 %off, i8 signext %str) {
8784 ; CHECK-LABEL: st_reg_int8_t_uint64_t:
8785 ; CHECK: # %bb.0: # %entry
8786 ; CHECK-NEXT: stdx r5, r3, r4
8789 %conv = sext i8 %str to i64
8790 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
8791 %0 = bitcast i8* %add.ptr to i64*
8792 store i64 %conv, i64* %0, align 8
8796 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8797 define dso_local void @st_or1_int8_t_uint64_t(i64 %ptr, i8 zeroext %off, i8 signext %str) {
8798 ; CHECK-LABEL: st_or1_int8_t_uint64_t:
8799 ; CHECK: # %bb.0: # %entry
8800 ; CHECK-NEXT: or r3, r4, r3
8801 ; CHECK-NEXT: std r5, 0(r3)
8804 %conv = sext i8 %str to i64
8805 %conv1 = zext i8 %off to i64
8806 %or = or i64 %conv1, %ptr
8807 %0 = inttoptr i64 %or to i64*
8808 store i64 %conv, i64* %0, align 8
8812 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8813 define dso_local void @st_not_disjoint16_int8_t_uint64_t(i64 %ptr, i8 signext %str) {
8814 ; CHECK-LABEL: st_not_disjoint16_int8_t_uint64_t:
8815 ; CHECK: # %bb.0: # %entry
8816 ; CHECK-NEXT: ori r3, r3, 6
8817 ; CHECK-NEXT: std r4, 0(r3)
8820 %conv = sext i8 %str to i64
8821 %or = or i64 %ptr, 6
8822 %0 = inttoptr i64 %or to i64*
8823 store i64 %conv, i64* %0, align 8
8827 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8828 define dso_local void @st_disjoint_align16_int8_t_uint64_t(i64 %ptr, i8 signext %str) {
8829 ; CHECK-LABEL: st_disjoint_align16_int8_t_uint64_t:
8830 ; CHECK: # %bb.0: # %entry
8831 ; CHECK-NEXT: rldicr r3, r3, 0, 51
8832 ; CHECK-NEXT: std r4, 24(r3)
8835 %and = and i64 %ptr, -4096
8836 %conv = sext i8 %str to i64
8837 %or = or i64 %and, 24
8838 %0 = inttoptr i64 %or to i64*
8839 store i64 %conv, i64* %0, align 8
8843 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8844 define dso_local void @st_not_disjoint32_int8_t_uint64_t(i64 %ptr, i8 signext %str) {
8845 ; CHECK-LABEL: st_not_disjoint32_int8_t_uint64_t:
8846 ; CHECK: # %bb.0: # %entry
8847 ; CHECK-NEXT: ori r3, r3, 34463
8848 ; CHECK-NEXT: oris r3, r3, 1
8849 ; CHECK-NEXT: std r4, 0(r3)
8852 %conv = sext i8 %str to i64
8853 %or = or i64 %ptr, 99999
8854 %0 = inttoptr i64 %or to i64*
8855 store i64 %conv, i64* %0, align 8
8859 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8860 define dso_local void @st_disjoint_align32_int8_t_uint64_t(i64 %ptr, i8 signext %str) {
8861 ; CHECK-P10-LABEL: st_disjoint_align32_int8_t_uint64_t:
8862 ; CHECK-P10: # %bb.0: # %entry
8863 ; CHECK-P10-NEXT: lis r5, -15264
8864 ; CHECK-P10-NEXT: and r3, r3, r5
8865 ; CHECK-P10-NEXT: pli r5, 999990000
8866 ; CHECK-P10-NEXT: stdx r4, r3, r5
8867 ; CHECK-P10-NEXT: blr
8869 ; CHECK-P9-LABEL: st_disjoint_align32_int8_t_uint64_t:
8870 ; CHECK-P9: # %bb.0: # %entry
8871 ; CHECK-P9-NEXT: lis r5, -15264
8872 ; CHECK-P9-NEXT: and r3, r3, r5
8873 ; CHECK-P9-NEXT: lis r5, 15258
8874 ; CHECK-P9-NEXT: ori r5, r5, 41712
8875 ; CHECK-P9-NEXT: stdx r4, r3, r5
8876 ; CHECK-P9-NEXT: blr
8878 ; CHECK-P8-LABEL: st_disjoint_align32_int8_t_uint64_t:
8879 ; CHECK-P8: # %bb.0: # %entry
8880 ; CHECK-P8-NEXT: lis r5, -15264
8881 ; CHECK-P8-NEXT: lis r6, 15258
8882 ; CHECK-P8-NEXT: and r3, r3, r5
8883 ; CHECK-P8-NEXT: ori r5, r6, 41712
8884 ; CHECK-P8-NEXT: stdx r4, r3, r5
8885 ; CHECK-P8-NEXT: blr
8887 %and = and i64 %ptr, -1000341504
8888 %conv = sext i8 %str to i64
8889 %or = or i64 %and, 999990000
8890 %0 = inttoptr i64 %or to i64*
8891 store i64 %conv, i64* %0, align 16
8895 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8896 define dso_local void @st_not_disjoint64_int8_t_uint64_t(i64 %ptr, i8 signext %str) {
8897 ; CHECK-P10-LABEL: st_not_disjoint64_int8_t_uint64_t:
8898 ; CHECK-P10: # %bb.0: # %entry
8899 ; CHECK-P10-NEXT: pli r5, 232
8900 ; CHECK-P10-NEXT: pli r6, 3567587329
8901 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
8902 ; CHECK-P10-NEXT: or r3, r3, r6
8903 ; CHECK-P10-NEXT: std r4, 0(r3)
8904 ; CHECK-P10-NEXT: blr
8906 ; CHECK-PREP10-LABEL: st_not_disjoint64_int8_t_uint64_t:
8907 ; CHECK-PREP10: # %bb.0: # %entry
8908 ; CHECK-PREP10-NEXT: li r5, 29
8909 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
8910 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
8911 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
8912 ; CHECK-PREP10-NEXT: or r3, r3, r5
8913 ; CHECK-PREP10-NEXT: std r4, 0(r3)
8914 ; CHECK-PREP10-NEXT: blr
8916 %conv = sext i8 %str to i64
8917 %or = or i64 %ptr, 1000000000001
8918 %0 = inttoptr i64 %or to i64*
8919 store i64 %conv, i64* %0, align 8
8923 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8924 define dso_local void @st_disjoint_align64_int8_t_uint64_t(i64 %ptr, i8 signext %str) {
8925 ; CHECK-P10-LABEL: st_disjoint_align64_int8_t_uint64_t:
8926 ; CHECK-P10: # %bb.0: # %entry
8927 ; CHECK-P10-NEXT: pli r5, 244140625
8928 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
8929 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
8930 ; CHECK-P10-NEXT: stdx r4, r3, r5
8931 ; CHECK-P10-NEXT: blr
8933 ; CHECK-PREP10-LABEL: st_disjoint_align64_int8_t_uint64_t:
8934 ; CHECK-PREP10: # %bb.0: # %entry
8935 ; CHECK-PREP10-NEXT: lis r5, 3725
8936 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
8937 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
8938 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
8939 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
8940 ; CHECK-PREP10-NEXT: blr
8942 %and = and i64 %ptr, -1099511627776
8943 %conv = sext i8 %str to i64
8944 %or = or i64 %and, 1000000000000
8945 %0 = inttoptr i64 %or to i64*
8946 store i64 %conv, i64* %0, align 4096
8950 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8951 define dso_local void @st_cst_align16_int8_t_uint64_t(i8 signext %str) {
8952 ; CHECK-LABEL: st_cst_align16_int8_t_uint64_t:
8953 ; CHECK: # %bb.0: # %entry
8954 ; CHECK-NEXT: std r3, 4080(0)
8957 %conv = sext i8 %str to i64
8958 store i64 %conv, i64* inttoptr (i64 4080 to i64*), align 16
8962 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8963 define dso_local void @st_cst_align32_int8_t_uint64_t(i8 signext %str) {
8964 ; CHECK-LABEL: st_cst_align32_int8_t_uint64_t:
8965 ; CHECK: # %bb.0: # %entry
8966 ; CHECK-NEXT: lis r4, 153
8967 ; CHECK-NEXT: std r3, -27108(r4)
8970 %conv = sext i8 %str to i64
8971 store i64 %conv, i64* inttoptr (i64 9999900 to i64*), align 8
8975 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8976 define dso_local void @st_cst_align64_int8_t_uint64_t(i8 signext %str) {
8977 ; CHECK-P10-LABEL: st_cst_align64_int8_t_uint64_t:
8978 ; CHECK-P10: # %bb.0: # %entry
8979 ; CHECK-P10-NEXT: pli r4, 244140625
8980 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
8981 ; CHECK-P10-NEXT: std r3, 0(r4)
8982 ; CHECK-P10-NEXT: blr
8984 ; CHECK-PREP10-LABEL: st_cst_align64_int8_t_uint64_t:
8985 ; CHECK-PREP10: # %bb.0: # %entry
8986 ; CHECK-PREP10-NEXT: lis r4, 3725
8987 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
8988 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
8989 ; CHECK-PREP10-NEXT: std r3, 0(r4)
8990 ; CHECK-PREP10-NEXT: blr
8992 %conv = sext i8 %str to i64
8993 store i64 %conv, i64* inttoptr (i64 1000000000000 to i64*), align 4096
8997 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8998 define dso_local void @st_0_int8_t_float(i64 %ptr, i8 signext %str) {
8999 ; CHECK-LABEL: st_0_int8_t_float:
9000 ; CHECK: # %bb.0: # %entry
9001 ; CHECK-NEXT: mtfprwa f0, r4
9002 ; CHECK-NEXT: xscvsxdsp f0, f0
9003 ; CHECK-NEXT: stfs f0, 0(r3)
9006 %conv = sitofp i8 %str to float
9007 %0 = inttoptr i64 %ptr to float*
9008 store float %conv, float* %0, align 4
9012 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9013 define dso_local void @st_align16_int8_t_float(i8* nocapture %ptr, i8 signext %str) {
9014 ; CHECK-LABEL: st_align16_int8_t_float:
9015 ; CHECK: # %bb.0: # %entry
9016 ; CHECK-NEXT: mtfprwa f0, r4
9017 ; CHECK-NEXT: xscvsxdsp f0, f0
9018 ; CHECK-NEXT: stfs f0, 8(r3)
9021 %conv = sitofp i8 %str to float
9022 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
9023 %0 = bitcast i8* %add.ptr to float*
9024 store float %conv, float* %0, align 4
9028 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9029 define dso_local void @st_align32_int8_t_float(i8* nocapture %ptr, i8 signext %str) {
9030 ; CHECK-P10-LABEL: st_align32_int8_t_float:
9031 ; CHECK-P10: # %bb.0: # %entry
9032 ; CHECK-P10-NEXT: mtfprwa f0, r4
9033 ; CHECK-P10-NEXT: pli r4, 99999000
9034 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
9035 ; CHECK-P10-NEXT: stfsx f0, r3, r4
9036 ; CHECK-P10-NEXT: blr
9038 ; CHECK-P9-LABEL: st_align32_int8_t_float:
9039 ; CHECK-P9: # %bb.0: # %entry
9040 ; CHECK-P9-NEXT: mtfprwa f0, r4
9041 ; CHECK-P9-NEXT: lis r4, 1525
9042 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
9043 ; CHECK-P9-NEXT: ori r4, r4, 56600
9044 ; CHECK-P9-NEXT: stfsx f0, r3, r4
9045 ; CHECK-P9-NEXT: blr
9047 ; CHECK-P8-LABEL: st_align32_int8_t_float:
9048 ; CHECK-P8: # %bb.0: # %entry
9049 ; CHECK-P8-NEXT: mtfprwa f0, r4
9050 ; CHECK-P8-NEXT: lis r4, 1525
9051 ; CHECK-P8-NEXT: ori r4, r4, 56600
9052 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
9053 ; CHECK-P8-NEXT: stfsx f0, r3, r4
9054 ; CHECK-P8-NEXT: blr
9056 %conv = sitofp i8 %str to float
9057 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
9058 %0 = bitcast i8* %add.ptr to float*
9059 store float %conv, float* %0, align 4
9063 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9064 define dso_local void @st_align64_int8_t_float(i8* nocapture %ptr, i8 signext %str) {
9065 ; CHECK-P10-LABEL: st_align64_int8_t_float:
9066 ; CHECK-P10: # %bb.0: # %entry
9067 ; CHECK-P10-NEXT: mtfprwa f0, r4
9068 ; CHECK-P10-NEXT: pli r4, 244140625
9069 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
9070 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
9071 ; CHECK-P10-NEXT: stfsx f0, r3, r4
9072 ; CHECK-P10-NEXT: blr
9074 ; CHECK-P9-LABEL: st_align64_int8_t_float:
9075 ; CHECK-P9: # %bb.0: # %entry
9076 ; CHECK-P9-NEXT: mtfprwa f0, r4
9077 ; CHECK-P9-NEXT: lis r4, 3725
9078 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
9079 ; CHECK-P9-NEXT: ori r4, r4, 19025
9080 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
9081 ; CHECK-P9-NEXT: stfsx f0, r3, r4
9082 ; CHECK-P9-NEXT: blr
9084 ; CHECK-P8-LABEL: st_align64_int8_t_float:
9085 ; CHECK-P8: # %bb.0: # %entry
9086 ; CHECK-P8-NEXT: mtfprwa f0, r4
9087 ; CHECK-P8-NEXT: lis r4, 3725
9088 ; CHECK-P8-NEXT: ori r4, r4, 19025
9089 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
9090 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
9091 ; CHECK-P8-NEXT: stfsx f0, r3, r4
9092 ; CHECK-P8-NEXT: blr
9094 %conv = sitofp i8 %str to float
9095 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
9096 %0 = bitcast i8* %add.ptr to float*
9097 store float %conv, float* %0, align 4
9101 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9102 define dso_local void @st_reg_int8_t_float(i8* nocapture %ptr, i64 %off, i8 signext %str) {
9103 ; CHECK-LABEL: st_reg_int8_t_float:
9104 ; CHECK: # %bb.0: # %entry
9105 ; CHECK-NEXT: mtfprwa f0, r5
9106 ; CHECK-NEXT: xscvsxdsp f0, f0
9107 ; CHECK-NEXT: stfsx f0, r3, r4
9110 %conv = sitofp i8 %str to float
9111 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
9112 %0 = bitcast i8* %add.ptr to float*
9113 store float %conv, float* %0, align 4
9117 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9118 define dso_local void @st_or1_int8_t_float(i64 %ptr, i8 zeroext %off, i8 signext %str) {
9119 ; CHECK-LABEL: st_or1_int8_t_float:
9120 ; CHECK: # %bb.0: # %entry
9121 ; CHECK-NEXT: mtfprwa f0, r5
9122 ; CHECK-NEXT: or r3, r4, r3
9123 ; CHECK-NEXT: xscvsxdsp f0, f0
9124 ; CHECK-NEXT: stfs f0, 0(r3)
9127 %conv = sitofp i8 %str to float
9128 %conv1 = zext i8 %off to i64
9129 %or = or i64 %conv1, %ptr
9130 %0 = inttoptr i64 %or to float*
9131 store float %conv, float* %0, align 4
9135 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9136 define dso_local void @st_not_disjoint16_int8_t_float(i64 %ptr, i8 signext %str) {
9137 ; CHECK-LABEL: st_not_disjoint16_int8_t_float:
9138 ; CHECK: # %bb.0: # %entry
9139 ; CHECK-NEXT: mtfprwa f0, r4
9140 ; CHECK-NEXT: ori r3, r3, 6
9141 ; CHECK-NEXT: xscvsxdsp f0, f0
9142 ; CHECK-NEXT: stfs f0, 0(r3)
9145 %conv = sitofp i8 %str to float
9146 %or = or i64 %ptr, 6
9147 %0 = inttoptr i64 %or to float*
9148 store float %conv, float* %0, align 4
9152 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9153 define dso_local void @st_disjoint_align16_int8_t_float(i64 %ptr, i8 signext %str) {
9154 ; CHECK-LABEL: st_disjoint_align16_int8_t_float:
9155 ; CHECK: # %bb.0: # %entry
9156 ; CHECK-NEXT: mtfprwa f0, r4
9157 ; CHECK-NEXT: rldicr r3, r3, 0, 51
9158 ; CHECK-NEXT: xscvsxdsp f0, f0
9159 ; CHECK-NEXT: stfs f0, 24(r3)
9162 %and = and i64 %ptr, -4096
9163 %conv = sitofp i8 %str to float
9164 %or = or i64 %and, 24
9165 %0 = inttoptr i64 %or to float*
9166 store float %conv, float* %0, align 8
9170 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9171 define dso_local void @st_not_disjoint32_int8_t_float(i64 %ptr, i8 signext %str) {
9172 ; CHECK-P10-LABEL: st_not_disjoint32_int8_t_float:
9173 ; CHECK-P10: # %bb.0: # %entry
9174 ; CHECK-P10-NEXT: mtfprwa f0, r4
9175 ; CHECK-P10-NEXT: ori r3, r3, 34463
9176 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
9177 ; CHECK-P10-NEXT: oris r3, r3, 1
9178 ; CHECK-P10-NEXT: stfs f0, 0(r3)
9179 ; CHECK-P10-NEXT: blr
9181 ; CHECK-P9-LABEL: st_not_disjoint32_int8_t_float:
9182 ; CHECK-P9: # %bb.0: # %entry
9183 ; CHECK-P9-NEXT: mtfprwa f0, r4
9184 ; CHECK-P9-NEXT: ori r3, r3, 34463
9185 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
9186 ; CHECK-P9-NEXT: oris r3, r3, 1
9187 ; CHECK-P9-NEXT: stfs f0, 0(r3)
9188 ; CHECK-P9-NEXT: blr
9190 ; CHECK-P8-LABEL: st_not_disjoint32_int8_t_float:
9191 ; CHECK-P8: # %bb.0: # %entry
9192 ; CHECK-P8-NEXT: mtfprwa f0, r4
9193 ; CHECK-P8-NEXT: ori r3, r3, 34463
9194 ; CHECK-P8-NEXT: oris r3, r3, 1
9195 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
9196 ; CHECK-P8-NEXT: stfs f0, 0(r3)
9197 ; CHECK-P8-NEXT: blr
9199 %conv = sitofp i8 %str to float
9200 %or = or i64 %ptr, 99999
9201 %0 = inttoptr i64 %or to float*
9202 store float %conv, float* %0, align 4
9206 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9207 define dso_local void @st_disjoint_align32_int8_t_float(i64 %ptr, i8 signext %str) {
9208 ; CHECK-P10-LABEL: st_disjoint_align32_int8_t_float:
9209 ; CHECK-P10: # %bb.0: # %entry
9210 ; CHECK-P10-NEXT: mtfprwa f0, r4
9211 ; CHECK-P10-NEXT: lis r5, -15264
9212 ; CHECK-P10-NEXT: pli r4, 999990000
9213 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
9214 ; CHECK-P10-NEXT: and r3, r3, r5
9215 ; CHECK-P10-NEXT: stfsx f0, r3, r4
9216 ; CHECK-P10-NEXT: blr
9218 ; CHECK-P9-LABEL: st_disjoint_align32_int8_t_float:
9219 ; CHECK-P9: # %bb.0: # %entry
9220 ; CHECK-P9-NEXT: mtfprwa f0, r4
9221 ; CHECK-P9-NEXT: lis r5, -15264
9222 ; CHECK-P9-NEXT: lis r4, 15258
9223 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
9224 ; CHECK-P9-NEXT: and r3, r3, r5
9225 ; CHECK-P9-NEXT: ori r4, r4, 41712
9226 ; CHECK-P9-NEXT: stfsx f0, r3, r4
9227 ; CHECK-P9-NEXT: blr
9229 ; CHECK-P8-LABEL: st_disjoint_align32_int8_t_float:
9230 ; CHECK-P8: # %bb.0: # %entry
9231 ; CHECK-P8-NEXT: mtfprwa f0, r4
9232 ; CHECK-P8-NEXT: lis r4, -15264
9233 ; CHECK-P8-NEXT: lis r5, 15258
9234 ; CHECK-P8-NEXT: and r3, r3, r4
9235 ; CHECK-P8-NEXT: ori r4, r5, 41712
9236 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
9237 ; CHECK-P8-NEXT: stfsx f0, r3, r4
9238 ; CHECK-P8-NEXT: blr
9240 %and = and i64 %ptr, -1000341504
9241 %conv = sitofp i8 %str to float
9242 %or = or i64 %and, 999990000
9243 %0 = inttoptr i64 %or to float*
9244 store float %conv, float* %0, align 16
9248 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9249 define dso_local void @st_not_disjoint64_int8_t_float(i64 %ptr, i8 signext %str) {
9250 ; CHECK-P10-LABEL: st_not_disjoint64_int8_t_float:
9251 ; CHECK-P10: # %bb.0: # %entry
9252 ; CHECK-P10-NEXT: mtfprwa f0, r4
9253 ; CHECK-P10-NEXT: pli r4, 232
9254 ; CHECK-P10-NEXT: pli r5, 3567587329
9255 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
9256 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
9257 ; CHECK-P10-NEXT: or r3, r3, r5
9258 ; CHECK-P10-NEXT: stfs f0, 0(r3)
9259 ; CHECK-P10-NEXT: blr
9261 ; CHECK-PREP10-LABEL: st_not_disjoint64_int8_t_float:
9262 ; CHECK-PREP10: # %bb.0: # %entry
9263 ; CHECK-PREP10-NEXT: mtfprwa f0, r4
9264 ; CHECK-PREP10-NEXT: li r4, 29
9265 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
9266 ; CHECK-PREP10-NEXT: xscvsxdsp f0, f0
9267 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
9268 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
9269 ; CHECK-PREP10-NEXT: or r3, r3, r4
9270 ; CHECK-PREP10-NEXT: stfs f0, 0(r3)
9271 ; CHECK-PREP10-NEXT: blr
9273 %conv = sitofp i8 %str to float
9274 %or = or i64 %ptr, 1000000000001
9275 %0 = inttoptr i64 %or to float*
9276 store float %conv, float* %0, align 4
9280 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9281 define dso_local void @st_disjoint_align64_int8_t_float(i64 %ptr, i8 signext %str) {
9282 ; CHECK-P10-LABEL: st_disjoint_align64_int8_t_float:
9283 ; CHECK-P10: # %bb.0: # %entry
9284 ; CHECK-P10-NEXT: mtfprwa f0, r4
9285 ; CHECK-P10-NEXT: pli r4, 244140625
9286 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
9287 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
9288 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
9289 ; CHECK-P10-NEXT: stfsx f0, r3, r4
9290 ; CHECK-P10-NEXT: blr
9292 ; CHECK-P9-LABEL: st_disjoint_align64_int8_t_float:
9293 ; CHECK-P9: # %bb.0: # %entry
9294 ; CHECK-P9-NEXT: mtfprwa f0, r4
9295 ; CHECK-P9-NEXT: lis r4, 3725
9296 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
9297 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
9298 ; CHECK-P9-NEXT: ori r4, r4, 19025
9299 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
9300 ; CHECK-P9-NEXT: stfsx f0, r3, r4
9301 ; CHECK-P9-NEXT: blr
9303 ; CHECK-P8-LABEL: st_disjoint_align64_int8_t_float:
9304 ; CHECK-P8: # %bb.0: # %entry
9305 ; CHECK-P8-NEXT: mtfprwa f0, r4
9306 ; CHECK-P8-NEXT: lis r5, 3725
9307 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
9308 ; CHECK-P8-NEXT: ori r4, r5, 19025
9309 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
9310 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
9311 ; CHECK-P8-NEXT: stfsx f0, r3, r4
9312 ; CHECK-P8-NEXT: blr
9314 %and = and i64 %ptr, -1099511627776
9315 %conv = sitofp i8 %str to float
9316 %or = or i64 %and, 1000000000000
9317 %0 = inttoptr i64 %or to float*
9318 store float %conv, float* %0, align 4096
9322 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9323 define dso_local void @st_cst_align16_int8_t_float(i8 signext %str) {
9324 ; CHECK-LABEL: st_cst_align16_int8_t_float:
9325 ; CHECK: # %bb.0: # %entry
9326 ; CHECK-NEXT: mtfprwa f0, r3
9327 ; CHECK-NEXT: xscvsxdsp f0, f0
9328 ; CHECK-NEXT: stfs f0, 4080(0)
9331 %conv = sitofp i8 %str to float
9332 store float %conv, float* inttoptr (i64 4080 to float*), align 16
9336 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9337 define dso_local void @st_cst_align32_int8_t_float(i8 signext %str) {
9338 ; CHECK-LABEL: st_cst_align32_int8_t_float:
9339 ; CHECK: # %bb.0: # %entry
9340 ; CHECK-NEXT: mtfprwa f0, r3
9341 ; CHECK-NEXT: lis r3, 153
9342 ; CHECK-NEXT: xscvsxdsp f0, f0
9343 ; CHECK-NEXT: stfs f0, -27108(r3)
9346 %conv = sitofp i8 %str to float
9347 store float %conv, float* inttoptr (i64 9999900 to float*), align 4
9351 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9352 define dso_local void @st_cst_align64_int8_t_float(i8 signext %str) {
9353 ; CHECK-P10-LABEL: st_cst_align64_int8_t_float:
9354 ; CHECK-P10: # %bb.0: # %entry
9355 ; CHECK-P10-NEXT: mtfprwa f0, r3
9356 ; CHECK-P10-NEXT: pli r3, 244140625
9357 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
9358 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
9359 ; CHECK-P10-NEXT: stfs f0, 0(r3)
9360 ; CHECK-P10-NEXT: blr
9362 ; CHECK-P9-LABEL: st_cst_align64_int8_t_float:
9363 ; CHECK-P9: # %bb.0: # %entry
9364 ; CHECK-P9-NEXT: mtfprwa f0, r3
9365 ; CHECK-P9-NEXT: lis r3, 3725
9366 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
9367 ; CHECK-P9-NEXT: ori r3, r3, 19025
9368 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
9369 ; CHECK-P9-NEXT: stfs f0, 0(r3)
9370 ; CHECK-P9-NEXT: blr
9372 ; CHECK-P8-LABEL: st_cst_align64_int8_t_float:
9373 ; CHECK-P8: # %bb.0: # %entry
9374 ; CHECK-P8-NEXT: mtfprwa f0, r3
9375 ; CHECK-P8-NEXT: lis r3, 3725
9376 ; CHECK-P8-NEXT: ori r3, r3, 19025
9377 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
9378 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
9379 ; CHECK-P8-NEXT: stfs f0, 0(r3)
9380 ; CHECK-P8-NEXT: blr
9382 %conv = sitofp i8 %str to float
9383 store float %conv, float* inttoptr (i64 1000000000000 to float*), align 4096
9387 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9388 define dso_local void @st_0_int8_t_double(i64 %ptr, i8 signext %str) {
9389 ; CHECK-LABEL: st_0_int8_t_double:
9390 ; CHECK: # %bb.0: # %entry
9391 ; CHECK-NEXT: mtfprwa f0, r4
9392 ; CHECK-NEXT: xscvsxddp f0, f0
9393 ; CHECK-NEXT: stfd f0, 0(r3)
9396 %conv = sitofp i8 %str to double
9397 %0 = inttoptr i64 %ptr to double*
9398 store double %conv, double* %0, align 8
9402 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9403 define dso_local void @st_align16_int8_t_double(i8* nocapture %ptr, i8 signext %str) {
9404 ; CHECK-LABEL: st_align16_int8_t_double:
9405 ; CHECK: # %bb.0: # %entry
9406 ; CHECK-NEXT: mtfprwa f0, r4
9407 ; CHECK-NEXT: xscvsxddp f0, f0
9408 ; CHECK-NEXT: stfd f0, 8(r3)
9411 %conv = sitofp i8 %str to double
9412 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
9413 %0 = bitcast i8* %add.ptr to double*
9414 store double %conv, double* %0, align 8
9418 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9419 define dso_local void @st_align32_int8_t_double(i8* nocapture %ptr, i8 signext %str) {
9420 ; CHECK-P10-LABEL: st_align32_int8_t_double:
9421 ; CHECK-P10: # %bb.0: # %entry
9422 ; CHECK-P10-NEXT: mtfprwa f0, r4
9423 ; CHECK-P10-NEXT: pli r4, 99999000
9424 ; CHECK-P10-NEXT: xscvsxddp f0, f0
9425 ; CHECK-P10-NEXT: stfdx f0, r3, r4
9426 ; CHECK-P10-NEXT: blr
9428 ; CHECK-P9-LABEL: st_align32_int8_t_double:
9429 ; CHECK-P9: # %bb.0: # %entry
9430 ; CHECK-P9-NEXT: mtfprwa f0, r4
9431 ; CHECK-P9-NEXT: lis r4, 1525
9432 ; CHECK-P9-NEXT: xscvsxddp f0, f0
9433 ; CHECK-P9-NEXT: ori r4, r4, 56600
9434 ; CHECK-P9-NEXT: stfdx f0, r3, r4
9435 ; CHECK-P9-NEXT: blr
9437 ; CHECK-P8-LABEL: st_align32_int8_t_double:
9438 ; CHECK-P8: # %bb.0: # %entry
9439 ; CHECK-P8-NEXT: mtfprwa f0, r4
9440 ; CHECK-P8-NEXT: lis r4, 1525
9441 ; CHECK-P8-NEXT: ori r4, r4, 56600
9442 ; CHECK-P8-NEXT: xscvsxddp f0, f0
9443 ; CHECK-P8-NEXT: stfdx f0, r3, r4
9444 ; CHECK-P8-NEXT: blr
9446 %conv = sitofp i8 %str to double
9447 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
9448 %0 = bitcast i8* %add.ptr to double*
9449 store double %conv, double* %0, align 8
9453 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9454 define dso_local void @st_align64_int8_t_double(i8* nocapture %ptr, i8 signext %str) {
9455 ; CHECK-P10-LABEL: st_align64_int8_t_double:
9456 ; CHECK-P10: # %bb.0: # %entry
9457 ; CHECK-P10-NEXT: mtfprwa f0, r4
9458 ; CHECK-P10-NEXT: pli r4, 244140625
9459 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
9460 ; CHECK-P10-NEXT: xscvsxddp f0, f0
9461 ; CHECK-P10-NEXT: stfdx f0, r3, r4
9462 ; CHECK-P10-NEXT: blr
9464 ; CHECK-P9-LABEL: st_align64_int8_t_double:
9465 ; CHECK-P9: # %bb.0: # %entry
9466 ; CHECK-P9-NEXT: mtfprwa f0, r4
9467 ; CHECK-P9-NEXT: lis r4, 3725
9468 ; CHECK-P9-NEXT: xscvsxddp f0, f0
9469 ; CHECK-P9-NEXT: ori r4, r4, 19025
9470 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
9471 ; CHECK-P9-NEXT: stfdx f0, r3, r4
9472 ; CHECK-P9-NEXT: blr
9474 ; CHECK-P8-LABEL: st_align64_int8_t_double:
9475 ; CHECK-P8: # %bb.0: # %entry
9476 ; CHECK-P8-NEXT: mtfprwa f0, r4
9477 ; CHECK-P8-NEXT: lis r4, 3725
9478 ; CHECK-P8-NEXT: ori r4, r4, 19025
9479 ; CHECK-P8-NEXT: xscvsxddp f0, f0
9480 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
9481 ; CHECK-P8-NEXT: stfdx f0, r3, r4
9482 ; CHECK-P8-NEXT: blr
9484 %conv = sitofp i8 %str to double
9485 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
9486 %0 = bitcast i8* %add.ptr to double*
9487 store double %conv, double* %0, align 8
9491 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9492 define dso_local void @st_reg_int8_t_double(i8* nocapture %ptr, i64 %off, i8 signext %str) {
9493 ; CHECK-LABEL: st_reg_int8_t_double:
9494 ; CHECK: # %bb.0: # %entry
9495 ; CHECK-NEXT: mtfprwa f0, r5
9496 ; CHECK-NEXT: xscvsxddp f0, f0
9497 ; CHECK-NEXT: stfdx f0, r3, r4
9500 %conv = sitofp i8 %str to double
9501 %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
9502 %0 = bitcast i8* %add.ptr to double*
9503 store double %conv, double* %0, align 8
9507 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9508 define dso_local void @st_or1_int8_t_double(i64 %ptr, i8 zeroext %off, i8 signext %str) {
9509 ; CHECK-LABEL: st_or1_int8_t_double:
9510 ; CHECK: # %bb.0: # %entry
9511 ; CHECK-NEXT: mtfprwa f0, r5
9512 ; CHECK-NEXT: or r3, r4, r3
9513 ; CHECK-NEXT: xscvsxddp f0, f0
9514 ; CHECK-NEXT: stfd f0, 0(r3)
9517 %conv = sitofp i8 %str to double
9518 %conv1 = zext i8 %off to i64
9519 %or = or i64 %conv1, %ptr
9520 %0 = inttoptr i64 %or to double*
9521 store double %conv, double* %0, align 8
9525 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9526 define dso_local void @st_not_disjoint16_int8_t_double(i64 %ptr, i8 signext %str) {
9527 ; CHECK-LABEL: st_not_disjoint16_int8_t_double:
9528 ; CHECK: # %bb.0: # %entry
9529 ; CHECK-NEXT: mtfprwa f0, r4
9530 ; CHECK-NEXT: ori r3, r3, 6
9531 ; CHECK-NEXT: xscvsxddp f0, f0
9532 ; CHECK-NEXT: stfd f0, 0(r3)
9535 %conv = sitofp i8 %str to double
9536 %or = or i64 %ptr, 6
9537 %0 = inttoptr i64 %or to double*
9538 store double %conv, double* %0, align 8
9542 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9543 define dso_local void @st_disjoint_align16_int8_t_double(i64 %ptr, i8 signext %str) {
9544 ; CHECK-LABEL: st_disjoint_align16_int8_t_double:
9545 ; CHECK: # %bb.0: # %entry
9546 ; CHECK-NEXT: mtfprwa f0, r4
9547 ; CHECK-NEXT: rldicr r3, r3, 0, 51
9548 ; CHECK-NEXT: xscvsxddp f0, f0
9549 ; CHECK-NEXT: stfd f0, 24(r3)
9552 %and = and i64 %ptr, -4096
9553 %conv = sitofp i8 %str to double
9554 %or = or i64 %and, 24
9555 %0 = inttoptr i64 %or to double*
9556 store double %conv, double* %0, align 8
9560 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9561 define dso_local void @st_not_disjoint32_int8_t_double(i64 %ptr, i8 signext %str) {
9562 ; CHECK-P10-LABEL: st_not_disjoint32_int8_t_double:
9563 ; CHECK-P10: # %bb.0: # %entry
9564 ; CHECK-P10-NEXT: mtfprwa f0, r4
9565 ; CHECK-P10-NEXT: ori r3, r3, 34463
9566 ; CHECK-P10-NEXT: xscvsxddp f0, f0
9567 ; CHECK-P10-NEXT: oris r3, r3, 1
9568 ; CHECK-P10-NEXT: stfd f0, 0(r3)
9569 ; CHECK-P10-NEXT: blr
9571 ; CHECK-P9-LABEL: st_not_disjoint32_int8_t_double:
9572 ; CHECK-P9: # %bb.0: # %entry
9573 ; CHECK-P9-NEXT: mtfprwa f0, r4
9574 ; CHECK-P9-NEXT: ori r3, r3, 34463
9575 ; CHECK-P9-NEXT: xscvsxddp f0, f0
9576 ; CHECK-P9-NEXT: oris r3, r3, 1
9577 ; CHECK-P9-NEXT: stfd f0, 0(r3)
9578 ; CHECK-P9-NEXT: blr
9580 ; CHECK-P8-LABEL: st_not_disjoint32_int8_t_double:
9581 ; CHECK-P8: # %bb.0: # %entry
9582 ; CHECK-P8-NEXT: mtfprwa f0, r4
9583 ; CHECK-P8-NEXT: ori r3, r3, 34463
9584 ; CHECK-P8-NEXT: oris r3, r3, 1
9585 ; CHECK-P8-NEXT: xscvsxddp f0, f0
9586 ; CHECK-P8-NEXT: stfd f0, 0(r3)
9587 ; CHECK-P8-NEXT: blr
9589 %conv = sitofp i8 %str to double
9590 %or = or i64 %ptr, 99999
9591 %0 = inttoptr i64 %or to double*
9592 store double %conv, double* %0, align 8
9596 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9597 define dso_local void @st_disjoint_align32_int8_t_double(i64 %ptr, i8 signext %str) {
9598 ; CHECK-P10-LABEL: st_disjoint_align32_int8_t_double:
9599 ; CHECK-P10: # %bb.0: # %entry
9600 ; CHECK-P10-NEXT: mtfprwa f0, r4
9601 ; CHECK-P10-NEXT: lis r5, -15264
9602 ; CHECK-P10-NEXT: pli r4, 999990000
9603 ; CHECK-P10-NEXT: xscvsxddp f0, f0
9604 ; CHECK-P10-NEXT: and r3, r3, r5
9605 ; CHECK-P10-NEXT: stfdx f0, r3, r4
9606 ; CHECK-P10-NEXT: blr
9608 ; CHECK-P9-LABEL: st_disjoint_align32_int8_t_double:
9609 ; CHECK-P9: # %bb.0: # %entry
9610 ; CHECK-P9-NEXT: mtfprwa f0, r4
9611 ; CHECK-P9-NEXT: lis r5, -15264
9612 ; CHECK-P9-NEXT: lis r4, 15258
9613 ; CHECK-P9-NEXT: xscvsxddp f0, f0
9614 ; CHECK-P9-NEXT: and r3, r3, r5
9615 ; CHECK-P9-NEXT: ori r4, r4, 41712
9616 ; CHECK-P9-NEXT: stfdx f0, r3, r4
9617 ; CHECK-P9-NEXT: blr
9619 ; CHECK-P8-LABEL: st_disjoint_align32_int8_t_double:
9620 ; CHECK-P8: # %bb.0: # %entry
9621 ; CHECK-P8-NEXT: mtfprwa f0, r4
9622 ; CHECK-P8-NEXT: lis r4, -15264
9623 ; CHECK-P8-NEXT: lis r5, 15258
9624 ; CHECK-P8-NEXT: and r3, r3, r4
9625 ; CHECK-P8-NEXT: ori r4, r5, 41712
9626 ; CHECK-P8-NEXT: xscvsxddp f0, f0
9627 ; CHECK-P8-NEXT: stfdx f0, r3, r4
9628 ; CHECK-P8-NEXT: blr
9630 %and = and i64 %ptr, -1000341504
9631 %conv = sitofp i8 %str to double
9632 %or = or i64 %and, 999990000
9633 %0 = inttoptr i64 %or to double*
9634 store double %conv, double* %0, align 16
9638 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9639 define dso_local void @st_not_disjoint64_int8_t_double(i64 %ptr, i8 signext %str) {
9640 ; CHECK-P10-LABEL: st_not_disjoint64_int8_t_double:
9641 ; CHECK-P10: # %bb.0: # %entry
9642 ; CHECK-P10-NEXT: mtfprwa f0, r4
9643 ; CHECK-P10-NEXT: pli r4, 232
9644 ; CHECK-P10-NEXT: pli r5, 3567587329
9645 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
9646 ; CHECK-P10-NEXT: xscvsxddp f0, f0
9647 ; CHECK-P10-NEXT: or r3, r3, r5
9648 ; CHECK-P10-NEXT: stfd f0, 0(r3)
9649 ; CHECK-P10-NEXT: blr
9651 ; CHECK-PREP10-LABEL: st_not_disjoint64_int8_t_double:
9652 ; CHECK-PREP10: # %bb.0: # %entry
9653 ; CHECK-PREP10-NEXT: mtfprwa f0, r4
9654 ; CHECK-PREP10-NEXT: li r4, 29
9655 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
9656 ; CHECK-PREP10-NEXT: xscvsxddp f0, f0
9657 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
9658 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
9659 ; CHECK-PREP10-NEXT: or r3, r3, r4
9660 ; CHECK-PREP10-NEXT: stfd f0, 0(r3)
9661 ; CHECK-PREP10-NEXT: blr
9663 %conv = sitofp i8 %str to double
9664 %or = or i64 %ptr, 1000000000001
9665 %0 = inttoptr i64 %or to double*
9666 store double %conv, double* %0, align 8
9670 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9671 define dso_local void @st_disjoint_align64_int8_t_double(i64 %ptr, i8 signext %str) {
9672 ; CHECK-P10-LABEL: st_disjoint_align64_int8_t_double:
9673 ; CHECK-P10: # %bb.0: # %entry
9674 ; CHECK-P10-NEXT: mtfprwa f0, r4
9675 ; CHECK-P10-NEXT: pli r4, 244140625
9676 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
9677 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
9678 ; CHECK-P10-NEXT: xscvsxddp f0, f0
9679 ; CHECK-P10-NEXT: stfdx f0, r3, r4
9680 ; CHECK-P10-NEXT: blr
9682 ; CHECK-P9-LABEL: st_disjoint_align64_int8_t_double:
9683 ; CHECK-P9: # %bb.0: # %entry
9684 ; CHECK-P9-NEXT: mtfprwa f0, r4
9685 ; CHECK-P9-NEXT: lis r4, 3725
9686 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
9687 ; CHECK-P9-NEXT: xscvsxddp f0, f0
9688 ; CHECK-P9-NEXT: ori r4, r4, 19025
9689 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
9690 ; CHECK-P9-NEXT: stfdx f0, r3, r4
9691 ; CHECK-P9-NEXT: blr
9693 ; CHECK-P8-LABEL: st_disjoint_align64_int8_t_double:
9694 ; CHECK-P8: # %bb.0: # %entry
9695 ; CHECK-P8-NEXT: mtfprwa f0, r4
9696 ; CHECK-P8-NEXT: lis r5, 3725
9697 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
9698 ; CHECK-P8-NEXT: ori r4, r5, 19025
9699 ; CHECK-P8-NEXT: xscvsxddp f0, f0
9700 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
9701 ; CHECK-P8-NEXT: stfdx f0, r3, r4
9702 ; CHECK-P8-NEXT: blr
9704 %and = and i64 %ptr, -1099511627776
9705 %conv = sitofp i8 %str to double
9706 %or = or i64 %and, 1000000000000
9707 %0 = inttoptr i64 %or to double*
9708 store double %conv, double* %0, align 4096
9712 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9713 define dso_local void @st_cst_align16_int8_t_double(i8 signext %str) {
9714 ; CHECK-LABEL: st_cst_align16_int8_t_double:
9715 ; CHECK: # %bb.0: # %entry
9716 ; CHECK-NEXT: mtfprwa f0, r3
9717 ; CHECK-NEXT: xscvsxddp f0, f0
9718 ; CHECK-NEXT: stfd f0, 4080(0)
9721 %conv = sitofp i8 %str to double
9722 store double %conv, double* inttoptr (i64 4080 to double*), align 16
9726 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9727 define dso_local void @st_cst_align32_int8_t_double(i8 signext %str) {
9728 ; CHECK-LABEL: st_cst_align32_int8_t_double:
9729 ; CHECK: # %bb.0: # %entry
9730 ; CHECK-NEXT: mtfprwa f0, r3
9731 ; CHECK-NEXT: lis r3, 153
9732 ; CHECK-NEXT: xscvsxddp f0, f0
9733 ; CHECK-NEXT: stfd f0, -27108(r3)
9736 %conv = sitofp i8 %str to double
9737 store double %conv, double* inttoptr (i64 9999900 to double*), align 8
9741 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
9742 define dso_local void @st_cst_align64_int8_t_double(i8 signext %str) {
9743 ; CHECK-P10-LABEL: st_cst_align64_int8_t_double:
9744 ; CHECK-P10: # %bb.0: # %entry
9745 ; CHECK-P10-NEXT: mtfprwa f0, r3
9746 ; CHECK-P10-NEXT: pli r3, 244140625
9747 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
9748 ; CHECK-P10-NEXT: xscvsxddp f0, f0
9749 ; CHECK-P10-NEXT: stfd f0, 0(r3)
9750 ; CHECK-P10-NEXT: blr
9752 ; CHECK-P9-LABEL: st_cst_align64_int8_t_double:
9753 ; CHECK-P9: # %bb.0: # %entry
9754 ; CHECK-P9-NEXT: mtfprwa f0, r3
9755 ; CHECK-P9-NEXT: lis r3, 3725
9756 ; CHECK-P9-NEXT: xscvsxddp f0, f0
9757 ; CHECK-P9-NEXT: ori r3, r3, 19025
9758 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
9759 ; CHECK-P9-NEXT: stfd f0, 0(r3)
9760 ; CHECK-P9-NEXT: blr
9762 ; CHECK-P8-LABEL: st_cst_align64_int8_t_double:
9763 ; CHECK-P8: # %bb.0: # %entry
9764 ; CHECK-P8-NEXT: mtfprwa f0, r3
9765 ; CHECK-P8-NEXT: lis r3, 3725
9766 ; CHECK-P8-NEXT: ori r3, r3, 19025
9767 ; CHECK-P8-NEXT: xscvsxddp f0, f0
9768 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
9769 ; CHECK-P8-NEXT: stfd f0, 0(r3)
9770 ; CHECK-P8-NEXT: blr
9772 %conv = sitofp i8 %str to double
9773 store double %conv, double* inttoptr (i64 1000000000000 to double*), align 4096