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 i16 @ld_0_int16_t_int8_t(i64 %ptr) {
23 ; CHECK-LABEL: ld_0_int16_t_int8_t:
24 ; CHECK: # %bb.0: # %entry
25 ; CHECK-NEXT: lbz r3, 0(r3)
26 ; CHECK-NEXT: extsb r3, r3
29 %0 = inttoptr i64 %ptr to ptr
30 %1 = load i8, ptr %0, align 1
31 %conv = sext i8 %1 to i16
35 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
36 define dso_local signext i16 @ld_align16_int16_t_int8_t(ptr nocapture readonly %ptr) {
37 ; CHECK-LABEL: ld_align16_int16_t_int8_t:
38 ; CHECK: # %bb.0: # %entry
39 ; CHECK-NEXT: lbz r3, 8(r3)
40 ; CHECK-NEXT: extsb r3, r3
43 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
44 %0 = load i8, ptr %add.ptr, align 1
45 %conv = sext i8 %0 to i16
49 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
50 define dso_local signext i16 @ld_align32_int16_t_int8_t(ptr nocapture readonly %ptr) {
51 ; CHECK-P10-LABEL: ld_align32_int16_t_int8_t:
52 ; CHECK-P10: # %bb.0: # %entry
53 ; CHECK-P10-NEXT: plbz r3, 99999000(r3), 0
54 ; CHECK-P10-NEXT: extsb r3, r3
57 ; CHECK-PREP10-LABEL: ld_align32_int16_t_int8_t:
58 ; CHECK-PREP10: # %bb.0: # %entry
59 ; CHECK-PREP10-NEXT: lis r4, 1525
60 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
61 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
62 ; CHECK-PREP10-NEXT: extsb r3, r3
63 ; CHECK-PREP10-NEXT: blr
65 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
66 %0 = load i8, ptr %add.ptr, align 1
67 %conv = sext i8 %0 to i16
71 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
72 define dso_local signext i16 @ld_align64_int16_t_int8_t(ptr nocapture readonly %ptr) {
73 ; CHECK-P10-LABEL: ld_align64_int16_t_int8_t:
74 ; CHECK-P10: # %bb.0: # %entry
75 ; CHECK-P10-NEXT: pli r4, 244140625
76 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
77 ; CHECK-P10-NEXT: lbzx r3, r3, r4
78 ; CHECK-P10-NEXT: extsb r3, r3
81 ; CHECK-PREP10-LABEL: ld_align64_int16_t_int8_t:
82 ; CHECK-PREP10: # %bb.0: # %entry
83 ; CHECK-PREP10-NEXT: lis r4, 3725
84 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
85 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
86 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
87 ; CHECK-PREP10-NEXT: extsb r3, r3
88 ; CHECK-PREP10-NEXT: blr
90 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
91 %0 = load i8, ptr %add.ptr, align 1
92 %conv = sext i8 %0 to i16
96 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
97 define dso_local signext i16 @ld_reg_int16_t_int8_t(ptr nocapture readonly %ptr, i64 %off) {
98 ; CHECK-LABEL: ld_reg_int16_t_int8_t:
99 ; CHECK: # %bb.0: # %entry
100 ; CHECK-NEXT: lbzx r3, r3, r4
101 ; CHECK-NEXT: extsb r3, r3
104 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
105 %0 = load i8, ptr %add.ptr, align 1
106 %conv = sext i8 %0 to i16
110 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
111 define dso_local signext i16 @ld_or_int16_t_int8_t(i64 %ptr, i8 zeroext %off) {
112 ; CHECK-LABEL: ld_or_int16_t_int8_t:
113 ; CHECK: # %bb.0: # %entry
114 ; CHECK-NEXT: or r3, r4, r3
115 ; CHECK-NEXT: lbz r3, 0(r3)
116 ; CHECK-NEXT: extsb r3, r3
119 %conv = zext i8 %off to i64
120 %or = or i64 %conv, %ptr
121 %0 = inttoptr i64 %or to ptr
122 %1 = load i8, ptr %0, align 1
123 %conv1 = sext i8 %1 to i16
127 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
128 define dso_local signext i16 @ld_not_disjoint16_int16_t_int8_t(i64 %ptr) {
129 ; CHECK-LABEL: ld_not_disjoint16_int16_t_int8_t:
130 ; CHECK: # %bb.0: # %entry
131 ; CHECK-NEXT: ori r3, r3, 6
132 ; CHECK-NEXT: lbz r3, 0(r3)
133 ; CHECK-NEXT: extsb r3, r3
137 %0 = inttoptr i64 %or to ptr
138 %1 = load i8, ptr %0, align 1
139 %conv = sext i8 %1 to i16
143 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
144 define dso_local signext i16 @ld_disjoint_align16_int16_t_int8_t(i64 %ptr) {
145 ; CHECK-LABEL: ld_disjoint_align16_int16_t_int8_t:
146 ; CHECK: # %bb.0: # %entry
147 ; CHECK-NEXT: rldicr r3, r3, 0, 51
148 ; CHECK-NEXT: lbz r3, 24(r3)
149 ; CHECK-NEXT: extsb r3, r3
152 %and = and i64 %ptr, -4096
153 %or = or i64 %and, 24
154 %0 = inttoptr i64 %or to ptr
155 %1 = load i8, ptr %0, align 8
156 %conv = sext i8 %1 to i16
160 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
161 define dso_local signext i16 @ld_not_disjoint32_int16_t_int8_t(i64 %ptr) {
162 ; CHECK-LABEL: ld_not_disjoint32_int16_t_int8_t:
163 ; CHECK: # %bb.0: # %entry
164 ; CHECK-NEXT: ori r3, r3, 34463
165 ; CHECK-NEXT: oris r3, r3, 1
166 ; CHECK-NEXT: lbz r3, 0(r3)
167 ; CHECK-NEXT: extsb r3, r3
170 %or = or i64 %ptr, 99999
171 %0 = inttoptr i64 %or to ptr
172 %1 = load i8, ptr %0, align 1
173 %conv = sext i8 %1 to i16
177 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
178 define dso_local signext i16 @ld_disjoint_align32_int16_t_int8_t(i64 %ptr) {
179 ; CHECK-P10-LABEL: ld_disjoint_align32_int16_t_int8_t:
180 ; CHECK-P10: # %bb.0: # %entry
181 ; CHECK-P10-NEXT: lis r4, -15264
182 ; CHECK-P10-NEXT: and r3, r3, r4
183 ; CHECK-P10-NEXT: plbz r3, 999990000(r3), 0
184 ; CHECK-P10-NEXT: extsb r3, r3
185 ; CHECK-P10-NEXT: blr
187 ; CHECK-PREP10-LABEL: ld_disjoint_align32_int16_t_int8_t:
188 ; CHECK-PREP10: # %bb.0: # %entry
189 ; CHECK-PREP10-NEXT: lis r4, -15264
190 ; CHECK-PREP10-NEXT: and r3, r3, r4
191 ; CHECK-PREP10-NEXT: lis r4, 15258
192 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
193 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
194 ; CHECK-PREP10-NEXT: extsb r3, r3
195 ; CHECK-PREP10-NEXT: blr
197 %and = and i64 %ptr, -1000341504
198 %or = or i64 %and, 999990000
199 %0 = inttoptr i64 %or to ptr
200 %1 = load i8, ptr %0, align 16
201 %conv = sext i8 %1 to i16
205 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
206 define dso_local signext i16 @ld_not_disjoint64_int16_t_int8_t(i64 %ptr) {
207 ; CHECK-P10-LABEL: ld_not_disjoint64_int16_t_int8_t:
208 ; CHECK-P10: # %bb.0: # %entry
209 ; CHECK-P10-NEXT: pli r4, 232
210 ; CHECK-P10-NEXT: pli r5, 3567587329
211 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
212 ; CHECK-P10-NEXT: or r3, r3, r5
213 ; CHECK-P10-NEXT: lbz r3, 0(r3)
214 ; CHECK-P10-NEXT: extsb r3, r3
215 ; CHECK-P10-NEXT: blr
217 ; CHECK-PREP10-LABEL: ld_not_disjoint64_int16_t_int8_t:
218 ; CHECK-PREP10: # %bb.0: # %entry
219 ; CHECK-PREP10-NEXT: li r4, 29
220 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
221 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
222 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
223 ; CHECK-PREP10-NEXT: or r3, r3, r4
224 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
225 ; CHECK-PREP10-NEXT: extsb r3, r3
226 ; CHECK-PREP10-NEXT: blr
228 %or = or i64 %ptr, 1000000000001
229 %0 = inttoptr i64 %or to ptr
230 %1 = load i8, ptr %0, align 1
231 %conv = sext i8 %1 to i16
235 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
236 define dso_local signext i16 @ld_disjoint_align64_int16_t_int8_t(i64 %ptr) {
237 ; CHECK-P10-LABEL: ld_disjoint_align64_int16_t_int8_t:
238 ; CHECK-P10: # %bb.0: # %entry
239 ; CHECK-P10-NEXT: pli r4, 244140625
240 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
241 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
242 ; CHECK-P10-NEXT: lbzx r3, r3, r4
243 ; CHECK-P10-NEXT: extsb r3, r3
244 ; CHECK-P10-NEXT: blr
246 ; CHECK-PREP10-LABEL: ld_disjoint_align64_int16_t_int8_t:
247 ; CHECK-PREP10: # %bb.0: # %entry
248 ; CHECK-PREP10-NEXT: lis r4, 3725
249 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
250 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
251 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
252 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
253 ; CHECK-PREP10-NEXT: extsb r3, r3
254 ; CHECK-PREP10-NEXT: blr
256 %and = and i64 %ptr, -1099511627776
257 %or = or i64 %and, 1000000000000
258 %0 = inttoptr i64 %or to ptr
259 %1 = load i8, ptr %0, align 4096
260 %conv = sext i8 %1 to i16
264 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
265 define dso_local signext i16 @ld_cst_align16_int16_t_int8_t() {
266 ; CHECK-LABEL: ld_cst_align16_int16_t_int8_t:
267 ; CHECK: # %bb.0: # %entry
268 ; CHECK-NEXT: lbz r3, 4080(0)
269 ; CHECK-NEXT: extsb r3, r3
272 %0 = load i8, ptr inttoptr (i64 4080 to ptr), align 16
273 %conv = sext i8 %0 to i16
277 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
278 define dso_local signext i16 @ld_cst_align32_int16_t_int8_t() {
279 ; CHECK-LABEL: ld_cst_align32_int16_t_int8_t:
280 ; CHECK: # %bb.0: # %entry
281 ; CHECK-NEXT: lis r3, 153
282 ; CHECK-NEXT: lbz r3, -27108(r3)
283 ; CHECK-NEXT: extsb r3, r3
286 %0 = load i8, ptr inttoptr (i64 9999900 to ptr), align 4
287 %conv = sext i8 %0 to i16
291 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
292 define dso_local signext i16 @ld_cst_align64_int16_t_int8_t() {
293 ; CHECK-P10-LABEL: ld_cst_align64_int16_t_int8_t:
294 ; CHECK-P10: # %bb.0: # %entry
295 ; CHECK-P10-NEXT: pli r3, 244140625
296 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
297 ; CHECK-P10-NEXT: lbz r3, 0(r3)
298 ; CHECK-P10-NEXT: extsb r3, r3
299 ; CHECK-P10-NEXT: blr
301 ; CHECK-PREP10-LABEL: ld_cst_align64_int16_t_int8_t:
302 ; CHECK-PREP10: # %bb.0: # %entry
303 ; CHECK-PREP10-NEXT: lis r3, 3725
304 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
305 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
306 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
307 ; CHECK-PREP10-NEXT: extsb r3, r3
308 ; CHECK-PREP10-NEXT: blr
310 %0 = load i8, ptr inttoptr (i64 1000000000000 to ptr), align 4096
311 %conv = sext i8 %0 to i16
315 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
316 define dso_local signext i16 @ld_0_int16_t_uint16_t(i64 %ptr) {
317 ; CHECK-LABEL: ld_0_int16_t_uint16_t:
318 ; CHECK: # %bb.0: # %entry
319 ; CHECK-NEXT: lha r3, 0(r3)
322 %0 = inttoptr i64 %ptr to ptr
323 %1 = load i16, ptr %0, align 2
327 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
328 define dso_local signext i16 @ld_align16_int16_t_uint16_t(ptr nocapture readonly %ptr) {
329 ; CHECK-LABEL: ld_align16_int16_t_uint16_t:
330 ; CHECK: # %bb.0: # %entry
331 ; CHECK-NEXT: lha r3, 8(r3)
334 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
335 %0 = load i16, ptr %add.ptr, align 2
339 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
340 define dso_local signext i16 @ld_align32_int16_t_uint16_t(ptr nocapture readonly %ptr) {
341 ; CHECK-P10-LABEL: ld_align32_int16_t_uint16_t:
342 ; CHECK-P10: # %bb.0: # %entry
343 ; CHECK-P10-NEXT: plha r3, 99999000(r3), 0
344 ; CHECK-P10-NEXT: blr
346 ; CHECK-PREP10-LABEL: ld_align32_int16_t_uint16_t:
347 ; CHECK-PREP10: # %bb.0: # %entry
348 ; CHECK-PREP10-NEXT: lis r4, 1525
349 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
350 ; CHECK-PREP10-NEXT: lhax r3, r3, r4
351 ; CHECK-PREP10-NEXT: blr
353 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
354 %0 = load i16, ptr %add.ptr, align 2
358 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
359 define dso_local signext i16 @ld_align64_int16_t_uint16_t(ptr nocapture readonly %ptr) {
360 ; CHECK-P10-LABEL: ld_align64_int16_t_uint16_t:
361 ; CHECK-P10: # %bb.0: # %entry
362 ; CHECK-P10-NEXT: pli r4, 244140625
363 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
364 ; CHECK-P10-NEXT: lhax r3, r3, r4
365 ; CHECK-P10-NEXT: blr
367 ; CHECK-PREP10-LABEL: ld_align64_int16_t_uint16_t:
368 ; CHECK-PREP10: # %bb.0: # %entry
369 ; CHECK-PREP10-NEXT: lis r4, 3725
370 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
371 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
372 ; CHECK-PREP10-NEXT: lhax r3, r3, r4
373 ; CHECK-PREP10-NEXT: blr
375 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
376 %0 = load i16, ptr %add.ptr, align 2
380 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
381 define dso_local signext i16 @ld_reg_int16_t_uint16_t(ptr nocapture readonly %ptr, i64 %off) {
382 ; CHECK-LABEL: ld_reg_int16_t_uint16_t:
383 ; CHECK: # %bb.0: # %entry
384 ; CHECK-NEXT: lhax r3, r3, r4
387 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
388 %0 = load i16, ptr %add.ptr, align 2
392 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
393 define dso_local signext i16 @ld_or_int16_t_uint16_t(i64 %ptr, i8 zeroext %off) {
394 ; CHECK-LABEL: ld_or_int16_t_uint16_t:
395 ; CHECK: # %bb.0: # %entry
396 ; CHECK-NEXT: or r3, r4, r3
397 ; CHECK-NEXT: lha r3, 0(r3)
400 %conv = zext i8 %off to i64
401 %or = or i64 %conv, %ptr
402 %0 = inttoptr i64 %or to ptr
403 %1 = load i16, ptr %0, align 2
407 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
408 define dso_local signext i16 @ld_not_disjoint16_int16_t_uint16_t(i64 %ptr) {
409 ; CHECK-LABEL: ld_not_disjoint16_int16_t_uint16_t:
410 ; CHECK: # %bb.0: # %entry
411 ; CHECK-NEXT: ori r3, r3, 6
412 ; CHECK-NEXT: lha r3, 0(r3)
416 %0 = inttoptr i64 %or to ptr
417 %1 = load i16, ptr %0, align 2
421 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
422 define dso_local signext i16 @ld_disjoint_align16_int16_t_uint16_t(i64 %ptr) {
423 ; CHECK-LABEL: ld_disjoint_align16_int16_t_uint16_t:
424 ; CHECK: # %bb.0: # %entry
425 ; CHECK-NEXT: rldicr r3, r3, 0, 51
426 ; CHECK-NEXT: lha r3, 24(r3)
429 %and = and i64 %ptr, -4096
430 %or = or i64 %and, 24
431 %0 = inttoptr i64 %or to ptr
432 %1 = load i16, ptr %0, align 8
436 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
437 define dso_local signext i16 @ld_not_disjoint32_int16_t_uint16_t(i64 %ptr) {
438 ; CHECK-LABEL: ld_not_disjoint32_int16_t_uint16_t:
439 ; CHECK: # %bb.0: # %entry
440 ; CHECK-NEXT: ori r3, r3, 34463
441 ; CHECK-NEXT: oris r3, r3, 1
442 ; CHECK-NEXT: lha r3, 0(r3)
445 %or = or i64 %ptr, 99999
446 %0 = inttoptr i64 %or to ptr
447 %1 = load i16, ptr %0, align 2
451 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
452 define dso_local signext i16 @ld_disjoint_align32_int16_t_uint16_t(i64 %ptr) {
453 ; CHECK-P10-LABEL: ld_disjoint_align32_int16_t_uint16_t:
454 ; CHECK-P10: # %bb.0: # %entry
455 ; CHECK-P10-NEXT: lis r4, -15264
456 ; CHECK-P10-NEXT: and r3, r3, r4
457 ; CHECK-P10-NEXT: plha r3, 999990000(r3), 0
458 ; CHECK-P10-NEXT: blr
460 ; CHECK-PREP10-LABEL: ld_disjoint_align32_int16_t_uint16_t:
461 ; CHECK-PREP10: # %bb.0: # %entry
462 ; CHECK-PREP10-NEXT: lis r4, -15264
463 ; CHECK-PREP10-NEXT: and r3, r3, r4
464 ; CHECK-PREP10-NEXT: lis r4, 15258
465 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
466 ; CHECK-PREP10-NEXT: lhax r3, r3, r4
467 ; CHECK-PREP10-NEXT: blr
469 %and = and i64 %ptr, -1000341504
470 %or = or i64 %and, 999990000
471 %0 = inttoptr i64 %or to ptr
472 %1 = load i16, ptr %0, align 16
476 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
477 define dso_local signext i16 @ld_not_disjoint64_int16_t_uint16_t(i64 %ptr) {
478 ; CHECK-P10-LABEL: ld_not_disjoint64_int16_t_uint16_t:
479 ; CHECK-P10: # %bb.0: # %entry
480 ; CHECK-P10-NEXT: pli r4, 232
481 ; CHECK-P10-NEXT: pli r5, 3567587329
482 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
483 ; CHECK-P10-NEXT: or r3, r3, r5
484 ; CHECK-P10-NEXT: lha r3, 0(r3)
485 ; CHECK-P10-NEXT: blr
487 ; CHECK-PREP10-LABEL: ld_not_disjoint64_int16_t_uint16_t:
488 ; CHECK-PREP10: # %bb.0: # %entry
489 ; CHECK-PREP10-NEXT: li r4, 29
490 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
491 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
492 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
493 ; CHECK-PREP10-NEXT: or r3, r3, r4
494 ; CHECK-PREP10-NEXT: lha r3, 0(r3)
495 ; CHECK-PREP10-NEXT: blr
497 %or = or i64 %ptr, 1000000000001
498 %0 = inttoptr i64 %or to ptr
499 %1 = load i16, ptr %0, align 2
503 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
504 define dso_local signext i16 @ld_disjoint_align64_int16_t_uint16_t(i64 %ptr) {
505 ; CHECK-P10-LABEL: ld_disjoint_align64_int16_t_uint16_t:
506 ; CHECK-P10: # %bb.0: # %entry
507 ; CHECK-P10-NEXT: pli r4, 244140625
508 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
509 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
510 ; CHECK-P10-NEXT: lhax r3, r3, r4
511 ; CHECK-P10-NEXT: blr
513 ; CHECK-PREP10-LABEL: ld_disjoint_align64_int16_t_uint16_t:
514 ; CHECK-PREP10: # %bb.0: # %entry
515 ; CHECK-PREP10-NEXT: lis r4, 3725
516 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
517 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
518 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
519 ; CHECK-PREP10-NEXT: lhax r3, r3, r4
520 ; CHECK-PREP10-NEXT: blr
522 %and = and i64 %ptr, -1099511627776
523 %or = or i64 %and, 1000000000000
524 %0 = inttoptr i64 %or to ptr
525 %1 = load i16, ptr %0, align 4096
529 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
530 define dso_local signext i16 @ld_cst_align16_int16_t_uint16_t() {
531 ; CHECK-LABEL: ld_cst_align16_int16_t_uint16_t:
532 ; CHECK: # %bb.0: # %entry
533 ; CHECK-NEXT: lha r3, 4080(0)
536 %0 = load i16, ptr inttoptr (i64 4080 to ptr), align 16
540 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
541 define dso_local signext i16 @ld_cst_align32_int16_t_uint16_t() {
542 ; CHECK-LABEL: ld_cst_align32_int16_t_uint16_t:
543 ; CHECK: # %bb.0: # %entry
544 ; CHECK-NEXT: lis r3, 153
545 ; CHECK-NEXT: lha r3, -27108(r3)
548 %0 = load i16, ptr inttoptr (i64 9999900 to ptr), align 4
552 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
553 define dso_local signext i16 @ld_cst_align64_int16_t_uint16_t() {
554 ; CHECK-P10-LABEL: ld_cst_align64_int16_t_uint16_t:
555 ; CHECK-P10: # %bb.0: # %entry
556 ; CHECK-P10-NEXT: pli r3, 244140625
557 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
558 ; CHECK-P10-NEXT: lha r3, 0(r3)
559 ; CHECK-P10-NEXT: blr
561 ; CHECK-PREP10-LABEL: ld_cst_align64_int16_t_uint16_t:
562 ; CHECK-PREP10: # %bb.0: # %entry
563 ; CHECK-PREP10-NEXT: lis r3, 3725
564 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
565 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
566 ; CHECK-PREP10-NEXT: lha r3, 0(r3)
567 ; CHECK-PREP10-NEXT: blr
569 %0 = load i16, ptr inttoptr (i64 1000000000000 to ptr), align 4096
573 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
574 define dso_local signext i16 @ld_0_int16_t_uint32_t(i64 %ptr) {
575 ; CHECK-LE-LABEL: ld_0_int16_t_uint32_t:
576 ; CHECK-LE: # %bb.0: # %entry
577 ; CHECK-LE-NEXT: lha r3, 0(r3)
580 ; CHECK-BE-LABEL: ld_0_int16_t_uint32_t:
581 ; CHECK-BE: # %bb.0: # %entry
582 ; CHECK-BE-NEXT: lha r3, 2(r3)
585 %0 = inttoptr i64 %ptr to ptr
586 %1 = load i32, ptr %0, align 4
587 %conv = trunc i32 %1 to i16
591 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
592 define dso_local signext i16 @ld_align16_int16_t_uint32_t(ptr nocapture readonly %ptr) {
593 ; CHECK-LE-LABEL: ld_align16_int16_t_uint32_t:
594 ; CHECK-LE: # %bb.0: # %entry
595 ; CHECK-LE-NEXT: lha r3, 8(r3)
598 ; CHECK-BE-LABEL: ld_align16_int16_t_uint32_t:
599 ; CHECK-BE: # %bb.0: # %entry
600 ; CHECK-BE-NEXT: lha r3, 10(r3)
603 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
604 %0 = load i32, ptr %add.ptr, align 4
605 %conv = trunc i32 %0 to i16
609 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
610 define dso_local signext i16 @ld_align32_int16_t_uint32_t(ptr nocapture readonly %ptr) {
611 ; CHECK-P10-LE-LABEL: ld_align32_int16_t_uint32_t:
612 ; CHECK-P10-LE: # %bb.0: # %entry
613 ; CHECK-P10-LE-NEXT: plha r3, 99999000(r3), 0
614 ; CHECK-P10-LE-NEXT: blr
616 ; CHECK-P10-BE-LABEL: ld_align32_int16_t_uint32_t:
617 ; CHECK-P10-BE: # %bb.0: # %entry
618 ; CHECK-P10-BE-NEXT: plha r3, 99999002(r3), 0
619 ; CHECK-P10-BE-NEXT: blr
621 ; CHECK-P9-LE-LABEL: ld_align32_int16_t_uint32_t:
622 ; CHECK-P9-LE: # %bb.0: # %entry
623 ; CHECK-P9-LE-NEXT: lis r4, 1525
624 ; CHECK-P9-LE-NEXT: ori r4, r4, 56600
625 ; CHECK-P9-LE-NEXT: lhax r3, r3, r4
626 ; CHECK-P9-LE-NEXT: blr
628 ; CHECK-P9-BE-LABEL: ld_align32_int16_t_uint32_t:
629 ; CHECK-P9-BE: # %bb.0: # %entry
630 ; CHECK-P9-BE-NEXT: lis r4, 1525
631 ; CHECK-P9-BE-NEXT: ori r4, r4, 56602
632 ; CHECK-P9-BE-NEXT: lhax r3, r3, r4
633 ; CHECK-P9-BE-NEXT: blr
635 ; CHECK-P8-LE-LABEL: ld_align32_int16_t_uint32_t:
636 ; CHECK-P8-LE: # %bb.0: # %entry
637 ; CHECK-P8-LE-NEXT: lis r4, 1525
638 ; CHECK-P8-LE-NEXT: ori r4, r4, 56600
639 ; CHECK-P8-LE-NEXT: lhax r3, r3, r4
640 ; CHECK-P8-LE-NEXT: blr
642 ; CHECK-P8-BE-LABEL: ld_align32_int16_t_uint32_t:
643 ; CHECK-P8-BE: # %bb.0: # %entry
644 ; CHECK-P8-BE-NEXT: lis r4, 1525
645 ; CHECK-P8-BE-NEXT: ori r4, r4, 56602
646 ; CHECK-P8-BE-NEXT: lhax r3, r3, r4
647 ; CHECK-P8-BE-NEXT: blr
649 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
650 %0 = load i32, ptr %add.ptr, align 4
651 %conv = trunc i32 %0 to i16
655 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
656 define dso_local signext i16 @ld_align64_int16_t_uint32_t(ptr nocapture readonly %ptr) {
657 ; CHECK-P10-LE-LABEL: ld_align64_int16_t_uint32_t:
658 ; CHECK-P10-LE: # %bb.0: # %entry
659 ; CHECK-P10-LE-NEXT: pli r4, 244140625
660 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
661 ; CHECK-P10-LE-NEXT: lhax r3, r3, r4
662 ; CHECK-P10-LE-NEXT: blr
664 ; CHECK-P10-BE-LABEL: ld_align64_int16_t_uint32_t:
665 ; CHECK-P10-BE: # %bb.0: # %entry
666 ; CHECK-P10-BE-NEXT: pli r4, 232
667 ; CHECK-P10-BE-NEXT: pli r5, 3567587330
668 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
669 ; CHECK-P10-BE-NEXT: lhax r3, r3, r5
670 ; CHECK-P10-BE-NEXT: blr
672 ; CHECK-P9-LE-LABEL: ld_align64_int16_t_uint32_t:
673 ; CHECK-P9-LE: # %bb.0: # %entry
674 ; CHECK-P9-LE-NEXT: lis r4, 3725
675 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
676 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
677 ; CHECK-P9-LE-NEXT: lhax r3, r3, r4
678 ; CHECK-P9-LE-NEXT: blr
680 ; CHECK-P9-BE-LABEL: ld_align64_int16_t_uint32_t:
681 ; CHECK-P9-BE: # %bb.0: # %entry
682 ; CHECK-P9-BE-NEXT: li r4, 29
683 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
684 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
685 ; CHECK-P9-BE-NEXT: ori r4, r4, 4098
686 ; CHECK-P9-BE-NEXT: lhax r3, r3, r4
687 ; CHECK-P9-BE-NEXT: blr
689 ; CHECK-P8-LE-LABEL: ld_align64_int16_t_uint32_t:
690 ; CHECK-P8-LE: # %bb.0: # %entry
691 ; CHECK-P8-LE-NEXT: lis r4, 3725
692 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
693 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
694 ; CHECK-P8-LE-NEXT: lhax r3, r3, r4
695 ; CHECK-P8-LE-NEXT: blr
697 ; CHECK-P8-BE-LABEL: ld_align64_int16_t_uint32_t:
698 ; CHECK-P8-BE: # %bb.0: # %entry
699 ; CHECK-P8-BE-NEXT: li r4, 29
700 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
701 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
702 ; CHECK-P8-BE-NEXT: ori r4, r4, 4098
703 ; CHECK-P8-BE-NEXT: lhax r3, r3, r4
704 ; CHECK-P8-BE-NEXT: blr
706 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
707 %0 = load i32, ptr %add.ptr, align 4
708 %conv = trunc i32 %0 to i16
712 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
713 define dso_local signext i16 @ld_reg_int16_t_uint32_t(ptr nocapture readonly %ptr, i64 %off) {
714 ; CHECK-LE-LABEL: ld_reg_int16_t_uint32_t:
715 ; CHECK-LE: # %bb.0: # %entry
716 ; CHECK-LE-NEXT: lhax r3, r3, r4
719 ; CHECK-BE-LABEL: ld_reg_int16_t_uint32_t:
720 ; CHECK-BE: # %bb.0: # %entry
721 ; CHECK-BE-NEXT: add r3, r3, r4
722 ; CHECK-BE-NEXT: lha r3, 2(r3)
725 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
726 %0 = load i32, ptr %add.ptr, align 4
727 %conv = trunc i32 %0 to i16
731 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
732 define dso_local signext i16 @ld_or_int16_t_uint32_t(i64 %ptr, i8 zeroext %off) {
733 ; CHECK-LE-LABEL: ld_or_int16_t_uint32_t:
734 ; CHECK-LE: # %bb.0: # %entry
735 ; CHECK-LE-NEXT: or r3, r4, r3
736 ; CHECK-LE-NEXT: lha r3, 0(r3)
739 ; CHECK-BE-LABEL: ld_or_int16_t_uint32_t:
740 ; CHECK-BE: # %bb.0: # %entry
741 ; CHECK-BE-NEXT: or r3, r4, r3
742 ; CHECK-BE-NEXT: lha r3, 2(r3)
745 %conv = zext i8 %off to i64
746 %or = or i64 %conv, %ptr
747 %0 = inttoptr i64 %or to ptr
748 %1 = load i32, ptr %0, align 4
749 %conv1 = trunc i32 %1 to i16
753 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
754 define dso_local signext i16 @ld_not_disjoint16_int16_t_uint32_t(i64 %ptr) {
755 ; CHECK-LE-LABEL: ld_not_disjoint16_int16_t_uint32_t:
756 ; CHECK-LE: # %bb.0: # %entry
757 ; CHECK-LE-NEXT: ori r3, r3, 6
758 ; CHECK-LE-NEXT: lha r3, 0(r3)
761 ; CHECK-BE-LABEL: ld_not_disjoint16_int16_t_uint32_t:
762 ; CHECK-BE: # %bb.0: # %entry
763 ; CHECK-BE-NEXT: ori r3, r3, 6
764 ; CHECK-BE-NEXT: lha r3, 2(r3)
768 %0 = inttoptr i64 %or to ptr
769 %1 = load i32, ptr %0, align 4
770 %conv = trunc i32 %1 to i16
774 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
775 define dso_local signext i16 @ld_disjoint_align16_int16_t_uint32_t(i64 %ptr) {
776 ; CHECK-LE-LABEL: ld_disjoint_align16_int16_t_uint32_t:
777 ; CHECK-LE: # %bb.0: # %entry
778 ; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
779 ; CHECK-LE-NEXT: lha r3, 24(r3)
782 ; CHECK-BE-LABEL: ld_disjoint_align16_int16_t_uint32_t:
783 ; CHECK-BE: # %bb.0: # %entry
784 ; CHECK-BE-NEXT: rldicr r3, r3, 0, 51
785 ; CHECK-BE-NEXT: lha r3, 26(r3)
788 %and = and i64 %ptr, -4096
789 %or = or i64 %and, 24
790 %0 = inttoptr i64 %or to ptr
791 %1 = load i32, ptr %0, align 8
792 %conv = trunc i32 %1 to i16
796 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
797 define dso_local signext i16 @ld_not_disjoint32_int16_t_uint32_t(i64 %ptr) {
798 ; CHECK-LE-LABEL: ld_not_disjoint32_int16_t_uint32_t:
799 ; CHECK-LE: # %bb.0: # %entry
800 ; CHECK-LE-NEXT: ori r3, r3, 34463
801 ; CHECK-LE-NEXT: oris r3, r3, 1
802 ; CHECK-LE-NEXT: lha r3, 0(r3)
805 ; CHECK-BE-LABEL: ld_not_disjoint32_int16_t_uint32_t:
806 ; CHECK-BE: # %bb.0: # %entry
807 ; CHECK-BE-NEXT: ori r3, r3, 34463
808 ; CHECK-BE-NEXT: oris r3, r3, 1
809 ; CHECK-BE-NEXT: lha r3, 2(r3)
812 %or = or i64 %ptr, 99999
813 %0 = inttoptr i64 %or to ptr
814 %1 = load i32, ptr %0, align 4
815 %conv = trunc i32 %1 to i16
819 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
820 define dso_local signext i16 @ld_disjoint_align32_int16_t_uint32_t(i64 %ptr) {
821 ; CHECK-P10-LE-LABEL: ld_disjoint_align32_int16_t_uint32_t:
822 ; CHECK-P10-LE: # %bb.0: # %entry
823 ; CHECK-P10-LE-NEXT: lis r4, -15264
824 ; CHECK-P10-LE-NEXT: and r3, r3, r4
825 ; CHECK-P10-LE-NEXT: plha r3, 999990000(r3), 0
826 ; CHECK-P10-LE-NEXT: blr
828 ; CHECK-P10-BE-LABEL: ld_disjoint_align32_int16_t_uint32_t:
829 ; CHECK-P10-BE: # %bb.0: # %entry
830 ; CHECK-P10-BE-NEXT: lis r4, -15264
831 ; CHECK-P10-BE-NEXT: and r3, r3, r4
832 ; CHECK-P10-BE-NEXT: plha r3, 999990002(r3), 0
833 ; CHECK-P10-BE-NEXT: blr
835 ; CHECK-P9-LE-LABEL: ld_disjoint_align32_int16_t_uint32_t:
836 ; CHECK-P9-LE: # %bb.0: # %entry
837 ; CHECK-P9-LE-NEXT: lis r4, -15264
838 ; CHECK-P9-LE-NEXT: and r3, r3, r4
839 ; CHECK-P9-LE-NEXT: lis r4, 15258
840 ; CHECK-P9-LE-NEXT: ori r4, r4, 41712
841 ; CHECK-P9-LE-NEXT: lhax r3, r3, r4
842 ; CHECK-P9-LE-NEXT: blr
844 ; CHECK-P9-BE-LABEL: ld_disjoint_align32_int16_t_uint32_t:
845 ; CHECK-P9-BE: # %bb.0: # %entry
846 ; CHECK-P9-BE-NEXT: lis r4, -15264
847 ; CHECK-P9-BE-NEXT: and r3, r3, r4
848 ; CHECK-P9-BE-NEXT: lis r4, 15258
849 ; CHECK-P9-BE-NEXT: ori r4, r4, 41714
850 ; CHECK-P9-BE-NEXT: lhax r3, r3, r4
851 ; CHECK-P9-BE-NEXT: blr
853 ; CHECK-P8-LE-LABEL: ld_disjoint_align32_int16_t_uint32_t:
854 ; CHECK-P8-LE: # %bb.0: # %entry
855 ; CHECK-P8-LE-NEXT: lis r4, -15264
856 ; CHECK-P8-LE-NEXT: and r3, r3, r4
857 ; CHECK-P8-LE-NEXT: lis r4, 15258
858 ; CHECK-P8-LE-NEXT: ori r4, r4, 41712
859 ; CHECK-P8-LE-NEXT: lhax r3, r3, r4
860 ; CHECK-P8-LE-NEXT: blr
862 ; CHECK-P8-BE-LABEL: ld_disjoint_align32_int16_t_uint32_t:
863 ; CHECK-P8-BE: # %bb.0: # %entry
864 ; CHECK-P8-BE-NEXT: lis r4, -15264
865 ; CHECK-P8-BE-NEXT: and r3, r3, r4
866 ; CHECK-P8-BE-NEXT: lis r4, 15258
867 ; CHECK-P8-BE-NEXT: ori r4, r4, 41714
868 ; CHECK-P8-BE-NEXT: lhax r3, r3, r4
869 ; CHECK-P8-BE-NEXT: blr
871 %and = and i64 %ptr, -1000341504
872 %or = or i64 %and, 999990000
873 %0 = inttoptr i64 %or to ptr
874 %1 = load i32, ptr %0, align 16
875 %conv = trunc i32 %1 to i16
879 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
880 define dso_local signext i16 @ld_not_disjoint64_int16_t_uint32_t(i64 %ptr) {
881 ; CHECK-P10-LE-LABEL: ld_not_disjoint64_int16_t_uint32_t:
882 ; CHECK-P10-LE: # %bb.0: # %entry
883 ; CHECK-P10-LE-NEXT: pli r4, 232
884 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
885 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
886 ; CHECK-P10-LE-NEXT: or r3, r3, r5
887 ; CHECK-P10-LE-NEXT: lha r3, 0(r3)
888 ; CHECK-P10-LE-NEXT: blr
890 ; CHECK-P10-BE-LABEL: ld_not_disjoint64_int16_t_uint32_t:
891 ; CHECK-P10-BE: # %bb.0: # %entry
892 ; CHECK-P10-BE-NEXT: pli r4, 232
893 ; CHECK-P10-BE-NEXT: pli r5, 3567587329
894 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
895 ; CHECK-P10-BE-NEXT: or r3, r3, r5
896 ; CHECK-P10-BE-NEXT: lha r3, 2(r3)
897 ; CHECK-P10-BE-NEXT: blr
899 ; CHECK-P9-LE-LABEL: ld_not_disjoint64_int16_t_uint32_t:
900 ; CHECK-P9-LE: # %bb.0: # %entry
901 ; CHECK-P9-LE-NEXT: li r4, 29
902 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
903 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
904 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
905 ; CHECK-P9-LE-NEXT: or r3, r3, r4
906 ; CHECK-P9-LE-NEXT: lha r3, 0(r3)
907 ; CHECK-P9-LE-NEXT: blr
909 ; CHECK-P9-BE-LABEL: ld_not_disjoint64_int16_t_uint32_t:
910 ; CHECK-P9-BE: # %bb.0: # %entry
911 ; CHECK-P9-BE-NEXT: li r4, 29
912 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
913 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
914 ; CHECK-P9-BE-NEXT: ori r4, r4, 4097
915 ; CHECK-P9-BE-NEXT: or r3, r3, r4
916 ; CHECK-P9-BE-NEXT: lha r3, 2(r3)
917 ; CHECK-P9-BE-NEXT: blr
919 ; CHECK-P8-LE-LABEL: ld_not_disjoint64_int16_t_uint32_t:
920 ; CHECK-P8-LE: # %bb.0: # %entry
921 ; CHECK-P8-LE-NEXT: li r4, 29
922 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
923 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
924 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
925 ; CHECK-P8-LE-NEXT: or r3, r3, r4
926 ; CHECK-P8-LE-NEXT: lha r3, 0(r3)
927 ; CHECK-P8-LE-NEXT: blr
929 ; CHECK-P8-BE-LABEL: ld_not_disjoint64_int16_t_uint32_t:
930 ; CHECK-P8-BE: # %bb.0: # %entry
931 ; CHECK-P8-BE-NEXT: li r4, 29
932 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
933 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
934 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
935 ; CHECK-P8-BE-NEXT: or r3, r3, r4
936 ; CHECK-P8-BE-NEXT: lha r3, 2(r3)
937 ; CHECK-P8-BE-NEXT: blr
939 %or = or i64 %ptr, 1000000000001
940 %0 = inttoptr i64 %or to ptr
941 %1 = load i32, ptr %0, align 4
942 %conv = trunc i32 %1 to i16
946 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
947 define dso_local signext i16 @ld_disjoint_align64_int16_t_uint32_t(i64 %ptr) {
948 ; CHECK-P10-LE-LABEL: ld_disjoint_align64_int16_t_uint32_t:
949 ; CHECK-P10-LE: # %bb.0: # %entry
950 ; CHECK-P10-LE-NEXT: pli r4, 244140625
951 ; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
952 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
953 ; CHECK-P10-LE-NEXT: lhax r3, r3, r4
954 ; CHECK-P10-LE-NEXT: blr
956 ; CHECK-P10-BE-LABEL: ld_disjoint_align64_int16_t_uint32_t:
957 ; CHECK-P10-BE: # %bb.0: # %entry
958 ; CHECK-P10-BE-NEXT: pli r4, 232
959 ; CHECK-P10-BE-NEXT: pli r5, 3567587330
960 ; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
961 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
962 ; CHECK-P10-BE-NEXT: lhax r3, r3, r5
963 ; CHECK-P10-BE-NEXT: blr
965 ; CHECK-P9-LE-LABEL: ld_disjoint_align64_int16_t_uint32_t:
966 ; CHECK-P9-LE: # %bb.0: # %entry
967 ; CHECK-P9-LE-NEXT: lis r4, 3725
968 ; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
969 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
970 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
971 ; CHECK-P9-LE-NEXT: lhax r3, r3, r4
972 ; CHECK-P9-LE-NEXT: blr
974 ; CHECK-P9-BE-LABEL: ld_disjoint_align64_int16_t_uint32_t:
975 ; CHECK-P9-BE: # %bb.0: # %entry
976 ; CHECK-P9-BE-NEXT: li r4, 29
977 ; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
978 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
979 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
980 ; CHECK-P9-BE-NEXT: ori r4, r4, 4098
981 ; CHECK-P9-BE-NEXT: lhax r3, r3, r4
982 ; CHECK-P9-BE-NEXT: blr
984 ; CHECK-P8-LE-LABEL: ld_disjoint_align64_int16_t_uint32_t:
985 ; CHECK-P8-LE: # %bb.0: # %entry
986 ; CHECK-P8-LE-NEXT: lis r4, 3725
987 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
988 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
989 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
990 ; CHECK-P8-LE-NEXT: lhax r3, r3, r4
991 ; CHECK-P8-LE-NEXT: blr
993 ; CHECK-P8-BE-LABEL: ld_disjoint_align64_int16_t_uint32_t:
994 ; CHECK-P8-BE: # %bb.0: # %entry
995 ; CHECK-P8-BE-NEXT: li r4, 29
996 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
997 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
998 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
999 ; CHECK-P8-BE-NEXT: ori r4, r4, 4098
1000 ; CHECK-P8-BE-NEXT: lhax r3, r3, r4
1001 ; CHECK-P8-BE-NEXT: blr
1003 %and = and i64 %ptr, -1099511627776
1004 %or = or i64 %and, 1000000000000
1005 %0 = inttoptr i64 %or to ptr
1006 %1 = load i32, ptr %0, align 4096
1007 %conv = trunc i32 %1 to i16
1011 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1012 define dso_local signext i16 @ld_cst_align16_int16_t_uint32_t() {
1013 ; CHECK-LE-LABEL: ld_cst_align16_int16_t_uint32_t:
1014 ; CHECK-LE: # %bb.0: # %entry
1015 ; CHECK-LE-NEXT: lha r3, 4080(0)
1016 ; CHECK-LE-NEXT: blr
1018 ; CHECK-BE-LABEL: ld_cst_align16_int16_t_uint32_t:
1019 ; CHECK-BE: # %bb.0: # %entry
1020 ; CHECK-BE-NEXT: lha r3, 4082(0)
1021 ; CHECK-BE-NEXT: blr
1023 %0 = load i32, ptr inttoptr (i64 4080 to ptr), align 16
1024 %conv = trunc i32 %0 to i16
1028 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1029 define dso_local signext i16 @ld_cst_align32_int16_t_uint32_t() {
1030 ; CHECK-LE-LABEL: ld_cst_align32_int16_t_uint32_t:
1031 ; CHECK-LE: # %bb.0: # %entry
1032 ; CHECK-LE-NEXT: lis r3, 153
1033 ; CHECK-LE-NEXT: lha r3, -27108(r3)
1034 ; CHECK-LE-NEXT: blr
1036 ; CHECK-BE-LABEL: ld_cst_align32_int16_t_uint32_t:
1037 ; CHECK-BE: # %bb.0: # %entry
1038 ; CHECK-BE-NEXT: lis r3, 153
1039 ; CHECK-BE-NEXT: lha r3, -27106(r3)
1040 ; CHECK-BE-NEXT: blr
1042 %0 = load i32, ptr inttoptr (i64 9999900 to ptr), align 4
1043 %conv = trunc i32 %0 to i16
1047 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1048 define dso_local signext i16 @ld_cst_align64_int16_t_uint32_t() {
1049 ; CHECK-P10-LE-LABEL: ld_cst_align64_int16_t_uint32_t:
1050 ; CHECK-P10-LE: # %bb.0: # %entry
1051 ; CHECK-P10-LE-NEXT: pli r3, 244140625
1052 ; CHECK-P10-LE-NEXT: rldic r3, r3, 12, 24
1053 ; CHECK-P10-LE-NEXT: lha r3, 0(r3)
1054 ; CHECK-P10-LE-NEXT: blr
1056 ; CHECK-P10-BE-LABEL: ld_cst_align64_int16_t_uint32_t:
1057 ; CHECK-P10-BE: # %bb.0: # %entry
1058 ; CHECK-P10-BE-NEXT: pli r3, 232
1059 ; CHECK-P10-BE-NEXT: pli r4, 3567587330
1060 ; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
1061 ; CHECK-P10-BE-NEXT: lha r3, 0(r4)
1062 ; CHECK-P10-BE-NEXT: blr
1064 ; CHECK-P9-LE-LABEL: ld_cst_align64_int16_t_uint32_t:
1065 ; CHECK-P9-LE: # %bb.0: # %entry
1066 ; CHECK-P9-LE-NEXT: lis r3, 3725
1067 ; CHECK-P9-LE-NEXT: ori r3, r3, 19025
1068 ; CHECK-P9-LE-NEXT: rldic r3, r3, 12, 24
1069 ; CHECK-P9-LE-NEXT: lha r3, 0(r3)
1070 ; CHECK-P9-LE-NEXT: blr
1072 ; CHECK-P9-BE-LABEL: ld_cst_align64_int16_t_uint32_t:
1073 ; CHECK-P9-BE: # %bb.0: # %entry
1074 ; CHECK-P9-BE-NEXT: li r3, 29
1075 ; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
1076 ; CHECK-P9-BE-NEXT: oris r3, r3, 54437
1077 ; CHECK-P9-BE-NEXT: ori r3, r3, 4098
1078 ; CHECK-P9-BE-NEXT: lha r3, 0(r3)
1079 ; CHECK-P9-BE-NEXT: blr
1081 ; CHECK-P8-LE-LABEL: ld_cst_align64_int16_t_uint32_t:
1082 ; CHECK-P8-LE: # %bb.0: # %entry
1083 ; CHECK-P8-LE-NEXT: lis r3, 3725
1084 ; CHECK-P8-LE-NEXT: ori r3, r3, 19025
1085 ; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
1086 ; CHECK-P8-LE-NEXT: lha r3, 0(r3)
1087 ; CHECK-P8-LE-NEXT: blr
1089 ; CHECK-P8-BE-LABEL: ld_cst_align64_int16_t_uint32_t:
1090 ; CHECK-P8-BE: # %bb.0: # %entry
1091 ; CHECK-P8-BE-NEXT: li r3, 29
1092 ; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
1093 ; CHECK-P8-BE-NEXT: oris r3, r3, 54437
1094 ; CHECK-P8-BE-NEXT: ori r3, r3, 4098
1095 ; CHECK-P8-BE-NEXT: lha r3, 0(r3)
1096 ; CHECK-P8-BE-NEXT: blr
1098 %0 = load i32, ptr inttoptr (i64 1000000000000 to ptr), align 4096
1099 %conv = trunc i32 %0 to i16
1103 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1104 define dso_local signext i16 @ld_0_int16_t_uint64_t(i64 %ptr) {
1105 ; CHECK-LE-LABEL: ld_0_int16_t_uint64_t:
1106 ; CHECK-LE: # %bb.0: # %entry
1107 ; CHECK-LE-NEXT: lha r3, 0(r3)
1108 ; CHECK-LE-NEXT: blr
1110 ; CHECK-BE-LABEL: ld_0_int16_t_uint64_t:
1111 ; CHECK-BE: # %bb.0: # %entry
1112 ; CHECK-BE-NEXT: lha r3, 6(r3)
1113 ; CHECK-BE-NEXT: blr
1115 %0 = inttoptr i64 %ptr to ptr
1116 %1 = load i64, ptr %0, align 8
1117 %conv = trunc i64 %1 to i16
1121 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1122 define dso_local signext i16 @ld_align16_int16_t_uint64_t(ptr nocapture readonly %ptr) {
1123 ; CHECK-LE-LABEL: ld_align16_int16_t_uint64_t:
1124 ; CHECK-LE: # %bb.0: # %entry
1125 ; CHECK-LE-NEXT: lha r3, 8(r3)
1126 ; CHECK-LE-NEXT: blr
1128 ; CHECK-BE-LABEL: ld_align16_int16_t_uint64_t:
1129 ; CHECK-BE: # %bb.0: # %entry
1130 ; CHECK-BE-NEXT: lha r3, 14(r3)
1131 ; CHECK-BE-NEXT: blr
1133 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
1134 %0 = load i64, ptr %add.ptr, align 8
1135 %conv = trunc i64 %0 to i16
1139 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1140 define dso_local signext i16 @ld_align32_int16_t_uint64_t(ptr nocapture readonly %ptr) {
1141 ; CHECK-P10-LE-LABEL: ld_align32_int16_t_uint64_t:
1142 ; CHECK-P10-LE: # %bb.0: # %entry
1143 ; CHECK-P10-LE-NEXT: plha r3, 99999000(r3), 0
1144 ; CHECK-P10-LE-NEXT: blr
1146 ; CHECK-P10-BE-LABEL: ld_align32_int16_t_uint64_t:
1147 ; CHECK-P10-BE: # %bb.0: # %entry
1148 ; CHECK-P10-BE-NEXT: plha r3, 99999006(r3), 0
1149 ; CHECK-P10-BE-NEXT: blr
1151 ; CHECK-P9-LE-LABEL: ld_align32_int16_t_uint64_t:
1152 ; CHECK-P9-LE: # %bb.0: # %entry
1153 ; CHECK-P9-LE-NEXT: lis r4, 1525
1154 ; CHECK-P9-LE-NEXT: ori r4, r4, 56600
1155 ; CHECK-P9-LE-NEXT: lhax r3, r3, r4
1156 ; CHECK-P9-LE-NEXT: blr
1158 ; CHECK-P9-BE-LABEL: ld_align32_int16_t_uint64_t:
1159 ; CHECK-P9-BE: # %bb.0: # %entry
1160 ; CHECK-P9-BE-NEXT: lis r4, 1525
1161 ; CHECK-P9-BE-NEXT: ori r4, r4, 56606
1162 ; CHECK-P9-BE-NEXT: lhax r3, r3, r4
1163 ; CHECK-P9-BE-NEXT: blr
1165 ; CHECK-P8-LE-LABEL: ld_align32_int16_t_uint64_t:
1166 ; CHECK-P8-LE: # %bb.0: # %entry
1167 ; CHECK-P8-LE-NEXT: lis r4, 1525
1168 ; CHECK-P8-LE-NEXT: ori r4, r4, 56600
1169 ; CHECK-P8-LE-NEXT: lhax r3, r3, r4
1170 ; CHECK-P8-LE-NEXT: blr
1172 ; CHECK-P8-BE-LABEL: ld_align32_int16_t_uint64_t:
1173 ; CHECK-P8-BE: # %bb.0: # %entry
1174 ; CHECK-P8-BE-NEXT: lis r4, 1525
1175 ; CHECK-P8-BE-NEXT: ori r4, r4, 56606
1176 ; CHECK-P8-BE-NEXT: lhax r3, r3, r4
1177 ; CHECK-P8-BE-NEXT: blr
1179 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
1180 %0 = load i64, ptr %add.ptr, align 8
1181 %conv = trunc i64 %0 to i16
1185 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1186 define dso_local signext i16 @ld_align64_int16_t_uint64_t(ptr nocapture readonly %ptr) {
1187 ; CHECK-P10-LE-LABEL: ld_align64_int16_t_uint64_t:
1188 ; CHECK-P10-LE: # %bb.0: # %entry
1189 ; CHECK-P10-LE-NEXT: pli r4, 244140625
1190 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
1191 ; CHECK-P10-LE-NEXT: lhax r3, r3, r4
1192 ; CHECK-P10-LE-NEXT: blr
1194 ; CHECK-P10-BE-LABEL: ld_align64_int16_t_uint64_t:
1195 ; CHECK-P10-BE: # %bb.0: # %entry
1196 ; CHECK-P10-BE-NEXT: pli r4, 232
1197 ; CHECK-P10-BE-NEXT: pli r5, 3567587334
1198 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
1199 ; CHECK-P10-BE-NEXT: lhax r3, r3, r5
1200 ; CHECK-P10-BE-NEXT: blr
1202 ; CHECK-P9-LE-LABEL: ld_align64_int16_t_uint64_t:
1203 ; CHECK-P9-LE: # %bb.0: # %entry
1204 ; CHECK-P9-LE-NEXT: lis r4, 3725
1205 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
1206 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
1207 ; CHECK-P9-LE-NEXT: lhax r3, r3, r4
1208 ; CHECK-P9-LE-NEXT: blr
1210 ; CHECK-P9-BE-LABEL: ld_align64_int16_t_uint64_t:
1211 ; CHECK-P9-BE: # %bb.0: # %entry
1212 ; CHECK-P9-BE-NEXT: li r4, 29
1213 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
1214 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
1215 ; CHECK-P9-BE-NEXT: ori r4, r4, 4102
1216 ; CHECK-P9-BE-NEXT: lhax r3, r3, r4
1217 ; CHECK-P9-BE-NEXT: blr
1219 ; CHECK-P8-LE-LABEL: ld_align64_int16_t_uint64_t:
1220 ; CHECK-P8-LE: # %bb.0: # %entry
1221 ; CHECK-P8-LE-NEXT: lis r4, 3725
1222 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
1223 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
1224 ; CHECK-P8-LE-NEXT: lhax r3, r3, r4
1225 ; CHECK-P8-LE-NEXT: blr
1227 ; CHECK-P8-BE-LABEL: ld_align64_int16_t_uint64_t:
1228 ; CHECK-P8-BE: # %bb.0: # %entry
1229 ; CHECK-P8-BE-NEXT: li r4, 29
1230 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
1231 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
1232 ; CHECK-P8-BE-NEXT: ori r4, r4, 4102
1233 ; CHECK-P8-BE-NEXT: lhax r3, r3, r4
1234 ; CHECK-P8-BE-NEXT: blr
1236 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
1237 %0 = load i64, ptr %add.ptr, align 8
1238 %conv = trunc i64 %0 to i16
1242 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1243 define dso_local signext i16 @ld_reg_int16_t_uint64_t(ptr nocapture readonly %ptr, i64 %off) {
1244 ; CHECK-LE-LABEL: ld_reg_int16_t_uint64_t:
1245 ; CHECK-LE: # %bb.0: # %entry
1246 ; CHECK-LE-NEXT: lhax r3, r3, r4
1247 ; CHECK-LE-NEXT: blr
1249 ; CHECK-BE-LABEL: ld_reg_int16_t_uint64_t:
1250 ; CHECK-BE: # %bb.0: # %entry
1251 ; CHECK-BE-NEXT: add r3, r3, r4
1252 ; CHECK-BE-NEXT: lha r3, 6(r3)
1253 ; CHECK-BE-NEXT: blr
1255 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
1256 %0 = load i64, ptr %add.ptr, align 8
1257 %conv = trunc i64 %0 to i16
1261 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1262 define dso_local signext i16 @ld_or_int16_t_uint64_t(i64 %ptr, i8 zeroext %off) {
1263 ; CHECK-LE-LABEL: ld_or_int16_t_uint64_t:
1264 ; CHECK-LE: # %bb.0: # %entry
1265 ; CHECK-LE-NEXT: or r3, r4, r3
1266 ; CHECK-LE-NEXT: lha r3, 0(r3)
1267 ; CHECK-LE-NEXT: blr
1269 ; CHECK-BE-LABEL: ld_or_int16_t_uint64_t:
1270 ; CHECK-BE: # %bb.0: # %entry
1271 ; CHECK-BE-NEXT: or r3, r4, r3
1272 ; CHECK-BE-NEXT: lha r3, 6(r3)
1273 ; CHECK-BE-NEXT: blr
1275 %conv = zext i8 %off to i64
1276 %or = or i64 %conv, %ptr
1277 %0 = inttoptr i64 %or to ptr
1278 %1 = load i64, ptr %0, align 8
1279 %conv1 = trunc i64 %1 to i16
1283 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1284 define dso_local signext i16 @ld_not_disjoint16_int16_t_uint64_t(i64 %ptr) {
1285 ; CHECK-LE-LABEL: ld_not_disjoint16_int16_t_uint64_t:
1286 ; CHECK-LE: # %bb.0: # %entry
1287 ; CHECK-LE-NEXT: ori r3, r3, 6
1288 ; CHECK-LE-NEXT: lha r3, 0(r3)
1289 ; CHECK-LE-NEXT: blr
1291 ; CHECK-BE-LABEL: ld_not_disjoint16_int16_t_uint64_t:
1292 ; CHECK-BE: # %bb.0: # %entry
1293 ; CHECK-BE-NEXT: ori r3, r3, 6
1294 ; CHECK-BE-NEXT: lha r3, 6(r3)
1295 ; CHECK-BE-NEXT: blr
1297 %or = or i64 %ptr, 6
1298 %0 = inttoptr i64 %or to ptr
1299 %1 = load i64, ptr %0, align 8
1300 %conv = trunc i64 %1 to i16
1304 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1305 define dso_local signext i16 @ld_disjoint_align16_int16_t_uint64_t(i64 %ptr) {
1306 ; CHECK-LE-LABEL: ld_disjoint_align16_int16_t_uint64_t:
1307 ; CHECK-LE: # %bb.0: # %entry
1308 ; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
1309 ; CHECK-LE-NEXT: lha r3, 24(r3)
1310 ; CHECK-LE-NEXT: blr
1312 ; CHECK-BE-LABEL: ld_disjoint_align16_int16_t_uint64_t:
1313 ; CHECK-BE: # %bb.0: # %entry
1314 ; CHECK-BE-NEXT: rldicr r3, r3, 0, 51
1315 ; CHECK-BE-NEXT: lha r3, 30(r3)
1316 ; CHECK-BE-NEXT: blr
1318 %and = and i64 %ptr, -4096
1319 %or = or i64 %and, 24
1320 %0 = inttoptr i64 %or to ptr
1321 %1 = load i64, ptr %0, align 8
1322 %conv = trunc i64 %1 to i16
1326 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1327 define dso_local signext i16 @ld_not_disjoint32_int16_t_uint64_t(i64 %ptr) {
1328 ; CHECK-LE-LABEL: ld_not_disjoint32_int16_t_uint64_t:
1329 ; CHECK-LE: # %bb.0: # %entry
1330 ; CHECK-LE-NEXT: ori r3, r3, 34463
1331 ; CHECK-LE-NEXT: oris r3, r3, 1
1332 ; CHECK-LE-NEXT: lha r3, 0(r3)
1333 ; CHECK-LE-NEXT: blr
1335 ; CHECK-BE-LABEL: ld_not_disjoint32_int16_t_uint64_t:
1336 ; CHECK-BE: # %bb.0: # %entry
1337 ; CHECK-BE-NEXT: ori r3, r3, 34463
1338 ; CHECK-BE-NEXT: oris r3, r3, 1
1339 ; CHECK-BE-NEXT: lha r3, 6(r3)
1340 ; CHECK-BE-NEXT: blr
1342 %or = or i64 %ptr, 99999
1343 %0 = inttoptr i64 %or to ptr
1344 %1 = load i64, ptr %0, align 8
1345 %conv = trunc i64 %1 to i16
1349 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1350 define dso_local signext i16 @ld_disjoint_align32_int16_t_uint64_t(i64 %ptr) {
1351 ; CHECK-P10-LE-LABEL: ld_disjoint_align32_int16_t_uint64_t:
1352 ; CHECK-P10-LE: # %bb.0: # %entry
1353 ; CHECK-P10-LE-NEXT: lis r4, -15264
1354 ; CHECK-P10-LE-NEXT: and r3, r3, r4
1355 ; CHECK-P10-LE-NEXT: plha r3, 999990000(r3), 0
1356 ; CHECK-P10-LE-NEXT: blr
1358 ; CHECK-P10-BE-LABEL: ld_disjoint_align32_int16_t_uint64_t:
1359 ; CHECK-P10-BE: # %bb.0: # %entry
1360 ; CHECK-P10-BE-NEXT: lis r4, -15264
1361 ; CHECK-P10-BE-NEXT: and r3, r3, r4
1362 ; CHECK-P10-BE-NEXT: plha r3, 999990006(r3), 0
1363 ; CHECK-P10-BE-NEXT: blr
1365 ; CHECK-P9-LE-LABEL: ld_disjoint_align32_int16_t_uint64_t:
1366 ; CHECK-P9-LE: # %bb.0: # %entry
1367 ; CHECK-P9-LE-NEXT: lis r4, -15264
1368 ; CHECK-P9-LE-NEXT: and r3, r3, r4
1369 ; CHECK-P9-LE-NEXT: lis r4, 15258
1370 ; CHECK-P9-LE-NEXT: ori r4, r4, 41712
1371 ; CHECK-P9-LE-NEXT: lhax r3, r3, r4
1372 ; CHECK-P9-LE-NEXT: blr
1374 ; CHECK-P9-BE-LABEL: ld_disjoint_align32_int16_t_uint64_t:
1375 ; CHECK-P9-BE: # %bb.0: # %entry
1376 ; CHECK-P9-BE-NEXT: lis r4, -15264
1377 ; CHECK-P9-BE-NEXT: and r3, r3, r4
1378 ; CHECK-P9-BE-NEXT: lis r4, 15258
1379 ; CHECK-P9-BE-NEXT: ori r4, r4, 41718
1380 ; CHECK-P9-BE-NEXT: lhax r3, r3, r4
1381 ; CHECK-P9-BE-NEXT: blr
1383 ; CHECK-P8-LE-LABEL: ld_disjoint_align32_int16_t_uint64_t:
1384 ; CHECK-P8-LE: # %bb.0: # %entry
1385 ; CHECK-P8-LE-NEXT: lis r4, -15264
1386 ; CHECK-P8-LE-NEXT: and r3, r3, r4
1387 ; CHECK-P8-LE-NEXT: lis r4, 15258
1388 ; CHECK-P8-LE-NEXT: ori r4, r4, 41712
1389 ; CHECK-P8-LE-NEXT: lhax r3, r3, r4
1390 ; CHECK-P8-LE-NEXT: blr
1392 ; CHECK-P8-BE-LABEL: ld_disjoint_align32_int16_t_uint64_t:
1393 ; CHECK-P8-BE: # %bb.0: # %entry
1394 ; CHECK-P8-BE-NEXT: lis r4, -15264
1395 ; CHECK-P8-BE-NEXT: and r3, r3, r4
1396 ; CHECK-P8-BE-NEXT: lis r4, 15258
1397 ; CHECK-P8-BE-NEXT: ori r4, r4, 41718
1398 ; CHECK-P8-BE-NEXT: lhax r3, r3, r4
1399 ; CHECK-P8-BE-NEXT: blr
1401 %and = and i64 %ptr, -1000341504
1402 %or = or i64 %and, 999990000
1403 %0 = inttoptr i64 %or to ptr
1404 %1 = load i64, ptr %0, align 16
1405 %conv = trunc i64 %1 to i16
1409 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1410 define dso_local signext i16 @ld_not_disjoint64_int16_t_uint64_t(i64 %ptr) {
1411 ; CHECK-P10-LE-LABEL: ld_not_disjoint64_int16_t_uint64_t:
1412 ; CHECK-P10-LE: # %bb.0: # %entry
1413 ; CHECK-P10-LE-NEXT: pli r4, 232
1414 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
1415 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
1416 ; CHECK-P10-LE-NEXT: or r3, r3, r5
1417 ; CHECK-P10-LE-NEXT: lha r3, 0(r3)
1418 ; CHECK-P10-LE-NEXT: blr
1420 ; CHECK-P10-BE-LABEL: ld_not_disjoint64_int16_t_uint64_t:
1421 ; CHECK-P10-BE: # %bb.0: # %entry
1422 ; CHECK-P10-BE-NEXT: pli r4, 232
1423 ; CHECK-P10-BE-NEXT: pli r5, 3567587329
1424 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
1425 ; CHECK-P10-BE-NEXT: or r3, r3, r5
1426 ; CHECK-P10-BE-NEXT: lha r3, 6(r3)
1427 ; CHECK-P10-BE-NEXT: blr
1429 ; CHECK-P9-LE-LABEL: ld_not_disjoint64_int16_t_uint64_t:
1430 ; CHECK-P9-LE: # %bb.0: # %entry
1431 ; CHECK-P9-LE-NEXT: li r4, 29
1432 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
1433 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
1434 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
1435 ; CHECK-P9-LE-NEXT: or r3, r3, r4
1436 ; CHECK-P9-LE-NEXT: lha r3, 0(r3)
1437 ; CHECK-P9-LE-NEXT: blr
1439 ; CHECK-P9-BE-LABEL: ld_not_disjoint64_int16_t_uint64_t:
1440 ; CHECK-P9-BE: # %bb.0: # %entry
1441 ; CHECK-P9-BE-NEXT: li r4, 29
1442 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
1443 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
1444 ; CHECK-P9-BE-NEXT: ori r4, r4, 4097
1445 ; CHECK-P9-BE-NEXT: or r3, r3, r4
1446 ; CHECK-P9-BE-NEXT: lha r3, 6(r3)
1447 ; CHECK-P9-BE-NEXT: blr
1449 ; CHECK-P8-LE-LABEL: ld_not_disjoint64_int16_t_uint64_t:
1450 ; CHECK-P8-LE: # %bb.0: # %entry
1451 ; CHECK-P8-LE-NEXT: li r4, 29
1452 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
1453 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
1454 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
1455 ; CHECK-P8-LE-NEXT: or r3, r3, r4
1456 ; CHECK-P8-LE-NEXT: lha r3, 0(r3)
1457 ; CHECK-P8-LE-NEXT: blr
1459 ; CHECK-P8-BE-LABEL: ld_not_disjoint64_int16_t_uint64_t:
1460 ; CHECK-P8-BE: # %bb.0: # %entry
1461 ; CHECK-P8-BE-NEXT: li r4, 29
1462 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
1463 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
1464 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
1465 ; CHECK-P8-BE-NEXT: or r3, r3, r4
1466 ; CHECK-P8-BE-NEXT: lha r3, 6(r3)
1467 ; CHECK-P8-BE-NEXT: blr
1469 %or = or i64 %ptr, 1000000000001
1470 %0 = inttoptr i64 %or to ptr
1471 %1 = load i64, ptr %0, align 8
1472 %conv = trunc i64 %1 to i16
1476 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1477 define dso_local signext i16 @ld_disjoint_align64_int16_t_uint64_t(i64 %ptr) {
1478 ; CHECK-P10-LE-LABEL: ld_disjoint_align64_int16_t_uint64_t:
1479 ; CHECK-P10-LE: # %bb.0: # %entry
1480 ; CHECK-P10-LE-NEXT: pli r4, 244140625
1481 ; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
1482 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
1483 ; CHECK-P10-LE-NEXT: lhax r3, r3, r4
1484 ; CHECK-P10-LE-NEXT: blr
1486 ; CHECK-P10-BE-LABEL: ld_disjoint_align64_int16_t_uint64_t:
1487 ; CHECK-P10-BE: # %bb.0: # %entry
1488 ; CHECK-P10-BE-NEXT: pli r4, 232
1489 ; CHECK-P10-BE-NEXT: pli r5, 3567587334
1490 ; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
1491 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
1492 ; CHECK-P10-BE-NEXT: lhax r3, r3, r5
1493 ; CHECK-P10-BE-NEXT: blr
1495 ; CHECK-P9-LE-LABEL: ld_disjoint_align64_int16_t_uint64_t:
1496 ; CHECK-P9-LE: # %bb.0: # %entry
1497 ; CHECK-P9-LE-NEXT: lis r4, 3725
1498 ; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
1499 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
1500 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
1501 ; CHECK-P9-LE-NEXT: lhax r3, r3, r4
1502 ; CHECK-P9-LE-NEXT: blr
1504 ; CHECK-P9-BE-LABEL: ld_disjoint_align64_int16_t_uint64_t:
1505 ; CHECK-P9-BE: # %bb.0: # %entry
1506 ; CHECK-P9-BE-NEXT: li r4, 29
1507 ; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
1508 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
1509 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
1510 ; CHECK-P9-BE-NEXT: ori r4, r4, 4102
1511 ; CHECK-P9-BE-NEXT: lhax r3, r3, r4
1512 ; CHECK-P9-BE-NEXT: blr
1514 ; CHECK-P8-LE-LABEL: ld_disjoint_align64_int16_t_uint64_t:
1515 ; CHECK-P8-LE: # %bb.0: # %entry
1516 ; CHECK-P8-LE-NEXT: lis r4, 3725
1517 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
1518 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
1519 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
1520 ; CHECK-P8-LE-NEXT: lhax r3, r3, r4
1521 ; CHECK-P8-LE-NEXT: blr
1523 ; CHECK-P8-BE-LABEL: ld_disjoint_align64_int16_t_uint64_t:
1524 ; CHECK-P8-BE: # %bb.0: # %entry
1525 ; CHECK-P8-BE-NEXT: li r4, 29
1526 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
1527 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
1528 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
1529 ; CHECK-P8-BE-NEXT: ori r4, r4, 4102
1530 ; CHECK-P8-BE-NEXT: lhax r3, r3, r4
1531 ; CHECK-P8-BE-NEXT: blr
1533 %and = and i64 %ptr, -1099511627776
1534 %or = or i64 %and, 1000000000000
1535 %0 = inttoptr i64 %or to ptr
1536 %1 = load i64, ptr %0, align 4096
1537 %conv = trunc i64 %1 to i16
1541 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1542 define dso_local signext i16 @ld_cst_align16_int16_t_uint64_t() {
1543 ; CHECK-LE-LABEL: ld_cst_align16_int16_t_uint64_t:
1544 ; CHECK-LE: # %bb.0: # %entry
1545 ; CHECK-LE-NEXT: lha r3, 4080(0)
1546 ; CHECK-LE-NEXT: blr
1548 ; CHECK-BE-LABEL: ld_cst_align16_int16_t_uint64_t:
1549 ; CHECK-BE: # %bb.0: # %entry
1550 ; CHECK-BE-NEXT: lha r3, 4086(0)
1551 ; CHECK-BE-NEXT: blr
1553 %0 = load i64, ptr inttoptr (i64 4080 to ptr), align 16
1554 %conv = trunc i64 %0 to i16
1558 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1559 define dso_local signext i16 @ld_cst_align32_int16_t_uint64_t() {
1560 ; CHECK-LE-LABEL: ld_cst_align32_int16_t_uint64_t:
1561 ; CHECK-LE: # %bb.0: # %entry
1562 ; CHECK-LE-NEXT: lis r3, 153
1563 ; CHECK-LE-NEXT: lha r3, -27108(r3)
1564 ; CHECK-LE-NEXT: blr
1566 ; CHECK-BE-LABEL: ld_cst_align32_int16_t_uint64_t:
1567 ; CHECK-BE: # %bb.0: # %entry
1568 ; CHECK-BE-NEXT: lis r3, 153
1569 ; CHECK-BE-NEXT: lha r3, -27102(r3)
1570 ; CHECK-BE-NEXT: blr
1572 %0 = load i64, ptr inttoptr (i64 9999900 to ptr), align 8
1573 %conv = trunc i64 %0 to i16
1577 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1578 define dso_local signext i16 @ld_cst_align64_int16_t_uint64_t() {
1579 ; CHECK-P10-LE-LABEL: ld_cst_align64_int16_t_uint64_t:
1580 ; CHECK-P10-LE: # %bb.0: # %entry
1581 ; CHECK-P10-LE-NEXT: pli r3, 244140625
1582 ; CHECK-P10-LE-NEXT: rldic r3, r3, 12, 24
1583 ; CHECK-P10-LE-NEXT: lha r3, 0(r3)
1584 ; CHECK-P10-LE-NEXT: blr
1586 ; CHECK-P10-BE-LABEL: ld_cst_align64_int16_t_uint64_t:
1587 ; CHECK-P10-BE: # %bb.0: # %entry
1588 ; CHECK-P10-BE-NEXT: pli r3, 232
1589 ; CHECK-P10-BE-NEXT: pli r4, 3567587334
1590 ; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
1591 ; CHECK-P10-BE-NEXT: lha r3, 0(r4)
1592 ; CHECK-P10-BE-NEXT: blr
1594 ; CHECK-P9-LE-LABEL: ld_cst_align64_int16_t_uint64_t:
1595 ; CHECK-P9-LE: # %bb.0: # %entry
1596 ; CHECK-P9-LE-NEXT: lis r3, 3725
1597 ; CHECK-P9-LE-NEXT: ori r3, r3, 19025
1598 ; CHECK-P9-LE-NEXT: rldic r3, r3, 12, 24
1599 ; CHECK-P9-LE-NEXT: lha r3, 0(r3)
1600 ; CHECK-P9-LE-NEXT: blr
1602 ; CHECK-P9-BE-LABEL: ld_cst_align64_int16_t_uint64_t:
1603 ; CHECK-P9-BE: # %bb.0: # %entry
1604 ; CHECK-P9-BE-NEXT: li r3, 29
1605 ; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
1606 ; CHECK-P9-BE-NEXT: oris r3, r3, 54437
1607 ; CHECK-P9-BE-NEXT: ori r3, r3, 4102
1608 ; CHECK-P9-BE-NEXT: lha r3, 0(r3)
1609 ; CHECK-P9-BE-NEXT: blr
1611 ; CHECK-P8-LE-LABEL: ld_cst_align64_int16_t_uint64_t:
1612 ; CHECK-P8-LE: # %bb.0: # %entry
1613 ; CHECK-P8-LE-NEXT: lis r3, 3725
1614 ; CHECK-P8-LE-NEXT: ori r3, r3, 19025
1615 ; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
1616 ; CHECK-P8-LE-NEXT: lha r3, 0(r3)
1617 ; CHECK-P8-LE-NEXT: blr
1619 ; CHECK-P8-BE-LABEL: ld_cst_align64_int16_t_uint64_t:
1620 ; CHECK-P8-BE: # %bb.0: # %entry
1621 ; CHECK-P8-BE-NEXT: li r3, 29
1622 ; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
1623 ; CHECK-P8-BE-NEXT: oris r3, r3, 54437
1624 ; CHECK-P8-BE-NEXT: ori r3, r3, 4102
1625 ; CHECK-P8-BE-NEXT: lha r3, 0(r3)
1626 ; CHECK-P8-BE-NEXT: blr
1628 %0 = load i64, ptr inttoptr (i64 1000000000000 to ptr), align 4096
1629 %conv = trunc i64 %0 to i16
1633 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1634 define dso_local signext i16 @ld_0_int16_t_float(i64 %ptr) {
1635 ; CHECK-LABEL: ld_0_int16_t_float:
1636 ; CHECK: # %bb.0: # %entry
1637 ; CHECK-NEXT: lfs f0, 0(r3)
1638 ; CHECK-NEXT: xscvdpsxws f0, f0
1639 ; CHECK-NEXT: mffprwz r3, f0
1640 ; CHECK-NEXT: extsw r3, r3
1643 %0 = inttoptr i64 %ptr to ptr
1644 %1 = load float, ptr %0, align 4
1645 %conv = fptosi float %1 to i16
1649 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1650 define dso_local signext i16 @ld_align16_int16_t_float(ptr nocapture readonly %ptr) {
1651 ; CHECK-LABEL: ld_align16_int16_t_float:
1652 ; CHECK: # %bb.0: # %entry
1653 ; CHECK-NEXT: lfs f0, 8(r3)
1654 ; CHECK-NEXT: xscvdpsxws f0, f0
1655 ; CHECK-NEXT: mffprwz r3, f0
1656 ; CHECK-NEXT: extsw r3, r3
1659 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
1660 %0 = load float, ptr %add.ptr, align 4
1661 %conv = fptosi float %0 to i16
1665 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1666 define dso_local signext i16 @ld_align32_int16_t_float(ptr nocapture readonly %ptr) {
1667 ; CHECK-P10-LABEL: ld_align32_int16_t_float:
1668 ; CHECK-P10: # %bb.0: # %entry
1669 ; CHECK-P10-NEXT: plfs f0, 99999000(r3), 0
1670 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
1671 ; CHECK-P10-NEXT: mffprwz r3, f0
1672 ; CHECK-P10-NEXT: extsw r3, r3
1673 ; CHECK-P10-NEXT: blr
1675 ; CHECK-PREP10-LABEL: ld_align32_int16_t_float:
1676 ; CHECK-PREP10: # %bb.0: # %entry
1677 ; CHECK-PREP10-NEXT: lis r4, 1525
1678 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
1679 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
1680 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
1681 ; CHECK-PREP10-NEXT: mffprwz r3, f0
1682 ; CHECK-PREP10-NEXT: extsw r3, r3
1683 ; CHECK-PREP10-NEXT: blr
1685 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
1686 %0 = load float, ptr %add.ptr, align 4
1687 %conv = fptosi float %0 to i16
1691 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1692 define dso_local signext i16 @ld_align64_int16_t_float(ptr nocapture readonly %ptr) {
1693 ; CHECK-P10-LABEL: ld_align64_int16_t_float:
1694 ; CHECK-P10: # %bb.0: # %entry
1695 ; CHECK-P10-NEXT: pli r4, 244140625
1696 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
1697 ; CHECK-P10-NEXT: lfsx f0, r3, r4
1698 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
1699 ; CHECK-P10-NEXT: mffprwz r3, f0
1700 ; CHECK-P10-NEXT: extsw r3, r3
1701 ; CHECK-P10-NEXT: blr
1703 ; CHECK-PREP10-LABEL: ld_align64_int16_t_float:
1704 ; CHECK-PREP10: # %bb.0: # %entry
1705 ; CHECK-PREP10-NEXT: lis r4, 3725
1706 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
1707 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
1708 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
1709 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
1710 ; CHECK-PREP10-NEXT: mffprwz r3, f0
1711 ; CHECK-PREP10-NEXT: extsw r3, r3
1712 ; CHECK-PREP10-NEXT: blr
1714 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
1715 %0 = load float, ptr %add.ptr, align 4
1716 %conv = fptosi float %0 to i16
1720 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1721 define dso_local signext i16 @ld_reg_int16_t_float(ptr nocapture readonly %ptr, i64 %off) {
1722 ; CHECK-LABEL: ld_reg_int16_t_float:
1723 ; CHECK: # %bb.0: # %entry
1724 ; CHECK-NEXT: lfsx f0, r3, r4
1725 ; CHECK-NEXT: xscvdpsxws f0, f0
1726 ; CHECK-NEXT: mffprwz r3, f0
1727 ; CHECK-NEXT: extsw r3, r3
1730 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
1731 %0 = load float, ptr %add.ptr, align 4
1732 %conv = fptosi float %0 to i16
1736 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1737 define dso_local signext i16 @ld_or_int16_t_float(i64 %ptr, i8 zeroext %off) {
1738 ; CHECK-LABEL: ld_or_int16_t_float:
1739 ; CHECK: # %bb.0: # %entry
1740 ; CHECK-NEXT: or r3, r4, r3
1741 ; CHECK-NEXT: lfs f0, 0(r3)
1742 ; CHECK-NEXT: xscvdpsxws f0, f0
1743 ; CHECK-NEXT: mffprwz r3, f0
1744 ; CHECK-NEXT: extsw r3, r3
1747 %conv = zext i8 %off to i64
1748 %or = or i64 %conv, %ptr
1749 %0 = inttoptr i64 %or to ptr
1750 %1 = load float, ptr %0, align 4
1751 %conv1 = fptosi float %1 to i16
1755 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1756 define dso_local signext i16 @ld_not_disjoint16_int16_t_float(i64 %ptr) {
1757 ; CHECK-LABEL: ld_not_disjoint16_int16_t_float:
1758 ; CHECK: # %bb.0: # %entry
1759 ; CHECK-NEXT: ori r3, r3, 6
1760 ; CHECK-NEXT: lfs f0, 0(r3)
1761 ; CHECK-NEXT: xscvdpsxws f0, f0
1762 ; CHECK-NEXT: mffprwz r3, f0
1763 ; CHECK-NEXT: extsw r3, r3
1766 %or = or i64 %ptr, 6
1767 %0 = inttoptr i64 %or to ptr
1768 %1 = load float, ptr %0, align 4
1769 %conv = fptosi float %1 to i16
1773 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1774 define dso_local signext i16 @ld_disjoint_align16_int16_t_float(i64 %ptr) {
1775 ; CHECK-LABEL: ld_disjoint_align16_int16_t_float:
1776 ; CHECK: # %bb.0: # %entry
1777 ; CHECK-NEXT: rldicr r3, r3, 0, 51
1778 ; CHECK-NEXT: lfs f0, 24(r3)
1779 ; CHECK-NEXT: xscvdpsxws f0, f0
1780 ; CHECK-NEXT: mffprwz r3, f0
1781 ; CHECK-NEXT: extsw r3, r3
1784 %and = and i64 %ptr, -4096
1785 %or = or i64 %and, 24
1786 %0 = inttoptr i64 %or to ptr
1787 %1 = load float, ptr %0, align 8
1788 %conv = fptosi float %1 to i16
1792 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1793 define dso_local signext i16 @ld_not_disjoint32_int16_t_float(i64 %ptr) {
1794 ; CHECK-LABEL: ld_not_disjoint32_int16_t_float:
1795 ; CHECK: # %bb.0: # %entry
1796 ; CHECK-NEXT: ori r3, r3, 34463
1797 ; CHECK-NEXT: oris r3, r3, 1
1798 ; CHECK-NEXT: lfs f0, 0(r3)
1799 ; CHECK-NEXT: xscvdpsxws f0, f0
1800 ; CHECK-NEXT: mffprwz r3, f0
1801 ; CHECK-NEXT: extsw r3, r3
1804 %or = or i64 %ptr, 99999
1805 %0 = inttoptr i64 %or to ptr
1806 %1 = load float, ptr %0, align 4
1807 %conv = fptosi float %1 to i16
1811 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1812 define dso_local signext i16 @ld_disjoint_align32_int16_t_float(i64 %ptr) {
1813 ; CHECK-P10-LABEL: ld_disjoint_align32_int16_t_float:
1814 ; CHECK-P10: # %bb.0: # %entry
1815 ; CHECK-P10-NEXT: lis r4, -15264
1816 ; CHECK-P10-NEXT: and r3, r3, r4
1817 ; CHECK-P10-NEXT: plfs f0, 999990000(r3), 0
1818 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
1819 ; CHECK-P10-NEXT: mffprwz r3, f0
1820 ; CHECK-P10-NEXT: extsw r3, r3
1821 ; CHECK-P10-NEXT: blr
1823 ; CHECK-PREP10-LABEL: ld_disjoint_align32_int16_t_float:
1824 ; CHECK-PREP10: # %bb.0: # %entry
1825 ; CHECK-PREP10-NEXT: lis r4, -15264
1826 ; CHECK-PREP10-NEXT: and r3, r3, r4
1827 ; CHECK-PREP10-NEXT: lis r4, 15258
1828 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
1829 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
1830 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
1831 ; CHECK-PREP10-NEXT: mffprwz r3, f0
1832 ; CHECK-PREP10-NEXT: extsw r3, r3
1833 ; CHECK-PREP10-NEXT: blr
1835 %and = and i64 %ptr, -1000341504
1836 %or = or i64 %and, 999990000
1837 %0 = inttoptr i64 %or to ptr
1838 %1 = load float, ptr %0, align 16
1839 %conv = fptosi float %1 to i16
1843 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1844 define dso_local signext i16 @ld_not_disjoint64_int16_t_float(i64 %ptr) {
1845 ; CHECK-P10-LABEL: ld_not_disjoint64_int16_t_float:
1846 ; CHECK-P10: # %bb.0: # %entry
1847 ; CHECK-P10-NEXT: pli r4, 232
1848 ; CHECK-P10-NEXT: pli r5, 3567587329
1849 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
1850 ; CHECK-P10-NEXT: or r3, r3, r5
1851 ; CHECK-P10-NEXT: lfs f0, 0(r3)
1852 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
1853 ; CHECK-P10-NEXT: mffprwz r3, f0
1854 ; CHECK-P10-NEXT: extsw r3, r3
1855 ; CHECK-P10-NEXT: blr
1857 ; CHECK-PREP10-LABEL: ld_not_disjoint64_int16_t_float:
1858 ; CHECK-PREP10: # %bb.0: # %entry
1859 ; CHECK-PREP10-NEXT: li r4, 29
1860 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
1861 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
1862 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
1863 ; CHECK-PREP10-NEXT: or r3, r3, r4
1864 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
1865 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
1866 ; CHECK-PREP10-NEXT: mffprwz r3, f0
1867 ; CHECK-PREP10-NEXT: extsw r3, r3
1868 ; CHECK-PREP10-NEXT: blr
1870 %or = or i64 %ptr, 1000000000001
1871 %0 = inttoptr i64 %or to ptr
1872 %1 = load float, ptr %0, align 4
1873 %conv = fptosi float %1 to i16
1878 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1879 define dso_local signext i16 @ld_disjoint_align64_int16_t_float(i64 %ptr) {
1880 ; CHECK-P10-LABEL: ld_disjoint_align64_int16_t_float:
1881 ; CHECK-P10: # %bb.0: # %entry
1882 ; CHECK-P10-NEXT: pli r4, 244140625
1883 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
1884 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
1885 ; CHECK-P10-NEXT: lfsx f0, r3, r4
1886 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
1887 ; CHECK-P10-NEXT: mffprwz r3, f0
1888 ; CHECK-P10-NEXT: extsw r3, r3
1889 ; CHECK-P10-NEXT: blr
1891 ; CHECK-PREP10-LABEL: ld_disjoint_align64_int16_t_float:
1892 ; CHECK-PREP10: # %bb.0: # %entry
1893 ; CHECK-PREP10-NEXT: lis r4, 3725
1894 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
1895 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
1896 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
1897 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
1898 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
1899 ; CHECK-PREP10-NEXT: mffprwz r3, f0
1900 ; CHECK-PREP10-NEXT: extsw r3, r3
1901 ; CHECK-PREP10-NEXT: blr
1903 %and = and i64 %ptr, -1099511627776
1904 %or = or i64 %and, 1000000000000
1905 %0 = inttoptr i64 %or to ptr
1906 %1 = load float, ptr %0, align 4096
1907 %conv = fptosi float %1 to i16
1911 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1912 define dso_local signext i16 @ld_cst_align16_int16_t_float() {
1913 ; CHECK-LABEL: ld_cst_align16_int16_t_float:
1914 ; CHECK: # %bb.0: # %entry
1915 ; CHECK-NEXT: lfs f0, 4080(0)
1916 ; CHECK-NEXT: xscvdpsxws f0, f0
1917 ; CHECK-NEXT: mffprwz r3, f0
1918 ; CHECK-NEXT: extsw r3, r3
1921 %0 = load float, ptr inttoptr (i64 4080 to ptr), align 16
1922 %conv = fptosi float %0 to i16
1926 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1927 define dso_local signext i16 @ld_cst_align32_int16_t_float() {
1928 ; CHECK-LABEL: ld_cst_align32_int16_t_float:
1929 ; CHECK: # %bb.0: # %entry
1930 ; CHECK-NEXT: lis r3, 153
1931 ; CHECK-NEXT: lfs f0, -27108(r3)
1932 ; CHECK-NEXT: xscvdpsxws f0, f0
1933 ; CHECK-NEXT: mffprwz r3, f0
1934 ; CHECK-NEXT: extsw r3, r3
1937 %0 = load float, ptr inttoptr (i64 9999900 to ptr), align 4
1938 %conv = fptosi float %0 to i16
1942 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1943 define dso_local signext i16 @ld_cst_align64_int16_t_float() {
1944 ; CHECK-P10-LABEL: ld_cst_align64_int16_t_float:
1945 ; CHECK-P10: # %bb.0: # %entry
1946 ; CHECK-P10-NEXT: pli r3, 244140625
1947 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
1948 ; CHECK-P10-NEXT: lfs f0, 0(r3)
1949 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
1950 ; CHECK-P10-NEXT: mffprwz r3, f0
1951 ; CHECK-P10-NEXT: extsw r3, r3
1952 ; CHECK-P10-NEXT: blr
1954 ; CHECK-PREP10-LABEL: ld_cst_align64_int16_t_float:
1955 ; CHECK-PREP10: # %bb.0: # %entry
1956 ; CHECK-PREP10-NEXT: lis r3, 3725
1957 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
1958 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
1959 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
1960 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
1961 ; CHECK-PREP10-NEXT: mffprwz r3, f0
1962 ; CHECK-PREP10-NEXT: extsw r3, r3
1963 ; CHECK-PREP10-NEXT: blr
1965 %0 = load float, ptr inttoptr (i64 1000000000000 to ptr), align 4096
1966 %conv = fptosi float %0 to i16
1970 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1971 define dso_local signext i16 @ld_0_int16_t_double(i64 %ptr) {
1972 ; CHECK-LABEL: ld_0_int16_t_double:
1973 ; CHECK: # %bb.0: # %entry
1974 ; CHECK-NEXT: lfd f0, 0(r3)
1975 ; CHECK-NEXT: xscvdpsxws f0, f0
1976 ; CHECK-NEXT: mffprwz r3, f0
1977 ; CHECK-NEXT: extsw r3, r3
1980 %0 = inttoptr i64 %ptr to ptr
1981 %1 = load double, ptr %0, align 8
1982 %conv = fptosi double %1 to i16
1986 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
1987 define dso_local signext i16 @ld_align16_int16_t_double(ptr nocapture readonly %ptr) {
1988 ; CHECK-LABEL: ld_align16_int16_t_double:
1989 ; CHECK: # %bb.0: # %entry
1990 ; CHECK-NEXT: lfd f0, 8(r3)
1991 ; CHECK-NEXT: xscvdpsxws f0, f0
1992 ; CHECK-NEXT: mffprwz r3, f0
1993 ; CHECK-NEXT: extsw r3, r3
1996 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
1997 %0 = load double, ptr %add.ptr, align 8
1998 %conv = fptosi double %0 to i16
2002 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2003 define dso_local signext i16 @ld_align32_int16_t_double(ptr nocapture readonly %ptr) {
2004 ; CHECK-P10-LABEL: ld_align32_int16_t_double:
2005 ; CHECK-P10: # %bb.0: # %entry
2006 ; CHECK-P10-NEXT: plfd f0, 99999000(r3), 0
2007 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2008 ; CHECK-P10-NEXT: mffprwz r3, f0
2009 ; CHECK-P10-NEXT: extsw r3, r3
2010 ; CHECK-P10-NEXT: blr
2012 ; CHECK-PREP10-LABEL: ld_align32_int16_t_double:
2013 ; CHECK-PREP10: # %bb.0: # %entry
2014 ; CHECK-PREP10-NEXT: lis r4, 1525
2015 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
2016 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
2017 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2018 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2019 ; CHECK-PREP10-NEXT: extsw r3, r3
2020 ; CHECK-PREP10-NEXT: blr
2022 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
2023 %0 = load double, ptr %add.ptr, align 8
2024 %conv = fptosi double %0 to i16
2028 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2029 define dso_local signext i16 @ld_align64_int16_t_double(ptr nocapture readonly %ptr) {
2030 ; CHECK-P10-LABEL: ld_align64_int16_t_double:
2031 ; CHECK-P10: # %bb.0: # %entry
2032 ; CHECK-P10-NEXT: pli r4, 244140625
2033 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2034 ; CHECK-P10-NEXT: lfdx f0, r3, r4
2035 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2036 ; CHECK-P10-NEXT: mffprwz r3, f0
2037 ; CHECK-P10-NEXT: extsw r3, r3
2038 ; CHECK-P10-NEXT: blr
2040 ; CHECK-PREP10-LABEL: ld_align64_int16_t_double:
2041 ; CHECK-PREP10: # %bb.0: # %entry
2042 ; CHECK-PREP10-NEXT: lis r4, 3725
2043 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2044 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2045 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
2046 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2047 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2048 ; CHECK-PREP10-NEXT: extsw r3, r3
2049 ; CHECK-PREP10-NEXT: blr
2051 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
2052 %0 = load double, ptr %add.ptr, align 8
2053 %conv = fptosi double %0 to i16
2057 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2058 define dso_local signext i16 @ld_reg_int16_t_double(ptr nocapture readonly %ptr, i64 %off) {
2059 ; CHECK-LABEL: ld_reg_int16_t_double:
2060 ; CHECK: # %bb.0: # %entry
2061 ; CHECK-NEXT: lfdx f0, r3, r4
2062 ; CHECK-NEXT: xscvdpsxws f0, f0
2063 ; CHECK-NEXT: mffprwz r3, f0
2064 ; CHECK-NEXT: extsw r3, r3
2067 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
2068 %0 = load double, ptr %add.ptr, align 8
2069 %conv = fptosi double %0 to i16
2073 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2074 define dso_local signext i16 @ld_or_int16_t_double(i64 %ptr, i8 zeroext %off) {
2075 ; CHECK-LABEL: ld_or_int16_t_double:
2076 ; CHECK: # %bb.0: # %entry
2077 ; CHECK-NEXT: or r3, r4, r3
2078 ; CHECK-NEXT: lfd f0, 0(r3)
2079 ; CHECK-NEXT: xscvdpsxws f0, f0
2080 ; CHECK-NEXT: mffprwz r3, f0
2081 ; CHECK-NEXT: extsw r3, r3
2084 %conv = zext i8 %off to i64
2085 %or = or i64 %conv, %ptr
2086 %0 = inttoptr i64 %or to ptr
2087 %1 = load double, ptr %0, align 8
2088 %conv1 = fptosi double %1 to i16
2092 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2093 define dso_local signext i16 @ld_not_disjoint16_int16_t_double(i64 %ptr) {
2094 ; CHECK-LABEL: ld_not_disjoint16_int16_t_double:
2095 ; CHECK: # %bb.0: # %entry
2096 ; CHECK-NEXT: ori r3, r3, 6
2097 ; CHECK-NEXT: lfd f0, 0(r3)
2098 ; CHECK-NEXT: xscvdpsxws f0, f0
2099 ; CHECK-NEXT: mffprwz r3, f0
2100 ; CHECK-NEXT: extsw r3, r3
2103 %or = or i64 %ptr, 6
2104 %0 = inttoptr i64 %or to ptr
2105 %1 = load double, ptr %0, align 8
2106 %conv = fptosi double %1 to i16
2110 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2111 define dso_local signext i16 @ld_disjoint_align16_int16_t_double(i64 %ptr) {
2112 ; CHECK-LABEL: ld_disjoint_align16_int16_t_double:
2113 ; CHECK: # %bb.0: # %entry
2114 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2115 ; CHECK-NEXT: lfd f0, 24(r3)
2116 ; CHECK-NEXT: xscvdpsxws f0, f0
2117 ; CHECK-NEXT: mffprwz r3, f0
2118 ; CHECK-NEXT: extsw r3, r3
2121 %and = and i64 %ptr, -4096
2122 %or = or i64 %and, 24
2123 %0 = inttoptr i64 %or to ptr
2124 %1 = load double, ptr %0, align 8
2125 %conv = fptosi double %1 to i16
2129 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2130 define dso_local signext i16 @ld_not_disjoint32_int16_t_double(i64 %ptr) {
2131 ; CHECK-LABEL: ld_not_disjoint32_int16_t_double:
2132 ; CHECK: # %bb.0: # %entry
2133 ; CHECK-NEXT: ori r3, r3, 34463
2134 ; CHECK-NEXT: oris r3, r3, 1
2135 ; CHECK-NEXT: lfd f0, 0(r3)
2136 ; CHECK-NEXT: xscvdpsxws f0, f0
2137 ; CHECK-NEXT: mffprwz r3, f0
2138 ; CHECK-NEXT: extsw r3, r3
2141 %or = or i64 %ptr, 99999
2142 %0 = inttoptr i64 %or to ptr
2143 %1 = load double, ptr %0, align 8
2144 %conv = fptosi double %1 to i16
2148 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2149 define dso_local signext i16 @ld_disjoint_align32_int16_t_double(i64 %ptr) {
2150 ; CHECK-P10-LABEL: ld_disjoint_align32_int16_t_double:
2151 ; CHECK-P10: # %bb.0: # %entry
2152 ; CHECK-P10-NEXT: lis r4, -15264
2153 ; CHECK-P10-NEXT: and r3, r3, r4
2154 ; CHECK-P10-NEXT: plfd f0, 999990000(r3), 0
2155 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2156 ; CHECK-P10-NEXT: mffprwz r3, f0
2157 ; CHECK-P10-NEXT: extsw r3, r3
2158 ; CHECK-P10-NEXT: blr
2160 ; CHECK-PREP10-LABEL: ld_disjoint_align32_int16_t_double:
2161 ; CHECK-PREP10: # %bb.0: # %entry
2162 ; CHECK-PREP10-NEXT: lis r4, -15264
2163 ; CHECK-PREP10-NEXT: and r3, r3, r4
2164 ; CHECK-PREP10-NEXT: lis r4, 15258
2165 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
2166 ; CHECK-PREP10-NEXT: lfdx 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 %and = and i64 %ptr, -1000341504
2173 %or = or i64 %and, 999990000
2174 %0 = inttoptr i64 %or to ptr
2175 %1 = load double, ptr %0, align 16
2176 %conv = fptosi double %1 to i16
2180 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2181 define dso_local signext i16 @ld_not_disjoint64_int16_t_double(i64 %ptr) {
2182 ; CHECK-P10-LABEL: ld_not_disjoint64_int16_t_double:
2183 ; CHECK-P10: # %bb.0: # %entry
2184 ; CHECK-P10-NEXT: pli r4, 232
2185 ; CHECK-P10-NEXT: pli r5, 3567587329
2186 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2187 ; CHECK-P10-NEXT: or r3, r3, r5
2188 ; CHECK-P10-NEXT: lfd f0, 0(r3)
2189 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2190 ; CHECK-P10-NEXT: mffprwz r3, f0
2191 ; CHECK-P10-NEXT: extsw r3, r3
2192 ; CHECK-P10-NEXT: blr
2194 ; CHECK-PREP10-LABEL: ld_not_disjoint64_int16_t_double:
2195 ; CHECK-PREP10: # %bb.0: # %entry
2196 ; CHECK-PREP10-NEXT: li r4, 29
2197 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2198 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2199 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2200 ; CHECK-PREP10-NEXT: or r3, r3, r4
2201 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
2202 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2203 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2204 ; CHECK-PREP10-NEXT: extsw r3, r3
2205 ; CHECK-PREP10-NEXT: blr
2207 %or = or i64 %ptr, 1000000000001
2208 %0 = inttoptr i64 %or to ptr
2209 %1 = load double, ptr %0, align 8
2210 %conv = fptosi double %1 to i16
2214 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2215 define dso_local signext i16 @ld_disjoint_align64_int16_t_double(i64 %ptr) {
2216 ; CHECK-P10-LABEL: ld_disjoint_align64_int16_t_double:
2217 ; CHECK-P10: # %bb.0: # %entry
2218 ; CHECK-P10-NEXT: pli r4, 244140625
2219 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
2220 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2221 ; CHECK-P10-NEXT: lfdx f0, r3, r4
2222 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2223 ; CHECK-P10-NEXT: mffprwz r3, f0
2224 ; CHECK-P10-NEXT: extsw r3, r3
2225 ; CHECK-P10-NEXT: blr
2227 ; CHECK-PREP10-LABEL: ld_disjoint_align64_int16_t_double:
2228 ; CHECK-PREP10: # %bb.0: # %entry
2229 ; CHECK-PREP10-NEXT: lis r4, 3725
2230 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
2231 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2232 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2233 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
2234 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2235 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2236 ; CHECK-PREP10-NEXT: extsw r3, r3
2237 ; CHECK-PREP10-NEXT: blr
2239 %and = and i64 %ptr, -1099511627776
2240 %or = or i64 %and, 1000000000000
2241 %0 = inttoptr i64 %or to ptr
2242 %1 = load double, ptr %0, align 4096
2243 %conv = fptosi double %1 to i16
2247 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2248 define dso_local signext i16 @ld_cst_align16_int16_t_double() {
2249 ; CHECK-LABEL: ld_cst_align16_int16_t_double:
2250 ; CHECK: # %bb.0: # %entry
2251 ; CHECK-NEXT: lfd f0, 4080(0)
2252 ; CHECK-NEXT: xscvdpsxws f0, f0
2253 ; CHECK-NEXT: mffprwz r3, f0
2254 ; CHECK-NEXT: extsw r3, r3
2257 %0 = load double, ptr inttoptr (i64 4080 to ptr), align 16
2258 %conv = fptosi double %0 to i16
2262 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2263 define dso_local signext i16 @ld_cst_align32_int16_t_double() {
2264 ; CHECK-LABEL: ld_cst_align32_int16_t_double:
2265 ; CHECK: # %bb.0: # %entry
2266 ; CHECK-NEXT: lis r3, 153
2267 ; CHECK-NEXT: lfd f0, -27108(r3)
2268 ; CHECK-NEXT: xscvdpsxws f0, f0
2269 ; CHECK-NEXT: mffprwz r3, f0
2270 ; CHECK-NEXT: extsw r3, r3
2273 %0 = load double, ptr inttoptr (i64 9999900 to ptr), align 8
2274 %conv = fptosi double %0 to i16
2278 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2279 define dso_local signext i16 @ld_cst_align64_int16_t_double() {
2280 ; CHECK-P10-LABEL: ld_cst_align64_int16_t_double:
2281 ; CHECK-P10: # %bb.0: # %entry
2282 ; CHECK-P10-NEXT: pli r3, 244140625
2283 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
2284 ; CHECK-P10-NEXT: lfd f0, 0(r3)
2285 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
2286 ; CHECK-P10-NEXT: mffprwz r3, f0
2287 ; CHECK-P10-NEXT: extsw r3, r3
2288 ; CHECK-P10-NEXT: blr
2290 ; CHECK-PREP10-LABEL: ld_cst_align64_int16_t_double:
2291 ; CHECK-PREP10: # %bb.0: # %entry
2292 ; CHECK-PREP10-NEXT: lis r3, 3725
2293 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
2294 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
2295 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
2296 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
2297 ; CHECK-PREP10-NEXT: mffprwz r3, f0
2298 ; CHECK-PREP10-NEXT: extsw r3, r3
2299 ; CHECK-PREP10-NEXT: blr
2301 %0 = load double, ptr inttoptr (i64 1000000000000 to ptr), align 4096
2302 %conv = fptosi double %0 to i16
2306 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2307 define dso_local zeroext i16 @ld_0_uint16_t_uint8_t(i64 %ptr) {
2308 ; CHECK-LABEL: ld_0_uint16_t_uint8_t:
2309 ; CHECK: # %bb.0: # %entry
2310 ; CHECK-NEXT: lbz r3, 0(r3)
2313 %0 = inttoptr i64 %ptr to ptr
2314 %1 = load i8, ptr %0, align 1
2315 %conv = zext i8 %1 to i16
2319 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2320 define dso_local zeroext i16 @ld_align16_uint16_t_uint8_t(ptr nocapture readonly %ptr) {
2321 ; CHECK-LABEL: ld_align16_uint16_t_uint8_t:
2322 ; CHECK: # %bb.0: # %entry
2323 ; CHECK-NEXT: lbz r3, 8(r3)
2326 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
2327 %0 = load i8, ptr %add.ptr, align 1
2328 %conv = zext i8 %0 to i16
2332 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2333 define dso_local zeroext i16 @ld_align32_uint16_t_uint8_t(ptr nocapture readonly %ptr) {
2334 ; CHECK-P10-LABEL: ld_align32_uint16_t_uint8_t:
2335 ; CHECK-P10: # %bb.0: # %entry
2336 ; CHECK-P10-NEXT: plbz r3, 99999000(r3), 0
2337 ; CHECK-P10-NEXT: blr
2339 ; CHECK-PREP10-LABEL: ld_align32_uint16_t_uint8_t:
2340 ; CHECK-PREP10: # %bb.0: # %entry
2341 ; CHECK-PREP10-NEXT: lis r4, 1525
2342 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
2343 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
2344 ; CHECK-PREP10-NEXT: blr
2346 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
2347 %0 = load i8, ptr %add.ptr, align 1
2348 %conv = zext i8 %0 to i16
2352 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2353 define dso_local zeroext i16 @ld_align64_uint16_t_uint8_t(ptr nocapture readonly %ptr) {
2354 ; CHECK-P10-LABEL: ld_align64_uint16_t_uint8_t:
2355 ; CHECK-P10: # %bb.0: # %entry
2356 ; CHECK-P10-NEXT: pli r4, 244140625
2357 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2358 ; CHECK-P10-NEXT: lbzx r3, r3, r4
2359 ; CHECK-P10-NEXT: blr
2361 ; CHECK-PREP10-LABEL: ld_align64_uint16_t_uint8_t:
2362 ; CHECK-PREP10: # %bb.0: # %entry
2363 ; CHECK-PREP10-NEXT: lis r4, 3725
2364 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2365 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2366 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
2367 ; CHECK-PREP10-NEXT: blr
2369 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
2370 %0 = load i8, ptr %add.ptr, align 1
2371 %conv = zext i8 %0 to i16
2375 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2376 define dso_local zeroext i16 @ld_reg_uint16_t_uint8_t(ptr nocapture readonly %ptr, i64 %off) {
2377 ; CHECK-LABEL: ld_reg_uint16_t_uint8_t:
2378 ; CHECK: # %bb.0: # %entry
2379 ; CHECK-NEXT: lbzx r3, r3, r4
2382 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
2383 %0 = load i8, ptr %add.ptr, align 1
2384 %conv = zext i8 %0 to i16
2388 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2389 define dso_local zeroext i16 @ld_or_uint16_t_uint8_t(i64 %ptr, i8 zeroext %off) {
2390 ; CHECK-LABEL: ld_or_uint16_t_uint8_t:
2391 ; CHECK: # %bb.0: # %entry
2392 ; CHECK-NEXT: or r3, r4, r3
2393 ; CHECK-NEXT: lbz r3, 0(r3)
2396 %conv = zext i8 %off to i64
2397 %or = or i64 %conv, %ptr
2398 %0 = inttoptr i64 %or to ptr
2399 %1 = load i8, ptr %0, align 1
2400 %conv1 = zext i8 %1 to i16
2404 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2405 define dso_local zeroext i16 @ld_not_disjoint16_uint16_t_uint8_t(i64 %ptr) {
2406 ; CHECK-LABEL: ld_not_disjoint16_uint16_t_uint8_t:
2407 ; CHECK: # %bb.0: # %entry
2408 ; CHECK-NEXT: ori r3, r3, 6
2409 ; CHECK-NEXT: lbz r3, 0(r3)
2412 %or = or i64 %ptr, 6
2413 %0 = inttoptr i64 %or to ptr
2414 %1 = load i8, ptr %0, align 1
2415 %conv = zext i8 %1 to i16
2419 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2420 define dso_local zeroext i16 @ld_disjoint_align16_uint16_t_uint8_t(i64 %ptr) {
2421 ; CHECK-LABEL: ld_disjoint_align16_uint16_t_uint8_t:
2422 ; CHECK: # %bb.0: # %entry
2423 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2424 ; CHECK-NEXT: lbz r3, 24(r3)
2427 %and = and i64 %ptr, -4096
2428 %or = or i64 %and, 24
2429 %0 = inttoptr i64 %or to ptr
2430 %1 = load i8, ptr %0, align 8
2431 %conv = zext i8 %1 to i16
2435 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2436 define dso_local zeroext i16 @ld_not_disjoint32_uint16_t_uint8_t(i64 %ptr) {
2437 ; CHECK-LABEL: ld_not_disjoint32_uint16_t_uint8_t:
2438 ; CHECK: # %bb.0: # %entry
2439 ; CHECK-NEXT: ori r3, r3, 34463
2440 ; CHECK-NEXT: oris r3, r3, 1
2441 ; CHECK-NEXT: lbz r3, 0(r3)
2444 %or = or i64 %ptr, 99999
2445 %0 = inttoptr i64 %or to ptr
2446 %1 = load i8, ptr %0, align 1
2447 %conv = zext i8 %1 to i16
2451 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2452 define dso_local zeroext i16 @ld_disjoint_align32_uint16_t_uint8_t(i64 %ptr) {
2453 ; CHECK-P10-LABEL: ld_disjoint_align32_uint16_t_uint8_t:
2454 ; CHECK-P10: # %bb.0: # %entry
2455 ; CHECK-P10-NEXT: lis r4, -15264
2456 ; CHECK-P10-NEXT: and r3, r3, r4
2457 ; CHECK-P10-NEXT: plbz r3, 999990000(r3), 0
2458 ; CHECK-P10-NEXT: blr
2460 ; CHECK-PREP10-LABEL: ld_disjoint_align32_uint16_t_uint8_t:
2461 ; CHECK-PREP10: # %bb.0: # %entry
2462 ; CHECK-PREP10-NEXT: lis r4, -15264
2463 ; CHECK-PREP10-NEXT: and r3, r3, r4
2464 ; CHECK-PREP10-NEXT: lis r4, 15258
2465 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
2466 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
2467 ; CHECK-PREP10-NEXT: blr
2469 %and = and i64 %ptr, -1000341504
2470 %or = or i64 %and, 999990000
2471 %0 = inttoptr i64 %or to ptr
2472 %1 = load i8, ptr %0, align 16
2473 %conv = zext i8 %1 to i16
2477 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2478 define dso_local zeroext i16 @ld_not_disjoint64_uint16_t_uint8_t(i64 %ptr) {
2479 ; CHECK-P10-LABEL: ld_not_disjoint64_uint16_t_uint8_t:
2480 ; CHECK-P10: # %bb.0: # %entry
2481 ; CHECK-P10-NEXT: pli r4, 232
2482 ; CHECK-P10-NEXT: pli r5, 3567587329
2483 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2484 ; CHECK-P10-NEXT: or r3, r3, r5
2485 ; CHECK-P10-NEXT: lbz r3, 0(r3)
2486 ; CHECK-P10-NEXT: blr
2488 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint16_t_uint8_t:
2489 ; CHECK-PREP10: # %bb.0: # %entry
2490 ; CHECK-PREP10-NEXT: li r4, 29
2491 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2492 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2493 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2494 ; CHECK-PREP10-NEXT: or r3, r3, r4
2495 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
2496 ; CHECK-PREP10-NEXT: blr
2498 %or = or i64 %ptr, 1000000000001
2499 %0 = inttoptr i64 %or to ptr
2500 %1 = load i8, ptr %0, align 1
2501 %conv = zext i8 %1 to i16
2505 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2506 define dso_local zeroext i16 @ld_disjoint_align64_uint16_t_uint8_t(i64 %ptr) {
2507 ; CHECK-P10-LABEL: ld_disjoint_align64_uint16_t_uint8_t:
2508 ; CHECK-P10: # %bb.0: # %entry
2509 ; CHECK-P10-NEXT: pli r4, 244140625
2510 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
2511 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2512 ; CHECK-P10-NEXT: lbzx r3, r3, r4
2513 ; CHECK-P10-NEXT: blr
2515 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint16_t_uint8_t:
2516 ; CHECK-PREP10: # %bb.0: # %entry
2517 ; CHECK-PREP10-NEXT: lis r4, 3725
2518 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
2519 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2520 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2521 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
2522 ; CHECK-PREP10-NEXT: blr
2524 %and = and i64 %ptr, -1099511627776
2525 %or = or i64 %and, 1000000000000
2526 %0 = inttoptr i64 %or to ptr
2527 %1 = load i8, ptr %0, align 4096
2528 %conv = zext i8 %1 to i16
2532 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2533 define dso_local zeroext i16 @ld_cst_align16_uint16_t_uint8_t() {
2534 ; CHECK-LABEL: ld_cst_align16_uint16_t_uint8_t:
2535 ; CHECK: # %bb.0: # %entry
2536 ; CHECK-NEXT: lbz r3, 4080(0)
2539 %0 = load i8, ptr inttoptr (i64 4080 to ptr), align 16
2540 %conv = zext i8 %0 to i16
2544 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2545 define dso_local zeroext i16 @ld_cst_align32_uint16_t_uint8_t() {
2546 ; CHECK-LABEL: ld_cst_align32_uint16_t_uint8_t:
2547 ; CHECK: # %bb.0: # %entry
2548 ; CHECK-NEXT: lis r3, 153
2549 ; CHECK-NEXT: lbz r3, -27108(r3)
2552 %0 = load i8, ptr inttoptr (i64 9999900 to ptr), align 4
2553 %conv = zext i8 %0 to i16
2557 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2558 define dso_local zeroext i16 @ld_cst_align64_uint16_t_uint8_t() {
2559 ; CHECK-P10-LABEL: ld_cst_align64_uint16_t_uint8_t:
2560 ; CHECK-P10: # %bb.0: # %entry
2561 ; CHECK-P10-NEXT: pli r3, 244140625
2562 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
2563 ; CHECK-P10-NEXT: lbz r3, 0(r3)
2564 ; CHECK-P10-NEXT: blr
2566 ; CHECK-PREP10-LABEL: ld_cst_align64_uint16_t_uint8_t:
2567 ; CHECK-PREP10: # %bb.0: # %entry
2568 ; CHECK-PREP10-NEXT: lis r3, 3725
2569 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
2570 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
2571 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
2572 ; CHECK-PREP10-NEXT: blr
2574 %0 = load i8, ptr inttoptr (i64 1000000000000 to ptr), align 4096
2575 %conv = zext i8 %0 to i16
2579 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2580 define dso_local zeroext i16 @ld_0_uint16_t_int8_t(i64 %ptr) {
2581 ; CHECK-LABEL: ld_0_uint16_t_int8_t:
2582 ; CHECK: # %bb.0: # %entry
2583 ; CHECK-NEXT: lbz r3, 0(r3)
2584 ; CHECK-NEXT: extsb r3, r3
2585 ; CHECK-NEXT: clrldi r3, r3, 48
2588 %0 = inttoptr i64 %ptr to ptr
2589 %1 = load i8, ptr %0, align 1
2590 %conv = sext i8 %1 to i16
2594 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2595 define dso_local zeroext i16 @ld_align16_uint16_t_int8_t(ptr nocapture readonly %ptr) {
2596 ; CHECK-LABEL: ld_align16_uint16_t_int8_t:
2597 ; CHECK: # %bb.0: # %entry
2598 ; CHECK-NEXT: lbz r3, 8(r3)
2599 ; CHECK-NEXT: extsb r3, r3
2600 ; CHECK-NEXT: clrldi r3, r3, 48
2603 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
2604 %0 = load i8, ptr %add.ptr, align 1
2605 %conv = sext i8 %0 to i16
2609 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2610 define dso_local zeroext i16 @ld_align32_uint16_t_int8_t(ptr nocapture readonly %ptr) {
2611 ; CHECK-P10-LABEL: ld_align32_uint16_t_int8_t:
2612 ; CHECK-P10: # %bb.0: # %entry
2613 ; CHECK-P10-NEXT: plbz r3, 99999000(r3), 0
2614 ; CHECK-P10-NEXT: extsb r3, r3
2615 ; CHECK-P10-NEXT: clrldi r3, r3, 48
2616 ; CHECK-P10-NEXT: blr
2618 ; CHECK-PREP10-LABEL: ld_align32_uint16_t_int8_t:
2619 ; CHECK-PREP10: # %bb.0: # %entry
2620 ; CHECK-PREP10-NEXT: lis r4, 1525
2621 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
2622 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
2623 ; CHECK-PREP10-NEXT: extsb r3, r3
2624 ; CHECK-PREP10-NEXT: clrldi r3, r3, 48
2625 ; CHECK-PREP10-NEXT: blr
2627 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
2628 %0 = load i8, ptr %add.ptr, align 1
2629 %conv = sext i8 %0 to i16
2633 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2634 define dso_local zeroext i16 @ld_align64_uint16_t_int8_t(ptr nocapture readonly %ptr) {
2635 ; CHECK-P10-LABEL: ld_align64_uint16_t_int8_t:
2636 ; CHECK-P10: # %bb.0: # %entry
2637 ; CHECK-P10-NEXT: pli r4, 244140625
2638 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2639 ; CHECK-P10-NEXT: lbzx r3, r3, r4
2640 ; CHECK-P10-NEXT: extsb r3, r3
2641 ; CHECK-P10-NEXT: clrldi r3, r3, 48
2642 ; CHECK-P10-NEXT: blr
2644 ; CHECK-PREP10-LABEL: ld_align64_uint16_t_int8_t:
2645 ; CHECK-PREP10: # %bb.0: # %entry
2646 ; CHECK-PREP10-NEXT: lis r4, 3725
2647 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2648 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2649 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
2650 ; CHECK-PREP10-NEXT: extsb r3, r3
2651 ; CHECK-PREP10-NEXT: clrldi r3, r3, 48
2652 ; CHECK-PREP10-NEXT: blr
2654 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
2655 %0 = load i8, ptr %add.ptr, align 1
2656 %conv = sext i8 %0 to i16
2660 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2661 define dso_local zeroext i16 @ld_reg_uint16_t_int8_t(ptr nocapture readonly %ptr, i64 %off) {
2662 ; CHECK-LABEL: ld_reg_uint16_t_int8_t:
2663 ; CHECK: # %bb.0: # %entry
2664 ; CHECK-NEXT: lbzx r3, r3, r4
2665 ; CHECK-NEXT: extsb r3, r3
2666 ; CHECK-NEXT: clrldi r3, r3, 48
2669 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
2670 %0 = load i8, ptr %add.ptr, align 1
2671 %conv = sext i8 %0 to i16
2675 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2676 define dso_local zeroext i16 @ld_or_uint16_t_int8_t(i64 %ptr, i8 zeroext %off) {
2677 ; CHECK-LABEL: ld_or_uint16_t_int8_t:
2678 ; CHECK: # %bb.0: # %entry
2679 ; CHECK-NEXT: or r3, r4, r3
2680 ; CHECK-NEXT: lbz r3, 0(r3)
2681 ; CHECK-NEXT: extsb r3, r3
2682 ; CHECK-NEXT: clrldi r3, r3, 48
2685 %conv = zext i8 %off to i64
2686 %or = or i64 %conv, %ptr
2687 %0 = inttoptr i64 %or to ptr
2688 %1 = load i8, ptr %0, align 1
2689 %conv1 = sext i8 %1 to i16
2693 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2694 define dso_local zeroext i16 @ld_not_disjoint16_uint16_t_int8_t(i64 %ptr) {
2695 ; CHECK-LABEL: ld_not_disjoint16_uint16_t_int8_t:
2696 ; CHECK: # %bb.0: # %entry
2697 ; CHECK-NEXT: ori r3, r3, 6
2698 ; CHECK-NEXT: lbz r3, 0(r3)
2699 ; CHECK-NEXT: extsb r3, r3
2700 ; CHECK-NEXT: clrldi r3, r3, 48
2703 %or = or i64 %ptr, 6
2704 %0 = inttoptr i64 %or to ptr
2705 %1 = load i8, ptr %0, align 1
2706 %conv = sext i8 %1 to i16
2710 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2711 define dso_local zeroext i16 @ld_disjoint_align16_uint16_t_int8_t(i64 %ptr) {
2712 ; CHECK-LABEL: ld_disjoint_align16_uint16_t_int8_t:
2713 ; CHECK: # %bb.0: # %entry
2714 ; CHECK-NEXT: rldicr r3, r3, 0, 51
2715 ; CHECK-NEXT: lbz r3, 24(r3)
2716 ; CHECK-NEXT: extsb r3, r3
2717 ; CHECK-NEXT: clrldi r3, r3, 48
2720 %and = and i64 %ptr, -4096
2721 %or = or i64 %and, 24
2722 %0 = inttoptr i64 %or to ptr
2723 %1 = load i8, ptr %0, align 8
2724 %conv = sext i8 %1 to i16
2728 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2729 define dso_local zeroext i16 @ld_not_disjoint32_uint16_t_int8_t(i64 %ptr) {
2730 ; CHECK-LABEL: ld_not_disjoint32_uint16_t_int8_t:
2731 ; CHECK: # %bb.0: # %entry
2732 ; CHECK-NEXT: ori r3, r3, 34463
2733 ; CHECK-NEXT: oris r3, r3, 1
2734 ; CHECK-NEXT: lbz r3, 0(r3)
2735 ; CHECK-NEXT: extsb r3, r3
2736 ; CHECK-NEXT: clrldi r3, r3, 48
2739 %or = or i64 %ptr, 99999
2740 %0 = inttoptr i64 %or to ptr
2741 %1 = load i8, ptr %0, align 1
2742 %conv = sext i8 %1 to i16
2746 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2747 define dso_local zeroext i16 @ld_disjoint_align32_uint16_t_int8_t(i64 %ptr) {
2748 ; CHECK-P10-LABEL: ld_disjoint_align32_uint16_t_int8_t:
2749 ; CHECK-P10: # %bb.0: # %entry
2750 ; CHECK-P10-NEXT: lis r4, -15264
2751 ; CHECK-P10-NEXT: and r3, r3, r4
2752 ; CHECK-P10-NEXT: plbz r3, 999990000(r3), 0
2753 ; CHECK-P10-NEXT: extsb r3, r3
2754 ; CHECK-P10-NEXT: clrldi r3, r3, 48
2755 ; CHECK-P10-NEXT: blr
2757 ; CHECK-PREP10-LABEL: ld_disjoint_align32_uint16_t_int8_t:
2758 ; CHECK-PREP10: # %bb.0: # %entry
2759 ; CHECK-PREP10-NEXT: lis r4, -15264
2760 ; CHECK-PREP10-NEXT: and r3, r3, r4
2761 ; CHECK-PREP10-NEXT: lis r4, 15258
2762 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
2763 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
2764 ; CHECK-PREP10-NEXT: extsb r3, r3
2765 ; CHECK-PREP10-NEXT: clrldi r3, r3, 48
2766 ; CHECK-PREP10-NEXT: blr
2768 %and = and i64 %ptr, -1000341504
2769 %or = or i64 %and, 999990000
2770 %0 = inttoptr i64 %or to ptr
2771 %1 = load i8, ptr %0, align 16
2772 %conv = sext i8 %1 to i16
2776 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2777 define dso_local zeroext i16 @ld_not_disjoint64_uint16_t_int8_t(i64 %ptr) {
2778 ; CHECK-P10-LABEL: ld_not_disjoint64_uint16_t_int8_t:
2779 ; CHECK-P10: # %bb.0: # %entry
2780 ; CHECK-P10-NEXT: pli r4, 232
2781 ; CHECK-P10-NEXT: pli r5, 3567587329
2782 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
2783 ; CHECK-P10-NEXT: or r3, r3, r5
2784 ; CHECK-P10-NEXT: lbz r3, 0(r3)
2785 ; CHECK-P10-NEXT: extsb r3, r3
2786 ; CHECK-P10-NEXT: clrldi r3, r3, 48
2787 ; CHECK-P10-NEXT: blr
2789 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint16_t_int8_t:
2790 ; CHECK-PREP10: # %bb.0: # %entry
2791 ; CHECK-PREP10-NEXT: li r4, 29
2792 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
2793 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
2794 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
2795 ; CHECK-PREP10-NEXT: or r3, r3, r4
2796 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
2797 ; CHECK-PREP10-NEXT: extsb r3, r3
2798 ; CHECK-PREP10-NEXT: clrldi r3, r3, 48
2799 ; CHECK-PREP10-NEXT: blr
2801 %or = or i64 %ptr, 1000000000001
2802 %0 = inttoptr i64 %or to ptr
2803 %1 = load i8, ptr %0, align 1
2804 %conv = sext i8 %1 to i16
2808 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2809 define dso_local zeroext i16 @ld_disjoint_align64_uint16_t_int8_t(i64 %ptr) {
2810 ; CHECK-P10-LABEL: ld_disjoint_align64_uint16_t_int8_t:
2811 ; CHECK-P10: # %bb.0: # %entry
2812 ; CHECK-P10-NEXT: pli r4, 244140625
2813 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
2814 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2815 ; CHECK-P10-NEXT: lbzx r3, r3, r4
2816 ; CHECK-P10-NEXT: extsb r3, r3
2817 ; CHECK-P10-NEXT: clrldi r3, r3, 48
2818 ; CHECK-P10-NEXT: blr
2820 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint16_t_int8_t:
2821 ; CHECK-PREP10: # %bb.0: # %entry
2822 ; CHECK-PREP10-NEXT: lis r4, 3725
2823 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
2824 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2825 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2826 ; CHECK-PREP10-NEXT: lbzx r3, r3, r4
2827 ; CHECK-PREP10-NEXT: extsb r3, r3
2828 ; CHECK-PREP10-NEXT: clrldi r3, r3, 48
2829 ; CHECK-PREP10-NEXT: blr
2831 %and = and i64 %ptr, -1099511627776
2832 %or = or i64 %and, 1000000000000
2833 %0 = inttoptr i64 %or to ptr
2834 %1 = load i8, ptr %0, align 4096
2835 %conv = sext i8 %1 to i16
2839 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2840 define dso_local zeroext i16 @ld_cst_align16_uint16_t_int8_t() {
2841 ; CHECK-LABEL: ld_cst_align16_uint16_t_int8_t:
2842 ; CHECK: # %bb.0: # %entry
2843 ; CHECK-NEXT: lbz r3, 4080(0)
2844 ; CHECK-NEXT: extsb r3, r3
2845 ; CHECK-NEXT: clrldi r3, r3, 48
2848 %0 = load i8, ptr inttoptr (i64 4080 to ptr), align 16
2849 %conv = sext i8 %0 to i16
2853 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2854 define dso_local zeroext i16 @ld_cst_align32_uint16_t_int8_t() {
2855 ; CHECK-LABEL: ld_cst_align32_uint16_t_int8_t:
2856 ; CHECK: # %bb.0: # %entry
2857 ; CHECK-NEXT: lis r3, 153
2858 ; CHECK-NEXT: lbz r3, -27108(r3)
2859 ; CHECK-NEXT: extsb r3, r3
2860 ; CHECK-NEXT: clrldi r3, r3, 48
2863 %0 = load i8, ptr inttoptr (i64 9999900 to ptr), align 4
2864 %conv = sext i8 %0 to i16
2868 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2869 define dso_local zeroext i16 @ld_cst_align64_uint16_t_int8_t() {
2870 ; CHECK-P10-LABEL: ld_cst_align64_uint16_t_int8_t:
2871 ; CHECK-P10: # %bb.0: # %entry
2872 ; CHECK-P10-NEXT: pli r3, 244140625
2873 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
2874 ; CHECK-P10-NEXT: lbz r3, 0(r3)
2875 ; CHECK-P10-NEXT: extsb r3, r3
2876 ; CHECK-P10-NEXT: clrldi r3, r3, 48
2877 ; CHECK-P10-NEXT: blr
2879 ; CHECK-PREP10-LABEL: ld_cst_align64_uint16_t_int8_t:
2880 ; CHECK-PREP10: # %bb.0: # %entry
2881 ; CHECK-PREP10-NEXT: lis r3, 3725
2882 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
2883 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
2884 ; CHECK-PREP10-NEXT: lbz r3, 0(r3)
2885 ; CHECK-PREP10-NEXT: extsb r3, r3
2886 ; CHECK-PREP10-NEXT: clrldi r3, r3, 48
2887 ; CHECK-PREP10-NEXT: blr
2889 %0 = load i8, ptr inttoptr (i64 1000000000000 to ptr), align 4096
2890 %conv = sext i8 %0 to i16
2894 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2895 define dso_local zeroext i16 @ld_0_uint16_t_uint16_t(i64 %ptr) {
2896 ; CHECK-LABEL: ld_0_uint16_t_uint16_t:
2897 ; CHECK: # %bb.0: # %entry
2898 ; CHECK-NEXT: lhz r3, 0(r3)
2901 %0 = inttoptr i64 %ptr to ptr
2902 %1 = load i16, ptr %0, align 2
2906 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2907 define dso_local zeroext i16 @ld_align16_uint16_t_uint16_t(ptr nocapture readonly %ptr) {
2908 ; CHECK-LABEL: ld_align16_uint16_t_uint16_t:
2909 ; CHECK: # %bb.0: # %entry
2910 ; CHECK-NEXT: lhz r3, 8(r3)
2913 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
2914 %0 = load i16, ptr %add.ptr, align 2
2918 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2919 define dso_local zeroext i16 @ld_align32_uint16_t_uint16_t(ptr nocapture readonly %ptr) {
2920 ; CHECK-P10-LABEL: ld_align32_uint16_t_uint16_t:
2921 ; CHECK-P10: # %bb.0: # %entry
2922 ; CHECK-P10-NEXT: plhz r3, 99999000(r3), 0
2923 ; CHECK-P10-NEXT: blr
2925 ; CHECK-PREP10-LABEL: ld_align32_uint16_t_uint16_t:
2926 ; CHECK-PREP10: # %bb.0: # %entry
2927 ; CHECK-PREP10-NEXT: lis r4, 1525
2928 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
2929 ; CHECK-PREP10-NEXT: lhzx r3, r3, r4
2930 ; CHECK-PREP10-NEXT: blr
2932 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
2933 %0 = load i16, ptr %add.ptr, align 2
2937 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2938 define dso_local zeroext i16 @ld_align64_uint16_t_uint16_t(ptr nocapture readonly %ptr) {
2939 ; CHECK-P10-LABEL: ld_align64_uint16_t_uint16_t:
2940 ; CHECK-P10: # %bb.0: # %entry
2941 ; CHECK-P10-NEXT: pli r4, 244140625
2942 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
2943 ; CHECK-P10-NEXT: lhzx r3, r3, r4
2944 ; CHECK-P10-NEXT: blr
2946 ; CHECK-PREP10-LABEL: ld_align64_uint16_t_uint16_t:
2947 ; CHECK-PREP10: # %bb.0: # %entry
2948 ; CHECK-PREP10-NEXT: lis r4, 3725
2949 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
2950 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
2951 ; CHECK-PREP10-NEXT: lhzx r3, r3, r4
2952 ; CHECK-PREP10-NEXT: blr
2954 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
2955 %0 = load i16, ptr %add.ptr, align 2
2959 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2960 define dso_local zeroext i16 @ld_reg_uint16_t_uint16_t(ptr nocapture readonly %ptr, i64 %off) {
2961 ; CHECK-LABEL: ld_reg_uint16_t_uint16_t:
2962 ; CHECK: # %bb.0: # %entry
2963 ; CHECK-NEXT: lhzx r3, r3, r4
2966 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
2967 %0 = load i16, ptr %add.ptr, align 2
2971 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2972 define dso_local zeroext i16 @ld_or_uint16_t_uint16_t(i64 %ptr, i8 zeroext %off) {
2973 ; CHECK-LABEL: ld_or_uint16_t_uint16_t:
2974 ; CHECK: # %bb.0: # %entry
2975 ; CHECK-NEXT: or r3, r4, r3
2976 ; CHECK-NEXT: lhz r3, 0(r3)
2979 %conv = zext i8 %off to i64
2980 %or = or i64 %conv, %ptr
2981 %0 = inttoptr i64 %or to ptr
2982 %1 = load i16, ptr %0, align 2
2986 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
2987 define dso_local zeroext i16 @ld_not_disjoint16_uint16_t_uint16_t(i64 %ptr) {
2988 ; CHECK-LABEL: ld_not_disjoint16_uint16_t_uint16_t:
2989 ; CHECK: # %bb.0: # %entry
2990 ; CHECK-NEXT: ori r3, r3, 6
2991 ; CHECK-NEXT: lhz r3, 0(r3)
2994 %or = or i64 %ptr, 6
2995 %0 = inttoptr i64 %or to ptr
2996 %1 = load i16, ptr %0, align 2
3000 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3001 define dso_local zeroext i16 @ld_disjoint_align16_uint16_t_uint16_t(i64 %ptr) {
3002 ; CHECK-LABEL: ld_disjoint_align16_uint16_t_uint16_t:
3003 ; CHECK: # %bb.0: # %entry
3004 ; CHECK-NEXT: rldicr r3, r3, 0, 51
3005 ; CHECK-NEXT: lhz r3, 24(r3)
3008 %and = and i64 %ptr, -4096
3009 %or = or i64 %and, 24
3010 %0 = inttoptr i64 %or to ptr
3011 %1 = load i16, ptr %0, align 8
3015 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3016 define dso_local zeroext i16 @ld_not_disjoint32_uint16_t_uint16_t(i64 %ptr) {
3017 ; CHECK-LABEL: ld_not_disjoint32_uint16_t_uint16_t:
3018 ; CHECK: # %bb.0: # %entry
3019 ; CHECK-NEXT: ori r3, r3, 34463
3020 ; CHECK-NEXT: oris r3, r3, 1
3021 ; CHECK-NEXT: lhz r3, 0(r3)
3024 %or = or i64 %ptr, 99999
3025 %0 = inttoptr i64 %or to ptr
3026 %1 = load i16, ptr %0, align 2
3030 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3031 define dso_local zeroext i16 @ld_disjoint_align32_uint16_t_uint16_t(i64 %ptr) {
3032 ; CHECK-P10-LABEL: ld_disjoint_align32_uint16_t_uint16_t:
3033 ; CHECK-P10: # %bb.0: # %entry
3034 ; CHECK-P10-NEXT: lis r4, -15264
3035 ; CHECK-P10-NEXT: and r3, r3, r4
3036 ; CHECK-P10-NEXT: plhz r3, 999990000(r3), 0
3037 ; CHECK-P10-NEXT: blr
3039 ; CHECK-PREP10-LABEL: ld_disjoint_align32_uint16_t_uint16_t:
3040 ; CHECK-PREP10: # %bb.0: # %entry
3041 ; CHECK-PREP10-NEXT: lis r4, -15264
3042 ; CHECK-PREP10-NEXT: and r3, r3, r4
3043 ; CHECK-PREP10-NEXT: lis r4, 15258
3044 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
3045 ; CHECK-PREP10-NEXT: lhzx r3, r3, r4
3046 ; CHECK-PREP10-NEXT: blr
3048 %and = and i64 %ptr, -1000341504
3049 %or = or i64 %and, 999990000
3050 %0 = inttoptr i64 %or to ptr
3051 %1 = load i16, ptr %0, align 16
3055 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3056 define dso_local zeroext i16 @ld_not_disjoint64_uint16_t_uint16_t(i64 %ptr) {
3057 ; CHECK-P10-LABEL: ld_not_disjoint64_uint16_t_uint16_t:
3058 ; CHECK-P10: # %bb.0: # %entry
3059 ; CHECK-P10-NEXT: pli r4, 232
3060 ; CHECK-P10-NEXT: pli r5, 3567587329
3061 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
3062 ; CHECK-P10-NEXT: or r3, r3, r5
3063 ; CHECK-P10-NEXT: lhz r3, 0(r3)
3064 ; CHECK-P10-NEXT: blr
3066 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint16_t_uint16_t:
3067 ; CHECK-PREP10: # %bb.0: # %entry
3068 ; CHECK-PREP10-NEXT: li r4, 29
3069 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
3070 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
3071 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
3072 ; CHECK-PREP10-NEXT: or r3, r3, r4
3073 ; CHECK-PREP10-NEXT: lhz r3, 0(r3)
3074 ; CHECK-PREP10-NEXT: blr
3076 %or = or i64 %ptr, 1000000000001
3077 %0 = inttoptr i64 %or to ptr
3078 %1 = load i16, ptr %0, align 2
3082 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3083 define dso_local zeroext i16 @ld_disjoint_align64_uint16_t_uint16_t(i64 %ptr) {
3084 ; CHECK-P10-LABEL: ld_disjoint_align64_uint16_t_uint16_t:
3085 ; CHECK-P10: # %bb.0: # %entry
3086 ; CHECK-P10-NEXT: pli r4, 244140625
3087 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
3088 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
3089 ; CHECK-P10-NEXT: lhzx r3, r3, r4
3090 ; CHECK-P10-NEXT: blr
3092 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint16_t_uint16_t:
3093 ; CHECK-PREP10: # %bb.0: # %entry
3094 ; CHECK-PREP10-NEXT: lis r4, 3725
3095 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
3096 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
3097 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
3098 ; CHECK-PREP10-NEXT: lhzx r3, r3, r4
3099 ; CHECK-PREP10-NEXT: blr
3101 %and = and i64 %ptr, -1099511627776
3102 %or = or i64 %and, 1000000000000
3103 %0 = inttoptr i64 %or to ptr
3104 %1 = load i16, ptr %0, align 4096
3108 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3109 define dso_local zeroext i16 @ld_cst_align16_uint16_t_uint16_t() {
3110 ; CHECK-LABEL: ld_cst_align16_uint16_t_uint16_t:
3111 ; CHECK: # %bb.0: # %entry
3112 ; CHECK-NEXT: lhz r3, 4080(0)
3115 %0 = load i16, ptr inttoptr (i64 4080 to ptr), align 16
3119 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3120 define dso_local zeroext i16 @ld_cst_align32_uint16_t_uint16_t() {
3121 ; CHECK-LABEL: ld_cst_align32_uint16_t_uint16_t:
3122 ; CHECK: # %bb.0: # %entry
3123 ; CHECK-NEXT: lis r3, 153
3124 ; CHECK-NEXT: lhz r3, -27108(r3)
3127 %0 = load i16, ptr inttoptr (i64 9999900 to ptr), align 4
3131 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3132 define dso_local zeroext i16 @ld_cst_align64_uint16_t_uint16_t() {
3133 ; CHECK-P10-LABEL: ld_cst_align64_uint16_t_uint16_t:
3134 ; CHECK-P10: # %bb.0: # %entry
3135 ; CHECK-P10-NEXT: pli r3, 244140625
3136 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
3137 ; CHECK-P10-NEXT: lhz r3, 0(r3)
3138 ; CHECK-P10-NEXT: blr
3140 ; CHECK-PREP10-LABEL: ld_cst_align64_uint16_t_uint16_t:
3141 ; CHECK-PREP10: # %bb.0: # %entry
3142 ; CHECK-PREP10-NEXT: lis r3, 3725
3143 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
3144 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
3145 ; CHECK-PREP10-NEXT: lhz r3, 0(r3)
3146 ; CHECK-PREP10-NEXT: blr
3148 %0 = load i16, ptr inttoptr (i64 1000000000000 to ptr), align 4096
3152 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3153 define dso_local zeroext i16 @ld_0_uint16_t_uint32_t(i64 %ptr) {
3154 ; CHECK-LE-LABEL: ld_0_uint16_t_uint32_t:
3155 ; CHECK-LE: # %bb.0: # %entry
3156 ; CHECK-LE-NEXT: lhz r3, 0(r3)
3157 ; CHECK-LE-NEXT: blr
3159 ; CHECK-BE-LABEL: ld_0_uint16_t_uint32_t:
3160 ; CHECK-BE: # %bb.0: # %entry
3161 ; CHECK-BE-NEXT: lhz r3, 2(r3)
3162 ; CHECK-BE-NEXT: blr
3164 %0 = inttoptr i64 %ptr to ptr
3165 %1 = load i32, ptr %0, align 4
3166 %conv = trunc i32 %1 to i16
3170 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3171 define dso_local zeroext i16 @ld_align16_uint16_t_uint32_t(ptr nocapture readonly %ptr) {
3172 ; CHECK-LE-LABEL: ld_align16_uint16_t_uint32_t:
3173 ; CHECK-LE: # %bb.0: # %entry
3174 ; CHECK-LE-NEXT: lhz r3, 8(r3)
3175 ; CHECK-LE-NEXT: blr
3177 ; CHECK-BE-LABEL: ld_align16_uint16_t_uint32_t:
3178 ; CHECK-BE: # %bb.0: # %entry
3179 ; CHECK-BE-NEXT: lhz r3, 10(r3)
3180 ; CHECK-BE-NEXT: blr
3182 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
3183 %0 = load i32, ptr %add.ptr, align 4
3184 %conv = trunc i32 %0 to i16
3188 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3189 define dso_local zeroext i16 @ld_align32_uint16_t_uint32_t(ptr nocapture readonly %ptr) {
3190 ; CHECK-P10-LE-LABEL: ld_align32_uint16_t_uint32_t:
3191 ; CHECK-P10-LE: # %bb.0: # %entry
3192 ; CHECK-P10-LE-NEXT: plhz r3, 99999000(r3), 0
3193 ; CHECK-P10-LE-NEXT: blr
3195 ; CHECK-P10-BE-LABEL: ld_align32_uint16_t_uint32_t:
3196 ; CHECK-P10-BE: # %bb.0: # %entry
3197 ; CHECK-P10-BE-NEXT: plhz r3, 99999002(r3), 0
3198 ; CHECK-P10-BE-NEXT: blr
3200 ; CHECK-P9-LE-LABEL: ld_align32_uint16_t_uint32_t:
3201 ; CHECK-P9-LE: # %bb.0: # %entry
3202 ; CHECK-P9-LE-NEXT: lis r4, 1525
3203 ; CHECK-P9-LE-NEXT: ori r4, r4, 56600
3204 ; CHECK-P9-LE-NEXT: lhzx r3, r3, r4
3205 ; CHECK-P9-LE-NEXT: blr
3207 ; CHECK-P9-BE-LABEL: ld_align32_uint16_t_uint32_t:
3208 ; CHECK-P9-BE: # %bb.0: # %entry
3209 ; CHECK-P9-BE-NEXT: lis r4, 1525
3210 ; CHECK-P9-BE-NEXT: ori r4, r4, 56602
3211 ; CHECK-P9-BE-NEXT: lhzx r3, r3, r4
3212 ; CHECK-P9-BE-NEXT: blr
3214 ; CHECK-P8-LE-LABEL: ld_align32_uint16_t_uint32_t:
3215 ; CHECK-P8-LE: # %bb.0: # %entry
3216 ; CHECK-P8-LE-NEXT: lis r4, 1525
3217 ; CHECK-P8-LE-NEXT: ori r4, r4, 56600
3218 ; CHECK-P8-LE-NEXT: lhzx r3, r3, r4
3219 ; CHECK-P8-LE-NEXT: blr
3221 ; CHECK-P8-BE-LABEL: ld_align32_uint16_t_uint32_t:
3222 ; CHECK-P8-BE: # %bb.0: # %entry
3223 ; CHECK-P8-BE-NEXT: lis r4, 1525
3224 ; CHECK-P8-BE-NEXT: ori r4, r4, 56602
3225 ; CHECK-P8-BE-NEXT: lhzx r3, r3, r4
3226 ; CHECK-P8-BE-NEXT: blr
3228 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
3229 %0 = load i32, ptr %add.ptr, align 4
3230 %conv = trunc i32 %0 to i16
3234 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3235 define dso_local zeroext i16 @ld_align64_uint16_t_uint32_t(ptr nocapture readonly %ptr) {
3236 ; CHECK-P10-LE-LABEL: ld_align64_uint16_t_uint32_t:
3237 ; CHECK-P10-LE: # %bb.0: # %entry
3238 ; CHECK-P10-LE-NEXT: pli r4, 244140625
3239 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
3240 ; CHECK-P10-LE-NEXT: lhzx r3, r3, r4
3241 ; CHECK-P10-LE-NEXT: blr
3243 ; CHECK-P10-BE-LABEL: ld_align64_uint16_t_uint32_t:
3244 ; CHECK-P10-BE: # %bb.0: # %entry
3245 ; CHECK-P10-BE-NEXT: pli r4, 232
3246 ; CHECK-P10-BE-NEXT: pli r5, 3567587330
3247 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
3248 ; CHECK-P10-BE-NEXT: lhzx r3, r3, r5
3249 ; CHECK-P10-BE-NEXT: blr
3251 ; CHECK-P9-LE-LABEL: ld_align64_uint16_t_uint32_t:
3252 ; CHECK-P9-LE: # %bb.0: # %entry
3253 ; CHECK-P9-LE-NEXT: lis r4, 3725
3254 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
3255 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
3256 ; CHECK-P9-LE-NEXT: lhzx r3, r3, r4
3257 ; CHECK-P9-LE-NEXT: blr
3259 ; CHECK-P9-BE-LABEL: ld_align64_uint16_t_uint32_t:
3260 ; CHECK-P9-BE: # %bb.0: # %entry
3261 ; CHECK-P9-BE-NEXT: li r4, 29
3262 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
3263 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
3264 ; CHECK-P9-BE-NEXT: ori r4, r4, 4098
3265 ; CHECK-P9-BE-NEXT: lhzx r3, r3, r4
3266 ; CHECK-P9-BE-NEXT: blr
3268 ; CHECK-P8-LE-LABEL: ld_align64_uint16_t_uint32_t:
3269 ; CHECK-P8-LE: # %bb.0: # %entry
3270 ; CHECK-P8-LE-NEXT: lis r4, 3725
3271 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
3272 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
3273 ; CHECK-P8-LE-NEXT: lhzx r3, r3, r4
3274 ; CHECK-P8-LE-NEXT: blr
3276 ; CHECK-P8-BE-LABEL: ld_align64_uint16_t_uint32_t:
3277 ; CHECK-P8-BE: # %bb.0: # %entry
3278 ; CHECK-P8-BE-NEXT: li r4, 29
3279 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
3280 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
3281 ; CHECK-P8-BE-NEXT: ori r4, r4, 4098
3282 ; CHECK-P8-BE-NEXT: lhzx r3, r3, r4
3283 ; CHECK-P8-BE-NEXT: blr
3285 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
3286 %0 = load i32, ptr %add.ptr, align 4
3287 %conv = trunc i32 %0 to i16
3291 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3292 define dso_local zeroext i16 @ld_reg_uint16_t_uint32_t(ptr nocapture readonly %ptr, i64 %off) {
3293 ; CHECK-LE-LABEL: ld_reg_uint16_t_uint32_t:
3294 ; CHECK-LE: # %bb.0: # %entry
3295 ; CHECK-LE-NEXT: lhzx r3, r3, r4
3296 ; CHECK-LE-NEXT: blr
3298 ; CHECK-BE-LABEL: ld_reg_uint16_t_uint32_t:
3299 ; CHECK-BE: # %bb.0: # %entry
3300 ; CHECK-BE-NEXT: add r3, r3, r4
3301 ; CHECK-BE-NEXT: lhz r3, 2(r3)
3302 ; CHECK-BE-NEXT: blr
3304 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
3305 %0 = load i32, ptr %add.ptr, align 4
3306 %conv = trunc i32 %0 to i16
3310 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3311 define dso_local zeroext i16 @ld_or_uint16_t_uint32_t(i64 %ptr, i8 zeroext %off) {
3312 ; CHECK-LE-LABEL: ld_or_uint16_t_uint32_t:
3313 ; CHECK-LE: # %bb.0: # %entry
3314 ; CHECK-LE-NEXT: or r3, r4, r3
3315 ; CHECK-LE-NEXT: lhz r3, 0(r3)
3316 ; CHECK-LE-NEXT: blr
3318 ; CHECK-BE-LABEL: ld_or_uint16_t_uint32_t:
3319 ; CHECK-BE: # %bb.0: # %entry
3320 ; CHECK-BE-NEXT: or r3, r4, r3
3321 ; CHECK-BE-NEXT: lhz r3, 2(r3)
3322 ; CHECK-BE-NEXT: blr
3324 %conv = zext i8 %off to i64
3325 %or = or i64 %conv, %ptr
3326 %0 = inttoptr i64 %or to ptr
3327 %1 = load i32, ptr %0, align 4
3328 %conv1 = trunc i32 %1 to i16
3332 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3333 define dso_local zeroext i16 @ld_not_disjoint16_uint16_t_uint32_t(i64 %ptr) {
3334 ; CHECK-LE-LABEL: ld_not_disjoint16_uint16_t_uint32_t:
3335 ; CHECK-LE: # %bb.0: # %entry
3336 ; CHECK-LE-NEXT: ori r3, r3, 6
3337 ; CHECK-LE-NEXT: lhz r3, 0(r3)
3338 ; CHECK-LE-NEXT: blr
3340 ; CHECK-BE-LABEL: ld_not_disjoint16_uint16_t_uint32_t:
3341 ; CHECK-BE: # %bb.0: # %entry
3342 ; CHECK-BE-NEXT: ori r3, r3, 6
3343 ; CHECK-BE-NEXT: lhz r3, 2(r3)
3344 ; CHECK-BE-NEXT: blr
3346 %or = or i64 %ptr, 6
3347 %0 = inttoptr i64 %or to ptr
3348 %1 = load i32, ptr %0, align 4
3349 %conv = trunc i32 %1 to i16
3353 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3354 define dso_local zeroext i16 @ld_disjoint_align16_uint16_t_uint32_t(i64 %ptr) {
3355 ; CHECK-LE-LABEL: ld_disjoint_align16_uint16_t_uint32_t:
3356 ; CHECK-LE: # %bb.0: # %entry
3357 ; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
3358 ; CHECK-LE-NEXT: lhz r3, 24(r3)
3359 ; CHECK-LE-NEXT: blr
3361 ; CHECK-BE-LABEL: ld_disjoint_align16_uint16_t_uint32_t:
3362 ; CHECK-BE: # %bb.0: # %entry
3363 ; CHECK-BE-NEXT: rldicr r3, r3, 0, 51
3364 ; CHECK-BE-NEXT: lhz r3, 26(r3)
3365 ; CHECK-BE-NEXT: blr
3367 %and = and i64 %ptr, -4096
3368 %or = or i64 %and, 24
3369 %0 = inttoptr i64 %or to ptr
3370 %1 = load i32, ptr %0, align 8
3371 %conv = trunc i32 %1 to i16
3375 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3376 define dso_local zeroext i16 @ld_not_disjoint32_uint16_t_uint32_t(i64 %ptr) {
3377 ; CHECK-LE-LABEL: ld_not_disjoint32_uint16_t_uint32_t:
3378 ; CHECK-LE: # %bb.0: # %entry
3379 ; CHECK-LE-NEXT: ori r3, r3, 34463
3380 ; CHECK-LE-NEXT: oris r3, r3, 1
3381 ; CHECK-LE-NEXT: lhz r3, 0(r3)
3382 ; CHECK-LE-NEXT: blr
3384 ; CHECK-BE-LABEL: ld_not_disjoint32_uint16_t_uint32_t:
3385 ; CHECK-BE: # %bb.0: # %entry
3386 ; CHECK-BE-NEXT: ori r3, r3, 34463
3387 ; CHECK-BE-NEXT: oris r3, r3, 1
3388 ; CHECK-BE-NEXT: lhz r3, 2(r3)
3389 ; CHECK-BE-NEXT: blr
3391 %or = or i64 %ptr, 99999
3392 %0 = inttoptr i64 %or to ptr
3393 %1 = load i32, ptr %0, align 4
3394 %conv = trunc i32 %1 to i16
3398 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3399 define dso_local zeroext i16 @ld_disjoint_align32_uint16_t_uint32_t(i64 %ptr) {
3400 ; CHECK-P10-LE-LABEL: ld_disjoint_align32_uint16_t_uint32_t:
3401 ; CHECK-P10-LE: # %bb.0: # %entry
3402 ; CHECK-P10-LE-NEXT: lis r4, -15264
3403 ; CHECK-P10-LE-NEXT: and r3, r3, r4
3404 ; CHECK-P10-LE-NEXT: plhz r3, 999990000(r3), 0
3405 ; CHECK-P10-LE-NEXT: blr
3407 ; CHECK-P10-BE-LABEL: ld_disjoint_align32_uint16_t_uint32_t:
3408 ; CHECK-P10-BE: # %bb.0: # %entry
3409 ; CHECK-P10-BE-NEXT: lis r4, -15264
3410 ; CHECK-P10-BE-NEXT: and r3, r3, r4
3411 ; CHECK-P10-BE-NEXT: plhz r3, 999990002(r3), 0
3412 ; CHECK-P10-BE-NEXT: blr
3414 ; CHECK-P9-LE-LABEL: ld_disjoint_align32_uint16_t_uint32_t:
3415 ; CHECK-P9-LE: # %bb.0: # %entry
3416 ; CHECK-P9-LE-NEXT: lis r4, -15264
3417 ; CHECK-P9-LE-NEXT: and r3, r3, r4
3418 ; CHECK-P9-LE-NEXT: lis r4, 15258
3419 ; CHECK-P9-LE-NEXT: ori r4, r4, 41712
3420 ; CHECK-P9-LE-NEXT: lhzx r3, r3, r4
3421 ; CHECK-P9-LE-NEXT: blr
3423 ; CHECK-P9-BE-LABEL: ld_disjoint_align32_uint16_t_uint32_t:
3424 ; CHECK-P9-BE: # %bb.0: # %entry
3425 ; CHECK-P9-BE-NEXT: lis r4, -15264
3426 ; CHECK-P9-BE-NEXT: and r3, r3, r4
3427 ; CHECK-P9-BE-NEXT: lis r4, 15258
3428 ; CHECK-P9-BE-NEXT: ori r4, r4, 41714
3429 ; CHECK-P9-BE-NEXT: lhzx r3, r3, r4
3430 ; CHECK-P9-BE-NEXT: blr
3432 ; CHECK-P8-LE-LABEL: ld_disjoint_align32_uint16_t_uint32_t:
3433 ; CHECK-P8-LE: # %bb.0: # %entry
3434 ; CHECK-P8-LE-NEXT: lis r4, -15264
3435 ; CHECK-P8-LE-NEXT: and r3, r3, r4
3436 ; CHECK-P8-LE-NEXT: lis r4, 15258
3437 ; CHECK-P8-LE-NEXT: ori r4, r4, 41712
3438 ; CHECK-P8-LE-NEXT: lhzx r3, r3, r4
3439 ; CHECK-P8-LE-NEXT: blr
3441 ; CHECK-P8-BE-LABEL: ld_disjoint_align32_uint16_t_uint32_t:
3442 ; CHECK-P8-BE: # %bb.0: # %entry
3443 ; CHECK-P8-BE-NEXT: lis r4, -15264
3444 ; CHECK-P8-BE-NEXT: and r3, r3, r4
3445 ; CHECK-P8-BE-NEXT: lis r4, 15258
3446 ; CHECK-P8-BE-NEXT: ori r4, r4, 41714
3447 ; CHECK-P8-BE-NEXT: lhzx r3, r3, r4
3448 ; CHECK-P8-BE-NEXT: blr
3450 %and = and i64 %ptr, -1000341504
3451 %or = or i64 %and, 999990000
3452 %0 = inttoptr i64 %or to ptr
3453 %1 = load i32, ptr %0, align 16
3454 %conv = trunc i32 %1 to i16
3458 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3459 define dso_local zeroext i16 @ld_not_disjoint64_uint16_t_uint32_t(i64 %ptr) {
3460 ; CHECK-P10-LE-LABEL: ld_not_disjoint64_uint16_t_uint32_t:
3461 ; CHECK-P10-LE: # %bb.0: # %entry
3462 ; CHECK-P10-LE-NEXT: pli r4, 232
3463 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
3464 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
3465 ; CHECK-P10-LE-NEXT: or r3, r3, r5
3466 ; CHECK-P10-LE-NEXT: lhz r3, 0(r3)
3467 ; CHECK-P10-LE-NEXT: blr
3469 ; CHECK-P10-BE-LABEL: ld_not_disjoint64_uint16_t_uint32_t:
3470 ; CHECK-P10-BE: # %bb.0: # %entry
3471 ; CHECK-P10-BE-NEXT: pli r4, 232
3472 ; CHECK-P10-BE-NEXT: pli r5, 3567587329
3473 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
3474 ; CHECK-P10-BE-NEXT: or r3, r3, r5
3475 ; CHECK-P10-BE-NEXT: lhz r3, 2(r3)
3476 ; CHECK-P10-BE-NEXT: blr
3478 ; CHECK-P9-LE-LABEL: ld_not_disjoint64_uint16_t_uint32_t:
3479 ; CHECK-P9-LE: # %bb.0: # %entry
3480 ; CHECK-P9-LE-NEXT: li r4, 29
3481 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
3482 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
3483 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
3484 ; CHECK-P9-LE-NEXT: or r3, r3, r4
3485 ; CHECK-P9-LE-NEXT: lhz r3, 0(r3)
3486 ; CHECK-P9-LE-NEXT: blr
3488 ; CHECK-P9-BE-LABEL: ld_not_disjoint64_uint16_t_uint32_t:
3489 ; CHECK-P9-BE: # %bb.0: # %entry
3490 ; CHECK-P9-BE-NEXT: li r4, 29
3491 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
3492 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
3493 ; CHECK-P9-BE-NEXT: ori r4, r4, 4097
3494 ; CHECK-P9-BE-NEXT: or r3, r3, r4
3495 ; CHECK-P9-BE-NEXT: lhz r3, 2(r3)
3496 ; CHECK-P9-BE-NEXT: blr
3498 ; CHECK-P8-LE-LABEL: ld_not_disjoint64_uint16_t_uint32_t:
3499 ; CHECK-P8-LE: # %bb.0: # %entry
3500 ; CHECK-P8-LE-NEXT: li r4, 29
3501 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
3502 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
3503 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
3504 ; CHECK-P8-LE-NEXT: or r3, r3, r4
3505 ; CHECK-P8-LE-NEXT: lhz r3, 0(r3)
3506 ; CHECK-P8-LE-NEXT: blr
3508 ; CHECK-P8-BE-LABEL: ld_not_disjoint64_uint16_t_uint32_t:
3509 ; CHECK-P8-BE: # %bb.0: # %entry
3510 ; CHECK-P8-BE-NEXT: li r4, 29
3511 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
3512 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
3513 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
3514 ; CHECK-P8-BE-NEXT: or r3, r3, r4
3515 ; CHECK-P8-BE-NEXT: lhz r3, 2(r3)
3516 ; CHECK-P8-BE-NEXT: blr
3518 %or = or i64 %ptr, 1000000000001
3519 %0 = inttoptr i64 %or to ptr
3520 %1 = load i32, ptr %0, align 4
3521 %conv = trunc i32 %1 to i16
3525 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3526 define dso_local zeroext i16 @ld_disjoint_align64_uint16_t_uint32_t(i64 %ptr) {
3527 ; CHECK-P10-LE-LABEL: ld_disjoint_align64_uint16_t_uint32_t:
3528 ; CHECK-P10-LE: # %bb.0: # %entry
3529 ; CHECK-P10-LE-NEXT: pli r4, 244140625
3530 ; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
3531 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
3532 ; CHECK-P10-LE-NEXT: lhzx r3, r3, r4
3533 ; CHECK-P10-LE-NEXT: blr
3535 ; CHECK-P10-BE-LABEL: ld_disjoint_align64_uint16_t_uint32_t:
3536 ; CHECK-P10-BE: # %bb.0: # %entry
3537 ; CHECK-P10-BE-NEXT: pli r4, 232
3538 ; CHECK-P10-BE-NEXT: pli r5, 3567587330
3539 ; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
3540 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
3541 ; CHECK-P10-BE-NEXT: lhzx r3, r3, r5
3542 ; CHECK-P10-BE-NEXT: blr
3544 ; CHECK-P9-LE-LABEL: ld_disjoint_align64_uint16_t_uint32_t:
3545 ; CHECK-P9-LE: # %bb.0: # %entry
3546 ; CHECK-P9-LE-NEXT: lis r4, 3725
3547 ; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
3548 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
3549 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
3550 ; CHECK-P9-LE-NEXT: lhzx r3, r3, r4
3551 ; CHECK-P9-LE-NEXT: blr
3553 ; CHECK-P9-BE-LABEL: ld_disjoint_align64_uint16_t_uint32_t:
3554 ; CHECK-P9-BE: # %bb.0: # %entry
3555 ; CHECK-P9-BE-NEXT: li r4, 29
3556 ; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
3557 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
3558 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
3559 ; CHECK-P9-BE-NEXT: ori r4, r4, 4098
3560 ; CHECK-P9-BE-NEXT: lhzx r3, r3, r4
3561 ; CHECK-P9-BE-NEXT: blr
3563 ; CHECK-P8-LE-LABEL: ld_disjoint_align64_uint16_t_uint32_t:
3564 ; CHECK-P8-LE: # %bb.0: # %entry
3565 ; CHECK-P8-LE-NEXT: lis r4, 3725
3566 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
3567 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
3568 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
3569 ; CHECK-P8-LE-NEXT: lhzx r3, r3, r4
3570 ; CHECK-P8-LE-NEXT: blr
3572 ; CHECK-P8-BE-LABEL: ld_disjoint_align64_uint16_t_uint32_t:
3573 ; CHECK-P8-BE: # %bb.0: # %entry
3574 ; CHECK-P8-BE-NEXT: li r4, 29
3575 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
3576 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
3577 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
3578 ; CHECK-P8-BE-NEXT: ori r4, r4, 4098
3579 ; CHECK-P8-BE-NEXT: lhzx r3, r3, r4
3580 ; CHECK-P8-BE-NEXT: blr
3582 %and = and i64 %ptr, -1099511627776
3583 %or = or i64 %and, 1000000000000
3584 %0 = inttoptr i64 %or to ptr
3585 %1 = load i32, ptr %0, align 4096
3586 %conv = trunc i32 %1 to i16
3590 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3591 define dso_local zeroext i16 @ld_cst_align16_uint16_t_uint32_t() {
3592 ; CHECK-LE-LABEL: ld_cst_align16_uint16_t_uint32_t:
3593 ; CHECK-LE: # %bb.0: # %entry
3594 ; CHECK-LE-NEXT: lhz r3, 4080(0)
3595 ; CHECK-LE-NEXT: blr
3597 ; CHECK-BE-LABEL: ld_cst_align16_uint16_t_uint32_t:
3598 ; CHECK-BE: # %bb.0: # %entry
3599 ; CHECK-BE-NEXT: lhz r3, 4082(0)
3600 ; CHECK-BE-NEXT: blr
3602 %0 = load i32, ptr inttoptr (i64 4080 to ptr), align 16
3603 %conv = trunc i32 %0 to i16
3607 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3608 define dso_local zeroext i16 @ld_cst_align32_uint16_t_uint32_t() {
3609 ; CHECK-LE-LABEL: ld_cst_align32_uint16_t_uint32_t:
3610 ; CHECK-LE: # %bb.0: # %entry
3611 ; CHECK-LE-NEXT: lis r3, 153
3612 ; CHECK-LE-NEXT: lhz r3, -27108(r3)
3613 ; CHECK-LE-NEXT: blr
3615 ; CHECK-BE-LABEL: ld_cst_align32_uint16_t_uint32_t:
3616 ; CHECK-BE: # %bb.0: # %entry
3617 ; CHECK-BE-NEXT: lis r3, 153
3618 ; CHECK-BE-NEXT: lhz r3, -27106(r3)
3619 ; CHECK-BE-NEXT: blr
3621 %0 = load i32, ptr inttoptr (i64 9999900 to ptr), align 4
3622 %conv = trunc i32 %0 to i16
3626 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3627 define dso_local zeroext i16 @ld_cst_align64_uint16_t_uint32_t() {
3628 ; CHECK-P10-LE-LABEL: ld_cst_align64_uint16_t_uint32_t:
3629 ; CHECK-P10-LE: # %bb.0: # %entry
3630 ; CHECK-P10-LE-NEXT: pli r3, 244140625
3631 ; CHECK-P10-LE-NEXT: rldic r3, r3, 12, 24
3632 ; CHECK-P10-LE-NEXT: lhz r3, 0(r3)
3633 ; CHECK-P10-LE-NEXT: blr
3635 ; CHECK-P10-BE-LABEL: ld_cst_align64_uint16_t_uint32_t:
3636 ; CHECK-P10-BE: # %bb.0: # %entry
3637 ; CHECK-P10-BE-NEXT: pli r3, 232
3638 ; CHECK-P10-BE-NEXT: pli r4, 3567587330
3639 ; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
3640 ; CHECK-P10-BE-NEXT: lhz r3, 0(r4)
3641 ; CHECK-P10-BE-NEXT: blr
3643 ; CHECK-P9-LE-LABEL: ld_cst_align64_uint16_t_uint32_t:
3644 ; CHECK-P9-LE: # %bb.0: # %entry
3645 ; CHECK-P9-LE-NEXT: lis r3, 3725
3646 ; CHECK-P9-LE-NEXT: ori r3, r3, 19025
3647 ; CHECK-P9-LE-NEXT: rldic r3, r3, 12, 24
3648 ; CHECK-P9-LE-NEXT: lhz r3, 0(r3)
3649 ; CHECK-P9-LE-NEXT: blr
3651 ; CHECK-P9-BE-LABEL: ld_cst_align64_uint16_t_uint32_t:
3652 ; CHECK-P9-BE: # %bb.0: # %entry
3653 ; CHECK-P9-BE-NEXT: li r3, 29
3654 ; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
3655 ; CHECK-P9-BE-NEXT: oris r3, r3, 54437
3656 ; CHECK-P9-BE-NEXT: ori r3, r3, 4098
3657 ; CHECK-P9-BE-NEXT: lhz r3, 0(r3)
3658 ; CHECK-P9-BE-NEXT: blr
3660 ; CHECK-P8-LE-LABEL: ld_cst_align64_uint16_t_uint32_t:
3661 ; CHECK-P8-LE: # %bb.0: # %entry
3662 ; CHECK-P8-LE-NEXT: lis r3, 3725
3663 ; CHECK-P8-LE-NEXT: ori r3, r3, 19025
3664 ; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
3665 ; CHECK-P8-LE-NEXT: lhz r3, 0(r3)
3666 ; CHECK-P8-LE-NEXT: blr
3668 ; CHECK-P8-BE-LABEL: ld_cst_align64_uint16_t_uint32_t:
3669 ; CHECK-P8-BE: # %bb.0: # %entry
3670 ; CHECK-P8-BE-NEXT: li r3, 29
3671 ; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
3672 ; CHECK-P8-BE-NEXT: oris r3, r3, 54437
3673 ; CHECK-P8-BE-NEXT: ori r3, r3, 4098
3674 ; CHECK-P8-BE-NEXT: lhz r3, 0(r3)
3675 ; CHECK-P8-BE-NEXT: blr
3677 %0 = load i32, ptr inttoptr (i64 1000000000000 to ptr), align 4096
3678 %conv = trunc i32 %0 to i16
3682 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3683 define dso_local zeroext i16 @ld_0_uint16_t_uint64_t(i64 %ptr) {
3684 ; CHECK-LE-LABEL: ld_0_uint16_t_uint64_t:
3685 ; CHECK-LE: # %bb.0: # %entry
3686 ; CHECK-LE-NEXT: lhz r3, 0(r3)
3687 ; CHECK-LE-NEXT: blr
3689 ; CHECK-BE-LABEL: ld_0_uint16_t_uint64_t:
3690 ; CHECK-BE: # %bb.0: # %entry
3691 ; CHECK-BE-NEXT: lhz r3, 6(r3)
3692 ; CHECK-BE-NEXT: blr
3694 %0 = inttoptr i64 %ptr to ptr
3695 %1 = load i64, ptr %0, align 8
3696 %conv = trunc i64 %1 to i16
3700 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3701 define dso_local zeroext i16 @ld_align16_uint16_t_uint64_t(ptr nocapture readonly %ptr) {
3702 ; CHECK-LE-LABEL: ld_align16_uint16_t_uint64_t:
3703 ; CHECK-LE: # %bb.0: # %entry
3704 ; CHECK-LE-NEXT: lhz r3, 8(r3)
3705 ; CHECK-LE-NEXT: blr
3707 ; CHECK-BE-LABEL: ld_align16_uint16_t_uint64_t:
3708 ; CHECK-BE: # %bb.0: # %entry
3709 ; CHECK-BE-NEXT: lhz r3, 14(r3)
3710 ; CHECK-BE-NEXT: blr
3712 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
3713 %0 = load i64, ptr %add.ptr, align 8
3714 %conv = trunc i64 %0 to i16
3718 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3719 define dso_local zeroext i16 @ld_align32_uint16_t_uint64_t(ptr nocapture readonly %ptr) {
3720 ; CHECK-P10-LE-LABEL: ld_align32_uint16_t_uint64_t:
3721 ; CHECK-P10-LE: # %bb.0: # %entry
3722 ; CHECK-P10-LE-NEXT: plhz r3, 99999000(r3), 0
3723 ; CHECK-P10-LE-NEXT: blr
3725 ; CHECK-P10-BE-LABEL: ld_align32_uint16_t_uint64_t:
3726 ; CHECK-P10-BE: # %bb.0: # %entry
3727 ; CHECK-P10-BE-NEXT: plhz r3, 99999006(r3), 0
3728 ; CHECK-P10-BE-NEXT: blr
3730 ; CHECK-P9-LE-LABEL: ld_align32_uint16_t_uint64_t:
3731 ; CHECK-P9-LE: # %bb.0: # %entry
3732 ; CHECK-P9-LE-NEXT: lis r4, 1525
3733 ; CHECK-P9-LE-NEXT: ori r4, r4, 56600
3734 ; CHECK-P9-LE-NEXT: lhzx r3, r3, r4
3735 ; CHECK-P9-LE-NEXT: blr
3737 ; CHECK-P9-BE-LABEL: ld_align32_uint16_t_uint64_t:
3738 ; CHECK-P9-BE: # %bb.0: # %entry
3739 ; CHECK-P9-BE-NEXT: lis r4, 1525
3740 ; CHECK-P9-BE-NEXT: ori r4, r4, 56606
3741 ; CHECK-P9-BE-NEXT: lhzx r3, r3, r4
3742 ; CHECK-P9-BE-NEXT: blr
3744 ; CHECK-P8-LE-LABEL: ld_align32_uint16_t_uint64_t:
3745 ; CHECK-P8-LE: # %bb.0: # %entry
3746 ; CHECK-P8-LE-NEXT: lis r4, 1525
3747 ; CHECK-P8-LE-NEXT: ori r4, r4, 56600
3748 ; CHECK-P8-LE-NEXT: lhzx r3, r3, r4
3749 ; CHECK-P8-LE-NEXT: blr
3751 ; CHECK-P8-BE-LABEL: ld_align32_uint16_t_uint64_t:
3752 ; CHECK-P8-BE: # %bb.0: # %entry
3753 ; CHECK-P8-BE-NEXT: lis r4, 1525
3754 ; CHECK-P8-BE-NEXT: ori r4, r4, 56606
3755 ; CHECK-P8-BE-NEXT: lhzx r3, r3, r4
3756 ; CHECK-P8-BE-NEXT: blr
3758 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
3759 %0 = load i64, ptr %add.ptr, align 8
3760 %conv = trunc i64 %0 to i16
3764 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3765 define dso_local zeroext i16 @ld_align64_uint16_t_uint64_t(ptr nocapture readonly %ptr) {
3766 ; CHECK-P10-LE-LABEL: ld_align64_uint16_t_uint64_t:
3767 ; CHECK-P10-LE: # %bb.0: # %entry
3768 ; CHECK-P10-LE-NEXT: pli r4, 244140625
3769 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
3770 ; CHECK-P10-LE-NEXT: lhzx r3, r3, r4
3771 ; CHECK-P10-LE-NEXT: blr
3773 ; CHECK-P10-BE-LABEL: ld_align64_uint16_t_uint64_t:
3774 ; CHECK-P10-BE: # %bb.0: # %entry
3775 ; CHECK-P10-BE-NEXT: pli r4, 232
3776 ; CHECK-P10-BE-NEXT: pli r5, 3567587334
3777 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
3778 ; CHECK-P10-BE-NEXT: lhzx r3, r3, r5
3779 ; CHECK-P10-BE-NEXT: blr
3781 ; CHECK-P9-LE-LABEL: ld_align64_uint16_t_uint64_t:
3782 ; CHECK-P9-LE: # %bb.0: # %entry
3783 ; CHECK-P9-LE-NEXT: lis r4, 3725
3784 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
3785 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
3786 ; CHECK-P9-LE-NEXT: lhzx r3, r3, r4
3787 ; CHECK-P9-LE-NEXT: blr
3789 ; CHECK-P9-BE-LABEL: ld_align64_uint16_t_uint64_t:
3790 ; CHECK-P9-BE: # %bb.0: # %entry
3791 ; CHECK-P9-BE-NEXT: li r4, 29
3792 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
3793 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
3794 ; CHECK-P9-BE-NEXT: ori r4, r4, 4102
3795 ; CHECK-P9-BE-NEXT: lhzx r3, r3, r4
3796 ; CHECK-P9-BE-NEXT: blr
3798 ; CHECK-P8-LE-LABEL: ld_align64_uint16_t_uint64_t:
3799 ; CHECK-P8-LE: # %bb.0: # %entry
3800 ; CHECK-P8-LE-NEXT: lis r4, 3725
3801 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
3802 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
3803 ; CHECK-P8-LE-NEXT: lhzx r3, r3, r4
3804 ; CHECK-P8-LE-NEXT: blr
3806 ; CHECK-P8-BE-LABEL: ld_align64_uint16_t_uint64_t:
3807 ; CHECK-P8-BE: # %bb.0: # %entry
3808 ; CHECK-P8-BE-NEXT: li r4, 29
3809 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
3810 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
3811 ; CHECK-P8-BE-NEXT: ori r4, r4, 4102
3812 ; CHECK-P8-BE-NEXT: lhzx r3, r3, r4
3813 ; CHECK-P8-BE-NEXT: blr
3815 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
3816 %0 = load i64, ptr %add.ptr, align 8
3817 %conv = trunc i64 %0 to i16
3821 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3822 define dso_local zeroext i16 @ld_reg_uint16_t_uint64_t(ptr nocapture readonly %ptr, i64 %off) {
3823 ; CHECK-LE-LABEL: ld_reg_uint16_t_uint64_t:
3824 ; CHECK-LE: # %bb.0: # %entry
3825 ; CHECK-LE-NEXT: lhzx r3, r3, r4
3826 ; CHECK-LE-NEXT: blr
3828 ; CHECK-BE-LABEL: ld_reg_uint16_t_uint64_t:
3829 ; CHECK-BE: # %bb.0: # %entry
3830 ; CHECK-BE-NEXT: add r3, r3, r4
3831 ; CHECK-BE-NEXT: lhz r3, 6(r3)
3832 ; CHECK-BE-NEXT: blr
3834 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
3835 %0 = load i64, ptr %add.ptr, align 8
3836 %conv = trunc i64 %0 to i16
3840 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3841 define dso_local zeroext i16 @ld_or_uint16_t_uint64_t(i64 %ptr, i8 zeroext %off) {
3842 ; CHECK-LE-LABEL: ld_or_uint16_t_uint64_t:
3843 ; CHECK-LE: # %bb.0: # %entry
3844 ; CHECK-LE-NEXT: or r3, r4, r3
3845 ; CHECK-LE-NEXT: lhz r3, 0(r3)
3846 ; CHECK-LE-NEXT: blr
3848 ; CHECK-BE-LABEL: ld_or_uint16_t_uint64_t:
3849 ; CHECK-BE: # %bb.0: # %entry
3850 ; CHECK-BE-NEXT: or r3, r4, r3
3851 ; CHECK-BE-NEXT: lhz r3, 6(r3)
3852 ; CHECK-BE-NEXT: blr
3854 %conv = zext i8 %off to i64
3855 %or = or i64 %conv, %ptr
3856 %0 = inttoptr i64 %or to ptr
3857 %1 = load i64, ptr %0, align 8
3858 %conv1 = trunc i64 %1 to i16
3862 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3863 define dso_local zeroext i16 @ld_not_disjoint16_uint16_t_uint64_t(i64 %ptr) {
3864 ; CHECK-LE-LABEL: ld_not_disjoint16_uint16_t_uint64_t:
3865 ; CHECK-LE: # %bb.0: # %entry
3866 ; CHECK-LE-NEXT: ori r3, r3, 6
3867 ; CHECK-LE-NEXT: lhz r3, 0(r3)
3868 ; CHECK-LE-NEXT: blr
3870 ; CHECK-BE-LABEL: ld_not_disjoint16_uint16_t_uint64_t:
3871 ; CHECK-BE: # %bb.0: # %entry
3872 ; CHECK-BE-NEXT: ori r3, r3, 6
3873 ; CHECK-BE-NEXT: lhz r3, 6(r3)
3874 ; CHECK-BE-NEXT: blr
3876 %or = or i64 %ptr, 6
3877 %0 = inttoptr i64 %or to ptr
3878 %1 = load i64, ptr %0, align 8
3879 %conv = trunc i64 %1 to i16
3883 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3884 define dso_local zeroext i16 @ld_disjoint_align16_uint16_t_uint64_t(i64 %ptr) {
3885 ; CHECK-LE-LABEL: ld_disjoint_align16_uint16_t_uint64_t:
3886 ; CHECK-LE: # %bb.0: # %entry
3887 ; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
3888 ; CHECK-LE-NEXT: lhz r3, 24(r3)
3889 ; CHECK-LE-NEXT: blr
3891 ; CHECK-BE-LABEL: ld_disjoint_align16_uint16_t_uint64_t:
3892 ; CHECK-BE: # %bb.0: # %entry
3893 ; CHECK-BE-NEXT: rldicr r3, r3, 0, 51
3894 ; CHECK-BE-NEXT: lhz r3, 30(r3)
3895 ; CHECK-BE-NEXT: blr
3897 %and = and i64 %ptr, -4096
3898 %or = or i64 %and, 24
3899 %0 = inttoptr i64 %or to ptr
3900 %1 = load i64, ptr %0, align 8
3901 %conv = trunc i64 %1 to i16
3905 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3906 define dso_local zeroext i16 @ld_not_disjoint32_uint16_t_uint64_t(i64 %ptr) {
3907 ; CHECK-LE-LABEL: ld_not_disjoint32_uint16_t_uint64_t:
3908 ; CHECK-LE: # %bb.0: # %entry
3909 ; CHECK-LE-NEXT: ori r3, r3, 34463
3910 ; CHECK-LE-NEXT: oris r3, r3, 1
3911 ; CHECK-LE-NEXT: lhz r3, 0(r3)
3912 ; CHECK-LE-NEXT: blr
3914 ; CHECK-BE-LABEL: ld_not_disjoint32_uint16_t_uint64_t:
3915 ; CHECK-BE: # %bb.0: # %entry
3916 ; CHECK-BE-NEXT: ori r3, r3, 34463
3917 ; CHECK-BE-NEXT: oris r3, r3, 1
3918 ; CHECK-BE-NEXT: lhz r3, 6(r3)
3919 ; CHECK-BE-NEXT: blr
3921 %or = or i64 %ptr, 99999
3922 %0 = inttoptr i64 %or to ptr
3923 %1 = load i64, ptr %0, align 8
3924 %conv = trunc i64 %1 to i16
3928 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3929 define dso_local zeroext i16 @ld_disjoint_align32_uint16_t_uint64_t(i64 %ptr) {
3930 ; CHECK-P10-LE-LABEL: ld_disjoint_align32_uint16_t_uint64_t:
3931 ; CHECK-P10-LE: # %bb.0: # %entry
3932 ; CHECK-P10-LE-NEXT: lis r4, -15264
3933 ; CHECK-P10-LE-NEXT: and r3, r3, r4
3934 ; CHECK-P10-LE-NEXT: plhz r3, 999990000(r3), 0
3935 ; CHECK-P10-LE-NEXT: blr
3937 ; CHECK-P10-BE-LABEL: ld_disjoint_align32_uint16_t_uint64_t:
3938 ; CHECK-P10-BE: # %bb.0: # %entry
3939 ; CHECK-P10-BE-NEXT: lis r4, -15264
3940 ; CHECK-P10-BE-NEXT: and r3, r3, r4
3941 ; CHECK-P10-BE-NEXT: plhz r3, 999990006(r3), 0
3942 ; CHECK-P10-BE-NEXT: blr
3944 ; CHECK-P9-LE-LABEL: ld_disjoint_align32_uint16_t_uint64_t:
3945 ; CHECK-P9-LE: # %bb.0: # %entry
3946 ; CHECK-P9-LE-NEXT: lis r4, -15264
3947 ; CHECK-P9-LE-NEXT: and r3, r3, r4
3948 ; CHECK-P9-LE-NEXT: lis r4, 15258
3949 ; CHECK-P9-LE-NEXT: ori r4, r4, 41712
3950 ; CHECK-P9-LE-NEXT: lhzx r3, r3, r4
3951 ; CHECK-P9-LE-NEXT: blr
3953 ; CHECK-P9-BE-LABEL: ld_disjoint_align32_uint16_t_uint64_t:
3954 ; CHECK-P9-BE: # %bb.0: # %entry
3955 ; CHECK-P9-BE-NEXT: lis r4, -15264
3956 ; CHECK-P9-BE-NEXT: and r3, r3, r4
3957 ; CHECK-P9-BE-NEXT: lis r4, 15258
3958 ; CHECK-P9-BE-NEXT: ori r4, r4, 41718
3959 ; CHECK-P9-BE-NEXT: lhzx r3, r3, r4
3960 ; CHECK-P9-BE-NEXT: blr
3962 ; CHECK-P8-LE-LABEL: ld_disjoint_align32_uint16_t_uint64_t:
3963 ; CHECK-P8-LE: # %bb.0: # %entry
3964 ; CHECK-P8-LE-NEXT: lis r4, -15264
3965 ; CHECK-P8-LE-NEXT: and r3, r3, r4
3966 ; CHECK-P8-LE-NEXT: lis r4, 15258
3967 ; CHECK-P8-LE-NEXT: ori r4, r4, 41712
3968 ; CHECK-P8-LE-NEXT: lhzx r3, r3, r4
3969 ; CHECK-P8-LE-NEXT: blr
3971 ; CHECK-P8-BE-LABEL: ld_disjoint_align32_uint16_t_uint64_t:
3972 ; CHECK-P8-BE: # %bb.0: # %entry
3973 ; CHECK-P8-BE-NEXT: lis r4, -15264
3974 ; CHECK-P8-BE-NEXT: and r3, r3, r4
3975 ; CHECK-P8-BE-NEXT: lis r4, 15258
3976 ; CHECK-P8-BE-NEXT: ori r4, r4, 41718
3977 ; CHECK-P8-BE-NEXT: lhzx r3, r3, r4
3978 ; CHECK-P8-BE-NEXT: blr
3980 %and = and i64 %ptr, -1000341504
3981 %or = or i64 %and, 999990000
3982 %0 = inttoptr i64 %or to ptr
3983 %1 = load i64, ptr %0, align 16
3984 %conv = trunc i64 %1 to i16
3988 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
3989 define dso_local zeroext i16 @ld_not_disjoint64_uint16_t_uint64_t(i64 %ptr) {
3990 ; CHECK-P10-LE-LABEL: ld_not_disjoint64_uint16_t_uint64_t:
3991 ; CHECK-P10-LE: # %bb.0: # %entry
3992 ; CHECK-P10-LE-NEXT: pli r4, 232
3993 ; CHECK-P10-LE-NEXT: pli r5, 3567587329
3994 ; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
3995 ; CHECK-P10-LE-NEXT: or r3, r3, r5
3996 ; CHECK-P10-LE-NEXT: lhz r3, 0(r3)
3997 ; CHECK-P10-LE-NEXT: blr
3999 ; CHECK-P10-BE-LABEL: ld_not_disjoint64_uint16_t_uint64_t:
4000 ; CHECK-P10-BE: # %bb.0: # %entry
4001 ; CHECK-P10-BE-NEXT: pli r4, 232
4002 ; CHECK-P10-BE-NEXT: pli r5, 3567587329
4003 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
4004 ; CHECK-P10-BE-NEXT: or r3, r3, r5
4005 ; CHECK-P10-BE-NEXT: lhz r3, 6(r3)
4006 ; CHECK-P10-BE-NEXT: blr
4008 ; CHECK-P9-LE-LABEL: ld_not_disjoint64_uint16_t_uint64_t:
4009 ; CHECK-P9-LE: # %bb.0: # %entry
4010 ; CHECK-P9-LE-NEXT: li r4, 29
4011 ; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
4012 ; CHECK-P9-LE-NEXT: oris r4, r4, 54437
4013 ; CHECK-P9-LE-NEXT: ori r4, r4, 4097
4014 ; CHECK-P9-LE-NEXT: or r3, r3, r4
4015 ; CHECK-P9-LE-NEXT: lhz r3, 0(r3)
4016 ; CHECK-P9-LE-NEXT: blr
4018 ; CHECK-P9-BE-LABEL: ld_not_disjoint64_uint16_t_uint64_t:
4019 ; CHECK-P9-BE: # %bb.0: # %entry
4020 ; CHECK-P9-BE-NEXT: li r4, 29
4021 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
4022 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
4023 ; CHECK-P9-BE-NEXT: ori r4, r4, 4097
4024 ; CHECK-P9-BE-NEXT: or r3, r3, r4
4025 ; CHECK-P9-BE-NEXT: lhz r3, 6(r3)
4026 ; CHECK-P9-BE-NEXT: blr
4028 ; CHECK-P8-LE-LABEL: ld_not_disjoint64_uint16_t_uint64_t:
4029 ; CHECK-P8-LE: # %bb.0: # %entry
4030 ; CHECK-P8-LE-NEXT: li r4, 29
4031 ; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
4032 ; CHECK-P8-LE-NEXT: oris r4, r4, 54437
4033 ; CHECK-P8-LE-NEXT: ori r4, r4, 4097
4034 ; CHECK-P8-LE-NEXT: or r3, r3, r4
4035 ; CHECK-P8-LE-NEXT: lhz r3, 0(r3)
4036 ; CHECK-P8-LE-NEXT: blr
4038 ; CHECK-P8-BE-LABEL: ld_not_disjoint64_uint16_t_uint64_t:
4039 ; CHECK-P8-BE: # %bb.0: # %entry
4040 ; CHECK-P8-BE-NEXT: li r4, 29
4041 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
4042 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
4043 ; CHECK-P8-BE-NEXT: ori r4, r4, 4097
4044 ; CHECK-P8-BE-NEXT: or r3, r3, r4
4045 ; CHECK-P8-BE-NEXT: lhz r3, 6(r3)
4046 ; CHECK-P8-BE-NEXT: blr
4048 %or = or i64 %ptr, 1000000000001
4049 %0 = inttoptr i64 %or to ptr
4050 %1 = load i64, ptr %0, align 8
4051 %conv = trunc i64 %1 to i16
4055 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4056 define dso_local zeroext i16 @ld_disjoint_align64_uint16_t_uint64_t(i64 %ptr) {
4057 ; CHECK-P10-LE-LABEL: ld_disjoint_align64_uint16_t_uint64_t:
4058 ; CHECK-P10-LE: # %bb.0: # %entry
4059 ; CHECK-P10-LE-NEXT: pli r4, 244140625
4060 ; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
4061 ; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
4062 ; CHECK-P10-LE-NEXT: lhzx r3, r3, r4
4063 ; CHECK-P10-LE-NEXT: blr
4065 ; CHECK-P10-BE-LABEL: ld_disjoint_align64_uint16_t_uint64_t:
4066 ; CHECK-P10-BE: # %bb.0: # %entry
4067 ; CHECK-P10-BE-NEXT: pli r4, 232
4068 ; CHECK-P10-BE-NEXT: pli r5, 3567587334
4069 ; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
4070 ; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
4071 ; CHECK-P10-BE-NEXT: lhzx r3, r3, r5
4072 ; CHECK-P10-BE-NEXT: blr
4074 ; CHECK-P9-LE-LABEL: ld_disjoint_align64_uint16_t_uint64_t:
4075 ; CHECK-P9-LE: # %bb.0: # %entry
4076 ; CHECK-P9-LE-NEXT: lis r4, 3725
4077 ; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
4078 ; CHECK-P9-LE-NEXT: ori r4, r4, 19025
4079 ; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
4080 ; CHECK-P9-LE-NEXT: lhzx r3, r3, r4
4081 ; CHECK-P9-LE-NEXT: blr
4083 ; CHECK-P9-BE-LABEL: ld_disjoint_align64_uint16_t_uint64_t:
4084 ; CHECK-P9-BE: # %bb.0: # %entry
4085 ; CHECK-P9-BE-NEXT: li r4, 29
4086 ; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
4087 ; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
4088 ; CHECK-P9-BE-NEXT: oris r4, r4, 54437
4089 ; CHECK-P9-BE-NEXT: ori r4, r4, 4102
4090 ; CHECK-P9-BE-NEXT: lhzx r3, r3, r4
4091 ; CHECK-P9-BE-NEXT: blr
4093 ; CHECK-P8-LE-LABEL: ld_disjoint_align64_uint16_t_uint64_t:
4094 ; CHECK-P8-LE: # %bb.0: # %entry
4095 ; CHECK-P8-LE-NEXT: lis r4, 3725
4096 ; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
4097 ; CHECK-P8-LE-NEXT: ori r4, r4, 19025
4098 ; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
4099 ; CHECK-P8-LE-NEXT: lhzx r3, r3, r4
4100 ; CHECK-P8-LE-NEXT: blr
4102 ; CHECK-P8-BE-LABEL: ld_disjoint_align64_uint16_t_uint64_t:
4103 ; CHECK-P8-BE: # %bb.0: # %entry
4104 ; CHECK-P8-BE-NEXT: li r4, 29
4105 ; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
4106 ; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
4107 ; CHECK-P8-BE-NEXT: oris r4, r4, 54437
4108 ; CHECK-P8-BE-NEXT: ori r4, r4, 4102
4109 ; CHECK-P8-BE-NEXT: lhzx r3, r3, r4
4110 ; CHECK-P8-BE-NEXT: blr
4112 %and = and i64 %ptr, -1099511627776
4113 %or = or i64 %and, 1000000000000
4114 %0 = inttoptr i64 %or to ptr
4115 %1 = load i64, ptr %0, align 4096
4116 %conv = trunc i64 %1 to i16
4120 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4121 define dso_local zeroext i16 @ld_cst_align16_uint16_t_uint64_t() {
4122 ; CHECK-LE-LABEL: ld_cst_align16_uint16_t_uint64_t:
4123 ; CHECK-LE: # %bb.0: # %entry
4124 ; CHECK-LE-NEXT: lhz r3, 4080(0)
4125 ; CHECK-LE-NEXT: blr
4127 ; CHECK-BE-LABEL: ld_cst_align16_uint16_t_uint64_t:
4128 ; CHECK-BE: # %bb.0: # %entry
4129 ; CHECK-BE-NEXT: lhz r3, 4086(0)
4130 ; CHECK-BE-NEXT: blr
4132 %0 = load i64, ptr inttoptr (i64 4080 to ptr), align 16
4133 %conv = trunc i64 %0 to i16
4137 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4138 define dso_local zeroext i16 @ld_cst_align32_uint16_t_uint64_t() {
4139 ; CHECK-LE-LABEL: ld_cst_align32_uint16_t_uint64_t:
4140 ; CHECK-LE: # %bb.0: # %entry
4141 ; CHECK-LE-NEXT: lis r3, 153
4142 ; CHECK-LE-NEXT: lhz r3, -27108(r3)
4143 ; CHECK-LE-NEXT: blr
4145 ; CHECK-BE-LABEL: ld_cst_align32_uint16_t_uint64_t:
4146 ; CHECK-BE: # %bb.0: # %entry
4147 ; CHECK-BE-NEXT: lis r3, 153
4148 ; CHECK-BE-NEXT: lhz r3, -27102(r3)
4149 ; CHECK-BE-NEXT: blr
4151 %0 = load i64, ptr inttoptr (i64 9999900 to ptr), align 8
4152 %conv = trunc i64 %0 to i16
4156 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4157 define dso_local zeroext i16 @ld_cst_align64_uint16_t_uint64_t() {
4158 ; CHECK-P10-LE-LABEL: ld_cst_align64_uint16_t_uint64_t:
4159 ; CHECK-P10-LE: # %bb.0: # %entry
4160 ; CHECK-P10-LE-NEXT: pli r3, 244140625
4161 ; CHECK-P10-LE-NEXT: rldic r3, r3, 12, 24
4162 ; CHECK-P10-LE-NEXT: lhz r3, 0(r3)
4163 ; CHECK-P10-LE-NEXT: blr
4165 ; CHECK-P10-BE-LABEL: ld_cst_align64_uint16_t_uint64_t:
4166 ; CHECK-P10-BE: # %bb.0: # %entry
4167 ; CHECK-P10-BE-NEXT: pli r3, 232
4168 ; CHECK-P10-BE-NEXT: pli r4, 3567587334
4169 ; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
4170 ; CHECK-P10-BE-NEXT: lhz r3, 0(r4)
4171 ; CHECK-P10-BE-NEXT: blr
4173 ; CHECK-P9-LE-LABEL: ld_cst_align64_uint16_t_uint64_t:
4174 ; CHECK-P9-LE: # %bb.0: # %entry
4175 ; CHECK-P9-LE-NEXT: lis r3, 3725
4176 ; CHECK-P9-LE-NEXT: ori r3, r3, 19025
4177 ; CHECK-P9-LE-NEXT: rldic r3, r3, 12, 24
4178 ; CHECK-P9-LE-NEXT: lhz r3, 0(r3)
4179 ; CHECK-P9-LE-NEXT: blr
4181 ; CHECK-P9-BE-LABEL: ld_cst_align64_uint16_t_uint64_t:
4182 ; CHECK-P9-BE: # %bb.0: # %entry
4183 ; CHECK-P9-BE-NEXT: li r3, 29
4184 ; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
4185 ; CHECK-P9-BE-NEXT: oris r3, r3, 54437
4186 ; CHECK-P9-BE-NEXT: ori r3, r3, 4102
4187 ; CHECK-P9-BE-NEXT: lhz r3, 0(r3)
4188 ; CHECK-P9-BE-NEXT: blr
4190 ; CHECK-P8-LE-LABEL: ld_cst_align64_uint16_t_uint64_t:
4191 ; CHECK-P8-LE: # %bb.0: # %entry
4192 ; CHECK-P8-LE-NEXT: lis r3, 3725
4193 ; CHECK-P8-LE-NEXT: ori r3, r3, 19025
4194 ; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
4195 ; CHECK-P8-LE-NEXT: lhz r3, 0(r3)
4196 ; CHECK-P8-LE-NEXT: blr
4198 ; CHECK-P8-BE-LABEL: ld_cst_align64_uint16_t_uint64_t:
4199 ; CHECK-P8-BE: # %bb.0: # %entry
4200 ; CHECK-P8-BE-NEXT: li r3, 29
4201 ; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
4202 ; CHECK-P8-BE-NEXT: oris r3, r3, 54437
4203 ; CHECK-P8-BE-NEXT: ori r3, r3, 4102
4204 ; CHECK-P8-BE-NEXT: lhz r3, 0(r3)
4205 ; CHECK-P8-BE-NEXT: blr
4207 %0 = load i64, ptr inttoptr (i64 1000000000000 to ptr), align 4096
4208 %conv = trunc i64 %0 to i16
4212 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4213 define dso_local zeroext i16 @ld_align16_uint16_t_float(ptr nocapture readonly %ptr) {
4214 ; CHECK-LABEL: ld_align16_uint16_t_float:
4215 ; CHECK: # %bb.0: # %entry
4216 ; CHECK-NEXT: lfs f0, 8(r3)
4217 ; CHECK-NEXT: xscvdpsxws f0, f0
4218 ; CHECK-NEXT: mffprwz r3, f0
4221 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
4222 %0 = load float, ptr %add.ptr, align 4
4223 %conv = fptoui float %0 to i16
4227 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4228 define dso_local zeroext i16 @ld_align32_uint16_t_float(ptr nocapture readonly %ptr) {
4229 ; CHECK-P10-LABEL: ld_align32_uint16_t_float:
4230 ; CHECK-P10: # %bb.0: # %entry
4231 ; CHECK-P10-NEXT: plfs f0, 99999000(r3), 0
4232 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
4233 ; CHECK-P10-NEXT: mffprwz r3, f0
4234 ; CHECK-P10-NEXT: blr
4236 ; CHECK-PREP10-LABEL: ld_align32_uint16_t_float:
4237 ; CHECK-PREP10: # %bb.0: # %entry
4238 ; CHECK-PREP10-NEXT: lis r4, 1525
4239 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
4240 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
4241 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
4242 ; CHECK-PREP10-NEXT: mffprwz r3, f0
4243 ; CHECK-PREP10-NEXT: blr
4245 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
4246 %0 = load float, ptr %add.ptr, align 4
4247 %conv = fptoui float %0 to i16
4251 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4252 define dso_local zeroext i16 @ld_align64_uint16_t_float(ptr nocapture readonly %ptr) {
4253 ; CHECK-P10-LABEL: ld_align64_uint16_t_float:
4254 ; CHECK-P10: # %bb.0: # %entry
4255 ; CHECK-P10-NEXT: pli r4, 244140625
4256 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
4257 ; CHECK-P10-NEXT: lfsx f0, r3, r4
4258 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
4259 ; CHECK-P10-NEXT: mffprwz r3, f0
4260 ; CHECK-P10-NEXT: blr
4262 ; CHECK-PREP10-LABEL: ld_align64_uint16_t_float:
4263 ; CHECK-PREP10: # %bb.0: # %entry
4264 ; CHECK-PREP10-NEXT: lis r4, 3725
4265 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
4266 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
4267 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
4268 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
4269 ; CHECK-PREP10-NEXT: mffprwz r3, f0
4270 ; CHECK-PREP10-NEXT: blr
4272 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
4273 %0 = load float, ptr %add.ptr, align 4
4274 %conv = fptoui float %0 to i16
4278 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4279 define dso_local zeroext i16 @ld_reg_uint16_t_float(ptr nocapture readonly %ptr, i64 %off) {
4280 ; CHECK-LABEL: ld_reg_uint16_t_float:
4281 ; CHECK: # %bb.0: # %entry
4282 ; CHECK-NEXT: lfsx f0, r3, r4
4283 ; CHECK-NEXT: xscvdpsxws f0, f0
4284 ; CHECK-NEXT: mffprwz r3, f0
4287 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
4288 %0 = load float, ptr %add.ptr, align 4
4289 %conv = fptoui float %0 to i16
4293 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4294 define dso_local zeroext i16 @ld_or_uint16_t_float(i64 %ptr, i8 zeroext %off) {
4295 ; CHECK-LABEL: ld_or_uint16_t_float:
4296 ; CHECK: # %bb.0: # %entry
4297 ; CHECK-NEXT: or r3, r4, r3
4298 ; CHECK-NEXT: lfs f0, 0(r3)
4299 ; CHECK-NEXT: xscvdpsxws f0, f0
4300 ; CHECK-NEXT: mffprwz r3, f0
4303 %conv = zext i8 %off to i64
4304 %or = or i64 %conv, %ptr
4305 %0 = inttoptr i64 %or to ptr
4306 %1 = load float, ptr %0, align 4
4307 %conv1 = fptoui float %1 to i16
4311 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4312 define dso_local zeroext i16 @ld_not_disjoint16_uint16_t_float(i64 %ptr) {
4313 ; CHECK-LABEL: ld_not_disjoint16_uint16_t_float:
4314 ; CHECK: # %bb.0: # %entry
4315 ; CHECK-NEXT: ori r3, r3, 6
4316 ; CHECK-NEXT: lfs f0, 0(r3)
4317 ; CHECK-NEXT: xscvdpsxws f0, f0
4318 ; CHECK-NEXT: mffprwz r3, f0
4321 %or = or i64 %ptr, 6
4322 %0 = inttoptr i64 %or to ptr
4323 %1 = load float, ptr %0, align 4
4324 %conv = fptoui float %1 to i16
4328 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4329 define dso_local zeroext i16 @ld_disjoint_align16_uint16_t_float(i64 %ptr) {
4330 ; CHECK-LABEL: ld_disjoint_align16_uint16_t_float:
4331 ; CHECK: # %bb.0: # %entry
4332 ; CHECK-NEXT: rldicr r3, r3, 0, 51
4333 ; CHECK-NEXT: lfs f0, 24(r3)
4334 ; CHECK-NEXT: xscvdpsxws f0, f0
4335 ; CHECK-NEXT: mffprwz r3, f0
4338 %and = and i64 %ptr, -4096
4339 %or = or i64 %and, 24
4340 %0 = inttoptr i64 %or to ptr
4341 %1 = load float, ptr %0, align 8
4342 %conv = fptoui float %1 to i16
4346 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4347 define dso_local zeroext i16 @ld_not_disjoint32_uint16_t_float(i64 %ptr) {
4348 ; CHECK-LABEL: ld_not_disjoint32_uint16_t_float:
4349 ; CHECK: # %bb.0: # %entry
4350 ; CHECK-NEXT: ori r3, r3, 34463
4351 ; CHECK-NEXT: oris r3, r3, 1
4352 ; CHECK-NEXT: lfs f0, 0(r3)
4353 ; CHECK-NEXT: xscvdpsxws f0, f0
4354 ; CHECK-NEXT: mffprwz r3, f0
4357 %or = or i64 %ptr, 99999
4358 %0 = inttoptr i64 %or to ptr
4359 %1 = load float, ptr %0, align 4
4360 %conv = fptoui float %1 to i16
4364 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4365 define dso_local zeroext i16 @ld_disjoint_align32_uint16_t_float(i64 %ptr) {
4366 ; CHECK-P10-LABEL: ld_disjoint_align32_uint16_t_float:
4367 ; CHECK-P10: # %bb.0: # %entry
4368 ; CHECK-P10-NEXT: lis r4, -15264
4369 ; CHECK-P10-NEXT: and r3, r3, r4
4370 ; CHECK-P10-NEXT: plfs f0, 999990000(r3), 0
4371 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
4372 ; CHECK-P10-NEXT: mffprwz r3, f0
4373 ; CHECK-P10-NEXT: blr
4375 ; CHECK-PREP10-LABEL: ld_disjoint_align32_uint16_t_float:
4376 ; CHECK-PREP10: # %bb.0: # %entry
4377 ; CHECK-PREP10-NEXT: lis r4, -15264
4378 ; CHECK-PREP10-NEXT: and r3, r3, r4
4379 ; CHECK-PREP10-NEXT: lis r4, 15258
4380 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
4381 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
4382 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
4383 ; CHECK-PREP10-NEXT: mffprwz r3, f0
4384 ; CHECK-PREP10-NEXT: blr
4386 %and = and i64 %ptr, -1000341504
4387 %or = or i64 %and, 999990000
4388 %0 = inttoptr i64 %or to ptr
4389 %1 = load float, ptr %0, align 16
4390 %conv = fptoui float %1 to i16
4394 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4395 define dso_local zeroext i16 @ld_not_disjoint64_uint16_t_float(i64 %ptr) {
4396 ; CHECK-P10-LABEL: ld_not_disjoint64_uint16_t_float:
4397 ; CHECK-P10: # %bb.0: # %entry
4398 ; CHECK-P10-NEXT: pli r4, 232
4399 ; CHECK-P10-NEXT: pli r5, 3567587329
4400 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
4401 ; CHECK-P10-NEXT: or r3, r3, r5
4402 ; CHECK-P10-NEXT: lfs f0, 0(r3)
4403 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
4404 ; CHECK-P10-NEXT: mffprwz r3, f0
4405 ; CHECK-P10-NEXT: blr
4407 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint16_t_float:
4408 ; CHECK-PREP10: # %bb.0: # %entry
4409 ; CHECK-PREP10-NEXT: li r4, 29
4410 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
4411 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
4412 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
4413 ; CHECK-PREP10-NEXT: or r3, r3, r4
4414 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
4415 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
4416 ; CHECK-PREP10-NEXT: mffprwz r3, f0
4417 ; CHECK-PREP10-NEXT: blr
4419 %or = or i64 %ptr, 1000000000001
4420 %0 = inttoptr i64 %or to ptr
4421 %1 = load float, ptr %0, align 4
4422 %conv = fptoui float %1 to i16
4426 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4427 define dso_local zeroext i16 @ld_disjoint_align64_uint16_t_float(i64 %ptr) {
4428 ; CHECK-P10-LABEL: ld_disjoint_align64_uint16_t_float:
4429 ; CHECK-P10: # %bb.0: # %entry
4430 ; CHECK-P10-NEXT: pli r4, 244140625
4431 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
4432 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
4433 ; CHECK-P10-NEXT: lfsx f0, r3, r4
4434 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
4435 ; CHECK-P10-NEXT: mffprwz r3, f0
4436 ; CHECK-P10-NEXT: blr
4438 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint16_t_float:
4439 ; CHECK-PREP10: # %bb.0: # %entry
4440 ; CHECK-PREP10-NEXT: lis r4, 3725
4441 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
4442 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
4443 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
4444 ; CHECK-PREP10-NEXT: lfsx f0, r3, r4
4445 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
4446 ; CHECK-PREP10-NEXT: mffprwz r3, f0
4447 ; CHECK-PREP10-NEXT: blr
4449 %and = and i64 %ptr, -1099511627776
4450 %or = or i64 %and, 1000000000000
4451 %0 = inttoptr i64 %or to ptr
4452 %1 = load float, ptr %0, align 4096
4453 %conv = fptoui float %1 to i16
4457 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4458 define dso_local zeroext i16 @ld_cst_align16_uint16_t_float() {
4459 ; CHECK-LABEL: ld_cst_align16_uint16_t_float:
4460 ; CHECK: # %bb.0: # %entry
4461 ; CHECK-NEXT: lfs f0, 4080(0)
4462 ; CHECK-NEXT: xscvdpsxws f0, f0
4463 ; CHECK-NEXT: mffprwz r3, f0
4466 %0 = load float, ptr inttoptr (i64 4080 to ptr), align 16
4467 %conv = fptoui float %0 to i16
4471 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4472 define dso_local zeroext i16 @ld_cst_align32_uint16_t_float() {
4473 ; CHECK-LABEL: ld_cst_align32_uint16_t_float:
4474 ; CHECK: # %bb.0: # %entry
4475 ; CHECK-NEXT: lis r3, 153
4476 ; CHECK-NEXT: lfs f0, -27108(r3)
4477 ; CHECK-NEXT: xscvdpsxws f0, f0
4478 ; CHECK-NEXT: mffprwz r3, f0
4481 %0 = load float, ptr inttoptr (i64 9999900 to ptr), align 4
4482 %conv = fptoui float %0 to i16
4486 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4487 define dso_local zeroext i16 @ld_cst_align64_uint16_t_float() {
4488 ; CHECK-P10-LABEL: ld_cst_align64_uint16_t_float:
4489 ; CHECK-P10: # %bb.0: # %entry
4490 ; CHECK-P10-NEXT: pli r3, 244140625
4491 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
4492 ; CHECK-P10-NEXT: lfs f0, 0(r3)
4493 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
4494 ; CHECK-P10-NEXT: mffprwz r3, f0
4495 ; CHECK-P10-NEXT: blr
4497 ; CHECK-PREP10-LABEL: ld_cst_align64_uint16_t_float:
4498 ; CHECK-PREP10: # %bb.0: # %entry
4499 ; CHECK-PREP10-NEXT: lis r3, 3725
4500 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
4501 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
4502 ; CHECK-PREP10-NEXT: lfs f0, 0(r3)
4503 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
4504 ; CHECK-PREP10-NEXT: mffprwz r3, f0
4505 ; CHECK-PREP10-NEXT: blr
4507 %0 = load float, ptr inttoptr (i64 1000000000000 to ptr), align 4096
4508 %conv = fptoui float %0 to i16
4512 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4513 define dso_local zeroext i16 @ld_0_uint16_t_double(i64 %ptr) {
4514 ; CHECK-LABEL: ld_0_uint16_t_double:
4515 ; CHECK: # %bb.0: # %entry
4516 ; CHECK-NEXT: lfd f0, 0(r3)
4517 ; CHECK-NEXT: xscvdpsxws f0, f0
4518 ; CHECK-NEXT: mffprwz r3, f0
4521 %0 = inttoptr i64 %ptr to ptr
4522 %1 = load double, ptr %0, align 8
4523 %conv = fptoui double %1 to i16
4527 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4528 define dso_local zeroext i16 @ld_align16_uint16_t_double(ptr nocapture readonly %ptr) {
4529 ; CHECK-LABEL: ld_align16_uint16_t_double:
4530 ; CHECK: # %bb.0: # %entry
4531 ; CHECK-NEXT: lfd f0, 8(r3)
4532 ; CHECK-NEXT: xscvdpsxws f0, f0
4533 ; CHECK-NEXT: mffprwz r3, f0
4536 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
4537 %0 = load double, ptr %add.ptr, align 8
4538 %conv = fptoui double %0 to i16
4542 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4543 define dso_local zeroext i16 @ld_align32_uint16_t_double(ptr nocapture readonly %ptr) {
4544 ; CHECK-P10-LABEL: ld_align32_uint16_t_double:
4545 ; CHECK-P10: # %bb.0: # %entry
4546 ; CHECK-P10-NEXT: plfd f0, 99999000(r3), 0
4547 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
4548 ; CHECK-P10-NEXT: mffprwz r3, f0
4549 ; CHECK-P10-NEXT: blr
4551 ; CHECK-PREP10-LABEL: ld_align32_uint16_t_double:
4552 ; CHECK-PREP10: # %bb.0: # %entry
4553 ; CHECK-PREP10-NEXT: lis r4, 1525
4554 ; CHECK-PREP10-NEXT: ori r4, r4, 56600
4555 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
4556 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
4557 ; CHECK-PREP10-NEXT: mffprwz r3, f0
4558 ; CHECK-PREP10-NEXT: blr
4560 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
4561 %0 = load double, ptr %add.ptr, align 8
4562 %conv = fptoui double %0 to i16
4566 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4567 define dso_local zeroext i16 @ld_align64_uint16_t_double(ptr nocapture readonly %ptr) {
4568 ; CHECK-P10-LABEL: ld_align64_uint16_t_double:
4569 ; CHECK-P10: # %bb.0: # %entry
4570 ; CHECK-P10-NEXT: pli r4, 244140625
4571 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
4572 ; CHECK-P10-NEXT: lfdx f0, r3, r4
4573 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
4574 ; CHECK-P10-NEXT: mffprwz r3, f0
4575 ; CHECK-P10-NEXT: blr
4577 ; CHECK-PREP10-LABEL: ld_align64_uint16_t_double:
4578 ; CHECK-PREP10: # %bb.0: # %entry
4579 ; CHECK-PREP10-NEXT: lis r4, 3725
4580 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
4581 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
4582 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
4583 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
4584 ; CHECK-PREP10-NEXT: mffprwz r3, f0
4585 ; CHECK-PREP10-NEXT: blr
4587 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
4588 %0 = load double, ptr %add.ptr, align 8
4589 %conv = fptoui double %0 to i16
4593 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4594 define dso_local zeroext i16 @ld_reg_uint16_t_double(ptr nocapture readonly %ptr, i64 %off) {
4595 ; CHECK-LABEL: ld_reg_uint16_t_double:
4596 ; CHECK: # %bb.0: # %entry
4597 ; CHECK-NEXT: lfdx f0, r3, r4
4598 ; CHECK-NEXT: xscvdpsxws f0, f0
4599 ; CHECK-NEXT: mffprwz r3, f0
4602 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
4603 %0 = load double, ptr %add.ptr, align 8
4604 %conv = fptoui double %0 to i16
4608 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4609 define dso_local zeroext i16 @ld_or_uint16_t_double(i64 %ptr, i8 zeroext %off) {
4610 ; CHECK-LABEL: ld_or_uint16_t_double:
4611 ; CHECK: # %bb.0: # %entry
4612 ; CHECK-NEXT: or r3, r4, r3
4613 ; CHECK-NEXT: lfd f0, 0(r3)
4614 ; CHECK-NEXT: xscvdpsxws f0, f0
4615 ; CHECK-NEXT: mffprwz r3, f0
4618 %conv = zext i8 %off to i64
4619 %or = or i64 %conv, %ptr
4620 %0 = inttoptr i64 %or to ptr
4621 %1 = load double, ptr %0, align 8
4622 %conv1 = fptoui double %1 to i16
4626 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4627 define dso_local zeroext i16 @ld_not_disjoint16_uint16_t_double(i64 %ptr) {
4628 ; CHECK-LABEL: ld_not_disjoint16_uint16_t_double:
4629 ; CHECK: # %bb.0: # %entry
4630 ; CHECK-NEXT: ori r3, r3, 6
4631 ; CHECK-NEXT: lfd f0, 0(r3)
4632 ; CHECK-NEXT: xscvdpsxws f0, f0
4633 ; CHECK-NEXT: mffprwz r3, f0
4636 %or = or i64 %ptr, 6
4637 %0 = inttoptr i64 %or to ptr
4638 %1 = load double, ptr %0, align 8
4639 %conv = fptoui double %1 to i16
4643 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4644 define dso_local zeroext i16 @ld_disjoint_align16_uint16_t_double(i64 %ptr) {
4645 ; CHECK-LABEL: ld_disjoint_align16_uint16_t_double:
4646 ; CHECK: # %bb.0: # %entry
4647 ; CHECK-NEXT: rldicr r3, r3, 0, 51
4648 ; CHECK-NEXT: lfd f0, 24(r3)
4649 ; CHECK-NEXT: xscvdpsxws f0, f0
4650 ; CHECK-NEXT: mffprwz r3, f0
4653 %and = and i64 %ptr, -4096
4654 %or = or i64 %and, 24
4655 %0 = inttoptr i64 %or to ptr
4656 %1 = load double, ptr %0, align 8
4657 %conv = fptoui double %1 to i16
4661 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4662 define dso_local zeroext i16 @ld_not_disjoint32_uint16_t_double(i64 %ptr) {
4663 ; CHECK-LABEL: ld_not_disjoint32_uint16_t_double:
4664 ; CHECK: # %bb.0: # %entry
4665 ; CHECK-NEXT: ori r3, r3, 34463
4666 ; CHECK-NEXT: oris r3, r3, 1
4667 ; CHECK-NEXT: lfd f0, 0(r3)
4668 ; CHECK-NEXT: xscvdpsxws f0, f0
4669 ; CHECK-NEXT: mffprwz r3, f0
4672 %or = or i64 %ptr, 99999
4673 %0 = inttoptr i64 %or to ptr
4674 %1 = load double, ptr %0, align 8
4675 %conv = fptoui double %1 to i16
4679 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4680 define dso_local zeroext i16 @ld_disjoint_align32_uint16_t_double(i64 %ptr) {
4681 ; CHECK-P10-LABEL: ld_disjoint_align32_uint16_t_double:
4682 ; CHECK-P10: # %bb.0: # %entry
4683 ; CHECK-P10-NEXT: lis r4, -15264
4684 ; CHECK-P10-NEXT: and r3, r3, r4
4685 ; CHECK-P10-NEXT: plfd f0, 999990000(r3), 0
4686 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
4687 ; CHECK-P10-NEXT: mffprwz r3, f0
4688 ; CHECK-P10-NEXT: blr
4690 ; CHECK-PREP10-LABEL: ld_disjoint_align32_uint16_t_double:
4691 ; CHECK-PREP10: # %bb.0: # %entry
4692 ; CHECK-PREP10-NEXT: lis r4, -15264
4693 ; CHECK-PREP10-NEXT: and r3, r3, r4
4694 ; CHECK-PREP10-NEXT: lis r4, 15258
4695 ; CHECK-PREP10-NEXT: ori r4, r4, 41712
4696 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
4697 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
4698 ; CHECK-PREP10-NEXT: mffprwz r3, f0
4699 ; CHECK-PREP10-NEXT: blr
4701 %and = and i64 %ptr, -1000341504
4702 %or = or i64 %and, 999990000
4703 %0 = inttoptr i64 %or to ptr
4704 %1 = load double, ptr %0, align 16
4705 %conv = fptoui double %1 to i16
4709 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4710 define dso_local zeroext i16 @ld_not_disjoint64_uint16_t_double(i64 %ptr) {
4711 ; CHECK-P10-LABEL: ld_not_disjoint64_uint16_t_double:
4712 ; CHECK-P10: # %bb.0: # %entry
4713 ; CHECK-P10-NEXT: pli r4, 232
4714 ; CHECK-P10-NEXT: pli r5, 3567587329
4715 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
4716 ; CHECK-P10-NEXT: or r3, r3, r5
4717 ; CHECK-P10-NEXT: lfd f0, 0(r3)
4718 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
4719 ; CHECK-P10-NEXT: mffprwz r3, f0
4720 ; CHECK-P10-NEXT: blr
4722 ; CHECK-PREP10-LABEL: ld_not_disjoint64_uint16_t_double:
4723 ; CHECK-PREP10: # %bb.0: # %entry
4724 ; CHECK-PREP10-NEXT: li r4, 29
4725 ; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
4726 ; CHECK-PREP10-NEXT: oris r4, r4, 54437
4727 ; CHECK-PREP10-NEXT: ori r4, r4, 4097
4728 ; CHECK-PREP10-NEXT: or r3, r3, r4
4729 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
4730 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
4731 ; CHECK-PREP10-NEXT: mffprwz r3, f0
4732 ; CHECK-PREP10-NEXT: blr
4734 %or = or i64 %ptr, 1000000000001
4735 %0 = inttoptr i64 %or to ptr
4736 %1 = load double, ptr %0, align 8
4737 %conv = fptoui double %1 to i16
4741 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4742 define dso_local zeroext i16 @ld_disjoint_align64_uint16_t_double(i64 %ptr) {
4743 ; CHECK-P10-LABEL: ld_disjoint_align64_uint16_t_double:
4744 ; CHECK-P10: # %bb.0: # %entry
4745 ; CHECK-P10-NEXT: pli r4, 244140625
4746 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
4747 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
4748 ; CHECK-P10-NEXT: lfdx f0, r3, r4
4749 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
4750 ; CHECK-P10-NEXT: mffprwz r3, f0
4751 ; CHECK-P10-NEXT: blr
4753 ; CHECK-PREP10-LABEL: ld_disjoint_align64_uint16_t_double:
4754 ; CHECK-PREP10: # %bb.0: # %entry
4755 ; CHECK-PREP10-NEXT: lis r4, 3725
4756 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
4757 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
4758 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
4759 ; CHECK-PREP10-NEXT: lfdx f0, r3, r4
4760 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
4761 ; CHECK-PREP10-NEXT: mffprwz r3, f0
4762 ; CHECK-PREP10-NEXT: blr
4764 %and = and i64 %ptr, -1099511627776
4765 %or = or i64 %and, 1000000000000
4766 %0 = inttoptr i64 %or to ptr
4767 %1 = load double, ptr %0, align 4096
4768 %conv = fptoui double %1 to i16
4772 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4773 define dso_local zeroext i16 @ld_cst_align16_uint16_t_double() {
4774 ; CHECK-LABEL: ld_cst_align16_uint16_t_double:
4775 ; CHECK: # %bb.0: # %entry
4776 ; CHECK-NEXT: lfd f0, 4080(0)
4777 ; CHECK-NEXT: xscvdpsxws f0, f0
4778 ; CHECK-NEXT: mffprwz r3, f0
4781 %0 = load double, ptr inttoptr (i64 4080 to ptr), align 16
4782 %conv = fptoui double %0 to i16
4786 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4787 define dso_local zeroext i16 @ld_cst_align32_uint16_t_double() {
4788 ; CHECK-LABEL: ld_cst_align32_uint16_t_double:
4789 ; CHECK: # %bb.0: # %entry
4790 ; CHECK-NEXT: lis r3, 153
4791 ; CHECK-NEXT: lfd f0, -27108(r3)
4792 ; CHECK-NEXT: xscvdpsxws f0, f0
4793 ; CHECK-NEXT: mffprwz r3, f0
4796 %0 = load double, ptr inttoptr (i64 9999900 to ptr), align 8
4797 %conv = fptoui double %0 to i16
4801 ; Function Attrs: norecurse nounwind readonly uwtable willreturn
4802 define dso_local zeroext i16 @ld_cst_align64_uint16_t_double() {
4803 ; CHECK-P10-LABEL: ld_cst_align64_uint16_t_double:
4804 ; CHECK-P10: # %bb.0: # %entry
4805 ; CHECK-P10-NEXT: pli r3, 244140625
4806 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
4807 ; CHECK-P10-NEXT: lfd f0, 0(r3)
4808 ; CHECK-P10-NEXT: xscvdpsxws f0, f0
4809 ; CHECK-P10-NEXT: mffprwz r3, f0
4810 ; CHECK-P10-NEXT: blr
4812 ; CHECK-PREP10-LABEL: ld_cst_align64_uint16_t_double:
4813 ; CHECK-PREP10: # %bb.0: # %entry
4814 ; CHECK-PREP10-NEXT: lis r3, 3725
4815 ; CHECK-PREP10-NEXT: ori r3, r3, 19025
4816 ; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
4817 ; CHECK-PREP10-NEXT: lfd f0, 0(r3)
4818 ; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
4819 ; CHECK-PREP10-NEXT: mffprwz r3, f0
4820 ; CHECK-PREP10-NEXT: blr
4822 %0 = load double, ptr inttoptr (i64 1000000000000 to ptr), align 4096
4823 %conv = fptoui double %0 to i16
4827 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4828 define dso_local void @st_0_uint16_t_uint8_t(i64 %ptr, i16 zeroext %str) {
4829 ; CHECK-LABEL: st_0_uint16_t_uint8_t:
4830 ; CHECK: # %bb.0: # %entry
4831 ; CHECK-NEXT: stb r4, 0(r3)
4834 %conv = trunc i16 %str to i8
4835 %0 = inttoptr i64 %ptr to ptr
4836 store i8 %conv, ptr %0, align 1
4840 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4841 define dso_local void @st_align16_uint16_t_uint8_t(ptr nocapture %ptr, i16 zeroext %str) {
4842 ; CHECK-LABEL: st_align16_uint16_t_uint8_t:
4843 ; CHECK: # %bb.0: # %entry
4844 ; CHECK-NEXT: stb r4, 8(r3)
4847 %conv = trunc i16 %str to i8
4848 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
4849 store i8 %conv, ptr %add.ptr, align 1
4853 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4854 define dso_local void @st_align32_uint16_t_uint8_t(ptr nocapture %ptr, i16 zeroext %str) {
4855 ; CHECK-P10-LABEL: st_align32_uint16_t_uint8_t:
4856 ; CHECK-P10: # %bb.0: # %entry
4857 ; CHECK-P10-NEXT: pstb r4, 99999000(r3), 0
4858 ; CHECK-P10-NEXT: blr
4860 ; CHECK-PREP10-LABEL: st_align32_uint16_t_uint8_t:
4861 ; CHECK-PREP10: # %bb.0: # %entry
4862 ; CHECK-PREP10-NEXT: lis r5, 1525
4863 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
4864 ; CHECK-PREP10-NEXT: stbx r4, r3, r5
4865 ; CHECK-PREP10-NEXT: blr
4867 %conv = trunc i16 %str to i8
4868 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
4869 store i8 %conv, ptr %add.ptr, align 1
4873 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4874 define dso_local void @st_align64_uint16_t_uint8_t(ptr nocapture %ptr, i16 zeroext %str) {
4875 ; CHECK-P10-LABEL: st_align64_uint16_t_uint8_t:
4876 ; CHECK-P10: # %bb.0: # %entry
4877 ; CHECK-P10-NEXT: pli r5, 244140625
4878 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
4879 ; CHECK-P10-NEXT: stbx r4, r3, r5
4880 ; CHECK-P10-NEXT: blr
4882 ; CHECK-PREP10-LABEL: st_align64_uint16_t_uint8_t:
4883 ; CHECK-PREP10: # %bb.0: # %entry
4884 ; CHECK-PREP10-NEXT: lis r5, 3725
4885 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
4886 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
4887 ; CHECK-PREP10-NEXT: stbx r4, r3, r5
4888 ; CHECK-PREP10-NEXT: blr
4890 %conv = trunc i16 %str to i8
4891 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
4892 store i8 %conv, ptr %add.ptr, align 1
4896 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4897 define dso_local void @st_reg_uint16_t_uint8_t(ptr nocapture %ptr, i64 %off, i16 zeroext %str) {
4898 ; CHECK-LABEL: st_reg_uint16_t_uint8_t:
4899 ; CHECK: # %bb.0: # %entry
4900 ; CHECK-NEXT: stbx r5, r3, r4
4903 %conv = trunc i16 %str to i8
4904 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
4905 store i8 %conv, ptr %add.ptr, align 1
4909 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4910 define dso_local void @st_or1_uint16_t_uint8_t(i64 %ptr, i8 zeroext %off, i16 zeroext %str) {
4911 ; CHECK-LABEL: st_or1_uint16_t_uint8_t:
4912 ; CHECK: # %bb.0: # %entry
4913 ; CHECK-NEXT: or r3, r4, r3
4914 ; CHECK-NEXT: stb r5, 0(r3)
4917 %conv = trunc i16 %str to i8
4918 %conv1 = zext i8 %off to i64
4919 %or = or i64 %conv1, %ptr
4920 %0 = inttoptr i64 %or to ptr
4921 store i8 %conv, ptr %0, align 1
4925 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4926 define dso_local void @st_not_disjoint16_uint16_t_uint8_t(i64 %ptr, i16 zeroext %str) {
4927 ; CHECK-LABEL: st_not_disjoint16_uint16_t_uint8_t:
4928 ; CHECK: # %bb.0: # %entry
4929 ; CHECK-NEXT: ori r3, r3, 6
4930 ; CHECK-NEXT: stb r4, 0(r3)
4933 %conv = trunc i16 %str to i8
4934 %or = or i64 %ptr, 6
4935 %0 = inttoptr i64 %or to ptr
4936 store i8 %conv, ptr %0, align 1
4940 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4941 define dso_local void @st_disjoint_align16_uint16_t_uint8_t(i64 %ptr, i16 zeroext %str) {
4942 ; CHECK-LABEL: st_disjoint_align16_uint16_t_uint8_t:
4943 ; CHECK: # %bb.0: # %entry
4944 ; CHECK-NEXT: rldicr r3, r3, 0, 51
4945 ; CHECK-NEXT: stb r4, 24(r3)
4948 %and = and i64 %ptr, -4096
4949 %conv = trunc i16 %str to i8
4950 %or = or i64 %and, 24
4951 %0 = inttoptr i64 %or to ptr
4952 store i8 %conv, ptr %0, align 8
4956 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4957 define dso_local void @st_not_disjoint32_uint16_t_uint8_t(i64 %ptr, i16 zeroext %str) {
4958 ; CHECK-LABEL: st_not_disjoint32_uint16_t_uint8_t:
4959 ; CHECK: # %bb.0: # %entry
4960 ; CHECK-NEXT: ori r3, r3, 34463
4961 ; CHECK-NEXT: oris r3, r3, 1
4962 ; CHECK-NEXT: stb r4, 0(r3)
4965 %conv = trunc i16 %str to i8
4966 %or = or i64 %ptr, 99999
4967 %0 = inttoptr i64 %or to ptr
4968 store i8 %conv, ptr %0, align 1
4972 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4973 define dso_local void @st_disjoint_align32_uint16_t_uint8_t(i64 %ptr, i16 zeroext %str) {
4974 ; CHECK-P10-LABEL: st_disjoint_align32_uint16_t_uint8_t:
4975 ; CHECK-P10: # %bb.0: # %entry
4976 ; CHECK-P10-NEXT: lis r5, -15264
4977 ; CHECK-P10-NEXT: and r3, r3, r5
4978 ; CHECK-P10-NEXT: pstb r4, 999990000(r3), 0
4979 ; CHECK-P10-NEXT: blr
4981 ; CHECK-PREP10-LABEL: st_disjoint_align32_uint16_t_uint8_t:
4982 ; CHECK-PREP10: # %bb.0: # %entry
4983 ; CHECK-PREP10-NEXT: lis r5, -15264
4984 ; CHECK-PREP10-NEXT: and r3, r3, r5
4985 ; CHECK-PREP10-NEXT: lis r5, 15258
4986 ; CHECK-PREP10-NEXT: ori r5, r5, 41712
4987 ; CHECK-PREP10-NEXT: stbx r4, r3, r5
4988 ; CHECK-PREP10-NEXT: blr
4990 %and = and i64 %ptr, -1000341504
4991 %conv = trunc i16 %str to i8
4992 %or = or i64 %and, 999990000
4993 %0 = inttoptr i64 %or to ptr
4994 store i8 %conv, ptr %0, align 16
4998 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
4999 define dso_local void @st_not_disjoint64_uint16_t_uint8_t(i64 %ptr, i16 zeroext %str) {
5000 ; CHECK-P10-LABEL: st_not_disjoint64_uint16_t_uint8_t:
5001 ; CHECK-P10: # %bb.0: # %entry
5002 ; CHECK-P10-NEXT: pli r5, 232
5003 ; CHECK-P10-NEXT: pli r6, 3567587329
5004 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
5005 ; CHECK-P10-NEXT: or r3, r3, r6
5006 ; CHECK-P10-NEXT: stb r4, 0(r3)
5007 ; CHECK-P10-NEXT: blr
5009 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint16_t_uint8_t:
5010 ; CHECK-PREP10: # %bb.0: # %entry
5011 ; CHECK-PREP10-NEXT: li r5, 29
5012 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
5013 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
5014 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
5015 ; CHECK-PREP10-NEXT: or r3, r3, r5
5016 ; CHECK-PREP10-NEXT: stb r4, 0(r3)
5017 ; CHECK-PREP10-NEXT: blr
5019 %conv = trunc i16 %str to i8
5020 %or = or i64 %ptr, 1000000000001
5021 %0 = inttoptr i64 %or to ptr
5022 store i8 %conv, ptr %0, align 1
5026 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5027 define dso_local void @st_disjoint_align64_uint16_t_uint8_t(i64 %ptr, i16 zeroext %str) {
5028 ; CHECK-P10-LABEL: st_disjoint_align64_uint16_t_uint8_t:
5029 ; CHECK-P10: # %bb.0: # %entry
5030 ; CHECK-P10-NEXT: pli r5, 244140625
5031 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
5032 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
5033 ; CHECK-P10-NEXT: stbx r4, r3, r5
5034 ; CHECK-P10-NEXT: blr
5036 ; CHECK-PREP10-LABEL: st_disjoint_align64_uint16_t_uint8_t:
5037 ; CHECK-PREP10: # %bb.0: # %entry
5038 ; CHECK-PREP10-NEXT: lis r5, 3725
5039 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
5040 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
5041 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
5042 ; CHECK-PREP10-NEXT: stbx r4, r3, r5
5043 ; CHECK-PREP10-NEXT: blr
5045 %and = and i64 %ptr, -1099511627776
5046 %conv = trunc i16 %str to i8
5047 %or = or i64 %and, 1000000000000
5048 %0 = inttoptr i64 %or to ptr
5049 store i8 %conv, ptr %0, align 4096
5053 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5054 define dso_local void @st_cst_align16_uint16_t_uint8_t(i16 zeroext %str) {
5055 ; CHECK-LABEL: st_cst_align16_uint16_t_uint8_t:
5056 ; CHECK: # %bb.0: # %entry
5057 ; CHECK-NEXT: stb r3, 4080(0)
5060 %conv = trunc i16 %str to i8
5061 store i8 %conv, ptr inttoptr (i64 4080 to ptr), align 16
5065 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5066 define dso_local void @st_cst_align32_uint16_t_uint8_t(i16 zeroext %str) {
5067 ; CHECK-LABEL: st_cst_align32_uint16_t_uint8_t:
5068 ; CHECK: # %bb.0: # %entry
5069 ; CHECK-NEXT: lis r4, 153
5070 ; CHECK-NEXT: stb r3, -27108(r4)
5073 %conv = trunc i16 %str to i8
5074 store i8 %conv, ptr inttoptr (i64 9999900 to ptr), align 4
5078 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5079 define dso_local void @st_cst_align64_uint16_t_uint8_t(i16 zeroext %str) {
5080 ; CHECK-P10-LABEL: st_cst_align64_uint16_t_uint8_t:
5081 ; CHECK-P10: # %bb.0: # %entry
5082 ; CHECK-P10-NEXT: pli r4, 244140625
5083 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5084 ; CHECK-P10-NEXT: stb r3, 0(r4)
5085 ; CHECK-P10-NEXT: blr
5087 ; CHECK-PREP10-LABEL: st_cst_align64_uint16_t_uint8_t:
5088 ; CHECK-PREP10: # %bb.0: # %entry
5089 ; CHECK-PREP10-NEXT: lis r4, 3725
5090 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
5091 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
5092 ; CHECK-PREP10-NEXT: stb r3, 0(r4)
5093 ; CHECK-PREP10-NEXT: blr
5095 %conv = trunc i16 %str to i8
5096 store i8 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
5100 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5101 define dso_local void @st_0_uint16_t_uint16_t(i64 %ptr, i16 zeroext %str) {
5102 ; CHECK-LABEL: st_0_uint16_t_uint16_t:
5103 ; CHECK: # %bb.0: # %entry
5104 ; CHECK-NEXT: sth r4, 0(r3)
5107 %0 = inttoptr i64 %ptr to ptr
5108 store i16 %str, ptr %0, align 2
5112 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5113 define dso_local void @st_align16_uint16_t_uint16_t(ptr nocapture %ptr, i16 zeroext %str) {
5114 ; CHECK-LABEL: st_align16_uint16_t_uint16_t:
5115 ; CHECK: # %bb.0: # %entry
5116 ; CHECK-NEXT: sth r4, 8(r3)
5119 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
5120 store i16 %str, ptr %add.ptr, align 2
5124 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5125 define dso_local void @st_align32_uint16_t_uint16_t(ptr nocapture %ptr, i16 zeroext %str) {
5126 ; CHECK-P10-LABEL: st_align32_uint16_t_uint16_t:
5127 ; CHECK-P10: # %bb.0: # %entry
5128 ; CHECK-P10-NEXT: psth r4, 99999000(r3), 0
5129 ; CHECK-P10-NEXT: blr
5131 ; CHECK-PREP10-LABEL: st_align32_uint16_t_uint16_t:
5132 ; CHECK-PREP10: # %bb.0: # %entry
5133 ; CHECK-PREP10-NEXT: lis r5, 1525
5134 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
5135 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
5136 ; CHECK-PREP10-NEXT: blr
5138 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
5139 store i16 %str, ptr %add.ptr, align 2
5143 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5144 define dso_local void @st_align64_uint16_t_uint16_t(ptr nocapture %ptr, i16 zeroext %str) {
5145 ; CHECK-P10-LABEL: st_align64_uint16_t_uint16_t:
5146 ; CHECK-P10: # %bb.0: # %entry
5147 ; CHECK-P10-NEXT: pli r5, 244140625
5148 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
5149 ; CHECK-P10-NEXT: sthx r4, r3, r5
5150 ; CHECK-P10-NEXT: blr
5152 ; CHECK-PREP10-LABEL: st_align64_uint16_t_uint16_t:
5153 ; CHECK-PREP10: # %bb.0: # %entry
5154 ; CHECK-PREP10-NEXT: lis r5, 3725
5155 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
5156 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
5157 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
5158 ; CHECK-PREP10-NEXT: blr
5160 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
5161 store i16 %str, ptr %add.ptr, align 2
5165 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5166 define dso_local void @st_reg_uint16_t_uint16_t(ptr nocapture %ptr, i64 %off, i16 zeroext %str) {
5167 ; CHECK-LABEL: st_reg_uint16_t_uint16_t:
5168 ; CHECK: # %bb.0: # %entry
5169 ; CHECK-NEXT: sthx r5, r3, r4
5172 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
5173 store i16 %str, ptr %add.ptr, align 2
5177 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5178 define dso_local void @st_or1_uint16_t_uint16_t(i64 %ptr, i8 zeroext %off, i16 zeroext %str) {
5179 ; CHECK-LABEL: st_or1_uint16_t_uint16_t:
5180 ; CHECK: # %bb.0: # %entry
5181 ; CHECK-NEXT: or r3, r4, r3
5182 ; CHECK-NEXT: sth r5, 0(r3)
5185 %conv = zext i8 %off to i64
5186 %or = or i64 %conv, %ptr
5187 %0 = inttoptr i64 %or to ptr
5188 store i16 %str, ptr %0, align 2
5192 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5193 define dso_local void @st_not_disjoint16_uint16_t_uint16_t(i64 %ptr, i16 zeroext %str) {
5194 ; CHECK-LABEL: st_not_disjoint16_uint16_t_uint16_t:
5195 ; CHECK: # %bb.0: # %entry
5196 ; CHECK-NEXT: ori r3, r3, 6
5197 ; CHECK-NEXT: sth r4, 0(r3)
5200 %or = or i64 %ptr, 6
5201 %0 = inttoptr i64 %or to ptr
5202 store i16 %str, ptr %0, align 2
5206 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5207 define dso_local void @st_disjoint_align16_uint16_t_uint16_t(i64 %ptr, i16 zeroext %str) {
5208 ; CHECK-LABEL: st_disjoint_align16_uint16_t_uint16_t:
5209 ; CHECK: # %bb.0: # %entry
5210 ; CHECK-NEXT: rldicr r3, r3, 0, 51
5211 ; CHECK-NEXT: sth r4, 24(r3)
5214 %and = and i64 %ptr, -4096
5215 %or = or i64 %and, 24
5216 %0 = inttoptr i64 %or to ptr
5217 store i16 %str, ptr %0, align 8
5221 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5222 define dso_local void @st_not_disjoint32_uint16_t_uint16_t(i64 %ptr, i16 zeroext %str) {
5223 ; CHECK-LABEL: st_not_disjoint32_uint16_t_uint16_t:
5224 ; CHECK: # %bb.0: # %entry
5225 ; CHECK-NEXT: ori r3, r3, 34463
5226 ; CHECK-NEXT: oris r3, r3, 1
5227 ; CHECK-NEXT: sth r4, 0(r3)
5230 %or = or i64 %ptr, 99999
5231 %0 = inttoptr i64 %or to ptr
5232 store i16 %str, ptr %0, align 2
5236 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5237 define dso_local void @st_disjoint_align32_uint16_t_uint16_t(i64 %ptr, i16 zeroext %str) {
5238 ; CHECK-P10-LABEL: st_disjoint_align32_uint16_t_uint16_t:
5239 ; CHECK-P10: # %bb.0: # %entry
5240 ; CHECK-P10-NEXT: lis r5, -15264
5241 ; CHECK-P10-NEXT: and r3, r3, r5
5242 ; CHECK-P10-NEXT: psth r4, 999990000(r3), 0
5243 ; CHECK-P10-NEXT: blr
5245 ; CHECK-PREP10-LABEL: st_disjoint_align32_uint16_t_uint16_t:
5246 ; CHECK-PREP10: # %bb.0: # %entry
5247 ; CHECK-PREP10-NEXT: lis r5, -15264
5248 ; CHECK-PREP10-NEXT: and r3, r3, r5
5249 ; CHECK-PREP10-NEXT: lis r5, 15258
5250 ; CHECK-PREP10-NEXT: ori r5, r5, 41712
5251 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
5252 ; CHECK-PREP10-NEXT: blr
5254 %and = and i64 %ptr, -1000341504
5255 %or = or i64 %and, 999990000
5256 %0 = inttoptr i64 %or to ptr
5257 store i16 %str, ptr %0, align 16
5261 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5262 define dso_local void @st_not_disjoint64_uint16_t_uint16_t(i64 %ptr, i16 zeroext %str) {
5263 ; CHECK-P10-LABEL: st_not_disjoint64_uint16_t_uint16_t:
5264 ; CHECK-P10: # %bb.0: # %entry
5265 ; CHECK-P10-NEXT: pli r5, 232
5266 ; CHECK-P10-NEXT: pli r6, 3567587329
5267 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
5268 ; CHECK-P10-NEXT: or r3, r3, r6
5269 ; CHECK-P10-NEXT: sth r4, 0(r3)
5270 ; CHECK-P10-NEXT: blr
5272 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint16_t_uint16_t:
5273 ; CHECK-PREP10: # %bb.0: # %entry
5274 ; CHECK-PREP10-NEXT: li r5, 29
5275 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
5276 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
5277 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
5278 ; CHECK-PREP10-NEXT: or r3, r3, r5
5279 ; CHECK-PREP10-NEXT: sth r4, 0(r3)
5280 ; CHECK-PREP10-NEXT: blr
5282 %or = or i64 %ptr, 1000000000001
5283 %0 = inttoptr i64 %or to ptr
5284 store i16 %str, ptr %0, align 2
5288 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5289 define dso_local void @st_disjoint_align64_uint16_t_uint16_t(i64 %ptr, i16 zeroext %str) {
5290 ; CHECK-P10-LABEL: st_disjoint_align64_uint16_t_uint16_t:
5291 ; CHECK-P10: # %bb.0: # %entry
5292 ; CHECK-P10-NEXT: pli r5, 244140625
5293 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
5294 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
5295 ; CHECK-P10-NEXT: sthx r4, r3, r5
5296 ; CHECK-P10-NEXT: blr
5298 ; CHECK-PREP10-LABEL: st_disjoint_align64_uint16_t_uint16_t:
5299 ; CHECK-PREP10: # %bb.0: # %entry
5300 ; CHECK-PREP10-NEXT: lis r5, 3725
5301 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
5302 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
5303 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
5304 ; CHECK-PREP10-NEXT: sthx r4, r3, r5
5305 ; CHECK-PREP10-NEXT: blr
5307 %and = and i64 %ptr, -1099511627776
5308 %or = or i64 %and, 1000000000000
5309 %0 = inttoptr i64 %or to ptr
5310 store i16 %str, ptr %0, align 4096
5314 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5315 define dso_local void @st_cst_align16_uint16_t_uint16_t(i16 zeroext %str) {
5316 ; CHECK-LABEL: st_cst_align16_uint16_t_uint16_t:
5317 ; CHECK: # %bb.0: # %entry
5318 ; CHECK-NEXT: sth r3, 4080(0)
5321 store i16 %str, ptr inttoptr (i64 4080 to ptr), align 16
5325 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5326 define dso_local void @st_cst_align32_uint16_t_uint16_t(i16 zeroext %str) {
5327 ; CHECK-LABEL: st_cst_align32_uint16_t_uint16_t:
5328 ; CHECK: # %bb.0: # %entry
5329 ; CHECK-NEXT: lis r4, 153
5330 ; CHECK-NEXT: sth r3, -27108(r4)
5333 store i16 %str, ptr inttoptr (i64 9999900 to ptr), align 4
5337 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5338 define dso_local void @st_cst_align64_uint16_t_uint16_t(i16 zeroext %str) {
5339 ; CHECK-P10-LABEL: st_cst_align64_uint16_t_uint16_t:
5340 ; CHECK-P10: # %bb.0: # %entry
5341 ; CHECK-P10-NEXT: pli r4, 244140625
5342 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5343 ; CHECK-P10-NEXT: sth r3, 0(r4)
5344 ; CHECK-P10-NEXT: blr
5346 ; CHECK-PREP10-LABEL: st_cst_align64_uint16_t_uint16_t:
5347 ; CHECK-PREP10: # %bb.0: # %entry
5348 ; CHECK-PREP10-NEXT: lis r4, 3725
5349 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
5350 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
5351 ; CHECK-PREP10-NEXT: sth r3, 0(r4)
5352 ; CHECK-PREP10-NEXT: blr
5354 store i16 %str, ptr inttoptr (i64 1000000000000 to ptr), align 4096
5358 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5359 define dso_local void @st_0_uint16_t_uint32_t(i64 %ptr, i16 zeroext %str) {
5360 ; CHECK-LABEL: st_0_uint16_t_uint32_t:
5361 ; CHECK: # %bb.0: # %entry
5362 ; CHECK-NEXT: stw r4, 0(r3)
5365 %conv = zext i16 %str to i32
5366 %0 = inttoptr i64 %ptr to ptr
5367 store i32 %conv, ptr %0, align 4
5371 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5372 define dso_local void @st_align16_uint16_t_uint32_t(ptr nocapture %ptr, i16 zeroext %str) {
5373 ; CHECK-LABEL: st_align16_uint16_t_uint32_t:
5374 ; CHECK: # %bb.0: # %entry
5375 ; CHECK-NEXT: stw r4, 8(r3)
5378 %conv = zext i16 %str to i32
5379 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
5380 store i32 %conv, ptr %add.ptr, align 4
5384 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5385 define dso_local void @st_align32_uint16_t_uint32_t(ptr nocapture %ptr, i16 zeroext %str) {
5386 ; CHECK-P10-LABEL: st_align32_uint16_t_uint32_t:
5387 ; CHECK-P10: # %bb.0: # %entry
5388 ; CHECK-P10-NEXT: pstw r4, 99999000(r3), 0
5389 ; CHECK-P10-NEXT: blr
5391 ; CHECK-PREP10-LABEL: st_align32_uint16_t_uint32_t:
5392 ; CHECK-PREP10: # %bb.0: # %entry
5393 ; CHECK-PREP10-NEXT: lis r5, 1525
5394 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
5395 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
5396 ; CHECK-PREP10-NEXT: blr
5398 %conv = zext i16 %str to i32
5399 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
5400 store i32 %conv, ptr %add.ptr, align 4
5404 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5405 define dso_local void @st_align64_uint16_t_uint32_t(ptr nocapture %ptr, i16 zeroext %str) {
5406 ; CHECK-P10-LABEL: st_align64_uint16_t_uint32_t:
5407 ; CHECK-P10: # %bb.0: # %entry
5408 ; CHECK-P10-NEXT: pli r5, 244140625
5409 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
5410 ; CHECK-P10-NEXT: stwx r4, r3, r5
5411 ; CHECK-P10-NEXT: blr
5413 ; CHECK-PREP10-LABEL: st_align64_uint16_t_uint32_t:
5414 ; CHECK-PREP10: # %bb.0: # %entry
5415 ; CHECK-PREP10-NEXT: lis r5, 3725
5416 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
5417 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
5418 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
5419 ; CHECK-PREP10-NEXT: blr
5421 %conv = zext i16 %str to i32
5422 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
5423 store i32 %conv, ptr %add.ptr, align 4
5427 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5428 define dso_local void @st_reg_uint16_t_uint32_t(ptr nocapture %ptr, i64 %off, i16 zeroext %str) {
5429 ; CHECK-LABEL: st_reg_uint16_t_uint32_t:
5430 ; CHECK: # %bb.0: # %entry
5431 ; CHECK-NEXT: stwx r5, r3, r4
5434 %conv = zext i16 %str to i32
5435 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
5436 store i32 %conv, ptr %add.ptr, align 4
5440 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5441 define dso_local void @st_or1_uint16_t_uint32_t(i64 %ptr, i8 zeroext %off, i16 zeroext %str) {
5442 ; CHECK-LABEL: st_or1_uint16_t_uint32_t:
5443 ; CHECK: # %bb.0: # %entry
5444 ; CHECK-NEXT: or r3, r4, r3
5445 ; CHECK-NEXT: stw r5, 0(r3)
5448 %conv = zext i16 %str to i32
5449 %conv1 = zext i8 %off to i64
5450 %or = or i64 %conv1, %ptr
5451 %0 = inttoptr i64 %or to ptr
5452 store i32 %conv, ptr %0, align 4
5456 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5457 define dso_local void @st_not_disjoint16_uint16_t_uint32_t(i64 %ptr, i16 zeroext %str) {
5458 ; CHECK-LABEL: st_not_disjoint16_uint16_t_uint32_t:
5459 ; CHECK: # %bb.0: # %entry
5460 ; CHECK-NEXT: ori r3, r3, 6
5461 ; CHECK-NEXT: stw r4, 0(r3)
5464 %conv = zext i16 %str to i32
5465 %or = or i64 %ptr, 6
5466 %0 = inttoptr i64 %or to ptr
5467 store i32 %conv, ptr %0, align 4
5471 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5472 define dso_local void @st_disjoint_align16_uint16_t_uint32_t(i64 %ptr, i16 zeroext %str) {
5473 ; CHECK-LABEL: st_disjoint_align16_uint16_t_uint32_t:
5474 ; CHECK: # %bb.0: # %entry
5475 ; CHECK-NEXT: rldicr r3, r3, 0, 51
5476 ; CHECK-NEXT: stw r4, 24(r3)
5479 %and = and i64 %ptr, -4096
5480 %conv = zext i16 %str to i32
5481 %or = or i64 %and, 24
5482 %0 = inttoptr i64 %or to ptr
5483 store i32 %conv, ptr %0, align 8
5487 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5488 define dso_local void @st_not_disjoint32_uint16_t_uint32_t(i64 %ptr, i16 zeroext %str) {
5489 ; CHECK-LABEL: st_not_disjoint32_uint16_t_uint32_t:
5490 ; CHECK: # %bb.0: # %entry
5491 ; CHECK-NEXT: ori r3, r3, 34463
5492 ; CHECK-NEXT: oris r3, r3, 1
5493 ; CHECK-NEXT: stw r4, 0(r3)
5496 %conv = zext i16 %str to i32
5497 %or = or i64 %ptr, 99999
5498 %0 = inttoptr i64 %or to ptr
5499 store i32 %conv, ptr %0, align 4
5503 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5504 define dso_local void @st_disjoint_align32_uint16_t_uint32_t(i64 %ptr, i16 zeroext %str) {
5505 ; CHECK-P10-LABEL: st_disjoint_align32_uint16_t_uint32_t:
5506 ; CHECK-P10: # %bb.0: # %entry
5507 ; CHECK-P10-NEXT: lis r5, -15264
5508 ; CHECK-P10-NEXT: and r3, r3, r5
5509 ; CHECK-P10-NEXT: pstw r4, 999990000(r3), 0
5510 ; CHECK-P10-NEXT: blr
5512 ; CHECK-PREP10-LABEL: st_disjoint_align32_uint16_t_uint32_t:
5513 ; CHECK-PREP10: # %bb.0: # %entry
5514 ; CHECK-PREP10-NEXT: lis r5, -15264
5515 ; CHECK-PREP10-NEXT: and r3, r3, r5
5516 ; CHECK-PREP10-NEXT: lis r5, 15258
5517 ; CHECK-PREP10-NEXT: ori r5, r5, 41712
5518 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
5519 ; CHECK-PREP10-NEXT: blr
5521 %and = and i64 %ptr, -1000341504
5522 %conv = zext i16 %str to i32
5523 %or = or i64 %and, 999990000
5524 %0 = inttoptr i64 %or to ptr
5525 store i32 %conv, ptr %0, align 16
5529 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5530 define dso_local void @st_not_disjoint64_uint16_t_uint32_t(i64 %ptr, i16 zeroext %str) {
5531 ; CHECK-P10-LABEL: st_not_disjoint64_uint16_t_uint32_t:
5532 ; CHECK-P10: # %bb.0: # %entry
5533 ; CHECK-P10-NEXT: pli r5, 232
5534 ; CHECK-P10-NEXT: pli r6, 3567587329
5535 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
5536 ; CHECK-P10-NEXT: or r3, r3, r6
5537 ; CHECK-P10-NEXT: stw r4, 0(r3)
5538 ; CHECK-P10-NEXT: blr
5540 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint16_t_uint32_t:
5541 ; CHECK-PREP10: # %bb.0: # %entry
5542 ; CHECK-PREP10-NEXT: li r5, 29
5543 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
5544 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
5545 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
5546 ; CHECK-PREP10-NEXT: or r3, r3, r5
5547 ; CHECK-PREP10-NEXT: stw r4, 0(r3)
5548 ; CHECK-PREP10-NEXT: blr
5550 %conv = zext i16 %str to i32
5551 %or = or i64 %ptr, 1000000000001
5552 %0 = inttoptr i64 %or to ptr
5553 store i32 %conv, ptr %0, align 4
5557 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5558 define dso_local void @st_disjoint_align64_uint16_t_uint32_t(i64 %ptr, i16 zeroext %str) {
5559 ; CHECK-P10-LABEL: st_disjoint_align64_uint16_t_uint32_t:
5560 ; CHECK-P10: # %bb.0: # %entry
5561 ; CHECK-P10-NEXT: pli r5, 244140625
5562 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
5563 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
5564 ; CHECK-P10-NEXT: stwx r4, r3, r5
5565 ; CHECK-P10-NEXT: blr
5567 ; CHECK-PREP10-LABEL: st_disjoint_align64_uint16_t_uint32_t:
5568 ; CHECK-PREP10: # %bb.0: # %entry
5569 ; CHECK-PREP10-NEXT: lis r5, 3725
5570 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
5571 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
5572 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
5573 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
5574 ; CHECK-PREP10-NEXT: blr
5576 %and = and i64 %ptr, -1099511627776
5577 %conv = zext i16 %str to i32
5578 %or = or i64 %and, 1000000000000
5579 %0 = inttoptr i64 %or to ptr
5580 store i32 %conv, ptr %0, align 4096
5584 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5585 define dso_local void @st_cst_align16_uint16_t_uint32_t(i16 zeroext %str) {
5586 ; CHECK-LABEL: st_cst_align16_uint16_t_uint32_t:
5587 ; CHECK: # %bb.0: # %entry
5588 ; CHECK-NEXT: stw r3, 4080(0)
5591 %conv = zext i16 %str to i32
5592 store i32 %conv, ptr inttoptr (i64 4080 to ptr), align 16
5596 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5597 define dso_local void @st_cst_align32_uint16_t_uint32_t(i16 zeroext %str) {
5598 ; CHECK-LABEL: st_cst_align32_uint16_t_uint32_t:
5599 ; CHECK: # %bb.0: # %entry
5600 ; CHECK-NEXT: lis r4, 153
5601 ; CHECK-NEXT: stw r3, -27108(r4)
5604 %conv = zext i16 %str to i32
5605 store i32 %conv, ptr inttoptr (i64 9999900 to ptr), align 4
5609 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5610 define dso_local void @st_cst_align64_uint16_t_uint32_t(i16 zeroext %str) {
5611 ; CHECK-P10-LABEL: st_cst_align64_uint16_t_uint32_t:
5612 ; CHECK-P10: # %bb.0: # %entry
5613 ; CHECK-P10-NEXT: pli r4, 244140625
5614 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5615 ; CHECK-P10-NEXT: stw r3, 0(r4)
5616 ; CHECK-P10-NEXT: blr
5618 ; CHECK-PREP10-LABEL: st_cst_align64_uint16_t_uint32_t:
5619 ; CHECK-PREP10: # %bb.0: # %entry
5620 ; CHECK-PREP10-NEXT: lis r4, 3725
5621 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
5622 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
5623 ; CHECK-PREP10-NEXT: stw r3, 0(r4)
5624 ; CHECK-PREP10-NEXT: blr
5626 %conv = zext i16 %str to i32
5627 store i32 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
5631 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5632 define dso_local void @st_0_uint16_t_uint64_t(i64 %ptr, i16 zeroext %str) {
5633 ; CHECK-LABEL: st_0_uint16_t_uint64_t:
5634 ; CHECK: # %bb.0: # %entry
5635 ; CHECK-NEXT: std r4, 0(r3)
5638 %conv = zext i16 %str to i64
5639 %0 = inttoptr i64 %ptr to ptr
5640 store i64 %conv, ptr %0, align 8
5644 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5645 define dso_local void @st_align16_uint16_t_uint64_t(ptr nocapture %ptr, i16 zeroext %str) {
5646 ; CHECK-LABEL: st_align16_uint16_t_uint64_t:
5647 ; CHECK: # %bb.0: # %entry
5648 ; CHECK-NEXT: std r4, 8(r3)
5651 %conv = zext i16 %str to i64
5652 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
5653 store i64 %conv, ptr %add.ptr, align 8
5657 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5658 define dso_local void @st_align32_uint16_t_uint64_t(ptr nocapture %ptr, i16 zeroext %str) {
5659 ; CHECK-P10-LABEL: st_align32_uint16_t_uint64_t:
5660 ; CHECK-P10: # %bb.0: # %entry
5661 ; CHECK-P10-NEXT: pstd r4, 99999000(r3), 0
5662 ; CHECK-P10-NEXT: blr
5664 ; CHECK-PREP10-LABEL: st_align32_uint16_t_uint64_t:
5665 ; CHECK-PREP10: # %bb.0: # %entry
5666 ; CHECK-PREP10-NEXT: lis r5, 1525
5667 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
5668 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
5669 ; CHECK-PREP10-NEXT: blr
5671 %conv = zext i16 %str to i64
5672 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
5673 store i64 %conv, ptr %add.ptr, align 8
5677 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5678 define dso_local void @st_align64_uint16_t_uint64_t(ptr nocapture %ptr, i16 zeroext %str) {
5679 ; CHECK-P10-LABEL: st_align64_uint16_t_uint64_t:
5680 ; CHECK-P10: # %bb.0: # %entry
5681 ; CHECK-P10-NEXT: pli r5, 244140625
5682 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
5683 ; CHECK-P10-NEXT: stdx r4, r3, r5
5684 ; CHECK-P10-NEXT: blr
5686 ; CHECK-PREP10-LABEL: st_align64_uint16_t_uint64_t:
5687 ; CHECK-PREP10: # %bb.0: # %entry
5688 ; CHECK-PREP10-NEXT: lis r5, 3725
5689 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
5690 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
5691 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
5692 ; CHECK-PREP10-NEXT: blr
5694 %conv = zext i16 %str to i64
5695 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
5696 store i64 %conv, ptr %add.ptr, align 8
5700 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5701 define dso_local void @st_reg_uint16_t_uint64_t(ptr nocapture %ptr, i64 %off, i16 zeroext %str) {
5702 ; CHECK-LABEL: st_reg_uint16_t_uint64_t:
5703 ; CHECK: # %bb.0: # %entry
5704 ; CHECK-NEXT: stdx r5, r3, r4
5707 %conv = zext i16 %str to i64
5708 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
5709 store i64 %conv, ptr %add.ptr, align 8
5713 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5714 define dso_local void @st_or1_uint16_t_uint64_t(i64 %ptr, i8 zeroext %off, i16 zeroext %str) {
5715 ; CHECK-LABEL: st_or1_uint16_t_uint64_t:
5716 ; CHECK: # %bb.0: # %entry
5717 ; CHECK-NEXT: or r3, r4, r3
5718 ; CHECK-NEXT: std r5, 0(r3)
5721 %conv = zext i16 %str to i64
5722 %conv1 = zext i8 %off to i64
5723 %or = or i64 %conv1, %ptr
5724 %0 = inttoptr i64 %or to ptr
5725 store i64 %conv, ptr %0, align 8
5729 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5730 define dso_local void @st_not_disjoint16_uint16_t_uint64_t(i64 %ptr, i16 zeroext %str) {
5731 ; CHECK-LABEL: st_not_disjoint16_uint16_t_uint64_t:
5732 ; CHECK: # %bb.0: # %entry
5733 ; CHECK-NEXT: ori r3, r3, 6
5734 ; CHECK-NEXT: std r4, 0(r3)
5737 %conv = zext i16 %str to i64
5738 %or = or i64 %ptr, 6
5739 %0 = inttoptr i64 %or to ptr
5740 store i64 %conv, ptr %0, align 8
5744 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5745 define dso_local void @st_disjoint_align16_uint16_t_uint64_t(i64 %ptr, i16 zeroext %str) {
5746 ; CHECK-LABEL: st_disjoint_align16_uint16_t_uint64_t:
5747 ; CHECK: # %bb.0: # %entry
5748 ; CHECK-NEXT: rldicr r3, r3, 0, 51
5749 ; CHECK-NEXT: std r4, 24(r3)
5752 %and = and i64 %ptr, -4096
5753 %conv = zext i16 %str to i64
5754 %or = or i64 %and, 24
5755 %0 = inttoptr i64 %or to ptr
5756 store i64 %conv, ptr %0, align 8
5760 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5761 define dso_local void @st_not_disjoint32_uint16_t_uint64_t(i64 %ptr, i16 zeroext %str) {
5762 ; CHECK-LABEL: st_not_disjoint32_uint16_t_uint64_t:
5763 ; CHECK: # %bb.0: # %entry
5764 ; CHECK-NEXT: ori r3, r3, 34463
5765 ; CHECK-NEXT: oris r3, r3, 1
5766 ; CHECK-NEXT: std r4, 0(r3)
5769 %conv = zext i16 %str to i64
5770 %or = or i64 %ptr, 99999
5771 %0 = inttoptr i64 %or to ptr
5772 store i64 %conv, ptr %0, align 8
5776 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5777 define dso_local void @st_disjoint_align32_uint16_t_uint64_t(i64 %ptr, i16 zeroext %str) {
5778 ; CHECK-P10-LABEL: st_disjoint_align32_uint16_t_uint64_t:
5779 ; CHECK-P10: # %bb.0: # %entry
5780 ; CHECK-P10-NEXT: lis r5, -15264
5781 ; CHECK-P10-NEXT: and r3, r3, r5
5782 ; CHECK-P10-NEXT: pstd r4, 999990000(r3), 0
5783 ; CHECK-P10-NEXT: blr
5785 ; CHECK-PREP10-LABEL: st_disjoint_align32_uint16_t_uint64_t:
5786 ; CHECK-PREP10: # %bb.0: # %entry
5787 ; CHECK-PREP10-NEXT: lis r5, -15264
5788 ; CHECK-PREP10-NEXT: and r3, r3, r5
5789 ; CHECK-PREP10-NEXT: lis r5, 15258
5790 ; CHECK-PREP10-NEXT: ori r5, r5, 41712
5791 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
5792 ; CHECK-PREP10-NEXT: blr
5794 %and = and i64 %ptr, -1000341504
5795 %conv = zext i16 %str to i64
5796 %or = or i64 %and, 999990000
5797 %0 = inttoptr i64 %or to ptr
5798 store i64 %conv, ptr %0, align 16
5802 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5803 define dso_local void @st_not_disjoint64_uint16_t_uint64_t(i64 %ptr, i16 zeroext %str) {
5804 ; CHECK-P10-LABEL: st_not_disjoint64_uint16_t_uint64_t:
5805 ; CHECK-P10: # %bb.0: # %entry
5806 ; CHECK-P10-NEXT: pli r5, 232
5807 ; CHECK-P10-NEXT: pli r6, 3567587329
5808 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
5809 ; CHECK-P10-NEXT: or r3, r3, r6
5810 ; CHECK-P10-NEXT: std r4, 0(r3)
5811 ; CHECK-P10-NEXT: blr
5813 ; CHECK-PREP10-LABEL: st_not_disjoint64_uint16_t_uint64_t:
5814 ; CHECK-PREP10: # %bb.0: # %entry
5815 ; CHECK-PREP10-NEXT: li r5, 29
5816 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
5817 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
5818 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
5819 ; CHECK-PREP10-NEXT: or r3, r3, r5
5820 ; CHECK-PREP10-NEXT: std r4, 0(r3)
5821 ; CHECK-PREP10-NEXT: blr
5823 %conv = zext i16 %str to i64
5824 %or = or i64 %ptr, 1000000000001
5825 %0 = inttoptr i64 %or to ptr
5826 store i64 %conv, ptr %0, align 8
5830 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5831 define dso_local void @st_disjoint_align64_uint16_t_uint64_t(i64 %ptr, i16 zeroext %str) {
5832 ; CHECK-P10-LABEL: st_disjoint_align64_uint16_t_uint64_t:
5833 ; CHECK-P10: # %bb.0: # %entry
5834 ; CHECK-P10-NEXT: pli r5, 244140625
5835 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
5836 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
5837 ; CHECK-P10-NEXT: stdx r4, r3, r5
5838 ; CHECK-P10-NEXT: blr
5840 ; CHECK-PREP10-LABEL: st_disjoint_align64_uint16_t_uint64_t:
5841 ; CHECK-PREP10: # %bb.0: # %entry
5842 ; CHECK-PREP10-NEXT: lis r5, 3725
5843 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
5844 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
5845 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
5846 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
5847 ; CHECK-PREP10-NEXT: blr
5849 %and = and i64 %ptr, -1099511627776
5850 %conv = zext i16 %str to i64
5851 %or = or i64 %and, 1000000000000
5852 %0 = inttoptr i64 %or to ptr
5853 store i64 %conv, ptr %0, align 4096
5857 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5858 define dso_local void @st_cst_align16_uint16_t_uint64_t(i16 zeroext %str) {
5859 ; CHECK-LABEL: st_cst_align16_uint16_t_uint64_t:
5860 ; CHECK: # %bb.0: # %entry
5861 ; CHECK-NEXT: std r3, 4080(0)
5864 %conv = zext i16 %str to i64
5865 store i64 %conv, ptr inttoptr (i64 4080 to ptr), align 16
5869 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5870 define dso_local void @st_cst_align32_uint16_t_uint64_t(i16 zeroext %str) {
5871 ; CHECK-LABEL: st_cst_align32_uint16_t_uint64_t:
5872 ; CHECK: # %bb.0: # %entry
5873 ; CHECK-NEXT: lis r4, 153
5874 ; CHECK-NEXT: std r3, -27108(r4)
5877 %conv = zext i16 %str to i64
5878 store i64 %conv, ptr inttoptr (i64 9999900 to ptr), align 8
5882 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5883 define dso_local void @st_cst_align64_uint16_t_uint64_t(i16 zeroext %str) {
5884 ; CHECK-P10-LABEL: st_cst_align64_uint16_t_uint64_t:
5885 ; CHECK-P10: # %bb.0: # %entry
5886 ; CHECK-P10-NEXT: pli r4, 244140625
5887 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5888 ; CHECK-P10-NEXT: std r3, 0(r4)
5889 ; CHECK-P10-NEXT: blr
5891 ; CHECK-PREP10-LABEL: st_cst_align64_uint16_t_uint64_t:
5892 ; CHECK-PREP10: # %bb.0: # %entry
5893 ; CHECK-PREP10-NEXT: lis r4, 3725
5894 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
5895 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
5896 ; CHECK-PREP10-NEXT: std r3, 0(r4)
5897 ; CHECK-PREP10-NEXT: blr
5899 %conv = zext i16 %str to i64
5900 store i64 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
5904 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5905 define dso_local void @st_0_uint16_t_float(i64 %ptr, i16 zeroext %str) {
5906 ; CHECK-LABEL: st_0_uint16_t_float:
5907 ; CHECK: # %bb.0: # %entry
5908 ; CHECK-NEXT: mtfprwz f0, r4
5909 ; CHECK-NEXT: xscvuxdsp f0, f0
5910 ; CHECK-NEXT: stfs f0, 0(r3)
5913 %conv = uitofp i16 %str to float
5914 %0 = inttoptr i64 %ptr to ptr
5915 store float %conv, ptr %0, align 4
5919 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5920 define dso_local void @st_align16_uint16_t_float(ptr nocapture %ptr, i16 zeroext %str) {
5921 ; CHECK-LABEL: st_align16_uint16_t_float:
5922 ; CHECK: # %bb.0: # %entry
5923 ; CHECK-NEXT: mtfprwz f0, r4
5924 ; CHECK-NEXT: xscvuxdsp f0, f0
5925 ; CHECK-NEXT: stfs f0, 8(r3)
5928 %conv = uitofp i16 %str to float
5929 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
5930 store float %conv, ptr %add.ptr, align 4
5934 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5935 define dso_local void @st_align32_uint16_t_float(ptr nocapture %ptr, i16 zeroext %str) {
5936 ; CHECK-P10-LABEL: st_align32_uint16_t_float:
5937 ; CHECK-P10: # %bb.0: # %entry
5938 ; CHECK-P10-NEXT: mtfprwz f0, r4
5939 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
5940 ; CHECK-P10-NEXT: pstfs f0, 99999000(r3), 0
5941 ; CHECK-P10-NEXT: blr
5943 ; CHECK-P9-LABEL: st_align32_uint16_t_float:
5944 ; CHECK-P9: # %bb.0: # %entry
5945 ; CHECK-P9-NEXT: mtfprwz f0, r4
5946 ; CHECK-P9-NEXT: lis r4, 1525
5947 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
5948 ; CHECK-P9-NEXT: ori r4, r4, 56600
5949 ; CHECK-P9-NEXT: stfsx f0, r3, r4
5950 ; CHECK-P9-NEXT: blr
5952 ; CHECK-P8-LABEL: st_align32_uint16_t_float:
5953 ; CHECK-P8: # %bb.0: # %entry
5954 ; CHECK-P8-NEXT: mtfprwz f0, r4
5955 ; CHECK-P8-NEXT: lis r4, 1525
5956 ; CHECK-P8-NEXT: ori r4, r4, 56600
5957 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
5958 ; CHECK-P8-NEXT: stfsx f0, r3, r4
5959 ; CHECK-P8-NEXT: blr
5961 %conv = uitofp i16 %str to float
5962 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
5963 store float %conv, ptr %add.ptr, align 4
5967 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
5968 define dso_local void @st_align64_uint16_t_float(ptr nocapture %ptr, i16 zeroext %str) {
5969 ; CHECK-P10-LABEL: st_align64_uint16_t_float:
5970 ; CHECK-P10: # %bb.0: # %entry
5971 ; CHECK-P10-NEXT: mtfprwz f0, r4
5972 ; CHECK-P10-NEXT: pli r4, 244140625
5973 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
5974 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
5975 ; CHECK-P10-NEXT: stfsx f0, r3, r4
5976 ; CHECK-P10-NEXT: blr
5978 ; CHECK-P9-LABEL: st_align64_uint16_t_float:
5979 ; CHECK-P9: # %bb.0: # %entry
5980 ; CHECK-P9-NEXT: mtfprwz f0, r4
5981 ; CHECK-P9-NEXT: lis r4, 3725
5982 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
5983 ; CHECK-P9-NEXT: ori r4, r4, 19025
5984 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
5985 ; CHECK-P9-NEXT: stfsx f0, r3, r4
5986 ; CHECK-P9-NEXT: blr
5988 ; CHECK-P8-LABEL: st_align64_uint16_t_float:
5989 ; CHECK-P8: # %bb.0: # %entry
5990 ; CHECK-P8-NEXT: mtfprwz f0, r4
5991 ; CHECK-P8-NEXT: lis r4, 3725
5992 ; CHECK-P8-NEXT: ori r4, r4, 19025
5993 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
5994 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
5995 ; CHECK-P8-NEXT: stfsx f0, r3, r4
5996 ; CHECK-P8-NEXT: blr
5998 %conv = uitofp i16 %str to float
5999 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
6000 store float %conv, ptr %add.ptr, align 4
6004 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6005 define dso_local void @st_reg_uint16_t_float(ptr nocapture %ptr, i64 %off, i16 zeroext %str) {
6006 ; CHECK-LABEL: st_reg_uint16_t_float:
6007 ; CHECK: # %bb.0: # %entry
6008 ; CHECK-NEXT: mtfprwz f0, r5
6009 ; CHECK-NEXT: xscvuxdsp f0, f0
6010 ; CHECK-NEXT: stfsx f0, r3, r4
6013 %conv = uitofp i16 %str to float
6014 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
6015 store float %conv, ptr %add.ptr, align 4
6019 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6020 define dso_local void @st_or1_uint16_t_float(i64 %ptr, i8 zeroext %off, i16 zeroext %str) {
6021 ; CHECK-LABEL: st_or1_uint16_t_float:
6022 ; CHECK: # %bb.0: # %entry
6023 ; CHECK-NEXT: mtfprwz f0, r5
6024 ; CHECK-NEXT: or r3, r4, r3
6025 ; CHECK-NEXT: xscvuxdsp f0, f0
6026 ; CHECK-NEXT: stfs f0, 0(r3)
6029 %conv = uitofp i16 %str to float
6030 %conv1 = zext i8 %off to i64
6031 %or = or i64 %conv1, %ptr
6032 %0 = inttoptr i64 %or to ptr
6033 store float %conv, ptr %0, align 4
6037 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6038 define dso_local void @st_not_disjoint16_uint16_t_float(i64 %ptr, i16 zeroext %str) {
6039 ; CHECK-LABEL: st_not_disjoint16_uint16_t_float:
6040 ; CHECK: # %bb.0: # %entry
6041 ; CHECK-NEXT: mtfprwz f0, r4
6042 ; CHECK-NEXT: ori r3, r3, 6
6043 ; CHECK-NEXT: xscvuxdsp f0, f0
6044 ; CHECK-NEXT: stfs f0, 0(r3)
6047 %conv = uitofp i16 %str to float
6048 %or = or i64 %ptr, 6
6049 %0 = inttoptr i64 %or to ptr
6050 store float %conv, ptr %0, align 4
6054 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6055 define dso_local void @st_disjoint_align16_uint16_t_float(i64 %ptr, i16 zeroext %str) {
6056 ; CHECK-LABEL: st_disjoint_align16_uint16_t_float:
6057 ; CHECK: # %bb.0: # %entry
6058 ; CHECK-NEXT: mtfprwz f0, r4
6059 ; CHECK-NEXT: rldicr r3, r3, 0, 51
6060 ; CHECK-NEXT: xscvuxdsp f0, f0
6061 ; CHECK-NEXT: stfs f0, 24(r3)
6064 %and = and i64 %ptr, -4096
6065 %conv = uitofp i16 %str to float
6066 %or = or i64 %and, 24
6067 %0 = inttoptr i64 %or to ptr
6068 store float %conv, ptr %0, align 8
6072 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6073 define dso_local void @st_not_disjoint32_uint16_t_float(i64 %ptr, i16 zeroext %str) {
6074 ; CHECK-P10-LABEL: st_not_disjoint32_uint16_t_float:
6075 ; CHECK-P10: # %bb.0: # %entry
6076 ; CHECK-P10-NEXT: mtfprwz f0, r4
6077 ; CHECK-P10-NEXT: ori r3, r3, 34463
6078 ; CHECK-P10-NEXT: oris r3, r3, 1
6079 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
6080 ; CHECK-P10-NEXT: stfs f0, 0(r3)
6081 ; CHECK-P10-NEXT: blr
6083 ; CHECK-P9-LABEL: st_not_disjoint32_uint16_t_float:
6084 ; CHECK-P9: # %bb.0: # %entry
6085 ; CHECK-P9-NEXT: mtfprwz f0, r4
6086 ; CHECK-P9-NEXT: ori r3, r3, 34463
6087 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
6088 ; CHECK-P9-NEXT: oris r3, r3, 1
6089 ; CHECK-P9-NEXT: stfs f0, 0(r3)
6090 ; CHECK-P9-NEXT: blr
6092 ; CHECK-P8-LABEL: st_not_disjoint32_uint16_t_float:
6093 ; CHECK-P8: # %bb.0: # %entry
6094 ; CHECK-P8-NEXT: mtfprwz f0, r4
6095 ; CHECK-P8-NEXT: ori r3, r3, 34463
6096 ; CHECK-P8-NEXT: oris r3, r3, 1
6097 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
6098 ; CHECK-P8-NEXT: stfs f0, 0(r3)
6099 ; CHECK-P8-NEXT: blr
6101 %conv = uitofp i16 %str to float
6102 %or = or i64 %ptr, 99999
6103 %0 = inttoptr i64 %or to ptr
6104 store float %conv, ptr %0, align 4
6108 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6109 define dso_local void @st_disjoint_align32_uint16_t_float(i64 %ptr, i16 zeroext %str) {
6110 ; CHECK-P10-LABEL: st_disjoint_align32_uint16_t_float:
6111 ; CHECK-P10: # %bb.0: # %entry
6112 ; CHECK-P10-NEXT: mtfprwz f0, r4
6113 ; CHECK-P10-NEXT: lis r5, -15264
6114 ; CHECK-P10-NEXT: and r3, r3, r5
6115 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
6116 ; CHECK-P10-NEXT: pstfs f0, 999990000(r3), 0
6117 ; CHECK-P10-NEXT: blr
6119 ; CHECK-P9-LABEL: st_disjoint_align32_uint16_t_float:
6120 ; CHECK-P9: # %bb.0: # %entry
6121 ; CHECK-P9-NEXT: mtfprwz f0, r4
6122 ; CHECK-P9-NEXT: lis r5, -15264
6123 ; CHECK-P9-NEXT: lis r4, 15258
6124 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
6125 ; CHECK-P9-NEXT: and r3, r3, r5
6126 ; CHECK-P9-NEXT: ori r4, r4, 41712
6127 ; CHECK-P9-NEXT: stfsx f0, r3, r4
6128 ; CHECK-P9-NEXT: blr
6130 ; CHECK-P8-LABEL: st_disjoint_align32_uint16_t_float:
6131 ; CHECK-P8: # %bb.0: # %entry
6132 ; CHECK-P8-NEXT: mtfprwz f0, r4
6133 ; CHECK-P8-NEXT: lis r5, -15264
6134 ; CHECK-P8-NEXT: lis r4, 15258
6135 ; CHECK-P8-NEXT: and r3, r3, r5
6136 ; CHECK-P8-NEXT: ori r4, r4, 41712
6137 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
6138 ; CHECK-P8-NEXT: stfsx f0, r3, r4
6139 ; CHECK-P8-NEXT: blr
6141 %and = and i64 %ptr, -1000341504
6142 %conv = uitofp i16 %str to float
6143 %or = or i64 %and, 999990000
6144 %0 = inttoptr i64 %or to ptr
6145 store float %conv, ptr %0, align 16
6149 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6150 define dso_local void @st_not_disjoint64_uint16_t_float(i64 %ptr, i16 zeroext %str) {
6151 ; CHECK-P10-LABEL: st_not_disjoint64_uint16_t_float:
6152 ; CHECK-P10: # %bb.0: # %entry
6153 ; CHECK-P10-NEXT: mtfprwz f0, r4
6154 ; CHECK-P10-NEXT: pli r4, 232
6155 ; CHECK-P10-NEXT: pli r5, 3567587329
6156 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
6157 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
6158 ; CHECK-P10-NEXT: or r3, r3, r5
6159 ; CHECK-P10-NEXT: stfs f0, 0(r3)
6160 ; CHECK-P10-NEXT: blr
6162 ; CHECK-P9-LABEL: st_not_disjoint64_uint16_t_float:
6163 ; CHECK-P9: # %bb.0: # %entry
6164 ; CHECK-P9-NEXT: mtfprwz f0, r4
6165 ; CHECK-P9-NEXT: li r4, 29
6166 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
6167 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
6168 ; CHECK-P9-NEXT: oris r4, r4, 54437
6169 ; CHECK-P9-NEXT: ori r4, r4, 4097
6170 ; CHECK-P9-NEXT: or r3, r3, r4
6171 ; CHECK-P9-NEXT: stfs f0, 0(r3)
6172 ; CHECK-P9-NEXT: blr
6174 ; CHECK-P8-LABEL: st_not_disjoint64_uint16_t_float:
6175 ; CHECK-P8: # %bb.0: # %entry
6176 ; CHECK-P8-NEXT: mtfprwz f0, r4
6177 ; CHECK-P8-NEXT: li r4, 29
6178 ; CHECK-P8-NEXT: rldic r4, r4, 35, 24
6179 ; CHECK-P8-NEXT: oris r4, r4, 54437
6180 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
6181 ; CHECK-P8-NEXT: ori r4, r4, 4097
6182 ; CHECK-P8-NEXT: or r3, r3, r4
6183 ; CHECK-P8-NEXT: stfs f0, 0(r3)
6184 ; CHECK-P8-NEXT: blr
6186 %conv = uitofp i16 %str to float
6187 %or = or i64 %ptr, 1000000000001
6188 %0 = inttoptr i64 %or to ptr
6189 store float %conv, ptr %0, align 4
6193 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6194 define dso_local void @st_disjoint_align64_uint16_t_float(i64 %ptr, i16 zeroext %str) {
6195 ; CHECK-P10-LABEL: st_disjoint_align64_uint16_t_float:
6196 ; CHECK-P10: # %bb.0: # %entry
6197 ; CHECK-P10-NEXT: mtfprwz f0, r4
6198 ; CHECK-P10-NEXT: pli r4, 244140625
6199 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
6200 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6201 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
6202 ; CHECK-P10-NEXT: stfsx f0, r3, r4
6203 ; CHECK-P10-NEXT: blr
6205 ; CHECK-P9-LABEL: st_disjoint_align64_uint16_t_float:
6206 ; CHECK-P9: # %bb.0: # %entry
6207 ; CHECK-P9-NEXT: mtfprwz f0, r4
6208 ; CHECK-P9-NEXT: lis r4, 3725
6209 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
6210 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
6211 ; CHECK-P9-NEXT: ori r4, r4, 19025
6212 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
6213 ; CHECK-P9-NEXT: stfsx f0, r3, r4
6214 ; CHECK-P9-NEXT: blr
6216 ; CHECK-P8-LABEL: st_disjoint_align64_uint16_t_float:
6217 ; CHECK-P8: # %bb.0: # %entry
6218 ; CHECK-P8-NEXT: mtfprwz f0, r4
6219 ; CHECK-P8-NEXT: lis r4, 3725
6220 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
6221 ; CHECK-P8-NEXT: ori r4, r4, 19025
6222 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
6223 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
6224 ; CHECK-P8-NEXT: stfsx f0, r3, r4
6225 ; CHECK-P8-NEXT: blr
6227 %and = and i64 %ptr, -1099511627776
6228 %conv = uitofp i16 %str to float
6229 %or = or i64 %and, 1000000000000
6230 %0 = inttoptr i64 %or to ptr
6231 store float %conv, ptr %0, align 4096
6235 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6236 define dso_local void @st_cst_align16_uint16_t_float(i16 zeroext %str) {
6237 ; CHECK-LABEL: st_cst_align16_uint16_t_float:
6238 ; CHECK: # %bb.0: # %entry
6239 ; CHECK-NEXT: mtfprwz f0, r3
6240 ; CHECK-NEXT: xscvuxdsp f0, f0
6241 ; CHECK-NEXT: stfs f0, 4080(0)
6244 %conv = uitofp i16 %str to float
6245 store float %conv, ptr inttoptr (i64 4080 to ptr), align 16
6249 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6250 define dso_local void @st_cst_align32_uint16_t_float(i16 zeroext %str) {
6251 ; CHECK-LABEL: st_cst_align32_uint16_t_float:
6252 ; CHECK: # %bb.0: # %entry
6253 ; CHECK-NEXT: mtfprwz f0, r3
6254 ; CHECK-NEXT: lis r3, 153
6255 ; CHECK-NEXT: xscvuxdsp f0, f0
6256 ; CHECK-NEXT: stfs f0, -27108(r3)
6259 %conv = uitofp i16 %str to float
6260 store float %conv, ptr inttoptr (i64 9999900 to ptr), align 4
6264 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6265 define dso_local void @st_cst_align64_uint16_t_float(i16 zeroext %str) {
6266 ; CHECK-P10-LABEL: st_cst_align64_uint16_t_float:
6267 ; CHECK-P10: # %bb.0: # %entry
6268 ; CHECK-P10-NEXT: mtfprwz f0, r3
6269 ; CHECK-P10-NEXT: pli r3, 244140625
6270 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
6271 ; CHECK-P10-NEXT: xscvuxdsp f0, f0
6272 ; CHECK-P10-NEXT: stfs f0, 0(r3)
6273 ; CHECK-P10-NEXT: blr
6275 ; CHECK-P9-LABEL: st_cst_align64_uint16_t_float:
6276 ; CHECK-P9: # %bb.0: # %entry
6277 ; CHECK-P9-NEXT: mtfprwz f0, r3
6278 ; CHECK-P9-NEXT: lis r3, 3725
6279 ; CHECK-P9-NEXT: xscvuxdsp f0, f0
6280 ; CHECK-P9-NEXT: ori r3, r3, 19025
6281 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
6282 ; CHECK-P9-NEXT: stfs f0, 0(r3)
6283 ; CHECK-P9-NEXT: blr
6285 ; CHECK-P8-LABEL: st_cst_align64_uint16_t_float:
6286 ; CHECK-P8: # %bb.0: # %entry
6287 ; CHECK-P8-NEXT: mtfprwz f0, r3
6288 ; CHECK-P8-NEXT: lis r3, 3725
6289 ; CHECK-P8-NEXT: ori r3, r3, 19025
6290 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
6291 ; CHECK-P8-NEXT: xscvuxdsp f0, f0
6292 ; CHECK-P8-NEXT: stfs f0, 0(r3)
6293 ; CHECK-P8-NEXT: blr
6295 %conv = uitofp i16 %str to float
6296 store float %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
6300 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6301 define dso_local void @st_0_uint16_t_double(i64 %ptr, i16 zeroext %str) {
6302 ; CHECK-LABEL: st_0_uint16_t_double:
6303 ; CHECK: # %bb.0: # %entry
6304 ; CHECK-NEXT: mtfprwz f0, r4
6305 ; CHECK-NEXT: xscvuxddp f0, f0
6306 ; CHECK-NEXT: stfd f0, 0(r3)
6309 %conv = uitofp i16 %str to double
6310 %0 = inttoptr i64 %ptr to ptr
6311 store double %conv, ptr %0, align 8
6315 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6316 define dso_local void @st_align16_uint16_t_double(ptr nocapture %ptr, i16 zeroext %str) {
6317 ; CHECK-LABEL: st_align16_uint16_t_double:
6318 ; CHECK: # %bb.0: # %entry
6319 ; CHECK-NEXT: mtfprwz f0, r4
6320 ; CHECK-NEXT: xscvuxddp f0, f0
6321 ; CHECK-NEXT: stfd f0, 8(r3)
6324 %conv = uitofp i16 %str to double
6325 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
6326 store double %conv, ptr %add.ptr, align 8
6330 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6331 define dso_local void @st_align32_uint16_t_double(ptr nocapture %ptr, i16 zeroext %str) {
6332 ; CHECK-P10-LABEL: st_align32_uint16_t_double:
6333 ; CHECK-P10: # %bb.0: # %entry
6334 ; CHECK-P10-NEXT: mtfprwz f0, r4
6335 ; CHECK-P10-NEXT: xscvuxddp f0, f0
6336 ; CHECK-P10-NEXT: pstfd f0, 99999000(r3), 0
6337 ; CHECK-P10-NEXT: blr
6339 ; CHECK-P9-LABEL: st_align32_uint16_t_double:
6340 ; CHECK-P9: # %bb.0: # %entry
6341 ; CHECK-P9-NEXT: mtfprwz f0, r4
6342 ; CHECK-P9-NEXT: lis r4, 1525
6343 ; CHECK-P9-NEXT: xscvuxddp f0, f0
6344 ; CHECK-P9-NEXT: ori r4, r4, 56600
6345 ; CHECK-P9-NEXT: stfdx f0, r3, r4
6346 ; CHECK-P9-NEXT: blr
6348 ; CHECK-P8-LABEL: st_align32_uint16_t_double:
6349 ; CHECK-P8: # %bb.0: # %entry
6350 ; CHECK-P8-NEXT: mtfprwz f0, r4
6351 ; CHECK-P8-NEXT: lis r4, 1525
6352 ; CHECK-P8-NEXT: ori r4, r4, 56600
6353 ; CHECK-P8-NEXT: xscvuxddp f0, f0
6354 ; CHECK-P8-NEXT: stfdx f0, r3, r4
6355 ; CHECK-P8-NEXT: blr
6357 %conv = uitofp i16 %str to double
6358 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
6359 store double %conv, ptr %add.ptr, align 8
6363 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6364 define dso_local void @st_align64_uint16_t_double(ptr nocapture %ptr, i16 zeroext %str) {
6365 ; CHECK-P10-LABEL: st_align64_uint16_t_double:
6366 ; CHECK-P10: # %bb.0: # %entry
6367 ; CHECK-P10-NEXT: mtfprwz f0, r4
6368 ; CHECK-P10-NEXT: pli r4, 244140625
6369 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6370 ; CHECK-P10-NEXT: xscvuxddp f0, f0
6371 ; CHECK-P10-NEXT: stfdx f0, r3, r4
6372 ; CHECK-P10-NEXT: blr
6374 ; CHECK-P9-LABEL: st_align64_uint16_t_double:
6375 ; CHECK-P9: # %bb.0: # %entry
6376 ; CHECK-P9-NEXT: mtfprwz f0, r4
6377 ; CHECK-P9-NEXT: lis r4, 3725
6378 ; CHECK-P9-NEXT: xscvuxddp f0, f0
6379 ; CHECK-P9-NEXT: ori r4, r4, 19025
6380 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
6381 ; CHECK-P9-NEXT: stfdx f0, r3, r4
6382 ; CHECK-P9-NEXT: blr
6384 ; CHECK-P8-LABEL: st_align64_uint16_t_double:
6385 ; CHECK-P8: # %bb.0: # %entry
6386 ; CHECK-P8-NEXT: mtfprwz f0, r4
6387 ; CHECK-P8-NEXT: lis r4, 3725
6388 ; CHECK-P8-NEXT: ori r4, r4, 19025
6389 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
6390 ; CHECK-P8-NEXT: xscvuxddp f0, f0
6391 ; CHECK-P8-NEXT: stfdx f0, r3, r4
6392 ; CHECK-P8-NEXT: blr
6394 %conv = uitofp i16 %str to double
6395 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
6396 store double %conv, ptr %add.ptr, align 8
6400 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6401 define dso_local void @st_reg_uint16_t_double(ptr nocapture %ptr, i64 %off, i16 zeroext %str) {
6402 ; CHECK-LABEL: st_reg_uint16_t_double:
6403 ; CHECK: # %bb.0: # %entry
6404 ; CHECK-NEXT: mtfprwz f0, r5
6405 ; CHECK-NEXT: xscvuxddp f0, f0
6406 ; CHECK-NEXT: stfdx f0, r3, r4
6409 %conv = uitofp i16 %str to double
6410 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
6411 store double %conv, ptr %add.ptr, align 8
6415 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6416 define dso_local void @st_or1_uint16_t_double(i64 %ptr, i8 zeroext %off, i16 zeroext %str) {
6417 ; CHECK-LABEL: st_or1_uint16_t_double:
6418 ; CHECK: # %bb.0: # %entry
6419 ; CHECK-NEXT: mtfprwz f0, r5
6420 ; CHECK-NEXT: or r3, r4, r3
6421 ; CHECK-NEXT: xscvuxddp f0, f0
6422 ; CHECK-NEXT: stfd f0, 0(r3)
6425 %conv = uitofp i16 %str to double
6426 %conv1 = zext i8 %off to i64
6427 %or = or i64 %conv1, %ptr
6428 %0 = inttoptr i64 %or to ptr
6429 store double %conv, ptr %0, align 8
6433 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6434 define dso_local void @st_not_disjoint16_uint16_t_double(i64 %ptr, i16 zeroext %str) {
6435 ; CHECK-LABEL: st_not_disjoint16_uint16_t_double:
6436 ; CHECK: # %bb.0: # %entry
6437 ; CHECK-NEXT: mtfprwz f0, r4
6438 ; CHECK-NEXT: ori r3, r3, 6
6439 ; CHECK-NEXT: xscvuxddp f0, f0
6440 ; CHECK-NEXT: stfd f0, 0(r3)
6443 %conv = uitofp i16 %str to double
6444 %or = or i64 %ptr, 6
6445 %0 = inttoptr i64 %or to ptr
6446 store double %conv, ptr %0, align 8
6450 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6451 define dso_local void @st_disjoint_align16_uint16_t_double(i64 %ptr, i16 zeroext %str) {
6452 ; CHECK-LABEL: st_disjoint_align16_uint16_t_double:
6453 ; CHECK: # %bb.0: # %entry
6454 ; CHECK-NEXT: mtfprwz f0, r4
6455 ; CHECK-NEXT: rldicr r3, r3, 0, 51
6456 ; CHECK-NEXT: xscvuxddp f0, f0
6457 ; CHECK-NEXT: stfd f0, 24(r3)
6460 %and = and i64 %ptr, -4096
6461 %conv = uitofp i16 %str to double
6462 %or = or i64 %and, 24
6463 %0 = inttoptr i64 %or to ptr
6464 store double %conv, ptr %0, align 8
6468 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6469 define dso_local void @st_not_disjoint32_uint16_t_double(i64 %ptr, i16 zeroext %str) {
6470 ; CHECK-P10-LABEL: st_not_disjoint32_uint16_t_double:
6471 ; CHECK-P10: # %bb.0: # %entry
6472 ; CHECK-P10-NEXT: mtfprwz f0, r4
6473 ; CHECK-P10-NEXT: ori r3, r3, 34463
6474 ; CHECK-P10-NEXT: oris r3, r3, 1
6475 ; CHECK-P10-NEXT: xscvuxddp f0, f0
6476 ; CHECK-P10-NEXT: stfd f0, 0(r3)
6477 ; CHECK-P10-NEXT: blr
6479 ; CHECK-P9-LABEL: st_not_disjoint32_uint16_t_double:
6480 ; CHECK-P9: # %bb.0: # %entry
6481 ; CHECK-P9-NEXT: mtfprwz f0, r4
6482 ; CHECK-P9-NEXT: ori r3, r3, 34463
6483 ; CHECK-P9-NEXT: xscvuxddp f0, f0
6484 ; CHECK-P9-NEXT: oris r3, r3, 1
6485 ; CHECK-P9-NEXT: stfd f0, 0(r3)
6486 ; CHECK-P9-NEXT: blr
6488 ; CHECK-P8-LABEL: st_not_disjoint32_uint16_t_double:
6489 ; CHECK-P8: # %bb.0: # %entry
6490 ; CHECK-P8-NEXT: mtfprwz f0, r4
6491 ; CHECK-P8-NEXT: ori r3, r3, 34463
6492 ; CHECK-P8-NEXT: oris r3, r3, 1
6493 ; CHECK-P8-NEXT: xscvuxddp f0, f0
6494 ; CHECK-P8-NEXT: stfd f0, 0(r3)
6495 ; CHECK-P8-NEXT: blr
6497 %conv = uitofp i16 %str to double
6498 %or = or i64 %ptr, 99999
6499 %0 = inttoptr i64 %or to ptr
6500 store double %conv, ptr %0, align 8
6504 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6505 define dso_local void @st_disjoint_align32_uint16_t_double(i64 %ptr, i16 zeroext %str) {
6506 ; CHECK-P10-LABEL: st_disjoint_align32_uint16_t_double:
6507 ; CHECK-P10: # %bb.0: # %entry
6508 ; CHECK-P10-NEXT: mtfprwz f0, r4
6509 ; CHECK-P10-NEXT: lis r5, -15264
6510 ; CHECK-P10-NEXT: and r3, r3, r5
6511 ; CHECK-P10-NEXT: xscvuxddp f0, f0
6512 ; CHECK-P10-NEXT: pstfd f0, 999990000(r3), 0
6513 ; CHECK-P10-NEXT: blr
6515 ; CHECK-P9-LABEL: st_disjoint_align32_uint16_t_double:
6516 ; CHECK-P9: # %bb.0: # %entry
6517 ; CHECK-P9-NEXT: mtfprwz f0, r4
6518 ; CHECK-P9-NEXT: lis r5, -15264
6519 ; CHECK-P9-NEXT: lis r4, 15258
6520 ; CHECK-P9-NEXT: xscvuxddp f0, f0
6521 ; CHECK-P9-NEXT: and r3, r3, r5
6522 ; CHECK-P9-NEXT: ori r4, r4, 41712
6523 ; CHECK-P9-NEXT: stfdx f0, r3, r4
6524 ; CHECK-P9-NEXT: blr
6526 ; CHECK-P8-LABEL: st_disjoint_align32_uint16_t_double:
6527 ; CHECK-P8: # %bb.0: # %entry
6528 ; CHECK-P8-NEXT: mtfprwz f0, r4
6529 ; CHECK-P8-NEXT: lis r5, -15264
6530 ; CHECK-P8-NEXT: lis r4, 15258
6531 ; CHECK-P8-NEXT: and r3, r3, r5
6532 ; CHECK-P8-NEXT: ori r4, r4, 41712
6533 ; CHECK-P8-NEXT: xscvuxddp f0, f0
6534 ; CHECK-P8-NEXT: stfdx f0, r3, r4
6535 ; CHECK-P8-NEXT: blr
6537 %and = and i64 %ptr, -1000341504
6538 %conv = uitofp i16 %str to double
6539 %or = or i64 %and, 999990000
6540 %0 = inttoptr i64 %or to ptr
6541 store double %conv, ptr %0, align 16
6545 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6546 define dso_local void @st_not_disjoint64_uint16_t_double(i64 %ptr, i16 zeroext %str) {
6547 ; CHECK-P10-LABEL: st_not_disjoint64_uint16_t_double:
6548 ; CHECK-P10: # %bb.0: # %entry
6549 ; CHECK-P10-NEXT: mtfprwz f0, r4
6550 ; CHECK-P10-NEXT: pli r4, 232
6551 ; CHECK-P10-NEXT: pli r5, 3567587329
6552 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
6553 ; CHECK-P10-NEXT: xscvuxddp f0, f0
6554 ; CHECK-P10-NEXT: or r3, r3, r5
6555 ; CHECK-P10-NEXT: stfd f0, 0(r3)
6556 ; CHECK-P10-NEXT: blr
6558 ; CHECK-P9-LABEL: st_not_disjoint64_uint16_t_double:
6559 ; CHECK-P9: # %bb.0: # %entry
6560 ; CHECK-P9-NEXT: mtfprwz f0, r4
6561 ; CHECK-P9-NEXT: li r4, 29
6562 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
6563 ; CHECK-P9-NEXT: xscvuxddp f0, f0
6564 ; CHECK-P9-NEXT: oris r4, r4, 54437
6565 ; CHECK-P9-NEXT: ori r4, r4, 4097
6566 ; CHECK-P9-NEXT: or r3, r3, r4
6567 ; CHECK-P9-NEXT: stfd f0, 0(r3)
6568 ; CHECK-P9-NEXT: blr
6570 ; CHECK-P8-LABEL: st_not_disjoint64_uint16_t_double:
6571 ; CHECK-P8: # %bb.0: # %entry
6572 ; CHECK-P8-NEXT: mtfprwz f0, r4
6573 ; CHECK-P8-NEXT: li r4, 29
6574 ; CHECK-P8-NEXT: rldic r4, r4, 35, 24
6575 ; CHECK-P8-NEXT: oris r4, r4, 54437
6576 ; CHECK-P8-NEXT: xscvuxddp f0, f0
6577 ; CHECK-P8-NEXT: ori r4, r4, 4097
6578 ; CHECK-P8-NEXT: or r3, r3, r4
6579 ; CHECK-P8-NEXT: stfd f0, 0(r3)
6580 ; CHECK-P8-NEXT: blr
6582 %conv = uitofp i16 %str to double
6583 %or = or i64 %ptr, 1000000000001
6584 %0 = inttoptr i64 %or to ptr
6585 store double %conv, ptr %0, align 8
6589 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6590 define dso_local void @st_disjoint_align64_uint16_t_double(i64 %ptr, i16 zeroext %str) {
6591 ; CHECK-P10-LABEL: st_disjoint_align64_uint16_t_double:
6592 ; CHECK-P10: # %bb.0: # %entry
6593 ; CHECK-P10-NEXT: mtfprwz f0, r4
6594 ; CHECK-P10-NEXT: pli r4, 244140625
6595 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
6596 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6597 ; CHECK-P10-NEXT: xscvuxddp f0, f0
6598 ; CHECK-P10-NEXT: stfdx f0, r3, r4
6599 ; CHECK-P10-NEXT: blr
6601 ; CHECK-P9-LABEL: st_disjoint_align64_uint16_t_double:
6602 ; CHECK-P9: # %bb.0: # %entry
6603 ; CHECK-P9-NEXT: mtfprwz f0, r4
6604 ; CHECK-P9-NEXT: lis r4, 3725
6605 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
6606 ; CHECK-P9-NEXT: xscvuxddp f0, f0
6607 ; CHECK-P9-NEXT: ori r4, r4, 19025
6608 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
6609 ; CHECK-P9-NEXT: stfdx f0, r3, r4
6610 ; CHECK-P9-NEXT: blr
6612 ; CHECK-P8-LABEL: st_disjoint_align64_uint16_t_double:
6613 ; CHECK-P8: # %bb.0: # %entry
6614 ; CHECK-P8-NEXT: mtfprwz f0, r4
6615 ; CHECK-P8-NEXT: lis r4, 3725
6616 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
6617 ; CHECK-P8-NEXT: ori r4, r4, 19025
6618 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
6619 ; CHECK-P8-NEXT: xscvuxddp f0, f0
6620 ; CHECK-P8-NEXT: stfdx f0, r3, r4
6621 ; CHECK-P8-NEXT: blr
6623 %and = and i64 %ptr, -1099511627776
6624 %conv = uitofp i16 %str to double
6625 %or = or i64 %and, 1000000000000
6626 %0 = inttoptr i64 %or to ptr
6627 store double %conv, ptr %0, align 4096
6631 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6632 define dso_local void @st_cst_align16_uint16_t_double(i16 zeroext %str) {
6633 ; CHECK-LABEL: st_cst_align16_uint16_t_double:
6634 ; CHECK: # %bb.0: # %entry
6635 ; CHECK-NEXT: mtfprwz f0, r3
6636 ; CHECK-NEXT: xscvuxddp f0, f0
6637 ; CHECK-NEXT: stfd f0, 4080(0)
6640 %conv = uitofp i16 %str to double
6641 store double %conv, ptr inttoptr (i64 4080 to ptr), align 16
6645 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6646 define dso_local void @st_cst_align32_uint16_t_double(i16 zeroext %str) {
6647 ; CHECK-LABEL: st_cst_align32_uint16_t_double:
6648 ; CHECK: # %bb.0: # %entry
6649 ; CHECK-NEXT: mtfprwz f0, r3
6650 ; CHECK-NEXT: lis r3, 153
6651 ; CHECK-NEXT: xscvuxddp f0, f0
6652 ; CHECK-NEXT: stfd f0, -27108(r3)
6655 %conv = uitofp i16 %str to double
6656 store double %conv, ptr inttoptr (i64 9999900 to ptr), align 8
6660 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6661 define dso_local void @st_cst_align64_uint16_t_double(i16 zeroext %str) {
6662 ; CHECK-P10-LABEL: st_cst_align64_uint16_t_double:
6663 ; CHECK-P10: # %bb.0: # %entry
6664 ; CHECK-P10-NEXT: mtfprwz f0, r3
6665 ; CHECK-P10-NEXT: pli r3, 244140625
6666 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
6667 ; CHECK-P10-NEXT: xscvuxddp f0, f0
6668 ; CHECK-P10-NEXT: stfd f0, 0(r3)
6669 ; CHECK-P10-NEXT: blr
6671 ; CHECK-P9-LABEL: st_cst_align64_uint16_t_double:
6672 ; CHECK-P9: # %bb.0: # %entry
6673 ; CHECK-P9-NEXT: mtfprwz f0, r3
6674 ; CHECK-P9-NEXT: lis r3, 3725
6675 ; CHECK-P9-NEXT: xscvuxddp f0, f0
6676 ; CHECK-P9-NEXT: ori r3, r3, 19025
6677 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
6678 ; CHECK-P9-NEXT: stfd f0, 0(r3)
6679 ; CHECK-P9-NEXT: blr
6681 ; CHECK-P8-LABEL: st_cst_align64_uint16_t_double:
6682 ; CHECK-P8: # %bb.0: # %entry
6683 ; CHECK-P8-NEXT: mtfprwz f0, r3
6684 ; CHECK-P8-NEXT: lis r3, 3725
6685 ; CHECK-P8-NEXT: ori r3, r3, 19025
6686 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
6687 ; CHECK-P8-NEXT: xscvuxddp f0, f0
6688 ; CHECK-P8-NEXT: stfd f0, 0(r3)
6689 ; CHECK-P8-NEXT: blr
6691 %conv = uitofp i16 %str to double
6692 store double %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
6696 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6697 define dso_local void @st_0_int16_t_uint32_t(i64 %ptr, i16 signext %str) {
6698 ; CHECK-LABEL: st_0_int16_t_uint32_t:
6699 ; CHECK: # %bb.0: # %entry
6700 ; CHECK-NEXT: stw r4, 0(r3)
6703 %conv = sext i16 %str to i32
6704 %0 = inttoptr i64 %ptr to ptr
6705 store i32 %conv, ptr %0, align 4
6709 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6710 define dso_local void @st_align16_int16_t_uint32_t(ptr nocapture %ptr, i16 signext %str) {
6711 ; CHECK-LABEL: st_align16_int16_t_uint32_t:
6712 ; CHECK: # %bb.0: # %entry
6713 ; CHECK-NEXT: stw r4, 8(r3)
6716 %conv = sext i16 %str to i32
6717 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
6718 store i32 %conv, ptr %add.ptr, align 4
6722 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6723 define dso_local void @st_align32_int16_t_uint32_t(ptr nocapture %ptr, i16 signext %str) {
6724 ; CHECK-P10-LABEL: st_align32_int16_t_uint32_t:
6725 ; CHECK-P10: # %bb.0: # %entry
6726 ; CHECK-P10-NEXT: pstw r4, 99999000(r3), 0
6727 ; CHECK-P10-NEXT: blr
6729 ; CHECK-PREP10-LABEL: st_align32_int16_t_uint32_t:
6730 ; CHECK-PREP10: # %bb.0: # %entry
6731 ; CHECK-PREP10-NEXT: lis r5, 1525
6732 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
6733 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
6734 ; CHECK-PREP10-NEXT: blr
6736 %conv = sext i16 %str to i32
6737 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
6738 store i32 %conv, ptr %add.ptr, align 4
6742 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6743 define dso_local void @st_align64_int16_t_uint32_t(ptr nocapture %ptr, i16 signext %str) {
6744 ; CHECK-P10-LABEL: st_align64_int16_t_uint32_t:
6745 ; CHECK-P10: # %bb.0: # %entry
6746 ; CHECK-P10-NEXT: pli r5, 244140625
6747 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6748 ; CHECK-P10-NEXT: stwx r4, r3, r5
6749 ; CHECK-P10-NEXT: blr
6751 ; CHECK-PREP10-LABEL: st_align64_int16_t_uint32_t:
6752 ; CHECK-PREP10: # %bb.0: # %entry
6753 ; CHECK-PREP10-NEXT: lis r5, 3725
6754 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6755 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6756 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
6757 ; CHECK-PREP10-NEXT: blr
6759 %conv = sext i16 %str to i32
6760 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
6761 store i32 %conv, ptr %add.ptr, align 4
6765 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6766 define dso_local void @st_reg_int16_t_uint32_t(ptr nocapture %ptr, i64 %off, i16 signext %str) {
6767 ; CHECK-LABEL: st_reg_int16_t_uint32_t:
6768 ; CHECK: # %bb.0: # %entry
6769 ; CHECK-NEXT: stwx r5, r3, r4
6772 %conv = sext i16 %str to i32
6773 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
6774 store i32 %conv, ptr %add.ptr, align 4
6778 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6779 define dso_local void @st_or1_int16_t_uint32_t(i64 %ptr, i8 zeroext %off, i16 signext %str) {
6780 ; CHECK-LABEL: st_or1_int16_t_uint32_t:
6781 ; CHECK: # %bb.0: # %entry
6782 ; CHECK-NEXT: or r3, r4, r3
6783 ; CHECK-NEXT: stw r5, 0(r3)
6786 %conv = sext i16 %str to i32
6787 %conv1 = zext i8 %off to i64
6788 %or = or i64 %conv1, %ptr
6789 %0 = inttoptr i64 %or to ptr
6790 store i32 %conv, ptr %0, align 4
6794 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6795 define dso_local void @st_not_disjoint16_int16_t_uint32_t(i64 %ptr, i16 signext %str) {
6796 ; CHECK-LABEL: st_not_disjoint16_int16_t_uint32_t:
6797 ; CHECK: # %bb.0: # %entry
6798 ; CHECK-NEXT: ori r3, r3, 6
6799 ; CHECK-NEXT: stw r4, 0(r3)
6802 %conv = sext i16 %str to i32
6803 %or = or i64 %ptr, 6
6804 %0 = inttoptr i64 %or to ptr
6805 store i32 %conv, ptr %0, align 4
6809 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6810 define dso_local void @st_disjoint_align16_int16_t_uint32_t(i64 %ptr, i16 signext %str) {
6811 ; CHECK-LABEL: st_disjoint_align16_int16_t_uint32_t:
6812 ; CHECK: # %bb.0: # %entry
6813 ; CHECK-NEXT: rldicr r3, r3, 0, 51
6814 ; CHECK-NEXT: stw r4, 24(r3)
6817 %and = and i64 %ptr, -4096
6818 %conv = sext i16 %str to i32
6819 %or = or i64 %and, 24
6820 %0 = inttoptr i64 %or to ptr
6821 store i32 %conv, ptr %0, align 8
6825 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6826 define dso_local void @st_not_disjoint32_int16_t_uint32_t(i64 %ptr, i16 signext %str) {
6827 ; CHECK-LABEL: st_not_disjoint32_int16_t_uint32_t:
6828 ; CHECK: # %bb.0: # %entry
6829 ; CHECK-NEXT: ori r3, r3, 34463
6830 ; CHECK-NEXT: oris r3, r3, 1
6831 ; CHECK-NEXT: stw r4, 0(r3)
6834 %conv = sext i16 %str to i32
6835 %or = or i64 %ptr, 99999
6836 %0 = inttoptr i64 %or to ptr
6837 store i32 %conv, ptr %0, align 4
6841 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6842 define dso_local void @st_disjoint_align32_int16_t_uint32_t(i64 %ptr, i16 signext %str) {
6843 ; CHECK-P10-LABEL: st_disjoint_align32_int16_t_uint32_t:
6844 ; CHECK-P10: # %bb.0: # %entry
6845 ; CHECK-P10-NEXT: lis r5, -15264
6846 ; CHECK-P10-NEXT: and r3, r3, r5
6847 ; CHECK-P10-NEXT: pstw r4, 999990000(r3), 0
6848 ; CHECK-P10-NEXT: blr
6850 ; CHECK-PREP10-LABEL: st_disjoint_align32_int16_t_uint32_t:
6851 ; CHECK-PREP10: # %bb.0: # %entry
6852 ; CHECK-PREP10-NEXT: lis r5, -15264
6853 ; CHECK-PREP10-NEXT: and r3, r3, r5
6854 ; CHECK-PREP10-NEXT: lis r5, 15258
6855 ; CHECK-PREP10-NEXT: ori r5, r5, 41712
6856 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
6857 ; CHECK-PREP10-NEXT: blr
6859 %and = and i64 %ptr, -1000341504
6860 %conv = sext i16 %str to i32
6861 %or = or i64 %and, 999990000
6862 %0 = inttoptr i64 %or to ptr
6863 store i32 %conv, ptr %0, align 16
6867 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6868 define dso_local void @st_not_disjoint64_int16_t_uint32_t(i64 %ptr, i16 signext %str) {
6869 ; CHECK-P10-LABEL: st_not_disjoint64_int16_t_uint32_t:
6870 ; CHECK-P10: # %bb.0: # %entry
6871 ; CHECK-P10-NEXT: pli r5, 232
6872 ; CHECK-P10-NEXT: pli r6, 3567587329
6873 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
6874 ; CHECK-P10-NEXT: or r3, r3, r6
6875 ; CHECK-P10-NEXT: stw r4, 0(r3)
6876 ; CHECK-P10-NEXT: blr
6878 ; CHECK-PREP10-LABEL: st_not_disjoint64_int16_t_uint32_t:
6879 ; CHECK-PREP10: # %bb.0: # %entry
6880 ; CHECK-PREP10-NEXT: li r5, 29
6881 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
6882 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
6883 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
6884 ; CHECK-PREP10-NEXT: or r3, r3, r5
6885 ; CHECK-PREP10-NEXT: stw r4, 0(r3)
6886 ; CHECK-PREP10-NEXT: blr
6888 %conv = sext i16 %str to i32
6889 %or = or i64 %ptr, 1000000000001
6890 %0 = inttoptr i64 %or to ptr
6891 store i32 %conv, ptr %0, align 4
6895 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6896 define dso_local void @st_disjoint_align64_int16_t_uint32_t(i64 %ptr, i16 signext %str) {
6897 ; CHECK-P10-LABEL: st_disjoint_align64_int16_t_uint32_t:
6898 ; CHECK-P10: # %bb.0: # %entry
6899 ; CHECK-P10-NEXT: pli r5, 244140625
6900 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
6901 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
6902 ; CHECK-P10-NEXT: stwx r4, r3, r5
6903 ; CHECK-P10-NEXT: blr
6905 ; CHECK-PREP10-LABEL: st_disjoint_align64_int16_t_uint32_t:
6906 ; CHECK-PREP10: # %bb.0: # %entry
6907 ; CHECK-PREP10-NEXT: lis r5, 3725
6908 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
6909 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
6910 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
6911 ; CHECK-PREP10-NEXT: stwx r4, r3, r5
6912 ; CHECK-PREP10-NEXT: blr
6914 %and = and i64 %ptr, -1099511627776
6915 %conv = sext i16 %str to i32
6916 %or = or i64 %and, 1000000000000
6917 %0 = inttoptr i64 %or to ptr
6918 store i32 %conv, ptr %0, align 4096
6922 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6923 define dso_local void @st_cst_align16_int16_t_uint32_t(i16 signext %str) {
6924 ; CHECK-LABEL: st_cst_align16_int16_t_uint32_t:
6925 ; CHECK: # %bb.0: # %entry
6926 ; CHECK-NEXT: stw r3, 4080(0)
6929 %conv = sext i16 %str to i32
6930 store i32 %conv, ptr inttoptr (i64 4080 to ptr), align 16
6934 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6935 define dso_local void @st_cst_align32_int16_t_uint32_t(i16 signext %str) {
6936 ; CHECK-LABEL: st_cst_align32_int16_t_uint32_t:
6937 ; CHECK: # %bb.0: # %entry
6938 ; CHECK-NEXT: lis r4, 153
6939 ; CHECK-NEXT: stw r3, -27108(r4)
6942 %conv = sext i16 %str to i32
6943 store i32 %conv, ptr inttoptr (i64 9999900 to ptr), align 4
6947 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6948 define dso_local void @st_cst_align64_int16_t_uint32_t(i16 signext %str) {
6949 ; CHECK-P10-LABEL: st_cst_align64_int16_t_uint32_t:
6950 ; CHECK-P10: # %bb.0: # %entry
6951 ; CHECK-P10-NEXT: pli r4, 244140625
6952 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
6953 ; CHECK-P10-NEXT: stw r3, 0(r4)
6954 ; CHECK-P10-NEXT: blr
6956 ; CHECK-PREP10-LABEL: st_cst_align64_int16_t_uint32_t:
6957 ; CHECK-PREP10: # %bb.0: # %entry
6958 ; CHECK-PREP10-NEXT: lis r4, 3725
6959 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
6960 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
6961 ; CHECK-PREP10-NEXT: stw r3, 0(r4)
6962 ; CHECK-PREP10-NEXT: blr
6964 %conv = sext i16 %str to i32
6965 store i32 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
6969 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6970 define dso_local void @st_0_int16_t_uint64_t(i64 %ptr, i16 signext %str) {
6971 ; CHECK-LABEL: st_0_int16_t_uint64_t:
6972 ; CHECK: # %bb.0: # %entry
6973 ; CHECK-NEXT: std r4, 0(r3)
6976 %conv = sext i16 %str to i64
6977 %0 = inttoptr i64 %ptr to ptr
6978 store i64 %conv, ptr %0, align 8
6982 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6983 define dso_local void @st_align16_int16_t_uint64_t(ptr nocapture %ptr, i16 signext %str) {
6984 ; CHECK-LABEL: st_align16_int16_t_uint64_t:
6985 ; CHECK: # %bb.0: # %entry
6986 ; CHECK-NEXT: std r4, 8(r3)
6989 %conv = sext i16 %str to i64
6990 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
6991 store i64 %conv, ptr %add.ptr, align 8
6995 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
6996 define dso_local void @st_align32_int16_t_uint64_t(ptr nocapture %ptr, i16 signext %str) {
6997 ; CHECK-P10-LABEL: st_align32_int16_t_uint64_t:
6998 ; CHECK-P10: # %bb.0: # %entry
6999 ; CHECK-P10-NEXT: pstd r4, 99999000(r3), 0
7000 ; CHECK-P10-NEXT: blr
7002 ; CHECK-PREP10-LABEL: st_align32_int16_t_uint64_t:
7003 ; CHECK-PREP10: # %bb.0: # %entry
7004 ; CHECK-PREP10-NEXT: lis r5, 1525
7005 ; CHECK-PREP10-NEXT: ori r5, r5, 56600
7006 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
7007 ; CHECK-PREP10-NEXT: blr
7009 %conv = sext i16 %str to i64
7010 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
7011 store i64 %conv, ptr %add.ptr, align 8
7015 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7016 define dso_local void @st_align64_int16_t_uint64_t(ptr nocapture %ptr, i16 signext %str) {
7017 ; CHECK-P10-LABEL: st_align64_int16_t_uint64_t:
7018 ; CHECK-P10: # %bb.0: # %entry
7019 ; CHECK-P10-NEXT: pli r5, 244140625
7020 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
7021 ; CHECK-P10-NEXT: stdx r4, r3, r5
7022 ; CHECK-P10-NEXT: blr
7024 ; CHECK-PREP10-LABEL: st_align64_int16_t_uint64_t:
7025 ; CHECK-PREP10: # %bb.0: # %entry
7026 ; CHECK-PREP10-NEXT: lis r5, 3725
7027 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
7028 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
7029 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
7030 ; CHECK-PREP10-NEXT: blr
7032 %conv = sext i16 %str to i64
7033 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
7034 store i64 %conv, ptr %add.ptr, align 8
7038 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7039 define dso_local void @st_reg_int16_t_uint64_t(ptr nocapture %ptr, i64 %off, i16 signext %str) {
7040 ; CHECK-LABEL: st_reg_int16_t_uint64_t:
7041 ; CHECK: # %bb.0: # %entry
7042 ; CHECK-NEXT: stdx r5, r3, r4
7045 %conv = sext i16 %str to i64
7046 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
7047 store i64 %conv, ptr %add.ptr, align 8
7051 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7052 define dso_local void @st_or1_int16_t_uint64_t(i64 %ptr, i8 zeroext %off, i16 signext %str) {
7053 ; CHECK-LABEL: st_or1_int16_t_uint64_t:
7054 ; CHECK: # %bb.0: # %entry
7055 ; CHECK-NEXT: or r3, r4, r3
7056 ; CHECK-NEXT: std r5, 0(r3)
7059 %conv = sext i16 %str to i64
7060 %conv1 = zext i8 %off to i64
7061 %or = or i64 %conv1, %ptr
7062 %0 = inttoptr i64 %or to ptr
7063 store i64 %conv, ptr %0, align 8
7067 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7068 define dso_local void @st_not_disjoint16_int16_t_uint64_t(i64 %ptr, i16 signext %str) {
7069 ; CHECK-LABEL: st_not_disjoint16_int16_t_uint64_t:
7070 ; CHECK: # %bb.0: # %entry
7071 ; CHECK-NEXT: ori r3, r3, 6
7072 ; CHECK-NEXT: std r4, 0(r3)
7075 %conv = sext i16 %str to i64
7076 %or = or i64 %ptr, 6
7077 %0 = inttoptr i64 %or to ptr
7078 store i64 %conv, ptr %0, align 8
7082 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7083 define dso_local void @st_disjoint_align16_int16_t_uint64_t(i64 %ptr, i16 signext %str) {
7084 ; CHECK-LABEL: st_disjoint_align16_int16_t_uint64_t:
7085 ; CHECK: # %bb.0: # %entry
7086 ; CHECK-NEXT: rldicr r3, r3, 0, 51
7087 ; CHECK-NEXT: std r4, 24(r3)
7090 %and = and i64 %ptr, -4096
7091 %conv = sext i16 %str to i64
7092 %or = or i64 %and, 24
7093 %0 = inttoptr i64 %or to ptr
7094 store i64 %conv, ptr %0, align 8
7098 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7099 define dso_local void @st_not_disjoint32_int16_t_uint64_t(i64 %ptr, i16 signext %str) {
7100 ; CHECK-LABEL: st_not_disjoint32_int16_t_uint64_t:
7101 ; CHECK: # %bb.0: # %entry
7102 ; CHECK-NEXT: ori r3, r3, 34463
7103 ; CHECK-NEXT: oris r3, r3, 1
7104 ; CHECK-NEXT: std r4, 0(r3)
7107 %conv = sext i16 %str to i64
7108 %or = or i64 %ptr, 99999
7109 %0 = inttoptr i64 %or to ptr
7110 store i64 %conv, ptr %0, align 8
7114 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7115 define dso_local void @st_disjoint_align32_int16_t_uint64_t(i64 %ptr, i16 signext %str) {
7116 ; CHECK-P10-LABEL: st_disjoint_align32_int16_t_uint64_t:
7117 ; CHECK-P10: # %bb.0: # %entry
7118 ; CHECK-P10-NEXT: lis r5, -15264
7119 ; CHECK-P10-NEXT: and r3, r3, r5
7120 ; CHECK-P10-NEXT: pstd r4, 999990000(r3), 0
7121 ; CHECK-P10-NEXT: blr
7123 ; CHECK-PREP10-LABEL: st_disjoint_align32_int16_t_uint64_t:
7124 ; CHECK-PREP10: # %bb.0: # %entry
7125 ; CHECK-PREP10-NEXT: lis r5, -15264
7126 ; CHECK-PREP10-NEXT: and r3, r3, r5
7127 ; CHECK-PREP10-NEXT: lis r5, 15258
7128 ; CHECK-PREP10-NEXT: ori r5, r5, 41712
7129 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
7130 ; CHECK-PREP10-NEXT: blr
7132 %and = and i64 %ptr, -1000341504
7133 %conv = sext i16 %str to i64
7134 %or = or i64 %and, 999990000
7135 %0 = inttoptr i64 %or to ptr
7136 store i64 %conv, ptr %0, align 16
7140 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7141 define dso_local void @st_not_disjoint64_int16_t_uint64_t(i64 %ptr, i16 signext %str) {
7142 ; CHECK-P10-LABEL: st_not_disjoint64_int16_t_uint64_t:
7143 ; CHECK-P10: # %bb.0: # %entry
7144 ; CHECK-P10-NEXT: pli r5, 232
7145 ; CHECK-P10-NEXT: pli r6, 3567587329
7146 ; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
7147 ; CHECK-P10-NEXT: or r3, r3, r6
7148 ; CHECK-P10-NEXT: std r4, 0(r3)
7149 ; CHECK-P10-NEXT: blr
7151 ; CHECK-PREP10-LABEL: st_not_disjoint64_int16_t_uint64_t:
7152 ; CHECK-PREP10: # %bb.0: # %entry
7153 ; CHECK-PREP10-NEXT: li r5, 29
7154 ; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
7155 ; CHECK-PREP10-NEXT: oris r5, r5, 54437
7156 ; CHECK-PREP10-NEXT: ori r5, r5, 4097
7157 ; CHECK-PREP10-NEXT: or r3, r3, r5
7158 ; CHECK-PREP10-NEXT: std r4, 0(r3)
7159 ; CHECK-PREP10-NEXT: blr
7161 %conv = sext i16 %str to i64
7162 %or = or i64 %ptr, 1000000000001
7163 %0 = inttoptr i64 %or to ptr
7164 store i64 %conv, ptr %0, align 8
7168 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7169 define dso_local void @st_disjoint_align64_int16_t_uint64_t(i64 %ptr, i16 signext %str) {
7170 ; CHECK-P10-LABEL: st_disjoint_align64_int16_t_uint64_t:
7171 ; CHECK-P10: # %bb.0: # %entry
7172 ; CHECK-P10-NEXT: pli r5, 244140625
7173 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
7174 ; CHECK-P10-NEXT: rldic r5, r5, 12, 24
7175 ; CHECK-P10-NEXT: stdx r4, r3, r5
7176 ; CHECK-P10-NEXT: blr
7178 ; CHECK-PREP10-LABEL: st_disjoint_align64_int16_t_uint64_t:
7179 ; CHECK-PREP10: # %bb.0: # %entry
7180 ; CHECK-PREP10-NEXT: lis r5, 3725
7181 ; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
7182 ; CHECK-PREP10-NEXT: ori r5, r5, 19025
7183 ; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
7184 ; CHECK-PREP10-NEXT: stdx r4, r3, r5
7185 ; CHECK-PREP10-NEXT: blr
7187 %and = and i64 %ptr, -1099511627776
7188 %conv = sext i16 %str to i64
7189 %or = or i64 %and, 1000000000000
7190 %0 = inttoptr i64 %or to ptr
7191 store i64 %conv, ptr %0, align 4096
7195 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7196 define dso_local void @st_cst_align16_int16_t_uint64_t(i16 signext %str) {
7197 ; CHECK-LABEL: st_cst_align16_int16_t_uint64_t:
7198 ; CHECK: # %bb.0: # %entry
7199 ; CHECK-NEXT: std r3, 4080(0)
7202 %conv = sext i16 %str to i64
7203 store i64 %conv, ptr inttoptr (i64 4080 to ptr), align 16
7207 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7208 define dso_local void @st_cst_align32_int16_t_uint64_t(i16 signext %str) {
7209 ; CHECK-LABEL: st_cst_align32_int16_t_uint64_t:
7210 ; CHECK: # %bb.0: # %entry
7211 ; CHECK-NEXT: lis r4, 153
7212 ; CHECK-NEXT: std r3, -27108(r4)
7215 %conv = sext i16 %str to i64
7216 store i64 %conv, ptr inttoptr (i64 9999900 to ptr), align 8
7220 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7221 define dso_local void @st_cst_align64_int16_t_uint64_t(i16 signext %str) {
7222 ; CHECK-P10-LABEL: st_cst_align64_int16_t_uint64_t:
7223 ; CHECK-P10: # %bb.0: # %entry
7224 ; CHECK-P10-NEXT: pli r4, 244140625
7225 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7226 ; CHECK-P10-NEXT: std r3, 0(r4)
7227 ; CHECK-P10-NEXT: blr
7229 ; CHECK-PREP10-LABEL: st_cst_align64_int16_t_uint64_t:
7230 ; CHECK-PREP10: # %bb.0: # %entry
7231 ; CHECK-PREP10-NEXT: lis r4, 3725
7232 ; CHECK-PREP10-NEXT: ori r4, r4, 19025
7233 ; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
7234 ; CHECK-PREP10-NEXT: std r3, 0(r4)
7235 ; CHECK-PREP10-NEXT: blr
7237 %conv = sext i16 %str to i64
7238 store i64 %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
7242 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7243 define dso_local void @st_0_int16_t_float(i64 %ptr, i16 signext %str) {
7244 ; CHECK-LABEL: st_0_int16_t_float:
7245 ; CHECK: # %bb.0: # %entry
7246 ; CHECK-NEXT: mtfprwa f0, r4
7247 ; CHECK-NEXT: xscvsxdsp f0, f0
7248 ; CHECK-NEXT: stfs f0, 0(r3)
7251 %conv = sitofp i16 %str to float
7252 %0 = inttoptr i64 %ptr to ptr
7253 store float %conv, ptr %0, align 4
7257 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7258 define dso_local void @st_align16_int16_t_float(ptr nocapture %ptr, i16 signext %str) {
7259 ; CHECK-LABEL: st_align16_int16_t_float:
7260 ; CHECK: # %bb.0: # %entry
7261 ; CHECK-NEXT: mtfprwa f0, r4
7262 ; CHECK-NEXT: xscvsxdsp f0, f0
7263 ; CHECK-NEXT: stfs f0, 8(r3)
7266 %conv = sitofp i16 %str to float
7267 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
7268 store float %conv, ptr %add.ptr, align 4
7272 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7273 define dso_local void @st_align32_int16_t_float(ptr nocapture %ptr, i16 signext %str) {
7274 ; CHECK-P10-LABEL: st_align32_int16_t_float:
7275 ; CHECK-P10: # %bb.0: # %entry
7276 ; CHECK-P10-NEXT: mtfprwa f0, r4
7277 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
7278 ; CHECK-P10-NEXT: pstfs f0, 99999000(r3), 0
7279 ; CHECK-P10-NEXT: blr
7281 ; CHECK-P9-LABEL: st_align32_int16_t_float:
7282 ; CHECK-P9: # %bb.0: # %entry
7283 ; CHECK-P9-NEXT: mtfprwa f0, r4
7284 ; CHECK-P9-NEXT: lis r4, 1525
7285 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
7286 ; CHECK-P9-NEXT: ori r4, r4, 56600
7287 ; CHECK-P9-NEXT: stfsx f0, r3, r4
7288 ; CHECK-P9-NEXT: blr
7290 ; CHECK-P8-LABEL: st_align32_int16_t_float:
7291 ; CHECK-P8: # %bb.0: # %entry
7292 ; CHECK-P8-NEXT: mtfprwa f0, r4
7293 ; CHECK-P8-NEXT: lis r4, 1525
7294 ; CHECK-P8-NEXT: ori r4, r4, 56600
7295 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
7296 ; CHECK-P8-NEXT: stfsx f0, r3, r4
7297 ; CHECK-P8-NEXT: blr
7299 %conv = sitofp i16 %str to float
7300 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
7301 store float %conv, ptr %add.ptr, align 4
7305 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7306 define dso_local void @st_align64_int16_t_float(ptr nocapture %ptr, i16 signext %str) {
7307 ; CHECK-P10-LABEL: st_align64_int16_t_float:
7308 ; CHECK-P10: # %bb.0: # %entry
7309 ; CHECK-P10-NEXT: mtfprwa f0, r4
7310 ; CHECK-P10-NEXT: pli r4, 244140625
7311 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7312 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
7313 ; CHECK-P10-NEXT: stfsx f0, r3, r4
7314 ; CHECK-P10-NEXT: blr
7316 ; CHECK-P9-LABEL: st_align64_int16_t_float:
7317 ; CHECK-P9: # %bb.0: # %entry
7318 ; CHECK-P9-NEXT: mtfprwa f0, r4
7319 ; CHECK-P9-NEXT: lis r4, 3725
7320 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
7321 ; CHECK-P9-NEXT: ori r4, r4, 19025
7322 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
7323 ; CHECK-P9-NEXT: stfsx f0, r3, r4
7324 ; CHECK-P9-NEXT: blr
7326 ; CHECK-P8-LABEL: st_align64_int16_t_float:
7327 ; CHECK-P8: # %bb.0: # %entry
7328 ; CHECK-P8-NEXT: mtfprwa f0, r4
7329 ; CHECK-P8-NEXT: lis r4, 3725
7330 ; CHECK-P8-NEXT: ori r4, r4, 19025
7331 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
7332 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
7333 ; CHECK-P8-NEXT: stfsx f0, r3, r4
7334 ; CHECK-P8-NEXT: blr
7336 %conv = sitofp i16 %str to float
7337 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
7338 store float %conv, ptr %add.ptr, align 4
7342 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7343 define dso_local void @st_reg_int16_t_float(ptr nocapture %ptr, i64 %off, i16 signext %str) {
7344 ; CHECK-LABEL: st_reg_int16_t_float:
7345 ; CHECK: # %bb.0: # %entry
7346 ; CHECK-NEXT: mtfprwa f0, r5
7347 ; CHECK-NEXT: xscvsxdsp f0, f0
7348 ; CHECK-NEXT: stfsx f0, r3, r4
7351 %conv = sitofp i16 %str to float
7352 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
7353 store float %conv, ptr %add.ptr, align 4
7357 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7358 define dso_local void @st_or1_int16_t_float(i64 %ptr, i8 zeroext %off, i16 signext %str) {
7359 ; CHECK-LABEL: st_or1_int16_t_float:
7360 ; CHECK: # %bb.0: # %entry
7361 ; CHECK-NEXT: mtfprwa f0, r5
7362 ; CHECK-NEXT: or r3, r4, r3
7363 ; CHECK-NEXT: xscvsxdsp f0, f0
7364 ; CHECK-NEXT: stfs f0, 0(r3)
7367 %conv = sitofp i16 %str to float
7368 %conv1 = zext i8 %off to i64
7369 %or = or i64 %conv1, %ptr
7370 %0 = inttoptr i64 %or to ptr
7371 store float %conv, ptr %0, align 4
7375 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7376 define dso_local void @st_not_disjoint16_int16_t_float(i64 %ptr, i16 signext %str) {
7377 ; CHECK-LABEL: st_not_disjoint16_int16_t_float:
7378 ; CHECK: # %bb.0: # %entry
7379 ; CHECK-NEXT: mtfprwa f0, r4
7380 ; CHECK-NEXT: ori r3, r3, 6
7381 ; CHECK-NEXT: xscvsxdsp f0, f0
7382 ; CHECK-NEXT: stfs f0, 0(r3)
7385 %conv = sitofp i16 %str to float
7386 %or = or i64 %ptr, 6
7387 %0 = inttoptr i64 %or to ptr
7388 store float %conv, ptr %0, align 4
7392 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7393 define dso_local void @st_disjoint_align16_int16_t_float(i64 %ptr, i16 signext %str) {
7394 ; CHECK-LABEL: st_disjoint_align16_int16_t_float:
7395 ; CHECK: # %bb.0: # %entry
7396 ; CHECK-NEXT: mtfprwa f0, r4
7397 ; CHECK-NEXT: rldicr r3, r3, 0, 51
7398 ; CHECK-NEXT: xscvsxdsp f0, f0
7399 ; CHECK-NEXT: stfs f0, 24(r3)
7402 %and = and i64 %ptr, -4096
7403 %conv = sitofp i16 %str to float
7404 %or = or i64 %and, 24
7405 %0 = inttoptr i64 %or to ptr
7406 store float %conv, ptr %0, align 8
7410 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7411 define dso_local void @st_not_disjoint32_int16_t_float(i64 %ptr, i16 signext %str) {
7412 ; CHECK-P10-LABEL: st_not_disjoint32_int16_t_float:
7413 ; CHECK-P10: # %bb.0: # %entry
7414 ; CHECK-P10-NEXT: mtfprwa f0, r4
7415 ; CHECK-P10-NEXT: ori r3, r3, 34463
7416 ; CHECK-P10-NEXT: oris r3, r3, 1
7417 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
7418 ; CHECK-P10-NEXT: stfs f0, 0(r3)
7419 ; CHECK-P10-NEXT: blr
7421 ; CHECK-P9-LABEL: st_not_disjoint32_int16_t_float:
7422 ; CHECK-P9: # %bb.0: # %entry
7423 ; CHECK-P9-NEXT: mtfprwa f0, r4
7424 ; CHECK-P9-NEXT: ori r3, r3, 34463
7425 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
7426 ; CHECK-P9-NEXT: oris r3, r3, 1
7427 ; CHECK-P9-NEXT: stfs f0, 0(r3)
7428 ; CHECK-P9-NEXT: blr
7430 ; CHECK-P8-LABEL: st_not_disjoint32_int16_t_float:
7431 ; CHECK-P8: # %bb.0: # %entry
7432 ; CHECK-P8-NEXT: mtfprwa f0, r4
7433 ; CHECK-P8-NEXT: ori r3, r3, 34463
7434 ; CHECK-P8-NEXT: oris r3, r3, 1
7435 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
7436 ; CHECK-P8-NEXT: stfs f0, 0(r3)
7437 ; CHECK-P8-NEXT: blr
7439 %conv = sitofp i16 %str to float
7440 %or = or i64 %ptr, 99999
7441 %0 = inttoptr i64 %or to ptr
7442 store float %conv, ptr %0, align 4
7446 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7447 define dso_local void @st_disjoint_align32_int16_t_float(i64 %ptr, i16 signext %str) {
7448 ; CHECK-P10-LABEL: st_disjoint_align32_int16_t_float:
7449 ; CHECK-P10: # %bb.0: # %entry
7450 ; CHECK-P10-NEXT: mtfprwa f0, r4
7451 ; CHECK-P10-NEXT: lis r5, -15264
7452 ; CHECK-P10-NEXT: and r3, r3, r5
7453 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
7454 ; CHECK-P10-NEXT: pstfs f0, 999990000(r3), 0
7455 ; CHECK-P10-NEXT: blr
7457 ; CHECK-P9-LABEL: st_disjoint_align32_int16_t_float:
7458 ; CHECK-P9: # %bb.0: # %entry
7459 ; CHECK-P9-NEXT: mtfprwa f0, r4
7460 ; CHECK-P9-NEXT: lis r5, -15264
7461 ; CHECK-P9-NEXT: lis r4, 15258
7462 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
7463 ; CHECK-P9-NEXT: and r3, r3, r5
7464 ; CHECK-P9-NEXT: ori r4, r4, 41712
7465 ; CHECK-P9-NEXT: stfsx f0, r3, r4
7466 ; CHECK-P9-NEXT: blr
7468 ; CHECK-P8-LABEL: st_disjoint_align32_int16_t_float:
7469 ; CHECK-P8: # %bb.0: # %entry
7470 ; CHECK-P8-NEXT: mtfprwa f0, r4
7471 ; CHECK-P8-NEXT: lis r5, -15264
7472 ; CHECK-P8-NEXT: lis r4, 15258
7473 ; CHECK-P8-NEXT: and r3, r3, r5
7474 ; CHECK-P8-NEXT: ori r4, r4, 41712
7475 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
7476 ; CHECK-P8-NEXT: stfsx f0, r3, r4
7477 ; CHECK-P8-NEXT: blr
7479 %and = and i64 %ptr, -1000341504
7480 %conv = sitofp i16 %str to float
7481 %or = or i64 %and, 999990000
7482 %0 = inttoptr i64 %or to ptr
7483 store float %conv, ptr %0, align 16
7487 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7488 define dso_local void @st_not_disjoint64_int16_t_float(i64 %ptr, i16 signext %str) {
7489 ; CHECK-P10-LABEL: st_not_disjoint64_int16_t_float:
7490 ; CHECK-P10: # %bb.0: # %entry
7491 ; CHECK-P10-NEXT: mtfprwa f0, r4
7492 ; CHECK-P10-NEXT: pli r4, 232
7493 ; CHECK-P10-NEXT: pli r5, 3567587329
7494 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
7495 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
7496 ; CHECK-P10-NEXT: or r3, r3, r5
7497 ; CHECK-P10-NEXT: stfs f0, 0(r3)
7498 ; CHECK-P10-NEXT: blr
7500 ; CHECK-P9-LABEL: st_not_disjoint64_int16_t_float:
7501 ; CHECK-P9: # %bb.0: # %entry
7502 ; CHECK-P9-NEXT: mtfprwa f0, r4
7503 ; CHECK-P9-NEXT: li r4, 29
7504 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
7505 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
7506 ; CHECK-P9-NEXT: oris r4, r4, 54437
7507 ; CHECK-P9-NEXT: ori r4, r4, 4097
7508 ; CHECK-P9-NEXT: or r3, r3, r4
7509 ; CHECK-P9-NEXT: stfs f0, 0(r3)
7510 ; CHECK-P9-NEXT: blr
7512 ; CHECK-P8-LABEL: st_not_disjoint64_int16_t_float:
7513 ; CHECK-P8: # %bb.0: # %entry
7514 ; CHECK-P8-NEXT: mtfprwa f0, r4
7515 ; CHECK-P8-NEXT: li r4, 29
7516 ; CHECK-P8-NEXT: rldic r4, r4, 35, 24
7517 ; CHECK-P8-NEXT: oris r4, r4, 54437
7518 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
7519 ; CHECK-P8-NEXT: ori r4, r4, 4097
7520 ; CHECK-P8-NEXT: or r3, r3, r4
7521 ; CHECK-P8-NEXT: stfs f0, 0(r3)
7522 ; CHECK-P8-NEXT: blr
7524 %conv = sitofp i16 %str to float
7525 %or = or i64 %ptr, 1000000000001
7526 %0 = inttoptr i64 %or to ptr
7527 store float %conv, ptr %0, align 4
7532 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7533 define dso_local void @st_disjoint_align64_int16_t_float(i64 %ptr, i16 signext %str) {
7534 ; CHECK-P10-LABEL: st_disjoint_align64_int16_t_float:
7535 ; CHECK-P10: # %bb.0: # %entry
7536 ; CHECK-P10-NEXT: mtfprwa f0, r4
7537 ; CHECK-P10-NEXT: pli r4, 244140625
7538 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
7539 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7540 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
7541 ; CHECK-P10-NEXT: stfsx f0, r3, r4
7542 ; CHECK-P10-NEXT: blr
7544 ; CHECK-P9-LABEL: st_disjoint_align64_int16_t_float:
7545 ; CHECK-P9: # %bb.0: # %entry
7546 ; CHECK-P9-NEXT: mtfprwa f0, r4
7547 ; CHECK-P9-NEXT: lis r4, 3725
7548 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
7549 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
7550 ; CHECK-P9-NEXT: ori r4, r4, 19025
7551 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
7552 ; CHECK-P9-NEXT: stfsx f0, r3, r4
7553 ; CHECK-P9-NEXT: blr
7555 ; CHECK-P8-LABEL: st_disjoint_align64_int16_t_float:
7556 ; CHECK-P8: # %bb.0: # %entry
7557 ; CHECK-P8-NEXT: mtfprwa f0, r4
7558 ; CHECK-P8-NEXT: lis r4, 3725
7559 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
7560 ; CHECK-P8-NEXT: ori r4, r4, 19025
7561 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
7562 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
7563 ; CHECK-P8-NEXT: stfsx f0, r3, r4
7564 ; CHECK-P8-NEXT: blr
7566 %and = and i64 %ptr, -1099511627776
7567 %conv = sitofp i16 %str to float
7568 %or = or i64 %and, 1000000000000
7569 %0 = inttoptr i64 %or to ptr
7570 store float %conv, ptr %0, align 4096
7574 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7575 define dso_local void @st_cst_align16_int16_t_float(i16 signext %str) {
7576 ; CHECK-LABEL: st_cst_align16_int16_t_float:
7577 ; CHECK: # %bb.0: # %entry
7578 ; CHECK-NEXT: mtfprwa f0, r3
7579 ; CHECK-NEXT: xscvsxdsp f0, f0
7580 ; CHECK-NEXT: stfs f0, 4080(0)
7583 %conv = sitofp i16 %str to float
7584 store float %conv, ptr inttoptr (i64 4080 to ptr), align 16
7588 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7589 define dso_local void @st_cst_align32_int16_t_float(i16 signext %str) {
7590 ; CHECK-LABEL: st_cst_align32_int16_t_float:
7591 ; CHECK: # %bb.0: # %entry
7592 ; CHECK-NEXT: mtfprwa f0, r3
7593 ; CHECK-NEXT: lis r3, 153
7594 ; CHECK-NEXT: xscvsxdsp f0, f0
7595 ; CHECK-NEXT: stfs f0, -27108(r3)
7598 %conv = sitofp i16 %str to float
7599 store float %conv, ptr inttoptr (i64 9999900 to ptr), align 4
7603 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7604 define dso_local void @st_cst_align64_int16_t_float(i16 signext %str) {
7605 ; CHECK-P10-LABEL: st_cst_align64_int16_t_float:
7606 ; CHECK-P10: # %bb.0: # %entry
7607 ; CHECK-P10-NEXT: mtfprwa f0, r3
7608 ; CHECK-P10-NEXT: pli r3, 244140625
7609 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
7610 ; CHECK-P10-NEXT: xscvsxdsp f0, f0
7611 ; CHECK-P10-NEXT: stfs f0, 0(r3)
7612 ; CHECK-P10-NEXT: blr
7614 ; CHECK-P9-LABEL: st_cst_align64_int16_t_float:
7615 ; CHECK-P9: # %bb.0: # %entry
7616 ; CHECK-P9-NEXT: mtfprwa f0, r3
7617 ; CHECK-P9-NEXT: lis r3, 3725
7618 ; CHECK-P9-NEXT: xscvsxdsp f0, f0
7619 ; CHECK-P9-NEXT: ori r3, r3, 19025
7620 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
7621 ; CHECK-P9-NEXT: stfs f0, 0(r3)
7622 ; CHECK-P9-NEXT: blr
7624 ; CHECK-P8-LABEL: st_cst_align64_int16_t_float:
7625 ; CHECK-P8: # %bb.0: # %entry
7626 ; CHECK-P8-NEXT: mtfprwa f0, r3
7627 ; CHECK-P8-NEXT: lis r3, 3725
7628 ; CHECK-P8-NEXT: ori r3, r3, 19025
7629 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
7630 ; CHECK-P8-NEXT: xscvsxdsp f0, f0
7631 ; CHECK-P8-NEXT: stfs f0, 0(r3)
7632 ; CHECK-P8-NEXT: blr
7634 %conv = sitofp i16 %str to float
7635 store float %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096
7639 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7640 define dso_local void @st_0_int16_t_double(i64 %ptr, i16 signext %str) {
7641 ; CHECK-LABEL: st_0_int16_t_double:
7642 ; CHECK: # %bb.0: # %entry
7643 ; CHECK-NEXT: mtfprwa f0, r4
7644 ; CHECK-NEXT: xscvsxddp f0, f0
7645 ; CHECK-NEXT: stfd f0, 0(r3)
7648 %conv = sitofp i16 %str to double
7649 %0 = inttoptr i64 %ptr to ptr
7650 store double %conv, ptr %0, align 8
7654 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7655 define dso_local void @st_align16_int16_t_double(ptr nocapture %ptr, i16 signext %str) {
7656 ; CHECK-LABEL: st_align16_int16_t_double:
7657 ; CHECK: # %bb.0: # %entry
7658 ; CHECK-NEXT: mtfprwa f0, r4
7659 ; CHECK-NEXT: xscvsxddp f0, f0
7660 ; CHECK-NEXT: stfd f0, 8(r3)
7663 %conv = sitofp i16 %str to double
7664 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 8
7665 store double %conv, ptr %add.ptr, align 8
7669 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7670 define dso_local void @st_align32_int16_t_double(ptr nocapture %ptr, i16 signext %str) {
7671 ; CHECK-P10-LABEL: st_align32_int16_t_double:
7672 ; CHECK-P10: # %bb.0: # %entry
7673 ; CHECK-P10-NEXT: mtfprwa f0, r4
7674 ; CHECK-P10-NEXT: xscvsxddp f0, f0
7675 ; CHECK-P10-NEXT: pstfd f0, 99999000(r3), 0
7676 ; CHECK-P10-NEXT: blr
7678 ; CHECK-P9-LABEL: st_align32_int16_t_double:
7679 ; CHECK-P9: # %bb.0: # %entry
7680 ; CHECK-P9-NEXT: mtfprwa f0, r4
7681 ; CHECK-P9-NEXT: lis r4, 1525
7682 ; CHECK-P9-NEXT: xscvsxddp f0, f0
7683 ; CHECK-P9-NEXT: ori r4, r4, 56600
7684 ; CHECK-P9-NEXT: stfdx f0, r3, r4
7685 ; CHECK-P9-NEXT: blr
7687 ; CHECK-P8-LABEL: st_align32_int16_t_double:
7688 ; CHECK-P8: # %bb.0: # %entry
7689 ; CHECK-P8-NEXT: mtfprwa f0, r4
7690 ; CHECK-P8-NEXT: lis r4, 1525
7691 ; CHECK-P8-NEXT: ori r4, r4, 56600
7692 ; CHECK-P8-NEXT: xscvsxddp f0, f0
7693 ; CHECK-P8-NEXT: stfdx f0, r3, r4
7694 ; CHECK-P8-NEXT: blr
7696 %conv = sitofp i16 %str to double
7697 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 99999000
7698 store double %conv, ptr %add.ptr, align 8
7702 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7703 define dso_local void @st_align64_int16_t_double(ptr nocapture %ptr, i16 signext %str) {
7704 ; CHECK-P10-LABEL: st_align64_int16_t_double:
7705 ; CHECK-P10: # %bb.0: # %entry
7706 ; CHECK-P10-NEXT: mtfprwa f0, r4
7707 ; CHECK-P10-NEXT: pli r4, 244140625
7708 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7709 ; CHECK-P10-NEXT: xscvsxddp f0, f0
7710 ; CHECK-P10-NEXT: stfdx f0, r3, r4
7711 ; CHECK-P10-NEXT: blr
7713 ; CHECK-P9-LABEL: st_align64_int16_t_double:
7714 ; CHECK-P9: # %bb.0: # %entry
7715 ; CHECK-P9-NEXT: mtfprwa f0, r4
7716 ; CHECK-P9-NEXT: lis r4, 3725
7717 ; CHECK-P9-NEXT: xscvsxddp f0, f0
7718 ; CHECK-P9-NEXT: ori r4, r4, 19025
7719 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
7720 ; CHECK-P9-NEXT: stfdx f0, r3, r4
7721 ; CHECK-P9-NEXT: blr
7723 ; CHECK-P8-LABEL: st_align64_int16_t_double:
7724 ; CHECK-P8: # %bb.0: # %entry
7725 ; CHECK-P8-NEXT: mtfprwa f0, r4
7726 ; CHECK-P8-NEXT: lis r4, 3725
7727 ; CHECK-P8-NEXT: ori r4, r4, 19025
7728 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
7729 ; CHECK-P8-NEXT: xscvsxddp f0, f0
7730 ; CHECK-P8-NEXT: stfdx f0, r3, r4
7731 ; CHECK-P8-NEXT: blr
7733 %conv = sitofp i16 %str to double
7734 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 1000000000000
7735 store double %conv, ptr %add.ptr, align 8
7739 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7740 define dso_local void @st_reg_int16_t_double(ptr nocapture %ptr, i64 %off, i16 signext %str) {
7741 ; CHECK-LABEL: st_reg_int16_t_double:
7742 ; CHECK: # %bb.0: # %entry
7743 ; CHECK-NEXT: mtfprwa f0, r5
7744 ; CHECK-NEXT: xscvsxddp f0, f0
7745 ; CHECK-NEXT: stfdx f0, r3, r4
7748 %conv = sitofp i16 %str to double
7749 %add.ptr = getelementptr inbounds i8, ptr %ptr, i64 %off
7750 store double %conv, ptr %add.ptr, align 8
7754 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7755 define dso_local void @st_or1_int16_t_double(i64 %ptr, i8 zeroext %off, i16 signext %str) {
7756 ; CHECK-LABEL: st_or1_int16_t_double:
7757 ; CHECK: # %bb.0: # %entry
7758 ; CHECK-NEXT: mtfprwa f0, r5
7759 ; CHECK-NEXT: or r3, r4, r3
7760 ; CHECK-NEXT: xscvsxddp f0, f0
7761 ; CHECK-NEXT: stfd f0, 0(r3)
7764 %conv = sitofp i16 %str to double
7765 %conv1 = zext i8 %off to i64
7766 %or = or i64 %conv1, %ptr
7767 %0 = inttoptr i64 %or to ptr
7768 store double %conv, ptr %0, align 8
7772 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7773 define dso_local void @st_not_disjoint16_int16_t_double(i64 %ptr, i16 signext %str) {
7774 ; CHECK-LABEL: st_not_disjoint16_int16_t_double:
7775 ; CHECK: # %bb.0: # %entry
7776 ; CHECK-NEXT: mtfprwa f0, r4
7777 ; CHECK-NEXT: ori r3, r3, 6
7778 ; CHECK-NEXT: xscvsxddp f0, f0
7779 ; CHECK-NEXT: stfd f0, 0(r3)
7782 %conv = sitofp i16 %str to double
7783 %or = or i64 %ptr, 6
7784 %0 = inttoptr i64 %or to ptr
7785 store double %conv, ptr %0, align 8
7789 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7790 define dso_local void @st_disjoint_align16_int16_t_double(i64 %ptr, i16 signext %str) {
7791 ; CHECK-LABEL: st_disjoint_align16_int16_t_double:
7792 ; CHECK: # %bb.0: # %entry
7793 ; CHECK-NEXT: mtfprwa f0, r4
7794 ; CHECK-NEXT: rldicr r3, r3, 0, 51
7795 ; CHECK-NEXT: xscvsxddp f0, f0
7796 ; CHECK-NEXT: stfd f0, 24(r3)
7799 %and = and i64 %ptr, -4096
7800 %conv = sitofp i16 %str to double
7801 %or = or i64 %and, 24
7802 %0 = inttoptr i64 %or to ptr
7803 store double %conv, ptr %0, align 8
7807 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7808 define dso_local void @st_not_disjoint32_int16_t_double(i64 %ptr, i16 signext %str) {
7809 ; CHECK-P10-LABEL: st_not_disjoint32_int16_t_double:
7810 ; CHECK-P10: # %bb.0: # %entry
7811 ; CHECK-P10-NEXT: mtfprwa f0, r4
7812 ; CHECK-P10-NEXT: ori r3, r3, 34463
7813 ; CHECK-P10-NEXT: oris r3, r3, 1
7814 ; CHECK-P10-NEXT: xscvsxddp f0, f0
7815 ; CHECK-P10-NEXT: stfd f0, 0(r3)
7816 ; CHECK-P10-NEXT: blr
7818 ; CHECK-P9-LABEL: st_not_disjoint32_int16_t_double:
7819 ; CHECK-P9: # %bb.0: # %entry
7820 ; CHECK-P9-NEXT: mtfprwa f0, r4
7821 ; CHECK-P9-NEXT: ori r3, r3, 34463
7822 ; CHECK-P9-NEXT: xscvsxddp f0, f0
7823 ; CHECK-P9-NEXT: oris r3, r3, 1
7824 ; CHECK-P9-NEXT: stfd f0, 0(r3)
7825 ; CHECK-P9-NEXT: blr
7827 ; CHECK-P8-LABEL: st_not_disjoint32_int16_t_double:
7828 ; CHECK-P8: # %bb.0: # %entry
7829 ; CHECK-P8-NEXT: mtfprwa f0, r4
7830 ; CHECK-P8-NEXT: ori r3, r3, 34463
7831 ; CHECK-P8-NEXT: oris r3, r3, 1
7832 ; CHECK-P8-NEXT: xscvsxddp f0, f0
7833 ; CHECK-P8-NEXT: stfd f0, 0(r3)
7834 ; CHECK-P8-NEXT: blr
7836 %conv = sitofp i16 %str to double
7837 %or = or i64 %ptr, 99999
7838 %0 = inttoptr i64 %or to ptr
7839 store double %conv, ptr %0, align 8
7843 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7844 define dso_local void @st_disjoint_align32_int16_t_double(i64 %ptr, i16 signext %str) {
7845 ; CHECK-P10-LABEL: st_disjoint_align32_int16_t_double:
7846 ; CHECK-P10: # %bb.0: # %entry
7847 ; CHECK-P10-NEXT: mtfprwa f0, r4
7848 ; CHECK-P10-NEXT: lis r5, -15264
7849 ; CHECK-P10-NEXT: and r3, r3, r5
7850 ; CHECK-P10-NEXT: xscvsxddp f0, f0
7851 ; CHECK-P10-NEXT: pstfd f0, 999990000(r3), 0
7852 ; CHECK-P10-NEXT: blr
7854 ; CHECK-P9-LABEL: st_disjoint_align32_int16_t_double:
7855 ; CHECK-P9: # %bb.0: # %entry
7856 ; CHECK-P9-NEXT: mtfprwa f0, r4
7857 ; CHECK-P9-NEXT: lis r5, -15264
7858 ; CHECK-P9-NEXT: lis r4, 15258
7859 ; CHECK-P9-NEXT: xscvsxddp f0, f0
7860 ; CHECK-P9-NEXT: and r3, r3, r5
7861 ; CHECK-P9-NEXT: ori r4, r4, 41712
7862 ; CHECK-P9-NEXT: stfdx f0, r3, r4
7863 ; CHECK-P9-NEXT: blr
7865 ; CHECK-P8-LABEL: st_disjoint_align32_int16_t_double:
7866 ; CHECK-P8: # %bb.0: # %entry
7867 ; CHECK-P8-NEXT: mtfprwa f0, r4
7868 ; CHECK-P8-NEXT: lis r5, -15264
7869 ; CHECK-P8-NEXT: lis r4, 15258
7870 ; CHECK-P8-NEXT: and r3, r3, r5
7871 ; CHECK-P8-NEXT: ori r4, r4, 41712
7872 ; CHECK-P8-NEXT: xscvsxddp f0, f0
7873 ; CHECK-P8-NEXT: stfdx f0, r3, r4
7874 ; CHECK-P8-NEXT: blr
7876 %and = and i64 %ptr, -1000341504
7877 %conv = sitofp i16 %str to double
7878 %or = or i64 %and, 999990000
7879 %0 = inttoptr i64 %or to ptr
7880 store double %conv, ptr %0, align 16
7884 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7885 define dso_local void @st_not_disjoint64_int16_t_double(i64 %ptr, i16 signext %str) {
7886 ; CHECK-P10-LABEL: st_not_disjoint64_int16_t_double:
7887 ; CHECK-P10: # %bb.0: # %entry
7888 ; CHECK-P10-NEXT: mtfprwa f0, r4
7889 ; CHECK-P10-NEXT: pli r4, 232
7890 ; CHECK-P10-NEXT: pli r5, 3567587329
7891 ; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
7892 ; CHECK-P10-NEXT: xscvsxddp f0, f0
7893 ; CHECK-P10-NEXT: or r3, r3, r5
7894 ; CHECK-P10-NEXT: stfd f0, 0(r3)
7895 ; CHECK-P10-NEXT: blr
7897 ; CHECK-P9-LABEL: st_not_disjoint64_int16_t_double:
7898 ; CHECK-P9: # %bb.0: # %entry
7899 ; CHECK-P9-NEXT: mtfprwa f0, r4
7900 ; CHECK-P9-NEXT: li r4, 29
7901 ; CHECK-P9-NEXT: rldic r4, r4, 35, 24
7902 ; CHECK-P9-NEXT: xscvsxddp f0, f0
7903 ; CHECK-P9-NEXT: oris r4, r4, 54437
7904 ; CHECK-P9-NEXT: ori r4, r4, 4097
7905 ; CHECK-P9-NEXT: or r3, r3, r4
7906 ; CHECK-P9-NEXT: stfd f0, 0(r3)
7907 ; CHECK-P9-NEXT: blr
7909 ; CHECK-P8-LABEL: st_not_disjoint64_int16_t_double:
7910 ; CHECK-P8: # %bb.0: # %entry
7911 ; CHECK-P8-NEXT: mtfprwa f0, r4
7912 ; CHECK-P8-NEXT: li r4, 29
7913 ; CHECK-P8-NEXT: rldic r4, r4, 35, 24
7914 ; CHECK-P8-NEXT: oris r4, r4, 54437
7915 ; CHECK-P8-NEXT: xscvsxddp f0, f0
7916 ; CHECK-P8-NEXT: ori r4, r4, 4097
7917 ; CHECK-P8-NEXT: or r3, r3, r4
7918 ; CHECK-P8-NEXT: stfd f0, 0(r3)
7919 ; CHECK-P8-NEXT: blr
7921 %conv = sitofp i16 %str to double
7922 %or = or i64 %ptr, 1000000000001
7923 %0 = inttoptr i64 %or to ptr
7924 store double %conv, ptr %0, align 8
7928 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7929 define dso_local void @st_disjoint_align64_int16_t_double(i64 %ptr, i16 signext %str) {
7930 ; CHECK-P10-LABEL: st_disjoint_align64_int16_t_double:
7931 ; CHECK-P10: # %bb.0: # %entry
7932 ; CHECK-P10-NEXT: mtfprwa f0, r4
7933 ; CHECK-P10-NEXT: pli r4, 244140625
7934 ; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
7935 ; CHECK-P10-NEXT: rldic r4, r4, 12, 24
7936 ; CHECK-P10-NEXT: xscvsxddp f0, f0
7937 ; CHECK-P10-NEXT: stfdx f0, r3, r4
7938 ; CHECK-P10-NEXT: blr
7940 ; CHECK-P9-LABEL: st_disjoint_align64_int16_t_double:
7941 ; CHECK-P9: # %bb.0: # %entry
7942 ; CHECK-P9-NEXT: mtfprwa f0, r4
7943 ; CHECK-P9-NEXT: lis r4, 3725
7944 ; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
7945 ; CHECK-P9-NEXT: xscvsxddp f0, f0
7946 ; CHECK-P9-NEXT: ori r4, r4, 19025
7947 ; CHECK-P9-NEXT: rldic r4, r4, 12, 24
7948 ; CHECK-P9-NEXT: stfdx f0, r3, r4
7949 ; CHECK-P9-NEXT: blr
7951 ; CHECK-P8-LABEL: st_disjoint_align64_int16_t_double:
7952 ; CHECK-P8: # %bb.0: # %entry
7953 ; CHECK-P8-NEXT: mtfprwa f0, r4
7954 ; CHECK-P8-NEXT: lis r4, 3725
7955 ; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
7956 ; CHECK-P8-NEXT: ori r4, r4, 19025
7957 ; CHECK-P8-NEXT: rldic r4, r4, 12, 24
7958 ; CHECK-P8-NEXT: xscvsxddp f0, f0
7959 ; CHECK-P8-NEXT: stfdx f0, r3, r4
7960 ; CHECK-P8-NEXT: blr
7962 %and = and i64 %ptr, -1099511627776
7963 %conv = sitofp i16 %str to double
7964 %or = or i64 %and, 1000000000000
7965 %0 = inttoptr i64 %or to ptr
7966 store double %conv, ptr %0, align 4096
7970 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7971 define dso_local void @st_cst_align16_int16_t_double(i16 signext %str) {
7972 ; CHECK-LABEL: st_cst_align16_int16_t_double:
7973 ; CHECK: # %bb.0: # %entry
7974 ; CHECK-NEXT: mtfprwa f0, r3
7975 ; CHECK-NEXT: xscvsxddp f0, f0
7976 ; CHECK-NEXT: stfd f0, 4080(0)
7979 %conv = sitofp i16 %str to double
7980 store double %conv, ptr inttoptr (i64 4080 to ptr), align 16
7984 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
7985 define dso_local void @st_cst_align32_int16_t_double(i16 signext %str) {
7986 ; CHECK-LABEL: st_cst_align32_int16_t_double:
7987 ; CHECK: # %bb.0: # %entry
7988 ; CHECK-NEXT: mtfprwa f0, r3
7989 ; CHECK-NEXT: lis r3, 153
7990 ; CHECK-NEXT: xscvsxddp f0, f0
7991 ; CHECK-NEXT: stfd f0, -27108(r3)
7994 %conv = sitofp i16 %str to double
7995 store double %conv, ptr inttoptr (i64 9999900 to ptr), align 8
7999 ; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
8000 define dso_local void @st_cst_align64_int16_t_double(i16 signext %str) {
8001 ; CHECK-P10-LABEL: st_cst_align64_int16_t_double:
8002 ; CHECK-P10: # %bb.0: # %entry
8003 ; CHECK-P10-NEXT: mtfprwa f0, r3
8004 ; CHECK-P10-NEXT: pli r3, 244140625
8005 ; CHECK-P10-NEXT: rldic r3, r3, 12, 24
8006 ; CHECK-P10-NEXT: xscvsxddp f0, f0
8007 ; CHECK-P10-NEXT: stfd f0, 0(r3)
8008 ; CHECK-P10-NEXT: blr
8010 ; CHECK-P9-LABEL: st_cst_align64_int16_t_double:
8011 ; CHECK-P9: # %bb.0: # %entry
8012 ; CHECK-P9-NEXT: mtfprwa f0, r3
8013 ; CHECK-P9-NEXT: lis r3, 3725
8014 ; CHECK-P9-NEXT: xscvsxddp f0, f0
8015 ; CHECK-P9-NEXT: ori r3, r3, 19025
8016 ; CHECK-P9-NEXT: rldic r3, r3, 12, 24
8017 ; CHECK-P9-NEXT: stfd f0, 0(r3)
8018 ; CHECK-P9-NEXT: blr
8020 ; CHECK-P8-LABEL: st_cst_align64_int16_t_double:
8021 ; CHECK-P8: # %bb.0: # %entry
8022 ; CHECK-P8-NEXT: mtfprwa f0, r3
8023 ; CHECK-P8-NEXT: lis r3, 3725
8024 ; CHECK-P8-NEXT: ori r3, r3, 19025
8025 ; CHECK-P8-NEXT: rldic r3, r3, 12, 24
8026 ; CHECK-P8-NEXT: xscvsxddp f0, f0
8027 ; CHECK-P8-NEXT: stfd f0, 0(r3)
8028 ; CHECK-P8-NEXT: blr
8030 %conv = sitofp i16 %str to double
8031 store double %conv, ptr inttoptr (i64 1000000000000 to ptr), align 4096