--- /dev/null
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-P10
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-P10
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P9
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P9
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P8
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P8
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_0_int16_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_int16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = zext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_align16_int16_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_int16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 8(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = zext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_align32_int16_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_int16_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_int16_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = zext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_align64_int16_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_int16_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_int16_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = zext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_reg_int16_t_uint8_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_int16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbzx r3, r3, r4
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = zext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_or_int16_t_uint8_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_int16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv1 = zext i8 %1 to i16
+ ret i16 %conv1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_not_disjoint16_int16_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_int16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = zext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_disjoint_align16_int16_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_int16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lbz r3, 24(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 8
+ %conv = zext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_not_disjoint32_int16_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_int16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = zext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_disjoint_align32_int16_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_int16_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_int16_t_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lbzx r3, r3, r4
+; CHECK-P9-NEXT: clrldi r3, r3, 56
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_int16_t_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: clrldi r3, r3, 56
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 16
+ %conv = zext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_not_disjoint64_int16_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_int16_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_int16_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = zext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_disjoint_align64_int16_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_int16_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_int16_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 4096
+ %conv = zext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_cst_align16_int16_t_uint8_t() {
+; CHECK-LABEL: ld_cst_align16_int16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 4080(0)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 4080 to i8*) monotonic, align 16
+ %conv = zext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_cst_align32_int16_t_uint8_t() {
+; CHECK-LABEL: ld_cst_align32_int16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lbz r3, -27108(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 9999900 to i8*) monotonic, align 4
+ %conv = zext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_cst_align64_int16_t_uint8_t() {
+; CHECK-P10-LABEL: ld_cst_align64_int16_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_int16_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 1000000000000 to i8*) monotonic, align 4096
+ %conv = zext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_0_int16_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_int16_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = sext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_align16_int16_t_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_int16_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 8(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = sext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_align32_int16_t_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_int16_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_int16_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = sext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_align64_int16_t_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_int16_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_int16_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = sext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_reg_int16_t_int8_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_int16_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbzx r3, r3, r4
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = sext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_or_int16_t_int8_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_int16_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv1 = sext i8 %1 to i16
+ ret i16 %conv1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_not_disjoint16_int16_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_int16_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = sext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_disjoint_align16_int16_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_int16_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lbz r3, 24(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 8
+ %conv = sext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_not_disjoint32_int16_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_int16_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = sext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_disjoint_align32_int16_t_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_int16_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_int16_t_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lbzx r3, r3, r4
+; CHECK-P9-NEXT: extsb r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_int16_t_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 16
+ %conv = sext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_not_disjoint64_int16_t_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_int16_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_int16_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = sext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_disjoint_align64_int16_t_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_int16_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_int16_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 4096
+ %conv = sext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_cst_align16_int16_t_int8_t() {
+; CHECK-LABEL: ld_cst_align16_int16_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 4080(0)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 4080 to i8*) monotonic, align 16
+ %conv = sext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_cst_align32_int16_t_int8_t() {
+; CHECK-LABEL: ld_cst_align32_int16_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lbz r3, -27108(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 9999900 to i8*) monotonic, align 4
+ %conv = sext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_cst_align64_int16_t_int8_t() {
+; CHECK-P10-LABEL: ld_cst_align64_int16_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_int16_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 1000000000000 to i8*) monotonic, align 4096
+ %conv = sext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_0_int16_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_int16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ ret i16 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_align16_int16_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_int16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 8(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ ret i16 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_align32_int16_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_int16_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_int16_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsh r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ ret i16 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_align64_int16_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_int16_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_int16_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsh r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ ret i16 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_reg_int16_t_uint16_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_int16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhzx r3, r3, r4
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ ret i16 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_or_int16_t_uint16_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_int16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ ret i16 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_not_disjoint16_int16_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_int16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ ret i16 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_disjoint_align16_int16_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_int16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lhz r3, 24(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 8
+ ret i16 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_not_disjoint32_int16_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_int16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ ret i16 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_disjoint_align32_int16_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_int16_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_int16_t_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lhzx r3, r3, r4
+; CHECK-P9-NEXT: extsh r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_int16_t_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lhzx r3, r3, r4
+; CHECK-P8-NEXT: extsh r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 16
+ ret i16 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_not_disjoint64_int16_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_int16_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lhz r3, 0(r3)
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_int16_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lhz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsh r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ ret i16 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_disjoint_align64_int16_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_int16_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_int16_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsh r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 4096
+ ret i16 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_cst_align16_int16_t_uint16_t() {
+; CHECK-LABEL: ld_cst_align16_int16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 4080(0)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i16, i16* inttoptr (i64 4080 to i16*) monotonic, align 16
+ ret i16 %0
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_cst_align32_int16_t_uint16_t() {
+; CHECK-LABEL: ld_cst_align32_int16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lhz r3, -27108(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i16, i16* inttoptr (i64 9999900 to i16*) monotonic, align 4
+ ret i16 %0
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_cst_align64_int16_t_uint16_t() {
+; CHECK-P10-LABEL: ld_cst_align64_int16_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lhz r3, 0(r3)
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_int16_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lhz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsh r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i16, i16* inttoptr (i64 1000000000000 to i16*) monotonic, align 4096
+ ret i16 %0
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_0_int16_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_int16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_align16_int16_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_int16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 8(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_align32_int16_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_int16_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_int16_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsh r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_align64_int16_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_int16_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_int16_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsh r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_reg_int16_t_uint32_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_int16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwzx r3, r3, r4
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_or_int16_t_uint32_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_int16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv1 = trunc i32 %1 to i16
+ ret i16 %conv1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_not_disjoint16_int16_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_int16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_disjoint_align16_int16_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_int16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lwz r3, 24(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 8
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_not_disjoint32_int16_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_int16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_disjoint_align32_int16_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_int16_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_int16_t_uint32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lwzx r3, r3, r4
+; CHECK-P9-NEXT: extsh r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_int16_t_uint32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lwzx r3, r3, r4
+; CHECK-P8-NEXT: extsh r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 16
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_not_disjoint64_int16_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_int16_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lwz r3, 0(r3)
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_int16_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lwz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsh r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_disjoint_align64_int16_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_int16_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_int16_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsh r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4096
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_cst_align16_int16_t_uint32_t() {
+; CHECK-LABEL: ld_cst_align16_int16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 4080(0)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i32, i32* inttoptr (i64 4080 to i32*) monotonic, align 16
+ %conv = trunc i32 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_cst_align32_int16_t_uint32_t() {
+; CHECK-LABEL: ld_cst_align32_int16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lwz r3, -27108(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i32, i32* inttoptr (i64 9999900 to i32*) monotonic, align 4
+ %conv = trunc i32 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_cst_align64_int16_t_uint32_t() {
+; CHECK-P10-LABEL: ld_cst_align64_int16_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lwz r3, 0(r3)
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_int16_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lwz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsh r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i32, i32* inttoptr (i64 1000000000000 to i32*) monotonic, align 4096
+ %conv = trunc i32 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_0_int16_t_uint64_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_int16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_align16_int16_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_int16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ld r3, 8(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_align32_int16_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_int16_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_int16_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: ldx r3, r3, r4
+; CHECK-PREP10-NEXT: extsh r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_align64_int16_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_int16_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_int16_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: ldx r3, r3, r4
+; CHECK-PREP10-NEXT: extsh r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_reg_int16_t_uint64_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_int16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ldx r3, r3, r4
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_or_int16_t_uint64_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_int16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv1 = trunc i64 %1 to i16
+ ret i16 %conv1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_not_disjoint16_int16_t_uint64_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_int16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_disjoint_align16_int16_t_uint64_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_int16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: ld r3, 24(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_not_disjoint32_int16_t_uint64_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_int16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_disjoint_align32_int16_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_int16_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_int16_t_uint64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: ldx r3, r3, r4
+; CHECK-P9-NEXT: extsh r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_int16_t_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: ldx r3, r3, r4
+; CHECK-P8-NEXT: extsh r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 16
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_not_disjoint64_int16_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_int16_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: ld r3, 0(r3)
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_int16_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: ld r3, 0(r3)
+; CHECK-PREP10-NEXT: extsh r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_disjoint_align64_int16_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_int16_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_int16_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: ldx r3, r3, r4
+; CHECK-PREP10-NEXT: extsh r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 4096
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_cst_align16_int16_t_uint64_t() {
+; CHECK-LABEL: ld_cst_align16_int16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ld r3, 4080(0)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i64, i64* inttoptr (i64 4080 to i64*) monotonic, align 16
+ %conv = trunc i64 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_cst_align32_int16_t_uint64_t() {
+; CHECK-LABEL: ld_cst_align32_int16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: ld r3, -27108(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i64, i64* inttoptr (i64 9999900 to i64*) monotonic, align 8
+ %conv = trunc i64 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i16 @ld_cst_align64_int16_t_uint64_t() {
+; CHECK-P10-LABEL: ld_cst_align64_int16_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: ld r3, 0(r3)
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_int16_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: ld r3, 0(r3)
+; CHECK-PREP10-NEXT: extsh r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i64, i64* inttoptr (i64 1000000000000 to i64*) monotonic, align 4096
+ %conv = trunc i64 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_0_uint16_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = zext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_align16_uint16_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 8(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = zext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_align32_uint16_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint16_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint16_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = zext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_align64_uint16_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint16_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint16_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = zext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_reg_uint16_t_uint8_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbzx r3, r3, r4
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = zext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_or_uint16_t_uint8_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv1 = zext i8 %1 to i16
+ ret i16 %conv1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_not_disjoint16_uint16_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = zext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_disjoint_align16_uint16_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lbz r3, 24(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 8
+ %conv = zext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_not_disjoint32_uint16_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = zext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_disjoint_align32_uint16_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint16_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint16_t_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lbzx r3, r3, r4
+; CHECK-P9-NEXT: clrldi r3, r3, 56
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint16_t_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: clrldi r3, r3, 56
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 16
+ %conv = zext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_not_disjoint64_uint16_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint16_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint16_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = zext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_disjoint_align64_uint16_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint16_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint16_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 4096
+ %conv = zext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_cst_align16_uint16_t_uint8_t() {
+; CHECK-LABEL: ld_cst_align16_uint16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 4080(0)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 4080 to i8*) monotonic, align 16
+ %conv = zext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_cst_align32_uint16_t_uint8_t() {
+; CHECK-LABEL: ld_cst_align32_uint16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lbz r3, -27108(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 9999900 to i8*) monotonic, align 4
+ %conv = zext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_cst_align64_uint16_t_uint8_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint16_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint16_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 1000000000000 to i8*) monotonic, align 4096
+ %conv = zext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_0_uint16_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint16_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = sext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_align16_uint16_t_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint16_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 8(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = sext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_align32_uint16_t_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint16_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint16_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = sext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_align64_uint16_t_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint16_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint16_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = sext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_reg_uint16_t_int8_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint16_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbzx r3, r3, r4
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = sext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_or_uint16_t_int8_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint16_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv1 = sext i8 %1 to i16
+ ret i16 %conv1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_not_disjoint16_uint16_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint16_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = sext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_disjoint_align16_uint16_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint16_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lbz r3, 24(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 8
+ %conv = sext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_not_disjoint32_uint16_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint16_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = sext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_disjoint_align32_uint16_t_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint16_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint16_t_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lbzx r3, r3, r4
+; CHECK-P9-NEXT: extsb r3, r3
+; CHECK-P9-NEXT: clrldi r3, r3, 48
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint16_t_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: clrldi r3, r3, 48
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 16
+ %conv = sext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_not_disjoint64_uint16_t_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint16_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint16_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = sext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_disjoint_align64_uint16_t_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint16_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint16_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 4096
+ %conv = sext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_cst_align16_uint16_t_int8_t() {
+; CHECK-LABEL: ld_cst_align16_uint16_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 4080(0)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 4080 to i8*) monotonic, align 16
+ %conv = sext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_cst_align32_uint16_t_int8_t() {
+; CHECK-LABEL: ld_cst_align32_uint16_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lbz r3, -27108(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 9999900 to i8*) monotonic, align 4
+ %conv = sext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_cst_align64_uint16_t_int8_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint16_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint16_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 1000000000000 to i8*) monotonic, align 4096
+ %conv = sext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_0_uint16_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ ret i16 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_align16_uint16_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 8(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ ret i16 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_align32_uint16_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint16_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint16_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ ret i16 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_align64_uint16_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint16_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint16_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ ret i16 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_reg_uint16_t_uint16_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhzx r3, r3, r4
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ ret i16 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_or_uint16_t_uint16_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ ret i16 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_not_disjoint16_uint16_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ ret i16 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_disjoint_align16_uint16_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lhz r3, 24(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 8
+ ret i16 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_not_disjoint32_uint16_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ ret i16 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_disjoint_align32_uint16_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint16_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint16_t_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lhzx r3, r3, r4
+; CHECK-P9-NEXT: clrldi r3, r3, 48
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint16_t_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lhzx r3, r3, r4
+; CHECK-P8-NEXT: clrldi r3, r3, 48
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 16
+ ret i16 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_not_disjoint64_uint16_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint16_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lhz r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint16_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lhz r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ ret i16 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_disjoint_align64_uint16_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint16_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint16_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 4096
+ ret i16 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_cst_align16_uint16_t_uint16_t() {
+; CHECK-LABEL: ld_cst_align16_uint16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 4080(0)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i16, i16* inttoptr (i64 4080 to i16*) monotonic, align 16
+ ret i16 %0
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_cst_align32_uint16_t_uint16_t() {
+; CHECK-LABEL: ld_cst_align32_uint16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lhz r3, -27108(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i16, i16* inttoptr (i64 9999900 to i16*) monotonic, align 4
+ ret i16 %0
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_cst_align64_uint16_t_uint16_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint16_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lhz r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint16_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lhz r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i16, i16* inttoptr (i64 1000000000000 to i16*) monotonic, align 4096
+ ret i16 %0
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_0_uint16_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_align16_uint16_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 8(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_align32_uint16_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint16_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint16_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_align64_uint16_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint16_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint16_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_reg_uint16_t_uint32_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwzx r3, r3, r4
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_or_uint16_t_uint32_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv1 = trunc i32 %1 to i16
+ ret i16 %conv1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_not_disjoint16_uint16_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_disjoint_align16_uint16_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lwz r3, 24(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 8
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_not_disjoint32_uint16_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_disjoint_align32_uint16_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint16_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint16_t_uint32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lwzx r3, r3, r4
+; CHECK-P9-NEXT: clrldi r3, r3, 48
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint16_t_uint32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lwzx r3, r3, r4
+; CHECK-P8-NEXT: clrldi r3, r3, 48
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 16
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_not_disjoint64_uint16_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint16_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lwz r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint16_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lwz r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_disjoint_align64_uint16_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint16_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint16_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4096
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_cst_align16_uint16_t_uint32_t() {
+; CHECK-LABEL: ld_cst_align16_uint16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 4080(0)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i32, i32* inttoptr (i64 4080 to i32*) monotonic, align 16
+ %conv = trunc i32 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_cst_align32_uint16_t_uint32_t() {
+; CHECK-LABEL: ld_cst_align32_uint16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lwz r3, -27108(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i32, i32* inttoptr (i64 9999900 to i32*) monotonic, align 4
+ %conv = trunc i32 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_cst_align64_uint16_t_uint32_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint16_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lwz r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint16_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lwz r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i32, i32* inttoptr (i64 1000000000000 to i32*) monotonic, align 4096
+ %conv = trunc i32 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_0_uint16_t_uint64_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_align16_uint16_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ld r3, 8(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_align32_uint16_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint16_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint16_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: ldx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_align64_uint16_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint16_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint16_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: ldx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_reg_uint16_t_uint64_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ldx r3, r3, r4
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_or_uint16_t_uint64_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv1 = trunc i64 %1 to i16
+ ret i16 %conv1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_not_disjoint16_uint16_t_uint64_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_disjoint_align16_uint16_t_uint64_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: ld r3, 24(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_not_disjoint32_uint16_t_uint64_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_disjoint_align32_uint16_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint16_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint16_t_uint64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: ldx r3, r3, r4
+; CHECK-P9-NEXT: clrldi r3, r3, 48
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint16_t_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: ldx r3, r3, r4
+; CHECK-P8-NEXT: clrldi r3, r3, 48
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 16
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_not_disjoint64_uint16_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint16_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: ld r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint16_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: ld r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_disjoint_align64_uint16_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint16_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint16_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: ldx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 4096
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_cst_align16_uint16_t_uint64_t() {
+; CHECK-LABEL: ld_cst_align16_uint16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ld r3, 4080(0)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i64, i64* inttoptr (i64 4080 to i64*) monotonic, align 16
+ %conv = trunc i64 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_cst_align32_uint16_t_uint64_t() {
+; CHECK-LABEL: ld_cst_align32_uint16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: ld r3, -27108(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i64, i64* inttoptr (i64 9999900 to i64*) monotonic, align 8
+ %conv = trunc i64 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i16 @ld_cst_align64_uint16_t_uint64_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint16_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: ld r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint16_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: ld r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i64, i64* inttoptr (i64 1000000000000 to i64*) monotonic, align 4096
+ %conv = trunc i64 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_0_uint16_t_uint8_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_0_uint16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stb r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i8*
+ %conv = trunc i16 %str to i8
+ store atomic i8 %conv, i8* %0 monotonic, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align16_uint16_t_uint8_t(i8* nocapture %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_align16_uint16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stb r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %conv = trunc i16 %str to i8
+ store atomic i8 %conv, i8* %add.ptr monotonic, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align32_uint16_t_uint8_t(i8* nocapture %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_align32_uint16_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: stbx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_uint16_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: stbx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %conv = trunc i16 %str to i8
+ store atomic i8 %conv, i8* %add.ptr monotonic, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align64_uint16_t_uint8_t(i8* nocapture %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_align64_uint16_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stbx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_uint16_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stbx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %conv = trunc i16 %str to i8
+ store atomic i8 %conv, i8* %add.ptr monotonic, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_reg_uint16_t_uint8_t(i8* nocapture %ptr, i64 %off, i16 zeroext %str) {
+; CHECK-LABEL: st_reg_uint16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stbx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %conv = trunc i16 %str to i8
+ store atomic i8 %conv, i8* %add.ptr monotonic, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_or1_uint16_t_uint8_t(i64 %ptr, i8 zeroext %off, i16 zeroext %str) {
+; CHECK-LABEL: st_or1_uint16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: stb r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i8*
+ %conv1 = trunc i16 %str to i8
+ store atomic i8 %conv1, i8* %0 monotonic, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint16_uint16_t_uint8_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint16_uint16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: stb r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ %conv = trunc i16 %str to i8
+ store atomic i8 %conv, i8* %0 monotonic, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align16_uint16_t_uint8_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_disjoint_align16_uint16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: stb r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ %conv = trunc i16 %str to i8
+ store atomic i8 %conv, i8* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint32_uint16_t_uint8_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint32_uint16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: stb r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ %conv = trunc i16 %str to i8
+ store atomic i8 %conv, i8* %0 monotonic, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align32_uint16_t_uint8_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint16_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: stbx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint16_t_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: stbx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint16_t_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: stbx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ %conv = trunc i16 %str to i8
+ store atomic i8 %conv, i8* %0 monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint64_uint16_t_uint8_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint16_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: stb r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_uint16_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: stb r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ %conv = trunc i16 %str to i8
+ store atomic i8 %conv, i8* %0 monotonic, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align64_uint16_t_uint8_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint16_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stbx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_uint16_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stbx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ %conv = trunc i16 %str to i8
+ store atomic i8 %conv, i8* %0 monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align16_uint16_t_uint8_t(i16 zeroext %str) {
+; CHECK-LABEL: st_cst_align16_uint16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stb r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i16 %str to i8
+ store atomic i8 %conv, i8* inttoptr (i64 4080 to i8*) monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align32_uint16_t_uint8_t(i16 zeroext %str) {
+; CHECK-LABEL: st_cst_align32_uint16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: stb r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i16 %str to i8
+ store atomic i8 %conv, i8* inttoptr (i64 9999900 to i8*) monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align64_uint16_t_uint8_t(i16 zeroext %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint16_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stb r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_uint16_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stb r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = trunc i16 %str to i8
+ store atomic i8 %conv, i8* inttoptr (i64 1000000000000 to i8*) monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_0_uint16_t_uint16_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_0_uint16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sth r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i16*
+ store atomic i16 %str, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align16_uint16_t_uint16_t(i8* nocapture %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_align16_uint16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sth r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ store atomic i16 %str, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align32_uint16_t_uint16_t(i8* nocapture %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_align32_uint16_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_uint16_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: sthx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ store atomic i16 %str, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align64_uint16_t_uint16_t(i8* nocapture %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_align64_uint16_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_uint16_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: sthx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ store atomic i16 %str, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_reg_uint16_t_uint16_t(i8* nocapture %ptr, i64 %off, i16 zeroext %str) {
+; CHECK-LABEL: st_reg_uint16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sthx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ store atomic i16 %str, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_or1_uint16_t_uint16_t(i64 %ptr, i8 zeroext %off, i16 zeroext %str) {
+; CHECK-LABEL: st_or1_uint16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: sth r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i16*
+ store atomic i16 %str, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint16_uint16_t_uint16_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint16_uint16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: sth r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ store atomic i16 %str, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align16_uint16_t_uint16_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_disjoint_align16_uint16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: sth r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ store atomic i16 %str, i16* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint32_uint16_t_uint16_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint32_uint16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: sth r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ store atomic i16 %str, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align32_uint16_t_uint16_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint16_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint16_t_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: sthx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint16_t_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: sthx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ store atomic i16 %str, i16* %0 monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint64_uint16_t_uint16_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint16_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: sth r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_uint16_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: sth r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ store atomic i16 %str, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align64_uint16_t_uint16_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint16_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_uint16_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: sthx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ store atomic i16 %str, i16* %0 monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align16_uint16_t_uint16_t(i16 zeroext %str) {
+; CHECK-LABEL: st_cst_align16_uint16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sth r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ store atomic i16 %str, i16* inttoptr (i64 4080 to i16*) monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align32_uint16_t_uint16_t(i16 zeroext %str) {
+; CHECK-LABEL: st_cst_align32_uint16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: sth r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ store atomic i16 %str, i16* inttoptr (i64 9999900 to i16*) monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align64_uint16_t_uint16_t(i16 zeroext %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint16_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: sth r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_uint16_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: sth r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ store atomic i16 %str, i16* inttoptr (i64 1000000000000 to i16*) monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_0_uint16_t_uint32_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_0_uint16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stw r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i32*
+ %conv = zext i16 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align16_uint16_t_uint32_t(i8* nocapture %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_align16_uint16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stw r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ %conv = zext i16 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align32_uint16_t_uint32_t(i8* nocapture %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_align32_uint16_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_uint16_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: stwx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ %conv = zext i16 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align64_uint16_t_uint32_t(i8* nocapture %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_align64_uint16_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_uint16_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stwx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ %conv = zext i16 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_reg_uint16_t_uint32_t(i8* nocapture %ptr, i64 %off, i16 zeroext %str) {
+; CHECK-LABEL: st_reg_uint16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stwx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ %conv = zext i16 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_or1_uint16_t_uint32_t(i64 %ptr, i8 zeroext %off, i16 zeroext %str) {
+; CHECK-LABEL: st_or1_uint16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: stw r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i32*
+ %conv1 = zext i16 %str to i32
+ store atomic i32 %conv1, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint16_uint16_t_uint32_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint16_uint16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: stw r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ %conv = zext i16 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align16_uint16_t_uint32_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_disjoint_align16_uint16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: stw r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ %conv = zext i16 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint32_uint16_t_uint32_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint32_uint16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: stw r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ %conv = zext i16 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align32_uint16_t_uint32_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint16_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint16_t_uint32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: stwx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint16_t_uint32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: stwx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ %conv = zext i16 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint64_uint16_t_uint32_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint16_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: stw r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_uint16_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: stw r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ %conv = zext i16 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align64_uint16_t_uint32_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint16_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_uint16_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stwx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ %conv = zext i16 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align16_uint16_t_uint32_t(i16 zeroext %str) {
+; CHECK-LABEL: st_cst_align16_uint16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stw r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i16 %str to i32
+ store atomic i32 %conv, i32* inttoptr (i64 4080 to i32*) monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align32_uint16_t_uint32_t(i16 zeroext %str) {
+; CHECK-LABEL: st_cst_align32_uint16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: stw r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i16 %str to i32
+ store atomic i32 %conv, i32* inttoptr (i64 9999900 to i32*) monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align64_uint16_t_uint32_t(i16 zeroext %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint16_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stw r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_uint16_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stw r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = zext i16 %str to i32
+ store atomic i32 %conv, i32* inttoptr (i64 1000000000000 to i32*) monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_0_uint16_t_uint64_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_0_uint16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i64*
+ %conv = zext i16 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align16_uint16_t_uint64_t(i8* nocapture %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_align16_uint16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ %conv = zext i16 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align32_uint16_t_uint64_t(i8* nocapture %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_align32_uint16_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_uint16_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ %conv = zext i16 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align64_uint16_t_uint64_t(i8* nocapture %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_align64_uint16_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_uint16_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ %conv = zext i16 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_reg_uint16_t_uint64_t(i8* nocapture %ptr, i64 %off, i16 zeroext %str) {
+; CHECK-LABEL: st_reg_uint16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stdx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ %conv = zext i16 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_or1_uint16_t_uint64_t(i64 %ptr, i8 zeroext %off, i16 zeroext %str) {
+; CHECK-LABEL: st_or1_uint16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: std r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i64*
+ %conv1 = zext i16 %str to i64
+ store atomic i64 %conv1, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint16_uint16_t_uint64_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint16_uint16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ %conv = zext i16 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align16_uint16_t_uint64_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_disjoint_align16_uint16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: std r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ %conv = zext i16 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint32_uint16_t_uint64_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint32_uint16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ %conv = zext i16 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align32_uint16_t_uint64_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint16_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint16_t_uint64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: stdx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint16_t_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: stdx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ %conv = zext i16 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint64_uint16_t_uint64_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint16_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: std r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_uint16_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: std r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ %conv = zext i16 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align64_uint16_t_uint64_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint16_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_uint16_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ %conv = zext i16 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align16_uint16_t_uint64_t(i16 zeroext %str) {
+; CHECK-LABEL: st_cst_align16_uint16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i16 %str to i64
+ store atomic i64 %conv, i64* inttoptr (i64 4080 to i64*) monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align32_uint16_t_uint64_t(i16 zeroext %str) {
+; CHECK-LABEL: st_cst_align32_uint16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: std r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i16 %str to i64
+ store atomic i64 %conv, i64* inttoptr (i64 9999900 to i64*) monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align64_uint16_t_uint64_t(i16 zeroext %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint16_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: std r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_uint16_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: std r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = zext i16 %str to i64
+ store atomic i64 %conv, i64* inttoptr (i64 1000000000000 to i64*) monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_0_int16_t_uint32_t(i64 %ptr, i16 signext %str) {
+; CHECK-LABEL: st_0_int16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stw r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i32*
+ %conv = sext i16 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align16_int16_t_uint32_t(i8* nocapture %ptr, i16 signext %str) {
+; CHECK-LABEL: st_align16_int16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stw r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ %conv = sext i16 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align32_int16_t_uint32_t(i8* nocapture %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_align32_int16_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_int16_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: stwx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ %conv = sext i16 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align64_int16_t_uint32_t(i8* nocapture %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_align64_int16_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_int16_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stwx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ %conv = sext i16 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_reg_int16_t_uint32_t(i8* nocapture %ptr, i64 %off, i16 signext %str) {
+; CHECK-LABEL: st_reg_int16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stwx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ %conv = sext i16 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_or1_int16_t_uint32_t(i64 %ptr, i8 zeroext %off, i16 signext %str) {
+; CHECK-LABEL: st_or1_int16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: stw r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i32*
+ %conv1 = sext i16 %str to i32
+ store atomic i32 %conv1, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint16_int16_t_uint32_t(i64 %ptr, i16 signext %str) {
+; CHECK-LABEL: st_not_disjoint16_int16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: stw r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ %conv = sext i16 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align16_int16_t_uint32_t(i64 %ptr, i16 signext %str) {
+; CHECK-LABEL: st_disjoint_align16_int16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: stw r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ %conv = sext i16 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint32_int16_t_uint32_t(i64 %ptr, i16 signext %str) {
+; CHECK-LABEL: st_not_disjoint32_int16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: stw r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ %conv = sext i16 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align32_int16_t_uint32_t(i64 %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_int16_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_int16_t_uint32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: stwx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_int16_t_uint32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: stwx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ %conv = sext i16 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint64_int16_t_uint32_t(i64 %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_int16_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: stw r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_int16_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: stw r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ %conv = sext i16 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align64_int16_t_uint32_t(i64 %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_int16_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_int16_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stwx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ %conv = sext i16 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align16_int16_t_uint32_t(i16 signext %str) {
+; CHECK-LABEL: st_cst_align16_int16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stw r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i16 %str to i32
+ store atomic i32 %conv, i32* inttoptr (i64 4080 to i32*) monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align32_int16_t_uint32_t(i16 signext %str) {
+; CHECK-LABEL: st_cst_align32_int16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: stw r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i16 %str to i32
+ store atomic i32 %conv, i32* inttoptr (i64 9999900 to i32*) monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align64_int16_t_uint32_t(i16 signext %str) {
+; CHECK-P10-LABEL: st_cst_align64_int16_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stw r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_int16_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stw r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = sext i16 %str to i32
+ store atomic i32 %conv, i32* inttoptr (i64 1000000000000 to i32*) monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_0_int16_t_uint64_t(i64 %ptr, i16 signext %str) {
+; CHECK-LABEL: st_0_int16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i64*
+ %conv = sext i16 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align16_int16_t_uint64_t(i8* nocapture %ptr, i16 signext %str) {
+; CHECK-LABEL: st_align16_int16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ %conv = sext i16 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align32_int16_t_uint64_t(i8* nocapture %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_align32_int16_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_int16_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ %conv = sext i16 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align64_int16_t_uint64_t(i8* nocapture %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_align64_int16_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_int16_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ %conv = sext i16 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_reg_int16_t_uint64_t(i8* nocapture %ptr, i64 %off, i16 signext %str) {
+; CHECK-LABEL: st_reg_int16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stdx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ %conv = sext i16 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_or1_int16_t_uint64_t(i64 %ptr, i8 zeroext %off, i16 signext %str) {
+; CHECK-LABEL: st_or1_int16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: std r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i64*
+ %conv1 = sext i16 %str to i64
+ store atomic i64 %conv1, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint16_int16_t_uint64_t(i64 %ptr, i16 signext %str) {
+; CHECK-LABEL: st_not_disjoint16_int16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ %conv = sext i16 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align16_int16_t_uint64_t(i64 %ptr, i16 signext %str) {
+; CHECK-LABEL: st_disjoint_align16_int16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: std r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ %conv = sext i16 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint32_int16_t_uint64_t(i64 %ptr, i16 signext %str) {
+; CHECK-LABEL: st_not_disjoint32_int16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ %conv = sext i16 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align32_int16_t_uint64_t(i64 %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_int16_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_int16_t_uint64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: stdx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_int16_t_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: stdx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ %conv = sext i16 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint64_int16_t_uint64_t(i64 %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_int16_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: std r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_int16_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: std r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ %conv = sext i16 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align64_int16_t_uint64_t(i64 %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_int16_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_int16_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ %conv = sext i16 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align16_int16_t_uint64_t(i16 signext %str) {
+; CHECK-LABEL: st_cst_align16_int16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i16 %str to i64
+ store atomic i64 %conv, i64* inttoptr (i64 4080 to i64*) monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align32_int16_t_uint64_t(i16 signext %str) {
+; CHECK-LABEL: st_cst_align32_int16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: std r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i16 %str to i64
+ store atomic i64 %conv, i64* inttoptr (i64 9999900 to i64*) monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align64_int16_t_uint64_t(i16 signext %str) {
+; CHECK-P10-LABEL: st_cst_align64_int16_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: std r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_int16_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: std r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = sext i16 %str to i64
+ store atomic i64 %conv, i64* inttoptr (i64 1000000000000 to i64*) monotonic, align 4096
+ ret void
+}
--- /dev/null
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-P10
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-P10
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P9
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P9
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P8
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P8
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_0_int32_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_int32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = zext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_align16_int32_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_int32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 8(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = zext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_align32_int32_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_int32_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_int32_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = zext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_align64_int32_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_int32_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_int32_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = zext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_reg_int32_t_uint8_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_int32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbzx r3, r3, r4
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = zext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_or_int32_t_uint8_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_int32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv1 = zext i8 %1 to i32
+ ret i32 %conv1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_not_disjoint16_int32_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_int32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = zext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_disjoint_align16_int32_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_int32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lbz r3, 24(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 8
+ %conv = zext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_not_disjoint32_int32_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_int32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = zext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_disjoint_align32_int32_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_int32_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_int32_t_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lbzx r3, r3, r4
+; CHECK-P9-NEXT: clrldi r3, r3, 56
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_int32_t_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: clrldi r3, r3, 56
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 16
+ %conv = zext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_not_disjoint64_int32_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_int32_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_int32_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = zext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_disjoint_align64_int32_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_int32_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_int32_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 4096
+ %conv = zext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_cst_align16_int32_t_uint8_t() {
+; CHECK-LABEL: ld_cst_align16_int32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 4080(0)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 4080 to i8*) monotonic, align 16
+ %conv = zext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_cst_align32_int32_t_uint8_t() {
+; CHECK-LABEL: ld_cst_align32_int32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lbz r3, -27108(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 9999900 to i8*) monotonic, align 4
+ %conv = zext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_cst_align64_int32_t_uint8_t() {
+; CHECK-P10-LABEL: ld_cst_align64_int32_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_int32_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 1000000000000 to i8*) monotonic, align 4096
+ %conv = zext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_0_int32_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_int32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = sext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_align16_int32_t_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_int32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 8(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = sext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_align32_int32_t_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_int32_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_int32_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = sext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_align64_int32_t_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_int32_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_int32_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = sext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_reg_int32_t_int8_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_int32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbzx r3, r3, r4
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = sext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_or_int32_t_int8_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_int32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv1 = sext i8 %1 to i32
+ ret i32 %conv1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_not_disjoint16_int32_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_int32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = sext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_disjoint_align16_int32_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_int32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lbz r3, 24(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 8
+ %conv = sext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_not_disjoint32_int32_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_int32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = sext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_disjoint_align32_int32_t_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_int32_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_int32_t_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lbzx r3, r3, r4
+; CHECK-P9-NEXT: extsb r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_int32_t_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 16
+ %conv = sext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_not_disjoint64_int32_t_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_int32_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_int32_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = sext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_disjoint_align64_int32_t_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_int32_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_int32_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 4096
+ %conv = sext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_cst_align16_int32_t_int8_t() {
+; CHECK-LABEL: ld_cst_align16_int32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 4080(0)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 4080 to i8*) monotonic, align 16
+ %conv = sext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_cst_align32_int32_t_int8_t() {
+; CHECK-LABEL: ld_cst_align32_int32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lbz r3, -27108(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 9999900 to i8*) monotonic, align 4
+ %conv = sext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_cst_align64_int32_t_int8_t() {
+; CHECK-P10-LABEL: ld_cst_align64_int32_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_int32_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 1000000000000 to i8*) monotonic, align 4096
+ %conv = sext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_0_int32_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_int32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = zext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_align16_int32_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_int32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 8(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = zext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_align32_int32_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_int32_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_int32_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = zext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_align64_int32_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_int32_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_int32_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = zext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_reg_int32_t_uint16_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_int32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhzx r3, r3, r4
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = zext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_or_int32_t_uint16_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_int32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv1 = zext i16 %1 to i32
+ ret i32 %conv1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_not_disjoint16_int32_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_int32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = zext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_disjoint_align16_int32_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_int32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lhz r3, 24(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 8
+ %conv = zext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_not_disjoint32_int32_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_int32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = zext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_disjoint_align32_int32_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_int32_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_int32_t_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lhzx r3, r3, r4
+; CHECK-P9-NEXT: clrldi r3, r3, 48
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_int32_t_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lhzx r3, r3, r4
+; CHECK-P8-NEXT: clrldi r3, r3, 48
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 16
+ %conv = zext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_not_disjoint64_int32_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_int32_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lhz r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_int32_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lhz r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = zext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_disjoint_align64_int32_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_int32_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_int32_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 4096
+ %conv = zext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_cst_align16_int32_t_uint16_t() {
+; CHECK-LABEL: ld_cst_align16_int32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 4080(0)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i16, i16* inttoptr (i64 4080 to i16*) monotonic, align 16
+ %conv = zext i16 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_cst_align32_int32_t_uint16_t() {
+; CHECK-LABEL: ld_cst_align32_int32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lhz r3, -27108(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i16, i16* inttoptr (i64 9999900 to i16*) monotonic, align 4
+ %conv = zext i16 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_cst_align64_int32_t_uint16_t() {
+; CHECK-P10-LABEL: ld_cst_align64_int32_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lhz r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_int32_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lhz r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i16, i16* inttoptr (i64 1000000000000 to i16*) monotonic, align 4096
+ %conv = zext i16 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_0_int32_t_int16_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_int32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_align16_int32_t_int16_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_int32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 8(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_align32_int32_t_int16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_int32_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_int32_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsh r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_align64_int32_t_int16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_int32_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_int32_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsh r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_reg_int32_t_int16_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_int32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhzx r3, r3, r4
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_or_int32_t_int16_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_int32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv1 = sext i16 %1 to i32
+ ret i32 %conv1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_not_disjoint16_int32_t_int16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_int32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_disjoint_align16_int32_t_int16_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_int32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lhz r3, 24(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 8
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_not_disjoint32_int32_t_int16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_int32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_disjoint_align32_int32_t_int16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_int32_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_int32_t_int16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lhzx r3, r3, r4
+; CHECK-P9-NEXT: extsh r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_int32_t_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lhzx r3, r3, r4
+; CHECK-P8-NEXT: extsh r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 16
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_not_disjoint64_int32_t_int16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_int32_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lhz r3, 0(r3)
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_int32_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lhz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsh r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_disjoint_align64_int32_t_int16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_int32_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_int32_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsh r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 4096
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_cst_align16_int32_t_int16_t() {
+; CHECK-LABEL: ld_cst_align16_int32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 4080(0)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i16, i16* inttoptr (i64 4080 to i16*) monotonic, align 16
+ %conv = sext i16 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_cst_align32_int32_t_int16_t() {
+; CHECK-LABEL: ld_cst_align32_int32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lhz r3, -27108(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i16, i16* inttoptr (i64 9999900 to i16*) monotonic, align 4
+ %conv = sext i16 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_cst_align64_int32_t_int16_t() {
+; CHECK-P10-LABEL: ld_cst_align64_int32_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lhz r3, 0(r3)
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_int32_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lhz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsh r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i16, i16* inttoptr (i64 1000000000000 to i16*) monotonic, align 4096
+ %conv = sext i16 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_0_int32_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_int32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ ret i32 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_align16_int32_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_int32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 8(r3)
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ ret i32 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_align32_int32_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_int32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_int32_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ ret i32 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_align64_int32_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_int32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_int32_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ ret i32 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_reg_int32_t_uint32_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_int32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwzx r3, r3, r4
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ ret i32 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_or_int32_t_uint32_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_int32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ ret i32 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_not_disjoint16_int32_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_int32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ ret i32 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_disjoint_align16_int32_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_int32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lwz r3, 24(r3)
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 8
+ ret i32 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_not_disjoint32_int32_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_int32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ ret i32 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_disjoint_align32_int32_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_int32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_int32_t_uint32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lwzx r3, r3, r4
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_int32_t_uint32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lwzx r3, r3, r4
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 16
+ ret i32 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_not_disjoint64_int32_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_int32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lwz r3, 0(r3)
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_int32_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lwz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ ret i32 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_disjoint_align64_int32_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_int32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_int32_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4096
+ ret i32 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_cst_align16_int32_t_uint32_t() {
+; CHECK-LABEL: ld_cst_align16_int32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 4080(0)
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i32, i32* inttoptr (i64 4080 to i32*) monotonic, align 16
+ ret i32 %0
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_cst_align32_int32_t_uint32_t() {
+; CHECK-LABEL: ld_cst_align32_int32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lwz r3, -27108(r3)
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i32, i32* inttoptr (i64 9999900 to i32*) monotonic, align 4
+ ret i32 %0
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_cst_align64_int32_t_uint32_t() {
+; CHECK-P10-LABEL: ld_cst_align64_int32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lwz r3, 0(r3)
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_int32_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lwz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i32, i32* inttoptr (i64 1000000000000 to i32*) monotonic, align 4096
+ ret i32 %0
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_0_int32_t_uint64_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_int32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_align16_int32_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_int32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ld r3, 8(r3)
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_align32_int32_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_int32_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_int32_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: ldx r3, r3, r4
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_align64_int32_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_int32_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_int32_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: ldx r3, r3, r4
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_reg_int32_t_uint64_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_int32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ldx r3, r3, r4
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_or_int32_t_uint64_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_int32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv1 = trunc i64 %1 to i32
+ ret i32 %conv1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_not_disjoint16_int32_t_uint64_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_int32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_disjoint_align16_int32_t_uint64_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_int32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: ld r3, 24(r3)
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_not_disjoint32_int32_t_uint64_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_int32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_disjoint_align32_int32_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_int32_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_int32_t_uint64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: ldx r3, r3, r4
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_int32_t_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: ldx r3, r3, r4
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 16
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_not_disjoint64_int32_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_int32_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: ld r3, 0(r3)
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_int32_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: ld r3, 0(r3)
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_disjoint_align64_int32_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_int32_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_int32_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: ldx r3, r3, r4
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 4096
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_cst_align16_int32_t_uint64_t() {
+; CHECK-LABEL: ld_cst_align16_int32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ld r3, 4080(0)
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i64, i64* inttoptr (i64 4080 to i64*) monotonic, align 16
+ %conv = trunc i64 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_cst_align32_int32_t_uint64_t() {
+; CHECK-LABEL: ld_cst_align32_int32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: ld r3, -27108(r3)
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i64, i64* inttoptr (i64 9999900 to i64*) monotonic, align 8
+ %conv = trunc i64 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i32 @ld_cst_align64_int32_t_uint64_t() {
+; CHECK-P10-LABEL: ld_cst_align64_int32_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: ld r3, 0(r3)
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_int32_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: ld r3, 0(r3)
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i64, i64* inttoptr (i64 1000000000000 to i64*) monotonic, align 4096
+ %conv = trunc i64 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_0_uint32_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = zext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_align16_uint32_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 8(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = zext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_align32_uint32_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint32_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint32_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = zext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_align64_uint32_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint32_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint32_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = zext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_reg_uint32_t_uint8_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbzx r3, r3, r4
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = zext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_or_uint32_t_uint8_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv1 = zext i8 %1 to i32
+ ret i32 %conv1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint16_uint32_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = zext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align16_uint32_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lbz r3, 24(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 8
+ %conv = zext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint32_uint32_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = zext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align32_uint32_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint32_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint32_t_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lbzx r3, r3, r4
+; CHECK-P9-NEXT: clrldi r3, r3, 56
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint32_t_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: clrldi r3, r3, 56
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 16
+ %conv = zext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint64_uint32_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint32_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint32_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = zext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align64_uint32_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint32_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint32_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 4096
+ %conv = zext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align16_uint32_t_uint8_t() {
+; CHECK-LABEL: ld_cst_align16_uint32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 4080(0)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 4080 to i8*) monotonic, align 16
+ %conv = zext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align32_uint32_t_uint8_t() {
+; CHECK-LABEL: ld_cst_align32_uint32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lbz r3, -27108(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 9999900 to i8*) monotonic, align 4
+ %conv = zext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align64_uint32_t_uint8_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint32_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint32_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 1000000000000 to i8*) monotonic, align 4096
+ %conv = zext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_0_uint32_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = sext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_align16_uint32_t_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 8(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = sext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_align32_uint32_t_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint32_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint32_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = sext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_align64_uint32_t_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint32_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint32_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = sext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_reg_uint32_t_int8_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbzx r3, r3, r4
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = sext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_or_uint32_t_int8_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv1 = sext i8 %1 to i32
+ ret i32 %conv1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint16_uint32_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = sext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align16_uint32_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lbz r3, 24(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 8
+ %conv = sext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint32_uint32_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = sext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align32_uint32_t_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint32_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint32_t_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lbzx r3, r3, r4
+; CHECK-P9-NEXT: extsb r3, r3
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint32_t_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 16
+ %conv = sext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint64_uint32_t_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint32_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint32_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = sext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align64_uint32_t_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint32_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint32_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 4096
+ %conv = sext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align16_uint32_t_int8_t() {
+; CHECK-LABEL: ld_cst_align16_uint32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 4080(0)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 4080 to i8*) monotonic, align 16
+ %conv = sext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align32_uint32_t_int8_t() {
+; CHECK-LABEL: ld_cst_align32_uint32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lbz r3, -27108(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 9999900 to i8*) monotonic, align 4
+ %conv = sext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align64_uint32_t_int8_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint32_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint32_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 1000000000000 to i8*) monotonic, align 4096
+ %conv = sext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_0_uint32_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = zext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_align16_uint32_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 8(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = zext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_align32_uint32_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint32_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint32_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = zext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_align64_uint32_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint32_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint32_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = zext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_reg_uint32_t_uint16_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhzx r3, r3, r4
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = zext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_or_uint32_t_uint16_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv1 = zext i16 %1 to i32
+ ret i32 %conv1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint16_uint32_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = zext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align16_uint32_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lhz r3, 24(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 8
+ %conv = zext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint32_uint32_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = zext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align32_uint32_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint32_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint32_t_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lhzx r3, r3, r4
+; CHECK-P9-NEXT: clrldi r3, r3, 48
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint32_t_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lhzx r3, r3, r4
+; CHECK-P8-NEXT: clrldi r3, r3, 48
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 16
+ %conv = zext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint64_uint32_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint32_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lhz r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint32_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lhz r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = zext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align64_uint32_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint32_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint32_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 4096
+ %conv = zext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align16_uint32_t_uint16_t() {
+; CHECK-LABEL: ld_cst_align16_uint32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 4080(0)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i16, i16* inttoptr (i64 4080 to i16*) monotonic, align 16
+ %conv = zext i16 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align32_uint32_t_uint16_t() {
+; CHECK-LABEL: ld_cst_align32_uint32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lhz r3, -27108(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i16, i16* inttoptr (i64 9999900 to i16*) monotonic, align 4
+ %conv = zext i16 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align64_uint32_t_uint16_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint32_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lhz r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint32_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lhz r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i16, i16* inttoptr (i64 1000000000000 to i16*) monotonic, align 4096
+ %conv = zext i16 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_0_uint32_t_int16_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_align16_uint32_t_int16_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 8(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_align32_uint32_t_int16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint32_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint32_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsh r3, r3
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_align64_uint32_t_int16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint32_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint32_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsh r3, r3
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_reg_uint32_t_int16_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhzx r3, r3, r4
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_or_uint32_t_int16_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv1 = sext i16 %1 to i32
+ ret i32 %conv1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint16_uint32_t_int16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align16_uint32_t_int16_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lhz r3, 24(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 8
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint32_uint32_t_int16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align32_uint32_t_int16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint32_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint32_t_int16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lhzx r3, r3, r4
+; CHECK-P9-NEXT: extsh r3, r3
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint32_t_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lhzx r3, r3, r4
+; CHECK-P8-NEXT: extsh r3, r3
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 16
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint64_uint32_t_int16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint32_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lhz r3, 0(r3)
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint32_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lhz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsh r3, r3
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align64_uint32_t_int16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint32_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint32_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsh r3, r3
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 4096
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align16_uint32_t_int16_t() {
+; CHECK-LABEL: ld_cst_align16_uint32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 4080(0)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i16, i16* inttoptr (i64 4080 to i16*) monotonic, align 16
+ %conv = sext i16 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align32_uint32_t_int16_t() {
+; CHECK-LABEL: ld_cst_align32_uint32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lhz r3, -27108(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i16, i16* inttoptr (i64 9999900 to i16*) monotonic, align 4
+ %conv = sext i16 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align64_uint32_t_int16_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint32_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lhz r3, 0(r3)
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint32_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lhz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsh r3, r3
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i16, i16* inttoptr (i64 1000000000000 to i16*) monotonic, align 4096
+ %conv = sext i16 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_0_uint32_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ ret i32 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_align16_uint32_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 8(r3)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ ret i32 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_align32_uint32_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint32_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ ret i32 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_align64_uint32_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint32_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ ret i32 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_reg_uint32_t_uint32_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwzx r3, r3, r4
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ ret i32 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_or_uint32_t_uint32_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ ret i32 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint16_uint32_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ ret i32 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align16_uint32_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lwz r3, 24(r3)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 8
+ ret i32 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint32_uint32_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ ret i32 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align32_uint32_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint32_t_uint32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lwzx r3, r3, r4
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint32_t_uint32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lwzx r3, r3, r4
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 16
+ ret i32 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint64_uint32_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lwz r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint32_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lwz r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ ret i32 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align64_uint32_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint32_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4096
+ ret i32 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align16_uint32_t_uint32_t() {
+; CHECK-LABEL: ld_cst_align16_uint32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 4080(0)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i32, i32* inttoptr (i64 4080 to i32*) monotonic, align 16
+ ret i32 %0
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align32_uint32_t_uint32_t() {
+; CHECK-LABEL: ld_cst_align32_uint32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lwz r3, -27108(r3)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i32, i32* inttoptr (i64 9999900 to i32*) monotonic, align 4
+ ret i32 %0
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align64_uint32_t_uint32_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lwz r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint32_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lwz r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i32, i32* inttoptr (i64 1000000000000 to i32*) monotonic, align 4096
+ ret i32 %0
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_0_uint32_t_uint64_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_align16_uint32_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ld r3, 8(r3)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_align32_uint32_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint32_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint32_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: ldx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_align64_uint32_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint32_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint32_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: ldx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_reg_uint32_t_uint64_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ldx r3, r3, r4
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_or_uint32_t_uint64_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv1 = trunc i64 %1 to i32
+ ret i32 %conv1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint16_uint32_t_uint64_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align16_uint32_t_uint64_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: ld r3, 24(r3)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint32_uint32_t_uint64_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align32_uint32_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint32_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint32_t_uint64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: ldx r3, r3, r4
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint32_t_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: ldx r3, r3, r4
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 16
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint64_uint32_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint32_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: ld r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint32_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: ld r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align64_uint32_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint32_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint32_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: ldx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 4096
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align16_uint32_t_uint64_t() {
+; CHECK-LABEL: ld_cst_align16_uint32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ld r3, 4080(0)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i64, i64* inttoptr (i64 4080 to i64*) monotonic, align 16
+ %conv = trunc i64 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align32_uint32_t_uint64_t() {
+; CHECK-LABEL: ld_cst_align32_uint32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: ld r3, -27108(r3)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i64, i64* inttoptr (i64 9999900 to i64*) monotonic, align 8
+ %conv = trunc i64 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align64_uint32_t_uint64_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint32_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: ld r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint32_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: ld r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i64, i64* inttoptr (i64 1000000000000 to i64*) monotonic, align 4096
+ %conv = trunc i64 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_0_uint32_t_uint8_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_0_uint32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stb r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i8*
+ %conv = trunc i32 %str to i8
+ store atomic i8 %conv, i8* %0 monotonic, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align16_uint32_t_uint8_t(i8* nocapture %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_align16_uint32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stb r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %conv = trunc i32 %str to i8
+ store atomic i8 %conv, i8* %add.ptr monotonic, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align32_uint32_t_uint8_t(i8* nocapture %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_align32_uint32_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: stbx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_uint32_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: stbx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %conv = trunc i32 %str to i8
+ store atomic i8 %conv, i8* %add.ptr monotonic, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align64_uint32_t_uint8_t(i8* nocapture %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_align64_uint32_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stbx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_uint32_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stbx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %conv = trunc i32 %str to i8
+ store atomic i8 %conv, i8* %add.ptr monotonic, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_reg_uint32_t_uint8_t(i8* nocapture %ptr, i64 %off, i32 zeroext %str) {
+; CHECK-LABEL: st_reg_uint32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stbx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %conv = trunc i32 %str to i8
+ store atomic i8 %conv, i8* %add.ptr monotonic, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_or1_uint32_t_uint8_t(i64 %ptr, i8 zeroext %off, i32 zeroext %str) {
+; CHECK-LABEL: st_or1_uint32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: stb r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i8*
+ %conv1 = trunc i32 %str to i8
+ store atomic i8 %conv1, i8* %0 monotonic, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint16_uint32_t_uint8_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint16_uint32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: stb r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ %conv = trunc i32 %str to i8
+ store atomic i8 %conv, i8* %0 monotonic, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align16_uint32_t_uint8_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_disjoint_align16_uint32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: stb r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ %conv = trunc i32 %str to i8
+ store atomic i8 %conv, i8* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint32_uint32_t_uint8_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint32_uint32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: stb r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ %conv = trunc i32 %str to i8
+ store atomic i8 %conv, i8* %0 monotonic, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align32_uint32_t_uint8_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint32_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: stbx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint32_t_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: stbx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint32_t_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: stbx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ %conv = trunc i32 %str to i8
+ store atomic i8 %conv, i8* %0 monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint64_uint32_t_uint8_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint32_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: stb r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_uint32_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: stb r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ %conv = trunc i32 %str to i8
+ store atomic i8 %conv, i8* %0 monotonic, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align64_uint32_t_uint8_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint32_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stbx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_uint32_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stbx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ %conv = trunc i32 %str to i8
+ store atomic i8 %conv, i8* %0 monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align16_uint32_t_uint8_t(i32 zeroext %str) {
+; CHECK-LABEL: st_cst_align16_uint32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stb r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i32 %str to i8
+ store atomic i8 %conv, i8* inttoptr (i64 4080 to i8*) monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align32_uint32_t_uint8_t(i32 zeroext %str) {
+; CHECK-LABEL: st_cst_align32_uint32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: stb r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i32 %str to i8
+ store atomic i8 %conv, i8* inttoptr (i64 9999900 to i8*) monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align64_uint32_t_uint8_t(i32 zeroext %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint32_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stb r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_uint32_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stb r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = trunc i32 %str to i8
+ store atomic i8 %conv, i8* inttoptr (i64 1000000000000 to i8*) monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_0_uint32_t_uint16_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_0_uint32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sth r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i16*
+ %conv = trunc i32 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align16_uint32_t_uint16_t(i8* nocapture %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_align16_uint32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sth r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ %conv = trunc i32 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align32_uint32_t_uint16_t(i8* nocapture %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_align32_uint32_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_uint32_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: sthx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ %conv = trunc i32 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align64_uint32_t_uint16_t(i8* nocapture %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_align64_uint32_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_uint32_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: sthx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ %conv = trunc i32 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_reg_uint32_t_uint16_t(i8* nocapture %ptr, i64 %off, i32 zeroext %str) {
+; CHECK-LABEL: st_reg_uint32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sthx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ %conv = trunc i32 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_or1_uint32_t_uint16_t(i64 %ptr, i8 zeroext %off, i32 zeroext %str) {
+; CHECK-LABEL: st_or1_uint32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: sth r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i16*
+ %conv1 = trunc i32 %str to i16
+ store atomic i16 %conv1, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint16_uint32_t_uint16_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint16_uint32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: sth r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ %conv = trunc i32 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align16_uint32_t_uint16_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_disjoint_align16_uint32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: sth r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ %conv = trunc i32 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint32_uint32_t_uint16_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint32_uint32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: sth r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ %conv = trunc i32 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align32_uint32_t_uint16_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint32_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint32_t_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: sthx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint32_t_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: sthx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ %conv = trunc i32 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint64_uint32_t_uint16_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint32_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: sth r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_uint32_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: sth r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ %conv = trunc i32 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align64_uint32_t_uint16_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint32_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_uint32_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: sthx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ %conv = trunc i32 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align16_uint32_t_uint16_t(i32 zeroext %str) {
+; CHECK-LABEL: st_cst_align16_uint32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sth r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i32 %str to i16
+ store atomic i16 %conv, i16* inttoptr (i64 4080 to i16*) monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align32_uint32_t_uint16_t(i32 zeroext %str) {
+; CHECK-LABEL: st_cst_align32_uint32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: sth r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i32 %str to i16
+ store atomic i16 %conv, i16* inttoptr (i64 9999900 to i16*) monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align64_uint32_t_uint16_t(i32 zeroext %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint32_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: sth r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_uint32_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: sth r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = trunc i32 %str to i16
+ store atomic i16 %conv, i16* inttoptr (i64 1000000000000 to i16*) monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_0_uint32_t_uint32_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_0_uint32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stw r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i32*
+ store atomic i32 %str, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align16_uint32_t_uint32_t(i8* nocapture %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_align16_uint32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stw r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ store atomic i32 %str, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align32_uint32_t_uint32_t(i8* nocapture %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_align32_uint32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_uint32_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: stwx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ store atomic i32 %str, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align64_uint32_t_uint32_t(i8* nocapture %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_align64_uint32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_uint32_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stwx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ store atomic i32 %str, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_reg_uint32_t_uint32_t(i8* nocapture %ptr, i64 %off, i32 zeroext %str) {
+; CHECK-LABEL: st_reg_uint32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stwx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ store atomic i32 %str, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_or1_uint32_t_uint32_t(i64 %ptr, i8 zeroext %off, i32 zeroext %str) {
+; CHECK-LABEL: st_or1_uint32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: stw r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i32*
+ store atomic i32 %str, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint16_uint32_t_uint32_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint16_uint32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: stw r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ store atomic i32 %str, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align16_uint32_t_uint32_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_disjoint_align16_uint32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: stw r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ store atomic i32 %str, i32* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint32_uint32_t_uint32_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint32_uint32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: stw r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ store atomic i32 %str, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align32_uint32_t_uint32_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint32_t_uint32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: stwx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint32_t_uint32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: stwx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ store atomic i32 %str, i32* %0 monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint64_uint32_t_uint32_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: stw r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_uint32_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: stw r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ store atomic i32 %str, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align64_uint32_t_uint32_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_uint32_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stwx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ store atomic i32 %str, i32* %0 monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align16_uint32_t_uint32_t(i32 zeroext %str) {
+; CHECK-LABEL: st_cst_align16_uint32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stw r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ store atomic i32 %str, i32* inttoptr (i64 4080 to i32*) monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align32_uint32_t_uint32_t(i32 zeroext %str) {
+; CHECK-LABEL: st_cst_align32_uint32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: stw r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ store atomic i32 %str, i32* inttoptr (i64 9999900 to i32*) monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align64_uint32_t_uint32_t(i32 zeroext %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stw r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_uint32_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stw r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ store atomic i32 %str, i32* inttoptr (i64 1000000000000 to i32*) monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_0_uint32_t_uint64_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_0_uint32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i64*
+ %conv = zext i32 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align16_uint32_t_uint64_t(i8* nocapture %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_align16_uint32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ %conv = zext i32 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align32_uint32_t_uint64_t(i8* nocapture %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_align32_uint32_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_uint32_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ %conv = zext i32 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align64_uint32_t_uint64_t(i8* nocapture %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_align64_uint32_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_uint32_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ %conv = zext i32 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_reg_uint32_t_uint64_t(i8* nocapture %ptr, i64 %off, i32 zeroext %str) {
+; CHECK-LABEL: st_reg_uint32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stdx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ %conv = zext i32 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_or1_uint32_t_uint64_t(i64 %ptr, i8 zeroext %off, i32 zeroext %str) {
+; CHECK-LABEL: st_or1_uint32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: std r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i64*
+ %conv1 = zext i32 %str to i64
+ store atomic i64 %conv1, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint16_uint32_t_uint64_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint16_uint32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ %conv = zext i32 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align16_uint32_t_uint64_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_disjoint_align16_uint32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: std r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ %conv = zext i32 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint32_uint32_t_uint64_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint32_uint32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ %conv = zext i32 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align32_uint32_t_uint64_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint32_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint32_t_uint64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: stdx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint32_t_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: stdx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ %conv = zext i32 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint64_uint32_t_uint64_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint32_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: std r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_uint32_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: std r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ %conv = zext i32 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align64_uint32_t_uint64_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint32_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_uint32_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ %conv = zext i32 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align16_uint32_t_uint64_t(i32 zeroext %str) {
+; CHECK-LABEL: st_cst_align16_uint32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i32 %str to i64
+ store atomic i64 %conv, i64* inttoptr (i64 4080 to i64*) monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align32_uint32_t_uint64_t(i32 zeroext %str) {
+; CHECK-LABEL: st_cst_align32_uint32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: std r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i32 %str to i64
+ store atomic i64 %conv, i64* inttoptr (i64 9999900 to i64*) monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align64_uint32_t_uint64_t(i32 zeroext %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint32_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: std r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_uint32_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: std r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = zext i32 %str to i64
+ store atomic i64 %conv, i64* inttoptr (i64 1000000000000 to i64*) monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_0_int32_t_uint64_t(i64 %ptr, i32 signext %str) {
+; CHECK-LABEL: st_0_int32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i64*
+ %conv = sext i32 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align16_int32_t_uint64_t(i8* nocapture %ptr, i32 signext %str) {
+; CHECK-LABEL: st_align16_int32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ %conv = sext i32 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align32_int32_t_uint64_t(i8* nocapture %ptr, i32 signext %str) {
+; CHECK-P10-LABEL: st_align32_int32_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_int32_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ %conv = sext i32 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align64_int32_t_uint64_t(i8* nocapture %ptr, i32 signext %str) {
+; CHECK-P10-LABEL: st_align64_int32_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_int32_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ %conv = sext i32 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_reg_int32_t_uint64_t(i8* nocapture %ptr, i64 %off, i32 signext %str) {
+; CHECK-LABEL: st_reg_int32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stdx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ %conv = sext i32 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_or1_int32_t_uint64_t(i64 %ptr, i8 zeroext %off, i32 signext %str) {
+; CHECK-LABEL: st_or1_int32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: std r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i64*
+ %conv1 = sext i32 %str to i64
+ store atomic i64 %conv1, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint16_int32_t_uint64_t(i64 %ptr, i32 signext %str) {
+; CHECK-LABEL: st_not_disjoint16_int32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ %conv = sext i32 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align16_int32_t_uint64_t(i64 %ptr, i32 signext %str) {
+; CHECK-LABEL: st_disjoint_align16_int32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: std r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ %conv = sext i32 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint32_int32_t_uint64_t(i64 %ptr, i32 signext %str) {
+; CHECK-LABEL: st_not_disjoint32_int32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ %conv = sext i32 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align32_int32_t_uint64_t(i64 %ptr, i32 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_int32_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_int32_t_uint64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: stdx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_int32_t_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: stdx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ %conv = sext i32 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint64_int32_t_uint64_t(i64 %ptr, i32 signext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_int32_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: std r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_int32_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: std r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ %conv = sext i32 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align64_int32_t_uint64_t(i64 %ptr, i32 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_int32_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_int32_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ %conv = sext i32 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align16_int32_t_uint64_t(i32 signext %str) {
+; CHECK-LABEL: st_cst_align16_int32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i32 %str to i64
+ store atomic i64 %conv, i64* inttoptr (i64 4080 to i64*) monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align32_int32_t_uint64_t(i32 signext %str) {
+; CHECK-LABEL: st_cst_align32_int32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: std r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i32 %str to i64
+ store atomic i64 %conv, i64* inttoptr (i64 9999900 to i64*) monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align64_int32_t_uint64_t(i32 signext %str) {
+; CHECK-P10-LABEL: st_cst_align64_int32_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: std r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_int32_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: std r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = sext i32 %str to i64
+ store atomic i64 %conv, i64* inttoptr (i64 1000000000000 to i64*) monotonic, align 4096
+ ret void
+}
--- /dev/null
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-P10
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-P10
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P9
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P9
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P8
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P8
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_0_int64_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_int64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = zext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align16_int64_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_int64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 8(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = zext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align32_int64_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_int64_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_int64_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = zext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align64_int64_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_int64_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_int64_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = zext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_reg_int64_t_uint8_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_int64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbzx r3, r3, r4
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = zext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_or_int64_t_uint8_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_int64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv1 = zext i8 %1 to i64
+ ret i64 %conv1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint16_int64_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_int64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = zext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align16_int64_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_int64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lbz r3, 24(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 8
+ %conv = zext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint32_int64_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_int64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = zext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align32_int64_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_int64_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_int64_t_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lbzx r3, r3, r4
+; CHECK-P9-NEXT: clrldi r3, r3, 56
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_int64_t_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: clrldi r3, r3, 56
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 16
+ %conv = zext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint64_int64_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_int64_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_int64_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = zext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align64_int64_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_int64_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_int64_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 4096
+ %conv = zext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align16_int64_t_uint8_t() {
+; CHECK-LABEL: ld_cst_align16_int64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 4080(0)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 4080 to i8*) monotonic, align 16
+ %conv = zext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align32_int64_t_uint8_t() {
+; CHECK-LABEL: ld_cst_align32_int64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lbz r3, -27108(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 9999900 to i8*) monotonic, align 4
+ %conv = zext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align64_int64_t_uint8_t() {
+; CHECK-P10-LABEL: ld_cst_align64_int64_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_int64_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 1000000000000 to i8*) monotonic, align 4096
+ %conv = zext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_0_int64_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_int64_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = sext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align16_int64_t_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_int64_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 8(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = sext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align32_int64_t_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_int64_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_int64_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = sext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align64_int64_t_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_int64_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_int64_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = sext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_reg_int64_t_int8_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_int64_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbzx r3, r3, r4
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = sext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_or_int64_t_int8_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_int64_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv1 = sext i8 %1 to i64
+ ret i64 %conv1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint16_int64_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_int64_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = sext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align16_int64_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_int64_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lbz r3, 24(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 8
+ %conv = sext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint32_int64_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_int64_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = sext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align32_int64_t_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_int64_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_int64_t_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lbzx r3, r3, r4
+; CHECK-P9-NEXT: extsb r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_int64_t_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 16
+ %conv = sext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint64_int64_t_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_int64_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_int64_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = sext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align64_int64_t_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_int64_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_int64_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 4096
+ %conv = sext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align16_int64_t_int8_t() {
+; CHECK-LABEL: ld_cst_align16_int64_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 4080(0)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 4080 to i8*) monotonic, align 16
+ %conv = sext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align32_int64_t_int8_t() {
+; CHECK-LABEL: ld_cst_align32_int64_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lbz r3, -27108(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 9999900 to i8*) monotonic, align 4
+ %conv = sext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align64_int64_t_int8_t() {
+; CHECK-P10-LABEL: ld_cst_align64_int64_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_int64_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 1000000000000 to i8*) monotonic, align 4096
+ %conv = sext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_0_int64_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_int64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align16_int64_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_int64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 8(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align32_int64_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_int64_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_int64_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align64_int64_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_int64_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_int64_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_reg_int64_t_uint16_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_int64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhzx r3, r3, r4
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_or_int64_t_uint16_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_int64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv1 = zext i16 %1 to i64
+ ret i64 %conv1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint16_int64_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_int64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align16_int64_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_int64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lhz r3, 24(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 8
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint32_int64_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_int64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align32_int64_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_int64_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_int64_t_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lhzx r3, r3, r4
+; CHECK-P9-NEXT: clrldi r3, r3, 48
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_int64_t_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lhzx r3, r3, r4
+; CHECK-P8-NEXT: clrldi r3, r3, 48
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 16
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint64_int64_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_int64_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lhz r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_int64_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lhz r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align64_int64_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_int64_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_int64_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 4096
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align16_int64_t_uint16_t() {
+; CHECK-LABEL: ld_cst_align16_int64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 4080(0)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i16, i16* inttoptr (i64 4080 to i16*) monotonic, align 16
+ %conv = zext i16 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align32_int64_t_uint16_t() {
+; CHECK-LABEL: ld_cst_align32_int64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lhz r3, -27108(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i16, i16* inttoptr (i64 9999900 to i16*) monotonic, align 4
+ %conv = zext i16 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align64_int64_t_uint16_t() {
+; CHECK-P10-LABEL: ld_cst_align64_int64_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lhz r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_int64_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lhz r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i16, i16* inttoptr (i64 1000000000000 to i16*) monotonic, align 4096
+ %conv = zext i16 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_0_int64_t_int16_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_int64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align16_int64_t_int16_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_int64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 8(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align32_int64_t_int16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_int64_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_int64_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsh r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align64_int64_t_int16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_int64_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_int64_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsh r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_reg_int64_t_int16_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_int64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhzx r3, r3, r4
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_or_int64_t_int16_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_int64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv1 = sext i16 %1 to i64
+ ret i64 %conv1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint16_int64_t_int16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_int64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align16_int64_t_int16_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_int64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lhz r3, 24(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 8
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint32_int64_t_int16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_int64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align32_int64_t_int16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_int64_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_int64_t_int16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lhzx r3, r3, r4
+; CHECK-P9-NEXT: extsh r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_int64_t_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lhzx r3, r3, r4
+; CHECK-P8-NEXT: extsh r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 16
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint64_int64_t_int16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_int64_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lhz r3, 0(r3)
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_int64_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lhz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsh r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align64_int64_t_int16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_int64_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_int64_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsh r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 4096
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align16_int64_t_int16_t() {
+; CHECK-LABEL: ld_cst_align16_int64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 4080(0)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i16, i16* inttoptr (i64 4080 to i16*) monotonic, align 16
+ %conv = sext i16 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align32_int64_t_int16_t() {
+; CHECK-LABEL: ld_cst_align32_int64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lhz r3, -27108(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i16, i16* inttoptr (i64 9999900 to i16*) monotonic, align 4
+ %conv = sext i16 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align64_int64_t_int16_t() {
+; CHECK-P10-LABEL: ld_cst_align64_int64_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lhz r3, 0(r3)
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_int64_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lhz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsh r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i16, i16* inttoptr (i64 1000000000000 to i16*) monotonic, align 4096
+ %conv = sext i16 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_0_int64_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_int64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align16_int64_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_int64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 8(r3)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align32_int64_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_int64_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_int64_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align64_int64_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_int64_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_int64_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_reg_int64_t_uint32_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_int64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwzx r3, r3, r4
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_or_int64_t_uint32_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_int64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv1 = zext i32 %1 to i64
+ ret i64 %conv1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint16_int64_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_int64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align16_int64_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_int64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lwz r3, 24(r3)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 8
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint32_int64_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_int64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align32_int64_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_int64_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_int64_t_uint32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lwzx r3, r3, r4
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_int64_t_uint32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lwzx r3, r3, r4
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 16
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint64_int64_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_int64_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lwz r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_int64_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lwz r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align64_int64_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_int64_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_int64_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4096
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align16_int64_t_uint32_t() {
+; CHECK-LABEL: ld_cst_align16_int64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 4080(0)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i32, i32* inttoptr (i64 4080 to i32*) monotonic, align 16
+ %conv = zext i32 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align32_int64_t_uint32_t() {
+; CHECK-LABEL: ld_cst_align32_int64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lwz r3, -27108(r3)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i32, i32* inttoptr (i64 9999900 to i32*) monotonic, align 4
+ %conv = zext i32 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align64_int64_t_uint32_t() {
+; CHECK-P10-LABEL: ld_cst_align64_int64_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lwz r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_int64_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lwz r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i32, i32* inttoptr (i64 1000000000000 to i32*) monotonic, align 4096
+ %conv = zext i32 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_0_int64_t_int32_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_int64_t_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align16_int64_t_int32_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_int64_t_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 8(r3)
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align32_int64_t_int32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_int64_t_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_int64_t_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align64_int64_t_int32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_int64_t_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_int64_t_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_reg_int64_t_int32_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_int64_t_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwzx r3, r3, r4
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_or_int64_t_int32_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_int64_t_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv1 = sext i32 %1 to i64
+ ret i64 %conv1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint16_int64_t_int32_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_int64_t_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align16_int64_t_int32_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_int64_t_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lwz r3, 24(r3)
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 8
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint32_int64_t_int32_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_int64_t_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align32_int64_t_int32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_int64_t_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_int64_t_int32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lwzx r3, r3, r4
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_int64_t_int32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lwzx r3, r3, r4
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 16
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint64_int64_t_int32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_int64_t_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lwz r3, 0(r3)
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_int64_t_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lwz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align64_int64_t_int32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_int64_t_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_int64_t_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4096
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align16_int64_t_int32_t() {
+; CHECK-LABEL: ld_cst_align16_int64_t_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 4080(0)
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i32, i32* inttoptr (i64 4080 to i32*) monotonic, align 16
+ %conv = sext i32 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align32_int64_t_int32_t() {
+; CHECK-LABEL: ld_cst_align32_int64_t_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lwz r3, -27108(r3)
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i32, i32* inttoptr (i64 9999900 to i32*) monotonic, align 4
+ %conv = sext i32 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align64_int64_t_int32_t() {
+; CHECK-P10-LABEL: ld_cst_align64_int64_t_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lwz r3, 0(r3)
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_int64_t_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lwz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i32, i32* inttoptr (i64 1000000000000 to i32*) monotonic, align 4096
+ %conv = sext i32 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_0_int64_t_uint64_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_int64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ ret i64 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align16_int64_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_int64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ld r3, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ ret i64 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align32_int64_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_int64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_int64_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: ldx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ ret i64 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align64_int64_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_int64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_int64_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: ldx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ ret i64 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_reg_int64_t_uint64_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_int64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ldx r3, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ ret i64 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_or_int64_t_uint64_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_int64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ ret i64 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint16_int64_t_uint64_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_int64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ ret i64 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align16_int64_t_uint64_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_int64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: ld r3, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ ret i64 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint32_int64_t_uint64_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_int64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ ret i64 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align32_int64_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_int64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_int64_t_uint64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: ldx r3, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_int64_t_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: ldx r3, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 16
+ ret i64 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint64_int64_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_int64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: ld r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_int64_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: ld r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ ret i64 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align64_int64_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_int64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_int64_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: ldx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 4096
+ ret i64 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align16_int64_t_uint64_t() {
+; CHECK-LABEL: ld_cst_align16_int64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ld r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i64, i64* inttoptr (i64 4080 to i64*) monotonic, align 16
+ ret i64 %0
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align32_int64_t_uint64_t() {
+; CHECK-LABEL: ld_cst_align32_int64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: ld r3, -27108(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i64, i64* inttoptr (i64 9999900 to i64*) monotonic, align 8
+ ret i64 %0
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align64_int64_t_uint64_t() {
+; CHECK-P10-LABEL: ld_cst_align64_int64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: ld r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_int64_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: ld r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i64, i64* inttoptr (i64 1000000000000 to i64*) monotonic, align 4096
+ ret i64 %0
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_0_uint64_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = zext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align16_uint64_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 8(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = zext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align32_uint64_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint64_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint64_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = zext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align64_uint64_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint64_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint64_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = zext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_reg_uint64_t_uint8_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbzx r3, r3, r4
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = zext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_or_uint64_t_uint8_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv1 = zext i8 %1 to i64
+ ret i64 %conv1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint16_uint64_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = zext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align16_uint64_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lbz r3, 24(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 8
+ %conv = zext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint32_uint64_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = zext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align32_uint64_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint64_t_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lbzx r3, r3, r4
+; CHECK-P9-NEXT: clrldi r3, r3, 56
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint64_t_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: clrldi r3, r3, 56
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 16
+ %conv = zext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint64_uint64_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = zext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align64_uint64_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 4096
+ %conv = zext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align16_uint64_t_uint8_t() {
+; CHECK-LABEL: ld_cst_align16_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 4080(0)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 4080 to i8*) monotonic, align 16
+ %conv = zext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align32_uint64_t_uint8_t() {
+; CHECK-LABEL: ld_cst_align32_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lbz r3, -27108(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 9999900 to i8*) monotonic, align 4
+ %conv = zext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align64_uint64_t_uint8_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint64_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 1000000000000 to i8*) monotonic, align 4096
+ %conv = zext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_0_uint64_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint64_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = sext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align16_uint64_t_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint64_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 8(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = sext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align32_uint64_t_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint64_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint64_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = sext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align64_uint64_t_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint64_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint64_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = sext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_reg_uint64_t_int8_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint64_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbzx r3, r3, r4
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ %conv = sext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_or_uint64_t_int8_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint64_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv1 = sext i8 %1 to i64
+ ret i64 %conv1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint16_uint64_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint64_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = sext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align16_uint64_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint64_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lbz r3, 24(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 8
+ %conv = sext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint32_uint64_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint64_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = sext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align32_uint64_t_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint64_t_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lbzx r3, r3, r4
+; CHECK-P9-NEXT: extsb r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint64_t_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 16
+ %conv = sext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint64_uint64_t_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ %conv = sext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align64_uint64_t_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 4096
+ %conv = sext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align16_uint64_t_int8_t() {
+; CHECK-LABEL: ld_cst_align16_uint64_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 4080(0)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 4080 to i8*) monotonic, align 16
+ %conv = sext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align32_uint64_t_int8_t() {
+; CHECK-LABEL: ld_cst_align32_uint64_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lbz r3, -27108(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 9999900 to i8*) monotonic, align 4
+ %conv = sext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align64_uint64_t_int8_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint64_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 1000000000000 to i8*) monotonic, align 4096
+ %conv = sext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_0_uint64_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align16_uint64_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 8(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align32_uint64_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint64_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint64_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align64_uint64_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint64_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint64_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_reg_uint64_t_uint16_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhzx r3, r3, r4
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_or_uint64_t_uint16_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv1 = zext i16 %1 to i64
+ ret i64 %conv1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint16_uint64_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align16_uint64_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lhz r3, 24(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 8
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint32_uint64_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align32_uint64_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint64_t_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lhzx r3, r3, r4
+; CHECK-P9-NEXT: clrldi r3, r3, 48
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint64_t_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lhzx r3, r3, r4
+; CHECK-P8-NEXT: clrldi r3, r3, 48
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 16
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint64_uint64_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lhz r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lhz r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align64_uint64_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 4096
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align16_uint64_t_uint16_t() {
+; CHECK-LABEL: ld_cst_align16_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 4080(0)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i16, i16* inttoptr (i64 4080 to i16*) monotonic, align 16
+ %conv = zext i16 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align32_uint64_t_uint16_t() {
+; CHECK-LABEL: ld_cst_align32_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lhz r3, -27108(r3)
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i16, i16* inttoptr (i64 9999900 to i16*) monotonic, align 4
+ %conv = zext i16 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align64_uint64_t_uint16_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint64_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lhz r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lhz r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i16, i16* inttoptr (i64 1000000000000 to i16*) monotonic, align 4096
+ %conv = zext i16 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_0_uint64_t_int16_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align16_uint64_t_int16_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 8(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align32_uint64_t_int16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint64_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint64_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsh r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align64_uint64_t_int16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint64_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint64_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsh r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_reg_uint64_t_int16_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhzx r3, r3, r4
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_or_uint64_t_int16_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv1 = sext i16 %1 to i64
+ ret i64 %conv1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint16_uint64_t_int16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align16_uint64_t_int16_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lhz r3, 24(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 8
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint32_uint64_t_int16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align32_uint64_t_int16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint64_t_int16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lhzx r3, r3, r4
+; CHECK-P9-NEXT: extsh r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint64_t_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lhzx r3, r3, r4
+; CHECK-P8-NEXT: extsh r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 16
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint64_uint64_t_int16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lhz r3, 0(r3)
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lhz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsh r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align64_uint64_t_int16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsh r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 4096
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align16_uint64_t_int16_t() {
+; CHECK-LABEL: ld_cst_align16_uint64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 4080(0)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i16, i16* inttoptr (i64 4080 to i16*) monotonic, align 16
+ %conv = sext i16 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align32_uint64_t_int16_t() {
+; CHECK-LABEL: ld_cst_align32_uint64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lhz r3, -27108(r3)
+; CHECK-NEXT: extsh r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i16, i16* inttoptr (i64 9999900 to i16*) monotonic, align 4
+ %conv = sext i16 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align64_uint64_t_int16_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint64_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lhz r3, 0(r3)
+; CHECK-P10-NEXT: extsh r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lhz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsh r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i16, i16* inttoptr (i64 1000000000000 to i16*) monotonic, align 4096
+ %conv = sext i16 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_0_uint64_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align16_uint64_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 8(r3)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align32_uint64_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint64_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint64_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align64_uint64_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint64_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint64_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_reg_uint64_t_uint32_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwzx r3, r3, r4
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_or_uint64_t_uint32_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv1 = zext i32 %1 to i64
+ ret i64 %conv1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint16_uint64_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align16_uint64_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lwz r3, 24(r3)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 8
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint32_uint64_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align32_uint64_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint64_t_uint32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lwzx r3, r3, r4
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint64_t_uint32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lwzx r3, r3, r4
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 16
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint64_uint64_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lwz r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lwz r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align64_uint64_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4096
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align16_uint64_t_uint32_t() {
+; CHECK-LABEL: ld_cst_align16_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 4080(0)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i32, i32* inttoptr (i64 4080 to i32*) monotonic, align 16
+ %conv = zext i32 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align32_uint64_t_uint32_t() {
+; CHECK-LABEL: ld_cst_align32_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lwz r3, -27108(r3)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i32, i32* inttoptr (i64 9999900 to i32*) monotonic, align 4
+ %conv = zext i32 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align64_uint64_t_uint32_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint64_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lwz r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lwz r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i32, i32* inttoptr (i64 1000000000000 to i32*) monotonic, align 4096
+ %conv = zext i32 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_0_uint64_t_int32_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint64_t_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align16_uint64_t_int32_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint64_t_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 8(r3)
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align32_uint64_t_int32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint64_t_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint64_t_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align64_uint64_t_int32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint64_t_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint64_t_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_reg_uint64_t_int32_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint64_t_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwzx r3, r3, r4
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_or_uint64_t_int32_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint64_t_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv1 = sext i32 %1 to i64
+ ret i64 %conv1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint16_uint64_t_int32_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint64_t_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align16_uint64_t_int32_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint64_t_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lwz r3, 24(r3)
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 8
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint32_uint64_t_int32_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint64_t_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align32_uint64_t_int32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint64_t_int32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lwzx r3, r3, r4
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint64_t_int32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lwzx r3, r3, r4
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 16
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint64_uint64_t_int32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lwz r3, 0(r3)
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lwz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align64_uint64_t_int32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4096
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align16_uint64_t_int32_t() {
+; CHECK-LABEL: ld_cst_align16_uint64_t_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 4080(0)
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i32, i32* inttoptr (i64 4080 to i32*) monotonic, align 16
+ %conv = sext i32 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align32_uint64_t_int32_t() {
+; CHECK-LABEL: ld_cst_align32_uint64_t_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lwz r3, -27108(r3)
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i32, i32* inttoptr (i64 9999900 to i32*) monotonic, align 4
+ %conv = sext i32 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align64_uint64_t_int32_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint64_t_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lwz r3, 0(r3)
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lwz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i32, i32* inttoptr (i64 1000000000000 to i32*) monotonic, align 4096
+ %conv = sext i32 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_0_uint64_t_uint64_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ ret i64 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align16_uint64_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ld r3, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ ret i64 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align32_uint64_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint64_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: ldx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ ret i64 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_align64_uint64_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint64_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: ldx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ ret i64 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_reg_uint64_t_uint64_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ldx r3, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ ret i64 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_or_uint64_t_uint64_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ ret i64 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint16_uint64_t_uint64_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ ret i64 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align16_uint64_t_uint64_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: ld r3, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ ret i64 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint32_uint64_t_uint64_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ ret i64 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align32_uint64_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint64_t_uint64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: ldx r3, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint64_t_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: ldx r3, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 16
+ ret i64 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_not_disjoint64_uint64_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: ld r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: ld r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ ret i64 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_disjoint_align64_uint64_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: ldx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 4096
+ ret i64 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align16_uint64_t_uint64_t() {
+; CHECK-LABEL: ld_cst_align16_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ld r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i64, i64* inttoptr (i64 4080 to i64*) monotonic, align 16
+ ret i64 %0
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align32_uint64_t_uint64_t() {
+; CHECK-LABEL: ld_cst_align32_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: ld r3, -27108(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i64, i64* inttoptr (i64 9999900 to i64*) monotonic, align 8
+ ret i64 %0
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local i64 @ld_cst_align64_uint64_t_uint64_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: ld r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: ld r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i64, i64* inttoptr (i64 1000000000000 to i64*) monotonic, align 4096
+ ret i64 %0
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_0_uint64_t_uint8_t(i64 %ptr, i64 %str) {
+; CHECK-LABEL: st_0_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stb r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i8*
+ %conv = trunc i64 %str to i8
+ store atomic i8 %conv, i8* %0 monotonic, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align16_uint64_t_uint8_t(i8* nocapture %ptr, i64 %str) {
+; CHECK-LABEL: st_align16_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stb r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %conv = trunc i64 %str to i8
+ store atomic i8 %conv, i8* %add.ptr monotonic, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align32_uint64_t_uint8_t(i8* nocapture %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_align32_uint64_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: stbx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_uint64_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: stbx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %conv = trunc i64 %str to i8
+ store atomic i8 %conv, i8* %add.ptr monotonic, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align64_uint64_t_uint8_t(i8* nocapture %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_align64_uint64_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stbx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_uint64_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stbx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %conv = trunc i64 %str to i8
+ store atomic i8 %conv, i8* %add.ptr monotonic, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_reg_uint64_t_uint8_t(i8* nocapture %ptr, i64 %off, i64 %str) {
+; CHECK-LABEL: st_reg_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stbx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %conv = trunc i64 %str to i8
+ store atomic i8 %conv, i8* %add.ptr monotonic, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_or1_uint64_t_uint8_t(i64 %ptr, i8 zeroext %off, i64 %str) {
+; CHECK-LABEL: st_or1_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: stb r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i8*
+ %conv1 = trunc i64 %str to i8
+ store atomic i8 %conv1, i8* %0 monotonic, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint16_uint64_t_uint8_t(i64 %ptr, i64 %str) {
+; CHECK-LABEL: st_not_disjoint16_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: stb r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ %conv = trunc i64 %str to i8
+ store atomic i8 %conv, i8* %0 monotonic, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align16_uint64_t_uint8_t(i64 %ptr, i64 %str) {
+; CHECK-LABEL: st_disjoint_align16_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: stb r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ %conv = trunc i64 %str to i8
+ store atomic i8 %conv, i8* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint32_uint64_t_uint8_t(i64 %ptr, i64 %str) {
+; CHECK-LABEL: st_not_disjoint32_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: stb r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ %conv = trunc i64 %str to i8
+ store atomic i8 %conv, i8* %0 monotonic, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align32_uint64_t_uint8_t(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint64_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: stbx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint64_t_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: stbx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint64_t_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: stbx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ %conv = trunc i64 %str to i8
+ store atomic i8 %conv, i8* %0 monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint64_uint64_t_uint8_t(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint64_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: stb r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_uint64_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: stb r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ %conv = trunc i64 %str to i8
+ store atomic i8 %conv, i8* %0 monotonic, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align64_uint64_t_uint8_t(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint64_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stbx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_uint64_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stbx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ %conv = trunc i64 %str to i8
+ store atomic i8 %conv, i8* %0 monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align16_uint64_t_uint8_t(i64 %str) {
+; CHECK-LABEL: st_cst_align16_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stb r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i8
+ store atomic i8 %conv, i8* inttoptr (i64 4080 to i8*) monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align32_uint64_t_uint8_t(i64 %str) {
+; CHECK-LABEL: st_cst_align32_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: stb r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i8
+ store atomic i8 %conv, i8* inttoptr (i64 9999900 to i8*) monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align64_uint64_t_uint8_t(i64 %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint64_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stb r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_uint64_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stb r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i8
+ store atomic i8 %conv, i8* inttoptr (i64 1000000000000 to i8*) monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_0_uint64_t_uint16_t(i64 %ptr, i64 %str) {
+; CHECK-LABEL: st_0_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sth r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i16*
+ %conv = trunc i64 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align16_uint64_t_uint16_t(i8* nocapture %ptr, i64 %str) {
+; CHECK-LABEL: st_align16_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sth r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ %conv = trunc i64 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align32_uint64_t_uint16_t(i8* nocapture %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_align32_uint64_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_uint64_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: sthx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ %conv = trunc i64 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align64_uint64_t_uint16_t(i8* nocapture %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_align64_uint64_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_uint64_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: sthx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ %conv = trunc i64 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_reg_uint64_t_uint16_t(i8* nocapture %ptr, i64 %off, i64 %str) {
+; CHECK-LABEL: st_reg_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sthx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ %conv = trunc i64 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_or1_uint64_t_uint16_t(i64 %ptr, i8 zeroext %off, i64 %str) {
+; CHECK-LABEL: st_or1_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: sth r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i16*
+ %conv1 = trunc i64 %str to i16
+ store atomic i16 %conv1, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint16_uint64_t_uint16_t(i64 %ptr, i64 %str) {
+; CHECK-LABEL: st_not_disjoint16_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: sth r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ %conv = trunc i64 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align16_uint64_t_uint16_t(i64 %ptr, i64 %str) {
+; CHECK-LABEL: st_disjoint_align16_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: sth r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ %conv = trunc i64 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint32_uint64_t_uint16_t(i64 %ptr, i64 %str) {
+; CHECK-LABEL: st_not_disjoint32_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: sth r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ %conv = trunc i64 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align32_uint64_t_uint16_t(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint64_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint64_t_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: sthx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint64_t_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: sthx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ %conv = trunc i64 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint64_uint64_t_uint16_t(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint64_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: sth r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_uint64_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: sth r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ %conv = trunc i64 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align64_uint64_t_uint16_t(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint64_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_uint64_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: sthx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ %conv = trunc i64 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align16_uint64_t_uint16_t(i64 %str) {
+; CHECK-LABEL: st_cst_align16_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sth r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i16
+ store atomic i16 %conv, i16* inttoptr (i64 4080 to i16*) monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align32_uint64_t_uint16_t(i64 %str) {
+; CHECK-LABEL: st_cst_align32_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: sth r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i16
+ store atomic i16 %conv, i16* inttoptr (i64 9999900 to i16*) monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align64_uint64_t_uint16_t(i64 %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint64_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: sth r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_uint64_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: sth r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i16
+ store atomic i16 %conv, i16* inttoptr (i64 1000000000000 to i16*) monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_0_uint64_t_uint32_t(i64 %ptr, i64 %str) {
+; CHECK-LABEL: st_0_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stw r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i32*
+ %conv = trunc i64 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align16_uint64_t_uint32_t(i8* nocapture %ptr, i64 %str) {
+; CHECK-LABEL: st_align16_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stw r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ %conv = trunc i64 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align32_uint64_t_uint32_t(i8* nocapture %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_align32_uint64_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_uint64_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: stwx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ %conv = trunc i64 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align64_uint64_t_uint32_t(i8* nocapture %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_align64_uint64_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_uint64_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stwx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ %conv = trunc i64 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_reg_uint64_t_uint32_t(i8* nocapture %ptr, i64 %off, i64 %str) {
+; CHECK-LABEL: st_reg_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stwx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ %conv = trunc i64 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_or1_uint64_t_uint32_t(i64 %ptr, i8 zeroext %off, i64 %str) {
+; CHECK-LABEL: st_or1_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: stw r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i32*
+ %conv1 = trunc i64 %str to i32
+ store atomic i32 %conv1, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint16_uint64_t_uint32_t(i64 %ptr, i64 %str) {
+; CHECK-LABEL: st_not_disjoint16_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: stw r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ %conv = trunc i64 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align16_uint64_t_uint32_t(i64 %ptr, i64 %str) {
+; CHECK-LABEL: st_disjoint_align16_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: stw r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ %conv = trunc i64 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint32_uint64_t_uint32_t(i64 %ptr, i64 %str) {
+; CHECK-LABEL: st_not_disjoint32_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: stw r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ %conv = trunc i64 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align32_uint64_t_uint32_t(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint64_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint64_t_uint32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: stwx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint64_t_uint32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: stwx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ %conv = trunc i64 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint64_uint64_t_uint32_t(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint64_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: stw r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_uint64_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: stw r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ %conv = trunc i64 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align64_uint64_t_uint32_t(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint64_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_uint64_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stwx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ %conv = trunc i64 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align16_uint64_t_uint32_t(i64 %str) {
+; CHECK-LABEL: st_cst_align16_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stw r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i32
+ store atomic i32 %conv, i32* inttoptr (i64 4080 to i32*) monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align32_uint64_t_uint32_t(i64 %str) {
+; CHECK-LABEL: st_cst_align32_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: stw r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i32
+ store atomic i32 %conv, i32* inttoptr (i64 9999900 to i32*) monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align64_uint64_t_uint32_t(i64 %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint64_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stw r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_uint64_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stw r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i32
+ store atomic i32 %conv, i32* inttoptr (i64 1000000000000 to i32*) monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_0_uint64_t_uint64_t(i64 %ptr, i64 %str) {
+; CHECK-LABEL: st_0_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i64*
+ store atomic i64 %str, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align16_uint64_t_uint64_t(i8* nocapture %ptr, i64 %str) {
+; CHECK-LABEL: st_align16_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ store atomic i64 %str, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align32_uint64_t_uint64_t(i8* nocapture %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_align32_uint64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_uint64_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ store atomic i64 %str, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align64_uint64_t_uint64_t(i8* nocapture %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_align64_uint64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_uint64_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ store atomic i64 %str, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_reg_uint64_t_uint64_t(i8* nocapture %ptr, i64 %off, i64 %str) {
+; CHECK-LABEL: st_reg_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stdx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ store atomic i64 %str, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_or1_uint64_t_uint64_t(i64 %ptr, i8 zeroext %off, i64 %str) {
+; CHECK-LABEL: st_or1_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: std r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i64*
+ store atomic i64 %str, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint16_uint64_t_uint64_t(i64 %ptr, i64 %str) {
+; CHECK-LABEL: st_not_disjoint16_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ store atomic i64 %str, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align16_uint64_t_uint64_t(i64 %ptr, i64 %str) {
+; CHECK-LABEL: st_disjoint_align16_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: std r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ store atomic i64 %str, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint32_uint64_t_uint64_t(i64 %ptr, i64 %str) {
+; CHECK-LABEL: st_not_disjoint32_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ store atomic i64 %str, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align32_uint64_t_uint64_t(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint64_t_uint64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: stdx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint64_t_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: stdx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ store atomic i64 %str, i64* %0 monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint64_uint64_t_uint64_t(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: std r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_uint64_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: std r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ store atomic i64 %str, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align64_uint64_t_uint64_t(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_uint64_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ store atomic i64 %str, i64* %0 monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align16_uint64_t_uint64_t(i64 %str) {
+; CHECK-LABEL: st_cst_align16_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ store atomic i64 %str, i64* inttoptr (i64 4080 to i64*) monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align32_uint64_t_uint64_t(i64 %str) {
+; CHECK-LABEL: st_cst_align32_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: std r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ store atomic i64 %str, i64* inttoptr (i64 9999900 to i64*) monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align64_uint64_t_uint64_t(i64 %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: std r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_uint64_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: std r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ store atomic i64 %str, i64* inttoptr (i64 1000000000000 to i64*) monotonic, align 4096
+ ret void
+}
--- /dev/null
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-P10
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-P10
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P9
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P9
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P8
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P8
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_0_int8_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_int8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ ret i8 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_align16_int8_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_int8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 8(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ ret i8 %0
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_align32_int8_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_int8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_int8_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ ret i8 %0
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_align64_int8_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_int8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_int8_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ ret i8 %0
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_reg_int8_t_uint8_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_int8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbzx r3, r3, r4
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ ret i8 %0
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_or_int8_t_uint8_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_int8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ ret i8 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_not_disjoint16_int8_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_int8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ ret i8 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_disjoint_align16_int8_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_int8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lbz r3, 24(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 8
+ ret i8 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_not_disjoint32_int8_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_int8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ ret i8 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_disjoint_align32_int8_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_int8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_int8_t_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lbzx r3, r3, r4
+; CHECK-P9-NEXT: extsb r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_int8_t_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 16
+ ret i8 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_not_disjoint64_int8_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_int8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_int8_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ ret i8 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_disjoint_align64_int8_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_int8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_int8_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 4096
+ ret i8 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_cst_align16_int8_t_uint8_t() {
+; CHECK-LABEL: ld_cst_align16_int8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 4080(0)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 4080 to i8*) monotonic, align 16
+ ret i8 %0
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_cst_align32_int8_t_uint8_t() {
+; CHECK-LABEL: ld_cst_align32_int8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lbz r3, -27108(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 9999900 to i8*) monotonic, align 4
+ ret i8 %0
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_cst_align64_int8_t_uint8_t() {
+; CHECK-P10-LABEL: ld_cst_align64_int8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_int8_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 1000000000000 to i8*) monotonic, align 4096
+ ret i8 %0
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_0_int8_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_int8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_align16_int8_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_int8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 8(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_align32_int8_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_int8_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_int8_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_align64_int8_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_int8_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_int8_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_reg_int8_t_uint16_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_int8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhzx r3, r3, r4
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_or_int8_t_uint16_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_int8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv1 = trunc i16 %1 to i8
+ ret i8 %conv1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_not_disjoint16_int8_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_int8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_disjoint_align16_int8_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_int8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lhz r3, 24(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 8
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_not_disjoint32_int8_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_int8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_disjoint_align32_int8_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_int8_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_int8_t_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lhzx r3, r3, r4
+; CHECK-P9-NEXT: extsb r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_int8_t_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lhzx r3, r3, r4
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 16
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_not_disjoint64_int8_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_int8_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lhz r3, 0(r3)
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_int8_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lhz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_disjoint_align64_int8_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_int8_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_int8_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 4096
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_cst_align16_int8_t_uint16_t() {
+; CHECK-LABEL: ld_cst_align16_int8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 4080(0)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i16, i16* inttoptr (i64 4080 to i16*) monotonic, align 16
+ %conv = trunc i16 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_cst_align32_int8_t_uint16_t() {
+; CHECK-LABEL: ld_cst_align32_int8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lhz r3, -27108(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i16, i16* inttoptr (i64 9999900 to i16*) monotonic, align 4
+ %conv = trunc i16 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_cst_align64_int8_t_uint16_t() {
+; CHECK-P10-LABEL: ld_cst_align64_int8_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lhz r3, 0(r3)
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_int8_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lhz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i16, i16* inttoptr (i64 1000000000000 to i16*) monotonic, align 4096
+ %conv = trunc i16 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_0_int8_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_int8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_align16_int8_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_int8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 8(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_align32_int8_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_int8_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_int8_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_align64_int8_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_int8_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_int8_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_reg_int8_t_uint32_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_int8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwzx r3, r3, r4
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_or_int8_t_uint32_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_int8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv1 = trunc i32 %1 to i8
+ ret i8 %conv1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_not_disjoint16_int8_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_int8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_disjoint_align16_int8_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_int8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lwz r3, 24(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 8
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_not_disjoint32_int8_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_int8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_disjoint_align32_int8_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_int8_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_int8_t_uint32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lwzx r3, r3, r4
+; CHECK-P9-NEXT: extsb r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_int8_t_uint32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lwzx r3, r3, r4
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 16
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_not_disjoint64_int8_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_int8_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lwz r3, 0(r3)
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_int8_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lwz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_disjoint_align64_int8_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_int8_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_int8_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4096
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_cst_align16_int8_t_uint32_t() {
+; CHECK-LABEL: ld_cst_align16_int8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 4080(0)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i32, i32* inttoptr (i64 4080 to i32*) monotonic, align 16
+ %conv = trunc i32 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_cst_align32_int8_t_uint32_t() {
+; CHECK-LABEL: ld_cst_align32_int8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lwz r3, -27108(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i32, i32* inttoptr (i64 9999900 to i32*) monotonic, align 4
+ %conv = trunc i32 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_cst_align64_int8_t_uint32_t() {
+; CHECK-P10-LABEL: ld_cst_align64_int8_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lwz r3, 0(r3)
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_int8_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lwz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i32, i32* inttoptr (i64 1000000000000 to i32*) monotonic, align 4096
+ %conv = trunc i32 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_0_int8_t_uint64_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_int8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_align16_int8_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_int8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ld r3, 8(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_align32_int8_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_int8_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_int8_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: ldx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_align64_int8_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_int8_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_int8_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: ldx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_reg_int8_t_uint64_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_int8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ldx r3, r3, r4
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_or_int8_t_uint64_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_int8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv1 = trunc i64 %1 to i8
+ ret i8 %conv1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_not_disjoint16_int8_t_uint64_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_int8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_disjoint_align16_int8_t_uint64_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_int8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: ld r3, 24(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_not_disjoint32_int8_t_uint64_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_int8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_disjoint_align32_int8_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_int8_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_int8_t_uint64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: ldx r3, r3, r4
+; CHECK-P9-NEXT: extsb r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_int8_t_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: ldx r3, r3, r4
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 16
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_not_disjoint64_int8_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_int8_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: ld r3, 0(r3)
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_int8_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: ld r3, 0(r3)
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_disjoint_align64_int8_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_int8_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_int8_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: ldx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 4096
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_cst_align16_int8_t_uint64_t() {
+; CHECK-LABEL: ld_cst_align16_int8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ld r3, 4080(0)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i64, i64* inttoptr (i64 4080 to i64*) monotonic, align 16
+ %conv = trunc i64 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_cst_align32_int8_t_uint64_t() {
+; CHECK-LABEL: ld_cst_align32_int8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: ld r3, -27108(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i64, i64* inttoptr (i64 9999900 to i64*) monotonic, align 8
+ %conv = trunc i64 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local signext i8 @ld_cst_align64_int8_t_uint64_t() {
+; CHECK-P10-LABEL: ld_cst_align64_int8_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: ld r3, 0(r3)
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_int8_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: ld r3, 0(r3)
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i64, i64* inttoptr (i64 1000000000000 to i64*) monotonic, align 4096
+ %conv = trunc i64 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_0_uint8_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ ret i8 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_align16_uint8_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 8(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ ret i8 %0
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_align32_uint8_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint8_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ ret i8 %0
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_align64_uint8_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint8_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ ret i8 %0
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_reg_uint8_t_uint8_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbzx r3, r3, r4
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = load atomic i8, i8* %add.ptr monotonic, align 1
+ ret i8 %0
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_or_uint8_t_uint8_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ ret i8 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_not_disjoint16_uint8_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ ret i8 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_disjoint_align16_uint8_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lbz r3, 24(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 8
+ ret i8 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_not_disjoint32_uint8_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ ret i8 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_disjoint_align32_uint8_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint8_t_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lbzx r3, r3, r4
+; CHECK-P9-NEXT: clrldi r3, r3, 56
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint8_t_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: clrldi r3, r3, 56
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 16
+ ret i8 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_not_disjoint64_uint8_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint8_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 1
+ ret i8 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_disjoint_align64_uint8_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint8_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load atomic i8, i8* %0 monotonic, align 4096
+ ret i8 %1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_cst_align16_uint8_t_uint8_t() {
+; CHECK-LABEL: ld_cst_align16_uint8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 4080(0)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 4080 to i8*) monotonic, align 16
+ ret i8 %0
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_cst_align32_uint8_t_uint8_t() {
+; CHECK-LABEL: ld_cst_align32_uint8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lbz r3, -27108(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 9999900 to i8*) monotonic, align 4
+ ret i8 %0
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_cst_align64_uint8_t_uint8_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint8_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i8, i8* inttoptr (i64 1000000000000 to i8*) monotonic, align 4096
+ ret i8 %0
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_0_uint8_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_align16_uint8_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 8(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_align32_uint8_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint8_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint8_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_align64_uint8_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint8_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint8_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_reg_uint8_t_uint16_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhzx r3, r3, r4
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_or_uint8_t_uint16_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv1 = trunc i16 %1 to i8
+ ret i8 %conv1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_not_disjoint16_uint8_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_disjoint_align16_uint8_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lhz r3, 24(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 8
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_not_disjoint32_uint8_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_disjoint_align32_uint8_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint8_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint8_t_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lhzx r3, r3, r4
+; CHECK-P9-NEXT: clrldi r3, r3, 56
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint8_t_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lhzx r3, r3, r4
+; CHECK-P8-NEXT: clrldi r3, r3, 56
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 16
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_not_disjoint64_uint8_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint8_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lhz r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint8_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lhz r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 2
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_disjoint_align64_uint8_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint8_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint8_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load atomic i16, i16* %0 monotonic, align 4096
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_cst_align16_uint8_t_uint16_t() {
+; CHECK-LABEL: ld_cst_align16_uint8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 4080(0)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i16, i16* inttoptr (i64 4080 to i16*) monotonic, align 16
+ %conv = trunc i16 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_cst_align32_uint8_t_uint16_t() {
+; CHECK-LABEL: ld_cst_align32_uint8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lhz r3, -27108(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i16, i16* inttoptr (i64 9999900 to i16*) monotonic, align 4
+ %conv = trunc i16 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_cst_align64_uint8_t_uint16_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint8_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lhz r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint8_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lhz r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i16, i16* inttoptr (i64 1000000000000 to i16*) monotonic, align 4096
+ %conv = trunc i16 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_0_uint8_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_align16_uint8_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 8(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_align32_uint8_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint8_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint8_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_align64_uint8_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint8_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint8_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_reg_uint8_t_uint32_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwzx r3, r3, r4
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_or_uint8_t_uint32_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv1 = trunc i32 %1 to i8
+ ret i8 %conv1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_not_disjoint16_uint8_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_disjoint_align16_uint8_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lwz r3, 24(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 8
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_not_disjoint32_uint8_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_disjoint_align32_uint8_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint8_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint8_t_uint32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lwzx r3, r3, r4
+; CHECK-P9-NEXT: clrldi r3, r3, 56
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint8_t_uint32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lwzx r3, r3, r4
+; CHECK-P8-NEXT: clrldi r3, r3, 56
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 16
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_not_disjoint64_uint8_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint8_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lwz r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint8_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lwz r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_disjoint_align64_uint8_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint8_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint8_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load atomic i32, i32* %0 monotonic, align 4096
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_cst_align16_uint8_t_uint32_t() {
+; CHECK-LABEL: ld_cst_align16_uint8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 4080(0)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i32, i32* inttoptr (i64 4080 to i32*) monotonic, align 16
+ %conv = trunc i32 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_cst_align32_uint8_t_uint32_t() {
+; CHECK-LABEL: ld_cst_align32_uint8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lwz r3, -27108(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i32, i32* inttoptr (i64 9999900 to i32*) monotonic, align 4
+ %conv = trunc i32 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_cst_align64_uint8_t_uint32_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint8_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lwz r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint8_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lwz r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i32, i32* inttoptr (i64 1000000000000 to i32*) monotonic, align 4096
+ %conv = trunc i32 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_0_uint8_t_uint64_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_align16_uint8_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ld r3, 8(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_align32_uint8_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint8_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint8_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: ldx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_align64_uint8_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint8_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint8_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: ldx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_reg_uint8_t_uint64_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ldx r3, r3, r4
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_or_uint8_t_uint64_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv1 = trunc i64 %1 to i8
+ ret i8 %conv1
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_not_disjoint16_uint8_t_uint64_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_disjoint_align16_uint8_t_uint64_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: ld r3, 24(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_not_disjoint32_uint8_t_uint64_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_disjoint_align32_uint8_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint8_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint8_t_uint64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: ldx r3, r3, r4
+; CHECK-P9-NEXT: clrldi r3, r3, 56
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint8_t_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: ldx r3, r3, r4
+; CHECK-P8-NEXT: clrldi r3, r3, 56
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 16
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_not_disjoint64_uint8_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint8_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: ld r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint8_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: ld r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_disjoint_align64_uint8_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint8_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint8_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: ldx r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load atomic i64, i64* %0 monotonic, align 4096
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_cst_align16_uint8_t_uint64_t() {
+; CHECK-LABEL: ld_cst_align16_uint8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ld r3, 4080(0)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i64, i64* inttoptr (i64 4080 to i64*) monotonic, align 16
+ %conv = trunc i64 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_cst_align32_uint8_t_uint64_t() {
+; CHECK-LABEL: ld_cst_align32_uint8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: ld r3, -27108(r3)
+; CHECK-NEXT: clrldi r3, r3, 56
+; CHECK-NEXT: blr
+entry:
+ %0 = load atomic i64, i64* inttoptr (i64 9999900 to i64*) monotonic, align 8
+ %conv = trunc i64 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local zeroext i8 @ld_cst_align64_uint8_t_uint64_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint8_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: ld r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 56
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint8_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: ld r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 56
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load atomic i64, i64* inttoptr (i64 1000000000000 to i64*) monotonic, align 4096
+ %conv = trunc i64 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_0_uint8_t_uint8_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_0_uint8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stb r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i8*
+ store atomic i8 %str, i8* %0 monotonic, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align16_uint8_t_uint8_t(i8* nocapture %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_align16_uint8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stb r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ store atomic i8 %str, i8* %add.ptr monotonic, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align32_uint8_t_uint8_t(i8* nocapture %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_align32_uint8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: stbx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_uint8_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: stbx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ store atomic i8 %str, i8* %add.ptr monotonic, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align64_uint8_t_uint8_t(i8* nocapture %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_align64_uint8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stbx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_uint8_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stbx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ store atomic i8 %str, i8* %add.ptr monotonic, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_reg_uint8_t_uint8_t(i8* nocapture %ptr, i64 %off, i8 zeroext %str) {
+; CHECK-LABEL: st_reg_uint8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stbx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ store atomic i8 %str, i8* %add.ptr monotonic, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_or1_uint8_t_uint8_t(i64 %ptr, i8 zeroext %off, i8 zeroext %str) {
+; CHECK-LABEL: st_or1_uint8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: stb r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i8*
+ store atomic i8 %str, i8* %0 monotonic, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint16_uint8_t_uint8_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint16_uint8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: stb r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ store atomic i8 %str, i8* %0 monotonic, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align16_uint8_t_uint8_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_disjoint_align16_uint8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: stb r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ store atomic i8 %str, i8* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint32_uint8_t_uint8_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint32_uint8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: stb r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ store atomic i8 %str, i8* %0 monotonic, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align32_uint8_t_uint8_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: stbx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint8_t_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: stbx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint8_t_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: stbx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ store atomic i8 %str, i8* %0 monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint64_uint8_t_uint8_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: stb r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_uint8_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: stb r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ store atomic i8 %str, i8* %0 monotonic, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align64_uint8_t_uint8_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stbx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_uint8_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stbx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ store atomic i8 %str, i8* %0 monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align16_uint8_t_uint8_t(i8 zeroext %str) {
+; CHECK-LABEL: st_cst_align16_uint8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stb r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ store atomic i8 %str, i8* inttoptr (i64 4080 to i8*) monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align32_uint8_t_uint8_t(i8 zeroext %str) {
+; CHECK-LABEL: st_cst_align32_uint8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: stb r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ store atomic i8 %str, i8* inttoptr (i64 9999900 to i8*) monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align64_uint8_t_uint8_t(i8 zeroext %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stb r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_uint8_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stb r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ store atomic i8 %str, i8* inttoptr (i64 1000000000000 to i8*) monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_0_uint8_t_uint16_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_0_uint8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sth r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i16*
+ %conv = zext i8 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align16_uint8_t_uint16_t(i8* nocapture %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_align16_uint8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sth r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ %conv = zext i8 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align32_uint8_t_uint16_t(i8* nocapture %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_align32_uint8_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_uint8_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: sthx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ %conv = zext i8 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align64_uint8_t_uint16_t(i8* nocapture %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_align64_uint8_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_uint8_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: sthx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ %conv = zext i8 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_reg_uint8_t_uint16_t(i8* nocapture %ptr, i64 %off, i8 zeroext %str) {
+; CHECK-LABEL: st_reg_uint8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sthx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ %conv = zext i8 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_or1_uint8_t_uint16_t(i64 %ptr, i8 zeroext %off, i8 zeroext %str) {
+; CHECK-LABEL: st_or1_uint8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: sth r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i16*
+ %conv1 = zext i8 %str to i16
+ store atomic i16 %conv1, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint16_uint8_t_uint16_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint16_uint8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: sth r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ %conv = zext i8 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align16_uint8_t_uint16_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_disjoint_align16_uint8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: sth r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ %conv = zext i8 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint32_uint8_t_uint16_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint32_uint8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: sth r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ %conv = zext i8 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align32_uint8_t_uint16_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint8_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint8_t_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: sthx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint8_t_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: sthx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ %conv = zext i8 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint64_uint8_t_uint16_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint8_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: sth r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_uint8_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: sth r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ %conv = zext i8 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align64_uint8_t_uint16_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint8_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_uint8_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: sthx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ %conv = zext i8 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align16_uint8_t_uint16_t(i8 zeroext %str) {
+; CHECK-LABEL: st_cst_align16_uint8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sth r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %str to i16
+ store atomic i16 %conv, i16* inttoptr (i64 4080 to i16*) monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align32_uint8_t_uint16_t(i8 zeroext %str) {
+; CHECK-LABEL: st_cst_align32_uint8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: sth r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %str to i16
+ store atomic i16 %conv, i16* inttoptr (i64 9999900 to i16*) monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align64_uint8_t_uint16_t(i8 zeroext %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint8_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: sth r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_uint8_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: sth r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = zext i8 %str to i16
+ store atomic i16 %conv, i16* inttoptr (i64 1000000000000 to i16*) monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_0_uint8_t_uint32_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_0_uint8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stw r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i32*
+ %conv = zext i8 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align16_uint8_t_uint32_t(i8* nocapture %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_align16_uint8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stw r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ %conv = zext i8 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align32_uint8_t_uint32_t(i8* nocapture %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_align32_uint8_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_uint8_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: stwx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ %conv = zext i8 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align64_uint8_t_uint32_t(i8* nocapture %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_align64_uint8_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_uint8_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stwx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ %conv = zext i8 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_reg_uint8_t_uint32_t(i8* nocapture %ptr, i64 %off, i8 zeroext %str) {
+; CHECK-LABEL: st_reg_uint8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stwx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ %conv = zext i8 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_or1_uint8_t_uint32_t(i64 %ptr, i8 zeroext %off, i8 zeroext %str) {
+; CHECK-LABEL: st_or1_uint8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: stw r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i32*
+ %conv1 = zext i8 %str to i32
+ store atomic i32 %conv1, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint16_uint8_t_uint32_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint16_uint8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: stw r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ %conv = zext i8 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align16_uint8_t_uint32_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_disjoint_align16_uint8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: stw r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ %conv = zext i8 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint32_uint8_t_uint32_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint32_uint8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: stw r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ %conv = zext i8 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align32_uint8_t_uint32_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint8_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint8_t_uint32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: stwx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint8_t_uint32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: stwx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ %conv = zext i8 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint64_uint8_t_uint32_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint8_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: stw r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_uint8_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: stw r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ %conv = zext i8 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align64_uint8_t_uint32_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint8_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_uint8_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stwx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ %conv = zext i8 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align16_uint8_t_uint32_t(i8 zeroext %str) {
+; CHECK-LABEL: st_cst_align16_uint8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stw r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %str to i32
+ store atomic i32 %conv, i32* inttoptr (i64 4080 to i32*) monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align32_uint8_t_uint32_t(i8 zeroext %str) {
+; CHECK-LABEL: st_cst_align32_uint8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: stw r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %str to i32
+ store atomic i32 %conv, i32* inttoptr (i64 9999900 to i32*) monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align64_uint8_t_uint32_t(i8 zeroext %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint8_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stw r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_uint8_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stw r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = zext i8 %str to i32
+ store atomic i32 %conv, i32* inttoptr (i64 1000000000000 to i32*) monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_0_uint8_t_uint64_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_0_uint8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i64*
+ %conv = zext i8 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align16_uint8_t_uint64_t(i8* nocapture %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_align16_uint8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ %conv = zext i8 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align32_uint8_t_uint64_t(i8* nocapture %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_align32_uint8_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_uint8_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ %conv = zext i8 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align64_uint8_t_uint64_t(i8* nocapture %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_align64_uint8_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_uint8_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ %conv = zext i8 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_reg_uint8_t_uint64_t(i8* nocapture %ptr, i64 %off, i8 zeroext %str) {
+; CHECK-LABEL: st_reg_uint8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stdx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ %conv = zext i8 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_or1_uint8_t_uint64_t(i64 %ptr, i8 zeroext %off, i8 zeroext %str) {
+; CHECK-LABEL: st_or1_uint8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: std r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i64*
+ %conv1 = zext i8 %str to i64
+ store atomic i64 %conv1, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint16_uint8_t_uint64_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint16_uint8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ %conv = zext i8 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align16_uint8_t_uint64_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_disjoint_align16_uint8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: std r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ %conv = zext i8 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint32_uint8_t_uint64_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint32_uint8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ %conv = zext i8 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align32_uint8_t_uint64_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint8_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint8_t_uint64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: stdx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint8_t_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: stdx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ %conv = zext i8 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint64_uint8_t_uint64_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint8_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: std r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_uint8_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: std r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ %conv = zext i8 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align64_uint8_t_uint64_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint8_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_uint8_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ %conv = zext i8 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align16_uint8_t_uint64_t(i8 zeroext %str) {
+; CHECK-LABEL: st_cst_align16_uint8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %str to i64
+ store atomic i64 %conv, i64* inttoptr (i64 4080 to i64*) monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align32_uint8_t_uint64_t(i8 zeroext %str) {
+; CHECK-LABEL: st_cst_align32_uint8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: std r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %str to i64
+ store atomic i64 %conv, i64* inttoptr (i64 9999900 to i64*) monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align64_uint8_t_uint64_t(i8 zeroext %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint8_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: std r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_uint8_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: std r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = zext i8 %str to i64
+ store atomic i64 %conv, i64* inttoptr (i64 1000000000000 to i64*) monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_0_int8_t_uint16_t(i64 %ptr, i8 signext %str) {
+; CHECK-LABEL: st_0_int8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sth r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i16*
+ %conv = sext i8 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align16_int8_t_uint16_t(i8* nocapture %ptr, i8 signext %str) {
+; CHECK-LABEL: st_align16_int8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sth r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ %conv = sext i8 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align32_int8_t_uint16_t(i8* nocapture %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_align32_int8_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_int8_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: sthx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ %conv = sext i8 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align64_int8_t_uint16_t(i8* nocapture %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_align64_int8_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_int8_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: sthx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ %conv = sext i8 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_reg_int8_t_uint16_t(i8* nocapture %ptr, i64 %off, i8 signext %str) {
+; CHECK-LABEL: st_reg_int8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sthx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ %conv = sext i8 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_or1_int8_t_uint16_t(i64 %ptr, i8 zeroext %off, i8 signext %str) {
+; CHECK-LABEL: st_or1_int8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: sth r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i16*
+ %conv1 = sext i8 %str to i16
+ store atomic i16 %conv1, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint16_int8_t_uint16_t(i64 %ptr, i8 signext %str) {
+; CHECK-LABEL: st_not_disjoint16_int8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: sth r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ %conv = sext i8 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align16_int8_t_uint16_t(i64 %ptr, i8 signext %str) {
+; CHECK-LABEL: st_disjoint_align16_int8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: sth r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ %conv = sext i8 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint32_int8_t_uint16_t(i64 %ptr, i8 signext %str) {
+; CHECK-LABEL: st_not_disjoint32_int8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: sth r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ %conv = sext i8 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align32_int8_t_uint16_t(i64 %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_int8_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_int8_t_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: sthx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_int8_t_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: sthx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ %conv = sext i8 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint64_int8_t_uint16_t(i64 %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_int8_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: sth r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_int8_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: sth r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ %conv = sext i8 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align64_int8_t_uint16_t(i64 %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_int8_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_int8_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: sthx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ %conv = sext i8 %str to i16
+ store atomic i16 %conv, i16* %0 monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align16_int8_t_uint16_t(i8 signext %str) {
+; CHECK-LABEL: st_cst_align16_int8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sth r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i8 %str to i16
+ store atomic i16 %conv, i16* inttoptr (i64 4080 to i16*) monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align32_int8_t_uint16_t(i8 signext %str) {
+; CHECK-LABEL: st_cst_align32_int8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: sth r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i8 %str to i16
+ store atomic i16 %conv, i16* inttoptr (i64 9999900 to i16*) monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align64_int8_t_uint16_t(i8 signext %str) {
+; CHECK-P10-LABEL: st_cst_align64_int8_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: sth r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_int8_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: sth r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = sext i8 %str to i16
+ store atomic i16 %conv, i16* inttoptr (i64 1000000000000 to i16*) monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_0_int8_t_uint32_t(i64 %ptr, i8 signext %str) {
+; CHECK-LABEL: st_0_int8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stw r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i32*
+ %conv = sext i8 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align16_int8_t_uint32_t(i8* nocapture %ptr, i8 signext %str) {
+; CHECK-LABEL: st_align16_int8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stw r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ %conv = sext i8 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align32_int8_t_uint32_t(i8* nocapture %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_align32_int8_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_int8_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: stwx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ %conv = sext i8 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align64_int8_t_uint32_t(i8* nocapture %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_align64_int8_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_int8_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stwx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ %conv = sext i8 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_reg_int8_t_uint32_t(i8* nocapture %ptr, i64 %off, i8 signext %str) {
+; CHECK-LABEL: st_reg_int8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stwx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ %conv = sext i8 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_or1_int8_t_uint32_t(i64 %ptr, i8 zeroext %off, i8 signext %str) {
+; CHECK-LABEL: st_or1_int8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: stw r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i32*
+ %conv1 = sext i8 %str to i32
+ store atomic i32 %conv1, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint16_int8_t_uint32_t(i64 %ptr, i8 signext %str) {
+; CHECK-LABEL: st_not_disjoint16_int8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: stw r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ %conv = sext i8 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align16_int8_t_uint32_t(i64 %ptr, i8 signext %str) {
+; CHECK-LABEL: st_disjoint_align16_int8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: stw r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ %conv = sext i8 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint32_int8_t_uint32_t(i64 %ptr, i8 signext %str) {
+; CHECK-LABEL: st_not_disjoint32_int8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: stw r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ %conv = sext i8 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align32_int8_t_uint32_t(i64 %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_int8_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_int8_t_uint32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: stwx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_int8_t_uint32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: stwx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ %conv = sext i8 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint64_int8_t_uint32_t(i64 %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_int8_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: stw r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_int8_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: stw r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ %conv = sext i8 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align64_int8_t_uint32_t(i64 %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_int8_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_int8_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stwx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ %conv = sext i8 %str to i32
+ store atomic i32 %conv, i32* %0 monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align16_int8_t_uint32_t(i8 signext %str) {
+; CHECK-LABEL: st_cst_align16_int8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stw r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i8 %str to i32
+ store atomic i32 %conv, i32* inttoptr (i64 4080 to i32*) monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align32_int8_t_uint32_t(i8 signext %str) {
+; CHECK-LABEL: st_cst_align32_int8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: stw r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i8 %str to i32
+ store atomic i32 %conv, i32* inttoptr (i64 9999900 to i32*) monotonic, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align64_int8_t_uint32_t(i8 signext %str) {
+; CHECK-P10-LABEL: st_cst_align64_int8_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stw r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_int8_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stw r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = sext i8 %str to i32
+ store atomic i32 %conv, i32* inttoptr (i64 1000000000000 to i32*) monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_0_int8_t_uint64_t(i64 %ptr, i8 signext %str) {
+; CHECK-LABEL: st_0_int8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i64*
+ %conv = sext i8 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align16_int8_t_uint64_t(i8* nocapture %ptr, i8 signext %str) {
+; CHECK-LABEL: st_align16_int8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ %conv = sext i8 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align32_int8_t_uint64_t(i8* nocapture %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_align32_int8_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_int8_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ %conv = sext i8 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_align64_int8_t_uint64_t(i8* nocapture %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_align64_int8_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_int8_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ %conv = sext i8 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_reg_int8_t_uint64_t(i8* nocapture %ptr, i64 %off, i8 signext %str) {
+; CHECK-LABEL: st_reg_int8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stdx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ %conv = sext i8 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_or1_int8_t_uint64_t(i64 %ptr, i8 zeroext %off, i8 signext %str) {
+; CHECK-LABEL: st_or1_int8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: std r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i64*
+ %conv1 = sext i8 %str to i64
+ store atomic i64 %conv1, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint16_int8_t_uint64_t(i64 %ptr, i8 signext %str) {
+; CHECK-LABEL: st_not_disjoint16_int8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ %conv = sext i8 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align16_int8_t_uint64_t(i64 %ptr, i8 signext %str) {
+; CHECK-LABEL: st_disjoint_align16_int8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: std r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ %conv = sext i8 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint32_int8_t_uint64_t(i64 %ptr, i8 signext %str) {
+; CHECK-LABEL: st_not_disjoint32_int8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ %conv = sext i8 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align32_int8_t_uint64_t(i64 %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_int8_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_int8_t_uint64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: stdx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_int8_t_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: stdx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ %conv = sext i8 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_not_disjoint64_int8_t_uint64_t(i64 %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_int8_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: std r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_int8_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: std r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ %conv = sext i8 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_disjoint_align64_int8_t_uint64_t(i64 %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_int8_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_int8_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ %conv = sext i8 %str to i64
+ store atomic i64 %conv, i64* %0 monotonic, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align16_int8_t_uint64_t(i8 signext %str) {
+; CHECK-LABEL: st_cst_align16_int8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i8 %str to i64
+ store atomic i64 %conv, i64* inttoptr (i64 4080 to i64*) monotonic, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align32_int8_t_uint64_t(i8 signext %str) {
+; CHECK-LABEL: st_cst_align32_int8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: std r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i8 %str to i64
+ store atomic i64 %conv, i64* inttoptr (i64 9999900 to i64*) monotonic, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @st_cst_align64_int8_t_uint64_t(i8 signext %str) {
+; CHECK-P10-LABEL: st_cst_align64_int8_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: std r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_int8_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: std r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = sext i8 %str to i64
+ store atomic i64 %conv, i64* inttoptr (i64 1000000000000 to i64*) monotonic, align 4096
+ ret void
+}
--- /dev/null
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-P10,CHECK-P10-LE
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-P10,CHECK-P10-BE
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10
+
+@GlobLd128 = dso_local local_unnamed_addr global [20 x fp128] zeroinitializer, align 16
+@GlobSt128 = dso_local local_unnamed_addr global [20 x fp128] zeroinitializer, align 16
+
+; Function Attrs: norecurse nounwind readonly willreturn
+define dso_local fp128 @ld_0___float128___float128(i64 %ptr) {
+; CHECK-LABEL: ld_0___float128___float128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lxv v2, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to fp128*
+ %1 = load fp128, fp128* %0, align 16
+ ret fp128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly willreturn
+define dso_local fp128 @ld_unalign16___float128___float128(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_unalign16___float128___float128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addi r3, r3, 1
+; CHECK-NEXT: lxvx v2, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1
+ %0 = bitcast i8* %add.ptr to fp128*
+ %1 = load fp128, fp128* %0, align 16
+ ret fp128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly willreturn
+define dso_local fp128 @ld_align16___float128___float128(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16___float128___float128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addi r3, r3, 8
+; CHECK-NEXT: lxvx v2, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to fp128*
+ %1 = load fp128, fp128* %0, align 16
+ ret fp128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly willreturn
+define dso_local fp128 @ld_unalign32___float128___float128(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_unalign32___float128___float128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999
+; CHECK-P10-NEXT: lxvx v2, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_unalign32___float128___float128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1
+; CHECK-PREP10-NEXT: ori r4, r4, 34463
+; CHECK-PREP10-NEXT: lxvx v2, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999
+ %0 = bitcast i8* %add.ptr to fp128*
+ %1 = load fp128, fp128* %0, align 16
+ ret fp128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly willreturn
+define dso_local fp128 @ld_align32___float128___float128(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32___float128___float128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lxvx v2, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32___float128___float128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lxvx v2, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to fp128*
+ %1 = load fp128, fp128* %0, align 16
+ ret fp128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly willreturn
+define dso_local fp128 @ld_unalign64___float128___float128(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_unalign64___float128___float128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: lxvx v2, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_unalign64___float128___float128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: lxvx v2, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
+ %0 = bitcast i8* %add.ptr to fp128*
+ %1 = load fp128, fp128* %0, align 16
+ ret fp128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly willreturn
+define dso_local fp128 @ld_align64___float128___float128(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64___float128___float128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lxvx v2, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64___float128___float128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lxvx v2, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to fp128*
+ %1 = load fp128, fp128* %0, align 16
+ ret fp128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly willreturn
+define dso_local fp128 @ld_reg___float128___float128(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg___float128___float128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lxvx v2, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to fp128*
+ %1 = load fp128, fp128* %0, align 16
+ ret fp128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly willreturn
+define dso_local fp128 @ld_or___float128___float128(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or___float128___float128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lxvx v2, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to fp128*
+ %1 = load fp128, fp128* %0, align 16
+ ret fp128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly willreturn
+define dso_local fp128 @ld_or2___float128___float128(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or2___float128___float128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lxvx v2, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = zext i8 %off to i64
+ %or = or i64 %and, %conv
+ %0 = inttoptr i64 %or to fp128*
+ %1 = load fp128, fp128* %0, align 16
+ ret fp128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly willreturn
+define dso_local fp128 @ld_not_disjoint16___float128___float128(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16___float128___float128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lxvx v2, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to fp128*
+ %1 = load fp128, fp128* %0, align 16
+ ret fp128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly willreturn
+define dso_local fp128 @ld_disjoint_unalign16___float128___float128(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_unalign16___float128___float128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lxvx v2, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 6
+ %0 = inttoptr i64 %or to fp128*
+ %1 = load fp128, fp128* %0, align 16
+ ret fp128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly willreturn
+define dso_local fp128 @ld_disjoint_align16___float128___float128(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16___float128___float128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: ori r3, r3, 24
+; CHECK-NEXT: lxvx v2, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to fp128*
+ %1 = load fp128, fp128* %0, align 16
+ ret fp128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly willreturn
+define dso_local fp128 @ld_not_disjoint32___float128___float128(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32___float128___float128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lxvx v2, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to fp128*
+ %1 = load fp128, fp128* %0, align 16
+ ret fp128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly willreturn
+define dso_local fp128 @ld_disjoint_unalign32___float128___float128(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_unalign32___float128___float128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
+; CHECK-P10-NEXT: pli r4, 99999
+; CHECK-P10-NEXT: lxvx v2, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_unalign32___float128___float128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
+; CHECK-PREP10-NEXT: ori r4, r4, 34463
+; CHECK-PREP10-NEXT: lxvx v2, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1048576
+ %or = or i64 %and, 99999
+ %0 = inttoptr i64 %or to fp128*
+ %1 = load fp128, fp128* %0, align 16
+ ret fp128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly willreturn
+define dso_local fp128 @ld_disjoint_align32___float128___float128(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32___float128___float128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lxvx v2, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align32___float128___float128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, -15264
+; CHECK-PREP10-NEXT: and r3, r3, r4
+; CHECK-PREP10-NEXT: lis r4, 15258
+; CHECK-PREP10-NEXT: ori r4, r4, 41712
+; CHECK-PREP10-NEXT: lxvx v2, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to fp128*
+ %1 = load fp128, fp128* %0, align 16
+ ret fp128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly willreturn
+define dso_local fp128 @ld_not_disjoint64___float128___float128(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64___float128___float128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lxvx v2, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64___float128___float128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lxvx v2, 0, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to fp128*
+ %1 = load fp128, fp128* %0, align 16
+ ret fp128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly willreturn
+define dso_local fp128 @ld_disjoint_unalign64___float128___float128(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_unalign64___float128___float128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: lxvx v2, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_unalign64___float128___float128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: lxvx v2, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000001
+ %0 = inttoptr i64 %or to fp128*
+ %1 = load fp128, fp128* %0, align 16
+ ret fp128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly willreturn
+define dso_local fp128 @ld_disjoint_align64___float128___float128(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64___float128___float128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lxvx v2, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64___float128___float128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lxvx v2, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to fp128*
+ %1 = load fp128, fp128* %0, align 4096
+ ret fp128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly willreturn
+define dso_local fp128 @ld_cst_unalign16___float128___float128() {
+; CHECK-LABEL: ld_cst_unalign16___float128___float128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: li r3, 255
+; CHECK-NEXT: lxvx v2, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load fp128, fp128* inttoptr (i64 255 to fp128*), align 16
+ ret fp128 %0
+}
+
+; Function Attrs: norecurse nounwind readonly willreturn
+define dso_local fp128 @ld_cst_align16___float128___float128() {
+; CHECK-LABEL: ld_cst_align16___float128___float128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lxv v2, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %0 = load fp128, fp128* inttoptr (i64 4080 to fp128*), align 16
+ ret fp128 %0
+}
+
+; Function Attrs: norecurse nounwind readonly willreturn
+define dso_local fp128 @ld_cst_unalign32___float128___float128() {
+; CHECK-P10-LABEL: ld_cst_unalign32___float128___float128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 99999
+; CHECK-P10-NEXT: lxvx v2, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_unalign32___float128___float128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 1
+; CHECK-PREP10-NEXT: ori r3, r3, 34463
+; CHECK-PREP10-NEXT: lxvx v2, 0, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load fp128, fp128* inttoptr (i64 99999 to fp128*), align 16
+ ret fp128 %0
+}
+
+; Function Attrs: norecurse nounwind readonly willreturn
+define dso_local fp128 @ld_cst_align32___float128___float128() {
+; CHECK-P10-LABEL: ld_cst_align32___float128___float128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 9999900
+; CHECK-P10-NEXT: lxvx v2, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align32___float128___float128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 152
+; CHECK-PREP10-NEXT: ori r3, r3, 38428
+; CHECK-PREP10-NEXT: lxvx v2, 0, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load fp128, fp128* inttoptr (i64 9999900 to fp128*), align 16
+ ret fp128 %0
+}
+
+; Function Attrs: norecurse nounwind readonly willreturn
+define dso_local fp128 @ld_cst_unalign64___float128___float128() {
+; CHECK-P10-LABEL: ld_cst_unalign64___float128___float128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 232
+; CHECK-P10-NEXT: pli r4, 3567587329
+; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
+; CHECK-P10-NEXT: lxvx v2, 0, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_unalign64___float128___float128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r3, 29
+; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
+; CHECK-PREP10-NEXT: oris r3, r3, 54437
+; CHECK-PREP10-NEXT: ori r3, r3, 4097
+; CHECK-PREP10-NEXT: lxvx v2, 0, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load fp128, fp128* inttoptr (i64 1000000000001 to fp128*), align 16
+ ret fp128 %0
+}
+
+; Function Attrs: norecurse nounwind readonly willreturn
+define dso_local fp128 @ld_cst_align64___float128___float128() {
+; CHECK-P10-LABEL: ld_cst_align64___float128___float128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lxvx v2, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64___float128___float128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lxvx v2, 0, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load fp128, fp128* inttoptr (i64 1000000000000 to fp128*), align 4096
+ ret fp128 %0
+}
+
+; Function Attrs: nofree norecurse nounwind willreturn writeonly
+define dso_local void @st_0___float128___float128(i64 %ptr, fp128 %str) {
+; CHECK-LABEL: st_0___float128___float128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stxv v2, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to fp128*
+ store fp128 %str, fp128* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind willreturn writeonly
+define dso_local void @st_unalign16___float128___float128(i8* nocapture %ptr, fp128 %str) {
+; CHECK-LABEL: st_unalign16___float128___float128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addi r3, r3, 1
+; CHECK-NEXT: stxvx v2, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1
+ %0 = bitcast i8* %add.ptr to fp128*
+ store fp128 %str, fp128* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind willreturn writeonly
+define dso_local void @st_align16___float128___float128(i8* nocapture %ptr, fp128 %str) {
+; CHECK-LABEL: st_align16___float128___float128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addi r3, r3, 8
+; CHECK-NEXT: stxvx v2, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to fp128*
+ store fp128 %str, fp128* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind willreturn writeonly
+define dso_local void @st_unalign32___float128___float128(i8* nocapture %ptr, fp128 %str) {
+; CHECK-P10-LABEL: st_unalign32___float128___float128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999
+; CHECK-P10-NEXT: stxvx v2, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_unalign32___float128___float128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1
+; CHECK-PREP10-NEXT: ori r4, r4, 34463
+; CHECK-PREP10-NEXT: stxvx v2, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999
+ %0 = bitcast i8* %add.ptr to fp128*
+ store fp128 %str, fp128* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind willreturn writeonly
+define dso_local void @st_align32___float128___float128(i8* nocapture %ptr, fp128 %str) {
+; CHECK-P10-LABEL: st_align32___float128___float128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: stxvx v2, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32___float128___float128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: stxvx v2, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to fp128*
+ store fp128 %str, fp128* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind willreturn writeonly
+define dso_local void @st_unalign64___float128___float128(i8* nocapture %ptr, fp128 %str) {
+; CHECK-P10-LABEL: st_unalign64___float128___float128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: stxvx v2, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_unalign64___float128___float128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: stxvx v2, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
+ %0 = bitcast i8* %add.ptr to fp128*
+ store fp128 %str, fp128* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind willreturn writeonly
+define dso_local void @st_align64___float128___float128(i8* nocapture %ptr, fp128 %str) {
+; CHECK-P10-LABEL: st_align64___float128___float128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stxvx v2, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64___float128___float128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stxvx v2, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to fp128*
+ store fp128 %str, fp128* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind willreturn writeonly
+define dso_local void @st_reg___float128___float128(i8* nocapture %ptr, i64 %off, fp128 %str) {
+; CHECK-LABEL: st_reg___float128___float128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stxvx v2, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to fp128*
+ store fp128 %str, fp128* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind willreturn writeonly
+define dso_local void @st_or1___float128___float128(i64 %ptr, i8 zeroext %off, fp128 %str) {
+; CHECK-LABEL: st_or1___float128___float128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: stxvx v2, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to fp128*
+ store fp128 %str, fp128* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind willreturn writeonly
+define dso_local void @st_or2___float128___float128(i64 %ptr, i8 zeroext %off, fp128 %str) {
+; CHECK-LABEL: st_or2___float128___float128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: stxvx v2, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = zext i8 %off to i64
+ %or = or i64 %and, %conv
+ %0 = inttoptr i64 %or to fp128*
+ store fp128 %str, fp128* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind willreturn writeonly
+define dso_local void @st_not_disjoint16___float128___float128(i64 %ptr, fp128 %str) {
+; CHECK-LABEL: st_not_disjoint16___float128___float128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: stxvx v2, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to fp128*
+ store fp128 %str, fp128* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind willreturn writeonly
+define dso_local void @st_disjoint_unalign16___float128___float128(i64 %ptr, fp128 %str) {
+; CHECK-LABEL: st_disjoint_unalign16___float128___float128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: stxvx v2, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 6
+ %0 = inttoptr i64 %or to fp128*
+ store fp128 %str, fp128* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind willreturn writeonly
+define dso_local void @st_disjoint_align16___float128___float128(i64 %ptr, fp128 %str) {
+; CHECK-LABEL: st_disjoint_align16___float128___float128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: ori r3, r3, 24
+; CHECK-NEXT: stxvx v2, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to fp128*
+ store fp128 %str, fp128* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind willreturn writeonly
+define dso_local void @st_not_disjoint32___float128___float128(i64 %ptr, fp128 %str) {
+; CHECK-LABEL: st_not_disjoint32___float128___float128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: stxvx v2, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to fp128*
+ store fp128 %str, fp128* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind willreturn writeonly
+define dso_local void @st_disjoint_unalign32___float128___float128(i64 %ptr, fp128 %str) {
+; CHECK-P10-LABEL: st_disjoint_unalign32___float128___float128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
+; CHECK-P10-NEXT: pli r4, 99999
+; CHECK-P10-NEXT: stxvx v2, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_unalign32___float128___float128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
+; CHECK-PREP10-NEXT: ori r4, r4, 34463
+; CHECK-PREP10-NEXT: stxvx v2, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1048576
+ %or = or i64 %and, 99999
+ %0 = inttoptr i64 %or to fp128*
+ store fp128 %str, fp128* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind willreturn writeonly
+define dso_local void @st_disjoint_align32___float128___float128(i64 %ptr, fp128 %str) {
+; CHECK-P10-LABEL: st_disjoint_align32___float128___float128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: stxvx v2, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align32___float128___float128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, -15264
+; CHECK-PREP10-NEXT: and r3, r3, r4
+; CHECK-PREP10-NEXT: lis r4, 15258
+; CHECK-PREP10-NEXT: ori r4, r4, 41712
+; CHECK-PREP10-NEXT: stxvx v2, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to fp128*
+ store fp128 %str, fp128* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind willreturn writeonly
+define dso_local void @st_not_disjoint64___float128___float128(i64 %ptr, fp128 %str) {
+; CHECK-P10-LABEL: st_not_disjoint64___float128___float128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stxvx v2, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64___float128___float128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: stxvx v2, 0, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to fp128*
+ store fp128 %str, fp128* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind willreturn writeonly
+define dso_local void @st_disjoint_unalign64___float128___float128(i64 %ptr, fp128 %str) {
+; CHECK-P10-LABEL: st_disjoint_unalign64___float128___float128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: stxvx v2, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_unalign64___float128___float128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: stxvx v2, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000001
+ %0 = inttoptr i64 %or to fp128*
+ store fp128 %str, fp128* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind willreturn writeonly
+define dso_local void @st_disjoint_align64___float128___float128(i64 %ptr, fp128 %str) {
+; CHECK-P10-LABEL: st_disjoint_align64___float128___float128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stxvx v2, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64___float128___float128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stxvx v2, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to fp128*
+ store fp128 %str, fp128* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind willreturn writeonly
+define dso_local void @st_cst_unalign16___float128___float128(fp128 %str) {
+; CHECK-LABEL: st_cst_unalign16___float128___float128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: li r3, 255
+; CHECK-NEXT: stxvx v2, 0, r3
+; CHECK-NEXT: blr
+entry:
+ store fp128 %str, fp128* inttoptr (i64 255 to fp128*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind willreturn writeonly
+define dso_local void @st_cst_align16___float128___float128(fp128 %str) {
+; CHECK-LABEL: st_cst_align16___float128___float128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stxv v2, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ store fp128 %str, fp128* inttoptr (i64 4080 to fp128*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind willreturn writeonly
+define dso_local void @st_cst_unalign32___float128___float128(fp128 %str) {
+; CHECK-P10-LABEL: st_cst_unalign32___float128___float128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 99999
+; CHECK-P10-NEXT: stxvx v2, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_unalign32___float128___float128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 1
+; CHECK-PREP10-NEXT: ori r3, r3, 34463
+; CHECK-PREP10-NEXT: stxvx v2, 0, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ store fp128 %str, fp128* inttoptr (i64 99999 to fp128*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind willreturn writeonly
+define dso_local void @st_cst_align32___float128___float128(fp128 %str) {
+; CHECK-P10-LABEL: st_cst_align32___float128___float128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 9999900
+; CHECK-P10-NEXT: stxvx v2, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align32___float128___float128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 152
+; CHECK-PREP10-NEXT: ori r3, r3, 38428
+; CHECK-PREP10-NEXT: stxvx v2, 0, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ store fp128 %str, fp128* inttoptr (i64 9999900 to fp128*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind willreturn writeonly
+define dso_local void @st_cst_unalign64___float128___float128(fp128 %str) {
+; CHECK-P10-LABEL: st_cst_unalign64___float128___float128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 232
+; CHECK-P10-NEXT: pli r4, 3567587329
+; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
+; CHECK-P10-NEXT: stxvx v2, 0, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_unalign64___float128___float128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r3, 29
+; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
+; CHECK-PREP10-NEXT: oris r3, r3, 54437
+; CHECK-PREP10-NEXT: ori r3, r3, 4097
+; CHECK-PREP10-NEXT: stxvx v2, 0, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ store fp128 %str, fp128* inttoptr (i64 1000000000001 to fp128*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind willreturn writeonly
+define dso_local void @st_cst_align64___float128___float128(fp128 %str) {
+; CHECK-P10-LABEL: st_cst_align64___float128___float128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: stxvx v2, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64___float128___float128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: stxvx v2, 0, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ store fp128 %str, fp128* inttoptr (i64 1000000000000 to fp128*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind willreturn
+define dso_local void @testGlob128PtrPlus0() {
+; CHECK-P10-LE-LABEL: testGlob128PtrPlus0:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plxv vs0, GlobLd128@PCREL(0), 1
+; CHECK-P10-LE-NEXT: pstxv vs0, GlobSt128@PCREL(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob128PtrPlus0:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd128@toc@ha
+; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd128@toc@l
+; CHECK-P10-BE-NEXT: lxvx vs0, 0, r3
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobSt128@toc@ha
+; CHECK-P10-BE-NEXT: addi r3, r3, GlobSt128@toc@l
+; CHECK-P10-BE-NEXT: stxvx vs0, 0, r3
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-PREP10-LABEL: testGlob128PtrPlus0:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: addis r3, r2, GlobLd128@toc@ha
+; CHECK-PREP10-NEXT: addi r3, r3, GlobLd128@toc@l
+; CHECK-PREP10-NEXT: lxvx vs0, 0, r3
+; CHECK-PREP10-NEXT: addis r3, r2, GlobSt128@toc@ha
+; CHECK-PREP10-NEXT: addi r3, r3, GlobSt128@toc@l
+; CHECK-PREP10-NEXT: stxvx vs0, 0, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load fp128, fp128* getelementptr inbounds ([20 x fp128], [20 x fp128]* @GlobLd128, i64 0, i64 0), align 16
+ store fp128 %0, fp128* getelementptr inbounds ([20 x fp128], [20 x fp128]* @GlobSt128, i64 0, i64 0), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind willreturn
+define dso_local void @testGlob128PtrPlus3() {
+; CHECK-P10-LE-LABEL: testGlob128PtrPlus3:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plxv vs0, GlobLd128@PCREL+3(0), 1
+; CHECK-P10-LE-NEXT: pstxv vs0, GlobSt128@PCREL+3(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob128PtrPlus3:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd128@toc@ha
+; CHECK-P10-BE-NEXT: li r4, 3
+; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd128@toc@l
+; CHECK-P10-BE-NEXT: lxvx vs0, r3, r4
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobSt128@toc@ha
+; CHECK-P10-BE-NEXT: addi r3, r3, GlobSt128@toc@l
+; CHECK-P10-BE-NEXT: stxvx vs0, r3, r4
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-PREP10-LABEL: testGlob128PtrPlus3:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: addis r3, r2, GlobLd128@toc@ha
+; CHECK-PREP10-NEXT: li r4, 3
+; CHECK-PREP10-NEXT: addi r3, r3, GlobLd128@toc@l
+; CHECK-PREP10-NEXT: lxvx vs0, r3, r4
+; CHECK-PREP10-NEXT: addis r3, r2, GlobSt128@toc@ha
+; CHECK-PREP10-NEXT: addi r3, r3, GlobSt128@toc@l
+; CHECK-PREP10-NEXT: stxvx vs0, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load fp128, fp128* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x fp128]* @GlobLd128 to i8*), i64 3) to fp128*), align 16
+ store fp128 %0, fp128* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x fp128]* @GlobSt128 to i8*), i64 3) to fp128*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind willreturn
+define dso_local void @testGlob128PtrPlus4() {
+; CHECK-P10-LE-LABEL: testGlob128PtrPlus4:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plxv vs0, GlobLd128@PCREL+4(0), 1
+; CHECK-P10-LE-NEXT: pstxv vs0, GlobSt128@PCREL+4(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob128PtrPlus4:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd128@toc@ha
+; CHECK-P10-BE-NEXT: li r4, 4
+; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd128@toc@l
+; CHECK-P10-BE-NEXT: lxvx vs0, r3, r4
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobSt128@toc@ha
+; CHECK-P10-BE-NEXT: addi r3, r3, GlobSt128@toc@l
+; CHECK-P10-BE-NEXT: stxvx vs0, r3, r4
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-PREP10-LABEL: testGlob128PtrPlus4:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: addis r3, r2, GlobLd128@toc@ha
+; CHECK-PREP10-NEXT: li r4, 4
+; CHECK-PREP10-NEXT: addi r3, r3, GlobLd128@toc@l
+; CHECK-PREP10-NEXT: lxvx vs0, r3, r4
+; CHECK-PREP10-NEXT: addis r3, r2, GlobSt128@toc@ha
+; CHECK-PREP10-NEXT: addi r3, r3, GlobSt128@toc@l
+; CHECK-PREP10-NEXT: stxvx vs0, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load fp128, fp128* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x fp128]* @GlobLd128 to i8*), i64 4) to fp128*), align 16
+ store fp128 %0, fp128* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x fp128]* @GlobSt128 to i8*), i64 4) to fp128*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind willreturn
+define dso_local void @testGlob128PtrPlus16() {
+; CHECK-P10-LE-LABEL: testGlob128PtrPlus16:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plxv vs0, GlobLd128@PCREL+16(0), 1
+; CHECK-P10-LE-NEXT: pstxv vs0, GlobSt128@PCREL+16(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob128PtrPlus16:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd128@toc@ha
+; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd128@toc@l
+; CHECK-P10-BE-NEXT: lxv vs0, 16(r3)
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobSt128@toc@ha
+; CHECK-P10-BE-NEXT: addi r3, r3, GlobSt128@toc@l
+; CHECK-P10-BE-NEXT: stxv vs0, 16(r3)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-PREP10-LABEL: testGlob128PtrPlus16:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: addis r3, r2, GlobLd128@toc@ha
+; CHECK-PREP10-NEXT: addi r3, r3, GlobLd128@toc@l
+; CHECK-PREP10-NEXT: lxv vs0, 16(r3)
+; CHECK-PREP10-NEXT: addis r3, r2, GlobSt128@toc@ha
+; CHECK-PREP10-NEXT: addi r3, r3, GlobSt128@toc@l
+; CHECK-PREP10-NEXT: stxv vs0, 16(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load fp128, fp128* getelementptr inbounds ([20 x fp128], [20 x fp128]* @GlobLd128, i64 0, i64 1), align 16
+ store fp128 %0, fp128* getelementptr inbounds ([20 x fp128], [20 x fp128]* @GlobSt128, i64 0, i64 1), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind willreturn
+define dso_local void @testGlob128PtrPlusVar(i64 %Idx) {
+; CHECK-P10-LE-LABEL: testGlob128PtrPlusVar:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: sldi r3, r3, 4
+; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd128@PCREL, 1
+; CHECK-P10-LE-NEXT: lxvx vs0, r4, r3
+; CHECK-P10-LE-NEXT: paddi r4, 0, GlobSt128@PCREL, 1
+; CHECK-P10-LE-NEXT: stxvx vs0, r4, r3
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob128PtrPlusVar:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd128@toc@ha
+; CHECK-P10-BE-NEXT: sldi r3, r3, 4
+; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd128@toc@l
+; CHECK-P10-BE-NEXT: lxvx vs0, r4, r3
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt128@toc@ha
+; CHECK-P10-BE-NEXT: addi r4, r4, GlobSt128@toc@l
+; CHECK-P10-BE-NEXT: stxvx vs0, r4, r3
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-PREP10-LABEL: testGlob128PtrPlusVar:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: addis r4, r2, GlobLd128@toc@ha
+; CHECK-PREP10-NEXT: sldi r3, r3, 4
+; CHECK-PREP10-NEXT: addi r4, r4, GlobLd128@toc@l
+; CHECK-PREP10-NEXT: lxvx vs0, r4, r3
+; CHECK-PREP10-NEXT: addis r4, r2, GlobSt128@toc@ha
+; CHECK-PREP10-NEXT: addi r4, r4, GlobSt128@toc@l
+; CHECK-PREP10-NEXT: stxvx vs0, r4, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %arrayidx = getelementptr inbounds [20 x fp128], [20 x fp128]* @GlobLd128, i64 0, i64 %Idx
+ %0 = load fp128, fp128* %arrayidx, align 16
+ %arrayidx1 = getelementptr inbounds [20 x fp128], [20 x fp128]* @GlobSt128, i64 0, i64 %Idx
+ store fp128 %0, fp128* %arrayidx1, align 16
+ ret void
+}
+
--- /dev/null
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-P10
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-P10
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P9
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P9
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P8
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P8
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i128 @ld_0___int128___int128(i64 %ptr) {
+; CHECK-LABEL: ld_0___int128___int128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ld r5, 0(r3)
+; CHECK-NEXT: ld r4, 8(r3)
+; CHECK-NEXT: mr r3, r5
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i128*
+ %1 = load i128, i128* %0, align 16
+ ret i128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i128 @ld_unalign16___int128___int128(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_unalign16___int128___int128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: li r4, 1
+; CHECK-P10-NEXT: ldx r5, r3, r4
+; CHECK-P10-NEXT: li r4, 9
+; CHECK-P10-NEXT: ldx r4, r3, r4
+; CHECK-P10-NEXT: mr r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_unalign16___int128___int128:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 1
+; CHECK-P9-NEXT: ldx r5, r3, r4
+; CHECK-P9-NEXT: li r4, 9
+; CHECK-P9-NEXT: ldx r4, r3, r4
+; CHECK-P9-NEXT: mr r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_unalign16___int128___int128:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 1
+; CHECK-P8-NEXT: li r6, 9
+; CHECK-P8-NEXT: ldx r5, r3, r4
+; CHECK-P8-NEXT: ldx r4, r3, r6
+; CHECK-P8-NEXT: mr r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1
+ %0 = bitcast i8* %add.ptr to i128*
+ %1 = load i128, i128* %0, align 16
+ ret i128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i128 @ld_align16___int128___int128(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16___int128___int128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ld r5, 8(r3)
+; CHECK-NEXT: ld r4, 16(r3)
+; CHECK-NEXT: mr r3, r5
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i128*
+ %1 = load i128, i128* %0, align 16
+ ret i128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i128 @ld_unalign32___int128___int128(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_unalign32___int128___int128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999
+; CHECK-P10-NEXT: ldux r5, r3, r4
+; CHECK-P10-NEXT: ld r4, 8(r3)
+; CHECK-P10-NEXT: mr r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_unalign32___int128___int128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1
+; CHECK-PREP10-NEXT: ori r4, r4, 34463
+; CHECK-PREP10-NEXT: ldux r5, r3, r4
+; CHECK-PREP10-NEXT: ld r4, 8(r3)
+; CHECK-PREP10-NEXT: mr r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999
+ %0 = bitcast i8* %add.ptr to i128*
+ %1 = load i128, i128* %0, align 16
+ ret i128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i128 @ld_align32___int128___int128(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32___int128___int128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: ldux r5, r3, r4
+; CHECK-P10-NEXT: ld r4, 8(r3)
+; CHECK-P10-NEXT: mr r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32___int128___int128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: ldux r5, r3, r4
+; CHECK-PREP10-NEXT: ld r4, 8(r3)
+; CHECK-PREP10-NEXT: mr r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i128*
+ %1 = load i128, i128* %0, align 16
+ ret i128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i128 @ld_unalign64___int128___int128(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_unalign64___int128___int128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: ldux r5, r3, r5
+; CHECK-P10-NEXT: ld r4, 8(r3)
+; CHECK-P10-NEXT: mr r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_unalign64___int128___int128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: ldux r5, r3, r4
+; CHECK-PREP10-NEXT: ld r4, 8(r3)
+; CHECK-PREP10-NEXT: mr r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
+ %0 = bitcast i8* %add.ptr to i128*
+ %1 = load i128, i128* %0, align 16
+ ret i128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i128 @ld_align64___int128___int128(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64___int128___int128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: ldux r5, r3, r4
+; CHECK-P10-NEXT: ld r4, 8(r3)
+; CHECK-P10-NEXT: mr r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64___int128___int128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: ldux r5, r3, r4
+; CHECK-PREP10-NEXT: ld r4, 8(r3)
+; CHECK-PREP10-NEXT: mr r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i128*
+ %1 = load i128, i128* %0, align 16
+ ret i128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i128 @ld_reg___int128___int128(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg___int128___int128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ldux r5, r3, r4
+; CHECK-NEXT: ld r4, 8(r3)
+; CHECK-NEXT: mr r3, r5
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i128*
+ %1 = load i128, i128* %0, align 16
+ ret i128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i128 @ld_or___int128___int128(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or___int128___int128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r4, r4, r3
+; CHECK-NEXT: ld r3, 0(r4)
+; CHECK-NEXT: ld r4, 8(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i128*
+ %1 = load i128, i128* %0, align 16
+ ret i128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i128 @ld_or2___int128___int128(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or2___int128___int128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r5, r3, 0, 51
+; CHECK-NEXT: rotldi r6, r3, 52
+; CHECK-NEXT: ldx r3, r5, r4
+; CHECK-NEXT: rldimi r4, r6, 12, 0
+; CHECK-NEXT: ld r4, 8(r4)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = zext i8 %off to i64
+ %or = or i64 %and, %conv
+ %0 = inttoptr i64 %or to i128*
+ %1 = load i128, i128* %0, align 16
+ ret i128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i128 @ld_not_disjoint16___int128___int128(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16___int128___int128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r4, r3, 6
+; CHECK-NEXT: ld r3, 0(r4)
+; CHECK-NEXT: ld r4, 8(r4)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i128*
+ %1 = load i128, i128* %0, align 16
+ ret i128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i128 @ld_disjoint_unalign16___int128___int128(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_unalign16___int128___int128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r4, r3, 0, 51
+; CHECK-P10-NEXT: li r3, 6
+; CHECK-P10-NEXT: li r5, 14
+; CHECK-P10-NEXT: ldx r3, r4, r3
+; CHECK-P10-NEXT: ldx r4, r4, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_unalign16___int128___int128:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: rldicr r4, r3, 0, 51
+; CHECK-P9-NEXT: li r3, 6
+; CHECK-P9-NEXT: li r5, 14
+; CHECK-P9-NEXT: ldx r3, r4, r3
+; CHECK-P9-NEXT: ldx r4, r4, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_unalign16___int128___int128:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 6
+; CHECK-P8-NEXT: rldicr r5, r3, 0, 51
+; CHECK-P8-NEXT: li r6, 14
+; CHECK-P8-NEXT: ldx r3, r5, r4
+; CHECK-P8-NEXT: ldx r4, r5, r6
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 6
+ %0 = inttoptr i64 %or to i128*
+ %1 = load i128, i128* %0, align 16
+ ret i128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i128 @ld_disjoint_align16___int128___int128(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16___int128___int128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r4, r3, 0, 51
+; CHECK-NEXT: ld r3, 24(r4)
+; CHECK-NEXT: ld r4, 32(r4)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i128*
+ %1 = load i128, i128* %0, align 16
+ ret i128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i128 @ld_not_disjoint32___int128___int128(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32___int128___int128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r4, r3, 1
+; CHECK-NEXT: ld r3, 0(r4)
+; CHECK-NEXT: ld r4, 8(r4)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i128*
+ %1 = load i128, i128* %0, align 16
+ ret i128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i128 @ld_disjoint_unalign32___int128___int128(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_unalign32___int128___int128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r4, r3, 0, 43
+; CHECK-P10-NEXT: pli r3, 99999
+; CHECK-P10-NEXT: pli r5, 100007
+; CHECK-P10-NEXT: ldx r3, r4, r3
+; CHECK-P10-NEXT: ldx r4, r4, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_unalign32___int128___int128:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, 1
+; CHECK-P9-NEXT: rldicr r4, r3, 0, 43
+; CHECK-P9-NEXT: ori r3, r5, 34463
+; CHECK-P9-NEXT: ori r5, r5, 34471
+; CHECK-P9-NEXT: ldx r3, r4, r3
+; CHECK-P9-NEXT: ldx r4, r4, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_unalign32___int128___int128:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, 1
+; CHECK-P8-NEXT: rldicr r5, r3, 0, 43
+; CHECK-P8-NEXT: ori r3, r4, 34463
+; CHECK-P8-NEXT: ori r4, r4, 34471
+; CHECK-P8-NEXT: ldx r3, r5, r3
+; CHECK-P8-NEXT: ldx r4, r5, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1048576
+ %or = or i64 %and, 99999
+ %0 = inttoptr i64 %or to i128*
+ %1 = load i128, i128* %0, align 16
+ ret i128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i128 @ld_disjoint_align32___int128___int128(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32___int128___int128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: pli r5, 999990008
+; CHECK-P10-NEXT: and r4, r3, r4
+; CHECK-P10-NEXT: pli r3, 999990000
+; CHECK-P10-NEXT: ldx r3, r4, r3
+; CHECK-P10-NEXT: ldx r4, r4, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align32___int128___int128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, -15264
+; CHECK-PREP10-NEXT: lis r5, 15258
+; CHECK-PREP10-NEXT: and r4, r3, r4
+; CHECK-PREP10-NEXT: ori r3, r5, 41712
+; CHECK-PREP10-NEXT: ori r5, r5, 41720
+; CHECK-PREP10-NEXT: ldx r3, r4, r3
+; CHECK-PREP10-NEXT: ldx r4, r4, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i128*
+ %1 = load i128, i128* %0, align 16
+ ret i128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i128 @ld_not_disjoint64___int128___int128(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64___int128___int128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r4, r3, r5
+; CHECK-P10-NEXT: ld r3, 0(r4)
+; CHECK-P10-NEXT: ld r4, 8(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64___int128___int128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r4, r3, r4
+; CHECK-PREP10-NEXT: ld r3, 0(r4)
+; CHECK-PREP10-NEXT: ld r4, 8(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i128*
+ %1 = load i128, i128* %0, align 16
+ ret i128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i128 @ld_disjoint_unalign64___int128___int128(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_unalign64___int128___int128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r4, r3, 0, 23
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r3, 3567587329
+; CHECK-P10-NEXT: pli r6, 3567587337
+; CHECK-P10-NEXT: rldimi r3, r5, 32, 0
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: ldx r3, r4, r3
+; CHECK-P10-NEXT: ldx r4, r4, r6
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_unalign64___int128___int128:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: rldicr r4, r3, 0, 23
+; CHECK-P9-NEXT: li r3, 29
+; CHECK-P9-NEXT: rldic r3, r3, 35, 24
+; CHECK-P9-NEXT: oris r5, r3, 54437
+; CHECK-P9-NEXT: ori r3, r5, 4097
+; CHECK-P9-NEXT: ori r5, r5, 4105
+; CHECK-P9-NEXT: ldx r3, r4, r3
+; CHECK-P9-NEXT: ldx r4, r4, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_unalign64___int128___int128:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldicr r5, r3, 0, 23
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r3, r4, 54437
+; CHECK-P8-NEXT: ori r4, r3, 4097
+; CHECK-P8-NEXT: ori r6, r3, 4105
+; CHECK-P8-NEXT: ldx r3, r5, r4
+; CHECK-P8-NEXT: ldx r4, r5, r6
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000001
+ %0 = inttoptr i64 %or to i128*
+ %1 = load i128, i128* %0, align 16
+ ret i128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i128 @ld_disjoint_align64___int128___int128(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64___int128___int128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r4, r3, 0, 23
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587336
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: ldx r3, r4, r3
+; CHECK-P10-NEXT: ldx r4, r4, r6
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align64___int128___int128:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r5, 29
+; CHECK-P9-NEXT: rldicr r4, r3, 0, 23
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: rldic r5, r5, 35, 24
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: oris r5, r5, 54437
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: ori r5, r5, 4104
+; CHECK-P9-NEXT: ldx r3, r4, r3
+; CHECK-P9-NEXT: ldx r4, r4, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align64___int128___int128:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldicr r5, r3, 0, 23
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: ori r4, r4, 4104
+; CHECK-P8-NEXT: ldx r3, r5, r3
+; CHECK-P8-NEXT: ldx r4, r5, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i128*
+ %1 = load i128, i128* %0, align 4096
+ ret i128 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i128 @ld_cst_unalign16___int128___int128() {
+; CHECK-LABEL: ld_cst_unalign16___int128___int128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: li r3, 255
+; CHECK-NEXT: li r4, 263
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: ld r4, 0(r4)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i128, i128* inttoptr (i64 255 to i128*), align 16
+ ret i128 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i128 @ld_cst_align16___int128___int128() {
+; CHECK-LABEL: ld_cst_align16___int128___int128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ld r3, 4080(0)
+; CHECK-NEXT: ld r4, 4088(0)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i128, i128* inttoptr (i64 4080 to i128*), align 16
+ ret i128 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i128 @ld_cst_unalign32___int128___int128() {
+; CHECK-P10-LABEL: ld_cst_unalign32___int128___int128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 99999
+; CHECK-P10-NEXT: pli r4, 100007
+; CHECK-P10-NEXT: ld r3, 0(r3)
+; CHECK-P10-NEXT: ld r4, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_unalign32___int128___int128:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, 1
+; CHECK-P9-NEXT: ori r3, r4, 34463
+; CHECK-P9-NEXT: ori r4, r4, 34471
+; CHECK-P9-NEXT: ld r3, 0(r3)
+; CHECK-P9-NEXT: ld r4, 0(r4)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_unalign32___int128___int128:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 1
+; CHECK-P8-NEXT: ori r4, r3, 34463
+; CHECK-P8-NEXT: ori r5, r3, 34471
+; CHECK-P8-NEXT: ld r3, 0(r4)
+; CHECK-P8-NEXT: ld r4, 0(r5)
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i128, i128* inttoptr (i64 99999 to i128*), align 16
+ ret i128 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i128 @ld_cst_align32___int128___int128() {
+; CHECK-LABEL: ld_cst_align32___int128___int128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: ld r3, -27108(r4)
+; CHECK-NEXT: ld r4, -27100(r4)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i128, i128* inttoptr (i64 9999900 to i128*), align 16
+ ret i128 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i128 @ld_cst_unalign64___int128___int128() {
+; CHECK-P10-LABEL: ld_cst_unalign64___int128___int128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r3, 3567587329
+; CHECK-P10-NEXT: pli r5, 3567587337
+; CHECK-P10-NEXT: rldimi r3, r4, 32, 0
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: ld r3, 0(r3)
+; CHECK-P10-NEXT: ld r4, 0(r5)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_unalign64___int128___int128:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r3, 29
+; CHECK-P9-NEXT: rldic r3, r3, 35, 24
+; CHECK-P9-NEXT: oris r4, r3, 54437
+; CHECK-P9-NEXT: ori r3, r4, 4097
+; CHECK-P9-NEXT: ori r4, r4, 4105
+; CHECK-P9-NEXT: ld r3, 0(r3)
+; CHECK-P9-NEXT: ld r4, 0(r4)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_unalign64___int128___int128:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r3, 29
+; CHECK-P8-NEXT: rldic r3, r3, 35, 24
+; CHECK-P8-NEXT: oris r3, r3, 54437
+; CHECK-P8-NEXT: ori r4, r3, 4097
+; CHECK-P8-NEXT: ori r5, r3, 4105
+; CHECK-P8-NEXT: ld r3, 0(r4)
+; CHECK-P8-NEXT: ld r4, 0(r5)
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i128, i128* inttoptr (i64 1000000000001 to i128*), align 16
+ ret i128 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i128 @ld_cst_align64___int128___int128() {
+; CHECK-P10-LABEL: ld_cst_align64___int128___int128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 232
+; CHECK-P10-NEXT: pli r4, 3567587336
+; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: ld r4, 0(r4)
+; CHECK-P10-NEXT: ld r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align64___int128___int128:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: ori r4, r4, 4104
+; CHECK-P9-NEXT: ld r3, 0(r3)
+; CHECK-P9-NEXT: ld r4, 0(r4)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align64___int128___int128:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r3, 29
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: rldic r3, r3, 35, 24
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: oris r3, r3, 54437
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: ori r5, r3, 4104
+; CHECK-P8-NEXT: ld r3, 0(r4)
+; CHECK-P8-NEXT: ld r4, 0(r5)
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i128, i128* inttoptr (i64 1000000000000 to i128*), align 4096
+ ret i128 %0
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0__int128___int128(i64 %ptr, i128 %str) {
+; CHECK-LABEL: st_0__int128___int128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r5, 8(r3)
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i128*
+ store i128 %str, i128* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_unalign16__int128___int128(i8* nocapture %ptr, i128 %str) {
+; CHECK-P10-LABEL: st_unalign16__int128___int128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: li r6, 9
+; CHECK-P10-NEXT: stdx r5, r3, r6
+; CHECK-P10-NEXT: li r5, 1
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_unalign16__int128___int128:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r6, 9
+; CHECK-P9-NEXT: stdx r5, r3, r6
+; CHECK-P9-NEXT: li r5, 1
+; CHECK-P9-NEXT: stdx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_unalign16__int128___int128:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r6, 9
+; CHECK-P8-NEXT: li r7, 1
+; CHECK-P8-NEXT: stdx r5, r3, r6
+; CHECK-P8-NEXT: stdx r4, r3, r7
+; CHECK-P8-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1
+ %0 = bitcast i8* %add.ptr to i128*
+ store i128 %str, i128* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16__int128___int128(i8* nocapture %ptr, i128 %str) {
+; CHECK-LABEL: st_align16__int128___int128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r5, 16(r3)
+; CHECK-NEXT: std r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i128*
+ store i128 %str, i128* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_unalign32__int128___int128(i8* nocapture %ptr, i128 %str) {
+; CHECK-P10-LABEL: st_unalign32__int128___int128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r6, 99999
+; CHECK-P10-NEXT: stdux r4, r3, r6
+; CHECK-P10-NEXT: std r5, 8(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_unalign32__int128___int128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r6, 1
+; CHECK-PREP10-NEXT: ori r6, r6, 34463
+; CHECK-PREP10-NEXT: stdux r4, r3, r6
+; CHECK-PREP10-NEXT: std r5, 8(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999
+ %0 = bitcast i8* %add.ptr to i128*
+ store i128 %str, i128* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32__int128___int128(i8* nocapture %ptr, i128 %str) {
+; CHECK-P10-LABEL: st_align32__int128___int128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r6, 99999000
+; CHECK-P10-NEXT: stdux r4, r3, r6
+; CHECK-P10-NEXT: std r5, 8(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32__int128___int128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r6, 1525
+; CHECK-PREP10-NEXT: ori r6, r6, 56600
+; CHECK-PREP10-NEXT: stdux r4, r3, r6
+; CHECK-PREP10-NEXT: std r5, 8(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i128*
+ store i128 %str, i128* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_unalign64__int128___int128(i8* nocapture %ptr, i128 %str) {
+; CHECK-P10-LABEL: st_unalign64__int128___int128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r6, 232
+; CHECK-P10-NEXT: pli r7, 3567587329
+; CHECK-P10-NEXT: rldimi r7, r6, 32, 0
+; CHECK-P10-NEXT: stdux r4, r3, r7
+; CHECK-P10-NEXT: std r5, 8(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_unalign64__int128___int128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r6, 29
+; CHECK-PREP10-NEXT: rldic r6, r6, 35, 24
+; CHECK-PREP10-NEXT: oris r6, r6, 54437
+; CHECK-PREP10-NEXT: ori r6, r6, 4097
+; CHECK-PREP10-NEXT: stdux r4, r3, r6
+; CHECK-PREP10-NEXT: std r5, 8(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
+ %0 = bitcast i8* %add.ptr to i128*
+ store i128 %str, i128* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64__int128___int128(i8* nocapture %ptr, i128 %str) {
+; CHECK-P10-LABEL: st_align64__int128___int128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r6, 244140625
+; CHECK-P10-NEXT: rldic r6, r6, 12, 24
+; CHECK-P10-NEXT: stdux r4, r3, r6
+; CHECK-P10-NEXT: std r5, 8(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64__int128___int128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r6, 3725
+; CHECK-PREP10-NEXT: ori r6, r6, 19025
+; CHECK-PREP10-NEXT: rldic r6, r6, 12, 24
+; CHECK-PREP10-NEXT: stdux r4, r3, r6
+; CHECK-PREP10-NEXT: std r5, 8(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i128*
+ store i128 %str, i128* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg__int128___int128(i8* nocapture %ptr, i64 %off, i128 %str) {
+; CHECK-LABEL: st_reg__int128___int128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stdux r5, r3, r4
+; CHECK-NEXT: std r6, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i128*
+ store i128 %str, i128* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1__int128___int128(i64 %ptr, i8 zeroext %off, i128 %str) {
+; CHECK-LABEL: st_or1__int128___int128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: std r6, 8(r3)
+; CHECK-NEXT: std r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i128*
+ store i128 %str, i128* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or2__int128___int128(i64 %ptr, i8 zeroext %off, i128 %str) {
+; CHECK-LABEL: st_or2__int128___int128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r7, r3, 0, 51
+; CHECK-NEXT: rotldi r3, r3, 52
+; CHECK-NEXT: stdx r5, r7, r4
+; CHECK-NEXT: rldimi r4, r3, 12, 0
+; CHECK-NEXT: std r6, 8(r4)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = zext i8 %off to i64
+ %or = or i64 %and, %conv
+ %0 = inttoptr i64 %or to i128*
+ store i128 %str, i128* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16__int128___int128(i64 %ptr, i128 %str) {
+; CHECK-LABEL: st_not_disjoint16__int128___int128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: std r5, 8(r3)
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i128*
+ store i128 %str, i128* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_unalign16__int128___int128(i64 %ptr, i128 %str) {
+; CHECK-P10-LABEL: st_disjoint_unalign16__int128___int128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-NEXT: li r6, 14
+; CHECK-P10-NEXT: stdx r5, r3, r6
+; CHECK-P10-NEXT: li r5, 6
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_unalign16__int128___int128:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-NEXT: li r6, 14
+; CHECK-P9-NEXT: stdx r5, r3, r6
+; CHECK-P9-NEXT: li r5, 6
+; CHECK-P9-NEXT: stdx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_unalign16__int128___int128:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r6, 14
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: li r7, 6
+; CHECK-P8-NEXT: stdx r5, r3, r6
+; CHECK-P8-NEXT: stdx r4, r3, r7
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 6
+ %0 = inttoptr i64 %or to i128*
+ store i128 %str, i128* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16__int128___int128(i64 %ptr, i128 %str) {
+; CHECK-LABEL: st_disjoint_align16__int128___int128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: std r5, 32(r3)
+; CHECK-NEXT: std r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i128*
+ store i128 %str, i128* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32__int128___int128(i64 %ptr, i128 %str) {
+; CHECK-LABEL: st_not_disjoint32__int128___int128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: std r5, 8(r3)
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i128*
+ store i128 %str, i128* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_unalign32__int128___int128(i64 %ptr, i128 %str) {
+; CHECK-P10-LABEL: st_disjoint_unalign32__int128___int128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
+; CHECK-P10-NEXT: pli r6, 100007
+; CHECK-P10-NEXT: stdx r5, r3, r6
+; CHECK-P10-NEXT: pli r5, 99999
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_unalign32__int128___int128:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r6, 1
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 43
+; CHECK-P9-NEXT: ori r7, r6, 34471
+; CHECK-P9-NEXT: stdx r5, r3, r7
+; CHECK-P9-NEXT: ori r5, r6, 34463
+; CHECK-P9-NEXT: stdx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_unalign32__int128___int128:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r6, 1
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 43
+; CHECK-P8-NEXT: ori r7, r6, 34471
+; CHECK-P8-NEXT: ori r6, r6, 34463
+; CHECK-P8-NEXT: stdx r5, r3, r7
+; CHECK-P8-NEXT: stdx r4, r3, r6
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1048576
+ %or = or i64 %and, 99999
+ %0 = inttoptr i64 %or to i128*
+ store i128 %str, i128* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32__int128___int128(i64 %ptr, i128 %str) {
+; CHECK-P10-LABEL: st_disjoint_align32__int128___int128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r6, -15264
+; CHECK-P10-NEXT: and r3, r3, r6
+; CHECK-P10-NEXT: pli r6, 999990008
+; CHECK-P10-NEXT: stdx r5, r3, r6
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32__int128___int128:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r6, -15264
+; CHECK-P9-NEXT: and r3, r3, r6
+; CHECK-P9-NEXT: lis r6, 15258
+; CHECK-P9-NEXT: ori r7, r6, 41720
+; CHECK-P9-NEXT: stdx r5, r3, r7
+; CHECK-P9-NEXT: ori r5, r6, 41712
+; CHECK-P9-NEXT: stdx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32__int128___int128:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r6, -15264
+; CHECK-P8-NEXT: lis r7, 15258
+; CHECK-P8-NEXT: and r3, r3, r6
+; CHECK-P8-NEXT: ori r6, r7, 41720
+; CHECK-P8-NEXT: ori r7, r7, 41712
+; CHECK-P8-NEXT: stdx r5, r3, r6
+; CHECK-P8-NEXT: stdx r4, r3, r7
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i128*
+ store i128 %str, i128* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64__int128___int128(i64 %ptr, i128 %str) {
+; CHECK-P10-LABEL: st_not_disjoint64__int128___int128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r6, 232
+; CHECK-P10-NEXT: pli r7, 3567587329
+; CHECK-P10-NEXT: rldimi r7, r6, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r7
+; CHECK-P10-NEXT: std r5, 8(r3)
+; CHECK-P10-NEXT: std r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64__int128___int128:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r6, 29
+; CHECK-PREP10-NEXT: rldic r6, r6, 35, 24
+; CHECK-PREP10-NEXT: oris r6, r6, 54437
+; CHECK-PREP10-NEXT: ori r6, r6, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r6
+; CHECK-PREP10-NEXT: std r5, 8(r3)
+; CHECK-PREP10-NEXT: std r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i128*
+ store i128 %str, i128* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_unalign64__int128___int128(i64 %ptr, i128 %str) {
+; CHECK-P10-LABEL: st_disjoint_unalign64__int128___int128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r6, 232
+; CHECK-P10-NEXT: pli r7, 3567587337
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldimi r7, r6, 32, 0
+; CHECK-P10-NEXT: stdx r5, r3, r7
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r6, 32, 0
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_unalign64__int128___int128:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r6, 29
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: rldic r6, r6, 35, 24
+; CHECK-P9-NEXT: oris r6, r6, 54437
+; CHECK-P9-NEXT: ori r7, r6, 4105
+; CHECK-P9-NEXT: stdx r5, r3, r7
+; CHECK-P9-NEXT: ori r5, r6, 4097
+; CHECK-P9-NEXT: stdx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_unalign64__int128___int128:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r6, 29
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-NEXT: rldic r6, r6, 35, 24
+; CHECK-P8-NEXT: oris r6, r6, 54437
+; CHECK-P8-NEXT: ori r7, r6, 4105
+; CHECK-P8-NEXT: ori r6, r6, 4097
+; CHECK-P8-NEXT: stdx r5, r3, r7
+; CHECK-P8-NEXT: stdx r4, r3, r6
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000001
+ %0 = inttoptr i64 %or to i128*
+ store i128 %str, i128* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64__int128___int128(i64 %ptr, i128 %str) {
+; CHECK-P10-LABEL: st_disjoint_align64__int128___int128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r6, 232
+; CHECK-P10-NEXT: pli r7, 3567587336
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldimi r7, r6, 32, 0
+; CHECK-P10-NEXT: stdx r5, r3, r7
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align64__int128___int128:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r6, 3725
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: ori r6, r6, 19025
+; CHECK-P9-NEXT: rldic r6, r6, 12, 24
+; CHECK-P9-NEXT: stdx r4, r3, r6
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4104
+; CHECK-P9-NEXT: stdx r5, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align64__int128___int128:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r6, 29
+; CHECK-P8-NEXT: lis r7, 3725
+; CHECK-P8-NEXT: rldic r6, r6, 35, 24
+; CHECK-P8-NEXT: ori r7, r7, 19025
+; CHECK-P8-NEXT: oris r6, r6, 54437
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-NEXT: rldic r7, r7, 12, 24
+; CHECK-P8-NEXT: ori r6, r6, 4104
+; CHECK-P8-NEXT: stdx r4, r3, r7
+; CHECK-P8-NEXT: stdx r5, r3, r6
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i128*
+ store i128 %str, i128* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_unalign16__int128___int128(i128 %str) {
+; CHECK-P10-LABEL: st_cst_unalign16__int128___int128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: li r5, 263
+; CHECK-P10-NEXT: std r4, 0(r5)
+; CHECK-P10-NEXT: li r4, 255
+; CHECK-P10-NEXT: std r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_unalign16__int128___int128:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r5, 263
+; CHECK-P9-NEXT: std r4, 0(r5)
+; CHECK-P9-NEXT: li r4, 255
+; CHECK-P9-NEXT: std r3, 0(r4)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_unalign16__int128___int128:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r5, 263
+; CHECK-P8-NEXT: li r6, 255
+; CHECK-P8-NEXT: std r4, 0(r5)
+; CHECK-P8-NEXT: std r3, 0(r6)
+; CHECK-P8-NEXT: blr
+entry:
+ store i128 %str, i128* inttoptr (i64 255 to i128*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16__int128___int128(i128 %str) {
+; CHECK-LABEL: st_cst_align16__int128___int128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r4, 4088(0)
+; CHECK-NEXT: std r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ store i128 %str, i128* inttoptr (i64 4080 to i128*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_unalign32__int128___int128(i128 %str) {
+; CHECK-P10-LABEL: st_cst_unalign32__int128___int128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 100007
+; CHECK-P10-NEXT: std r4, 0(r5)
+; CHECK-P10-NEXT: pli r4, 99999
+; CHECK-P10-NEXT: std r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_unalign32__int128___int128:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, 1
+; CHECK-P9-NEXT: ori r6, r5, 34471
+; CHECK-P9-NEXT: std r4, 0(r6)
+; CHECK-P9-NEXT: ori r4, r5, 34463
+; CHECK-P9-NEXT: std r3, 0(r4)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_unalign32__int128___int128:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, 1
+; CHECK-P8-NEXT: ori r6, r5, 34471
+; CHECK-P8-NEXT: ori r5, r5, 34463
+; CHECK-P8-NEXT: std r4, 0(r6)
+; CHECK-P8-NEXT: std r3, 0(r5)
+; CHECK-P8-NEXT: blr
+entry:
+ store i128 %str, i128* inttoptr (i64 99999 to i128*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32__int128___int128(i128 %str) {
+; CHECK-LABEL: st_cst_align32__int128___int128:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r5, 153
+; CHECK-NEXT: std r4, -27100(r5)
+; CHECK-NEXT: std r3, -27108(r5)
+; CHECK-NEXT: blr
+entry:
+ store i128 %str, i128* inttoptr (i64 9999900 to i128*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_unalign64__int128___int128(i128 %str) {
+; CHECK-P10-LABEL: st_cst_unalign64__int128___int128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587337
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: std r4, 0(r6)
+; CHECK-P10-NEXT: pli r4, 3567587329
+; CHECK-P10-NEXT: rldimi r4, r5, 32, 0
+; CHECK-P10-NEXT: std r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_unalign64__int128___int128:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r5, 29
+; CHECK-P9-NEXT: rldic r5, r5, 35, 24
+; CHECK-P9-NEXT: oris r5, r5, 54437
+; CHECK-P9-NEXT: ori r6, r5, 4105
+; CHECK-P9-NEXT: std r4, 0(r6)
+; CHECK-P9-NEXT: ori r4, r5, 4097
+; CHECK-P9-NEXT: std r3, 0(r4)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_unalign64__int128___int128:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r5, 29
+; CHECK-P8-NEXT: rldic r5, r5, 35, 24
+; CHECK-P8-NEXT: oris r5, r5, 54437
+; CHECK-P8-NEXT: ori r6, r5, 4105
+; CHECK-P8-NEXT: ori r5, r5, 4097
+; CHECK-P8-NEXT: std r4, 0(r6)
+; CHECK-P8-NEXT: std r3, 0(r5)
+; CHECK-P8-NEXT: blr
+entry:
+ store i128 %str, i128* inttoptr (i64 1000000000001 to i128*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64__int128___int128(i128 %str) {
+; CHECK-P10-LABEL: st_cst_align64__int128___int128:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587336
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: std r4, 0(r6)
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: std r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align64__int128___int128:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, 3725
+; CHECK-P9-NEXT: ori r5, r5, 19025
+; CHECK-P9-NEXT: rldic r5, r5, 12, 24
+; CHECK-P9-NEXT: std r3, 0(r5)
+; CHECK-P9-NEXT: li r3, 29
+; CHECK-P9-NEXT: rldic r3, r3, 35, 24
+; CHECK-P9-NEXT: oris r3, r3, 54437
+; CHECK-P9-NEXT: ori r3, r3, 4104
+; CHECK-P9-NEXT: std r4, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align64__int128___int128:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r5, 29
+; CHECK-P8-NEXT: lis r6, 3725
+; CHECK-P8-NEXT: rldic r5, r5, 35, 24
+; CHECK-P8-NEXT: ori r6, r6, 19025
+; CHECK-P8-NEXT: oris r5, r5, 54437
+; CHECK-P8-NEXT: rldic r6, r6, 12, 24
+; CHECK-P8-NEXT: ori r5, r5, 4104
+; CHECK-P8-NEXT: std r3, 0(r6)
+; CHECK-P8-NEXT: std r4, 0(r5)
+; CHECK-P8-NEXT: blr
+entry:
+ store i128 %str, i128* inttoptr (i64 1000000000000 to i128*), align 4096
+ ret void
+}
--- /dev/null
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefix=CHECK-P10-LE
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefix=CHECK-P10-BE
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-P9
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-P9
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-P8,CHECK-P8-LE
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-P8,CHECK-P8-BE
+
+@GlobLd1 = dso_local local_unnamed_addr global [20 x i8] zeroinitializer, align 1
+@GlobSt1 = dso_local local_unnamed_addr global [20 x i8] zeroinitializer, align 1
+@GlobLd2 = dso_local local_unnamed_addr global [20 x i8] zeroinitializer, align 1
+@GlobSt2 = dso_local local_unnamed_addr global [20 x i8] zeroinitializer, align 1
+@GlobLd3 = dso_local local_unnamed_addr global [20 x i16] zeroinitializer, align 2
+@GlobSt3 = dso_local local_unnamed_addr global [20 x i16] zeroinitializer, align 2
+@GlobLd4 = dso_local local_unnamed_addr global [20 x i16] zeroinitializer, align 2
+@GlobSt4 = dso_local local_unnamed_addr global [20 x i16] zeroinitializer, align 2
+@GlobLd5 = dso_local local_unnamed_addr global [20 x i32] zeroinitializer, align 4
+@GlobSt5 = dso_local local_unnamed_addr global [20 x i32] zeroinitializer, align 4
+@GlobLd6 = dso_local local_unnamed_addr global [20 x i32] zeroinitializer, align 4
+@GlobSt6 = dso_local local_unnamed_addr global [20 x i32] zeroinitializer, align 4
+@GlobLd7 = dso_local local_unnamed_addr global [20 x i64] zeroinitializer, align 8
+@GlobSt7 = dso_local local_unnamed_addr global [20 x i64] zeroinitializer, align 8
+@GlobLd8 = dso_local local_unnamed_addr global [20 x i64] zeroinitializer, align 8
+@GlobSt8 = dso_local local_unnamed_addr global [20 x i64] zeroinitializer, align 8
+@GlobLd9 = dso_local local_unnamed_addr global [20 x float] zeroinitializer, align 4
+@GlobSt9 = dso_local local_unnamed_addr global [20 x float] zeroinitializer, align 4
+@GlobLd10 = dso_local local_unnamed_addr global [20 x double] zeroinitializer, align 8
+@GlobSt10 = dso_local local_unnamed_addr global [20 x double] zeroinitializer, align 8
+@GlobLd11 = dso_local local_unnamed_addr global [20 x <16 x i8>] zeroinitializer, align 16
+@GlobSt11 = dso_local local_unnamed_addr global [20 x <16 x i8>] zeroinitializer, align 16
+@GlobLd12 = dso_local local_unnamed_addr global [20 x <16 x i8>] zeroinitializer, align 16
+@GlobSt12 = dso_local local_unnamed_addr global [20 x <16 x i8>] zeroinitializer, align 16
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob1PtrPlus0() {
+; CHECK-P10-LE-LABEL: testGlob1PtrPlus0:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plbz r3, GlobLd1@PCREL(0), 1
+; CHECK-P10-LE-NEXT: pstb r3, GlobSt1@PCREL(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob1PtrPlus0:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd1@toc@ha
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt1@toc@ha
+; CHECK-P10-BE-NEXT: lbz r3, GlobLd1@toc@l(r3)
+; CHECK-P10-BE-NEXT: stb r3, GlobSt1@toc@l(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob1PtrPlus0:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r3, r2, GlobLd1@toc@ha
+; CHECK-NEXT: addis r4, r2, GlobSt1@toc@ha
+; CHECK-NEXT: lbz r3, GlobLd1@toc@l(r3)
+; CHECK-NEXT: stb r3, GlobSt1@toc@l(r4)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @GlobLd1, i64 0, i64 0), align 1
+ store i8 %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @GlobSt1, i64 0, i64 0), align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob1PtrPlus3() {
+; CHECK-P10-LE-LABEL: testGlob1PtrPlus3:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plbz r3, GlobLd1@PCREL+3(0), 1
+; CHECK-P10-LE-NEXT: pstb r3, GlobSt1@PCREL+3(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob1PtrPlus3:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd1@toc@ha
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt1@toc@ha
+; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd1@toc@l
+; CHECK-P10-BE-NEXT: addi r4, r4, GlobSt1@toc@l
+; CHECK-P10-BE-NEXT: lbz r3, 3(r3)
+; CHECK-P10-BE-NEXT: stb r3, 3(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob1PtrPlus3:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r3, r2, GlobLd1@toc@ha
+; CHECK-NEXT: addis r4, r2, GlobSt1@toc@ha
+; CHECK-NEXT: addi r3, r3, GlobLd1@toc@l
+; CHECK-NEXT: addi r4, r4, GlobSt1@toc@l
+; CHECK-NEXT: lbz r3, 3(r3)
+; CHECK-NEXT: stb r3, 3(r4)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @GlobLd1, i64 0, i64 3), align 1
+ store i8 %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @GlobSt1, i64 0, i64 3), align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob1PtrPlus4() {
+; CHECK-P10-LE-LABEL: testGlob1PtrPlus4:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plbz r3, GlobLd1@PCREL+4(0), 1
+; CHECK-P10-LE-NEXT: pstb r3, GlobSt1@PCREL+4(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob1PtrPlus4:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd1@toc@ha+4
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt1@toc@ha+4
+; CHECK-P10-BE-NEXT: lbz r3, GlobLd1@toc@l+4(r3)
+; CHECK-P10-BE-NEXT: stb r3, GlobSt1@toc@l+4(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob1PtrPlus4:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r3, r2, GlobLd1@toc@ha+4
+; CHECK-NEXT: addis r4, r2, GlobSt1@toc@ha+4
+; CHECK-NEXT: lbz r3, GlobLd1@toc@l+4(r3)
+; CHECK-NEXT: stb r3, GlobSt1@toc@l+4(r4)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @GlobLd1, i64 0, i64 4), align 1
+ store i8 %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @GlobSt1, i64 0, i64 4), align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob1PtrPlus16() {
+; CHECK-P10-LE-LABEL: testGlob1PtrPlus16:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plbz r3, GlobLd1@PCREL+16(0), 1
+; CHECK-P10-LE-NEXT: pstb r3, GlobSt1@PCREL+16(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob1PtrPlus16:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd1@toc@ha+16
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt1@toc@ha+16
+; CHECK-P10-BE-NEXT: lbz r3, GlobLd1@toc@l+16(r3)
+; CHECK-P10-BE-NEXT: stb r3, GlobSt1@toc@l+16(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob1PtrPlus16:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r3, r2, GlobLd1@toc@ha+16
+; CHECK-NEXT: addis r4, r2, GlobSt1@toc@ha+16
+; CHECK-NEXT: lbz r3, GlobLd1@toc@l+16(r3)
+; CHECK-NEXT: stb r3, GlobSt1@toc@l+16(r4)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @GlobLd1, i64 0, i64 16), align 1
+ store i8 %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @GlobSt1, i64 0, i64 16), align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob1PtrPlusVar(i64 %Idx) {
+; CHECK-P10-LE-LABEL: testGlob1PtrPlusVar:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd1@PCREL, 1
+; CHECK-P10-LE-NEXT: paddi r5, 0, GlobSt1@PCREL, 1
+; CHECK-P10-LE-NEXT: lbzx r4, r4, r3
+; CHECK-P10-LE-NEXT: stbx r4, r5, r3
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob1PtrPlusVar:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd1@toc@ha
+; CHECK-P10-BE-NEXT: addis r5, r2, GlobSt1@toc@ha
+; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd1@toc@l
+; CHECK-P10-BE-NEXT: addi r5, r5, GlobSt1@toc@l
+; CHECK-P10-BE-NEXT: lbzx r4, r4, r3
+; CHECK-P10-BE-NEXT: stbx r4, r5, r3
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob1PtrPlusVar:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r4, r2, GlobLd1@toc@ha
+; CHECK-NEXT: addis r5, r2, GlobSt1@toc@ha
+; CHECK-NEXT: addi r4, r4, GlobLd1@toc@l
+; CHECK-NEXT: addi r5, r5, GlobSt1@toc@l
+; CHECK-NEXT: lbzx r4, r4, r3
+; CHECK-NEXT: stbx r4, r5, r3
+; CHECK-NEXT: blr
+entry:
+ %arrayidx = getelementptr inbounds [20 x i8], [20 x i8]* @GlobLd1, i64 0, i64 %Idx
+ %0 = load i8, i8* %arrayidx, align 1
+ %arrayidx1 = getelementptr inbounds [20 x i8], [20 x i8]* @GlobSt1, i64 0, i64 %Idx
+ store i8 %0, i8* %arrayidx1, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob2PtrPlus0() {
+; CHECK-P10-LE-LABEL: testGlob2PtrPlus0:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plbz r3, GlobLd2@PCREL(0), 1
+; CHECK-P10-LE-NEXT: pstb r3, GlobSt2@PCREL(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob2PtrPlus0:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd2@toc@ha
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt2@toc@ha
+; CHECK-P10-BE-NEXT: lbz r3, GlobLd2@toc@l(r3)
+; CHECK-P10-BE-NEXT: stb r3, GlobSt2@toc@l(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob2PtrPlus0:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r3, r2, GlobLd2@toc@ha
+; CHECK-NEXT: addis r4, r2, GlobSt2@toc@ha
+; CHECK-NEXT: lbz r3, GlobLd2@toc@l(r3)
+; CHECK-NEXT: stb r3, GlobSt2@toc@l(r4)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @GlobLd2, i64 0, i64 0), align 1
+ store i8 %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @GlobSt2, i64 0, i64 0), align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob2PtrPlus3() {
+; CHECK-P10-LE-LABEL: testGlob2PtrPlus3:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plbz r3, GlobLd2@PCREL+3(0), 1
+; CHECK-P10-LE-NEXT: pstb r3, GlobSt2@PCREL+3(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob2PtrPlus3:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd2@toc@ha
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt2@toc@ha
+; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd2@toc@l
+; CHECK-P10-BE-NEXT: addi r4, r4, GlobSt2@toc@l
+; CHECK-P10-BE-NEXT: lbz r3, 3(r3)
+; CHECK-P10-BE-NEXT: stb r3, 3(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob2PtrPlus3:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r3, r2, GlobLd2@toc@ha
+; CHECK-NEXT: addis r4, r2, GlobSt2@toc@ha
+; CHECK-NEXT: addi r3, r3, GlobLd2@toc@l
+; CHECK-NEXT: addi r4, r4, GlobSt2@toc@l
+; CHECK-NEXT: lbz r3, 3(r3)
+; CHECK-NEXT: stb r3, 3(r4)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @GlobLd2, i64 0, i64 3), align 1
+ store i8 %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @GlobSt2, i64 0, i64 3), align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob2PtrPlus4() {
+; CHECK-P10-LE-LABEL: testGlob2PtrPlus4:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plbz r3, GlobLd2@PCREL+4(0), 1
+; CHECK-P10-LE-NEXT: pstb r3, GlobSt2@PCREL+4(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob2PtrPlus4:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd2@toc@ha+4
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt2@toc@ha+4
+; CHECK-P10-BE-NEXT: lbz r3, GlobLd2@toc@l+4(r3)
+; CHECK-P10-BE-NEXT: stb r3, GlobSt2@toc@l+4(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob2PtrPlus4:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r3, r2, GlobLd2@toc@ha+4
+; CHECK-NEXT: addis r4, r2, GlobSt2@toc@ha+4
+; CHECK-NEXT: lbz r3, GlobLd2@toc@l+4(r3)
+; CHECK-NEXT: stb r3, GlobSt2@toc@l+4(r4)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @GlobLd2, i64 0, i64 4), align 1
+ store i8 %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @GlobSt2, i64 0, i64 4), align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob2PtrPlus16() {
+; CHECK-P10-LE-LABEL: testGlob2PtrPlus16:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plbz r3, GlobLd2@PCREL+16(0), 1
+; CHECK-P10-LE-NEXT: pstb r3, GlobSt2@PCREL+16(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob2PtrPlus16:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd2@toc@ha+16
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt2@toc@ha+16
+; CHECK-P10-BE-NEXT: lbz r3, GlobLd2@toc@l+16(r3)
+; CHECK-P10-BE-NEXT: stb r3, GlobSt2@toc@l+16(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob2PtrPlus16:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r3, r2, GlobLd2@toc@ha+16
+; CHECK-NEXT: addis r4, r2, GlobSt2@toc@ha+16
+; CHECK-NEXT: lbz r3, GlobLd2@toc@l+16(r3)
+; CHECK-NEXT: stb r3, GlobSt2@toc@l+16(r4)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @GlobLd2, i64 0, i64 16), align 1
+ store i8 %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @GlobSt2, i64 0, i64 16), align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob2PtrPlusVar(i64 %Idx) {
+; CHECK-P10-LE-LABEL: testGlob2PtrPlusVar:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd2@PCREL, 1
+; CHECK-P10-LE-NEXT: paddi r5, 0, GlobSt2@PCREL, 1
+; CHECK-P10-LE-NEXT: lbzx r4, r4, r3
+; CHECK-P10-LE-NEXT: stbx r4, r5, r3
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob2PtrPlusVar:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd2@toc@ha
+; CHECK-P10-BE-NEXT: addis r5, r2, GlobSt2@toc@ha
+; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd2@toc@l
+; CHECK-P10-BE-NEXT: addi r5, r5, GlobSt2@toc@l
+; CHECK-P10-BE-NEXT: lbzx r4, r4, r3
+; CHECK-P10-BE-NEXT: stbx r4, r5, r3
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob2PtrPlusVar:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r4, r2, GlobLd2@toc@ha
+; CHECK-NEXT: addis r5, r2, GlobSt2@toc@ha
+; CHECK-NEXT: addi r4, r4, GlobLd2@toc@l
+; CHECK-NEXT: addi r5, r5, GlobSt2@toc@l
+; CHECK-NEXT: lbzx r4, r4, r3
+; CHECK-NEXT: stbx r4, r5, r3
+; CHECK-NEXT: blr
+entry:
+ %arrayidx = getelementptr inbounds [20 x i8], [20 x i8]* @GlobLd2, i64 0, i64 %Idx
+ %0 = load i8, i8* %arrayidx, align 1
+ %arrayidx1 = getelementptr inbounds [20 x i8], [20 x i8]* @GlobSt2, i64 0, i64 %Idx
+ store i8 %0, i8* %arrayidx1, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob3PtrPlus0() {
+; CHECK-P10-LE-LABEL: testGlob3PtrPlus0:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plhz r3, GlobLd3@PCREL(0), 1
+; CHECK-P10-LE-NEXT: psth r3, GlobSt3@PCREL(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob3PtrPlus0:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd3@toc@ha
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt3@toc@ha
+; CHECK-P10-BE-NEXT: lhz r3, GlobLd3@toc@l(r3)
+; CHECK-P10-BE-NEXT: sth r3, GlobSt3@toc@l(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob3PtrPlus0:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r3, r2, GlobLd3@toc@ha
+; CHECK-NEXT: addis r4, r2, GlobSt3@toc@ha
+; CHECK-NEXT: lhz r3, GlobLd3@toc@l(r3)
+; CHECK-NEXT: sth r3, GlobSt3@toc@l(r4)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i16, i16* getelementptr inbounds ([20 x i16], [20 x i16]* @GlobLd3, i64 0, i64 0), align 2
+ store i16 %0, i16* getelementptr inbounds ([20 x i16], [20 x i16]* @GlobSt3, i64 0, i64 0), align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob3PtrPlus3() {
+; CHECK-P10-LE-LABEL: testGlob3PtrPlus3:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plhz r3, GlobLd3@PCREL+3(0), 1
+; CHECK-P10-LE-NEXT: psth r3, GlobSt3@PCREL+3(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob3PtrPlus3:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd3@toc@ha
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt3@toc@ha
+; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd3@toc@l
+; CHECK-P10-BE-NEXT: addi r4, r4, GlobSt3@toc@l
+; CHECK-P10-BE-NEXT: lhz r3, 3(r3)
+; CHECK-P10-BE-NEXT: sth r3, 3(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob3PtrPlus3:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r3, r2, GlobLd3@toc@ha
+; CHECK-NEXT: addis r4, r2, GlobSt3@toc@ha
+; CHECK-NEXT: addi r3, r3, GlobLd3@toc@l
+; CHECK-NEXT: addi r4, r4, GlobSt3@toc@l
+; CHECK-NEXT: lhz r3, 3(r3)
+; CHECK-NEXT: sth r3, 3(r4)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i16, i16* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x i16]* @GlobLd3 to i8*), i64 3) to i16*), align 2
+ store i16 %0, i16* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x i16]* @GlobSt3 to i8*), i64 3) to i16*), align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob3PtrPlus4() {
+; CHECK-P10-LE-LABEL: testGlob3PtrPlus4:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plhz r3, GlobLd3@PCREL+4(0), 1
+; CHECK-P10-LE-NEXT: psth r3, GlobSt3@PCREL+4(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob3PtrPlus4:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd3@toc@ha+4
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt3@toc@ha+4
+; CHECK-P10-BE-NEXT: lhz r3, GlobLd3@toc@l+4(r3)
+; CHECK-P10-BE-NEXT: sth r3, GlobSt3@toc@l+4(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob3PtrPlus4:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r3, r2, GlobLd3@toc@ha+4
+; CHECK-NEXT: addis r4, r2, GlobSt3@toc@ha+4
+; CHECK-NEXT: lhz r3, GlobLd3@toc@l+4(r3)
+; CHECK-NEXT: sth r3, GlobSt3@toc@l+4(r4)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i16, i16* getelementptr inbounds ([20 x i16], [20 x i16]* @GlobLd3, i64 0, i64 2), align 2
+ store i16 %0, i16* getelementptr inbounds ([20 x i16], [20 x i16]* @GlobSt3, i64 0, i64 2), align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob3PtrPlus16() {
+; CHECK-P10-LE-LABEL: testGlob3PtrPlus16:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plhz r3, GlobLd3@PCREL+16(0), 1
+; CHECK-P10-LE-NEXT: psth r3, GlobSt3@PCREL+16(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob3PtrPlus16:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd3@toc@ha+16
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt3@toc@ha+16
+; CHECK-P10-BE-NEXT: lhz r3, GlobLd3@toc@l+16(r3)
+; CHECK-P10-BE-NEXT: sth r3, GlobSt3@toc@l+16(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob3PtrPlus16:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r3, r2, GlobLd3@toc@ha+16
+; CHECK-NEXT: addis r4, r2, GlobSt3@toc@ha+16
+; CHECK-NEXT: lhz r3, GlobLd3@toc@l+16(r3)
+; CHECK-NEXT: sth r3, GlobSt3@toc@l+16(r4)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i16, i16* getelementptr inbounds ([20 x i16], [20 x i16]* @GlobLd3, i64 0, i64 8), align 2
+ store i16 %0, i16* getelementptr inbounds ([20 x i16], [20 x i16]* @GlobSt3, i64 0, i64 8), align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob3PtrPlusVar(i64 %Idx) {
+; CHECK-P10-LE-LABEL: testGlob3PtrPlusVar:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: sldi r3, r3, 1
+; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd3@PCREL, 1
+; CHECK-P10-LE-NEXT: paddi r5, 0, GlobSt3@PCREL, 1
+; CHECK-P10-LE-NEXT: lhzx r4, r4, r3
+; CHECK-P10-LE-NEXT: sthx r4, r5, r3
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob3PtrPlusVar:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd3@toc@ha
+; CHECK-P10-BE-NEXT: sldi r3, r3, 1
+; CHECK-P10-BE-NEXT: addis r5, r2, GlobSt3@toc@ha
+; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd3@toc@l
+; CHECK-P10-BE-NEXT: addi r5, r5, GlobSt3@toc@l
+; CHECK-P10-BE-NEXT: lhzx r4, r4, r3
+; CHECK-P10-BE-NEXT: sthx r4, r5, r3
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob3PtrPlusVar:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r4, r2, GlobLd3@toc@ha
+; CHECK-NEXT: sldi r3, r3, 1
+; CHECK-NEXT: addis r5, r2, GlobSt3@toc@ha
+; CHECK-NEXT: addi r4, r4, GlobLd3@toc@l
+; CHECK-NEXT: addi r5, r5, GlobSt3@toc@l
+; CHECK-NEXT: lhzx r4, r4, r3
+; CHECK-NEXT: sthx r4, r5, r3
+; CHECK-NEXT: blr
+entry:
+ %arrayidx = getelementptr inbounds [20 x i16], [20 x i16]* @GlobLd3, i64 0, i64 %Idx
+ %0 = load i16, i16* %arrayidx, align 2
+ %arrayidx1 = getelementptr inbounds [20 x i16], [20 x i16]* @GlobSt3, i64 0, i64 %Idx
+ store i16 %0, i16* %arrayidx1, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob4PtrPlus0() {
+; CHECK-P10-LE-LABEL: testGlob4PtrPlus0:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plhz r3, GlobLd4@PCREL(0), 1
+; CHECK-P10-LE-NEXT: psth r3, GlobSt4@PCREL(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob4PtrPlus0:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd4@toc@ha
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt4@toc@ha
+; CHECK-P10-BE-NEXT: lhz r3, GlobLd4@toc@l(r3)
+; CHECK-P10-BE-NEXT: sth r3, GlobSt4@toc@l(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob4PtrPlus0:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r3, r2, GlobLd4@toc@ha
+; CHECK-NEXT: addis r4, r2, GlobSt4@toc@ha
+; CHECK-NEXT: lhz r3, GlobLd4@toc@l(r3)
+; CHECK-NEXT: sth r3, GlobSt4@toc@l(r4)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i16, i16* getelementptr inbounds ([20 x i16], [20 x i16]* @GlobLd4, i64 0, i64 0), align 2
+ store i16 %0, i16* getelementptr inbounds ([20 x i16], [20 x i16]* @GlobSt4, i64 0, i64 0), align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob4PtrPlus3() {
+; CHECK-P10-LE-LABEL: testGlob4PtrPlus3:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plhz r3, GlobLd4@PCREL+3(0), 1
+; CHECK-P10-LE-NEXT: psth r3, GlobSt4@PCREL+3(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob4PtrPlus3:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd4@toc@ha
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt4@toc@ha
+; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd4@toc@l
+; CHECK-P10-BE-NEXT: addi r4, r4, GlobSt4@toc@l
+; CHECK-P10-BE-NEXT: lhz r3, 3(r3)
+; CHECK-P10-BE-NEXT: sth r3, 3(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob4PtrPlus3:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r3, r2, GlobLd4@toc@ha
+; CHECK-NEXT: addis r4, r2, GlobSt4@toc@ha
+; CHECK-NEXT: addi r3, r3, GlobLd4@toc@l
+; CHECK-NEXT: addi r4, r4, GlobSt4@toc@l
+; CHECK-NEXT: lhz r3, 3(r3)
+; CHECK-NEXT: sth r3, 3(r4)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i16, i16* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x i16]* @GlobLd4 to i8*), i64 3) to i16*), align 2
+ store i16 %0, i16* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x i16]* @GlobSt4 to i8*), i64 3) to i16*), align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob4PtrPlus4() {
+; CHECK-P10-LE-LABEL: testGlob4PtrPlus4:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plhz r3, GlobLd4@PCREL+4(0), 1
+; CHECK-P10-LE-NEXT: psth r3, GlobSt4@PCREL+4(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob4PtrPlus4:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd4@toc@ha+4
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt4@toc@ha+4
+; CHECK-P10-BE-NEXT: lhz r3, GlobLd4@toc@l+4(r3)
+; CHECK-P10-BE-NEXT: sth r3, GlobSt4@toc@l+4(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob4PtrPlus4:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r3, r2, GlobLd4@toc@ha+4
+; CHECK-NEXT: addis r4, r2, GlobSt4@toc@ha+4
+; CHECK-NEXT: lhz r3, GlobLd4@toc@l+4(r3)
+; CHECK-NEXT: sth r3, GlobSt4@toc@l+4(r4)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i16, i16* getelementptr inbounds ([20 x i16], [20 x i16]* @GlobLd4, i64 0, i64 2), align 2
+ store i16 %0, i16* getelementptr inbounds ([20 x i16], [20 x i16]* @GlobSt4, i64 0, i64 2), align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob4PtrPlus16() {
+; CHECK-P10-LE-LABEL: testGlob4PtrPlus16:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plhz r3, GlobLd4@PCREL+16(0), 1
+; CHECK-P10-LE-NEXT: psth r3, GlobSt4@PCREL+16(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob4PtrPlus16:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd4@toc@ha+16
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt4@toc@ha+16
+; CHECK-P10-BE-NEXT: lhz r3, GlobLd4@toc@l+16(r3)
+; CHECK-P10-BE-NEXT: sth r3, GlobSt4@toc@l+16(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob4PtrPlus16:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r3, r2, GlobLd4@toc@ha+16
+; CHECK-NEXT: addis r4, r2, GlobSt4@toc@ha+16
+; CHECK-NEXT: lhz r3, GlobLd4@toc@l+16(r3)
+; CHECK-NEXT: sth r3, GlobSt4@toc@l+16(r4)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i16, i16* getelementptr inbounds ([20 x i16], [20 x i16]* @GlobLd4, i64 0, i64 8), align 2
+ store i16 %0, i16* getelementptr inbounds ([20 x i16], [20 x i16]* @GlobSt4, i64 0, i64 8), align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob4PtrPlusVar(i64 %Idx) {
+; CHECK-P10-LE-LABEL: testGlob4PtrPlusVar:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: sldi r3, r3, 1
+; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd4@PCREL, 1
+; CHECK-P10-LE-NEXT: paddi r5, 0, GlobSt4@PCREL, 1
+; CHECK-P10-LE-NEXT: lhzx r4, r4, r3
+; CHECK-P10-LE-NEXT: sthx r4, r5, r3
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob4PtrPlusVar:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd4@toc@ha
+; CHECK-P10-BE-NEXT: sldi r3, r3, 1
+; CHECK-P10-BE-NEXT: addis r5, r2, GlobSt4@toc@ha
+; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd4@toc@l
+; CHECK-P10-BE-NEXT: addi r5, r5, GlobSt4@toc@l
+; CHECK-P10-BE-NEXT: lhzx r4, r4, r3
+; CHECK-P10-BE-NEXT: sthx r4, r5, r3
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob4PtrPlusVar:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r4, r2, GlobLd4@toc@ha
+; CHECK-NEXT: sldi r3, r3, 1
+; CHECK-NEXT: addis r5, r2, GlobSt4@toc@ha
+; CHECK-NEXT: addi r4, r4, GlobLd4@toc@l
+; CHECK-NEXT: addi r5, r5, GlobSt4@toc@l
+; CHECK-NEXT: lhzx r4, r4, r3
+; CHECK-NEXT: sthx r4, r5, r3
+; CHECK-NEXT: blr
+entry:
+ %arrayidx = getelementptr inbounds [20 x i16], [20 x i16]* @GlobLd4, i64 0, i64 %Idx
+ %0 = load i16, i16* %arrayidx, align 2
+ %arrayidx1 = getelementptr inbounds [20 x i16], [20 x i16]* @GlobSt4, i64 0, i64 %Idx
+ store i16 %0, i16* %arrayidx1, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob5PtrPlus0() {
+; CHECK-P10-LE-LABEL: testGlob5PtrPlus0:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plwz r3, GlobLd5@PCREL(0), 1
+; CHECK-P10-LE-NEXT: pstw r3, GlobSt5@PCREL(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob5PtrPlus0:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd5@toc@ha
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt5@toc@ha
+; CHECK-P10-BE-NEXT: lwz r3, GlobLd5@toc@l(r3)
+; CHECK-P10-BE-NEXT: stw r3, GlobSt5@toc@l(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob5PtrPlus0:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r3, r2, GlobLd5@toc@ha
+; CHECK-NEXT: addis r4, r2, GlobSt5@toc@ha
+; CHECK-NEXT: lwz r3, GlobLd5@toc@l(r3)
+; CHECK-NEXT: stw r3, GlobSt5@toc@l(r4)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i32, i32* getelementptr inbounds ([20 x i32], [20 x i32]* @GlobLd5, i64 0, i64 0), align 4
+ store i32 %0, i32* getelementptr inbounds ([20 x i32], [20 x i32]* @GlobSt5, i64 0, i64 0), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob5PtrPlus3() {
+; CHECK-P10-LE-LABEL: testGlob5PtrPlus3:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plwz r3, GlobLd5@PCREL+3(0), 1
+; CHECK-P10-LE-NEXT: pstw r3, GlobSt5@PCREL+3(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob5PtrPlus3:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd5@toc@ha
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt5@toc@ha
+; CHECK-P10-BE-NEXT: lwz r3, GlobLd5@toc@l+3(r3)
+; CHECK-P10-BE-NEXT: stw r3, GlobSt5@toc@l+3(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob5PtrPlus3:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r3, r2, GlobLd5@toc@ha
+; CHECK-NEXT: addis r4, r2, GlobSt5@toc@ha
+; CHECK-NEXT: lwz r3, GlobLd5@toc@l+3(r3)
+; CHECK-NEXT: stw r3, GlobSt5@toc@l+3(r4)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i32, i32* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x i32]* @GlobLd5 to i8*), i64 3) to i32*), align 4
+ store i32 %0, i32* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x i32]* @GlobSt5 to i8*), i64 3) to i32*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob5PtrPlus4() {
+; CHECK-P10-LE-LABEL: testGlob5PtrPlus4:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plwz r3, GlobLd5@PCREL+4(0), 1
+; CHECK-P10-LE-NEXT: pstw r3, GlobSt5@PCREL+4(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob5PtrPlus4:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd5@toc@ha+4
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt5@toc@ha+4
+; CHECK-P10-BE-NEXT: lwz r3, GlobLd5@toc@l+4(r3)
+; CHECK-P10-BE-NEXT: stw r3, GlobSt5@toc@l+4(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob5PtrPlus4:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r3, r2, GlobLd5@toc@ha+4
+; CHECK-NEXT: addis r4, r2, GlobSt5@toc@ha+4
+; CHECK-NEXT: lwz r3, GlobLd5@toc@l+4(r3)
+; CHECK-NEXT: stw r3, GlobSt5@toc@l+4(r4)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i32, i32* getelementptr inbounds ([20 x i32], [20 x i32]* @GlobLd5, i64 0, i64 1), align 4
+ store i32 %0, i32* getelementptr inbounds ([20 x i32], [20 x i32]* @GlobSt5, i64 0, i64 1), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob5PtrPlus16() {
+; CHECK-P10-LE-LABEL: testGlob5PtrPlus16:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plwz r3, GlobLd5@PCREL+16(0), 1
+; CHECK-P10-LE-NEXT: pstw r3, GlobSt5@PCREL+16(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob5PtrPlus16:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd5@toc@ha+16
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt5@toc@ha+16
+; CHECK-P10-BE-NEXT: lwz r3, GlobLd5@toc@l+16(r3)
+; CHECK-P10-BE-NEXT: stw r3, GlobSt5@toc@l+16(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob5PtrPlus16:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r3, r2, GlobLd5@toc@ha+16
+; CHECK-NEXT: addis r4, r2, GlobSt5@toc@ha+16
+; CHECK-NEXT: lwz r3, GlobLd5@toc@l+16(r3)
+; CHECK-NEXT: stw r3, GlobSt5@toc@l+16(r4)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i32, i32* getelementptr inbounds ([20 x i32], [20 x i32]* @GlobLd5, i64 0, i64 4), align 4
+ store i32 %0, i32* getelementptr inbounds ([20 x i32], [20 x i32]* @GlobSt5, i64 0, i64 4), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob5PtrPlusVar(i64 %Idx) {
+; CHECK-P10-LE-LABEL: testGlob5PtrPlusVar:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: sldi r3, r3, 2
+; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd5@PCREL, 1
+; CHECK-P10-LE-NEXT: paddi r5, 0, GlobSt5@PCREL, 1
+; CHECK-P10-LE-NEXT: lwzx r4, r4, r3
+; CHECK-P10-LE-NEXT: stwx r4, r5, r3
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob5PtrPlusVar:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd5@toc@ha
+; CHECK-P10-BE-NEXT: sldi r3, r3, 2
+; CHECK-P10-BE-NEXT: addis r5, r2, GlobSt5@toc@ha
+; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd5@toc@l
+; CHECK-P10-BE-NEXT: addi r5, r5, GlobSt5@toc@l
+; CHECK-P10-BE-NEXT: lwzx r4, r4, r3
+; CHECK-P10-BE-NEXT: stwx r4, r5, r3
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob5PtrPlusVar:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r4, r2, GlobLd5@toc@ha
+; CHECK-NEXT: sldi r3, r3, 2
+; CHECK-NEXT: addis r5, r2, GlobSt5@toc@ha
+; CHECK-NEXT: addi r4, r4, GlobLd5@toc@l
+; CHECK-NEXT: addi r5, r5, GlobSt5@toc@l
+; CHECK-NEXT: lwzx r4, r4, r3
+; CHECK-NEXT: stwx r4, r5, r3
+; CHECK-NEXT: blr
+entry:
+ %arrayidx = getelementptr inbounds [20 x i32], [20 x i32]* @GlobLd5, i64 0, i64 %Idx
+ %0 = load i32, i32* %arrayidx, align 4
+ %arrayidx1 = getelementptr inbounds [20 x i32], [20 x i32]* @GlobSt5, i64 0, i64 %Idx
+ store i32 %0, i32* %arrayidx1, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob6PtrPlus0() {
+; CHECK-P10-LE-LABEL: testGlob6PtrPlus0:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plwz r3, GlobLd6@PCREL(0), 1
+; CHECK-P10-LE-NEXT: pstw r3, GlobSt6@PCREL(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob6PtrPlus0:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd6@toc@ha
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt6@toc@ha
+; CHECK-P10-BE-NEXT: lwz r3, GlobLd6@toc@l(r3)
+; CHECK-P10-BE-NEXT: stw r3, GlobSt6@toc@l(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob6PtrPlus0:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r3, r2, GlobLd6@toc@ha
+; CHECK-NEXT: addis r4, r2, GlobSt6@toc@ha
+; CHECK-NEXT: lwz r3, GlobLd6@toc@l(r3)
+; CHECK-NEXT: stw r3, GlobSt6@toc@l(r4)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i32, i32* getelementptr inbounds ([20 x i32], [20 x i32]* @GlobLd6, i64 0, i64 0), align 4
+ store i32 %0, i32* getelementptr inbounds ([20 x i32], [20 x i32]* @GlobSt6, i64 0, i64 0), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob6PtrPlus3() {
+; CHECK-P10-LE-LABEL: testGlob6PtrPlus3:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plwz r3, GlobLd6@PCREL+3(0), 1
+; CHECK-P10-LE-NEXT: pstw r3, GlobSt6@PCREL+3(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob6PtrPlus3:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd6@toc@ha
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt6@toc@ha
+; CHECK-P10-BE-NEXT: lwz r3, GlobLd6@toc@l+3(r3)
+; CHECK-P10-BE-NEXT: stw r3, GlobSt6@toc@l+3(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob6PtrPlus3:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r3, r2, GlobLd6@toc@ha
+; CHECK-NEXT: addis r4, r2, GlobSt6@toc@ha
+; CHECK-NEXT: lwz r3, GlobLd6@toc@l+3(r3)
+; CHECK-NEXT: stw r3, GlobSt6@toc@l+3(r4)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i32, i32* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x i32]* @GlobLd6 to i8*), i64 3) to i32*), align 4
+ store i32 %0, i32* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x i32]* @GlobSt6 to i8*), i64 3) to i32*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob6PtrPlus4() {
+; CHECK-P10-LE-LABEL: testGlob6PtrPlus4:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plwz r3, GlobLd6@PCREL+4(0), 1
+; CHECK-P10-LE-NEXT: pstw r3, GlobSt6@PCREL+4(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob6PtrPlus4:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd6@toc@ha+4
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt6@toc@ha+4
+; CHECK-P10-BE-NEXT: lwz r3, GlobLd6@toc@l+4(r3)
+; CHECK-P10-BE-NEXT: stw r3, GlobSt6@toc@l+4(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob6PtrPlus4:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r3, r2, GlobLd6@toc@ha+4
+; CHECK-NEXT: addis r4, r2, GlobSt6@toc@ha+4
+; CHECK-NEXT: lwz r3, GlobLd6@toc@l+4(r3)
+; CHECK-NEXT: stw r3, GlobSt6@toc@l+4(r4)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i32, i32* getelementptr inbounds ([20 x i32], [20 x i32]* @GlobLd6, i64 0, i64 1), align 4
+ store i32 %0, i32* getelementptr inbounds ([20 x i32], [20 x i32]* @GlobSt6, i64 0, i64 1), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob6PtrPlus16() {
+; CHECK-P10-LE-LABEL: testGlob6PtrPlus16:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plwz r3, GlobLd6@PCREL+16(0), 1
+; CHECK-P10-LE-NEXT: pstw r3, GlobSt6@PCREL+16(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob6PtrPlus16:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd6@toc@ha+16
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt6@toc@ha+16
+; CHECK-P10-BE-NEXT: lwz r3, GlobLd6@toc@l+16(r3)
+; CHECK-P10-BE-NEXT: stw r3, GlobSt6@toc@l+16(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob6PtrPlus16:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r3, r2, GlobLd6@toc@ha+16
+; CHECK-NEXT: addis r4, r2, GlobSt6@toc@ha+16
+; CHECK-NEXT: lwz r3, GlobLd6@toc@l+16(r3)
+; CHECK-NEXT: stw r3, GlobSt6@toc@l+16(r4)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i32, i32* getelementptr inbounds ([20 x i32], [20 x i32]* @GlobLd6, i64 0, i64 4), align 4
+ store i32 %0, i32* getelementptr inbounds ([20 x i32], [20 x i32]* @GlobSt6, i64 0, i64 4), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob6PtrPlusVar(i64 %Idx) {
+; CHECK-P10-LE-LABEL: testGlob6PtrPlusVar:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: sldi r3, r3, 2
+; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd6@PCREL, 1
+; CHECK-P10-LE-NEXT: paddi r5, 0, GlobSt6@PCREL, 1
+; CHECK-P10-LE-NEXT: lwzx r4, r4, r3
+; CHECK-P10-LE-NEXT: stwx r4, r5, r3
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob6PtrPlusVar:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd6@toc@ha
+; CHECK-P10-BE-NEXT: sldi r3, r3, 2
+; CHECK-P10-BE-NEXT: addis r5, r2, GlobSt6@toc@ha
+; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd6@toc@l
+; CHECK-P10-BE-NEXT: addi r5, r5, GlobSt6@toc@l
+; CHECK-P10-BE-NEXT: lwzx r4, r4, r3
+; CHECK-P10-BE-NEXT: stwx r4, r5, r3
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob6PtrPlusVar:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r4, r2, GlobLd6@toc@ha
+; CHECK-NEXT: sldi r3, r3, 2
+; CHECK-NEXT: addis r5, r2, GlobSt6@toc@ha
+; CHECK-NEXT: addi r4, r4, GlobLd6@toc@l
+; CHECK-NEXT: addi r5, r5, GlobSt6@toc@l
+; CHECK-NEXT: lwzx r4, r4, r3
+; CHECK-NEXT: stwx r4, r5, r3
+; CHECK-NEXT: blr
+entry:
+ %arrayidx = getelementptr inbounds [20 x i32], [20 x i32]* @GlobLd6, i64 0, i64 %Idx
+ %0 = load i32, i32* %arrayidx, align 4
+ %arrayidx1 = getelementptr inbounds [20 x i32], [20 x i32]* @GlobSt6, i64 0, i64 %Idx
+ store i32 %0, i32* %arrayidx1, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob7PtrPlus0() {
+; CHECK-P10-LE-LABEL: testGlob7PtrPlus0:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pld r3, GlobLd7@PCREL(0), 1
+; CHECK-P10-LE-NEXT: pstd r3, GlobSt7@PCREL(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob7PtrPlus0:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd7@toc@ha
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt7@toc@ha
+; CHECK-P10-BE-NEXT: ld r3, GlobLd7@toc@l(r3)
+; CHECK-P10-BE-NEXT: std r3, GlobSt7@toc@l(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LABEL: testGlob7PtrPlus0:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: addis r3, r2, GlobLd7@toc@ha
+; CHECK-P9-NEXT: addis r4, r2, GlobSt7@toc@ha
+; CHECK-P9-NEXT: ld r3, GlobLd7@toc@l(r3)
+; CHECK-P9-NEXT: std r3, GlobSt7@toc@l(r4)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: testGlob7PtrPlus0:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: addis r3, r2, GlobLd7@toc@ha
+; CHECK-P8-NEXT: ld r3, GlobLd7@toc@l(r3)
+; CHECK-P8-NEXT: addis r4, r2, GlobSt7@toc@ha
+; CHECK-P8-NEXT: std r3, GlobSt7@toc@l(r4)
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i64, i64* getelementptr inbounds ([20 x i64], [20 x i64]* @GlobLd7, i64 0, i64 0), align 8
+ store i64 %0, i64* getelementptr inbounds ([20 x i64], [20 x i64]* @GlobSt7, i64 0, i64 0), align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob7PtrPlus3() {
+; CHECK-P10-LE-LABEL: testGlob7PtrPlus3:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pld r3, GlobLd7@PCREL+3(0), 1
+; CHECK-P10-LE-NEXT: pstd r3, GlobSt7@PCREL+3(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob7PtrPlus3:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd7@toc@ha
+; CHECK-P10-BE-NEXT: li r4, 3
+; CHECK-P10-BE-NEXT: addis r5, r2, GlobSt7@toc@ha
+; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd7@toc@l
+; CHECK-P10-BE-NEXT: addi r5, r5, GlobSt7@toc@l
+; CHECK-P10-BE-NEXT: ldx r3, r3, r4
+; CHECK-P10-BE-NEXT: stdx r3, r5, r4
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob7PtrPlus3:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r3, r2, GlobLd7@toc@ha
+; CHECK-NEXT: li r4, 3
+; CHECK-NEXT: addis r5, r2, GlobSt7@toc@ha
+; CHECK-NEXT: addi r3, r3, GlobLd7@toc@l
+; CHECK-NEXT: addi r5, r5, GlobSt7@toc@l
+; CHECK-NEXT: ldx r3, r3, r4
+; CHECK-NEXT: stdx r3, r5, r4
+; CHECK-NEXT: blr
+entry:
+ %0 = load i64, i64* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x i64]* @GlobLd7 to i8*), i64 3) to i64*), align 8
+ store i64 %0, i64* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x i64]* @GlobSt7 to i8*), i64 3) to i64*), align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob7PtrPlus4() {
+; CHECK-P10-LE-LABEL: testGlob7PtrPlus4:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pld r3, GlobLd7@PCREL+4(0), 1
+; CHECK-P10-LE-NEXT: pstd r3, GlobSt7@PCREL+4(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob7PtrPlus4:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd7@toc@ha
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt7@toc@ha
+; CHECK-P10-BE-NEXT: ld r3, GlobLd7@toc@l+4(r3)
+; CHECK-P10-BE-NEXT: std r3, GlobSt7@toc@l+4(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LABEL: testGlob7PtrPlus4:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: addis r3, r2, GlobLd7@toc@ha
+; CHECK-P9-NEXT: addis r4, r2, GlobSt7@toc@ha
+; CHECK-P9-NEXT: ld r3, GlobLd7@toc@l+4(r3)
+; CHECK-P9-NEXT: std r3, GlobSt7@toc@l+4(r4)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: testGlob7PtrPlus4:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: addis r3, r2, GlobLd7@toc@ha
+; CHECK-P8-NEXT: ld r3, GlobLd7@toc@l+4(r3)
+; CHECK-P8-NEXT: addis r4, r2, GlobSt7@toc@ha
+; CHECK-P8-NEXT: std r3, GlobSt7@toc@l+4(r4)
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i64, i64* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x i64]* @GlobLd7 to i8*), i64 4) to i64*), align 8
+ store i64 %0, i64* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x i64]* @GlobSt7 to i8*), i64 4) to i64*), align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob7PtrPlus16() {
+; CHECK-P10-LE-LABEL: testGlob7PtrPlus16:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pld r3, GlobLd7@PCREL+16(0), 1
+; CHECK-P10-LE-NEXT: pstd r3, GlobSt7@PCREL+16(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob7PtrPlus16:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd7@toc@ha+16
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt7@toc@ha+16
+; CHECK-P10-BE-NEXT: ld r3, GlobLd7@toc@l+16(r3)
+; CHECK-P10-BE-NEXT: std r3, GlobSt7@toc@l+16(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LABEL: testGlob7PtrPlus16:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: addis r3, r2, GlobLd7@toc@ha+16
+; CHECK-P9-NEXT: addis r4, r2, GlobSt7@toc@ha+16
+; CHECK-P9-NEXT: ld r3, GlobLd7@toc@l+16(r3)
+; CHECK-P9-NEXT: std r3, GlobSt7@toc@l+16(r4)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: testGlob7PtrPlus16:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: addis r3, r2, GlobLd7@toc@ha+16
+; CHECK-P8-NEXT: ld r3, GlobLd7@toc@l+16(r3)
+; CHECK-P8-NEXT: addis r4, r2, GlobSt7@toc@ha+16
+; CHECK-P8-NEXT: std r3, GlobSt7@toc@l+16(r4)
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i64, i64* getelementptr inbounds ([20 x i64], [20 x i64]* @GlobLd7, i64 0, i64 2), align 8
+ store i64 %0, i64* getelementptr inbounds ([20 x i64], [20 x i64]* @GlobSt7, i64 0, i64 2), align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob7PtrPlusVar(i64 %Idx) {
+; CHECK-P10-LE-LABEL: testGlob7PtrPlusVar:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: sldi r3, r3, 3
+; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd7@PCREL, 1
+; CHECK-P10-LE-NEXT: paddi r5, 0, GlobSt7@PCREL, 1
+; CHECK-P10-LE-NEXT: ldx r4, r4, r3
+; CHECK-P10-LE-NEXT: stdx r4, r5, r3
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob7PtrPlusVar:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd7@toc@ha
+; CHECK-P10-BE-NEXT: sldi r3, r3, 3
+; CHECK-P10-BE-NEXT: addis r5, r2, GlobSt7@toc@ha
+; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd7@toc@l
+; CHECK-P10-BE-NEXT: addi r5, r5, GlobSt7@toc@l
+; CHECK-P10-BE-NEXT: ldx r4, r4, r3
+; CHECK-P10-BE-NEXT: stdx r4, r5, r3
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob7PtrPlusVar:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r4, r2, GlobLd7@toc@ha
+; CHECK-NEXT: sldi r3, r3, 3
+; CHECK-NEXT: addis r5, r2, GlobSt7@toc@ha
+; CHECK-NEXT: addi r4, r4, GlobLd7@toc@l
+; CHECK-NEXT: addi r5, r5, GlobSt7@toc@l
+; CHECK-NEXT: ldx r4, r4, r3
+; CHECK-NEXT: stdx r4, r5, r3
+; CHECK-NEXT: blr
+entry:
+ %arrayidx = getelementptr inbounds [20 x i64], [20 x i64]* @GlobLd7, i64 0, i64 %Idx
+ %0 = load i64, i64* %arrayidx, align 8
+ %arrayidx1 = getelementptr inbounds [20 x i64], [20 x i64]* @GlobSt7, i64 0, i64 %Idx
+ store i64 %0, i64* %arrayidx1, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob8PtrPlus0() {
+; CHECK-P10-LE-LABEL: testGlob8PtrPlus0:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pld r3, GlobLd8@PCREL(0), 1
+; CHECK-P10-LE-NEXT: pstd r3, GlobSt8@PCREL(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob8PtrPlus0:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd8@toc@ha
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt8@toc@ha
+; CHECK-P10-BE-NEXT: ld r3, GlobLd8@toc@l(r3)
+; CHECK-P10-BE-NEXT: std r3, GlobSt8@toc@l(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LABEL: testGlob8PtrPlus0:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: addis r3, r2, GlobLd8@toc@ha
+; CHECK-P9-NEXT: addis r4, r2, GlobSt8@toc@ha
+; CHECK-P9-NEXT: ld r3, GlobLd8@toc@l(r3)
+; CHECK-P9-NEXT: std r3, GlobSt8@toc@l(r4)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: testGlob8PtrPlus0:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: addis r3, r2, GlobLd8@toc@ha
+; CHECK-P8-NEXT: ld r3, GlobLd8@toc@l(r3)
+; CHECK-P8-NEXT: addis r4, r2, GlobSt8@toc@ha
+; CHECK-P8-NEXT: std r3, GlobSt8@toc@l(r4)
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i64, i64* getelementptr inbounds ([20 x i64], [20 x i64]* @GlobLd8, i64 0, i64 0), align 8
+ store i64 %0, i64* getelementptr inbounds ([20 x i64], [20 x i64]* @GlobSt8, i64 0, i64 0), align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob8PtrPlus3() {
+; CHECK-P10-LE-LABEL: testGlob8PtrPlus3:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pld r3, GlobLd8@PCREL+3(0), 1
+; CHECK-P10-LE-NEXT: pstd r3, GlobSt8@PCREL+3(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob8PtrPlus3:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd8@toc@ha
+; CHECK-P10-BE-NEXT: li r4, 3
+; CHECK-P10-BE-NEXT: addis r5, r2, GlobSt8@toc@ha
+; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd8@toc@l
+; CHECK-P10-BE-NEXT: addi r5, r5, GlobSt8@toc@l
+; CHECK-P10-BE-NEXT: ldx r3, r3, r4
+; CHECK-P10-BE-NEXT: stdx r3, r5, r4
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob8PtrPlus3:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r3, r2, GlobLd8@toc@ha
+; CHECK-NEXT: li r4, 3
+; CHECK-NEXT: addis r5, r2, GlobSt8@toc@ha
+; CHECK-NEXT: addi r3, r3, GlobLd8@toc@l
+; CHECK-NEXT: addi r5, r5, GlobSt8@toc@l
+; CHECK-NEXT: ldx r3, r3, r4
+; CHECK-NEXT: stdx r3, r5, r4
+; CHECK-NEXT: blr
+entry:
+ %0 = load i64, i64* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x i64]* @GlobLd8 to i8*), i64 3) to i64*), align 8
+ store i64 %0, i64* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x i64]* @GlobSt8 to i8*), i64 3) to i64*), align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob8PtrPlus4() {
+; CHECK-P10-LE-LABEL: testGlob8PtrPlus4:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pld r3, GlobLd8@PCREL+4(0), 1
+; CHECK-P10-LE-NEXT: pstd r3, GlobSt8@PCREL+4(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob8PtrPlus4:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd8@toc@ha
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt8@toc@ha
+; CHECK-P10-BE-NEXT: ld r3, GlobLd8@toc@l+4(r3)
+; CHECK-P10-BE-NEXT: std r3, GlobSt8@toc@l+4(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LABEL: testGlob8PtrPlus4:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: addis r3, r2, GlobLd8@toc@ha
+; CHECK-P9-NEXT: addis r4, r2, GlobSt8@toc@ha
+; CHECK-P9-NEXT: ld r3, GlobLd8@toc@l+4(r3)
+; CHECK-P9-NEXT: std r3, GlobSt8@toc@l+4(r4)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: testGlob8PtrPlus4:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: addis r3, r2, GlobLd8@toc@ha
+; CHECK-P8-NEXT: ld r3, GlobLd8@toc@l+4(r3)
+; CHECK-P8-NEXT: addis r4, r2, GlobSt8@toc@ha
+; CHECK-P8-NEXT: std r3, GlobSt8@toc@l+4(r4)
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i64, i64* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x i64]* @GlobLd8 to i8*), i64 4) to i64*), align 8
+ store i64 %0, i64* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x i64]* @GlobSt8 to i8*), i64 4) to i64*), align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob8PtrPlus16() {
+; CHECK-P10-LE-LABEL: testGlob8PtrPlus16:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pld r3, GlobLd8@PCREL+16(0), 1
+; CHECK-P10-LE-NEXT: pstd r3, GlobSt8@PCREL+16(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob8PtrPlus16:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd8@toc@ha+16
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt8@toc@ha+16
+; CHECK-P10-BE-NEXT: ld r3, GlobLd8@toc@l+16(r3)
+; CHECK-P10-BE-NEXT: std r3, GlobSt8@toc@l+16(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LABEL: testGlob8PtrPlus16:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: addis r3, r2, GlobLd8@toc@ha+16
+; CHECK-P9-NEXT: addis r4, r2, GlobSt8@toc@ha+16
+; CHECK-P9-NEXT: ld r3, GlobLd8@toc@l+16(r3)
+; CHECK-P9-NEXT: std r3, GlobSt8@toc@l+16(r4)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: testGlob8PtrPlus16:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: addis r3, r2, GlobLd8@toc@ha+16
+; CHECK-P8-NEXT: ld r3, GlobLd8@toc@l+16(r3)
+; CHECK-P8-NEXT: addis r4, r2, GlobSt8@toc@ha+16
+; CHECK-P8-NEXT: std r3, GlobSt8@toc@l+16(r4)
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i64, i64* getelementptr inbounds ([20 x i64], [20 x i64]* @GlobLd8, i64 0, i64 2), align 8
+ store i64 %0, i64* getelementptr inbounds ([20 x i64], [20 x i64]* @GlobSt8, i64 0, i64 2), align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob8PtrPlusVar(i64 %Idx) {
+; CHECK-P10-LE-LABEL: testGlob8PtrPlusVar:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: sldi r3, r3, 3
+; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd8@PCREL, 1
+; CHECK-P10-LE-NEXT: paddi r5, 0, GlobSt8@PCREL, 1
+; CHECK-P10-LE-NEXT: ldx r4, r4, r3
+; CHECK-P10-LE-NEXT: stdx r4, r5, r3
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob8PtrPlusVar:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd8@toc@ha
+; CHECK-P10-BE-NEXT: sldi r3, r3, 3
+; CHECK-P10-BE-NEXT: addis r5, r2, GlobSt8@toc@ha
+; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd8@toc@l
+; CHECK-P10-BE-NEXT: addi r5, r5, GlobSt8@toc@l
+; CHECK-P10-BE-NEXT: ldx r4, r4, r3
+; CHECK-P10-BE-NEXT: stdx r4, r5, r3
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob8PtrPlusVar:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r4, r2, GlobLd8@toc@ha
+; CHECK-NEXT: sldi r3, r3, 3
+; CHECK-NEXT: addis r5, r2, GlobSt8@toc@ha
+; CHECK-NEXT: addi r4, r4, GlobLd8@toc@l
+; CHECK-NEXT: addi r5, r5, GlobSt8@toc@l
+; CHECK-NEXT: ldx r4, r4, r3
+; CHECK-NEXT: stdx r4, r5, r3
+; CHECK-NEXT: blr
+entry:
+ %arrayidx = getelementptr inbounds [20 x i64], [20 x i64]* @GlobLd8, i64 0, i64 %Idx
+ %0 = load i64, i64* %arrayidx, align 8
+ %arrayidx1 = getelementptr inbounds [20 x i64], [20 x i64]* @GlobSt8, i64 0, i64 %Idx
+ store i64 %0, i64* %arrayidx1, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob9PtrPlus0() {
+; CHECK-P10-LE-LABEL: testGlob9PtrPlus0:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plwz r3, GlobLd9@PCREL(0), 1
+; CHECK-P10-LE-NEXT: pstw r3, GlobSt9@PCREL(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob9PtrPlus0:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd9@toc@ha
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt9@toc@ha
+; CHECK-P10-BE-NEXT: lwz r3, GlobLd9@toc@l(r3)
+; CHECK-P10-BE-NEXT: stw r3, GlobSt9@toc@l(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob9PtrPlus0:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r3, r2, GlobLd9@toc@ha
+; CHECK-NEXT: addis r4, r2, GlobSt9@toc@ha
+; CHECK-NEXT: lwz r3, GlobLd9@toc@l(r3)
+; CHECK-NEXT: stw r3, GlobSt9@toc@l(r4)
+; CHECK-NEXT: blr
+entry:
+ %0 = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @GlobLd9, i64 0, i64 0), align 4
+ store float %0, float* getelementptr inbounds ([20 x float], [20 x float]* @GlobSt9, i64 0, i64 0), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob9PtrPlus3() {
+; CHECK-P10-LE-LABEL: testGlob9PtrPlus3:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plwz r3, GlobLd9@PCREL+3(0), 1
+; CHECK-P10-LE-NEXT: pstw r3, GlobSt9@PCREL+3(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob9PtrPlus3:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd9@toc@ha
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt9@toc@ha
+; CHECK-P10-BE-NEXT: lwz r3, GlobLd9@toc@l+3(r3)
+; CHECK-P10-BE-NEXT: stw r3, GlobSt9@toc@l+3(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob9PtrPlus3:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r3, r2, GlobLd9@toc@ha
+; CHECK-NEXT: addis r4, r2, GlobSt9@toc@ha
+; CHECK-NEXT: lwz r3, GlobLd9@toc@l+3(r3)
+; CHECK-NEXT: stw r3, GlobSt9@toc@l+3(r4)
+; CHECK-NEXT: blr
+entry:
+ %0 = load float, float* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x float]* @GlobLd9 to i8*), i64 3) to float*), align 4
+ store float %0, float* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x float]* @GlobSt9 to i8*), i64 3) to float*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob9PtrPlus4() {
+; CHECK-P10-LE-LABEL: testGlob9PtrPlus4:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plwz r3, GlobLd9@PCREL+4(0), 1
+; CHECK-P10-LE-NEXT: pstw r3, GlobSt9@PCREL+4(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob9PtrPlus4:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd9@toc@ha+4
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt9@toc@ha+4
+; CHECK-P10-BE-NEXT: lwz r3, GlobLd9@toc@l+4(r3)
+; CHECK-P10-BE-NEXT: stw r3, GlobSt9@toc@l+4(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob9PtrPlus4:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r3, r2, GlobLd9@toc@ha+4
+; CHECK-NEXT: addis r4, r2, GlobSt9@toc@ha+4
+; CHECK-NEXT: lwz r3, GlobLd9@toc@l+4(r3)
+; CHECK-NEXT: stw r3, GlobSt9@toc@l+4(r4)
+; CHECK-NEXT: blr
+entry:
+ %0 = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @GlobLd9, i64 0, i64 1), align 4
+ store float %0, float* getelementptr inbounds ([20 x float], [20 x float]* @GlobSt9, i64 0, i64 1), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob9PtrPlus16() {
+; CHECK-P10-LE-LABEL: testGlob9PtrPlus16:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plwz r3, GlobLd9@PCREL+16(0), 1
+; CHECK-P10-LE-NEXT: pstw r3, GlobSt9@PCREL+16(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob9PtrPlus16:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd9@toc@ha+16
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt9@toc@ha+16
+; CHECK-P10-BE-NEXT: lwz r3, GlobLd9@toc@l+16(r3)
+; CHECK-P10-BE-NEXT: stw r3, GlobSt9@toc@l+16(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob9PtrPlus16:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r3, r2, GlobLd9@toc@ha+16
+; CHECK-NEXT: addis r4, r2, GlobSt9@toc@ha+16
+; CHECK-NEXT: lwz r3, GlobLd9@toc@l+16(r3)
+; CHECK-NEXT: stw r3, GlobSt9@toc@l+16(r4)
+; CHECK-NEXT: blr
+entry:
+ %0 = load float, float* getelementptr inbounds ([20 x float], [20 x float]* @GlobLd9, i64 0, i64 4), align 4
+ store float %0, float* getelementptr inbounds ([20 x float], [20 x float]* @GlobSt9, i64 0, i64 4), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob9PtrPlusVar(i64 %Idx) {
+; CHECK-P10-LE-LABEL: testGlob9PtrPlusVar:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: sldi r3, r3, 2
+; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd9@PCREL, 1
+; CHECK-P10-LE-NEXT: paddi r5, 0, GlobSt9@PCREL, 1
+; CHECK-P10-LE-NEXT: lwzx r4, r4, r3
+; CHECK-P10-LE-NEXT: stwx r4, r5, r3
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob9PtrPlusVar:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd9@toc@ha
+; CHECK-P10-BE-NEXT: sldi r3, r3, 2
+; CHECK-P10-BE-NEXT: addis r5, r2, GlobSt9@toc@ha
+; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd9@toc@l
+; CHECK-P10-BE-NEXT: addi r5, r5, GlobSt9@toc@l
+; CHECK-P10-BE-NEXT: lwzx r4, r4, r3
+; CHECK-P10-BE-NEXT: stwx r4, r5, r3
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob9PtrPlusVar:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r4, r2, GlobLd9@toc@ha
+; CHECK-NEXT: sldi r3, r3, 2
+; CHECK-NEXT: addis r5, r2, GlobSt9@toc@ha
+; CHECK-NEXT: addi r4, r4, GlobLd9@toc@l
+; CHECK-NEXT: addi r5, r5, GlobSt9@toc@l
+; CHECK-NEXT: lwzx r4, r4, r3
+; CHECK-NEXT: stwx r4, r5, r3
+; CHECK-NEXT: blr
+entry:
+ %arrayidx = getelementptr inbounds [20 x float], [20 x float]* @GlobLd9, i64 0, i64 %Idx
+ %0 = load float, float* %arrayidx, align 4
+ %arrayidx1 = getelementptr inbounds [20 x float], [20 x float]* @GlobSt9, i64 0, i64 %Idx
+ store float %0, float* %arrayidx1, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob10PtrPlus0() {
+; CHECK-P10-LE-LABEL: testGlob10PtrPlus0:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pld r3, GlobLd10@PCREL(0), 1
+; CHECK-P10-LE-NEXT: pstd r3, GlobSt10@PCREL(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob10PtrPlus0:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd10@toc@ha
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt10@toc@ha
+; CHECK-P10-BE-NEXT: ld r3, GlobLd10@toc@l(r3)
+; CHECK-P10-BE-NEXT: std r3, GlobSt10@toc@l(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LABEL: testGlob10PtrPlus0:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: addis r3, r2, GlobLd10@toc@ha
+; CHECK-P9-NEXT: addis r4, r2, GlobSt10@toc@ha
+; CHECK-P9-NEXT: ld r3, GlobLd10@toc@l(r3)
+; CHECK-P9-NEXT: std r3, GlobSt10@toc@l(r4)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: testGlob10PtrPlus0:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: addis r3, r2, GlobLd10@toc@ha
+; CHECK-P8-NEXT: ld r3, GlobLd10@toc@l(r3)
+; CHECK-P8-NEXT: addis r4, r2, GlobSt10@toc@ha
+; CHECK-P8-NEXT: std r3, GlobSt10@toc@l(r4)
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load double, double* getelementptr inbounds ([20 x double], [20 x double]* @GlobLd10, i64 0, i64 0), align 8
+ store double %0, double* getelementptr inbounds ([20 x double], [20 x double]* @GlobSt10, i64 0, i64 0), align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob10PtrPlus3() {
+; CHECK-P10-LE-LABEL: testGlob10PtrPlus3:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pld r3, GlobLd10@PCREL+3(0), 1
+; CHECK-P10-LE-NEXT: pstd r3, GlobSt10@PCREL+3(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob10PtrPlus3:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd10@toc@ha
+; CHECK-P10-BE-NEXT: li r4, 3
+; CHECK-P10-BE-NEXT: addis r5, r2, GlobSt10@toc@ha
+; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd10@toc@l
+; CHECK-P10-BE-NEXT: addi r5, r5, GlobSt10@toc@l
+; CHECK-P10-BE-NEXT: ldx r3, r3, r4
+; CHECK-P10-BE-NEXT: stdx r3, r5, r4
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob10PtrPlus3:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r3, r2, GlobLd10@toc@ha
+; CHECK-NEXT: li r4, 3
+; CHECK-NEXT: addis r5, r2, GlobSt10@toc@ha
+; CHECK-NEXT: addi r3, r3, GlobLd10@toc@l
+; CHECK-NEXT: addi r5, r5, GlobSt10@toc@l
+; CHECK-NEXT: ldx r3, r3, r4
+; CHECK-NEXT: stdx r3, r5, r4
+; CHECK-NEXT: blr
+entry:
+ %0 = load double, double* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x double]* @GlobLd10 to i8*), i64 3) to double*), align 8
+ store double %0, double* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x double]* @GlobSt10 to i8*), i64 3) to double*), align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob10PtrPlus4() {
+; CHECK-P10-LE-LABEL: testGlob10PtrPlus4:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pld r3, GlobLd10@PCREL+4(0), 1
+; CHECK-P10-LE-NEXT: pstd r3, GlobSt10@PCREL+4(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob10PtrPlus4:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd10@toc@ha
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt10@toc@ha
+; CHECK-P10-BE-NEXT: ld r3, GlobLd10@toc@l+4(r3)
+; CHECK-P10-BE-NEXT: std r3, GlobSt10@toc@l+4(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LABEL: testGlob10PtrPlus4:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: addis r3, r2, GlobLd10@toc@ha
+; CHECK-P9-NEXT: addis r4, r2, GlobSt10@toc@ha
+; CHECK-P9-NEXT: ld r3, GlobLd10@toc@l+4(r3)
+; CHECK-P9-NEXT: std r3, GlobSt10@toc@l+4(r4)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: testGlob10PtrPlus4:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: addis r3, r2, GlobLd10@toc@ha
+; CHECK-P8-NEXT: ld r3, GlobLd10@toc@l+4(r3)
+; CHECK-P8-NEXT: addis r4, r2, GlobSt10@toc@ha
+; CHECK-P8-NEXT: std r3, GlobSt10@toc@l+4(r4)
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load double, double* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x double]* @GlobLd10 to i8*), i64 4) to double*), align 8
+ store double %0, double* bitcast (i8* getelementptr inbounds (i8, i8* bitcast ([20 x double]* @GlobSt10 to i8*), i64 4) to double*), align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob10PtrPlus16() {
+; CHECK-P10-LE-LABEL: testGlob10PtrPlus16:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pld r3, GlobLd10@PCREL+16(0), 1
+; CHECK-P10-LE-NEXT: pstd r3, GlobSt10@PCREL+16(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob10PtrPlus16:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd10@toc@ha+16
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt10@toc@ha+16
+; CHECK-P10-BE-NEXT: ld r3, GlobLd10@toc@l+16(r3)
+; CHECK-P10-BE-NEXT: std r3, GlobSt10@toc@l+16(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LABEL: testGlob10PtrPlus16:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: addis r3, r2, GlobLd10@toc@ha+16
+; CHECK-P9-NEXT: addis r4, r2, GlobSt10@toc@ha+16
+; CHECK-P9-NEXT: ld r3, GlobLd10@toc@l+16(r3)
+; CHECK-P9-NEXT: std r3, GlobSt10@toc@l+16(r4)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: testGlob10PtrPlus16:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: addis r3, r2, GlobLd10@toc@ha+16
+; CHECK-P8-NEXT: ld r3, GlobLd10@toc@l+16(r3)
+; CHECK-P8-NEXT: addis r4, r2, GlobSt10@toc@ha+16
+; CHECK-P8-NEXT: std r3, GlobSt10@toc@l+16(r4)
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load double, double* getelementptr inbounds ([20 x double], [20 x double]* @GlobLd10, i64 0, i64 2), align 8
+ store double %0, double* getelementptr inbounds ([20 x double], [20 x double]* @GlobSt10, i64 0, i64 2), align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob10PtrPlusVar(i64 %Idx) {
+; CHECK-P10-LE-LABEL: testGlob10PtrPlusVar:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: sldi r3, r3, 3
+; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd10@PCREL, 1
+; CHECK-P10-LE-NEXT: paddi r5, 0, GlobSt10@PCREL, 1
+; CHECK-P10-LE-NEXT: ldx r4, r4, r3
+; CHECK-P10-LE-NEXT: stdx r4, r5, r3
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob10PtrPlusVar:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd10@toc@ha
+; CHECK-P10-BE-NEXT: sldi r3, r3, 3
+; CHECK-P10-BE-NEXT: addis r5, r2, GlobSt10@toc@ha
+; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd10@toc@l
+; CHECK-P10-BE-NEXT: addi r5, r5, GlobSt10@toc@l
+; CHECK-P10-BE-NEXT: ldx r4, r4, r3
+; CHECK-P10-BE-NEXT: stdx r4, r5, r3
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-LABEL: testGlob10PtrPlusVar:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addis r4, r2, GlobLd10@toc@ha
+; CHECK-NEXT: sldi r3, r3, 3
+; CHECK-NEXT: addis r5, r2, GlobSt10@toc@ha
+; CHECK-NEXT: addi r4, r4, GlobLd10@toc@l
+; CHECK-NEXT: addi r5, r5, GlobSt10@toc@l
+; CHECK-NEXT: ldx r4, r4, r3
+; CHECK-NEXT: stdx r4, r5, r3
+; CHECK-NEXT: blr
+entry:
+ %arrayidx = getelementptr inbounds [20 x double], [20 x double]* @GlobLd10, i64 0, i64 %Idx
+ %0 = load double, double* %arrayidx, align 8
+ %arrayidx1 = getelementptr inbounds [20 x double], [20 x double]* @GlobSt10, i64 0, i64 %Idx
+ store double %0, double* %arrayidx1, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob11PtrPlus0() {
+; CHECK-P10-LE-LABEL: testGlob11PtrPlus0:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plxv vs0, GlobLd11@PCREL(0), 1
+; CHECK-P10-LE-NEXT: pstxv vs0, GlobSt11@PCREL(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob11PtrPlus0:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd11@toc@ha
+; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd11@toc@l
+; CHECK-P10-BE-NEXT: lxvx vs0, 0, r3
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobSt11@toc@ha
+; CHECK-P10-BE-NEXT: addi r3, r3, GlobSt11@toc@l
+; CHECK-P10-BE-NEXT: stxvx vs0, 0, r3
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LABEL: testGlob11PtrPlus0:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: addis r3, r2, GlobLd11@toc@ha
+; CHECK-P9-NEXT: addi r3, r3, GlobLd11@toc@l
+; CHECK-P9-NEXT: lxvx vs0, 0, r3
+; CHECK-P9-NEXT: addis r3, r2, GlobSt11@toc@ha
+; CHECK-P9-NEXT: addi r3, r3, GlobSt11@toc@l
+; CHECK-P9-NEXT: stxvx vs0, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: testGlob11PtrPlus0:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: addis r3, r2, GlobLd11@toc@ha
+; CHECK-P8-LE-NEXT: addi r3, r3, GlobLd11@toc@l
+; CHECK-P8-LE-NEXT: lvx v2, 0, r3
+; CHECK-P8-LE-NEXT: addis r3, r2, GlobSt11@toc@ha
+; CHECK-P8-LE-NEXT: addi r3, r3, GlobSt11@toc@l
+; CHECK-P8-LE-NEXT: stvx v2, 0, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: testGlob11PtrPlus0:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: addis r3, r2, GlobLd11@toc@ha
+; CHECK-P8-BE-NEXT: addi r3, r3, GlobLd11@toc@l
+; CHECK-P8-BE-NEXT: lxvw4x vs0, 0, r3
+; CHECK-P8-BE-NEXT: addis r3, r2, GlobSt11@toc@ha
+; CHECK-P8-BE-NEXT: addi r3, r3, GlobSt11@toc@l
+; CHECK-P8-BE-NEXT: stxvw4x vs0, 0, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %0 = load <16 x i8>, <16 x i8>* getelementptr inbounds ([20 x <16 x i8>], [20 x <16 x i8>]* @GlobLd11, i64 0, i64 0), align 16
+ store <16 x i8> %0, <16 x i8>* getelementptr inbounds ([20 x <16 x i8>], [20 x <16 x i8>]* @GlobSt11, i64 0, i64 0), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob11PtrPlus3() {
+; CHECK-P10-LE-LABEL: testGlob11PtrPlus3:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plxv vs0, GlobLd11@PCREL+3(0), 1
+; CHECK-P10-LE-NEXT: pstxv vs0, GlobSt11@PCREL+3(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob11PtrPlus3:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd11@toc@ha
+; CHECK-P10-BE-NEXT: li r4, 3
+; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd11@toc@l
+; CHECK-P10-BE-NEXT: lxvx vs0, r3, r4
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobSt11@toc@ha
+; CHECK-P10-BE-NEXT: addi r3, r3, GlobSt11@toc@l
+; CHECK-P10-BE-NEXT: stxvx vs0, r3, r4
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LABEL: testGlob11PtrPlus3:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: addis r3, r2, GlobLd11@toc@ha
+; CHECK-P9-NEXT: li r4, 3
+; CHECK-P9-NEXT: addi r3, r3, GlobLd11@toc@l
+; CHECK-P9-NEXT: lxvx vs0, r3, r4
+; CHECK-P9-NEXT: addis r3, r2, GlobSt11@toc@ha
+; CHECK-P9-NEXT: addi r3, r3, GlobSt11@toc@l
+; CHECK-P9-NEXT: stxvx vs0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: testGlob11PtrPlus3:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: addis r3, r2, GlobLd11@toc@ha
+; CHECK-P8-LE-NEXT: li r4, 3
+; CHECK-P8-LE-NEXT: addi r3, r3, GlobLd11@toc@l
+; CHECK-P8-LE-NEXT: lvx v2, r3, r4
+; CHECK-P8-LE-NEXT: addis r3, r2, GlobSt11@toc@ha
+; CHECK-P8-LE-NEXT: addi r3, r3, GlobSt11@toc@l
+; CHECK-P8-LE-NEXT: stvx v2, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: testGlob11PtrPlus3:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: addis r3, r2, GlobLd11@toc@ha
+; CHECK-P8-BE-NEXT: li r4, 3
+; CHECK-P8-BE-NEXT: addi r3, r3, GlobLd11@toc@l
+; CHECK-P8-BE-NEXT: lxvw4x vs0, r3, r4
+; CHECK-P8-BE-NEXT: addis r3, r2, GlobSt11@toc@ha
+; CHECK-P8-BE-NEXT: addi r3, r3, GlobSt11@toc@l
+; CHECK-P8-BE-NEXT: stxvw4x vs0, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %0 = load <16 x i8>, <16 x i8>* bitcast (i8* getelementptr ([20 x <16 x i8>], [20 x <16 x i8>]* @GlobLd11, i64 0, i64 0, i64 3) to <16 x i8>*), align 16
+ store <16 x i8> %0, <16 x i8>* bitcast (i8* getelementptr ([20 x <16 x i8>], [20 x <16 x i8>]* @GlobSt11, i64 0, i64 0, i64 3) to <16 x i8>*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob11PtrPlus4() {
+; CHECK-P10-LE-LABEL: testGlob11PtrPlus4:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plxv vs0, GlobLd11@PCREL+4(0), 1
+; CHECK-P10-LE-NEXT: pstxv vs0, GlobSt11@PCREL+4(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob11PtrPlus4:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd11@toc@ha
+; CHECK-P10-BE-NEXT: li r4, 4
+; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd11@toc@l
+; CHECK-P10-BE-NEXT: lxvx vs0, r3, r4
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobSt11@toc@ha
+; CHECK-P10-BE-NEXT: addi r3, r3, GlobSt11@toc@l
+; CHECK-P10-BE-NEXT: stxvx vs0, r3, r4
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LABEL: testGlob11PtrPlus4:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: addis r3, r2, GlobLd11@toc@ha
+; CHECK-P9-NEXT: li r4, 4
+; CHECK-P9-NEXT: addi r3, r3, GlobLd11@toc@l
+; CHECK-P9-NEXT: lxvx vs0, r3, r4
+; CHECK-P9-NEXT: addis r3, r2, GlobSt11@toc@ha
+; CHECK-P9-NEXT: addi r3, r3, GlobSt11@toc@l
+; CHECK-P9-NEXT: stxvx vs0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: testGlob11PtrPlus4:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: addis r3, r2, GlobLd11@toc@ha
+; CHECK-P8-LE-NEXT: li r4, 4
+; CHECK-P8-LE-NEXT: addi r3, r3, GlobLd11@toc@l
+; CHECK-P8-LE-NEXT: lvx v2, r3, r4
+; CHECK-P8-LE-NEXT: addis r3, r2, GlobSt11@toc@ha
+; CHECK-P8-LE-NEXT: addi r3, r3, GlobSt11@toc@l
+; CHECK-P8-LE-NEXT: stvx v2, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: testGlob11PtrPlus4:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: addis r3, r2, GlobLd11@toc@ha
+; CHECK-P8-BE-NEXT: li r4, 4
+; CHECK-P8-BE-NEXT: addi r3, r3, GlobLd11@toc@l
+; CHECK-P8-BE-NEXT: lxvw4x vs0, r3, r4
+; CHECK-P8-BE-NEXT: addis r3, r2, GlobSt11@toc@ha
+; CHECK-P8-BE-NEXT: addi r3, r3, GlobSt11@toc@l
+; CHECK-P8-BE-NEXT: stxvw4x vs0, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %0 = load <16 x i8>, <16 x i8>* bitcast (i8* getelementptr ([20 x <16 x i8>], [20 x <16 x i8>]* @GlobLd11, i64 0, i64 0, i64 4) to <16 x i8>*), align 16
+ store <16 x i8> %0, <16 x i8>* bitcast (i8* getelementptr ([20 x <16 x i8>], [20 x <16 x i8>]* @GlobSt11, i64 0, i64 0, i64 4) to <16 x i8>*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob11PtrPlus16() {
+; CHECK-P10-LE-LABEL: testGlob11PtrPlus16:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plxv vs0, GlobLd11@PCREL+16(0), 1
+; CHECK-P10-LE-NEXT: pstxv vs0, GlobSt11@PCREL+16(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob11PtrPlus16:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd11@toc@ha
+; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd11@toc@l
+; CHECK-P10-BE-NEXT: lxv vs0, 16(r3)
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobSt11@toc@ha
+; CHECK-P10-BE-NEXT: addi r3, r3, GlobSt11@toc@l
+; CHECK-P10-BE-NEXT: stxv vs0, 16(r3)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LABEL: testGlob11PtrPlus16:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: addis r3, r2, GlobLd11@toc@ha
+; CHECK-P9-NEXT: addi r3, r3, GlobLd11@toc@l
+; CHECK-P9-NEXT: lxv vs0, 16(r3)
+; CHECK-P9-NEXT: addis r3, r2, GlobSt11@toc@ha
+; CHECK-P9-NEXT: addi r3, r3, GlobSt11@toc@l
+; CHECK-P9-NEXT: stxv vs0, 16(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: testGlob11PtrPlus16:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: addis r3, r2, GlobLd11@toc@ha
+; CHECK-P8-LE-NEXT: li r4, 16
+; CHECK-P8-LE-NEXT: addi r3, r3, GlobLd11@toc@l
+; CHECK-P8-LE-NEXT: lvx v2, r3, r4
+; CHECK-P8-LE-NEXT: addis r3, r2, GlobSt11@toc@ha
+; CHECK-P8-LE-NEXT: addi r3, r3, GlobSt11@toc@l
+; CHECK-P8-LE-NEXT: stvx v2, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: testGlob11PtrPlus16:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: addis r3, r2, GlobLd11@toc@ha
+; CHECK-P8-BE-NEXT: li r4, 16
+; CHECK-P8-BE-NEXT: addi r3, r3, GlobLd11@toc@l
+; CHECK-P8-BE-NEXT: lxvw4x vs0, r3, r4
+; CHECK-P8-BE-NEXT: addis r3, r2, GlobSt11@toc@ha
+; CHECK-P8-BE-NEXT: addi r3, r3, GlobSt11@toc@l
+; CHECK-P8-BE-NEXT: stxvw4x vs0, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %0 = load <16 x i8>, <16 x i8>* bitcast (i8* getelementptr inbounds ([20 x <16 x i8>], [20 x <16 x i8>]* @GlobLd11, i64 0, i64 1, i64 0) to <16 x i8>*), align 16
+ store <16 x i8> %0, <16 x i8>* bitcast (i8* getelementptr inbounds ([20 x <16 x i8>], [20 x <16 x i8>]* @GlobSt11, i64 0, i64 1, i64 0) to <16 x i8>*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob11PtrPlusVar(i64 %Idx) {
+; CHECK-P10-LE-LABEL: testGlob11PtrPlusVar:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: sldi r3, r3, 4
+; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd11@PCREL, 1
+; CHECK-P10-LE-NEXT: lxvx vs0, r4, r3
+; CHECK-P10-LE-NEXT: paddi r4, 0, GlobSt11@PCREL, 1
+; CHECK-P10-LE-NEXT: stxvx vs0, r4, r3
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob11PtrPlusVar:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd11@toc@ha
+; CHECK-P10-BE-NEXT: sldi r3, r3, 4
+; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd11@toc@l
+; CHECK-P10-BE-NEXT: lxvx vs0, r4, r3
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt11@toc@ha
+; CHECK-P10-BE-NEXT: addi r4, r4, GlobSt11@toc@l
+; CHECK-P10-BE-NEXT: stxvx vs0, r4, r3
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LABEL: testGlob11PtrPlusVar:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: addis r4, r2, GlobLd11@toc@ha
+; CHECK-P9-NEXT: sldi r3, r3, 4
+; CHECK-P9-NEXT: addi r4, r4, GlobLd11@toc@l
+; CHECK-P9-NEXT: lxvx vs0, r4, r3
+; CHECK-P9-NEXT: addis r4, r2, GlobSt11@toc@ha
+; CHECK-P9-NEXT: addi r4, r4, GlobSt11@toc@l
+; CHECK-P9-NEXT: stxvx vs0, r4, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: testGlob11PtrPlusVar:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: addis r4, r2, GlobLd11@toc@ha
+; CHECK-P8-LE-NEXT: sldi r3, r3, 4
+; CHECK-P8-LE-NEXT: addi r4, r4, GlobLd11@toc@l
+; CHECK-P8-LE-NEXT: lvx v2, r4, r3
+; CHECK-P8-LE-NEXT: addis r4, r2, GlobSt11@toc@ha
+; CHECK-P8-LE-NEXT: addi r4, r4, GlobSt11@toc@l
+; CHECK-P8-LE-NEXT: stvx v2, r4, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: testGlob11PtrPlusVar:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: addis r4, r2, GlobLd11@toc@ha
+; CHECK-P8-BE-NEXT: sldi r3, r3, 4
+; CHECK-P8-BE-NEXT: addi r4, r4, GlobLd11@toc@l
+; CHECK-P8-BE-NEXT: lxvw4x vs0, r4, r3
+; CHECK-P8-BE-NEXT: addis r4, r2, GlobSt11@toc@ha
+; CHECK-P8-BE-NEXT: addi r4, r4, GlobSt11@toc@l
+; CHECK-P8-BE-NEXT: stxvw4x vs0, r4, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %arrayidx = getelementptr inbounds [20 x <16 x i8>], [20 x <16 x i8>]* @GlobLd11, i64 0, i64 %Idx
+ %0 = load <16 x i8>, <16 x i8>* %arrayidx, align 16
+ %arrayidx1 = getelementptr inbounds [20 x <16 x i8>], [20 x <16 x i8>]* @GlobSt11, i64 0, i64 %Idx
+ store <16 x i8> %0, <16 x i8>* %arrayidx1, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob12PtrPlus0() {
+; CHECK-P10-LE-LABEL: testGlob12PtrPlus0:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plxv vs0, GlobLd12@PCREL(0), 1
+; CHECK-P10-LE-NEXT: pstxv vs0, GlobSt12@PCREL(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob12PtrPlus0:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd12@toc@ha
+; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd12@toc@l
+; CHECK-P10-BE-NEXT: lxvx vs0, 0, r3
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobSt12@toc@ha
+; CHECK-P10-BE-NEXT: addi r3, r3, GlobSt12@toc@l
+; CHECK-P10-BE-NEXT: stxvx vs0, 0, r3
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LABEL: testGlob12PtrPlus0:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: addis r3, r2, GlobLd12@toc@ha
+; CHECK-P9-NEXT: addi r3, r3, GlobLd12@toc@l
+; CHECK-P9-NEXT: lxvx vs0, 0, r3
+; CHECK-P9-NEXT: addis r3, r2, GlobSt12@toc@ha
+; CHECK-P9-NEXT: addi r3, r3, GlobSt12@toc@l
+; CHECK-P9-NEXT: stxvx vs0, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: testGlob12PtrPlus0:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: addis r3, r2, GlobLd12@toc@ha
+; CHECK-P8-LE-NEXT: addi r3, r3, GlobLd12@toc@l
+; CHECK-P8-LE-NEXT: lvx v2, 0, r3
+; CHECK-P8-LE-NEXT: addis r3, r2, GlobSt12@toc@ha
+; CHECK-P8-LE-NEXT: addi r3, r3, GlobSt12@toc@l
+; CHECK-P8-LE-NEXT: stvx v2, 0, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: testGlob12PtrPlus0:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: addis r3, r2, GlobLd12@toc@ha
+; CHECK-P8-BE-NEXT: addi r3, r3, GlobLd12@toc@l
+; CHECK-P8-BE-NEXT: lxvw4x vs0, 0, r3
+; CHECK-P8-BE-NEXT: addis r3, r2, GlobSt12@toc@ha
+; CHECK-P8-BE-NEXT: addi r3, r3, GlobSt12@toc@l
+; CHECK-P8-BE-NEXT: stxvw4x vs0, 0, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %0 = load <16 x i8>, <16 x i8>* getelementptr inbounds ([20 x <16 x i8>], [20 x <16 x i8>]* @GlobLd12, i64 0, i64 0), align 16
+ store <16 x i8> %0, <16 x i8>* getelementptr inbounds ([20 x <16 x i8>], [20 x <16 x i8>]* @GlobSt12, i64 0, i64 0), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob12PtrPlus3() {
+; CHECK-P10-LE-LABEL: testGlob12PtrPlus3:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plxv vs0, GlobLd12@PCREL+3(0), 1
+; CHECK-P10-LE-NEXT: pstxv vs0, GlobSt12@PCREL+3(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob12PtrPlus3:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd12@toc@ha
+; CHECK-P10-BE-NEXT: li r4, 3
+; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd12@toc@l
+; CHECK-P10-BE-NEXT: lxvx vs0, r3, r4
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobSt12@toc@ha
+; CHECK-P10-BE-NEXT: addi r3, r3, GlobSt12@toc@l
+; CHECK-P10-BE-NEXT: stxvx vs0, r3, r4
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LABEL: testGlob12PtrPlus3:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: addis r3, r2, GlobLd12@toc@ha
+; CHECK-P9-NEXT: li r4, 3
+; CHECK-P9-NEXT: addi r3, r3, GlobLd12@toc@l
+; CHECK-P9-NEXT: lxvx vs0, r3, r4
+; CHECK-P9-NEXT: addis r3, r2, GlobSt12@toc@ha
+; CHECK-P9-NEXT: addi r3, r3, GlobSt12@toc@l
+; CHECK-P9-NEXT: stxvx vs0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: testGlob12PtrPlus3:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: addis r3, r2, GlobLd12@toc@ha
+; CHECK-P8-LE-NEXT: li r4, 3
+; CHECK-P8-LE-NEXT: addi r3, r3, GlobLd12@toc@l
+; CHECK-P8-LE-NEXT: lvx v2, r3, r4
+; CHECK-P8-LE-NEXT: addis r3, r2, GlobSt12@toc@ha
+; CHECK-P8-LE-NEXT: addi r3, r3, GlobSt12@toc@l
+; CHECK-P8-LE-NEXT: stvx v2, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: testGlob12PtrPlus3:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: addis r3, r2, GlobLd12@toc@ha
+; CHECK-P8-BE-NEXT: li r4, 3
+; CHECK-P8-BE-NEXT: addi r3, r3, GlobLd12@toc@l
+; CHECK-P8-BE-NEXT: lxvw4x vs0, r3, r4
+; CHECK-P8-BE-NEXT: addis r3, r2, GlobSt12@toc@ha
+; CHECK-P8-BE-NEXT: addi r3, r3, GlobSt12@toc@l
+; CHECK-P8-BE-NEXT: stxvw4x vs0, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %0 = load <16 x i8>, <16 x i8>* bitcast (i8* getelementptr ([20 x <16 x i8>], [20 x <16 x i8>]* @GlobLd12, i64 0, i64 0, i64 3) to <16 x i8>*), align 16
+ store <16 x i8> %0, <16 x i8>* bitcast (i8* getelementptr ([20 x <16 x i8>], [20 x <16 x i8>]* @GlobSt12, i64 0, i64 0, i64 3) to <16 x i8>*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob12PtrPlus4() {
+; CHECK-P10-LE-LABEL: testGlob12PtrPlus4:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plxv vs0, GlobLd12@PCREL+4(0), 1
+; CHECK-P10-LE-NEXT: pstxv vs0, GlobSt12@PCREL+4(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob12PtrPlus4:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd12@toc@ha
+; CHECK-P10-BE-NEXT: li r4, 4
+; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd12@toc@l
+; CHECK-P10-BE-NEXT: lxvx vs0, r3, r4
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobSt12@toc@ha
+; CHECK-P10-BE-NEXT: addi r3, r3, GlobSt12@toc@l
+; CHECK-P10-BE-NEXT: stxvx vs0, r3, r4
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LABEL: testGlob12PtrPlus4:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: addis r3, r2, GlobLd12@toc@ha
+; CHECK-P9-NEXT: li r4, 4
+; CHECK-P9-NEXT: addi r3, r3, GlobLd12@toc@l
+; CHECK-P9-NEXT: lxvx vs0, r3, r4
+; CHECK-P9-NEXT: addis r3, r2, GlobSt12@toc@ha
+; CHECK-P9-NEXT: addi r3, r3, GlobSt12@toc@l
+; CHECK-P9-NEXT: stxvx vs0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: testGlob12PtrPlus4:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: addis r3, r2, GlobLd12@toc@ha
+; CHECK-P8-LE-NEXT: li r4, 4
+; CHECK-P8-LE-NEXT: addi r3, r3, GlobLd12@toc@l
+; CHECK-P8-LE-NEXT: lvx v2, r3, r4
+; CHECK-P8-LE-NEXT: addis r3, r2, GlobSt12@toc@ha
+; CHECK-P8-LE-NEXT: addi r3, r3, GlobSt12@toc@l
+; CHECK-P8-LE-NEXT: stvx v2, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: testGlob12PtrPlus4:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: addis r3, r2, GlobLd12@toc@ha
+; CHECK-P8-BE-NEXT: li r4, 4
+; CHECK-P8-BE-NEXT: addi r3, r3, GlobLd12@toc@l
+; CHECK-P8-BE-NEXT: lxvw4x vs0, r3, r4
+; CHECK-P8-BE-NEXT: addis r3, r2, GlobSt12@toc@ha
+; CHECK-P8-BE-NEXT: addi r3, r3, GlobSt12@toc@l
+; CHECK-P8-BE-NEXT: stxvw4x vs0, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %0 = load <16 x i8>, <16 x i8>* bitcast (i8* getelementptr ([20 x <16 x i8>], [20 x <16 x i8>]* @GlobLd12, i64 0, i64 0, i64 4) to <16 x i8>*), align 16
+ store <16 x i8> %0, <16 x i8>* bitcast (i8* getelementptr ([20 x <16 x i8>], [20 x <16 x i8>]* @GlobSt12, i64 0, i64 0, i64 4) to <16 x i8>*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob12PtrPlus16() {
+; CHECK-P10-LE-LABEL: testGlob12PtrPlus16:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: plxv vs0, GlobLd12@PCREL+16(0), 1
+; CHECK-P10-LE-NEXT: pstxv vs0, GlobSt12@PCREL+16(0), 1
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob12PtrPlus16:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobLd12@toc@ha
+; CHECK-P10-BE-NEXT: addi r3, r3, GlobLd12@toc@l
+; CHECK-P10-BE-NEXT: lxv vs0, 16(r3)
+; CHECK-P10-BE-NEXT: addis r3, r2, GlobSt12@toc@ha
+; CHECK-P10-BE-NEXT: addi r3, r3, GlobSt12@toc@l
+; CHECK-P10-BE-NEXT: stxv vs0, 16(r3)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LABEL: testGlob12PtrPlus16:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: addis r3, r2, GlobLd12@toc@ha
+; CHECK-P9-NEXT: addi r3, r3, GlobLd12@toc@l
+; CHECK-P9-NEXT: lxv vs0, 16(r3)
+; CHECK-P9-NEXT: addis r3, r2, GlobSt12@toc@ha
+; CHECK-P9-NEXT: addi r3, r3, GlobSt12@toc@l
+; CHECK-P9-NEXT: stxv vs0, 16(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: testGlob12PtrPlus16:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: addis r3, r2, GlobLd12@toc@ha
+; CHECK-P8-LE-NEXT: li r4, 16
+; CHECK-P8-LE-NEXT: addi r3, r3, GlobLd12@toc@l
+; CHECK-P8-LE-NEXT: lvx v2, r3, r4
+; CHECK-P8-LE-NEXT: addis r3, r2, GlobSt12@toc@ha
+; CHECK-P8-LE-NEXT: addi r3, r3, GlobSt12@toc@l
+; CHECK-P8-LE-NEXT: stvx v2, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: testGlob12PtrPlus16:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: addis r3, r2, GlobLd12@toc@ha
+; CHECK-P8-BE-NEXT: li r4, 16
+; CHECK-P8-BE-NEXT: addi r3, r3, GlobLd12@toc@l
+; CHECK-P8-BE-NEXT: lxvw4x vs0, r3, r4
+; CHECK-P8-BE-NEXT: addis r3, r2, GlobSt12@toc@ha
+; CHECK-P8-BE-NEXT: addi r3, r3, GlobSt12@toc@l
+; CHECK-P8-BE-NEXT: stxvw4x vs0, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %0 = load <16 x i8>, <16 x i8>* bitcast (i8* getelementptr inbounds ([20 x <16 x i8>], [20 x <16 x i8>]* @GlobLd12, i64 0, i64 1, i64 0) to <16 x i8>*), align 16
+ store <16 x i8> %0, <16 x i8>* bitcast (i8* getelementptr inbounds ([20 x <16 x i8>], [20 x <16 x i8>]* @GlobSt12, i64 0, i64 1, i64 0) to <16 x i8>*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn
+define dso_local void @testGlob12PtrPlusVar(i64 %Idx) {
+; CHECK-P10-LE-LABEL: testGlob12PtrPlusVar:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: sldi r3, r3, 4
+; CHECK-P10-LE-NEXT: paddi r4, 0, GlobLd12@PCREL, 1
+; CHECK-P10-LE-NEXT: lxvx vs0, r4, r3
+; CHECK-P10-LE-NEXT: paddi r4, 0, GlobSt12@PCREL, 1
+; CHECK-P10-LE-NEXT: stxvx vs0, r4, r3
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: testGlob12PtrPlusVar:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobLd12@toc@ha
+; CHECK-P10-BE-NEXT: sldi r3, r3, 4
+; CHECK-P10-BE-NEXT: addi r4, r4, GlobLd12@toc@l
+; CHECK-P10-BE-NEXT: lxvx vs0, r4, r3
+; CHECK-P10-BE-NEXT: addis r4, r2, GlobSt12@toc@ha
+; CHECK-P10-BE-NEXT: addi r4, r4, GlobSt12@toc@l
+; CHECK-P10-BE-NEXT: stxvx vs0, r4, r3
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LABEL: testGlob12PtrPlusVar:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: addis r4, r2, GlobLd12@toc@ha
+; CHECK-P9-NEXT: sldi r3, r3, 4
+; CHECK-P9-NEXT: addi r4, r4, GlobLd12@toc@l
+; CHECK-P9-NEXT: lxvx vs0, r4, r3
+; CHECK-P9-NEXT: addis r4, r2, GlobSt12@toc@ha
+; CHECK-P9-NEXT: addi r4, r4, GlobSt12@toc@l
+; CHECK-P9-NEXT: stxvx vs0, r4, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: testGlob12PtrPlusVar:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: addis r4, r2, GlobLd12@toc@ha
+; CHECK-P8-LE-NEXT: sldi r3, r3, 4
+; CHECK-P8-LE-NEXT: addi r4, r4, GlobLd12@toc@l
+; CHECK-P8-LE-NEXT: lvx v2, r4, r3
+; CHECK-P8-LE-NEXT: addis r4, r2, GlobSt12@toc@ha
+; CHECK-P8-LE-NEXT: addi r4, r4, GlobSt12@toc@l
+; CHECK-P8-LE-NEXT: stvx v2, r4, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: testGlob12PtrPlusVar:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: addis r4, r2, GlobLd12@toc@ha
+; CHECK-P8-BE-NEXT: sldi r3, r3, 4
+; CHECK-P8-BE-NEXT: addi r4, r4, GlobLd12@toc@l
+; CHECK-P8-BE-NEXT: lxvw4x vs0, r4, r3
+; CHECK-P8-BE-NEXT: addis r4, r2, GlobSt12@toc@ha
+; CHECK-P8-BE-NEXT: addi r4, r4, GlobSt12@toc@l
+; CHECK-P8-BE-NEXT: stxvw4x vs0, r4, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %arrayidx = getelementptr inbounds [20 x <16 x i8>], [20 x <16 x i8>]* @GlobLd12, i64 0, i64 %Idx
+ %0 = load <16 x i8>, <16 x i8>* %arrayidx, align 16
+ %arrayidx1 = getelementptr inbounds [20 x <16 x i8>], [20 x <16 x i8>]* @GlobSt12, i64 0, i64 %Idx
+ store <16 x i8> %0, <16 x i8>* %arrayidx1, align 16
+ ret void
+}
--- /dev/null
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-POSTP8,CHECK-P10
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-POSTP8,CHECK-P10
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-POSTP8,CHECK-PREP10,CHECK-P9
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-POSTP8,CHECK-PREP10,CHECK-P9
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P8
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P8
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_0_double_uint8_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_0_double_uint8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: lxsibzx f0, 0, r3
+; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_0_double_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lbz r3, 0(r3)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = uitofp i8 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_align16_double_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-POSTP8-LABEL: ld_align16_double_uint8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: addi r3, r3, 8
+; CHECK-POSTP8-NEXT: lxsibzx f0, 0, r3
+; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_align16_double_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lbz r3, 8(r3)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = uitofp i8 %0 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_align32_double_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_double_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lxsibzx f0, r3, r4
+; CHECK-P10-NEXT: xscvuxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_align32_double_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, 1525
+; CHECK-P9-NEXT: ori r4, r4, 56600
+; CHECK-P9-NEXT: lxsibzx f0, r3, r4
+; CHECK-P9-NEXT: xscvuxddp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_align32_double_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, 1525
+; CHECK-P8-NEXT: ori r4, r4, 56600
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = uitofp i8 %0 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_align64_double_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_double_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lxsibzx f0, r3, r4
+; CHECK-P10-NEXT: xscvuxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_align64_double_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: lxsibzx f0, r3, r4
+; CHECK-P9-NEXT: xscvuxddp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_align64_double_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = uitofp i8 %0 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_reg_double_uint8_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-POSTP8-LABEL: ld_reg_double_uint8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: lxsibzx f0, r3, r4
+; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_reg_double_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = uitofp i8 %0 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_or_double_uint8_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-POSTP8-LABEL: ld_or_double_uint8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: or r3, r4, r3
+; CHECK-POSTP8-NEXT: lxsibzx f0, 0, r3
+; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_or_double_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: lbz r3, 0(r3)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv1 = uitofp i8 %1 to double
+ ret double %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_not_disjoint16_double_uint8_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_not_disjoint16_double_uint8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 6
+; CHECK-POSTP8-NEXT: lxsibzx f0, 0, r3
+; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint16_double_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: lbz r3, 0(r3)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = uitofp i8 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_disjoint_align16_double_uint8_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_disjoint_align16_double_uint8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-POSTP8-NEXT: ori r3, r3, 24
+; CHECK-POSTP8-NEXT: lxsibzx f0, 0, r3
+; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align16_double_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: lbz r3, 24(r3)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 8
+ %conv = uitofp i8 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_not_disjoint32_double_uint8_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_not_disjoint32_double_uint8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 34463
+; CHECK-POSTP8-NEXT: oris r3, r3, 1
+; CHECK-POSTP8-NEXT: lxsibzx f0, 0, r3
+; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint32_double_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: lbz r3, 0(r3)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = uitofp i8 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_disjoint_align32_double_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_double_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lxsibzx f0, r3, r4
+; CHECK-P10-NEXT: xscvuxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_double_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lxsibzx f0, r3, r4
+; CHECK-P9-NEXT: xscvuxddp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_double_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 16
+ %conv = uitofp i8 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_not_disjoint64_double_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_double_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lxsibzx f0, 0, r3
+; CHECK-P10-NEXT: xscvuxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint64_double_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: lxsibzx f0, 0, r3
+; CHECK-P9-NEXT: xscvuxddp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint64_double_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: lbz r3, 0(r3)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = uitofp i8 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_disjoint_align64_double_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_double_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lxsibzx f0, r3, r4
+; CHECK-P10-NEXT: xscvuxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align64_double_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: lxsibzx f0, r3, r4
+; CHECK-P9-NEXT: xscvuxddp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align64_double_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 4096
+ %conv = uitofp i8 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_cst_align16_double_uint8_t() {
+; CHECK-POSTP8-LABEL: ld_cst_align16_double_uint8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: li r3, 4080
+; CHECK-POSTP8-NEXT: lxsibzx f0, 0, r3
+; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align16_double_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lbz r3, 4080(0)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 4080 to i8*), align 16
+ %conv = uitofp i8 %0 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_cst_align32_double_uint8_t() {
+; CHECK-P10-LABEL: ld_cst_align32_double_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 9999900
+; CHECK-P10-NEXT: lxsibzx f0, 0, r3
+; CHECK-P10-NEXT: xscvuxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align32_double_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 152
+; CHECK-P9-NEXT: ori r3, r3, 38428
+; CHECK-P9-NEXT: lxsibzx f0, 0, r3
+; CHECK-P9-NEXT: xscvuxddp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align32_double_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 153
+; CHECK-P8-NEXT: lbz r3, -27108(r3)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 9999900 to i8*), align 4
+ %conv = uitofp i8 %0 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_cst_align64_double_uint8_t() {
+; CHECK-P10-LABEL: ld_cst_align64_double_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lxsibzx f0, 0, r3
+; CHECK-P10-NEXT: xscvuxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align64_double_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: lxsibzx f0, 0, r3
+; CHECK-P9-NEXT: xscvuxddp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align64_double_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: lbz r3, 0(r3)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 1000000000000 to i8*), align 4096
+ %conv = uitofp i8 %0 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_0_double_int8_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_0_double_int8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: lxsibzx v2, 0, r3
+; CHECK-POSTP8-NEXT: vextsb2d v2, v2
+; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_0_double_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lbz r3, 0(r3)
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = sitofp i8 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_align16_double_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-POSTP8-LABEL: ld_align16_double_int8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: addi r3, r3, 8
+; CHECK-POSTP8-NEXT: lxsibzx v2, 0, r3
+; CHECK-POSTP8-NEXT: vextsb2d v2, v2
+; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_align16_double_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lbz r3, 8(r3)
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = sitofp i8 %0 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_align32_double_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_double_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lxsibzx v2, r3, r4
+; CHECK-P10-NEXT: vextsb2d v2, v2
+; CHECK-P10-NEXT: xscvsxddp f1, v2
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_align32_double_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, 1525
+; CHECK-P9-NEXT: ori r4, r4, 56600
+; CHECK-P9-NEXT: lxsibzx v2, r3, r4
+; CHECK-P9-NEXT: vextsb2d v2, v2
+; CHECK-P9-NEXT: xscvsxddp f1, v2
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_align32_double_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, 1525
+; CHECK-P8-NEXT: ori r4, r4, 56600
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = sitofp i8 %0 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_align64_double_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_double_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lxsibzx v2, r3, r4
+; CHECK-P10-NEXT: vextsb2d v2, v2
+; CHECK-P10-NEXT: xscvsxddp f1, v2
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_align64_double_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: lxsibzx v2, r3, r4
+; CHECK-P9-NEXT: vextsb2d v2, v2
+; CHECK-P9-NEXT: xscvsxddp f1, v2
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_align64_double_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = sitofp i8 %0 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_reg_double_int8_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-POSTP8-LABEL: ld_reg_double_int8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: lxsibzx v2, r3, r4
+; CHECK-POSTP8-NEXT: vextsb2d v2, v2
+; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_reg_double_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = sitofp i8 %0 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_or_double_int8_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-POSTP8-LABEL: ld_or_double_int8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: or r3, r4, r3
+; CHECK-POSTP8-NEXT: lxsibzx v2, 0, r3
+; CHECK-POSTP8-NEXT: vextsb2d v2, v2
+; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_or_double_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: lbz r3, 0(r3)
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv1 = sitofp i8 %1 to double
+ ret double %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_not_disjoint16_double_int8_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_not_disjoint16_double_int8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 6
+; CHECK-POSTP8-NEXT: lxsibzx v2, 0, r3
+; CHECK-POSTP8-NEXT: vextsb2d v2, v2
+; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint16_double_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: lbz r3, 0(r3)
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = sitofp i8 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_disjoint_align16_double_int8_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_disjoint_align16_double_int8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-POSTP8-NEXT: ori r3, r3, 24
+; CHECK-POSTP8-NEXT: lxsibzx v2, 0, r3
+; CHECK-POSTP8-NEXT: vextsb2d v2, v2
+; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align16_double_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: lbz r3, 24(r3)
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 8
+ %conv = sitofp i8 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_not_disjoint32_double_int8_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_not_disjoint32_double_int8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 34463
+; CHECK-POSTP8-NEXT: oris r3, r3, 1
+; CHECK-POSTP8-NEXT: lxsibzx v2, 0, r3
+; CHECK-POSTP8-NEXT: vextsb2d v2, v2
+; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint32_double_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: lbz r3, 0(r3)
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = sitofp i8 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_disjoint_align32_double_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_double_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lxsibzx v2, r3, r4
+; CHECK-P10-NEXT: vextsb2d v2, v2
+; CHECK-P10-NEXT: xscvsxddp f1, v2
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_double_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lxsibzx v2, r3, r4
+; CHECK-P9-NEXT: vextsb2d v2, v2
+; CHECK-P9-NEXT: xscvsxddp f1, v2
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_double_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 16
+ %conv = sitofp i8 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_not_disjoint64_double_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_double_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lxsibzx v2, 0, r3
+; CHECK-P10-NEXT: vextsb2d v2, v2
+; CHECK-P10-NEXT: xscvsxddp f1, v2
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint64_double_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: lxsibzx v2, 0, r3
+; CHECK-P9-NEXT: vextsb2d v2, v2
+; CHECK-P9-NEXT: xscvsxddp f1, v2
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint64_double_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: lbz r3, 0(r3)
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = sitofp i8 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_disjoint_align64_double_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_double_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lxsibzx v2, r3, r4
+; CHECK-P10-NEXT: vextsb2d v2, v2
+; CHECK-P10-NEXT: xscvsxddp f1, v2
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align64_double_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: lxsibzx v2, r3, r4
+; CHECK-P9-NEXT: vextsb2d v2, v2
+; CHECK-P9-NEXT: xscvsxddp f1, v2
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align64_double_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 4096
+ %conv = sitofp i8 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_cst_align16_double_int8_t() {
+; CHECK-POSTP8-LABEL: ld_cst_align16_double_int8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: li r3, 4080
+; CHECK-POSTP8-NEXT: lxsibzx v2, 0, r3
+; CHECK-POSTP8-NEXT: vextsb2d v2, v2
+; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align16_double_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lbz r3, 4080(0)
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 4080 to i8*), align 16
+ %conv = sitofp i8 %0 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_cst_align32_double_int8_t() {
+; CHECK-P10-LABEL: ld_cst_align32_double_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 9999900
+; CHECK-P10-NEXT: lxsibzx v2, 0, r3
+; CHECK-P10-NEXT: vextsb2d v2, v2
+; CHECK-P10-NEXT: xscvsxddp f1, v2
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align32_double_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 152
+; CHECK-P9-NEXT: ori r3, r3, 38428
+; CHECK-P9-NEXT: lxsibzx v2, 0, r3
+; CHECK-P9-NEXT: vextsb2d v2, v2
+; CHECK-P9-NEXT: xscvsxddp f1, v2
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align32_double_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 153
+; CHECK-P8-NEXT: lbz r3, -27108(r3)
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 9999900 to i8*), align 4
+ %conv = sitofp i8 %0 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_cst_align64_double_int8_t() {
+; CHECK-P10-LABEL: ld_cst_align64_double_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lxsibzx v2, 0, r3
+; CHECK-P10-NEXT: vextsb2d v2, v2
+; CHECK-P10-NEXT: xscvsxddp f1, v2
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align64_double_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: lxsibzx v2, 0, r3
+; CHECK-P9-NEXT: vextsb2d v2, v2
+; CHECK-P9-NEXT: xscvsxddp f1, v2
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align64_double_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: lbz r3, 0(r3)
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 1000000000000 to i8*), align 4096
+ %conv = sitofp i8 %0 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_0_double_uint16_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_0_double_uint16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: lxsihzx f0, 0, r3
+; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_0_double_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lhz r3, 0(r3)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = uitofp i16 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_align16_double_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-POSTP8-LABEL: ld_align16_double_uint16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: addi r3, r3, 8
+; CHECK-POSTP8-NEXT: lxsihzx f0, 0, r3
+; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_align16_double_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lhz r3, 8(r3)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = uitofp i16 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_align32_double_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_double_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lxsihzx f0, r3, r4
+; CHECK-P10-NEXT: xscvuxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_align32_double_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, 1525
+; CHECK-P9-NEXT: ori r4, r4, 56600
+; CHECK-P9-NEXT: lxsihzx f0, r3, r4
+; CHECK-P9-NEXT: xscvuxddp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_align32_double_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, 1525
+; CHECK-P8-NEXT: ori r4, r4, 56600
+; CHECK-P8-NEXT: lhzx r3, r3, r4
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = uitofp i16 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_align64_double_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_double_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lxsihzx f0, r3, r4
+; CHECK-P10-NEXT: xscvuxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_align64_double_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: lxsihzx f0, r3, r4
+; CHECK-P9-NEXT: xscvuxddp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_align64_double_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: lhzx r3, r3, r4
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = uitofp i16 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_reg_double_uint16_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-POSTP8-LABEL: ld_reg_double_uint16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: lxsihzx f0, r3, r4
+; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_reg_double_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lhzx r3, r3, r4
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = uitofp i16 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_or_double_uint16_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-POSTP8-LABEL: ld_or_double_uint16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: or r3, r4, r3
+; CHECK-POSTP8-NEXT: lxsihzx f0, 0, r3
+; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_or_double_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: lhz r3, 0(r3)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv1 = uitofp i16 %1 to double
+ ret double %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_not_disjoint16_double_uint16_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_not_disjoint16_double_uint16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 6
+; CHECK-POSTP8-NEXT: lxsihzx f0, 0, r3
+; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint16_double_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: lhz r3, 0(r3)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = uitofp i16 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_disjoint_align16_double_uint16_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_disjoint_align16_double_uint16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-POSTP8-NEXT: ori r3, r3, 24
+; CHECK-POSTP8-NEXT: lxsihzx f0, 0, r3
+; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align16_double_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: lhz r3, 24(r3)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 8
+ %conv = uitofp i16 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_not_disjoint32_double_uint16_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_not_disjoint32_double_uint16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 34463
+; CHECK-POSTP8-NEXT: oris r3, r3, 1
+; CHECK-POSTP8-NEXT: lxsihzx f0, 0, r3
+; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint32_double_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: lhz r3, 0(r3)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = uitofp i16 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_disjoint_align32_double_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_double_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lxsihzx f0, r3, r4
+; CHECK-P10-NEXT: xscvuxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_double_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lxsihzx f0, r3, r4
+; CHECK-P9-NEXT: xscvuxddp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_double_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lhzx r3, r3, r4
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 16
+ %conv = uitofp i16 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_not_disjoint64_double_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_double_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lxsihzx f0, 0, r3
+; CHECK-P10-NEXT: xscvuxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint64_double_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: lxsihzx f0, 0, r3
+; CHECK-P9-NEXT: xscvuxddp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint64_double_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: lhz r3, 0(r3)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = uitofp i16 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_disjoint_align64_double_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_double_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lxsihzx f0, r3, r4
+; CHECK-P10-NEXT: xscvuxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align64_double_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: lxsihzx f0, r3, r4
+; CHECK-P9-NEXT: xscvuxddp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align64_double_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: lhzx r3, r3, r4
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 4096
+ %conv = uitofp i16 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_cst_align16_double_uint16_t() {
+; CHECK-POSTP8-LABEL: ld_cst_align16_double_uint16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: li r3, 4080
+; CHECK-POSTP8-NEXT: lxsihzx f0, 0, r3
+; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align16_double_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lhz r3, 4080(0)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 4080 to i16*), align 16
+ %conv = uitofp i16 %0 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_cst_align32_double_uint16_t() {
+; CHECK-P10-LABEL: ld_cst_align32_double_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 9999900
+; CHECK-P10-NEXT: lxsihzx f0, 0, r3
+; CHECK-P10-NEXT: xscvuxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align32_double_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 152
+; CHECK-P9-NEXT: ori r3, r3, 38428
+; CHECK-P9-NEXT: lxsihzx f0, 0, r3
+; CHECK-P9-NEXT: xscvuxddp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align32_double_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 153
+; CHECK-P8-NEXT: lhz r3, -27108(r3)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 9999900 to i16*), align 4
+ %conv = uitofp i16 %0 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_cst_align64_double_uint16_t() {
+; CHECK-P10-LABEL: ld_cst_align64_double_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lxsihzx f0, 0, r3
+; CHECK-P10-NEXT: xscvuxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align64_double_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: lxsihzx f0, 0, r3
+; CHECK-P9-NEXT: xscvuxddp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align64_double_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: lhz r3, 0(r3)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 1000000000000 to i16*), align 4096
+ %conv = uitofp i16 %0 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_0_double_int16_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_0_double_int16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: lxsihzx v2, 0, r3
+; CHECK-POSTP8-NEXT: vextsh2d v2, v2
+; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_0_double_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lha r3, 0(r3)
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sitofp i16 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_align16_double_int16_t(i8* nocapture readonly %ptr) {
+; CHECK-POSTP8-LABEL: ld_align16_double_int16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: addi r3, r3, 8
+; CHECK-POSTP8-NEXT: lxsihzx v2, 0, r3
+; CHECK-POSTP8-NEXT: vextsh2d v2, v2
+; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_align16_double_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lha r3, 8(r3)
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sitofp i16 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_align32_double_int16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_double_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lxsihzx v2, r3, r4
+; CHECK-P10-NEXT: vextsh2d v2, v2
+; CHECK-P10-NEXT: xscvsxddp f1, v2
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_align32_double_int16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, 1525
+; CHECK-P9-NEXT: ori r4, r4, 56600
+; CHECK-P9-NEXT: lxsihzx v2, r3, r4
+; CHECK-P9-NEXT: vextsh2d v2, v2
+; CHECK-P9-NEXT: xscvsxddp f1, v2
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_align32_double_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, 1525
+; CHECK-P8-NEXT: ori r4, r4, 56600
+; CHECK-P8-NEXT: lhax r3, r3, r4
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sitofp i16 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_align64_double_int16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_double_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lxsihzx v2, r3, r4
+; CHECK-P10-NEXT: vextsh2d v2, v2
+; CHECK-P10-NEXT: xscvsxddp f1, v2
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_align64_double_int16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: lxsihzx v2, r3, r4
+; CHECK-P9-NEXT: vextsh2d v2, v2
+; CHECK-P9-NEXT: xscvsxddp f1, v2
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_align64_double_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: lhax r3, r3, r4
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sitofp i16 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_reg_double_int16_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-POSTP8-LABEL: ld_reg_double_int16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: lxsihzx v2, r3, r4
+; CHECK-POSTP8-NEXT: vextsh2d v2, v2
+; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_reg_double_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lhax r3, r3, r4
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sitofp i16 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_or_double_int16_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-POSTP8-LABEL: ld_or_double_int16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: or r3, r4, r3
+; CHECK-POSTP8-NEXT: lxsihzx v2, 0, r3
+; CHECK-POSTP8-NEXT: vextsh2d v2, v2
+; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_or_double_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: lha r3, 0(r3)
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv1 = sitofp i16 %1 to double
+ ret double %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_not_disjoint16_double_int16_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_not_disjoint16_double_int16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 6
+; CHECK-POSTP8-NEXT: lxsihzx v2, 0, r3
+; CHECK-POSTP8-NEXT: vextsh2d v2, v2
+; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint16_double_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: lha r3, 0(r3)
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sitofp i16 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_disjoint_align16_double_int16_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_disjoint_align16_double_int16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-POSTP8-NEXT: ori r3, r3, 24
+; CHECK-POSTP8-NEXT: lxsihzx v2, 0, r3
+; CHECK-POSTP8-NEXT: vextsh2d v2, v2
+; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align16_double_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: lha r3, 24(r3)
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 8
+ %conv = sitofp i16 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_not_disjoint32_double_int16_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_not_disjoint32_double_int16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 34463
+; CHECK-POSTP8-NEXT: oris r3, r3, 1
+; CHECK-POSTP8-NEXT: lxsihzx v2, 0, r3
+; CHECK-POSTP8-NEXT: vextsh2d v2, v2
+; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint32_double_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: lha r3, 0(r3)
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sitofp i16 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_disjoint_align32_double_int16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_double_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lxsihzx v2, r3, r4
+; CHECK-P10-NEXT: vextsh2d v2, v2
+; CHECK-P10-NEXT: xscvsxddp f1, v2
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_double_int16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lxsihzx v2, r3, r4
+; CHECK-P9-NEXT: vextsh2d v2, v2
+; CHECK-P9-NEXT: xscvsxddp f1, v2
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_double_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lhax r3, r3, r4
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 16
+ %conv = sitofp i16 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_not_disjoint64_double_int16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_double_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lxsihzx v2, 0, r3
+; CHECK-P10-NEXT: vextsh2d v2, v2
+; CHECK-P10-NEXT: xscvsxddp f1, v2
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint64_double_int16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: lxsihzx v2, 0, r3
+; CHECK-P9-NEXT: vextsh2d v2, v2
+; CHECK-P9-NEXT: xscvsxddp f1, v2
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint64_double_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: lha r3, 0(r3)
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sitofp i16 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_disjoint_align64_double_int16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_double_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lxsihzx v2, r3, r4
+; CHECK-P10-NEXT: vextsh2d v2, v2
+; CHECK-P10-NEXT: xscvsxddp f1, v2
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align64_double_int16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: lxsihzx v2, r3, r4
+; CHECK-P9-NEXT: vextsh2d v2, v2
+; CHECK-P9-NEXT: xscvsxddp f1, v2
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align64_double_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: lhax r3, r3, r4
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 4096
+ %conv = sitofp i16 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_cst_align16_double_int16_t() {
+; CHECK-POSTP8-LABEL: ld_cst_align16_double_int16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: li r3, 4080
+; CHECK-POSTP8-NEXT: lxsihzx v2, 0, r3
+; CHECK-POSTP8-NEXT: vextsh2d v2, v2
+; CHECK-POSTP8-NEXT: xscvsxddp f1, v2
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align16_double_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lha r3, 4080(0)
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 4080 to i16*), align 16
+ %conv = sitofp i16 %0 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_cst_align32_double_int16_t() {
+; CHECK-P10-LABEL: ld_cst_align32_double_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 9999900
+; CHECK-P10-NEXT: lxsihzx v2, 0, r3
+; CHECK-P10-NEXT: vextsh2d v2, v2
+; CHECK-P10-NEXT: xscvsxddp f1, v2
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align32_double_int16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 152
+; CHECK-P9-NEXT: ori r3, r3, 38428
+; CHECK-P9-NEXT: lxsihzx v2, 0, r3
+; CHECK-P9-NEXT: vextsh2d v2, v2
+; CHECK-P9-NEXT: xscvsxddp f1, v2
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align32_double_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 153
+; CHECK-P8-NEXT: lha r3, -27108(r3)
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 9999900 to i16*), align 4
+ %conv = sitofp i16 %0 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_cst_align64_double_int16_t() {
+; CHECK-P10-LABEL: ld_cst_align64_double_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lxsihzx v2, 0, r3
+; CHECK-P10-NEXT: vextsh2d v2, v2
+; CHECK-P10-NEXT: xscvsxddp f1, v2
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align64_double_int16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: lxsihzx v2, 0, r3
+; CHECK-P9-NEXT: vextsh2d v2, v2
+; CHECK-P9-NEXT: xscvsxddp f1, v2
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align64_double_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: lha r3, 0(r3)
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 1000000000000 to i16*), align 4096
+ %conv = sitofp i16 %0 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_0_double_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_double_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfiwzx f0, 0, r3
+; CHECK-NEXT: xscvuxddp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = uitofp i32 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_align16_double_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_double_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addi r3, r3, 8
+; CHECK-NEXT: lfiwzx f0, 0, r3
+; CHECK-NEXT: xscvuxddp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = uitofp i32 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_align32_double_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_double_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lfiwzx f0, r3, r4
+; CHECK-P10-NEXT: xscvuxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_double_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lfiwzx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvuxddp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = uitofp i32 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_align64_double_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_double_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfiwzx f0, r3, r4
+; CHECK-P10-NEXT: xscvuxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_double_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfiwzx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvuxddp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = uitofp i32 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_reg_double_uint32_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_double_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfiwzx f0, r3, r4
+; CHECK-NEXT: xscvuxddp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = uitofp i32 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_or_double_uint32_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_double_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lfiwzx f0, 0, r3
+; CHECK-NEXT: xscvuxddp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv1 = uitofp i32 %1 to double
+ ret double %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_not_disjoint16_double_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_double_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lfiwzx f0, 0, r3
+; CHECK-NEXT: xscvuxddp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = uitofp i32 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_disjoint_align16_double_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_double_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: ori r3, r3, 24
+; CHECK-NEXT: lfiwzx f0, 0, r3
+; CHECK-NEXT: xscvuxddp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 8
+ %conv = uitofp i32 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_not_disjoint32_double_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_double_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lfiwzx f0, 0, r3
+; CHECK-NEXT: xscvuxddp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = uitofp i32 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_disjoint_align32_double_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_double_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lfiwzx f0, r3, r4
+; CHECK-P10-NEXT: xscvuxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_double_uint32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lfiwzx f0, r3, r4
+; CHECK-P9-NEXT: xscvuxddp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_double_uint32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lfiwzx f0, r3, r4
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 16
+ %conv = uitofp i32 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_not_disjoint64_double_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_double_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lfiwzx f0, 0, r3
+; CHECK-P10-NEXT: xscvuxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_double_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lfiwzx f0, 0, r3
+; CHECK-PREP10-NEXT: xscvuxddp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = uitofp i32 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_disjoint_align64_double_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_double_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfiwzx f0, r3, r4
+; CHECK-P10-NEXT: xscvuxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_double_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfiwzx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvuxddp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4096
+ %conv = uitofp i32 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_cst_align16_double_uint32_t() {
+; CHECK-LABEL: ld_cst_align16_double_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: li r3, 4080
+; CHECK-NEXT: lfiwzx f0, 0, r3
+; CHECK-NEXT: xscvuxddp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 4080 to i32*), align 16
+ %conv = uitofp i32 %0 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_cst_align32_double_uint32_t() {
+; CHECK-P10-LABEL: ld_cst_align32_double_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 9999900
+; CHECK-P10-NEXT: lfiwzx f0, 0, r3
+; CHECK-P10-NEXT: xscvuxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align32_double_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 152
+; CHECK-PREP10-NEXT: ori r3, r3, 38428
+; CHECK-PREP10-NEXT: lfiwzx f0, 0, r3
+; CHECK-PREP10-NEXT: xscvuxddp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 9999900 to i32*), align 4
+ %conv = uitofp i32 %0 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_cst_align64_double_uint32_t() {
+; CHECK-P10-LABEL: ld_cst_align64_double_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lfiwzx f0, 0, r3
+; CHECK-P10-NEXT: xscvuxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_double_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lfiwzx f0, 0, r3
+; CHECK-PREP10-NEXT: xscvuxddp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 1000000000000 to i32*), align 4096
+ %conv = uitofp i32 %0 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_0_double_int32_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_double_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfiwax f0, 0, r3
+; CHECK-NEXT: xscvsxddp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = sitofp i32 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_align16_double_int32_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_double_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addi r3, r3, 8
+; CHECK-NEXT: lfiwax f0, 0, r3
+; CHECK-NEXT: xscvsxddp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = sitofp i32 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_align32_double_int32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_double_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lfiwax f0, r3, r4
+; CHECK-P10-NEXT: xscvsxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_double_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lfiwax f0, r3, r4
+; CHECK-PREP10-NEXT: xscvsxddp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = sitofp i32 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_align64_double_int32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_double_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfiwax f0, r3, r4
+; CHECK-P10-NEXT: xscvsxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_double_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfiwax f0, r3, r4
+; CHECK-PREP10-NEXT: xscvsxddp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = sitofp i32 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_reg_double_int32_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_double_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfiwax f0, r3, r4
+; CHECK-NEXT: xscvsxddp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = sitofp i32 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_or_double_int32_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_double_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lfiwax f0, 0, r3
+; CHECK-NEXT: xscvsxddp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv1 = sitofp i32 %1 to double
+ ret double %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_not_disjoint16_double_int32_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_double_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lfiwax f0, 0, r3
+; CHECK-NEXT: xscvsxddp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = sitofp i32 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_disjoint_align16_double_int32_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_double_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: ori r3, r3, 24
+; CHECK-NEXT: lfiwax f0, 0, r3
+; CHECK-NEXT: xscvsxddp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 8
+ %conv = sitofp i32 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_not_disjoint32_double_int32_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_double_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lfiwax f0, 0, r3
+; CHECK-NEXT: xscvsxddp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = sitofp i32 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_disjoint_align32_double_int32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_double_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lfiwax f0, r3, r4
+; CHECK-P10-NEXT: xscvsxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_double_int32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lfiwax f0, r3, r4
+; CHECK-P9-NEXT: xscvsxddp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_double_int32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lfiwax f0, r3, r4
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 16
+ %conv = sitofp i32 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_not_disjoint64_double_int32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_double_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lfiwax f0, 0, r3
+; CHECK-P10-NEXT: xscvsxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_double_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lfiwax f0, 0, r3
+; CHECK-PREP10-NEXT: xscvsxddp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = sitofp i32 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_disjoint_align64_double_int32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_double_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfiwax f0, r3, r4
+; CHECK-P10-NEXT: xscvsxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_double_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfiwax f0, r3, r4
+; CHECK-PREP10-NEXT: xscvsxddp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4096
+ %conv = sitofp i32 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_cst_align16_double_int32_t() {
+; CHECK-LABEL: ld_cst_align16_double_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: li r3, 4080
+; CHECK-NEXT: lfiwax f0, 0, r3
+; CHECK-NEXT: xscvsxddp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 4080 to i32*), align 16
+ %conv = sitofp i32 %0 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_cst_align32_double_int32_t() {
+; CHECK-P10-LABEL: ld_cst_align32_double_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 9999900
+; CHECK-P10-NEXT: lfiwax f0, 0, r3
+; CHECK-P10-NEXT: xscvsxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align32_double_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 152
+; CHECK-PREP10-NEXT: ori r3, r3, 38428
+; CHECK-PREP10-NEXT: lfiwax f0, 0, r3
+; CHECK-PREP10-NEXT: xscvsxddp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 9999900 to i32*), align 4
+ %conv = sitofp i32 %0 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_cst_align64_double_int32_t() {
+; CHECK-P10-LABEL: ld_cst_align64_double_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lfiwax f0, 0, r3
+; CHECK-P10-NEXT: xscvsxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_double_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lfiwax f0, 0, r3
+; CHECK-PREP10-NEXT: xscvsxddp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 1000000000000 to i32*), align 4096
+ %conv = sitofp i32 %0 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_0_double_uint64_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_0_double_uint64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: lfd f0, 0(r3)
+; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_0_double_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = uitofp i64 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_align16_double_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_double_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfd f0, 8(r3)
+; CHECK-NEXT: xscvuxddp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = uitofp i64 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_align32_double_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_double_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvuxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_double_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvuxddp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = uitofp i64 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_align64_double_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_double_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvuxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_double_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvuxddp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = uitofp i64 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_reg_double_uint64_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_double_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfdx f0, r3, r4
+; CHECK-NEXT: xscvuxddp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = uitofp i64 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_or_double_uint64_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-POSTP8-LABEL: ld_or_double_uint64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: or r3, r4, r3
+; CHECK-POSTP8-NEXT: lfd f0, 0(r3)
+; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_or_double_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv1 = uitofp i64 %1 to double
+ ret double %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_not_disjoint16_double_uint64_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_not_disjoint16_double_uint64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 6
+; CHECK-POSTP8-NEXT: lfd f0, 0(r3)
+; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint16_double_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = uitofp i64 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_disjoint_align16_double_uint64_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_disjoint_align16_double_uint64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-POSTP8-NEXT: lfd f0, 24(r3)
+; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align16_double_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = uitofp i64 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_not_disjoint32_double_uint64_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_not_disjoint32_double_uint64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 34463
+; CHECK-POSTP8-NEXT: oris r3, r3, 1
+; CHECK-POSTP8-NEXT: lfd f0, 0(r3)
+; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint32_double_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = uitofp i64 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_disjoint_align32_double_uint64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_double_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvuxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_double_uint64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lfdx f0, r3, r4
+; CHECK-P9-NEXT: xscvuxddp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_double_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lfdx f0, r3, r4
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 16
+ %conv = uitofp i64 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_not_disjoint64_double_uint64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_double_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvuxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint64_double_uint64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvuxddp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint64_double_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = uitofp i64 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_disjoint_align64_double_uint64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_double_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvuxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_double_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvuxddp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 4096
+ %conv = uitofp i64 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_cst_align16_double_uint64_t() {
+; CHECK-LABEL: ld_cst_align16_double_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfd f0, 4080(0)
+; CHECK-NEXT: xscvuxddp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 4080 to i64*), align 16
+ %conv = uitofp i64 %0 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_cst_align32_double_uint64_t() {
+; CHECK-POSTP8-LABEL: ld_cst_align32_double_uint64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: lis r3, 153
+; CHECK-POSTP8-NEXT: lfd f0, -27108(r3)
+; CHECK-POSTP8-NEXT: xscvuxddp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align32_double_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 9999900 to i64*), align 8
+ %conv = uitofp i64 %0 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_cst_align64_double_uint64_t() {
+; CHECK-P10-LABEL: ld_cst_align64_double_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvuxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align64_double_uint64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvuxddp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align64_double_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvuxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 1000000000000 to i64*), align 4096
+ %conv = uitofp i64 %0 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_0_double_int64_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_0_double_int64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: lfd f0, 0(r3)
+; CHECK-POSTP8-NEXT: xscvsxddp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_0_double_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = sitofp i64 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_align16_double_int64_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_double_int64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfd f0, 8(r3)
+; CHECK-NEXT: xscvsxddp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = sitofp i64 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_align32_double_int64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_double_int64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvsxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_double_int64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvsxddp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = sitofp i64 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_align64_double_int64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_double_int64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvsxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_double_int64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvsxddp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = sitofp i64 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_reg_double_int64_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_double_int64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfdx f0, r3, r4
+; CHECK-NEXT: xscvsxddp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = sitofp i64 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_or_double_int64_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-POSTP8-LABEL: ld_or_double_int64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: or r3, r4, r3
+; CHECK-POSTP8-NEXT: lfd f0, 0(r3)
+; CHECK-POSTP8-NEXT: xscvsxddp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_or_double_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv1 = sitofp i64 %1 to double
+ ret double %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_not_disjoint16_double_int64_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_not_disjoint16_double_int64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 6
+; CHECK-POSTP8-NEXT: lfd f0, 0(r3)
+; CHECK-POSTP8-NEXT: xscvsxddp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint16_double_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = sitofp i64 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_disjoint_align16_double_int64_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_disjoint_align16_double_int64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-POSTP8-NEXT: lfd f0, 24(r3)
+; CHECK-POSTP8-NEXT: xscvsxddp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align16_double_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = sitofp i64 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_not_disjoint32_double_int64_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_not_disjoint32_double_int64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 34463
+; CHECK-POSTP8-NEXT: oris r3, r3, 1
+; CHECK-POSTP8-NEXT: lfd f0, 0(r3)
+; CHECK-POSTP8-NEXT: xscvsxddp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint32_double_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = sitofp i64 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_disjoint_align32_double_int64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_double_int64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvsxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_double_int64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lfdx f0, r3, r4
+; CHECK-P9-NEXT: xscvsxddp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_double_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lfdx f0, r3, r4
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 16
+ %conv = sitofp i64 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_not_disjoint64_double_int64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_double_int64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvsxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint64_double_int64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvsxddp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint64_double_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = sitofp i64 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_disjoint_align64_double_int64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_double_int64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvsxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_double_int64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvsxddp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 4096
+ %conv = sitofp i64 %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_cst_align16_double_int64_t() {
+; CHECK-LABEL: ld_cst_align16_double_int64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfd f0, 4080(0)
+; CHECK-NEXT: xscvsxddp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 4080 to i64*), align 16
+ %conv = sitofp i64 %0 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_cst_align32_double_int64_t() {
+; CHECK-POSTP8-LABEL: ld_cst_align32_double_int64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: lis r3, 153
+; CHECK-POSTP8-NEXT: lfd f0, -27108(r3)
+; CHECK-POSTP8-NEXT: xscvsxddp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align32_double_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 9999900 to i64*), align 8
+ %conv = sitofp i64 %0 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_cst_align64_double_int64_t() {
+; CHECK-P10-LABEL: ld_cst_align64_double_int64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvsxddp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align64_double_int64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvsxddp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align64_double_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvsxddp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 1000000000000 to i64*), align 4096
+ %conv = sitofp i64 %0 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_0_double_float(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_0_double_float:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: lfs f1, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_0_double_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lfsx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fpext float %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_align16_double_float(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_double_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfs f1, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fpext float %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_align32_double_float(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_double_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lfsx f1, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_double_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lfsx f1, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fpext float %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_align64_double_float(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_double_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfsx f1, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_double_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfsx f1, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fpext float %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_reg_double_float(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_double_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfsx f1, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fpext float %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_or_double_float(i64 %ptr, i8 zeroext %off) {
+; CHECK-POSTP8-LABEL: ld_or_double_float:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: or r3, r4, r3
+; CHECK-POSTP8-NEXT: lfs f1, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_or_double_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: lfsx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv1 = fpext float %1 to double
+ ret double %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_not_disjoint16_double_float(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_not_disjoint16_double_float:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 6
+; CHECK-POSTP8-NEXT: lfs f1, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint16_double_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: lfsx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv = fpext float %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_disjoint_align16_double_float(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_disjoint_align16_double_float:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-POSTP8-NEXT: lfs f1, 24(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align16_double_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: lfsx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 8
+ %conv = fpext float %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_not_disjoint32_double_float(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_not_disjoint32_double_float:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 34463
+; CHECK-POSTP8-NEXT: oris r3, r3, 1
+; CHECK-POSTP8-NEXT: lfs f1, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint32_double_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: lfsx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv = fpext float %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_disjoint_align32_double_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_double_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lfsx f1, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_double_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lfsx f1, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_double_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lfsx f1, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 16
+ %conv = fpext float %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_not_disjoint64_double_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_double_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lfs f1, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint64_double_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: lfs f1, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint64_double_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: lfsx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv = fpext float %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_disjoint_align64_double_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_double_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfsx f1, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_double_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfsx f1, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4096
+ %conv = fpext float %1 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_cst_align16_double_float() {
+; CHECK-LABEL: ld_cst_align16_double_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfs f1, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %0 = load float, float* inttoptr (i64 4080 to float*), align 16
+ %conv = fpext float %0 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_cst_align32_double_float() {
+; CHECK-POSTP8-LABEL: ld_cst_align32_double_float:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: lis r3, 153
+; CHECK-POSTP8-NEXT: lfs f1, -27108(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align32_double_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: lfsx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load float, float* inttoptr (i64 9999900 to float*), align 4
+ %conv = fpext float %0 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_cst_align64_double_float() {
+; CHECK-P10-LABEL: ld_cst_align64_double_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lfs f1, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align64_double_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: lfs f1, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align64_double_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: lfsx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load float, float* inttoptr (i64 1000000000000 to float*), align 4096
+ %conv = fpext float %0 to double
+ ret double %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_0_double_double(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_0_double_double:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: lfd f1, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_0_double_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lfdx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to double*
+ %1 = load double, double* %0, align 8
+ ret double %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_align16_double_double(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_double_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfd f1, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ ret double %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_align32_double_double(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_double_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lfdx f1, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_double_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lfdx f1, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ ret double %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_align64_double_double(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_double_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfdx f1, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_double_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfdx f1, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ ret double %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_reg_double_double(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_double_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfdx f1, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ ret double %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_or_double_double(i64 %ptr, i8 zeroext %off) {
+; CHECK-POSTP8-LABEL: ld_or_double_double:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: or r3, r4, r3
+; CHECK-POSTP8-NEXT: lfd f1, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_or_double_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: lfdx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ ret double %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_not_disjoint16_double_double(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_not_disjoint16_double_double:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 6
+; CHECK-POSTP8-NEXT: lfd f1, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint16_double_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: lfdx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ ret double %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_disjoint_align16_double_double(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_disjoint_align16_double_double:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-POSTP8-NEXT: lfd f1, 24(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align16_double_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: lfdx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ ret double %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_not_disjoint32_double_double(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_not_disjoint32_double_double:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 34463
+; CHECK-POSTP8-NEXT: oris r3, r3, 1
+; CHECK-POSTP8-NEXT: lfd f1, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint32_double_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: lfdx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ ret double %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_disjoint_align32_double_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_double_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lfdx f1, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_double_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lfdx f1, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_double_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lfdx f1, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 16
+ ret double %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_not_disjoint64_double_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_double_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lfd f1, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint64_double_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: lfd f1, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint64_double_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: lfdx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ ret double %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_disjoint_align64_double_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_double_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfdx f1, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_double_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfdx f1, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 4096
+ ret double %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_cst_align16_double_double() {
+; CHECK-LABEL: ld_cst_align16_double_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfd f1, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %0 = load double, double* inttoptr (i64 4080 to double*), align 16
+ ret double %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_cst_align32_double_double() {
+; CHECK-POSTP8-LABEL: ld_cst_align32_double_double:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: lis r3, 153
+; CHECK-POSTP8-NEXT: lfd f1, -27108(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align32_double_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: lfdx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load double, double* inttoptr (i64 9999900 to double*), align 8
+ ret double %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local double @ld_cst_align64_double_double() {
+; CHECK-P10-LABEL: ld_cst_align64_double_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lfd f1, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align64_double_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: lfd f1, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align64_double_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: lfdx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load double, double* inttoptr (i64 1000000000000 to double*), align 4096
+ ret double %0
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_double_uint8_t(i64 %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_0_double_uint8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
+; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_0_double_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: stb r4, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui double %str to i8
+ %0 = inttoptr i64 %ptr to i8*
+ store i8 %conv, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_double_uint8_t(i8* nocapture %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_align16_double_uint8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
+; CHECK-POSTP8-NEXT: addi r3, r3, 8
+; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align16_double_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: stb r4, 8(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui double %str to i8
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ store i8 %conv, i8* %add.ptr, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_double_uint8_t(i8* nocapture %ptr, double %str) {
+; CHECK-P10-LABEL: st_align32_double_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: stxsibx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align32_double_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpuxws f0, f1
+; CHECK-P9-NEXT: lis r4, 1525
+; CHECK-P9-NEXT: ori r4, r4, 56600
+; CHECK-P9-NEXT: stxsibx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align32_double_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, 1525
+; CHECK-P8-NEXT: ori r4, r4, 56600
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: stbx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui double %str to i8
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ store i8 %conv, i8* %add.ptr, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_double_uint8_t(i8* nocapture %ptr, double %str) {
+; CHECK-P10-LABEL: st_align64_double_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stxsibx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align64_double_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpuxws f0, f1
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stxsibx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align64_double_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: stbx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui double %str to i8
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ store i8 %conv, i8* %add.ptr, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_double_uint8_t(i8* nocapture %ptr, i64 %off, double %str) {
+; CHECK-POSTP8-LABEL: st_reg_double_uint8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
+; CHECK-POSTP8-NEXT: stxsibx f0, r3, r4
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_reg_double_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: stbx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui double %str to i8
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ store i8 %conv, i8* %add.ptr, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_double_uint8_t(i64 %ptr, i8 zeroext %off, double %str) {
+; CHECK-POSTP8-LABEL: st_or1_double_uint8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
+; CHECK-POSTP8-NEXT: or r3, r4, r3
+; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_or1_double_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: stb r5, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui double %str to i8
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_double_uint8_t(i64 %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_not_disjoint16_double_uint8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
+; CHECK-POSTP8-NEXT: ori r3, r3, 6
+; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint16_double_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: stb r4, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui double %str to i8
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_double_uint8_t(i64 %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_disjoint_align16_double_uint8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
+; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-POSTP8-NEXT: ori r3, r3, 24
+; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align16_double_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: stb r4, 24(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = fptoui double %str to i8
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_double_uint8_t(i64 %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_not_disjoint32_double_uint8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
+; CHECK-POSTP8-NEXT: ori r3, r3, 34463
+; CHECK-POSTP8-NEXT: oris r3, r3, 1
+; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint32_double_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: stb r4, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui double %str to i8
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_double_uint8_t(i64 %ptr, double %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_double_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: stxsibx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_double_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpuxws f0, f1
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stxsibx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_double_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r6, 41712
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: stbx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = fptoui double %str to i8
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_double_uint8_t(i64 %ptr, double %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_double_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stxsibx f0, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_double_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: xscvdpuxws f0, f1
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stxsibx f0, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint64_double_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: stb r5, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui double %str to i8
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_double_uint8_t(i64 %ptr, double %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_double_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stxsibx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align64_double_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpuxws f0, f1
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stxsibx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align64_double_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: stbx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = fptoui double %str to i8
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_double_uint8_t(double %str) {
+; CHECK-POSTP8-LABEL: st_cst_align16_double_uint8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
+; CHECK-POSTP8-NEXT: li r3, 4080
+; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align16_double_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: stb r3, 4080(0)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui double %str to i8
+ store i8 %conv, i8* inttoptr (i64 4080 to i8*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_double_uint8_t(double %str) {
+; CHECK-P10-LABEL: st_cst_align32_double_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: pli r3, 9999900
+; CHECK-P10-NEXT: stxsibx f0, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align32_double_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpuxws f0, f1
+; CHECK-P9-NEXT: lis r3, 152
+; CHECK-P9-NEXT: ori r3, r3, 38428
+; CHECK-P9-NEXT: stxsibx f0, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align32_double_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, 153
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: stb r3, -27108(r4)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui double %str to i8
+ store i8 %conv, i8* inttoptr (i64 9999900 to i8*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_double_uint8_t(double %str) {
+; CHECK-P10-LABEL: st_cst_align64_double_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: stxsibx f0, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align64_double_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpuxws f0, f1
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: stxsibx f0, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align64_double_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: stb r4, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui double %str to i8
+ store i8 %conv, i8* inttoptr (i64 1000000000000 to i8*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_double_int8_t(i64 %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_0_double_int8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
+; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_0_double_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: stb r4, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi double %str to i8
+ %0 = inttoptr i64 %ptr to i8*
+ store i8 %conv, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_double_int8_t(i8* nocapture %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_align16_double_int8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
+; CHECK-POSTP8-NEXT: addi r3, r3, 8
+; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align16_double_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: stb r4, 8(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi double %str to i8
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ store i8 %conv, i8* %add.ptr, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_double_int8_t(i8* nocapture %ptr, double %str) {
+; CHECK-P10-LABEL: st_align32_double_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: stxsibx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align32_double_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpsxws f0, f1
+; CHECK-P9-NEXT: lis r4, 1525
+; CHECK-P9-NEXT: ori r4, r4, 56600
+; CHECK-P9-NEXT: stxsibx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align32_double_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, 1525
+; CHECK-P8-NEXT: ori r4, r4, 56600
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: stbx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi double %str to i8
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ store i8 %conv, i8* %add.ptr, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_double_int8_t(i8* nocapture %ptr, double %str) {
+; CHECK-P10-LABEL: st_align64_double_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stxsibx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align64_double_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpsxws f0, f1
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stxsibx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align64_double_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: stbx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi double %str to i8
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ store i8 %conv, i8* %add.ptr, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_double_int8_t(i8* nocapture %ptr, i64 %off, double %str) {
+; CHECK-POSTP8-LABEL: st_reg_double_int8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
+; CHECK-POSTP8-NEXT: stxsibx f0, r3, r4
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_reg_double_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: stbx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi double %str to i8
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ store i8 %conv, i8* %add.ptr, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_double_int8_t(i64 %ptr, i8 zeroext %off, double %str) {
+; CHECK-POSTP8-LABEL: st_or1_double_int8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
+; CHECK-POSTP8-NEXT: or r3, r4, r3
+; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_or1_double_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: stb r5, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi double %str to i8
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_double_int8_t(i64 %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_not_disjoint16_double_int8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
+; CHECK-POSTP8-NEXT: ori r3, r3, 6
+; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint16_double_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: stb r4, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi double %str to i8
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_double_int8_t(i64 %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_disjoint_align16_double_int8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
+; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-POSTP8-NEXT: ori r3, r3, 24
+; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align16_double_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: stb r4, 24(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = fptosi double %str to i8
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_double_int8_t(i64 %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_not_disjoint32_double_int8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
+; CHECK-POSTP8-NEXT: ori r3, r3, 34463
+; CHECK-POSTP8-NEXT: oris r3, r3, 1
+; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint32_double_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: stb r4, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi double %str to i8
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_double_int8_t(i64 %ptr, double %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_double_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: stxsibx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_double_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpsxws f0, f1
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stxsibx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_double_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r6, 41712
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: stbx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = fptosi double %str to i8
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_double_int8_t(i64 %ptr, double %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_double_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stxsibx f0, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_double_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: xscvdpsxws f0, f1
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stxsibx f0, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint64_double_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: stb r5, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi double %str to i8
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_double_int8_t(i64 %ptr, double %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_double_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stxsibx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align64_double_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpsxws f0, f1
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stxsibx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align64_double_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: stbx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = fptosi double %str to i8
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_double_int8_t(double %str) {
+; CHECK-POSTP8-LABEL: st_cst_align16_double_int8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
+; CHECK-POSTP8-NEXT: li r3, 4080
+; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align16_double_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: stb r3, 4080(0)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi double %str to i8
+ store i8 %conv, i8* inttoptr (i64 4080 to i8*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_double_int8_t(double %str) {
+; CHECK-P10-LABEL: st_cst_align32_double_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: pli r3, 9999900
+; CHECK-P10-NEXT: stxsibx f0, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align32_double_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpsxws f0, f1
+; CHECK-P9-NEXT: lis r3, 152
+; CHECK-P9-NEXT: ori r3, r3, 38428
+; CHECK-P9-NEXT: stxsibx f0, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align32_double_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, 153
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: stb r3, -27108(r4)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi double %str to i8
+ store i8 %conv, i8* inttoptr (i64 9999900 to i8*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_double_int8_t(double %str) {
+; CHECK-P10-LABEL: st_cst_align64_double_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: stxsibx f0, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align64_double_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpsxws f0, f1
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: stxsibx f0, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align64_double_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: stb r4, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi double %str to i8
+ store i8 %conv, i8* inttoptr (i64 1000000000000 to i8*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_double_uint16_t(i64 %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_0_double_uint16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
+; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_0_double_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: sth r4, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui double %str to i16
+ %0 = inttoptr i64 %ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_double_uint16_t(i8* nocapture %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_align16_double_uint16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
+; CHECK-POSTP8-NEXT: addi r3, r3, 8
+; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align16_double_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: sth r4, 8(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui double %str to i16
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_double_uint16_t(i8* nocapture %ptr, double %str) {
+; CHECK-P10-LABEL: st_align32_double_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: stxsihx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align32_double_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpuxws f0, f1
+; CHECK-P9-NEXT: lis r4, 1525
+; CHECK-P9-NEXT: ori r4, r4, 56600
+; CHECK-P9-NEXT: stxsihx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align32_double_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, 1525
+; CHECK-P8-NEXT: ori r4, r4, 56600
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: sthx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui double %str to i16
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_double_uint16_t(i8* nocapture %ptr, double %str) {
+; CHECK-P10-LABEL: st_align64_double_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stxsihx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align64_double_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpuxws f0, f1
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stxsihx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align64_double_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: sthx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui double %str to i16
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_double_uint16_t(i8* nocapture %ptr, i64 %off, double %str) {
+; CHECK-POSTP8-LABEL: st_reg_double_uint16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
+; CHECK-POSTP8-NEXT: stxsihx f0, r3, r4
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_reg_double_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: sthx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui double %str to i16
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_double_uint16_t(i64 %ptr, i8 zeroext %off, double %str) {
+; CHECK-POSTP8-LABEL: st_or1_double_uint16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
+; CHECK-POSTP8-NEXT: or r3, r4, r3
+; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_or1_double_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: sth r5, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui double %str to i16
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_double_uint16_t(i64 %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_not_disjoint16_double_uint16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
+; CHECK-POSTP8-NEXT: ori r3, r3, 6
+; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint16_double_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: sth r4, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui double %str to i16
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_double_uint16_t(i64 %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_disjoint_align16_double_uint16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
+; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-POSTP8-NEXT: ori r3, r3, 24
+; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align16_double_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: sth r4, 24(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = fptoui double %str to i16
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_double_uint16_t(i64 %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_not_disjoint32_double_uint16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
+; CHECK-POSTP8-NEXT: ori r3, r3, 34463
+; CHECK-POSTP8-NEXT: oris r3, r3, 1
+; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint32_double_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: sth r4, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui double %str to i16
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_double_uint16_t(i64 %ptr, double %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_double_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: stxsihx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_double_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpuxws f0, f1
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stxsihx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_double_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r6, 41712
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: sthx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = fptoui double %str to i16
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_double_uint16_t(i64 %ptr, double %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_double_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stxsihx f0, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_double_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: xscvdpuxws f0, f1
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stxsihx f0, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint64_double_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: sth r5, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui double %str to i16
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_double_uint16_t(i64 %ptr, double %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_double_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stxsihx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align64_double_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpuxws f0, f1
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stxsihx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align64_double_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: sthx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = fptoui double %str to i16
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_double_uint16_t(double %str) {
+; CHECK-POSTP8-LABEL: st_cst_align16_double_uint16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
+; CHECK-POSTP8-NEXT: li r3, 4080
+; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align16_double_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: sth r3, 4080(0)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui double %str to i16
+ store i16 %conv, i16* inttoptr (i64 4080 to i16*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_double_uint16_t(double %str) {
+; CHECK-P10-LABEL: st_cst_align32_double_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: pli r3, 9999900
+; CHECK-P10-NEXT: stxsihx f0, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align32_double_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpuxws f0, f1
+; CHECK-P9-NEXT: lis r3, 152
+; CHECK-P9-NEXT: ori r3, r3, 38428
+; CHECK-P9-NEXT: stxsihx f0, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align32_double_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, 153
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: sth r3, -27108(r4)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui double %str to i16
+ store i16 %conv, i16* inttoptr (i64 9999900 to i16*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_double_uint16_t(double %str) {
+; CHECK-P10-LABEL: st_cst_align64_double_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: stxsihx f0, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align64_double_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpuxws f0, f1
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: stxsihx f0, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align64_double_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: sth r4, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui double %str to i16
+ store i16 %conv, i16* inttoptr (i64 1000000000000 to i16*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_double_int16_t(i64 %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_0_double_int16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
+; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_0_double_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: sth r4, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi double %str to i16
+ %0 = inttoptr i64 %ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_double_int16_t(i8* nocapture %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_align16_double_int16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
+; CHECK-POSTP8-NEXT: addi r3, r3, 8
+; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align16_double_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: sth r4, 8(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi double %str to i16
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_double_int16_t(i8* nocapture %ptr, double %str) {
+; CHECK-P10-LABEL: st_align32_double_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: stxsihx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align32_double_int16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpsxws f0, f1
+; CHECK-P9-NEXT: lis r4, 1525
+; CHECK-P9-NEXT: ori r4, r4, 56600
+; CHECK-P9-NEXT: stxsihx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align32_double_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, 1525
+; CHECK-P8-NEXT: ori r4, r4, 56600
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: sthx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi double %str to i16
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_double_int16_t(i8* nocapture %ptr, double %str) {
+; CHECK-P10-LABEL: st_align64_double_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stxsihx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align64_double_int16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpsxws f0, f1
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stxsihx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align64_double_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: sthx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi double %str to i16
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_double_int16_t(i8* nocapture %ptr, i64 %off, double %str) {
+; CHECK-POSTP8-LABEL: st_reg_double_int16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
+; CHECK-POSTP8-NEXT: stxsihx f0, r3, r4
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_reg_double_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: sthx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi double %str to i16
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_double_int16_t(i64 %ptr, i8 zeroext %off, double %str) {
+; CHECK-POSTP8-LABEL: st_or1_double_int16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
+; CHECK-POSTP8-NEXT: or r3, r4, r3
+; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_or1_double_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: sth r5, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi double %str to i16
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_double_int16_t(i64 %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_not_disjoint16_double_int16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
+; CHECK-POSTP8-NEXT: ori r3, r3, 6
+; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint16_double_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: sth r4, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi double %str to i16
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_double_int16_t(i64 %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_disjoint_align16_double_int16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
+; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-POSTP8-NEXT: ori r3, r3, 24
+; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align16_double_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: sth r4, 24(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = fptosi double %str to i16
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_double_int16_t(i64 %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_not_disjoint32_double_int16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
+; CHECK-POSTP8-NEXT: ori r3, r3, 34463
+; CHECK-POSTP8-NEXT: oris r3, r3, 1
+; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint32_double_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: sth r4, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi double %str to i16
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_double_int16_t(i64 %ptr, double %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_double_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: stxsihx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_double_int16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpsxws f0, f1
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stxsihx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_double_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r6, 41712
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: sthx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = fptosi double %str to i16
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_double_int16_t(i64 %ptr, double %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_double_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stxsihx f0, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_double_int16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: xscvdpsxws f0, f1
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stxsihx f0, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint64_double_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: sth r5, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi double %str to i16
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_double_int16_t(i64 %ptr, double %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_double_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stxsihx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align64_double_int16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpsxws f0, f1
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stxsihx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align64_double_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: sthx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = fptosi double %str to i16
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_double_int16_t(double %str) {
+; CHECK-POSTP8-LABEL: st_cst_align16_double_int16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
+; CHECK-POSTP8-NEXT: li r3, 4080
+; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align16_double_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: sth r3, 4080(0)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi double %str to i16
+ store i16 %conv, i16* inttoptr (i64 4080 to i16*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_double_int16_t(double %str) {
+; CHECK-P10-LABEL: st_cst_align32_double_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: pli r3, 9999900
+; CHECK-P10-NEXT: stxsihx f0, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align32_double_int16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpsxws f0, f1
+; CHECK-P9-NEXT: lis r3, 152
+; CHECK-P9-NEXT: ori r3, r3, 38428
+; CHECK-P9-NEXT: stxsihx f0, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align32_double_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, 153
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: sth r3, -27108(r4)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi double %str to i16
+ store i16 %conv, i16* inttoptr (i64 9999900 to i16*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_double_int16_t(double %str) {
+; CHECK-P10-LABEL: st_cst_align64_double_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: stxsihx f0, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align64_double_int16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpsxws f0, f1
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: stxsihx f0, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align64_double_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: sth r4, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi double %str to i16
+ store i16 %conv, i16* inttoptr (i64 1000000000000 to i16*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_double_uint32_t(i64 %ptr, double %str) {
+; CHECK-LABEL: st_0_double_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xscvdpuxws f0, f1
+; CHECK-NEXT: stfiwx f0, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = fptoui double %str to i32
+ %0 = inttoptr i64 %ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_double_uint32_t(i8* nocapture %ptr, double %str) {
+; CHECK-LABEL: st_align16_double_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xscvdpuxws f0, f1
+; CHECK-NEXT: addi r3, r3, 8
+; CHECK-NEXT: stfiwx f0, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = fptoui double %str to i32
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_double_uint32_t(i8* nocapture %ptr, double %str) {
+; CHECK-P10-LABEL: st_align32_double_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: stfiwx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_double_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: xscvdpuxws f0, f1
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: stfiwx f0, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = fptoui double %str to i32
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_double_uint32_t(i8* nocapture %ptr, double %str) {
+; CHECK-P10-LABEL: st_align64_double_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stfiwx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_double_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: xscvdpuxws f0, f1
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stfiwx f0, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = fptoui double %str to i32
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_double_uint32_t(i8* nocapture %ptr, i64 %off, double %str) {
+; CHECK-LABEL: st_reg_double_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xscvdpuxws f0, f1
+; CHECK-NEXT: stfiwx f0, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = fptoui double %str to i32
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_double_uint32_t(i64 %ptr, i8 zeroext %off, double %str) {
+; CHECK-LABEL: st_or1_double_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xscvdpuxws f0, f1
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: stfiwx f0, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = fptoui double %str to i32
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_double_uint32_t(i64 %ptr, double %str) {
+; CHECK-LABEL: st_not_disjoint16_double_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xscvdpuxws f0, f1
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: stfiwx f0, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = fptoui double %str to i32
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_double_uint32_t(i64 %ptr, double %str) {
+; CHECK-LABEL: st_disjoint_align16_double_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xscvdpuxws f0, f1
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: ori r3, r3, 24
+; CHECK-NEXT: stfiwx f0, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = fptoui double %str to i32
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_double_uint32_t(i64 %ptr, double %str) {
+; CHECK-LABEL: st_not_disjoint32_double_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xscvdpuxws f0, f1
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: stfiwx f0, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = fptoui double %str to i32
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_double_uint32_t(i64 %ptr, double %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_double_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: stfiwx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_double_uint32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpuxws f0, f1
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stfiwx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_double_uint32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpuxws f0, f1
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: stfiwx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = fptoui double %str to i32
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_double_uint32_t(i64 %ptr, double %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_double_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stfiwx f0, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_double_uint32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: xscvdpuxws f0, f1
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stfiwx f0, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint64_double_uint32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpuxws f0, f1
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: stfiwx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui double %str to i32
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_double_uint32_t(i64 %ptr, double %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_double_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stfiwx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_double_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: xscvdpuxws f0, f1
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stfiwx f0, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = fptoui double %str to i32
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_double_uint32_t(double %str) {
+; CHECK-LABEL: st_cst_align16_double_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xscvdpuxws f0, f1
+; CHECK-NEXT: li r3, 4080
+; CHECK-NEXT: stfiwx f0, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = fptoui double %str to i32
+ store i32 %conv, i32* inttoptr (i64 4080 to i32*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_double_uint32_t(double %str) {
+; CHECK-P10-LABEL: st_cst_align32_double_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: pli r3, 9999900
+; CHECK-P10-NEXT: stfiwx f0, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align32_double_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: xscvdpuxws f0, f1
+; CHECK-PREP10-NEXT: lis r3, 152
+; CHECK-PREP10-NEXT: ori r3, r3, 38428
+; CHECK-PREP10-NEXT: stfiwx f0, 0, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = fptoui double %str to i32
+ store i32 %conv, i32* inttoptr (i64 9999900 to i32*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_double_uint32_t(double %str) {
+; CHECK-P10-LABEL: st_cst_align64_double_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: stfiwx f0, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_double_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: xscvdpuxws f0, f1
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: stfiwx f0, 0, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = fptoui double %str to i32
+ store i32 %conv, i32* inttoptr (i64 1000000000000 to i32*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_double_int32_t(i64 %ptr, double %str) {
+; CHECK-LABEL: st_0_double_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xscvdpsxws f0, f1
+; CHECK-NEXT: stfiwx f0, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = fptosi double %str to i32
+ %0 = inttoptr i64 %ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_double_int32_t(i8* nocapture %ptr, double %str) {
+; CHECK-LABEL: st_align16_double_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xscvdpsxws f0, f1
+; CHECK-NEXT: addi r3, r3, 8
+; CHECK-NEXT: stfiwx f0, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = fptosi double %str to i32
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_double_int32_t(i8* nocapture %ptr, double %str) {
+; CHECK-P10-LABEL: st_align32_double_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: stfiwx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_double_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f1
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: stfiwx f0, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = fptosi double %str to i32
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_double_int32_t(i8* nocapture %ptr, double %str) {
+; CHECK-P10-LABEL: st_align64_double_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stfiwx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_double_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f1
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stfiwx f0, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = fptosi double %str to i32
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_double_int32_t(i8* nocapture %ptr, i64 %off, double %str) {
+; CHECK-LABEL: st_reg_double_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xscvdpsxws f0, f1
+; CHECK-NEXT: stfiwx f0, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = fptosi double %str to i32
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_double_int32_t(i64 %ptr, i8 zeroext %off, double %str) {
+; CHECK-LABEL: st_or1_double_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xscvdpsxws f0, f1
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: stfiwx f0, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = fptosi double %str to i32
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_double_int32_t(i64 %ptr, double %str) {
+; CHECK-LABEL: st_not_disjoint16_double_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xscvdpsxws f0, f1
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: stfiwx f0, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = fptosi double %str to i32
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_double_int32_t(i64 %ptr, double %str) {
+; CHECK-LABEL: st_disjoint_align16_double_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xscvdpsxws f0, f1
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: ori r3, r3, 24
+; CHECK-NEXT: stfiwx f0, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = fptosi double %str to i32
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_double_int32_t(i64 %ptr, double %str) {
+; CHECK-LABEL: st_not_disjoint32_double_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xscvdpsxws f0, f1
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: stfiwx f0, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = fptosi double %str to i32
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_double_int32_t(i64 %ptr, double %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_double_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: stfiwx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_double_int32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpsxws f0, f1
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stfiwx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_double_int32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: stfiwx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = fptosi double %str to i32
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_double_int32_t(i64 %ptr, double %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_double_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stfiwx f0, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_double_int32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: xscvdpsxws f0, f1
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stfiwx f0, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint64_double_int32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: stfiwx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi double %str to i32
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_double_int32_t(i64 %ptr, double %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_double_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stfiwx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_double_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f1
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stfiwx f0, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = fptosi double %str to i32
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_double_int32_t(double %str) {
+; CHECK-LABEL: st_cst_align16_double_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xscvdpsxws f0, f1
+; CHECK-NEXT: li r3, 4080
+; CHECK-NEXT: stfiwx f0, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = fptosi double %str to i32
+ store i32 %conv, i32* inttoptr (i64 4080 to i32*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_double_int32_t(double %str) {
+; CHECK-P10-LABEL: st_cst_align32_double_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: pli r3, 9999900
+; CHECK-P10-NEXT: stfiwx f0, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align32_double_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f1
+; CHECK-PREP10-NEXT: lis r3, 152
+; CHECK-PREP10-NEXT: ori r3, r3, 38428
+; CHECK-PREP10-NEXT: stfiwx f0, 0, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = fptosi double %str to i32
+ store i32 %conv, i32* inttoptr (i64 9999900 to i32*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_double_int32_t(double %str) {
+; CHECK-P10-LABEL: st_cst_align64_double_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: stfiwx f0, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_double_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f1
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: stfiwx f0, 0, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = fptosi double %str to i32
+ store i32 %conv, i32* inttoptr (i64 1000000000000 to i32*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_double_uint64_t(i64 %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_0_double_uint64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxds v2, f1
+; CHECK-POSTP8-NEXT: stxsd v2, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_0_double_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpuxds f0, f1
+; CHECK-P8-NEXT: stxsdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui double %str to i64
+ %0 = inttoptr i64 %ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_double_uint64_t(i8* nocapture %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_align16_double_uint64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxds v2, f1
+; CHECK-POSTP8-NEXT: stxsd v2, 8(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align16_double_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpuxds f0, f1
+; CHECK-P8-NEXT: li r4, 8
+; CHECK-P8-NEXT: stxsdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui double %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_double_uint64_t(i8* nocapture %ptr, double %str) {
+; CHECK-P10-LABEL: st_align32_double_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxds f0, f1
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: stxsdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_double_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: xscvdpuxds f0, f1
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: stxsdx f0, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = fptoui double %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_double_uint64_t(i8* nocapture %ptr, double %str) {
+; CHECK-P10-LABEL: st_align64_double_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxds f0, f1
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stxsdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_double_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: xscvdpuxds f0, f1
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stxsdx f0, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = fptoui double %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_double_uint64_t(i8* nocapture %ptr, i64 %off, double %str) {
+; CHECK-LABEL: st_reg_double_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xscvdpuxds f0, f1
+; CHECK-NEXT: stxsdx f0, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = fptoui double %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_double_uint64_t(i64 %ptr, i8 zeroext %off, double %str) {
+; CHECK-POSTP8-LABEL: st_or1_double_uint64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxds v2, f1
+; CHECK-POSTP8-NEXT: or r3, r4, r3
+; CHECK-POSTP8-NEXT: stxsd v2, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_or1_double_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpuxds f0, f1
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: stxsdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui double %str to i64
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_double_uint64_t(i64 %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_not_disjoint16_double_uint64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxds v2, f1
+; CHECK-POSTP8-NEXT: ori r3, r3, 6
+; CHECK-POSTP8-NEXT: stxsd v2, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint16_double_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpuxds f0, f1
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: stxsdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui double %str to i64
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_double_uint64_t(i64 %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_disjoint_align16_double_uint64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxds v2, f1
+; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-POSTP8-NEXT: stxsd v2, 24(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align16_double_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpuxds f0, f1
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: stxsdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = fptoui double %str to i64
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_double_uint64_t(i64 %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_not_disjoint32_double_uint64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxds v2, f1
+; CHECK-POSTP8-NEXT: ori r3, r3, 34463
+; CHECK-POSTP8-NEXT: oris r3, r3, 1
+; CHECK-POSTP8-NEXT: stxsd v2, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint32_double_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpuxds f0, f1
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: stxsdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui double %str to i64
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_double_uint64_t(i64 %ptr, double %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_double_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxds f0, f1
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: stxsdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_double_uint64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpuxds f0, f1
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stxsdx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_double_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpuxds f0, f1
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: stxsdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = fptoui double %str to i64
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_double_uint64_t(i64 %ptr, double %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_double_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxds v2, f1
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stxsd v2, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_double_uint64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: xscvdpuxds v2, f1
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stxsd v2, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint64_double_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpuxds f0, f1
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: stxsdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui double %str to i64
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_double_uint64_t(i64 %ptr, double %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_double_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxds f0, f1
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stxsdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_double_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: xscvdpuxds f0, f1
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stxsdx f0, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = fptoui double %str to i64
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_double_uint64_t(double %str) {
+; CHECK-POSTP8-LABEL: st_cst_align16_double_uint64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxds v2, f1
+; CHECK-POSTP8-NEXT: stxsd v2, 4080(0)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align16_double_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpuxds f0, f1
+; CHECK-P8-NEXT: li r3, 4080
+; CHECK-P8-NEXT: stxsdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui double %str to i64
+ store i64 %conv, i64* inttoptr (i64 4080 to i64*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_double_uint64_t(double %str) {
+; CHECK-POSTP8-LABEL: st_cst_align32_double_uint64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxds v2, f1
+; CHECK-POSTP8-NEXT: lis r3, 153
+; CHECK-POSTP8-NEXT: stxsd v2, -27108(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align32_double_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpuxds f0, f1
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: stxsdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui double %str to i64
+ store i64 %conv, i64* inttoptr (i64 9999900 to i64*), align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_double_uint64_t(double %str) {
+; CHECK-P10-LABEL: st_cst_align64_double_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxds v2, f1
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: stxsd v2, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align64_double_uint64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpuxds v2, f1
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: stxsd v2, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align64_double_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpuxds f0, f1
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: stxsdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui double %str to i64
+ store i64 %conv, i64* inttoptr (i64 1000000000000 to i64*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_double_int64_t(i64 %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_0_double_int64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxds v2, f1
+; CHECK-POSTP8-NEXT: stxsd v2, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_0_double_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxds f0, f1
+; CHECK-P8-NEXT: stxsdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi double %str to i64
+ %0 = inttoptr i64 %ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_double_int64_t(i8* nocapture %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_align16_double_int64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxds v2, f1
+; CHECK-POSTP8-NEXT: stxsd v2, 8(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align16_double_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxds f0, f1
+; CHECK-P8-NEXT: li r4, 8
+; CHECK-P8-NEXT: stxsdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi double %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_double_int64_t(i8* nocapture %ptr, double %str) {
+; CHECK-P10-LABEL: st_align32_double_int64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxds f0, f1
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: stxsdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_double_int64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: xscvdpsxds f0, f1
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: stxsdx f0, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = fptosi double %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_double_int64_t(i8* nocapture %ptr, double %str) {
+; CHECK-P10-LABEL: st_align64_double_int64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxds f0, f1
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stxsdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_double_int64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: xscvdpsxds f0, f1
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stxsdx f0, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = fptosi double %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_double_int64_t(i8* nocapture %ptr, i64 %off, double %str) {
+; CHECK-LABEL: st_reg_double_int64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xscvdpsxds f0, f1
+; CHECK-NEXT: stxsdx f0, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = fptosi double %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_double_int64_t(i64 %ptr, i8 zeroext %off, double %str) {
+; CHECK-POSTP8-LABEL: st_or1_double_int64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxds v2, f1
+; CHECK-POSTP8-NEXT: or r3, r4, r3
+; CHECK-POSTP8-NEXT: stxsd v2, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_or1_double_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxds f0, f1
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: stxsdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi double %str to i64
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_double_int64_t(i64 %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_not_disjoint16_double_int64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxds v2, f1
+; CHECK-POSTP8-NEXT: ori r3, r3, 6
+; CHECK-POSTP8-NEXT: stxsd v2, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint16_double_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxds f0, f1
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: stxsdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi double %str to i64
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_double_int64_t(i64 %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_disjoint_align16_double_int64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxds v2, f1
+; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-POSTP8-NEXT: stxsd v2, 24(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align16_double_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxds f0, f1
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: stxsdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = fptosi double %str to i64
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_double_int64_t(i64 %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_not_disjoint32_double_int64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxds v2, f1
+; CHECK-POSTP8-NEXT: ori r3, r3, 34463
+; CHECK-POSTP8-NEXT: oris r3, r3, 1
+; CHECK-POSTP8-NEXT: stxsd v2, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint32_double_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxds f0, f1
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: stxsdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi double %str to i64
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_double_int64_t(i64 %ptr, double %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_double_int64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxds f0, f1
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: stxsdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_double_int64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpsxds f0, f1
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stxsdx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_double_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxds f0, f1
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: stxsdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = fptosi double %str to i64
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_double_int64_t(i64 %ptr, double %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_double_int64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxds v2, f1
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stxsd v2, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_double_int64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: xscvdpsxds v2, f1
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stxsd v2, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint64_double_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxds f0, f1
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: stxsdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi double %str to i64
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_double_int64_t(i64 %ptr, double %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_double_int64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxds f0, f1
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stxsdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_double_int64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: xscvdpsxds f0, f1
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stxsdx f0, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = fptosi double %str to i64
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_double_int64_t(double %str) {
+; CHECK-POSTP8-LABEL: st_cst_align16_double_int64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxds v2, f1
+; CHECK-POSTP8-NEXT: stxsd v2, 4080(0)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align16_double_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxds f0, f1
+; CHECK-P8-NEXT: li r3, 4080
+; CHECK-P8-NEXT: stxsdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi double %str to i64
+ store i64 %conv, i64* inttoptr (i64 4080 to i64*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_double_int64_t(double %str) {
+; CHECK-POSTP8-LABEL: st_cst_align32_double_int64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxds v2, f1
+; CHECK-POSTP8-NEXT: lis r3, 153
+; CHECK-POSTP8-NEXT: stxsd v2, -27108(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align32_double_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxds f0, f1
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: stxsdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi double %str to i64
+ store i64 %conv, i64* inttoptr (i64 9999900 to i64*), align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_double_int64_t(double %str) {
+; CHECK-P10-LABEL: st_cst_align64_double_int64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxds v2, f1
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: stxsd v2, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align64_double_int64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpsxds v2, f1
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: stxsd v2, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align64_double_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxds f0, f1
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: stxsdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi double %str to i64
+ store i64 %conv, i64* inttoptr (i64 1000000000000 to i64*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_double_float(i64 %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_0_double_float:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xsrsp f0, f1
+; CHECK-POSTP8-NEXT: stfs f0, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_0_double_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xsrsp f0, f1
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptrunc double %str to float
+ %0 = inttoptr i64 %ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_double_float(i8* nocapture %ptr, double %str) {
+; CHECK-LABEL: st_align16_double_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xsrsp f0, f1
+; CHECK-NEXT: stfs f0, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = fptrunc double %str to float
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_double_float(i8* nocapture %ptr, double %str) {
+; CHECK-P10-LABEL: st_align32_double_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xsrsp f0, f1
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: stfsx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_double_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: xsrsp f0, f1
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: stfsx f0, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = fptrunc double %str to float
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_double_float(i8* nocapture %ptr, double %str) {
+; CHECK-P10-LABEL: st_align64_double_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xsrsp f0, f1
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stfsx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_double_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: xsrsp f0, f1
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stfsx f0, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = fptrunc double %str to float
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_double_float(i8* nocapture %ptr, i64 %off, double %str) {
+; CHECK-LABEL: st_reg_double_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xsrsp f0, f1
+; CHECK-NEXT: stfsx f0, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = fptrunc double %str to float
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_double_float(i64 %ptr, i8 zeroext %off, double %str) {
+; CHECK-POSTP8-LABEL: st_or1_double_float:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xsrsp f0, f1
+; CHECK-POSTP8-NEXT: or r3, r4, r3
+; CHECK-POSTP8-NEXT: stfs f0, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_or1_double_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xsrsp f0, f1
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptrunc double %str to float
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_double_float(i64 %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_not_disjoint16_double_float:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xsrsp f0, f1
+; CHECK-POSTP8-NEXT: ori r3, r3, 6
+; CHECK-POSTP8-NEXT: stfs f0, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint16_double_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xsrsp f0, f1
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptrunc double %str to float
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_double_float(i64 %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_disjoint_align16_double_float:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xsrsp f0, f1
+; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-POSTP8-NEXT: stfs f0, 24(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align16_double_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xsrsp f0, f1
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = fptrunc double %str to float
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_double_float(i64 %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_not_disjoint32_double_float:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xsrsp f0, f1
+; CHECK-POSTP8-NEXT: ori r3, r3, 34463
+; CHECK-POSTP8-NEXT: oris r3, r3, 1
+; CHECK-POSTP8-NEXT: stfs f0, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint32_double_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xsrsp f0, f1
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptrunc double %str to float
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_double_float(i64 %ptr, double %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_double_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xsrsp f0, f1
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: stfsx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_double_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xsrsp f0, f1
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stfsx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_double_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xsrsp f0, f1
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: stfsx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = fptrunc double %str to float
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_double_float(i64 %ptr, double %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_double_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xsrsp f0, f1
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_double_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: xsrsp f0, f1
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint64_double_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xsrsp f0, f1
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptrunc double %str to float
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_double_float(i64 %ptr, double %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_double_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xsrsp f0, f1
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stfsx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_double_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: xsrsp f0, f1
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stfsx f0, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = fptrunc double %str to float
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_double_float(double %str) {
+; CHECK-LABEL: st_cst_align16_double_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xsrsp f0, f1
+; CHECK-NEXT: stfs f0, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = fptrunc double %str to float
+ store float %conv, float* inttoptr (i64 4080 to float*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_double_float(double %str) {
+; CHECK-POSTP8-LABEL: st_cst_align32_double_float:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xsrsp f0, f1
+; CHECK-POSTP8-NEXT: lis r3, 153
+; CHECK-POSTP8-NEXT: stfs f0, -27108(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align32_double_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xsrsp f0, f1
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptrunc double %str to float
+ store float %conv, float* inttoptr (i64 9999900 to float*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_double_float(double %str) {
+; CHECK-P10-LABEL: st_cst_align64_double_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xsrsp f0, f1
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align64_double_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xsrsp f0, f1
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align64_double_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xsrsp f0, f1
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptrunc double %str to float
+ store float %conv, float* inttoptr (i64 1000000000000 to float*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_double_double(i64 %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_0_double_double:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: stfd f1, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_0_double_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: stfdx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to double*
+ store double %str, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_double_double(i8* nocapture %ptr, double %str) {
+; CHECK-LABEL: st_align16_double_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stfd f1, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to double*
+ store double %str, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_double_double(i8* nocapture %ptr, double %str) {
+; CHECK-P10-LABEL: st_align32_double_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: stfdx f1, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_double_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: stfdx f1, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to double*
+ store double %str, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_double_double(i8* nocapture %ptr, double %str) {
+; CHECK-P10-LABEL: st_align64_double_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stfdx f1, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_double_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stfdx f1, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to double*
+ store double %str, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_double_double(i8* nocapture %ptr, i64 %off, double %str) {
+; CHECK-LABEL: st_reg_double_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stfdx f1, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to double*
+ store double %str, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_double_double(i64 %ptr, i8 zeroext %off, double %str) {
+; CHECK-POSTP8-LABEL: st_or1_double_double:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: or r3, r4, r3
+; CHECK-POSTP8-NEXT: stfd f1, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_or1_double_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: stfdx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to double*
+ store double %str, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_double_double(i64 %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_not_disjoint16_double_double:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 6
+; CHECK-POSTP8-NEXT: stfd f1, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint16_double_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: stfdx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to double*
+ store double %str, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_double_double(i64 %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_disjoint_align16_double_double:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-POSTP8-NEXT: stfd f1, 24(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align16_double_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: stfdx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to double*
+ store double %str, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_double_double(i64 %ptr, double %str) {
+; CHECK-POSTP8-LABEL: st_not_disjoint32_double_double:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 34463
+; CHECK-POSTP8-NEXT: oris r3, r3, 1
+; CHECK-POSTP8-NEXT: stfd f1, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint32_double_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: stfdx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to double*
+ store double %str, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_double_double(i64 %ptr, double %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_double_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: stfdx f1, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_double_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stfdx f1, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_double_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: stfdx f1, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to double*
+ store double %str, double* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_double_double(i64 %ptr, double %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_double_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stfd f1, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_double_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stfd f1, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint64_double_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: stfdx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to double*
+ store double %str, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_double_double(i64 %ptr, double %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_double_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stfdx f1, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_double_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stfdx f1, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to double*
+ store double %str, double* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_double_double(double %str) {
+; CHECK-LABEL: st_cst_align16_double_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stfd f1, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ store double %str, double* inttoptr (i64 4080 to double*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_double_double(double %str) {
+; CHECK-POSTP8-LABEL: st_cst_align32_double_double:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: lis r3, 153
+; CHECK-POSTP8-NEXT: stfd f1, -27108(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align32_double_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: stfdx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ store double %str, double* inttoptr (i64 9999900 to double*), align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_double_double(double %str) {
+; CHECK-P10-LABEL: st_cst_align64_double_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: stfd f1, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align64_double_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: stfd f1, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align64_double_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: stfdx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ store double %str, double* inttoptr (i64 1000000000000 to double*), align 4096
+ ret void
+}
--- /dev/null
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-POSTP8,CHECK-P10
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-POSTP8,CHECK-P10
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-POSTP8,CHECK-PREP10,CHECK-P9
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-POSTP8,CHECK-PREP10,CHECK-P9
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P8
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P8
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_0_float_uint8_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_0_float_uint8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: lxsibzx f0, 0, r3
+; CHECK-POSTP8-NEXT: xscvuxdsp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_0_float_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lbz r3, 0(r3)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = uitofp i8 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_align16_float_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-POSTP8-LABEL: ld_align16_float_uint8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: addi r3, r3, 8
+; CHECK-POSTP8-NEXT: lxsibzx f0, 0, r3
+; CHECK-POSTP8-NEXT: xscvuxdsp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_align16_float_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lbz r3, 8(r3)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = uitofp i8 %0 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_align32_float_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_float_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lxsibzx f0, r3, r4
+; CHECK-P10-NEXT: xscvuxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_align32_float_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, 1525
+; CHECK-P9-NEXT: ori r4, r4, 56600
+; CHECK-P9-NEXT: lxsibzx f0, r3, r4
+; CHECK-P9-NEXT: xscvuxdsp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_align32_float_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, 1525
+; CHECK-P8-NEXT: ori r4, r4, 56600
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = uitofp i8 %0 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_align64_float_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_float_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lxsibzx f0, r3, r4
+; CHECK-P10-NEXT: xscvuxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_align64_float_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: lxsibzx f0, r3, r4
+; CHECK-P9-NEXT: xscvuxdsp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_align64_float_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = uitofp i8 %0 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_reg_float_uint8_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-POSTP8-LABEL: ld_reg_float_uint8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: lxsibzx f0, r3, r4
+; CHECK-POSTP8-NEXT: xscvuxdsp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_reg_float_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = uitofp i8 %0 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_or_float_uint8_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-POSTP8-LABEL: ld_or_float_uint8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: or r3, r4, r3
+; CHECK-POSTP8-NEXT: lxsibzx f0, 0, r3
+; CHECK-POSTP8-NEXT: xscvuxdsp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_or_float_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: lbz r3, 0(r3)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv1 = uitofp i8 %1 to float
+ ret float %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_not_disjoint16_float_uint8_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_not_disjoint16_float_uint8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 6
+; CHECK-POSTP8-NEXT: lxsibzx f0, 0, r3
+; CHECK-POSTP8-NEXT: xscvuxdsp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint16_float_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: lbz r3, 0(r3)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = uitofp i8 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_disjoint_align16_float_uint8_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_disjoint_align16_float_uint8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-POSTP8-NEXT: ori r3, r3, 24
+; CHECK-POSTP8-NEXT: lxsibzx f0, 0, r3
+; CHECK-POSTP8-NEXT: xscvuxdsp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align16_float_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: lbz r3, 24(r3)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 8
+ %conv = uitofp i8 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_not_disjoint32_float_uint8_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_not_disjoint32_float_uint8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 34463
+; CHECK-POSTP8-NEXT: oris r3, r3, 1
+; CHECK-POSTP8-NEXT: lxsibzx f0, 0, r3
+; CHECK-POSTP8-NEXT: xscvuxdsp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint32_float_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: lbz r3, 0(r3)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = uitofp i8 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_disjoint_align32_float_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_float_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lxsibzx f0, r3, r4
+; CHECK-P10-NEXT: xscvuxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_float_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lxsibzx f0, r3, r4
+; CHECK-P9-NEXT: xscvuxdsp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_float_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 16
+ %conv = uitofp i8 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_not_disjoint64_float_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_float_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lxsibzx f0, 0, r3
+; CHECK-P10-NEXT: xscvuxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint64_float_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: lxsibzx f0, 0, r3
+; CHECK-P9-NEXT: xscvuxdsp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint64_float_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: lbz r3, 0(r3)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = uitofp i8 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_disjoint_align64_float_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_float_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lxsibzx f0, r3, r4
+; CHECK-P10-NEXT: xscvuxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align64_float_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: lxsibzx f0, r3, r4
+; CHECK-P9-NEXT: xscvuxdsp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align64_float_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 4096
+ %conv = uitofp i8 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_cst_align16_float_uint8_t() {
+; CHECK-POSTP8-LABEL: ld_cst_align16_float_uint8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: li r3, 4080
+; CHECK-POSTP8-NEXT: lxsibzx f0, 0, r3
+; CHECK-POSTP8-NEXT: xscvuxdsp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align16_float_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lbz r3, 4080(0)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 4080 to i8*), align 16
+ %conv = uitofp i8 %0 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_cst_align32_float_uint8_t() {
+; CHECK-P10-LABEL: ld_cst_align32_float_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 9999900
+; CHECK-P10-NEXT: lxsibzx f0, 0, r3
+; CHECK-P10-NEXT: xscvuxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align32_float_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 152
+; CHECK-P9-NEXT: ori r3, r3, 38428
+; CHECK-P9-NEXT: lxsibzx f0, 0, r3
+; CHECK-P9-NEXT: xscvuxdsp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align32_float_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 153
+; CHECK-P8-NEXT: lbz r3, -27108(r3)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 9999900 to i8*), align 4
+ %conv = uitofp i8 %0 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_cst_align64_float_uint8_t() {
+; CHECK-P10-LABEL: ld_cst_align64_float_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lxsibzx f0, 0, r3
+; CHECK-P10-NEXT: xscvuxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align64_float_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: lxsibzx f0, 0, r3
+; CHECK-P9-NEXT: xscvuxdsp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align64_float_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: lbz r3, 0(r3)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 1000000000000 to i8*), align 4096
+ %conv = uitofp i8 %0 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_0_float_int8_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_0_float_int8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: lxsibzx v2, 0, r3
+; CHECK-POSTP8-NEXT: vextsb2d v2, v2
+; CHECK-POSTP8-NEXT: xscvsxdsp f1, v2
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_0_float_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lbz r3, 0(r3)
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = sitofp i8 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_align16_float_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-POSTP8-LABEL: ld_align16_float_int8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: addi r3, r3, 8
+; CHECK-POSTP8-NEXT: lxsibzx v2, 0, r3
+; CHECK-POSTP8-NEXT: vextsb2d v2, v2
+; CHECK-POSTP8-NEXT: xscvsxdsp f1, v2
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_align16_float_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lbz r3, 8(r3)
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = sitofp i8 %0 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_align32_float_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_float_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lxsibzx v2, r3, r4
+; CHECK-P10-NEXT: vextsb2d v2, v2
+; CHECK-P10-NEXT: xscvsxdsp f1, v2
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_align32_float_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, 1525
+; CHECK-P9-NEXT: ori r4, r4, 56600
+; CHECK-P9-NEXT: lxsibzx v2, r3, r4
+; CHECK-P9-NEXT: vextsb2d v2, v2
+; CHECK-P9-NEXT: xscvsxdsp f1, v2
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_align32_float_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, 1525
+; CHECK-P8-NEXT: ori r4, r4, 56600
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = sitofp i8 %0 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_align64_float_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_float_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lxsibzx v2, r3, r4
+; CHECK-P10-NEXT: vextsb2d v2, v2
+; CHECK-P10-NEXT: xscvsxdsp f1, v2
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_align64_float_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: lxsibzx v2, r3, r4
+; CHECK-P9-NEXT: vextsb2d v2, v2
+; CHECK-P9-NEXT: xscvsxdsp f1, v2
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_align64_float_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = sitofp i8 %0 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_reg_float_int8_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-POSTP8-LABEL: ld_reg_float_int8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: lxsibzx v2, r3, r4
+; CHECK-POSTP8-NEXT: vextsb2d v2, v2
+; CHECK-POSTP8-NEXT: xscvsxdsp f1, v2
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_reg_float_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = sitofp i8 %0 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_or_float_int8_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-POSTP8-LABEL: ld_or_float_int8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: or r3, r4, r3
+; CHECK-POSTP8-NEXT: lxsibzx v2, 0, r3
+; CHECK-POSTP8-NEXT: vextsb2d v2, v2
+; CHECK-POSTP8-NEXT: xscvsxdsp f1, v2
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_or_float_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: lbz r3, 0(r3)
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv1 = sitofp i8 %1 to float
+ ret float %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_not_disjoint16_float_int8_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_not_disjoint16_float_int8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 6
+; CHECK-POSTP8-NEXT: lxsibzx v2, 0, r3
+; CHECK-POSTP8-NEXT: vextsb2d v2, v2
+; CHECK-POSTP8-NEXT: xscvsxdsp f1, v2
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint16_float_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: lbz r3, 0(r3)
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = sitofp i8 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_disjoint_align16_float_int8_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_disjoint_align16_float_int8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-POSTP8-NEXT: ori r3, r3, 24
+; CHECK-POSTP8-NEXT: lxsibzx v2, 0, r3
+; CHECK-POSTP8-NEXT: vextsb2d v2, v2
+; CHECK-POSTP8-NEXT: xscvsxdsp f1, v2
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align16_float_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: lbz r3, 24(r3)
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 8
+ %conv = sitofp i8 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_not_disjoint32_float_int8_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_not_disjoint32_float_int8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 34463
+; CHECK-POSTP8-NEXT: oris r3, r3, 1
+; CHECK-POSTP8-NEXT: lxsibzx v2, 0, r3
+; CHECK-POSTP8-NEXT: vextsb2d v2, v2
+; CHECK-POSTP8-NEXT: xscvsxdsp f1, v2
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint32_float_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: lbz r3, 0(r3)
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = sitofp i8 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_disjoint_align32_float_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_float_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lxsibzx v2, r3, r4
+; CHECK-P10-NEXT: vextsb2d v2, v2
+; CHECK-P10-NEXT: xscvsxdsp f1, v2
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_float_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lxsibzx v2, r3, r4
+; CHECK-P9-NEXT: vextsb2d v2, v2
+; CHECK-P9-NEXT: xscvsxdsp f1, v2
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_float_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 16
+ %conv = sitofp i8 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_not_disjoint64_float_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_float_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lxsibzx v2, 0, r3
+; CHECK-P10-NEXT: vextsb2d v2, v2
+; CHECK-P10-NEXT: xscvsxdsp f1, v2
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint64_float_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: lxsibzx v2, 0, r3
+; CHECK-P9-NEXT: vextsb2d v2, v2
+; CHECK-P9-NEXT: xscvsxdsp f1, v2
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint64_float_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: lbz r3, 0(r3)
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = sitofp i8 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_disjoint_align64_float_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_float_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lxsibzx v2, r3, r4
+; CHECK-P10-NEXT: vextsb2d v2, v2
+; CHECK-P10-NEXT: xscvsxdsp f1, v2
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align64_float_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: lxsibzx v2, r3, r4
+; CHECK-P9-NEXT: vextsb2d v2, v2
+; CHECK-P9-NEXT: xscvsxdsp f1, v2
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align64_float_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 4096
+ %conv = sitofp i8 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_cst_align16_float_int8_t() {
+; CHECK-POSTP8-LABEL: ld_cst_align16_float_int8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: li r3, 4080
+; CHECK-POSTP8-NEXT: lxsibzx v2, 0, r3
+; CHECK-POSTP8-NEXT: vextsb2d v2, v2
+; CHECK-POSTP8-NEXT: xscvsxdsp f1, v2
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align16_float_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lbz r3, 4080(0)
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 4080 to i8*), align 16
+ %conv = sitofp i8 %0 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_cst_align32_float_int8_t() {
+; CHECK-P10-LABEL: ld_cst_align32_float_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 9999900
+; CHECK-P10-NEXT: lxsibzx v2, 0, r3
+; CHECK-P10-NEXT: vextsb2d v2, v2
+; CHECK-P10-NEXT: xscvsxdsp f1, v2
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align32_float_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 152
+; CHECK-P9-NEXT: ori r3, r3, 38428
+; CHECK-P9-NEXT: lxsibzx v2, 0, r3
+; CHECK-P9-NEXT: vextsb2d v2, v2
+; CHECK-P9-NEXT: xscvsxdsp f1, v2
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align32_float_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 153
+; CHECK-P8-NEXT: lbz r3, -27108(r3)
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 9999900 to i8*), align 4
+ %conv = sitofp i8 %0 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_cst_align64_float_int8_t() {
+; CHECK-P10-LABEL: ld_cst_align64_float_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lxsibzx v2, 0, r3
+; CHECK-P10-NEXT: vextsb2d v2, v2
+; CHECK-P10-NEXT: xscvsxdsp f1, v2
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align64_float_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: lxsibzx v2, 0, r3
+; CHECK-P9-NEXT: vextsb2d v2, v2
+; CHECK-P9-NEXT: xscvsxdsp f1, v2
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align64_float_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: lbz r3, 0(r3)
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 1000000000000 to i8*), align 4096
+ %conv = sitofp i8 %0 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_0_float_uint16_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_0_float_uint16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: lxsihzx f0, 0, r3
+; CHECK-POSTP8-NEXT: xscvuxdsp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_0_float_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lhz r3, 0(r3)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = uitofp i16 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_align16_float_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-POSTP8-LABEL: ld_align16_float_uint16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: addi r3, r3, 8
+; CHECK-POSTP8-NEXT: lxsihzx f0, 0, r3
+; CHECK-POSTP8-NEXT: xscvuxdsp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_align16_float_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lhz r3, 8(r3)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = uitofp i16 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_align32_float_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_float_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lxsihzx f0, r3, r4
+; CHECK-P10-NEXT: xscvuxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_align32_float_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, 1525
+; CHECK-P9-NEXT: ori r4, r4, 56600
+; CHECK-P9-NEXT: lxsihzx f0, r3, r4
+; CHECK-P9-NEXT: xscvuxdsp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_align32_float_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, 1525
+; CHECK-P8-NEXT: ori r4, r4, 56600
+; CHECK-P8-NEXT: lhzx r3, r3, r4
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = uitofp i16 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_align64_float_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_float_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lxsihzx f0, r3, r4
+; CHECK-P10-NEXT: xscvuxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_align64_float_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: lxsihzx f0, r3, r4
+; CHECK-P9-NEXT: xscvuxdsp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_align64_float_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: lhzx r3, r3, r4
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = uitofp i16 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_reg_float_uint16_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-POSTP8-LABEL: ld_reg_float_uint16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: lxsihzx f0, r3, r4
+; CHECK-POSTP8-NEXT: xscvuxdsp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_reg_float_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lhzx r3, r3, r4
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = uitofp i16 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_or_float_uint16_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-POSTP8-LABEL: ld_or_float_uint16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: or r3, r4, r3
+; CHECK-POSTP8-NEXT: lxsihzx f0, 0, r3
+; CHECK-POSTP8-NEXT: xscvuxdsp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_or_float_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: lhz r3, 0(r3)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv1 = uitofp i16 %1 to float
+ ret float %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_not_disjoint16_float_uint16_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_not_disjoint16_float_uint16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 6
+; CHECK-POSTP8-NEXT: lxsihzx f0, 0, r3
+; CHECK-POSTP8-NEXT: xscvuxdsp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint16_float_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: lhz r3, 0(r3)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = uitofp i16 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_disjoint_align16_float_uint16_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_disjoint_align16_float_uint16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-POSTP8-NEXT: ori r3, r3, 24
+; CHECK-POSTP8-NEXT: lxsihzx f0, 0, r3
+; CHECK-POSTP8-NEXT: xscvuxdsp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align16_float_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: lhz r3, 24(r3)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 8
+ %conv = uitofp i16 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_not_disjoint32_float_uint16_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_not_disjoint32_float_uint16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 34463
+; CHECK-POSTP8-NEXT: oris r3, r3, 1
+; CHECK-POSTP8-NEXT: lxsihzx f0, 0, r3
+; CHECK-POSTP8-NEXT: xscvuxdsp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint32_float_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: lhz r3, 0(r3)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = uitofp i16 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_disjoint_align32_float_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_float_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lxsihzx f0, r3, r4
+; CHECK-P10-NEXT: xscvuxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_float_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lxsihzx f0, r3, r4
+; CHECK-P9-NEXT: xscvuxdsp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_float_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lhzx r3, r3, r4
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 16
+ %conv = uitofp i16 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_not_disjoint64_float_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_float_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lxsihzx f0, 0, r3
+; CHECK-P10-NEXT: xscvuxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint64_float_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: lxsihzx f0, 0, r3
+; CHECK-P9-NEXT: xscvuxdsp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint64_float_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: lhz r3, 0(r3)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = uitofp i16 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_disjoint_align64_float_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_float_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lxsihzx f0, r3, r4
+; CHECK-P10-NEXT: xscvuxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align64_float_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: lxsihzx f0, r3, r4
+; CHECK-P9-NEXT: xscvuxdsp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align64_float_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: lhzx r3, r3, r4
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 4096
+ %conv = uitofp i16 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_cst_align16_float_uint16_t() {
+; CHECK-POSTP8-LABEL: ld_cst_align16_float_uint16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: li r3, 4080
+; CHECK-POSTP8-NEXT: lxsihzx f0, 0, r3
+; CHECK-POSTP8-NEXT: xscvuxdsp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align16_float_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lhz r3, 4080(0)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 4080 to i16*), align 16
+ %conv = uitofp i16 %0 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_cst_align32_float_uint16_t() {
+; CHECK-P10-LABEL: ld_cst_align32_float_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 9999900
+; CHECK-P10-NEXT: lxsihzx f0, 0, r3
+; CHECK-P10-NEXT: xscvuxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align32_float_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 152
+; CHECK-P9-NEXT: ori r3, r3, 38428
+; CHECK-P9-NEXT: lxsihzx f0, 0, r3
+; CHECK-P9-NEXT: xscvuxdsp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align32_float_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 153
+; CHECK-P8-NEXT: lhz r3, -27108(r3)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 9999900 to i16*), align 4
+ %conv = uitofp i16 %0 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_cst_align64_float_uint16_t() {
+; CHECK-P10-LABEL: ld_cst_align64_float_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lxsihzx f0, 0, r3
+; CHECK-P10-NEXT: xscvuxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align64_float_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: lxsihzx f0, 0, r3
+; CHECK-P9-NEXT: xscvuxdsp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align64_float_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: lhz r3, 0(r3)
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 1000000000000 to i16*), align 4096
+ %conv = uitofp i16 %0 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_0_float_int16_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_0_float_int16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: lxsihzx v2, 0, r3
+; CHECK-POSTP8-NEXT: vextsh2d v2, v2
+; CHECK-POSTP8-NEXT: xscvsxdsp f1, v2
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_0_float_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lha r3, 0(r3)
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sitofp i16 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_align16_float_int16_t(i8* nocapture readonly %ptr) {
+; CHECK-POSTP8-LABEL: ld_align16_float_int16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: addi r3, r3, 8
+; CHECK-POSTP8-NEXT: lxsihzx v2, 0, r3
+; CHECK-POSTP8-NEXT: vextsh2d v2, v2
+; CHECK-POSTP8-NEXT: xscvsxdsp f1, v2
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_align16_float_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lha r3, 8(r3)
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sitofp i16 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_align32_float_int16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_float_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lxsihzx v2, r3, r4
+; CHECK-P10-NEXT: vextsh2d v2, v2
+; CHECK-P10-NEXT: xscvsxdsp f1, v2
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_align32_float_int16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, 1525
+; CHECK-P9-NEXT: ori r4, r4, 56600
+; CHECK-P9-NEXT: lxsihzx v2, r3, r4
+; CHECK-P9-NEXT: vextsh2d v2, v2
+; CHECK-P9-NEXT: xscvsxdsp f1, v2
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_align32_float_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, 1525
+; CHECK-P8-NEXT: ori r4, r4, 56600
+; CHECK-P8-NEXT: lhax r3, r3, r4
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sitofp i16 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_align64_float_int16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_float_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lxsihzx v2, r3, r4
+; CHECK-P10-NEXT: vextsh2d v2, v2
+; CHECK-P10-NEXT: xscvsxdsp f1, v2
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_align64_float_int16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: lxsihzx v2, r3, r4
+; CHECK-P9-NEXT: vextsh2d v2, v2
+; CHECK-P9-NEXT: xscvsxdsp f1, v2
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_align64_float_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: lhax r3, r3, r4
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sitofp i16 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_reg_float_int16_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-POSTP8-LABEL: ld_reg_float_int16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: lxsihzx v2, r3, r4
+; CHECK-POSTP8-NEXT: vextsh2d v2, v2
+; CHECK-POSTP8-NEXT: xscvsxdsp f1, v2
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_reg_float_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lhax r3, r3, r4
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sitofp i16 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_or_float_int16_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-POSTP8-LABEL: ld_or_float_int16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: or r3, r4, r3
+; CHECK-POSTP8-NEXT: lxsihzx v2, 0, r3
+; CHECK-POSTP8-NEXT: vextsh2d v2, v2
+; CHECK-POSTP8-NEXT: xscvsxdsp f1, v2
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_or_float_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: lha r3, 0(r3)
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv1 = sitofp i16 %1 to float
+ ret float %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_not_disjoint16_float_int16_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_not_disjoint16_float_int16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 6
+; CHECK-POSTP8-NEXT: lxsihzx v2, 0, r3
+; CHECK-POSTP8-NEXT: vextsh2d v2, v2
+; CHECK-POSTP8-NEXT: xscvsxdsp f1, v2
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint16_float_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: lha r3, 0(r3)
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sitofp i16 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_disjoint_align16_float_int16_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_disjoint_align16_float_int16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-POSTP8-NEXT: ori r3, r3, 24
+; CHECK-POSTP8-NEXT: lxsihzx v2, 0, r3
+; CHECK-POSTP8-NEXT: vextsh2d v2, v2
+; CHECK-POSTP8-NEXT: xscvsxdsp f1, v2
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align16_float_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: lha r3, 24(r3)
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 8
+ %conv = sitofp i16 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_not_disjoint32_float_int16_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_not_disjoint32_float_int16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 34463
+; CHECK-POSTP8-NEXT: oris r3, r3, 1
+; CHECK-POSTP8-NEXT: lxsihzx v2, 0, r3
+; CHECK-POSTP8-NEXT: vextsh2d v2, v2
+; CHECK-POSTP8-NEXT: xscvsxdsp f1, v2
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint32_float_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: lha r3, 0(r3)
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sitofp i16 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_disjoint_align32_float_int16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_float_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lxsihzx v2, r3, r4
+; CHECK-P10-NEXT: vextsh2d v2, v2
+; CHECK-P10-NEXT: xscvsxdsp f1, v2
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_float_int16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lxsihzx v2, r3, r4
+; CHECK-P9-NEXT: vextsh2d v2, v2
+; CHECK-P9-NEXT: xscvsxdsp f1, v2
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_float_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lhax r3, r3, r4
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 16
+ %conv = sitofp i16 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_not_disjoint64_float_int16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_float_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lxsihzx v2, 0, r3
+; CHECK-P10-NEXT: vextsh2d v2, v2
+; CHECK-P10-NEXT: xscvsxdsp f1, v2
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint64_float_int16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: lxsihzx v2, 0, r3
+; CHECK-P9-NEXT: vextsh2d v2, v2
+; CHECK-P9-NEXT: xscvsxdsp f1, v2
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint64_float_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: lha r3, 0(r3)
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sitofp i16 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_disjoint_align64_float_int16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_float_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lxsihzx v2, r3, r4
+; CHECK-P10-NEXT: vextsh2d v2, v2
+; CHECK-P10-NEXT: xscvsxdsp f1, v2
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align64_float_int16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: lxsihzx v2, r3, r4
+; CHECK-P9-NEXT: vextsh2d v2, v2
+; CHECK-P9-NEXT: xscvsxdsp f1, v2
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align64_float_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: lhax r3, r3, r4
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 4096
+ %conv = sitofp i16 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_cst_align16_float_int16_t() {
+; CHECK-POSTP8-LABEL: ld_cst_align16_float_int16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: li r3, 4080
+; CHECK-POSTP8-NEXT: lxsihzx v2, 0, r3
+; CHECK-POSTP8-NEXT: vextsh2d v2, v2
+; CHECK-POSTP8-NEXT: xscvsxdsp f1, v2
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align16_float_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lha r3, 4080(0)
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 4080 to i16*), align 16
+ %conv = sitofp i16 %0 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_cst_align32_float_int16_t() {
+; CHECK-P10-LABEL: ld_cst_align32_float_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 9999900
+; CHECK-P10-NEXT: lxsihzx v2, 0, r3
+; CHECK-P10-NEXT: vextsh2d v2, v2
+; CHECK-P10-NEXT: xscvsxdsp f1, v2
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align32_float_int16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 152
+; CHECK-P9-NEXT: ori r3, r3, 38428
+; CHECK-P9-NEXT: lxsihzx v2, 0, r3
+; CHECK-P9-NEXT: vextsh2d v2, v2
+; CHECK-P9-NEXT: xscvsxdsp f1, v2
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align32_float_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 153
+; CHECK-P8-NEXT: lha r3, -27108(r3)
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 9999900 to i16*), align 4
+ %conv = sitofp i16 %0 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_cst_align64_float_int16_t() {
+; CHECK-P10-LABEL: ld_cst_align64_float_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lxsihzx v2, 0, r3
+; CHECK-P10-NEXT: vextsh2d v2, v2
+; CHECK-P10-NEXT: xscvsxdsp f1, v2
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align64_float_int16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: lxsihzx v2, 0, r3
+; CHECK-P9-NEXT: vextsh2d v2, v2
+; CHECK-P9-NEXT: xscvsxdsp f1, v2
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align64_float_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: lha r3, 0(r3)
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 1000000000000 to i16*), align 4096
+ %conv = sitofp i16 %0 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_0_float_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_float_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfiwzx f0, 0, r3
+; CHECK-NEXT: xscvuxdsp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = uitofp i32 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_align16_float_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_float_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addi r3, r3, 8
+; CHECK-NEXT: lfiwzx f0, 0, r3
+; CHECK-NEXT: xscvuxdsp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = uitofp i32 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_align32_float_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_float_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lfiwzx f0, r3, r4
+; CHECK-P10-NEXT: xscvuxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_float_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lfiwzx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvuxdsp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = uitofp i32 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_align64_float_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_float_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfiwzx f0, r3, r4
+; CHECK-P10-NEXT: xscvuxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_float_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfiwzx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvuxdsp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = uitofp i32 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_reg_float_uint32_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_float_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfiwzx f0, r3, r4
+; CHECK-NEXT: xscvuxdsp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = uitofp i32 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_or_float_uint32_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_float_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lfiwzx f0, 0, r3
+; CHECK-NEXT: xscvuxdsp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv1 = uitofp i32 %1 to float
+ ret float %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_not_disjoint16_float_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_float_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lfiwzx f0, 0, r3
+; CHECK-NEXT: xscvuxdsp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = uitofp i32 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_disjoint_align16_float_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_float_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: ori r3, r3, 24
+; CHECK-NEXT: lfiwzx f0, 0, r3
+; CHECK-NEXT: xscvuxdsp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 8
+ %conv = uitofp i32 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_not_disjoint32_float_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_float_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lfiwzx f0, 0, r3
+; CHECK-NEXT: xscvuxdsp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = uitofp i32 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_disjoint_align32_float_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_float_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lfiwzx f0, r3, r4
+; CHECK-P10-NEXT: xscvuxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_float_uint32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lfiwzx f0, r3, r4
+; CHECK-P9-NEXT: xscvuxdsp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_float_uint32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lfiwzx f0, r3, r4
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 16
+ %conv = uitofp i32 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_not_disjoint64_float_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_float_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lfiwzx f0, 0, r3
+; CHECK-P10-NEXT: xscvuxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_float_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lfiwzx f0, 0, r3
+; CHECK-PREP10-NEXT: xscvuxdsp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = uitofp i32 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_disjoint_align64_float_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_float_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfiwzx f0, r3, r4
+; CHECK-P10-NEXT: xscvuxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_float_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfiwzx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvuxdsp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4096
+ %conv = uitofp i32 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_cst_align16_float_uint32_t() {
+; CHECK-LABEL: ld_cst_align16_float_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: li r3, 4080
+; CHECK-NEXT: lfiwzx f0, 0, r3
+; CHECK-NEXT: xscvuxdsp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 4080 to i32*), align 16
+ %conv = uitofp i32 %0 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_cst_align32_float_uint32_t() {
+; CHECK-P10-LABEL: ld_cst_align32_float_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 9999900
+; CHECK-P10-NEXT: lfiwzx f0, 0, r3
+; CHECK-P10-NEXT: xscvuxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align32_float_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 152
+; CHECK-PREP10-NEXT: ori r3, r3, 38428
+; CHECK-PREP10-NEXT: lfiwzx f0, 0, r3
+; CHECK-PREP10-NEXT: xscvuxdsp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 9999900 to i32*), align 4
+ %conv = uitofp i32 %0 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_cst_align64_float_uint32_t() {
+; CHECK-P10-LABEL: ld_cst_align64_float_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lfiwzx f0, 0, r3
+; CHECK-P10-NEXT: xscvuxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_float_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lfiwzx f0, 0, r3
+; CHECK-PREP10-NEXT: xscvuxdsp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 1000000000000 to i32*), align 4096
+ %conv = uitofp i32 %0 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_0_float_int32_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_float_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfiwax f0, 0, r3
+; CHECK-NEXT: xscvsxdsp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = sitofp i32 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_align16_float_int32_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_float_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addi r3, r3, 8
+; CHECK-NEXT: lfiwax f0, 0, r3
+; CHECK-NEXT: xscvsxdsp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = sitofp i32 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_align32_float_int32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_float_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lfiwax f0, r3, r4
+; CHECK-P10-NEXT: xscvsxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_float_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lfiwax f0, r3, r4
+; CHECK-PREP10-NEXT: xscvsxdsp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = sitofp i32 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_align64_float_int32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_float_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfiwax f0, r3, r4
+; CHECK-P10-NEXT: xscvsxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_float_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfiwax f0, r3, r4
+; CHECK-PREP10-NEXT: xscvsxdsp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = sitofp i32 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_reg_float_int32_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_float_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfiwax f0, r3, r4
+; CHECK-NEXT: xscvsxdsp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = sitofp i32 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_or_float_int32_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_float_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lfiwax f0, 0, r3
+; CHECK-NEXT: xscvsxdsp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv1 = sitofp i32 %1 to float
+ ret float %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_not_disjoint16_float_int32_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_float_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lfiwax f0, 0, r3
+; CHECK-NEXT: xscvsxdsp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = sitofp i32 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_disjoint_align16_float_int32_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_float_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: ori r3, r3, 24
+; CHECK-NEXT: lfiwax f0, 0, r3
+; CHECK-NEXT: xscvsxdsp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 8
+ %conv = sitofp i32 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_not_disjoint32_float_int32_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_float_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lfiwax f0, 0, r3
+; CHECK-NEXT: xscvsxdsp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = sitofp i32 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_disjoint_align32_float_int32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_float_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lfiwax f0, r3, r4
+; CHECK-P10-NEXT: xscvsxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_float_int32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lfiwax f0, r3, r4
+; CHECK-P9-NEXT: xscvsxdsp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_float_int32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lfiwax f0, r3, r4
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 16
+ %conv = sitofp i32 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_not_disjoint64_float_int32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_float_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lfiwax f0, 0, r3
+; CHECK-P10-NEXT: xscvsxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_float_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lfiwax f0, 0, r3
+; CHECK-PREP10-NEXT: xscvsxdsp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = sitofp i32 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_disjoint_align64_float_int32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_float_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfiwax f0, r3, r4
+; CHECK-P10-NEXT: xscvsxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_float_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfiwax f0, r3, r4
+; CHECK-PREP10-NEXT: xscvsxdsp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4096
+ %conv = sitofp i32 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_cst_align16_float_int32_t() {
+; CHECK-LABEL: ld_cst_align16_float_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: li r3, 4080
+; CHECK-NEXT: lfiwax f0, 0, r3
+; CHECK-NEXT: xscvsxdsp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 4080 to i32*), align 16
+ %conv = sitofp i32 %0 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_cst_align32_float_int32_t() {
+; CHECK-P10-LABEL: ld_cst_align32_float_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 9999900
+; CHECK-P10-NEXT: lfiwax f0, 0, r3
+; CHECK-P10-NEXT: xscvsxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align32_float_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 152
+; CHECK-PREP10-NEXT: ori r3, r3, 38428
+; CHECK-PREP10-NEXT: lfiwax f0, 0, r3
+; CHECK-PREP10-NEXT: xscvsxdsp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 9999900 to i32*), align 4
+ %conv = sitofp i32 %0 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_cst_align64_float_int32_t() {
+; CHECK-P10-LABEL: ld_cst_align64_float_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lfiwax f0, 0, r3
+; CHECK-P10-NEXT: xscvsxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_float_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lfiwax f0, 0, r3
+; CHECK-PREP10-NEXT: xscvsxdsp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 1000000000000 to i32*), align 4096
+ %conv = sitofp i32 %0 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_0_float_uint64_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_0_float_uint64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: lfd f0, 0(r3)
+; CHECK-POSTP8-NEXT: xscvuxdsp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_0_float_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = uitofp i64 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_align16_float_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_float_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfd f0, 8(r3)
+; CHECK-NEXT: xscvuxdsp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = uitofp i64 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_align32_float_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_float_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvuxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_float_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvuxdsp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = uitofp i64 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_align64_float_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_float_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvuxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_float_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvuxdsp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = uitofp i64 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_reg_float_uint64_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_float_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfdx f0, r3, r4
+; CHECK-NEXT: xscvuxdsp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = uitofp i64 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_or_float_uint64_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-POSTP8-LABEL: ld_or_float_uint64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: or r3, r4, r3
+; CHECK-POSTP8-NEXT: lfd f0, 0(r3)
+; CHECK-POSTP8-NEXT: xscvuxdsp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_or_float_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv1 = uitofp i64 %1 to float
+ ret float %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_not_disjoint16_float_uint64_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_not_disjoint16_float_uint64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 6
+; CHECK-POSTP8-NEXT: lfd f0, 0(r3)
+; CHECK-POSTP8-NEXT: xscvuxdsp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint16_float_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = uitofp i64 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_disjoint_align16_float_uint64_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_disjoint_align16_float_uint64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-POSTP8-NEXT: lfd f0, 24(r3)
+; CHECK-POSTP8-NEXT: xscvuxdsp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align16_float_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = uitofp i64 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_not_disjoint32_float_uint64_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_not_disjoint32_float_uint64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 34463
+; CHECK-POSTP8-NEXT: oris r3, r3, 1
+; CHECK-POSTP8-NEXT: lfd f0, 0(r3)
+; CHECK-POSTP8-NEXT: xscvuxdsp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint32_float_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = uitofp i64 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_disjoint_align32_float_uint64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_float_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvuxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_float_uint64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lfdx f0, r3, r4
+; CHECK-P9-NEXT: xscvuxdsp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_float_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lfdx f0, r3, r4
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 16
+ %conv = uitofp i64 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_not_disjoint64_float_uint64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_float_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvuxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint64_float_uint64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvuxdsp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint64_float_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = uitofp i64 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_disjoint_align64_float_uint64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_float_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvuxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_float_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvuxdsp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 4096
+ %conv = uitofp i64 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_cst_align16_float_uint64_t() {
+; CHECK-LABEL: ld_cst_align16_float_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfd f0, 4080(0)
+; CHECK-NEXT: xscvuxdsp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 4080 to i64*), align 16
+ %conv = uitofp i64 %0 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_cst_align32_float_uint64_t() {
+; CHECK-POSTP8-LABEL: ld_cst_align32_float_uint64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: lis r3, 153
+; CHECK-POSTP8-NEXT: lfd f0, -27108(r3)
+; CHECK-POSTP8-NEXT: xscvuxdsp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align32_float_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 9999900 to i64*), align 8
+ %conv = uitofp i64 %0 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_cst_align64_float_uint64_t() {
+; CHECK-P10-LABEL: ld_cst_align64_float_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvuxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align64_float_uint64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvuxdsp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align64_float_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvuxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 1000000000000 to i64*), align 4096
+ %conv = uitofp i64 %0 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_0_float_int64_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_0_float_int64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: lfd f0, 0(r3)
+; CHECK-POSTP8-NEXT: xscvsxdsp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_0_float_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = sitofp i64 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_align16_float_int64_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_float_int64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfd f0, 8(r3)
+; CHECK-NEXT: xscvsxdsp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = sitofp i64 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_align32_float_int64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_float_int64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvsxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_float_int64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvsxdsp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = sitofp i64 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_align64_float_int64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_float_int64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvsxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_float_int64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvsxdsp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = sitofp i64 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_reg_float_int64_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_float_int64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfdx f0, r3, r4
+; CHECK-NEXT: xscvsxdsp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = sitofp i64 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_or_float_int64_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-POSTP8-LABEL: ld_or_float_int64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: or r3, r4, r3
+; CHECK-POSTP8-NEXT: lfd f0, 0(r3)
+; CHECK-POSTP8-NEXT: xscvsxdsp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_or_float_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv1 = sitofp i64 %1 to float
+ ret float %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_not_disjoint16_float_int64_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_not_disjoint16_float_int64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 6
+; CHECK-POSTP8-NEXT: lfd f0, 0(r3)
+; CHECK-POSTP8-NEXT: xscvsxdsp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint16_float_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = sitofp i64 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_disjoint_align16_float_int64_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_disjoint_align16_float_int64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-POSTP8-NEXT: lfd f0, 24(r3)
+; CHECK-POSTP8-NEXT: xscvsxdsp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align16_float_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = sitofp i64 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_not_disjoint32_float_int64_t(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_not_disjoint32_float_int64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 34463
+; CHECK-POSTP8-NEXT: oris r3, r3, 1
+; CHECK-POSTP8-NEXT: lfd f0, 0(r3)
+; CHECK-POSTP8-NEXT: xscvsxdsp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint32_float_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = sitofp i64 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_disjoint_align32_float_int64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_float_int64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvsxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_float_int64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lfdx f0, r3, r4
+; CHECK-P9-NEXT: xscvsxdsp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_float_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lfdx f0, r3, r4
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 16
+ %conv = sitofp i64 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_not_disjoint64_float_int64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_float_int64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvsxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint64_float_int64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvsxdsp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint64_float_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = sitofp i64 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_disjoint_align64_float_int64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_float_int64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvsxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_float_int64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvsxdsp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 4096
+ %conv = sitofp i64 %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_cst_align16_float_int64_t() {
+; CHECK-LABEL: ld_cst_align16_float_int64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfd f0, 4080(0)
+; CHECK-NEXT: xscvsxdsp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 4080 to i64*), align 16
+ %conv = sitofp i64 %0 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_cst_align32_float_int64_t() {
+; CHECK-POSTP8-LABEL: ld_cst_align32_float_int64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: lis r3, 153
+; CHECK-POSTP8-NEXT: lfd f0, -27108(r3)
+; CHECK-POSTP8-NEXT: xscvsxdsp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align32_float_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 9999900 to i64*), align 8
+ %conv = sitofp i64 %0 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_cst_align64_float_int64_t() {
+; CHECK-P10-LABEL: ld_cst_align64_float_int64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvsxdsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align64_float_int64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvsxdsp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align64_float_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvsxdsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 1000000000000 to i64*), align 4096
+ %conv = sitofp i64 %0 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_0_float_float(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_0_float_float:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: lfs f1, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_0_float_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lfsx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to float*
+ %1 = load float, float* %0, align 4
+ ret float %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_align16_float_float(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_float_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfs f1, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ ret float %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_align32_float_float(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_float_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lfsx f1, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_float_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lfsx f1, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ ret float %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_align64_float_float(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_float_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfsx f1, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_float_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfsx f1, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ ret float %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_reg_float_float(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_float_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfsx f1, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ ret float %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_or_float_float(i64 %ptr, i8 zeroext %off) {
+; CHECK-POSTP8-LABEL: ld_or_float_float:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: or r3, r4, r3
+; CHECK-POSTP8-NEXT: lfs f1, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_or_float_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: lfsx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ ret float %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_not_disjoint16_float_float(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_not_disjoint16_float_float:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 6
+; CHECK-POSTP8-NEXT: lfs f1, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint16_float_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: lfsx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ ret float %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_disjoint_align16_float_float(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_disjoint_align16_float_float:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-POSTP8-NEXT: lfs f1, 24(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align16_float_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: lfsx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 8
+ ret float %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_not_disjoint32_float_float(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_not_disjoint32_float_float:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 34463
+; CHECK-POSTP8-NEXT: oris r3, r3, 1
+; CHECK-POSTP8-NEXT: lfs f1, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint32_float_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: lfsx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ ret float %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_disjoint_align32_float_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_float_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lfsx f1, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_float_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lfsx f1, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_float_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lfsx f1, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 16
+ ret float %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_not_disjoint64_float_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_float_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lfs f1, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint64_float_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: lfs f1, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint64_float_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: lfsx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ ret float %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_disjoint_align64_float_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_float_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfsx f1, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_float_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfsx f1, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4096
+ ret float %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_cst_align16_float_float() {
+; CHECK-LABEL: ld_cst_align16_float_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfs f1, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %0 = load float, float* inttoptr (i64 4080 to float*), align 16
+ ret float %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_cst_align32_float_float() {
+; CHECK-POSTP8-LABEL: ld_cst_align32_float_float:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: lis r3, 153
+; CHECK-POSTP8-NEXT: lfs f1, -27108(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align32_float_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: lfsx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load float, float* inttoptr (i64 9999900 to float*), align 4
+ ret float %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_cst_align64_float_float() {
+; CHECK-P10-LABEL: ld_cst_align64_float_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lfs f1, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align64_float_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: lfs f1, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align64_float_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: lfsx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load float, float* inttoptr (i64 1000000000000 to float*), align 4096
+ ret float %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_0_float_double(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_0_float_double:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: lfd f0, 0(r3)
+; CHECK-POSTP8-NEXT: xsrsp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_0_float_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xsrsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptrunc double %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_align16_float_double(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_float_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfd f0, 8(r3)
+; CHECK-NEXT: xsrsp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptrunc double %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_align32_float_double(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_float_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xsrsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_float_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xsrsp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptrunc double %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_align64_float_double(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_float_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xsrsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_float_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xsrsp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptrunc double %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_reg_float_double(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_float_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfdx f0, r3, r4
+; CHECK-NEXT: xsrsp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptrunc double %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_or_float_double(i64 %ptr, i8 zeroext %off) {
+; CHECK-POSTP8-LABEL: ld_or_float_double:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: or r3, r4, r3
+; CHECK-POSTP8-NEXT: lfd f0, 0(r3)
+; CHECK-POSTP8-NEXT: xsrsp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_or_float_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xsrsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv1 = fptrunc double %1 to float
+ ret float %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_not_disjoint16_float_double(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_not_disjoint16_float_double:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 6
+; CHECK-POSTP8-NEXT: lfd f0, 0(r3)
+; CHECK-POSTP8-NEXT: xsrsp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint16_float_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xsrsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptrunc double %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_disjoint_align16_float_double(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_disjoint_align16_float_double:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-POSTP8-NEXT: lfd f0, 24(r3)
+; CHECK-POSTP8-NEXT: xsrsp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align16_float_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xsrsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptrunc double %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_not_disjoint32_float_double(i64 %ptr) {
+; CHECK-POSTP8-LABEL: ld_not_disjoint32_float_double:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 34463
+; CHECK-POSTP8-NEXT: oris r3, r3, 1
+; CHECK-POSTP8-NEXT: lfd f0, 0(r3)
+; CHECK-POSTP8-NEXT: xsrsp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint32_float_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xsrsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptrunc double %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_disjoint_align32_float_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_float_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xsrsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_float_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lfdx f0, r3, r4
+; CHECK-P9-NEXT: xsrsp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_float_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lfdx f0, r3, r4
+; CHECK-P8-NEXT: xsrsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 16
+ %conv = fptrunc double %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_not_disjoint64_float_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_float_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xsrsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint64_float_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xsrsp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint64_float_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xsrsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptrunc double %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_disjoint_align64_float_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_float_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xsrsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_float_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xsrsp f1, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 4096
+ %conv = fptrunc double %1 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_cst_align16_float_double() {
+; CHECK-LABEL: ld_cst_align16_float_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfd f0, 4080(0)
+; CHECK-NEXT: xsrsp f1, f0
+; CHECK-NEXT: blr
+entry:
+ %0 = load double, double* inttoptr (i64 4080 to double*), align 16
+ %conv = fptrunc double %0 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_cst_align32_float_double() {
+; CHECK-POSTP8-LABEL: ld_cst_align32_float_double:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: lis r3, 153
+; CHECK-POSTP8-NEXT: lfd f0, -27108(r3)
+; CHECK-POSTP8-NEXT: xsrsp f1, f0
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align32_float_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xsrsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load double, double* inttoptr (i64 9999900 to double*), align 8
+ %conv = fptrunc double %0 to float
+ ret float %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local float @ld_cst_align64_float_double() {
+; CHECK-P10-LABEL: ld_cst_align64_float_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xsrsp f1, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align64_float_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xsrsp f1, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align64_float_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xsrsp f1, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load double, double* inttoptr (i64 1000000000000 to double*), align 4096
+ %conv = fptrunc double %0 to float
+ ret float %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_float_uint8_t(i64 %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_0_float_uint8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
+; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_0_float_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: stb r4, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui float %str to i8
+ %0 = inttoptr i64 %ptr to i8*
+ store i8 %conv, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_float_uint8_t(i8* nocapture %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_align16_float_uint8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
+; CHECK-POSTP8-NEXT: addi r3, r3, 8
+; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align16_float_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: stb r4, 8(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui float %str to i8
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ store i8 %conv, i8* %add.ptr, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_float_uint8_t(i8* nocapture %ptr, float %str) {
+; CHECK-P10-LABEL: st_align32_float_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: stxsibx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align32_float_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpuxws f0, f1
+; CHECK-P9-NEXT: lis r4, 1525
+; CHECK-P9-NEXT: ori r4, r4, 56600
+; CHECK-P9-NEXT: stxsibx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align32_float_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, 1525
+; CHECK-P8-NEXT: ori r4, r4, 56600
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: stbx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui float %str to i8
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ store i8 %conv, i8* %add.ptr, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_float_uint8_t(i8* nocapture %ptr, float %str) {
+; CHECK-P10-LABEL: st_align64_float_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stxsibx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align64_float_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpuxws f0, f1
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stxsibx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align64_float_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: stbx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui float %str to i8
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ store i8 %conv, i8* %add.ptr, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_float_uint8_t(i8* nocapture %ptr, i64 %off, float %str) {
+; CHECK-POSTP8-LABEL: st_reg_float_uint8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
+; CHECK-POSTP8-NEXT: stxsibx f0, r3, r4
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_reg_float_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: stbx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui float %str to i8
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ store i8 %conv, i8* %add.ptr, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_float_uint8_t(i64 %ptr, i8 zeroext %off, float %str) {
+; CHECK-POSTP8-LABEL: st_or1_float_uint8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
+; CHECK-POSTP8-NEXT: or r3, r4, r3
+; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_or1_float_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: stb r5, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui float %str to i8
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_float_uint8_t(i64 %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_not_disjoint16_float_uint8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
+; CHECK-POSTP8-NEXT: ori r3, r3, 6
+; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint16_float_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: stb r4, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui float %str to i8
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_float_uint8_t(i64 %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_disjoint_align16_float_uint8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
+; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-POSTP8-NEXT: ori r3, r3, 24
+; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align16_float_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: stb r4, 24(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = fptoui float %str to i8
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_float_uint8_t(i64 %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_not_disjoint32_float_uint8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
+; CHECK-POSTP8-NEXT: ori r3, r3, 34463
+; CHECK-POSTP8-NEXT: oris r3, r3, 1
+; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint32_float_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: stb r4, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui float %str to i8
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_float_uint8_t(i64 %ptr, float %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_float_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: stxsibx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_float_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpuxws f0, f1
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stxsibx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_float_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r6, 41712
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: stbx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = fptoui float %str to i8
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_float_uint8_t(i64 %ptr, float %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_float_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stxsibx f0, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_float_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: xscvdpuxws f0, f1
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stxsibx f0, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint64_float_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: stb r5, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui float %str to i8
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_float_uint8_t(i64 %ptr, float %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_float_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stxsibx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align64_float_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpuxws f0, f1
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stxsibx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align64_float_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: stbx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = fptoui float %str to i8
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_float_uint8_t(float %str) {
+; CHECK-POSTP8-LABEL: st_cst_align16_float_uint8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
+; CHECK-POSTP8-NEXT: li r3, 4080
+; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align16_float_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: stb r3, 4080(0)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui float %str to i8
+ store i8 %conv, i8* inttoptr (i64 4080 to i8*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_float_uint8_t(float %str) {
+; CHECK-P10-LABEL: st_cst_align32_float_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: pli r3, 9999900
+; CHECK-P10-NEXT: stxsibx f0, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align32_float_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpuxws f0, f1
+; CHECK-P9-NEXT: lis r3, 152
+; CHECK-P9-NEXT: ori r3, r3, 38428
+; CHECK-P9-NEXT: stxsibx f0, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align32_float_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, 153
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: stb r3, -27108(r4)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui float %str to i8
+ store i8 %conv, i8* inttoptr (i64 9999900 to i8*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_float_uint8_t(float %str) {
+; CHECK-P10-LABEL: st_cst_align64_float_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: stxsibx f0, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align64_float_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpuxws f0, f1
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: stxsibx f0, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align64_float_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: stb r4, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui float %str to i8
+ store i8 %conv, i8* inttoptr (i64 1000000000000 to i8*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_float_int8_t(i64 %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_0_float_int8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
+; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_0_float_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: stb r4, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi float %str to i8
+ %0 = inttoptr i64 %ptr to i8*
+ store i8 %conv, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_float_int8_t(i8* nocapture %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_align16_float_int8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
+; CHECK-POSTP8-NEXT: addi r3, r3, 8
+; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align16_float_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: stb r4, 8(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi float %str to i8
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ store i8 %conv, i8* %add.ptr, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_float_int8_t(i8* nocapture %ptr, float %str) {
+; CHECK-P10-LABEL: st_align32_float_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: stxsibx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align32_float_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpsxws f0, f1
+; CHECK-P9-NEXT: lis r4, 1525
+; CHECK-P9-NEXT: ori r4, r4, 56600
+; CHECK-P9-NEXT: stxsibx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align32_float_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, 1525
+; CHECK-P8-NEXT: ori r4, r4, 56600
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: stbx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi float %str to i8
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ store i8 %conv, i8* %add.ptr, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_float_int8_t(i8* nocapture %ptr, float %str) {
+; CHECK-P10-LABEL: st_align64_float_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stxsibx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align64_float_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpsxws f0, f1
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stxsibx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align64_float_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: stbx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi float %str to i8
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ store i8 %conv, i8* %add.ptr, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_float_int8_t(i8* nocapture %ptr, i64 %off, float %str) {
+; CHECK-POSTP8-LABEL: st_reg_float_int8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
+; CHECK-POSTP8-NEXT: stxsibx f0, r3, r4
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_reg_float_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: stbx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi float %str to i8
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ store i8 %conv, i8* %add.ptr, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_float_int8_t(i64 %ptr, i8 zeroext %off, float %str) {
+; CHECK-POSTP8-LABEL: st_or1_float_int8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
+; CHECK-POSTP8-NEXT: or r3, r4, r3
+; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_or1_float_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: stb r5, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi float %str to i8
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_float_int8_t(i64 %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_not_disjoint16_float_int8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
+; CHECK-POSTP8-NEXT: ori r3, r3, 6
+; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint16_float_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: stb r4, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi float %str to i8
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_float_int8_t(i64 %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_disjoint_align16_float_int8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
+; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-POSTP8-NEXT: ori r3, r3, 24
+; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align16_float_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: stb r4, 24(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = fptosi float %str to i8
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_float_int8_t(i64 %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_not_disjoint32_float_int8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
+; CHECK-POSTP8-NEXT: ori r3, r3, 34463
+; CHECK-POSTP8-NEXT: oris r3, r3, 1
+; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint32_float_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: stb r4, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi float %str to i8
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_float_int8_t(i64 %ptr, float %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_float_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: stxsibx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_float_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpsxws f0, f1
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stxsibx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_float_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r6, 41712
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: stbx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = fptosi float %str to i8
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_float_int8_t(i64 %ptr, float %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_float_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stxsibx f0, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_float_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: xscvdpsxws f0, f1
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stxsibx f0, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint64_float_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: stb r5, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi float %str to i8
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_float_int8_t(i64 %ptr, float %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_float_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stxsibx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align64_float_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpsxws f0, f1
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stxsibx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align64_float_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: stbx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = fptosi float %str to i8
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_float_int8_t(float %str) {
+; CHECK-POSTP8-LABEL: st_cst_align16_float_int8_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
+; CHECK-POSTP8-NEXT: li r3, 4080
+; CHECK-POSTP8-NEXT: stxsibx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align16_float_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: stb r3, 4080(0)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi float %str to i8
+ store i8 %conv, i8* inttoptr (i64 4080 to i8*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_float_int8_t(float %str) {
+; CHECK-P10-LABEL: st_cst_align32_float_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: pli r3, 9999900
+; CHECK-P10-NEXT: stxsibx f0, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align32_float_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpsxws f0, f1
+; CHECK-P9-NEXT: lis r3, 152
+; CHECK-P9-NEXT: ori r3, r3, 38428
+; CHECK-P9-NEXT: stxsibx f0, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align32_float_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, 153
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: stb r3, -27108(r4)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi float %str to i8
+ store i8 %conv, i8* inttoptr (i64 9999900 to i8*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_float_int8_t(float %str) {
+; CHECK-P10-LABEL: st_cst_align64_float_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: stxsibx f0, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align64_float_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpsxws f0, f1
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: stxsibx f0, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align64_float_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: stb r4, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi float %str to i8
+ store i8 %conv, i8* inttoptr (i64 1000000000000 to i8*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_float_uint16_t(i64 %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_0_float_uint16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
+; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_0_float_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: sth r4, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui float %str to i16
+ %0 = inttoptr i64 %ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_float_uint16_t(i8* nocapture %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_align16_float_uint16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
+; CHECK-POSTP8-NEXT: addi r3, r3, 8
+; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align16_float_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: sth r4, 8(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui float %str to i16
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_float_uint16_t(i8* nocapture %ptr, float %str) {
+; CHECK-P10-LABEL: st_align32_float_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: stxsihx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align32_float_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpuxws f0, f1
+; CHECK-P9-NEXT: lis r4, 1525
+; CHECK-P9-NEXT: ori r4, r4, 56600
+; CHECK-P9-NEXT: stxsihx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align32_float_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, 1525
+; CHECK-P8-NEXT: ori r4, r4, 56600
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: sthx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui float %str to i16
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_float_uint16_t(i8* nocapture %ptr, float %str) {
+; CHECK-P10-LABEL: st_align64_float_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stxsihx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align64_float_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpuxws f0, f1
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stxsihx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align64_float_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: sthx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui float %str to i16
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_float_uint16_t(i8* nocapture %ptr, i64 %off, float %str) {
+; CHECK-POSTP8-LABEL: st_reg_float_uint16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
+; CHECK-POSTP8-NEXT: stxsihx f0, r3, r4
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_reg_float_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: sthx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui float %str to i16
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_float_uint16_t(i64 %ptr, i8 zeroext %off, float %str) {
+; CHECK-POSTP8-LABEL: st_or1_float_uint16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
+; CHECK-POSTP8-NEXT: or r3, r4, r3
+; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_or1_float_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: sth r5, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui float %str to i16
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_float_uint16_t(i64 %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_not_disjoint16_float_uint16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
+; CHECK-POSTP8-NEXT: ori r3, r3, 6
+; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint16_float_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: sth r4, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui float %str to i16
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_float_uint16_t(i64 %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_disjoint_align16_float_uint16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
+; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-POSTP8-NEXT: ori r3, r3, 24
+; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align16_float_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: sth r4, 24(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = fptoui float %str to i16
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_float_uint16_t(i64 %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_not_disjoint32_float_uint16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
+; CHECK-POSTP8-NEXT: ori r3, r3, 34463
+; CHECK-POSTP8-NEXT: oris r3, r3, 1
+; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint32_float_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: sth r4, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui float %str to i16
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_float_uint16_t(i64 %ptr, float %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_float_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: stxsihx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_float_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpuxws f0, f1
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stxsihx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_float_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r6, 41712
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: sthx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = fptoui float %str to i16
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_float_uint16_t(i64 %ptr, float %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_float_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stxsihx f0, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_float_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: xscvdpuxws f0, f1
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stxsihx f0, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint64_float_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: sth r5, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui float %str to i16
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_float_uint16_t(i64 %ptr, float %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_float_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stxsihx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align64_float_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpuxws f0, f1
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stxsihx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align64_float_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: sthx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = fptoui float %str to i16
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_float_uint16_t(float %str) {
+; CHECK-POSTP8-LABEL: st_cst_align16_float_uint16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxws f0, f1
+; CHECK-POSTP8-NEXT: li r3, 4080
+; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align16_float_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: sth r3, 4080(0)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui float %str to i16
+ store i16 %conv, i16* inttoptr (i64 4080 to i16*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_float_uint16_t(float %str) {
+; CHECK-P10-LABEL: st_cst_align32_float_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: pli r3, 9999900
+; CHECK-P10-NEXT: stxsihx f0, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align32_float_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpuxws f0, f1
+; CHECK-P9-NEXT: lis r3, 152
+; CHECK-P9-NEXT: ori r3, r3, 38428
+; CHECK-P9-NEXT: stxsihx f0, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align32_float_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, 153
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: sth r3, -27108(r4)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui float %str to i16
+ store i16 %conv, i16* inttoptr (i64 9999900 to i16*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_float_uint16_t(float %str) {
+; CHECK-P10-LABEL: st_cst_align64_float_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: stxsihx f0, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align64_float_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpuxws f0, f1
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: stxsihx f0, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align64_float_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: sth r4, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui float %str to i16
+ store i16 %conv, i16* inttoptr (i64 1000000000000 to i16*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_float_int16_t(i64 %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_0_float_int16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
+; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_0_float_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: sth r4, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi float %str to i16
+ %0 = inttoptr i64 %ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_float_int16_t(i8* nocapture %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_align16_float_int16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
+; CHECK-POSTP8-NEXT: addi r3, r3, 8
+; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align16_float_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: sth r4, 8(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi float %str to i16
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_float_int16_t(i8* nocapture %ptr, float %str) {
+; CHECK-P10-LABEL: st_align32_float_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: stxsihx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align32_float_int16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpsxws f0, f1
+; CHECK-P9-NEXT: lis r4, 1525
+; CHECK-P9-NEXT: ori r4, r4, 56600
+; CHECK-P9-NEXT: stxsihx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align32_float_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, 1525
+; CHECK-P8-NEXT: ori r4, r4, 56600
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: sthx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi float %str to i16
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_float_int16_t(i8* nocapture %ptr, float %str) {
+; CHECK-P10-LABEL: st_align64_float_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stxsihx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align64_float_int16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpsxws f0, f1
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stxsihx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align64_float_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: sthx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi float %str to i16
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_float_int16_t(i8* nocapture %ptr, i64 %off, float %str) {
+; CHECK-POSTP8-LABEL: st_reg_float_int16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
+; CHECK-POSTP8-NEXT: stxsihx f0, r3, r4
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_reg_float_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: sthx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi float %str to i16
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_float_int16_t(i64 %ptr, i8 zeroext %off, float %str) {
+; CHECK-POSTP8-LABEL: st_or1_float_int16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
+; CHECK-POSTP8-NEXT: or r3, r4, r3
+; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_or1_float_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: sth r5, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi float %str to i16
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_float_int16_t(i64 %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_not_disjoint16_float_int16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
+; CHECK-POSTP8-NEXT: ori r3, r3, 6
+; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint16_float_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: sth r4, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi float %str to i16
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_float_int16_t(i64 %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_disjoint_align16_float_int16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
+; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-POSTP8-NEXT: ori r3, r3, 24
+; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align16_float_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: sth r4, 24(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = fptosi float %str to i16
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_float_int16_t(i64 %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_not_disjoint32_float_int16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
+; CHECK-POSTP8-NEXT: ori r3, r3, 34463
+; CHECK-POSTP8-NEXT: oris r3, r3, 1
+; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint32_float_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: sth r4, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi float %str to i16
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_float_int16_t(i64 %ptr, float %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_float_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: stxsihx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_float_int16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpsxws f0, f1
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stxsihx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_float_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r6, 41712
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: sthx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = fptosi float %str to i16
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_float_int16_t(i64 %ptr, float %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_float_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stxsihx f0, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_float_int16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: xscvdpsxws f0, f1
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stxsihx f0, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint64_float_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: sth r5, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi float %str to i16
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_float_int16_t(i64 %ptr, float %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_float_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stxsihx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align64_float_int16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpsxws f0, f1
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stxsihx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align64_float_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: mffprwz r5, f0
+; CHECK-P8-NEXT: sthx r5, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = fptosi float %str to i16
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_float_int16_t(float %str) {
+; CHECK-POSTP8-LABEL: st_cst_align16_float_int16_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxws f0, f1
+; CHECK-POSTP8-NEXT: li r3, 4080
+; CHECK-POSTP8-NEXT: stxsihx f0, 0, r3
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align16_float_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: sth r3, 4080(0)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi float %str to i16
+ store i16 %conv, i16* inttoptr (i64 4080 to i16*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_float_int16_t(float %str) {
+; CHECK-P10-LABEL: st_cst_align32_float_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: pli r3, 9999900
+; CHECK-P10-NEXT: stxsihx f0, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align32_float_int16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpsxws f0, f1
+; CHECK-P9-NEXT: lis r3, 152
+; CHECK-P9-NEXT: ori r3, r3, 38428
+; CHECK-P9-NEXT: stxsihx f0, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align32_float_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, 153
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: sth r3, -27108(r4)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi float %str to i16
+ store i16 %conv, i16* inttoptr (i64 9999900 to i16*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_float_int16_t(float %str) {
+; CHECK-P10-LABEL: st_cst_align64_float_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: stxsihx f0, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align64_float_int16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpsxws f0, f1
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: stxsihx f0, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align64_float_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: mffprwz r4, f0
+; CHECK-P8-NEXT: sth r4, 0(r3)
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi float %str to i16
+ store i16 %conv, i16* inttoptr (i64 1000000000000 to i16*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_float_uint32_t(i64 %ptr, float %str) {
+; CHECK-LABEL: st_0_float_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xscvdpuxws f0, f1
+; CHECK-NEXT: stfiwx f0, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = fptoui float %str to i32
+ %0 = inttoptr i64 %ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_float_uint32_t(i8* nocapture %ptr, float %str) {
+; CHECK-LABEL: st_align16_float_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xscvdpuxws f0, f1
+; CHECK-NEXT: addi r3, r3, 8
+; CHECK-NEXT: stfiwx f0, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = fptoui float %str to i32
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_float_uint32_t(i8* nocapture %ptr, float %str) {
+; CHECK-P10-LABEL: st_align32_float_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: stfiwx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_float_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: xscvdpuxws f0, f1
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: stfiwx f0, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = fptoui float %str to i32
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_float_uint32_t(i8* nocapture %ptr, float %str) {
+; CHECK-P10-LABEL: st_align64_float_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stfiwx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_float_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: xscvdpuxws f0, f1
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stfiwx f0, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = fptoui float %str to i32
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_float_uint32_t(i8* nocapture %ptr, i64 %off, float %str) {
+; CHECK-LABEL: st_reg_float_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xscvdpuxws f0, f1
+; CHECK-NEXT: stfiwx f0, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = fptoui float %str to i32
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_float_uint32_t(i64 %ptr, i8 zeroext %off, float %str) {
+; CHECK-LABEL: st_or1_float_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xscvdpuxws f0, f1
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: stfiwx f0, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = fptoui float %str to i32
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_float_uint32_t(i64 %ptr, float %str) {
+; CHECK-LABEL: st_not_disjoint16_float_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xscvdpuxws f0, f1
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: stfiwx f0, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = fptoui float %str to i32
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_float_uint32_t(i64 %ptr, float %str) {
+; CHECK-LABEL: st_disjoint_align16_float_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xscvdpuxws f0, f1
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: ori r3, r3, 24
+; CHECK-NEXT: stfiwx f0, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = fptoui float %str to i32
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_float_uint32_t(i64 %ptr, float %str) {
+; CHECK-LABEL: st_not_disjoint32_float_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xscvdpuxws f0, f1
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: stfiwx f0, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = fptoui float %str to i32
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_float_uint32_t(i64 %ptr, float %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_float_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: stfiwx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_float_uint32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpuxws f0, f1
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stfiwx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_float_uint32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpuxws f0, f1
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: stfiwx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = fptoui float %str to i32
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_float_uint32_t(i64 %ptr, float %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_float_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stfiwx f0, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_float_uint32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: xscvdpuxws f0, f1
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stfiwx f0, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint64_float_uint32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpuxws f0, f1
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: stfiwx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui float %str to i32
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_float_uint32_t(i64 %ptr, float %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_float_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stfiwx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_float_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: xscvdpuxws f0, f1
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stfiwx f0, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = fptoui float %str to i32
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_float_uint32_t(float %str) {
+; CHECK-LABEL: st_cst_align16_float_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xscvdpuxws f0, f1
+; CHECK-NEXT: li r3, 4080
+; CHECK-NEXT: stfiwx f0, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = fptoui float %str to i32
+ store i32 %conv, i32* inttoptr (i64 4080 to i32*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_float_uint32_t(float %str) {
+; CHECK-P10-LABEL: st_cst_align32_float_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: pli r3, 9999900
+; CHECK-P10-NEXT: stfiwx f0, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align32_float_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: xscvdpuxws f0, f1
+; CHECK-PREP10-NEXT: lis r3, 152
+; CHECK-PREP10-NEXT: ori r3, r3, 38428
+; CHECK-PREP10-NEXT: stfiwx f0, 0, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = fptoui float %str to i32
+ store i32 %conv, i32* inttoptr (i64 9999900 to i32*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_float_uint32_t(float %str) {
+; CHECK-P10-LABEL: st_cst_align64_float_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxws f0, f1
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: stfiwx f0, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_float_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: xscvdpuxws f0, f1
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: stfiwx f0, 0, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = fptoui float %str to i32
+ store i32 %conv, i32* inttoptr (i64 1000000000000 to i32*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_float_int32_t(i64 %ptr, float %str) {
+; CHECK-LABEL: st_0_float_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xscvdpsxws f0, f1
+; CHECK-NEXT: stfiwx f0, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = fptosi float %str to i32
+ %0 = inttoptr i64 %ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_float_int32_t(i8* nocapture %ptr, float %str) {
+; CHECK-LABEL: st_align16_float_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xscvdpsxws f0, f1
+; CHECK-NEXT: addi r3, r3, 8
+; CHECK-NEXT: stfiwx f0, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = fptosi float %str to i32
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_float_int32_t(i8* nocapture %ptr, float %str) {
+; CHECK-P10-LABEL: st_align32_float_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: stfiwx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_float_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f1
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: stfiwx f0, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = fptosi float %str to i32
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_float_int32_t(i8* nocapture %ptr, float %str) {
+; CHECK-P10-LABEL: st_align64_float_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stfiwx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_float_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f1
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stfiwx f0, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = fptosi float %str to i32
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_float_int32_t(i8* nocapture %ptr, i64 %off, float %str) {
+; CHECK-LABEL: st_reg_float_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xscvdpsxws f0, f1
+; CHECK-NEXT: stfiwx f0, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = fptosi float %str to i32
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_float_int32_t(i64 %ptr, i8 zeroext %off, float %str) {
+; CHECK-LABEL: st_or1_float_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xscvdpsxws f0, f1
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: stfiwx f0, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = fptosi float %str to i32
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_float_int32_t(i64 %ptr, float %str) {
+; CHECK-LABEL: st_not_disjoint16_float_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xscvdpsxws f0, f1
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: stfiwx f0, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = fptosi float %str to i32
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_float_int32_t(i64 %ptr, float %str) {
+; CHECK-LABEL: st_disjoint_align16_float_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xscvdpsxws f0, f1
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: ori r3, r3, 24
+; CHECK-NEXT: stfiwx f0, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = fptosi float %str to i32
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_float_int32_t(i64 %ptr, float %str) {
+; CHECK-LABEL: st_not_disjoint32_float_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xscvdpsxws f0, f1
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: stfiwx f0, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = fptosi float %str to i32
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_float_int32_t(i64 %ptr, float %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_float_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: stfiwx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_float_int32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpsxws f0, f1
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stfiwx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_float_int32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: stfiwx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = fptosi float %str to i32
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_float_int32_t(i64 %ptr, float %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_float_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stfiwx f0, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_float_int32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: xscvdpsxws f0, f1
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stfiwx f0, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint64_float_int32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxws f0, f1
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: stfiwx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi float %str to i32
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_float_int32_t(i64 %ptr, float %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_float_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stfiwx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_float_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f1
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stfiwx f0, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = fptosi float %str to i32
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_float_int32_t(float %str) {
+; CHECK-LABEL: st_cst_align16_float_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xscvdpsxws f0, f1
+; CHECK-NEXT: li r3, 4080
+; CHECK-NEXT: stfiwx f0, 0, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = fptosi float %str to i32
+ store i32 %conv, i32* inttoptr (i64 4080 to i32*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_float_int32_t(float %str) {
+; CHECK-P10-LABEL: st_cst_align32_float_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: pli r3, 9999900
+; CHECK-P10-NEXT: stfiwx f0, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align32_float_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f1
+; CHECK-PREP10-NEXT: lis r3, 152
+; CHECK-PREP10-NEXT: ori r3, r3, 38428
+; CHECK-PREP10-NEXT: stfiwx f0, 0, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = fptosi float %str to i32
+ store i32 %conv, i32* inttoptr (i64 9999900 to i32*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_float_int32_t(float %str) {
+; CHECK-P10-LABEL: st_cst_align64_float_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxws f0, f1
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: stfiwx f0, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_float_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f1
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: stfiwx f0, 0, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = fptosi float %str to i32
+ store i32 %conv, i32* inttoptr (i64 1000000000000 to i32*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_float_uint64_t(i64 %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_0_float_uint64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxds v2, f1
+; CHECK-POSTP8-NEXT: stxsd v2, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_0_float_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpuxds f0, f1
+; CHECK-P8-NEXT: stxsdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui float %str to i64
+ %0 = inttoptr i64 %ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_float_uint64_t(i8* nocapture %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_align16_float_uint64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxds v2, f1
+; CHECK-POSTP8-NEXT: stxsd v2, 8(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align16_float_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpuxds f0, f1
+; CHECK-P8-NEXT: li r4, 8
+; CHECK-P8-NEXT: stxsdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui float %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_float_uint64_t(i8* nocapture %ptr, float %str) {
+; CHECK-P10-LABEL: st_align32_float_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxds f0, f1
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: stxsdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_float_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: xscvdpuxds f0, f1
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: stxsdx f0, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = fptoui float %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_float_uint64_t(i8* nocapture %ptr, float %str) {
+; CHECK-P10-LABEL: st_align64_float_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxds f0, f1
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stxsdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_float_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: xscvdpuxds f0, f1
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stxsdx f0, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = fptoui float %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_float_uint64_t(i8* nocapture %ptr, i64 %off, float %str) {
+; CHECK-LABEL: st_reg_float_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xscvdpuxds f0, f1
+; CHECK-NEXT: stxsdx f0, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = fptoui float %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_float_uint64_t(i64 %ptr, i8 zeroext %off, float %str) {
+; CHECK-POSTP8-LABEL: st_or1_float_uint64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxds v2, f1
+; CHECK-POSTP8-NEXT: or r3, r4, r3
+; CHECK-POSTP8-NEXT: stxsd v2, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_or1_float_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpuxds f0, f1
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: stxsdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui float %str to i64
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_float_uint64_t(i64 %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_not_disjoint16_float_uint64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxds v2, f1
+; CHECK-POSTP8-NEXT: ori r3, r3, 6
+; CHECK-POSTP8-NEXT: stxsd v2, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint16_float_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpuxds f0, f1
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: stxsdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui float %str to i64
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_float_uint64_t(i64 %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_disjoint_align16_float_uint64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxds v2, f1
+; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-POSTP8-NEXT: stxsd v2, 24(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align16_float_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpuxds f0, f1
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: stxsdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = fptoui float %str to i64
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_float_uint64_t(i64 %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_not_disjoint32_float_uint64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxds v2, f1
+; CHECK-POSTP8-NEXT: ori r3, r3, 34463
+; CHECK-POSTP8-NEXT: oris r3, r3, 1
+; CHECK-POSTP8-NEXT: stxsd v2, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint32_float_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpuxds f0, f1
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: stxsdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui float %str to i64
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_float_uint64_t(i64 %ptr, float %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_float_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxds f0, f1
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: stxsdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_float_uint64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpuxds f0, f1
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stxsdx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_float_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpuxds f0, f1
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: stxsdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = fptoui float %str to i64
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_float_uint64_t(i64 %ptr, float %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_float_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxds v2, f1
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stxsd v2, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_float_uint64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: xscvdpuxds v2, f1
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stxsd v2, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint64_float_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpuxds f0, f1
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: stxsdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui float %str to i64
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_float_uint64_t(i64 %ptr, float %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_float_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxds f0, f1
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stxsdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_float_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: xscvdpuxds f0, f1
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stxsdx f0, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = fptoui float %str to i64
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_float_uint64_t(float %str) {
+; CHECK-POSTP8-LABEL: st_cst_align16_float_uint64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxds v2, f1
+; CHECK-POSTP8-NEXT: stxsd v2, 4080(0)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align16_float_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpuxds f0, f1
+; CHECK-P8-NEXT: li r3, 4080
+; CHECK-P8-NEXT: stxsdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui float %str to i64
+ store i64 %conv, i64* inttoptr (i64 4080 to i64*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_float_uint64_t(float %str) {
+; CHECK-POSTP8-LABEL: st_cst_align32_float_uint64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpuxds v2, f1
+; CHECK-POSTP8-NEXT: lis r3, 153
+; CHECK-POSTP8-NEXT: stxsd v2, -27108(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align32_float_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpuxds f0, f1
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: stxsdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui float %str to i64
+ store i64 %conv, i64* inttoptr (i64 9999900 to i64*), align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_float_uint64_t(float %str) {
+; CHECK-P10-LABEL: st_cst_align64_float_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpuxds v2, f1
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: stxsd v2, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align64_float_uint64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpuxds v2, f1
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: stxsd v2, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align64_float_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpuxds f0, f1
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: stxsdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptoui float %str to i64
+ store i64 %conv, i64* inttoptr (i64 1000000000000 to i64*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_float_int64_t(i64 %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_0_float_int64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxds v2, f1
+; CHECK-POSTP8-NEXT: stxsd v2, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_0_float_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxds f0, f1
+; CHECK-P8-NEXT: stxsdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi float %str to i64
+ %0 = inttoptr i64 %ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_float_int64_t(i8* nocapture %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_align16_float_int64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxds v2, f1
+; CHECK-POSTP8-NEXT: stxsd v2, 8(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align16_float_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxds f0, f1
+; CHECK-P8-NEXT: li r4, 8
+; CHECK-P8-NEXT: stxsdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi float %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_float_int64_t(i8* nocapture %ptr, float %str) {
+; CHECK-P10-LABEL: st_align32_float_int64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxds f0, f1
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: stxsdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_float_int64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: xscvdpsxds f0, f1
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: stxsdx f0, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = fptosi float %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_float_int64_t(i8* nocapture %ptr, float %str) {
+; CHECK-P10-LABEL: st_align64_float_int64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxds f0, f1
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stxsdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_float_int64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: xscvdpsxds f0, f1
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stxsdx f0, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = fptosi float %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_float_int64_t(i8* nocapture %ptr, i64 %off, float %str) {
+; CHECK-LABEL: st_reg_float_int64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: xscvdpsxds f0, f1
+; CHECK-NEXT: stxsdx f0, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = fptosi float %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_float_int64_t(i64 %ptr, i8 zeroext %off, float %str) {
+; CHECK-POSTP8-LABEL: st_or1_float_int64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxds v2, f1
+; CHECK-POSTP8-NEXT: or r3, r4, r3
+; CHECK-POSTP8-NEXT: stxsd v2, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_or1_float_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxds f0, f1
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: stxsdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi float %str to i64
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_float_int64_t(i64 %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_not_disjoint16_float_int64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxds v2, f1
+; CHECK-POSTP8-NEXT: ori r3, r3, 6
+; CHECK-POSTP8-NEXT: stxsd v2, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint16_float_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxds f0, f1
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: stxsdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi float %str to i64
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_float_int64_t(i64 %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_disjoint_align16_float_int64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxds v2, f1
+; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-POSTP8-NEXT: stxsd v2, 24(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align16_float_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxds f0, f1
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: stxsdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = fptosi float %str to i64
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_float_int64_t(i64 %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_not_disjoint32_float_int64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxds v2, f1
+; CHECK-POSTP8-NEXT: ori r3, r3, 34463
+; CHECK-POSTP8-NEXT: oris r3, r3, 1
+; CHECK-POSTP8-NEXT: stxsd v2, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint32_float_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxds f0, f1
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: stxsdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi float %str to i64
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_float_int64_t(i64 %ptr, float %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_float_int64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxds f0, f1
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: stxsdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_float_int64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpsxds f0, f1
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stxsdx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_float_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxds f0, f1
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: stxsdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = fptosi float %str to i64
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_float_int64_t(i64 %ptr, float %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_float_int64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxds v2, f1
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stxsd v2, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_float_int64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: xscvdpsxds v2, f1
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stxsd v2, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint64_float_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxds f0, f1
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: stxsdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi float %str to i64
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_float_int64_t(i64 %ptr, float %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_float_int64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxds f0, f1
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stxsdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_float_int64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: xscvdpsxds f0, f1
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stxsdx f0, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = fptosi float %str to i64
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_float_int64_t(float %str) {
+; CHECK-POSTP8-LABEL: st_cst_align16_float_int64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxds v2, f1
+; CHECK-POSTP8-NEXT: stxsd v2, 4080(0)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align16_float_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxds f0, f1
+; CHECK-P8-NEXT: li r3, 4080
+; CHECK-P8-NEXT: stxsdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi float %str to i64
+ store i64 %conv, i64* inttoptr (i64 4080 to i64*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_float_int64_t(float %str) {
+; CHECK-POSTP8-LABEL: st_cst_align32_float_int64_t:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: xscvdpsxds v2, f1
+; CHECK-POSTP8-NEXT: lis r3, 153
+; CHECK-POSTP8-NEXT: stxsd v2, -27108(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align32_float_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxds f0, f1
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: stxsdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi float %str to i64
+ store i64 %conv, i64* inttoptr (i64 9999900 to i64*), align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_float_int64_t(float %str) {
+; CHECK-P10-LABEL: st_cst_align64_float_int64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: xscvdpsxds v2, f1
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: stxsd v2, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align64_float_int64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: xscvdpsxds v2, f1
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: stxsd v2, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align64_float_int64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: xscvdpsxds f0, f1
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: stxsdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fptosi float %str to i64
+ store i64 %conv, i64* inttoptr (i64 1000000000000 to i64*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_float_float(i64 %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_0_float_float:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: stfs f1, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_0_float_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: stfsx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to float*
+ store float %str, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_float_float(i8* nocapture %ptr, float %str) {
+; CHECK-LABEL: st_align16_float_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stfs f1, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to float*
+ store float %str, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_float_float(i8* nocapture %ptr, float %str) {
+; CHECK-P10-LABEL: st_align32_float_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: stfsx f1, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_float_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: stfsx f1, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to float*
+ store float %str, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_float_float(i8* nocapture %ptr, float %str) {
+; CHECK-P10-LABEL: st_align64_float_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stfsx f1, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_float_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stfsx f1, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to float*
+ store float %str, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_float_float(i8* nocapture %ptr, i64 %off, float %str) {
+; CHECK-LABEL: st_reg_float_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stfsx f1, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to float*
+ store float %str, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_float_float(i64 %ptr, i8 zeroext %off, float %str) {
+; CHECK-POSTP8-LABEL: st_or1_float_float:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: or r3, r4, r3
+; CHECK-POSTP8-NEXT: stfs f1, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_or1_float_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: stfsx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to float*
+ store float %str, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_float_float(i64 %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_not_disjoint16_float_float:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 6
+; CHECK-POSTP8-NEXT: stfs f1, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint16_float_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: stfsx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to float*
+ store float %str, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_float_float(i64 %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_disjoint_align16_float_float:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-POSTP8-NEXT: stfs f1, 24(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align16_float_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: stfsx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to float*
+ store float %str, float* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_float_float(i64 %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_not_disjoint32_float_float:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 34463
+; CHECK-POSTP8-NEXT: oris r3, r3, 1
+; CHECK-POSTP8-NEXT: stfs f1, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint32_float_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: stfsx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to float*
+ store float %str, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_float_float(i64 %ptr, float %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_float_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: stfsx f1, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_float_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stfsx f1, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_float_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: stfsx f1, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to float*
+ store float %str, float* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_float_float(i64 %ptr, float %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_float_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stfs f1, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_float_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stfs f1, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint64_float_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: stfsx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to float*
+ store float %str, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_float_float(i64 %ptr, float %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_float_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stfsx f1, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_float_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stfsx f1, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to float*
+ store float %str, float* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_float_float(float %str) {
+; CHECK-LABEL: st_cst_align16_float_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stfs f1, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ store float %str, float* inttoptr (i64 4080 to float*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_float_float(float %str) {
+; CHECK-POSTP8-LABEL: st_cst_align32_float_float:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: lis r3, 153
+; CHECK-POSTP8-NEXT: stfs f1, -27108(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align32_float_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: stfsx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ store float %str, float* inttoptr (i64 9999900 to float*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_float_float(float %str) {
+; CHECK-P10-LABEL: st_cst_align64_float_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: stfs f1, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align64_float_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: stfs f1, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align64_float_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: stfsx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ store float %str, float* inttoptr (i64 1000000000000 to float*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_float_double(i64 %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_0_float_double:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: stfd f1, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_0_float_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: stfdx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fpext float %str to double
+ %0 = inttoptr i64 %ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_float_double(i8* nocapture %ptr, float %str) {
+; CHECK-LABEL: st_align16_float_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stfd f1, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = fpext float %str to double
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_float_double(i8* nocapture %ptr, float %str) {
+; CHECK-P10-LABEL: st_align32_float_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: stfdx f1, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_float_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: stfdx f1, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = fpext float %str to double
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_float_double(i8* nocapture %ptr, float %str) {
+; CHECK-P10-LABEL: st_align64_float_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stfdx f1, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_float_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stfdx f1, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = fpext float %str to double
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_float_double(i8* nocapture %ptr, i64 %off, float %str) {
+; CHECK-LABEL: st_reg_float_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stfdx f1, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = fpext float %str to double
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_float_double(i64 %ptr, i8 zeroext %off, float %str) {
+; CHECK-POSTP8-LABEL: st_or1_float_double:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: or r3, r4, r3
+; CHECK-POSTP8-NEXT: stfd f1, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_or1_float_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: stfdx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fpext float %str to double
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_float_double(i64 %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_not_disjoint16_float_double:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 6
+; CHECK-POSTP8-NEXT: stfd f1, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint16_float_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: stfdx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fpext float %str to double
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_float_double(i64 %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_disjoint_align16_float_double:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-POSTP8-NEXT: stfd f1, 24(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align16_float_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: stfdx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = fpext float %str to double
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_float_double(i64 %ptr, float %str) {
+; CHECK-POSTP8-LABEL: st_not_disjoint32_float_double:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: ori r3, r3, 34463
+; CHECK-POSTP8-NEXT: oris r3, r3, 1
+; CHECK-POSTP8-NEXT: stfd f1, 0(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint32_float_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: stfdx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fpext float %str to double
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_float_double(i64 %ptr, float %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_float_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: stfdx f1, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_float_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stfdx f1, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_float_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: stfdx f1, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = fpext float %str to double
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_float_double(i64 %ptr, float %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_float_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stfd f1, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_float_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stfd f1, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint64_float_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: stfdx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fpext float %str to double
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_float_double(i64 %ptr, float %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_float_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stfdx f1, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_float_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stfdx f1, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = fpext float %str to double
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_float_double(float %str) {
+; CHECK-LABEL: st_cst_align16_float_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stfd f1, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = fpext float %str to double
+ store double %conv, double* inttoptr (i64 4080 to double*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_float_double(float %str) {
+; CHECK-POSTP8-LABEL: st_cst_align32_float_double:
+; CHECK-POSTP8: # %bb.0: # %entry
+; CHECK-POSTP8-NEXT: lis r3, 153
+; CHECK-POSTP8-NEXT: stfd f1, -27108(r3)
+; CHECK-POSTP8-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align32_float_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: stfdx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fpext float %str to double
+ store double %conv, double* inttoptr (i64 9999900 to double*), align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_float_double(float %str) {
+; CHECK-P10-LABEL: st_cst_align64_float_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: stfd f1, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align64_float_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: stfd f1, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align64_float_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: stfdx f1, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = fpext float %str to double
+ store double %conv, double* inttoptr (i64 1000000000000 to double*), align 4096
+ ret void
+}
--- /dev/null
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-P10,CHECK-LE,CHECK-P10-LE
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-P10,CHECK-BE,CHECK-P10-BE
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P9,CHECK-LE,CHECK-P9-LE
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P9,CHECK-BE,CHECK-P9-BE
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P8,CHECK-LE,CHECK-P8-LE
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P8,CHECK-BE,CHECK-P8-BE
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_0_int16_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_int16_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = sext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_align16_int16_t_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_int16_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 8(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = sext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_align32_int16_t_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_int16_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_int16_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = sext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_align64_int16_t_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_int16_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_int16_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = sext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_reg_int16_t_int8_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_int16_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbzx r3, r3, r4
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = sext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_or_int16_t_int8_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_int16_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv1 = sext i8 %1 to i16
+ ret i16 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_not_disjoint16_int16_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_int16_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = sext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_disjoint_align16_int16_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_int16_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lbz r3, 24(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 8
+ %conv = sext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_not_disjoint32_int16_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_int16_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = sext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_disjoint_align32_int16_t_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_int16_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_int16_t_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lbzx r3, r3, r4
+; CHECK-P9-NEXT: extsb r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_int16_t_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 16
+ %conv = sext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_not_disjoint64_int16_t_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_int16_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_int16_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = sext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_disjoint_align64_int16_t_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_int16_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_int16_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 4096
+ %conv = sext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_cst_align16_int16_t_int8_t() {
+; CHECK-LABEL: ld_cst_align16_int16_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 4080(0)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 4080 to i8*), align 16
+ %conv = sext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_cst_align32_int16_t_int8_t() {
+; CHECK-LABEL: ld_cst_align32_int16_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lbz r3, -27108(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 9999900 to i8*), align 4
+ %conv = sext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_cst_align64_int16_t_int8_t() {
+; CHECK-P10-LABEL: ld_cst_align64_int16_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_int16_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 1000000000000 to i8*), align 4096
+ %conv = sext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_0_int16_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_int16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lha r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ ret i16 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_align16_int16_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_int16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lha r3, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ ret i16 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_align32_int16_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_int16_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lhax r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_int16_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lhax r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ ret i16 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_align64_int16_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_int16_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhax r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_int16_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhax r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ ret i16 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_reg_int16_t_uint16_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_int16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhax r3, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ ret i16 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_or_int16_t_uint16_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_int16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lha r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ ret i16 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_not_disjoint16_int16_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_int16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lha r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ ret i16 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_disjoint_align16_int16_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_int16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lha r3, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 8
+ ret i16 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_not_disjoint32_int16_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_int16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lha r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ ret i16 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_disjoint_align32_int16_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_int16_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lhax r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_int16_t_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lhax r3, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_int16_t_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lhax r3, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 16
+ ret i16 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_not_disjoint64_int16_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_int16_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lha r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_int16_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lha r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ ret i16 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_disjoint_align64_int16_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_int16_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhax r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_int16_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhax r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 4096
+ ret i16 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_cst_align16_int16_t_uint16_t() {
+; CHECK-LABEL: ld_cst_align16_int16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lha r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 4080 to i16*), align 16
+ ret i16 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_cst_align32_int16_t_uint16_t() {
+; CHECK-LABEL: ld_cst_align32_int16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lha r3, -27108(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 9999900 to i16*), align 4
+ ret i16 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_cst_align64_int16_t_uint16_t() {
+; CHECK-P10-LABEL: ld_cst_align64_int16_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lha r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_int16_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lha r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 1000000000000 to i16*), align 4096
+ ret i16 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_0_int16_t_uint32_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_0_int16_t_uint32_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lha r3, 0(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_0_int16_t_uint32_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lha r3, 2(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_align16_int16_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-LE-LABEL: ld_align16_int16_t_uint32_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lha r3, 8(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_align16_int16_t_uint32_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lha r3, 10(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_align32_int16_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LE-LABEL: ld_align32_int16_t_uint32_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 99999000
+; CHECK-P10-LE-NEXT: lhax r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_align32_int16_t_uint32_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 99999002
+; CHECK-P10-BE-NEXT: lhax r3, r3, r4
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_align32_int16_t_uint32_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, 1525
+; CHECK-P9-LE-NEXT: ori r4, r4, 56600
+; CHECK-P9-LE-NEXT: lhax r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_align32_int16_t_uint32_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: lis r4, 1525
+; CHECK-P9-BE-NEXT: ori r4, r4, 56602
+; CHECK-P9-BE-NEXT: lhax r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_align32_int16_t_uint32_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 1525
+; CHECK-P8-LE-NEXT: ori r4, r4, 56600
+; CHECK-P8-LE-NEXT: lhax r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_align32_int16_t_uint32_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r4, 1525
+; CHECK-P8-BE-NEXT: ori r4, r4, 56602
+; CHECK-P8-BE-NEXT: lhax r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_align64_int16_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LE-LABEL: ld_align64_int16_t_uint32_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 244140625
+; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-LE-NEXT: lhax r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_align64_int16_t_uint32_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587330
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: lhax r3, r3, r5
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_align64_int16_t_uint32_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, 3725
+; CHECK-P9-LE-NEXT: ori r4, r4, 19025
+; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-LE-NEXT: lhax r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_align64_int16_t_uint32_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4098
+; CHECK-P9-BE-NEXT: lhax r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_align64_int16_t_uint32_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 3725
+; CHECK-P8-LE-NEXT: ori r4, r4, 19025
+; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-LE-NEXT: lhax r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_align64_int16_t_uint32_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4098
+; CHECK-P8-BE-NEXT: lhax r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_reg_int16_t_uint32_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LE-LABEL: ld_reg_int16_t_uint32_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lhax r3, r3, r4
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_reg_int16_t_uint32_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: add r3, r3, r4
+; CHECK-BE-NEXT: lha r3, 2(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_or_int16_t_uint32_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LE-LABEL: ld_or_int16_t_uint32_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: or r3, r4, r3
+; CHECK-LE-NEXT: lha r3, 0(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_or_int16_t_uint32_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: or r3, r4, r3
+; CHECK-BE-NEXT: lha r3, 2(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv1 = trunc i32 %1 to i16
+ ret i16 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_not_disjoint16_int16_t_uint32_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_not_disjoint16_int16_t_uint32_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: ori r3, r3, 6
+; CHECK-LE-NEXT: lha r3, 0(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_not_disjoint16_int16_t_uint32_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: ori r3, r3, 6
+; CHECK-BE-NEXT: lha r3, 2(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_disjoint_align16_int16_t_uint32_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_disjoint_align16_int16_t_uint32_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-LE-NEXT: lha r3, 24(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_disjoint_align16_int16_t_uint32_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-BE-NEXT: lha r3, 26(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 8
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_not_disjoint32_int16_t_uint32_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_not_disjoint32_int16_t_uint32_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: ori r3, r3, 34463
+; CHECK-LE-NEXT: oris r3, r3, 1
+; CHECK-LE-NEXT: lha r3, 0(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_not_disjoint32_int16_t_uint32_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: ori r3, r3, 34463
+; CHECK-BE-NEXT: oris r3, r3, 1
+; CHECK-BE-NEXT: lha r3, 2(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_disjoint_align32_int16_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_disjoint_align32_int16_t_uint32_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: lis r4, -15264
+; CHECK-P10-LE-NEXT: and r3, r3, r4
+; CHECK-P10-LE-NEXT: pli r4, 999990000
+; CHECK-P10-LE-NEXT: lhax r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_disjoint_align32_int16_t_uint32_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: lis r4, -15264
+; CHECK-P10-BE-NEXT: and r3, r3, r4
+; CHECK-P10-BE-NEXT: pli r4, 999990002
+; CHECK-P10-BE-NEXT: lhax r3, r3, r4
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_disjoint_align32_int16_t_uint32_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, -15264
+; CHECK-P9-LE-NEXT: and r3, r3, r4
+; CHECK-P9-LE-NEXT: lis r4, 15258
+; CHECK-P9-LE-NEXT: ori r4, r4, 41712
+; CHECK-P9-LE-NEXT: lhax r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_disjoint_align32_int16_t_uint32_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: lis r4, -15264
+; CHECK-P9-BE-NEXT: and r3, r3, r4
+; CHECK-P9-BE-NEXT: lis r4, 15258
+; CHECK-P9-BE-NEXT: ori r4, r4, 41714
+; CHECK-P9-BE-NEXT: lhax r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_disjoint_align32_int16_t_uint32_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, -15264
+; CHECK-P8-LE-NEXT: lis r5, 15258
+; CHECK-P8-LE-NEXT: and r3, r3, r4
+; CHECK-P8-LE-NEXT: ori r4, r5, 41712
+; CHECK-P8-LE-NEXT: lhax r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_disjoint_align32_int16_t_uint32_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r4, -15264
+; CHECK-P8-BE-NEXT: lis r5, 15258
+; CHECK-P8-BE-NEXT: and r3, r3, r4
+; CHECK-P8-BE-NEXT: ori r4, r5, 41714
+; CHECK-P8-BE-NEXT: lhax r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 16
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_not_disjoint64_int16_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_not_disjoint64_int16_t_uint32_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 232
+; CHECK-P10-LE-NEXT: pli r5, 3567587329
+; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-LE-NEXT: or r3, r3, r5
+; CHECK-P10-LE-NEXT: lha r3, 0(r3)
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_not_disjoint64_int16_t_uint32_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587329
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: or r3, r3, r5
+; CHECK-P10-BE-NEXT: lha r3, 2(r3)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_not_disjoint64_int16_t_uint32_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: li r4, 29
+; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-LE-NEXT: oris r4, r4, 54437
+; CHECK-P9-LE-NEXT: ori r4, r4, 4097
+; CHECK-P9-LE-NEXT: or r3, r3, r4
+; CHECK-P9-LE-NEXT: lha r3, 0(r3)
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_not_disjoint64_int16_t_uint32_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4097
+; CHECK-P9-BE-NEXT: or r3, r3, r4
+; CHECK-P9-BE-NEXT: lha r3, 2(r3)
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_not_disjoint64_int16_t_uint32_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: li r4, 29
+; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-LE-NEXT: oris r4, r4, 54437
+; CHECK-P8-LE-NEXT: ori r4, r4, 4097
+; CHECK-P8-LE-NEXT: or r3, r3, r4
+; CHECK-P8-LE-NEXT: lha r3, 0(r3)
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_not_disjoint64_int16_t_uint32_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4097
+; CHECK-P8-BE-NEXT: or r3, r3, r4
+; CHECK-P8-BE-NEXT: lha r3, 2(r3)
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_disjoint_align64_int16_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_disjoint_align64_int16_t_uint32_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 244140625
+; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-LE-NEXT: lhax r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_disjoint_align64_int16_t_uint32_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587330
+; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: lhax r3, r3, r5
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_disjoint_align64_int16_t_uint32_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, 3725
+; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-LE-NEXT: ori r4, r4, 19025
+; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-LE-NEXT: lhax r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_disjoint_align64_int16_t_uint32_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4098
+; CHECK-P9-BE-NEXT: lhax r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_disjoint_align64_int16_t_uint32_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 3725
+; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-LE-NEXT: ori r4, r4, 19025
+; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-LE-NEXT: lhax r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_disjoint_align64_int16_t_uint32_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4098
+; CHECK-P8-BE-NEXT: lhax r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4096
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_cst_align16_int16_t_uint32_t() {
+; CHECK-LE-LABEL: ld_cst_align16_int16_t_uint32_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lha r3, 4080(0)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_cst_align16_int16_t_uint32_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lha r3, 4082(0)
+; CHECK-BE-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 4080 to i32*), align 16
+ %conv = trunc i32 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_cst_align32_int16_t_uint32_t() {
+; CHECK-LE-LABEL: ld_cst_align32_int16_t_uint32_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lis r3, 153
+; CHECK-LE-NEXT: lha r3, -27108(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_cst_align32_int16_t_uint32_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lis r3, 153
+; CHECK-BE-NEXT: lha r3, -27106(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 9999900 to i32*), align 4
+ %conv = trunc i32 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_cst_align64_int16_t_uint32_t() {
+; CHECK-P10-LE-LABEL: ld_cst_align64_int16_t_uint32_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r3, 244140625
+; CHECK-P10-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-LE-NEXT: lha r3, 0(r3)
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_cst_align64_int16_t_uint32_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r3, 232
+; CHECK-P10-BE-NEXT: pli r4, 3567587330
+; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
+; CHECK-P10-BE-NEXT: lha r3, 0(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_cst_align64_int16_t_uint32_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r3, 3725
+; CHECK-P9-LE-NEXT: ori r3, r3, 19025
+; CHECK-P9-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-LE-NEXT: lha r3, 0(r3)
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_cst_align64_int16_t_uint32_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r3, 29
+; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P9-BE-NEXT: oris r3, r3, 54437
+; CHECK-P9-BE-NEXT: ori r3, r3, 4098
+; CHECK-P9-BE-NEXT: lha r3, 0(r3)
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_cst_align64_int16_t_uint32_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r3, 3725
+; CHECK-P8-LE-NEXT: ori r3, r3, 19025
+; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-LE-NEXT: lha r3, 0(r3)
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_cst_align64_int16_t_uint32_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r3, 29
+; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P8-BE-NEXT: oris r3, r3, 54437
+; CHECK-P8-BE-NEXT: ori r3, r3, 4098
+; CHECK-P8-BE-NEXT: lha r3, 0(r3)
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 1000000000000 to i32*), align 4096
+ %conv = trunc i32 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_0_int16_t_uint64_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_0_int16_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lha r3, 0(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_0_int16_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lha r3, 6(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_align16_int16_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-LE-LABEL: ld_align16_int16_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lha r3, 8(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_align16_int16_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lha r3, 14(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_align32_int16_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LE-LABEL: ld_align32_int16_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 99999000
+; CHECK-P10-LE-NEXT: lhax r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_align32_int16_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 99999006
+; CHECK-P10-BE-NEXT: lhax r3, r3, r4
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_align32_int16_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, 1525
+; CHECK-P9-LE-NEXT: ori r4, r4, 56600
+; CHECK-P9-LE-NEXT: lhax r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_align32_int16_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: lis r4, 1525
+; CHECK-P9-BE-NEXT: ori r4, r4, 56606
+; CHECK-P9-BE-NEXT: lhax r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_align32_int16_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 1525
+; CHECK-P8-LE-NEXT: ori r4, r4, 56600
+; CHECK-P8-LE-NEXT: lhax r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_align32_int16_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r4, 1525
+; CHECK-P8-BE-NEXT: ori r4, r4, 56606
+; CHECK-P8-BE-NEXT: lhax r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_align64_int16_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LE-LABEL: ld_align64_int16_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 244140625
+; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-LE-NEXT: lhax r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_align64_int16_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587334
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: lhax r3, r3, r5
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_align64_int16_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, 3725
+; CHECK-P9-LE-NEXT: ori r4, r4, 19025
+; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-LE-NEXT: lhax r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_align64_int16_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4102
+; CHECK-P9-BE-NEXT: lhax r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_align64_int16_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 3725
+; CHECK-P8-LE-NEXT: ori r4, r4, 19025
+; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-LE-NEXT: lhax r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_align64_int16_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4102
+; CHECK-P8-BE-NEXT: lhax r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_reg_int16_t_uint64_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LE-LABEL: ld_reg_int16_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lhax r3, r3, r4
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_reg_int16_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: add r3, r3, r4
+; CHECK-BE-NEXT: lha r3, 6(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_or_int16_t_uint64_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LE-LABEL: ld_or_int16_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: or r3, r4, r3
+; CHECK-LE-NEXT: lha r3, 0(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_or_int16_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: or r3, r4, r3
+; CHECK-BE-NEXT: lha r3, 6(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv1 = trunc i64 %1 to i16
+ ret i16 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_not_disjoint16_int16_t_uint64_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_not_disjoint16_int16_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: ori r3, r3, 6
+; CHECK-LE-NEXT: lha r3, 0(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_not_disjoint16_int16_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: ori r3, r3, 6
+; CHECK-BE-NEXT: lha r3, 6(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_disjoint_align16_int16_t_uint64_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_disjoint_align16_int16_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-LE-NEXT: lha r3, 24(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_disjoint_align16_int16_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-BE-NEXT: lha r3, 30(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_not_disjoint32_int16_t_uint64_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_not_disjoint32_int16_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: ori r3, r3, 34463
+; CHECK-LE-NEXT: oris r3, r3, 1
+; CHECK-LE-NEXT: lha r3, 0(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_not_disjoint32_int16_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: ori r3, r3, 34463
+; CHECK-BE-NEXT: oris r3, r3, 1
+; CHECK-BE-NEXT: lha r3, 6(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_disjoint_align32_int16_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_disjoint_align32_int16_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: lis r4, -15264
+; CHECK-P10-LE-NEXT: and r3, r3, r4
+; CHECK-P10-LE-NEXT: pli r4, 999990000
+; CHECK-P10-LE-NEXT: lhax r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_disjoint_align32_int16_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: lis r4, -15264
+; CHECK-P10-BE-NEXT: and r3, r3, r4
+; CHECK-P10-BE-NEXT: pli r4, 999990006
+; CHECK-P10-BE-NEXT: lhax r3, r3, r4
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_disjoint_align32_int16_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, -15264
+; CHECK-P9-LE-NEXT: and r3, r3, r4
+; CHECK-P9-LE-NEXT: lis r4, 15258
+; CHECK-P9-LE-NEXT: ori r4, r4, 41712
+; CHECK-P9-LE-NEXT: lhax r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_disjoint_align32_int16_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: lis r4, -15264
+; CHECK-P9-BE-NEXT: and r3, r3, r4
+; CHECK-P9-BE-NEXT: lis r4, 15258
+; CHECK-P9-BE-NEXT: ori r4, r4, 41718
+; CHECK-P9-BE-NEXT: lhax r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_disjoint_align32_int16_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, -15264
+; CHECK-P8-LE-NEXT: lis r5, 15258
+; CHECK-P8-LE-NEXT: and r3, r3, r4
+; CHECK-P8-LE-NEXT: ori r4, r5, 41712
+; CHECK-P8-LE-NEXT: lhax r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_disjoint_align32_int16_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r4, -15264
+; CHECK-P8-BE-NEXT: lis r5, 15258
+; CHECK-P8-BE-NEXT: and r3, r3, r4
+; CHECK-P8-BE-NEXT: ori r4, r5, 41718
+; CHECK-P8-BE-NEXT: lhax r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 16
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_not_disjoint64_int16_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_not_disjoint64_int16_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 232
+; CHECK-P10-LE-NEXT: pli r5, 3567587329
+; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-LE-NEXT: or r3, r3, r5
+; CHECK-P10-LE-NEXT: lha r3, 0(r3)
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_not_disjoint64_int16_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587329
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: or r3, r3, r5
+; CHECK-P10-BE-NEXT: lha r3, 6(r3)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_not_disjoint64_int16_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: li r4, 29
+; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-LE-NEXT: oris r4, r4, 54437
+; CHECK-P9-LE-NEXT: ori r4, r4, 4097
+; CHECK-P9-LE-NEXT: or r3, r3, r4
+; CHECK-P9-LE-NEXT: lha r3, 0(r3)
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_not_disjoint64_int16_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4097
+; CHECK-P9-BE-NEXT: or r3, r3, r4
+; CHECK-P9-BE-NEXT: lha r3, 6(r3)
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_not_disjoint64_int16_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: li r4, 29
+; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-LE-NEXT: oris r4, r4, 54437
+; CHECK-P8-LE-NEXT: ori r4, r4, 4097
+; CHECK-P8-LE-NEXT: or r3, r3, r4
+; CHECK-P8-LE-NEXT: lha r3, 0(r3)
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_not_disjoint64_int16_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4097
+; CHECK-P8-BE-NEXT: or r3, r3, r4
+; CHECK-P8-BE-NEXT: lha r3, 6(r3)
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_disjoint_align64_int16_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_disjoint_align64_int16_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 244140625
+; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-LE-NEXT: lhax r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_disjoint_align64_int16_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587334
+; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: lhax r3, r3, r5
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_disjoint_align64_int16_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, 3725
+; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-LE-NEXT: ori r4, r4, 19025
+; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-LE-NEXT: lhax r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_disjoint_align64_int16_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4102
+; CHECK-P9-BE-NEXT: lhax r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_disjoint_align64_int16_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 3725
+; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-LE-NEXT: ori r4, r4, 19025
+; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-LE-NEXT: lhax r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_disjoint_align64_int16_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4102
+; CHECK-P8-BE-NEXT: lhax r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 4096
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_cst_align16_int16_t_uint64_t() {
+; CHECK-LE-LABEL: ld_cst_align16_int16_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lha r3, 4080(0)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_cst_align16_int16_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lha r3, 4086(0)
+; CHECK-BE-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 4080 to i64*), align 16
+ %conv = trunc i64 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_cst_align32_int16_t_uint64_t() {
+; CHECK-LE-LABEL: ld_cst_align32_int16_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lis r3, 153
+; CHECK-LE-NEXT: lha r3, -27108(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_cst_align32_int16_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lis r3, 153
+; CHECK-BE-NEXT: lha r3, -27102(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 9999900 to i64*), align 8
+ %conv = trunc i64 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_cst_align64_int16_t_uint64_t() {
+; CHECK-P10-LE-LABEL: ld_cst_align64_int16_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r3, 244140625
+; CHECK-P10-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-LE-NEXT: lha r3, 0(r3)
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_cst_align64_int16_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r3, 232
+; CHECK-P10-BE-NEXT: pli r4, 3567587334
+; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
+; CHECK-P10-BE-NEXT: lha r3, 0(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_cst_align64_int16_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r3, 3725
+; CHECK-P9-LE-NEXT: ori r3, r3, 19025
+; CHECK-P9-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-LE-NEXT: lha r3, 0(r3)
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_cst_align64_int16_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r3, 29
+; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P9-BE-NEXT: oris r3, r3, 54437
+; CHECK-P9-BE-NEXT: ori r3, r3, 4102
+; CHECK-P9-BE-NEXT: lha r3, 0(r3)
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_cst_align64_int16_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r3, 3725
+; CHECK-P8-LE-NEXT: ori r3, r3, 19025
+; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-LE-NEXT: lha r3, 0(r3)
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_cst_align64_int16_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r3, 29
+; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P8-BE-NEXT: oris r3, r3, 54437
+; CHECK-P8-BE-NEXT: ori r3, r3, 4102
+; CHECK-P8-BE-NEXT: lha r3, 0(r3)
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 1000000000000 to i64*), align 4096
+ %conv = trunc i64 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_0_int16_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_0_int16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_0_int16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_0_int16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptosi float %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_align16_int16_t_float(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_int16_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfs f0, 8(r3)
+; CHECK-NEXT: xscvdpsxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptosi float %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_align32_int16_t_float(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_int16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lfsx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_int16_t_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lfsx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptosi float %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_align64_int16_t_float(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_int16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfsx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_int16_t_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfsx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptosi float %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_reg_int16_t_float(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_int16_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfsx f0, r3, r4
+; CHECK-NEXT: xscvdpsxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptosi float %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_or_int16_t_float(i64 %ptr, i8 zeroext %off) {
+; CHECK-P10-LABEL: ld_or_int16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: or r3, r4, r3
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_or_int16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: or r3, r4, r3
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_or_int16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv1 = fptosi float %1 to i16
+ ret i16 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_not_disjoint16_int16_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint16_int16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: ori r3, r3, 6
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint16_int16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: ori r3, r3, 6
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint16_int16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptosi float %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_disjoint_align16_int16_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align16_int16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-NEXT: lfs f0, 24(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align16_int16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-NEXT: lfs f0, 24(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align16_int16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 8
+ %conv = fptosi float %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_not_disjoint32_int16_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint32_int16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: ori r3, r3, 34463
+; CHECK-P10-NEXT: oris r3, r3, 1
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint32_int16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: ori r3, r3, 34463
+; CHECK-P9-NEXT: oris r3, r3, 1
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint32_int16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptosi float %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_disjoint_align32_int16_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_int16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lfsx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_int16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lfsx f0, r3, r4
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_int16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lfsx f0, r3, r4
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 16
+ %conv = fptosi float %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_not_disjoint64_int16_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_int16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint64_int16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint64_int16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptosi float %1 to i16
+ ret i16 %conv
+}
+
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_disjoint_align64_int16_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_int16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfsx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_int16_t_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfsx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4096
+ %conv = fptosi float %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_cst_align16_int16_t_float() {
+; CHECK-LABEL: ld_cst_align16_int16_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfs f0, 4080(0)
+; CHECK-NEXT: xscvdpsxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load float, float* inttoptr (i64 4080 to float*), align 16
+ %conv = fptosi float %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_cst_align32_int16_t_float() {
+; CHECK-P10-LABEL: ld_cst_align32_int16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r3, 153
+; CHECK-P10-NEXT: lfs f0, -27108(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align32_int16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 153
+; CHECK-P9-NEXT: lfs f0, -27108(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align32_int16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load float, float* inttoptr (i64 9999900 to float*), align 4
+ %conv = fptosi float %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_cst_align64_int16_t_float() {
+; CHECK-P10-LABEL: ld_cst_align64_int16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align64_int16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align64_int16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load float, float* inttoptr (i64 1000000000000 to float*), align 4096
+ %conv = fptosi float %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_0_int16_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_0_int16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_0_int16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_0_int16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptosi double %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_align16_int16_t_double(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_int16_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfd f0, 8(r3)
+; CHECK-NEXT: xscvdpsxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptosi double %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_align32_int16_t_double(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_int16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_int16_t_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptosi double %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_align64_int16_t_double(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_int16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_int16_t_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptosi double %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_reg_int16_t_double(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_int16_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfdx f0, r3, r4
+; CHECK-NEXT: xscvdpsxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptosi double %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_or_int16_t_double(i64 %ptr, i8 zeroext %off) {
+; CHECK-P10-LABEL: ld_or_int16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: or r3, r4, r3
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_or_int16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: or r3, r4, r3
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_or_int16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv1 = fptosi double %1 to i16
+ ret i16 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_not_disjoint16_int16_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint16_int16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: ori r3, r3, 6
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint16_int16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: ori r3, r3, 6
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint16_int16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptosi double %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_disjoint_align16_int16_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align16_int16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-NEXT: lfd f0, 24(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align16_int16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-NEXT: lfd f0, 24(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align16_int16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptosi double %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_not_disjoint32_int16_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint32_int16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: ori r3, r3, 34463
+; CHECK-P10-NEXT: oris r3, r3, 1
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint32_int16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: ori r3, r3, 34463
+; CHECK-P9-NEXT: oris r3, r3, 1
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint32_int16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptosi double %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_disjoint_align32_int16_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_int16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_int16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lfdx f0, r3, r4
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_int16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lfdx f0, r3, r4
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 16
+ %conv = fptosi double %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_not_disjoint64_int16_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_int16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint64_int16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint64_int16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptosi double %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_disjoint_align64_int16_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_int16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_int16_t_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 4096
+ %conv = fptosi double %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_cst_align16_int16_t_double() {
+; CHECK-LABEL: ld_cst_align16_int16_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfd f0, 4080(0)
+; CHECK-NEXT: xscvdpsxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load double, double* inttoptr (i64 4080 to double*), align 16
+ %conv = fptosi double %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_cst_align32_int16_t_double() {
+; CHECK-P10-LABEL: ld_cst_align32_int16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r3, 153
+; CHECK-P10-NEXT: lfd f0, -27108(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align32_int16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 153
+; CHECK-P9-NEXT: lfd f0, -27108(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align32_int16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load double, double* inttoptr (i64 9999900 to double*), align 8
+ %conv = fptosi double %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i16 @ld_cst_align64_int16_t_double() {
+; CHECK-P10-LABEL: ld_cst_align64_int16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align64_int16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align64_int16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load double, double* inttoptr (i64 1000000000000 to double*), align 4096
+ %conv = fptosi double %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_0_uint16_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = zext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_align16_uint16_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = zext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_align32_uint16_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint16_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint16_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = zext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_align64_uint16_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint16_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint16_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = zext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_reg_uint16_t_uint8_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbzx r3, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = zext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_or_uint16_t_uint8_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv1 = zext i8 %1 to i16
+ ret i16 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_not_disjoint16_uint16_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = zext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_disjoint_align16_uint16_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lbz r3, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 8
+ %conv = zext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_not_disjoint32_uint16_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = zext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_disjoint_align32_uint16_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint16_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint16_t_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lbzx r3, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint16_t_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 16
+ %conv = zext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_not_disjoint64_uint16_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint16_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint16_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = zext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_disjoint_align64_uint16_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint16_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint16_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 4096
+ %conv = zext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_cst_align16_uint16_t_uint8_t() {
+; CHECK-LABEL: ld_cst_align16_uint16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 4080 to i8*), align 16
+ %conv = zext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_cst_align32_uint16_t_uint8_t() {
+; CHECK-LABEL: ld_cst_align32_uint16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lbz r3, -27108(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 9999900 to i8*), align 4
+ %conv = zext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_cst_align64_uint16_t_uint8_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint16_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint16_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 1000000000000 to i8*), align 4096
+ %conv = zext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_0_uint16_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint16_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = sext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_align16_uint16_t_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint16_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 8(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = sext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_align32_uint16_t_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint16_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint16_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = sext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_align64_uint16_t_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint16_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint16_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = sext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_reg_uint16_t_int8_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint16_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbzx r3, r3, r4
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = sext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_or_uint16_t_int8_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint16_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv1 = sext i8 %1 to i16
+ ret i16 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_not_disjoint16_uint16_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint16_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = sext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_disjoint_align16_uint16_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint16_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lbz r3, 24(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 8
+ %conv = sext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_not_disjoint32_uint16_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint16_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = sext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_disjoint_align32_uint16_t_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint16_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint16_t_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lbzx r3, r3, r4
+; CHECK-P9-NEXT: extsb r3, r3
+; CHECK-P9-NEXT: clrldi r3, r3, 48
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint16_t_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: clrldi r3, r3, 48
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 16
+ %conv = sext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_not_disjoint64_uint16_t_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint16_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint16_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = sext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_disjoint_align64_uint16_t_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint16_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint16_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 4096
+ %conv = sext i8 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_cst_align16_uint16_t_int8_t() {
+; CHECK-LABEL: ld_cst_align16_uint16_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 4080(0)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 4080 to i8*), align 16
+ %conv = sext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_cst_align32_uint16_t_int8_t() {
+; CHECK-LABEL: ld_cst_align32_uint16_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lbz r3, -27108(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: clrldi r3, r3, 48
+; CHECK-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 9999900 to i8*), align 4
+ %conv = sext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_cst_align64_uint16_t_int8_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint16_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: clrldi r3, r3, 48
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint16_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: clrldi r3, r3, 48
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 1000000000000 to i8*), align 4096
+ %conv = sext i8 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_0_uint16_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ ret i16 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_align16_uint16_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ ret i16 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_align32_uint16_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint16_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint16_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ ret i16 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_align64_uint16_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint16_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint16_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ ret i16 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_reg_uint16_t_uint16_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhzx r3, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ ret i16 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_or_uint16_t_uint16_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ ret i16 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_not_disjoint16_uint16_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ ret i16 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_disjoint_align16_uint16_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lhz r3, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 8
+ ret i16 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_not_disjoint32_uint16_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ ret i16 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_disjoint_align32_uint16_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint16_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint16_t_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lhzx r3, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint16_t_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lhzx r3, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 16
+ ret i16 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_not_disjoint64_uint16_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint16_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lhz r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint16_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lhz r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ ret i16 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_disjoint_align64_uint16_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint16_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint16_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 4096
+ ret i16 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_cst_align16_uint16_t_uint16_t() {
+; CHECK-LABEL: ld_cst_align16_uint16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 4080 to i16*), align 16
+ ret i16 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_cst_align32_uint16_t_uint16_t() {
+; CHECK-LABEL: ld_cst_align32_uint16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lhz r3, -27108(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 9999900 to i16*), align 4
+ ret i16 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_cst_align64_uint16_t_uint16_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint16_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lhz r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint16_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lhz r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 1000000000000 to i16*), align 4096
+ ret i16 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_0_uint16_t_uint32_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_0_uint16_t_uint32_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lhz r3, 0(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_0_uint16_t_uint32_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lhz r3, 2(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_align16_uint16_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-LE-LABEL: ld_align16_uint16_t_uint32_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lhz r3, 8(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_align16_uint16_t_uint32_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lhz r3, 10(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_align32_uint16_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LE-LABEL: ld_align32_uint16_t_uint32_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 99999000
+; CHECK-P10-LE-NEXT: lhzx r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_align32_uint16_t_uint32_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 99999002
+; CHECK-P10-BE-NEXT: lhzx r3, r3, r4
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_align32_uint16_t_uint32_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, 1525
+; CHECK-P9-LE-NEXT: ori r4, r4, 56600
+; CHECK-P9-LE-NEXT: lhzx r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_align32_uint16_t_uint32_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: lis r4, 1525
+; CHECK-P9-BE-NEXT: ori r4, r4, 56602
+; CHECK-P9-BE-NEXT: lhzx r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_align32_uint16_t_uint32_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 1525
+; CHECK-P8-LE-NEXT: ori r4, r4, 56600
+; CHECK-P8-LE-NEXT: lhzx r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_align32_uint16_t_uint32_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r4, 1525
+; CHECK-P8-BE-NEXT: ori r4, r4, 56602
+; CHECK-P8-BE-NEXT: lhzx r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_align64_uint16_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LE-LABEL: ld_align64_uint16_t_uint32_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 244140625
+; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-LE-NEXT: lhzx r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_align64_uint16_t_uint32_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587330
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: lhzx r3, r3, r5
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_align64_uint16_t_uint32_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, 3725
+; CHECK-P9-LE-NEXT: ori r4, r4, 19025
+; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-LE-NEXT: lhzx r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_align64_uint16_t_uint32_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4098
+; CHECK-P9-BE-NEXT: lhzx r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_align64_uint16_t_uint32_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 3725
+; CHECK-P8-LE-NEXT: ori r4, r4, 19025
+; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-LE-NEXT: lhzx r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_align64_uint16_t_uint32_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4098
+; CHECK-P8-BE-NEXT: lhzx r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_reg_uint16_t_uint32_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LE-LABEL: ld_reg_uint16_t_uint32_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lhzx r3, r3, r4
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_reg_uint16_t_uint32_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: add r3, r3, r4
+; CHECK-BE-NEXT: lhz r3, 2(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_or_uint16_t_uint32_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LE-LABEL: ld_or_uint16_t_uint32_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: or r3, r4, r3
+; CHECK-LE-NEXT: lhz r3, 0(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_or_uint16_t_uint32_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: or r3, r4, r3
+; CHECK-BE-NEXT: lhz r3, 2(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv1 = trunc i32 %1 to i16
+ ret i16 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_not_disjoint16_uint16_t_uint32_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_not_disjoint16_uint16_t_uint32_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: ori r3, r3, 6
+; CHECK-LE-NEXT: lhz r3, 0(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_not_disjoint16_uint16_t_uint32_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: ori r3, r3, 6
+; CHECK-BE-NEXT: lhz r3, 2(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_disjoint_align16_uint16_t_uint32_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_disjoint_align16_uint16_t_uint32_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-LE-NEXT: lhz r3, 24(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_disjoint_align16_uint16_t_uint32_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-BE-NEXT: lhz r3, 26(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 8
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_not_disjoint32_uint16_t_uint32_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_not_disjoint32_uint16_t_uint32_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: ori r3, r3, 34463
+; CHECK-LE-NEXT: oris r3, r3, 1
+; CHECK-LE-NEXT: lhz r3, 0(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_not_disjoint32_uint16_t_uint32_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: ori r3, r3, 34463
+; CHECK-BE-NEXT: oris r3, r3, 1
+; CHECK-BE-NEXT: lhz r3, 2(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_disjoint_align32_uint16_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_disjoint_align32_uint16_t_uint32_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: lis r4, -15264
+; CHECK-P10-LE-NEXT: and r3, r3, r4
+; CHECK-P10-LE-NEXT: pli r4, 999990000
+; CHECK-P10-LE-NEXT: lhzx r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_disjoint_align32_uint16_t_uint32_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: lis r4, -15264
+; CHECK-P10-BE-NEXT: and r3, r3, r4
+; CHECK-P10-BE-NEXT: pli r4, 999990002
+; CHECK-P10-BE-NEXT: lhzx r3, r3, r4
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_disjoint_align32_uint16_t_uint32_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, -15264
+; CHECK-P9-LE-NEXT: and r3, r3, r4
+; CHECK-P9-LE-NEXT: lis r4, 15258
+; CHECK-P9-LE-NEXT: ori r4, r4, 41712
+; CHECK-P9-LE-NEXT: lhzx r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_disjoint_align32_uint16_t_uint32_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: lis r4, -15264
+; CHECK-P9-BE-NEXT: and r3, r3, r4
+; CHECK-P9-BE-NEXT: lis r4, 15258
+; CHECK-P9-BE-NEXT: ori r4, r4, 41714
+; CHECK-P9-BE-NEXT: lhzx r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_disjoint_align32_uint16_t_uint32_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, -15264
+; CHECK-P8-LE-NEXT: lis r5, 15258
+; CHECK-P8-LE-NEXT: and r3, r3, r4
+; CHECK-P8-LE-NEXT: ori r4, r5, 41712
+; CHECK-P8-LE-NEXT: lhzx r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_disjoint_align32_uint16_t_uint32_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r4, -15264
+; CHECK-P8-BE-NEXT: lis r5, 15258
+; CHECK-P8-BE-NEXT: and r3, r3, r4
+; CHECK-P8-BE-NEXT: ori r4, r5, 41714
+; CHECK-P8-BE-NEXT: lhzx r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 16
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_not_disjoint64_uint16_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_not_disjoint64_uint16_t_uint32_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 232
+; CHECK-P10-LE-NEXT: pli r5, 3567587329
+; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-LE-NEXT: or r3, r3, r5
+; CHECK-P10-LE-NEXT: lhz r3, 0(r3)
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_not_disjoint64_uint16_t_uint32_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587329
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: or r3, r3, r5
+; CHECK-P10-BE-NEXT: lhz r3, 2(r3)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_not_disjoint64_uint16_t_uint32_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: li r4, 29
+; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-LE-NEXT: oris r4, r4, 54437
+; CHECK-P9-LE-NEXT: ori r4, r4, 4097
+; CHECK-P9-LE-NEXT: or r3, r3, r4
+; CHECK-P9-LE-NEXT: lhz r3, 0(r3)
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_not_disjoint64_uint16_t_uint32_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4097
+; CHECK-P9-BE-NEXT: or r3, r3, r4
+; CHECK-P9-BE-NEXT: lhz r3, 2(r3)
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_not_disjoint64_uint16_t_uint32_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: li r4, 29
+; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-LE-NEXT: oris r4, r4, 54437
+; CHECK-P8-LE-NEXT: ori r4, r4, 4097
+; CHECK-P8-LE-NEXT: or r3, r3, r4
+; CHECK-P8-LE-NEXT: lhz r3, 0(r3)
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_not_disjoint64_uint16_t_uint32_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4097
+; CHECK-P8-BE-NEXT: or r3, r3, r4
+; CHECK-P8-BE-NEXT: lhz r3, 2(r3)
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_disjoint_align64_uint16_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_disjoint_align64_uint16_t_uint32_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 244140625
+; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-LE-NEXT: lhzx r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_disjoint_align64_uint16_t_uint32_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587330
+; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: lhzx r3, r3, r5
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_disjoint_align64_uint16_t_uint32_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, 3725
+; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-LE-NEXT: ori r4, r4, 19025
+; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-LE-NEXT: lhzx r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_disjoint_align64_uint16_t_uint32_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4098
+; CHECK-P9-BE-NEXT: lhzx r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_disjoint_align64_uint16_t_uint32_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 3725
+; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-LE-NEXT: ori r4, r4, 19025
+; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-LE-NEXT: lhzx r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_disjoint_align64_uint16_t_uint32_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4098
+; CHECK-P8-BE-NEXT: lhzx r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4096
+ %conv = trunc i32 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_cst_align16_uint16_t_uint32_t() {
+; CHECK-LE-LABEL: ld_cst_align16_uint16_t_uint32_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lhz r3, 4080(0)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_cst_align16_uint16_t_uint32_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lhz r3, 4082(0)
+; CHECK-BE-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 4080 to i32*), align 16
+ %conv = trunc i32 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_cst_align32_uint16_t_uint32_t() {
+; CHECK-LE-LABEL: ld_cst_align32_uint16_t_uint32_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lis r3, 153
+; CHECK-LE-NEXT: lhz r3, -27108(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_cst_align32_uint16_t_uint32_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lis r3, 153
+; CHECK-BE-NEXT: lhz r3, -27106(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 9999900 to i32*), align 4
+ %conv = trunc i32 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_cst_align64_uint16_t_uint32_t() {
+; CHECK-P10-LE-LABEL: ld_cst_align64_uint16_t_uint32_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r3, 244140625
+; CHECK-P10-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-LE-NEXT: lhz r3, 0(r3)
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_cst_align64_uint16_t_uint32_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r3, 232
+; CHECK-P10-BE-NEXT: pli r4, 3567587330
+; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
+; CHECK-P10-BE-NEXT: lhz r3, 0(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_cst_align64_uint16_t_uint32_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r3, 3725
+; CHECK-P9-LE-NEXT: ori r3, r3, 19025
+; CHECK-P9-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-LE-NEXT: lhz r3, 0(r3)
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_cst_align64_uint16_t_uint32_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r3, 29
+; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P9-BE-NEXT: oris r3, r3, 54437
+; CHECK-P9-BE-NEXT: ori r3, r3, 4098
+; CHECK-P9-BE-NEXT: lhz r3, 0(r3)
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_cst_align64_uint16_t_uint32_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r3, 3725
+; CHECK-P8-LE-NEXT: ori r3, r3, 19025
+; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-LE-NEXT: lhz r3, 0(r3)
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_cst_align64_uint16_t_uint32_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r3, 29
+; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P8-BE-NEXT: oris r3, r3, 54437
+; CHECK-P8-BE-NEXT: ori r3, r3, 4098
+; CHECK-P8-BE-NEXT: lhz r3, 0(r3)
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 1000000000000 to i32*), align 4096
+ %conv = trunc i32 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_0_uint16_t_uint64_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_0_uint16_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lhz r3, 0(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_0_uint16_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lhz r3, 6(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_align16_uint16_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-LE-LABEL: ld_align16_uint16_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lhz r3, 8(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_align16_uint16_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lhz r3, 14(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_align32_uint16_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LE-LABEL: ld_align32_uint16_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 99999000
+; CHECK-P10-LE-NEXT: lhzx r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_align32_uint16_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 99999006
+; CHECK-P10-BE-NEXT: lhzx r3, r3, r4
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_align32_uint16_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, 1525
+; CHECK-P9-LE-NEXT: ori r4, r4, 56600
+; CHECK-P9-LE-NEXT: lhzx r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_align32_uint16_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: lis r4, 1525
+; CHECK-P9-BE-NEXT: ori r4, r4, 56606
+; CHECK-P9-BE-NEXT: lhzx r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_align32_uint16_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 1525
+; CHECK-P8-LE-NEXT: ori r4, r4, 56600
+; CHECK-P8-LE-NEXT: lhzx r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_align32_uint16_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r4, 1525
+; CHECK-P8-BE-NEXT: ori r4, r4, 56606
+; CHECK-P8-BE-NEXT: lhzx r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_align64_uint16_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LE-LABEL: ld_align64_uint16_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 244140625
+; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-LE-NEXT: lhzx r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_align64_uint16_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587334
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: lhzx r3, r3, r5
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_align64_uint16_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, 3725
+; CHECK-P9-LE-NEXT: ori r4, r4, 19025
+; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-LE-NEXT: lhzx r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_align64_uint16_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4102
+; CHECK-P9-BE-NEXT: lhzx r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_align64_uint16_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 3725
+; CHECK-P8-LE-NEXT: ori r4, r4, 19025
+; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-LE-NEXT: lhzx r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_align64_uint16_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4102
+; CHECK-P8-BE-NEXT: lhzx r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_reg_uint16_t_uint64_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LE-LABEL: ld_reg_uint16_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lhzx r3, r3, r4
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_reg_uint16_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: add r3, r3, r4
+; CHECK-BE-NEXT: lhz r3, 6(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_or_uint16_t_uint64_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LE-LABEL: ld_or_uint16_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: or r3, r4, r3
+; CHECK-LE-NEXT: lhz r3, 0(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_or_uint16_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: or r3, r4, r3
+; CHECK-BE-NEXT: lhz r3, 6(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv1 = trunc i64 %1 to i16
+ ret i16 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_not_disjoint16_uint16_t_uint64_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_not_disjoint16_uint16_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: ori r3, r3, 6
+; CHECK-LE-NEXT: lhz r3, 0(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_not_disjoint16_uint16_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: ori r3, r3, 6
+; CHECK-BE-NEXT: lhz r3, 6(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_disjoint_align16_uint16_t_uint64_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_disjoint_align16_uint16_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-LE-NEXT: lhz r3, 24(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_disjoint_align16_uint16_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-BE-NEXT: lhz r3, 30(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_not_disjoint32_uint16_t_uint64_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_not_disjoint32_uint16_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: ori r3, r3, 34463
+; CHECK-LE-NEXT: oris r3, r3, 1
+; CHECK-LE-NEXT: lhz r3, 0(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_not_disjoint32_uint16_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: ori r3, r3, 34463
+; CHECK-BE-NEXT: oris r3, r3, 1
+; CHECK-BE-NEXT: lhz r3, 6(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_disjoint_align32_uint16_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_disjoint_align32_uint16_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: lis r4, -15264
+; CHECK-P10-LE-NEXT: and r3, r3, r4
+; CHECK-P10-LE-NEXT: pli r4, 999990000
+; CHECK-P10-LE-NEXT: lhzx r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_disjoint_align32_uint16_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: lis r4, -15264
+; CHECK-P10-BE-NEXT: and r3, r3, r4
+; CHECK-P10-BE-NEXT: pli r4, 999990006
+; CHECK-P10-BE-NEXT: lhzx r3, r3, r4
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_disjoint_align32_uint16_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, -15264
+; CHECK-P9-LE-NEXT: and r3, r3, r4
+; CHECK-P9-LE-NEXT: lis r4, 15258
+; CHECK-P9-LE-NEXT: ori r4, r4, 41712
+; CHECK-P9-LE-NEXT: lhzx r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_disjoint_align32_uint16_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: lis r4, -15264
+; CHECK-P9-BE-NEXT: and r3, r3, r4
+; CHECK-P9-BE-NEXT: lis r4, 15258
+; CHECK-P9-BE-NEXT: ori r4, r4, 41718
+; CHECK-P9-BE-NEXT: lhzx r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_disjoint_align32_uint16_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, -15264
+; CHECK-P8-LE-NEXT: lis r5, 15258
+; CHECK-P8-LE-NEXT: and r3, r3, r4
+; CHECK-P8-LE-NEXT: ori r4, r5, 41712
+; CHECK-P8-LE-NEXT: lhzx r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_disjoint_align32_uint16_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r4, -15264
+; CHECK-P8-BE-NEXT: lis r5, 15258
+; CHECK-P8-BE-NEXT: and r3, r3, r4
+; CHECK-P8-BE-NEXT: ori r4, r5, 41718
+; CHECK-P8-BE-NEXT: lhzx r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 16
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_not_disjoint64_uint16_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_not_disjoint64_uint16_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 232
+; CHECK-P10-LE-NEXT: pli r5, 3567587329
+; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-LE-NEXT: or r3, r3, r5
+; CHECK-P10-LE-NEXT: lhz r3, 0(r3)
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_not_disjoint64_uint16_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587329
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: or r3, r3, r5
+; CHECK-P10-BE-NEXT: lhz r3, 6(r3)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_not_disjoint64_uint16_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: li r4, 29
+; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-LE-NEXT: oris r4, r4, 54437
+; CHECK-P9-LE-NEXT: ori r4, r4, 4097
+; CHECK-P9-LE-NEXT: or r3, r3, r4
+; CHECK-P9-LE-NEXT: lhz r3, 0(r3)
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_not_disjoint64_uint16_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4097
+; CHECK-P9-BE-NEXT: or r3, r3, r4
+; CHECK-P9-BE-NEXT: lhz r3, 6(r3)
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_not_disjoint64_uint16_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: li r4, 29
+; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-LE-NEXT: oris r4, r4, 54437
+; CHECK-P8-LE-NEXT: ori r4, r4, 4097
+; CHECK-P8-LE-NEXT: or r3, r3, r4
+; CHECK-P8-LE-NEXT: lhz r3, 0(r3)
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_not_disjoint64_uint16_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4097
+; CHECK-P8-BE-NEXT: or r3, r3, r4
+; CHECK-P8-BE-NEXT: lhz r3, 6(r3)
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_disjoint_align64_uint16_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_disjoint_align64_uint16_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 244140625
+; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-LE-NEXT: lhzx r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_disjoint_align64_uint16_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587334
+; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: lhzx r3, r3, r5
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_disjoint_align64_uint16_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, 3725
+; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-LE-NEXT: ori r4, r4, 19025
+; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-LE-NEXT: lhzx r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_disjoint_align64_uint16_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4102
+; CHECK-P9-BE-NEXT: lhzx r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_disjoint_align64_uint16_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 3725
+; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-LE-NEXT: ori r4, r4, 19025
+; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-LE-NEXT: lhzx r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_disjoint_align64_uint16_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4102
+; CHECK-P8-BE-NEXT: lhzx r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 4096
+ %conv = trunc i64 %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_cst_align16_uint16_t_uint64_t() {
+; CHECK-LE-LABEL: ld_cst_align16_uint16_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lhz r3, 4080(0)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_cst_align16_uint16_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lhz r3, 4086(0)
+; CHECK-BE-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 4080 to i64*), align 16
+ %conv = trunc i64 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_cst_align32_uint16_t_uint64_t() {
+; CHECK-LE-LABEL: ld_cst_align32_uint16_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lis r3, 153
+; CHECK-LE-NEXT: lhz r3, -27108(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_cst_align32_uint16_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lis r3, 153
+; CHECK-BE-NEXT: lhz r3, -27102(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 9999900 to i64*), align 8
+ %conv = trunc i64 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_cst_align64_uint16_t_uint64_t() {
+; CHECK-P10-LE-LABEL: ld_cst_align64_uint16_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r3, 244140625
+; CHECK-P10-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-LE-NEXT: lhz r3, 0(r3)
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_cst_align64_uint16_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r3, 232
+; CHECK-P10-BE-NEXT: pli r4, 3567587334
+; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
+; CHECK-P10-BE-NEXT: lhz r3, 0(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_cst_align64_uint16_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r3, 3725
+; CHECK-P9-LE-NEXT: ori r3, r3, 19025
+; CHECK-P9-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-LE-NEXT: lhz r3, 0(r3)
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_cst_align64_uint16_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r3, 29
+; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P9-BE-NEXT: oris r3, r3, 54437
+; CHECK-P9-BE-NEXT: ori r3, r3, 4102
+; CHECK-P9-BE-NEXT: lhz r3, 0(r3)
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_cst_align64_uint16_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r3, 3725
+; CHECK-P8-LE-NEXT: ori r3, r3, 19025
+; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-LE-NEXT: lhz r3, 0(r3)
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_cst_align64_uint16_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r3, 29
+; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P8-BE-NEXT: oris r3, r3, 54437
+; CHECK-P8-BE-NEXT: ori r3, r3, 4102
+; CHECK-P8-BE-NEXT: lhz r3, 0(r3)
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 1000000000000 to i64*), align 4096
+ %conv = trunc i64 %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_align16_uint16_t_float(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint16_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfs f0, 8(r3)
+; CHECK-NEXT: xscvdpsxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_align32_uint16_t_float(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lfsx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint16_t_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lfsx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_align64_uint16_t_float(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfsx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint16_t_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfsx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_reg_uint16_t_float(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint16_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfsx f0, r3, r4
+; CHECK-NEXT: xscvdpsxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_or_uint16_t_float(i64 %ptr, i8 zeroext %off) {
+; CHECK-P10-LABEL: ld_or_uint16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: or r3, r4, r3
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_or_uint16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: or r3, r4, r3
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_or_uint16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv1 = fptoui float %1 to i16
+ ret i16 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_not_disjoint16_uint16_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint16_uint16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: ori r3, r3, 6
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint16_uint16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: ori r3, r3, 6
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint16_uint16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_disjoint_align16_uint16_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align16_uint16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-NEXT: lfs f0, 24(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align16_uint16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-NEXT: lfs f0, 24(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align16_uint16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 8
+ %conv = fptoui float %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_not_disjoint32_uint16_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint32_uint16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: ori r3, r3, 34463
+; CHECK-P10-NEXT: oris r3, r3, 1
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint32_uint16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: ori r3, r3, 34463
+; CHECK-P9-NEXT: oris r3, r3, 1
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint32_uint16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_disjoint_align32_uint16_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lfsx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lfsx f0, r3, r4
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lfsx f0, r3, r4
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 16
+ %conv = fptoui float %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_not_disjoint64_uint16_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint64_uint16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint64_uint16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_disjoint_align64_uint16_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfsx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint16_t_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfsx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4096
+ %conv = fptoui float %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_cst_align16_uint16_t_float() {
+; CHECK-LABEL: ld_cst_align16_uint16_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfs f0, 4080(0)
+; CHECK-NEXT: xscvdpsxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %0 = load float, float* inttoptr (i64 4080 to float*), align 16
+ %conv = fptoui float %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_cst_align32_uint16_t_float() {
+; CHECK-P10-LABEL: ld_cst_align32_uint16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r3, 153
+; CHECK-P10-NEXT: lfs f0, -27108(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align32_uint16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 153
+; CHECK-P9-NEXT: lfs f0, -27108(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align32_uint16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load float, float* inttoptr (i64 9999900 to float*), align 4
+ %conv = fptoui float %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_cst_align64_uint16_t_float() {
+; CHECK-P10-LABEL: ld_cst_align64_uint16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align64_uint16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align64_uint16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load float, float* inttoptr (i64 1000000000000 to float*), align 4096
+ %conv = fptoui float %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_0_uint16_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_0_uint16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_0_uint16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_0_uint16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_align16_uint16_t_double(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint16_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfd f0, 8(r3)
+; CHECK-NEXT: xscvdpsxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_align32_uint16_t_double(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint16_t_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_align64_uint16_t_double(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint16_t_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_reg_uint16_t_double(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint16_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfdx f0, r3, r4
+; CHECK-NEXT: xscvdpsxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_or_uint16_t_double(i64 %ptr, i8 zeroext %off) {
+; CHECK-P10-LABEL: ld_or_uint16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: or r3, r4, r3
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_or_uint16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: or r3, r4, r3
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_or_uint16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv1 = fptoui double %1 to i16
+ ret i16 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_not_disjoint16_uint16_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint16_uint16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: ori r3, r3, 6
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint16_uint16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: ori r3, r3, 6
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint16_uint16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_disjoint_align16_uint16_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align16_uint16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-NEXT: lfd f0, 24(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align16_uint16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-NEXT: lfd f0, 24(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align16_uint16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_not_disjoint32_uint16_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint32_uint16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: ori r3, r3, 34463
+; CHECK-P10-NEXT: oris r3, r3, 1
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint32_uint16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: ori r3, r3, 34463
+; CHECK-P9-NEXT: oris r3, r3, 1
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint32_uint16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_disjoint_align32_uint16_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lfdx f0, r3, r4
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lfdx f0, r3, r4
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 16
+ %conv = fptoui double %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_not_disjoint64_uint16_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint64_uint16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint64_uint16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_disjoint_align64_uint16_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint16_t_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 4096
+ %conv = fptoui double %1 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_cst_align16_uint16_t_double() {
+; CHECK-LABEL: ld_cst_align16_uint16_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfd f0, 4080(0)
+; CHECK-NEXT: xscvdpsxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %0 = load double, double* inttoptr (i64 4080 to double*), align 16
+ %conv = fptoui double %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_cst_align32_uint16_t_double() {
+; CHECK-P10-LABEL: ld_cst_align32_uint16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r3, 153
+; CHECK-P10-NEXT: lfd f0, -27108(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align32_uint16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 153
+; CHECK-P9-NEXT: lfd f0, -27108(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align32_uint16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load double, double* inttoptr (i64 9999900 to double*), align 8
+ %conv = fptoui double %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i16 @ld_cst_align64_uint16_t_double() {
+; CHECK-P10-LABEL: ld_cst_align64_uint16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align64_uint16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align64_uint16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load double, double* inttoptr (i64 1000000000000 to double*), align 4096
+ %conv = fptoui double %0 to i16
+ ret i16 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_uint16_t_uint8_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_0_uint16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stb r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i16 %str to i8
+ %0 = inttoptr i64 %ptr to i8*
+ store i8 %conv, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_uint16_t_uint8_t(i8* nocapture %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_align16_uint16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stb r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i16 %str to i8
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ store i8 %conv, i8* %add.ptr, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_uint16_t_uint8_t(i8* nocapture %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_align32_uint16_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: stbx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_uint16_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: stbx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = trunc i16 %str to i8
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ store i8 %conv, i8* %add.ptr, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_uint16_t_uint8_t(i8* nocapture %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_align64_uint16_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stbx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_uint16_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stbx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = trunc i16 %str to i8
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ store i8 %conv, i8* %add.ptr, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_uint16_t_uint8_t(i8* nocapture %ptr, i64 %off, i16 zeroext %str) {
+; CHECK-LABEL: st_reg_uint16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stbx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i16 %str to i8
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ store i8 %conv, i8* %add.ptr, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_uint16_t_uint8_t(i64 %ptr, i8 zeroext %off, i16 zeroext %str) {
+; CHECK-LABEL: st_or1_uint16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: stb r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i16 %str to i8
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_uint16_t_uint8_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint16_uint16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: stb r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i16 %str to i8
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_uint16_t_uint8_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_disjoint_align16_uint16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: stb r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = trunc i16 %str to i8
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_uint16_t_uint8_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint32_uint16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: stb r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i16 %str to i8
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_uint16_t_uint8_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint16_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: stbx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint16_t_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: stbx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint16_t_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: stbx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = trunc i16 %str to i8
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_uint16_t_uint8_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint16_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: stb r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_uint16_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: stb r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = trunc i16 %str to i8
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_uint16_t_uint8_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint16_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stbx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_uint16_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stbx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = trunc i16 %str to i8
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_uint16_t_uint8_t(i16 zeroext %str) {
+; CHECK-LABEL: st_cst_align16_uint16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stb r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i16 %str to i8
+ store i8 %conv, i8* inttoptr (i64 4080 to i8*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_uint16_t_uint8_t(i16 zeroext %str) {
+; CHECK-LABEL: st_cst_align32_uint16_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: stb r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i16 %str to i8
+ store i8 %conv, i8* inttoptr (i64 9999900 to i8*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_uint16_t_uint8_t(i16 zeroext %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint16_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stb r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_uint16_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stb r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = trunc i16 %str to i8
+ store i8 %conv, i8* inttoptr (i64 1000000000000 to i8*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_uint16_t_uint16_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_0_uint16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sth r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i16*
+ store i16 %str, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_uint16_t_uint16_t(i8* nocapture %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_align16_uint16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sth r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %str, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_uint16_t_uint16_t(i8* nocapture %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_align32_uint16_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_uint16_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: sthx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %str, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_uint16_t_uint16_t(i8* nocapture %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_align64_uint16_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_uint16_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: sthx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %str, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_uint16_t_uint16_t(i8* nocapture %ptr, i64 %off, i16 zeroext %str) {
+; CHECK-LABEL: st_reg_uint16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sthx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %str, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_uint16_t_uint16_t(i64 %ptr, i8 zeroext %off, i16 zeroext %str) {
+; CHECK-LABEL: st_or1_uint16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: sth r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i16*
+ store i16 %str, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_uint16_t_uint16_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint16_uint16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: sth r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ store i16 %str, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_uint16_t_uint16_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_disjoint_align16_uint16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: sth r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ store i16 %str, i16* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_uint16_t_uint16_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint32_uint16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: sth r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ store i16 %str, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_uint16_t_uint16_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint16_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint16_t_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: sthx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint16_t_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: sthx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ store i16 %str, i16* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_uint16_t_uint16_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint16_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: sth r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_uint16_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: sth r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ store i16 %str, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_uint16_t_uint16_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint16_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_uint16_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: sthx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ store i16 %str, i16* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_uint16_t_uint16_t(i16 zeroext %str) {
+; CHECK-LABEL: st_cst_align16_uint16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sth r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ store i16 %str, i16* inttoptr (i64 4080 to i16*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_uint16_t_uint16_t(i16 zeroext %str) {
+; CHECK-LABEL: st_cst_align32_uint16_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: sth r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ store i16 %str, i16* inttoptr (i64 9999900 to i16*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_uint16_t_uint16_t(i16 zeroext %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint16_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: sth r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_uint16_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: sth r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ store i16 %str, i16* inttoptr (i64 1000000000000 to i16*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_uint16_t_uint32_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_0_uint16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stw r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i16 %str to i32
+ %0 = inttoptr i64 %ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_uint16_t_uint32_t(i8* nocapture %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_align16_uint16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stw r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i16 %str to i32
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_uint16_t_uint32_t(i8* nocapture %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_align32_uint16_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_uint16_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: stwx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = zext i16 %str to i32
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_uint16_t_uint32_t(i8* nocapture %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_align64_uint16_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_uint16_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stwx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = zext i16 %str to i32
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_uint16_t_uint32_t(i8* nocapture %ptr, i64 %off, i16 zeroext %str) {
+; CHECK-LABEL: st_reg_uint16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stwx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i16 %str to i32
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_uint16_t_uint32_t(i64 %ptr, i8 zeroext %off, i16 zeroext %str) {
+; CHECK-LABEL: st_or1_uint16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: stw r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i16 %str to i32
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_uint16_t_uint32_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint16_uint16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: stw r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i16 %str to i32
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_uint16_t_uint32_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_disjoint_align16_uint16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: stw r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = zext i16 %str to i32
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_uint16_t_uint32_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint32_uint16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: stw r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i16 %str to i32
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_uint16_t_uint32_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint16_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint16_t_uint32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: stwx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint16_t_uint32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: stwx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = zext i16 %str to i32
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_uint16_t_uint32_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint16_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: stw r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_uint16_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: stw r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = zext i16 %str to i32
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_uint16_t_uint32_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint16_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_uint16_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stwx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = zext i16 %str to i32
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_uint16_t_uint32_t(i16 zeroext %str) {
+; CHECK-LABEL: st_cst_align16_uint16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stw r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i16 %str to i32
+ store i32 %conv, i32* inttoptr (i64 4080 to i32*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_uint16_t_uint32_t(i16 zeroext %str) {
+; CHECK-LABEL: st_cst_align32_uint16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: stw r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i16 %str to i32
+ store i32 %conv, i32* inttoptr (i64 9999900 to i32*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_uint16_t_uint32_t(i16 zeroext %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint16_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stw r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_uint16_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stw r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = zext i16 %str to i32
+ store i32 %conv, i32* inttoptr (i64 1000000000000 to i32*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_uint16_t_uint64_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_0_uint16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i16 %str to i64
+ %0 = inttoptr i64 %ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_uint16_t_uint64_t(i8* nocapture %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_align16_uint16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i16 %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_uint16_t_uint64_t(i8* nocapture %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_align32_uint16_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_uint16_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = zext i16 %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_uint16_t_uint64_t(i8* nocapture %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_align64_uint16_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_uint16_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = zext i16 %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_uint16_t_uint64_t(i8* nocapture %ptr, i64 %off, i16 zeroext %str) {
+; CHECK-LABEL: st_reg_uint16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stdx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i16 %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_uint16_t_uint64_t(i64 %ptr, i8 zeroext %off, i16 zeroext %str) {
+; CHECK-LABEL: st_or1_uint16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: std r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i16 %str to i64
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_uint16_t_uint64_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint16_uint16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i16 %str to i64
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_uint16_t_uint64_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_disjoint_align16_uint16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: std r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = zext i16 %str to i64
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_uint16_t_uint64_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint32_uint16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i16 %str to i64
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_uint16_t_uint64_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint16_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint16_t_uint64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: stdx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint16_t_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: stdx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = zext i16 %str to i64
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_uint16_t_uint64_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint16_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: std r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_uint16_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: std r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = zext i16 %str to i64
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_uint16_t_uint64_t(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint16_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_uint16_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = zext i16 %str to i64
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_uint16_t_uint64_t(i16 zeroext %str) {
+; CHECK-LABEL: st_cst_align16_uint16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i16 %str to i64
+ store i64 %conv, i64* inttoptr (i64 4080 to i64*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_uint16_t_uint64_t(i16 zeroext %str) {
+; CHECK-LABEL: st_cst_align32_uint16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: std r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i16 %str to i64
+ store i64 %conv, i64* inttoptr (i64 9999900 to i64*), align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_uint16_t_uint64_t(i16 zeroext %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint16_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: std r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_uint16_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: std r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = zext i16 %str to i64
+ store i64 %conv, i64* inttoptr (i64 1000000000000 to i64*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_uint16_t_float(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_0_uint16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_0_uint16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_0_uint16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i16 %str to float
+ %0 = inttoptr i64 %ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_uint16_t_float(i8* nocapture %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_align16_uint16_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprwz f0, r4
+; CHECK-NEXT: xscvuxdsp f0, f0
+; CHECK-NEXT: stfs f0, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = uitofp i16 %str to float
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_uint16_t_float(i8* nocapture %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_align32_uint16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: stfsx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align32_uint16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: lis r4, 1525
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 56600
+; CHECK-P9-NEXT: stfsx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align32_uint16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: lis r4, 1525
+; CHECK-P8-NEXT: ori r4, r4, 56600
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i16 %str to float
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_uint16_t_float(i8* nocapture %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_align64_uint16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: stfsx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align64_uint16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stfsx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align64_uint16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: stfsx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i16 %str to float
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_uint16_t_float(i8* nocapture %ptr, i64 %off, i16 zeroext %str) {
+; CHECK-LABEL: st_reg_uint16_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprwz f0, r5
+; CHECK-NEXT: xscvuxdsp f0, f0
+; CHECK-NEXT: stfsx f0, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = uitofp i16 %str to float
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_uint16_t_float(i64 %ptr, i8 zeroext %off, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_or1_uint16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r5
+; CHECK-P10-NEXT: or r3, r4, r3
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_or1_uint16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r5
+; CHECK-P9-NEXT: or r3, r4, r3
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_or1_uint16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r5
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i16 %str to float
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_uint16_t_float(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint16_uint16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: ori r3, r3, 6
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint16_uint16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: ori r3, r3, 6
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint16_uint16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i16 %str to float
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_uint16_t_float(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align16_uint16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 24(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align16_uint16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, 24(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align16_uint16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = uitofp i16 %str to float
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_uint16_t_float(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint32_uint16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: ori r3, r3, 34463
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: oris r3, r3, 1
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint32_uint16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: ori r3, r3, 34463
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: oris r3, r3, 1
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint32_uint16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i16 %str to float
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_uint16_t_float(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: stfsx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stfsx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = uitofp i16 %str to float
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_uint16_t_float(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_uint16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint64_uint16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i16 %str to float
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_uint16_t_float(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: stfsx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align64_uint16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stfsx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align64_uint16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: lis r5, 3725
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-NEXT: ori r4, r5, 19025
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: stfsx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = uitofp i16 %str to float
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_uint16_t_float(i16 zeroext %str) {
+; CHECK-LABEL: st_cst_align16_uint16_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprwz f0, r3
+; CHECK-NEXT: xscvuxdsp f0, f0
+; CHECK-NEXT: stfs f0, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = uitofp i16 %str to float
+ store float %conv, float* inttoptr (i64 4080 to float*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_uint16_t_float(i16 zeroext %str) {
+; CHECK-P10-LABEL: st_cst_align32_uint16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r3
+; CHECK-P10-NEXT: lis r3, 153
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, -27108(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align32_uint16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r3
+; CHECK-P9-NEXT: lis r3, 153
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, -27108(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align32_uint16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i16 %str to float
+ store float %conv, float* inttoptr (i64 9999900 to float*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_uint16_t_float(i16 zeroext %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r3
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align64_uint16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r3
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align64_uint16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i16 %str to float
+ store float %conv, float* inttoptr (i64 1000000000000 to float*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_uint16_t_double(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_0_uint16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_0_uint16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_0_uint16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i16 %str to double
+ %0 = inttoptr i64 %ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_uint16_t_double(i8* nocapture %ptr, i16 zeroext %str) {
+; CHECK-LABEL: st_align16_uint16_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprwz f0, r4
+; CHECK-NEXT: xscvuxddp f0, f0
+; CHECK-NEXT: stfd f0, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = uitofp i16 %str to double
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_uint16_t_double(i8* nocapture %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_align32_uint16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: stfdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align32_uint16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: lis r4, 1525
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 56600
+; CHECK-P9-NEXT: stfdx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align32_uint16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: lis r4, 1525
+; CHECK-P8-NEXT: ori r4, r4, 56600
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i16 %str to double
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_uint16_t_double(i8* nocapture %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_align64_uint16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: stfdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align64_uint16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stfdx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align64_uint16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: stfdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i16 %str to double
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_uint16_t_double(i8* nocapture %ptr, i64 %off, i16 zeroext %str) {
+; CHECK-LABEL: st_reg_uint16_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprwz f0, r5
+; CHECK-NEXT: xscvuxddp f0, f0
+; CHECK-NEXT: stfdx f0, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = uitofp i16 %str to double
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_uint16_t_double(i64 %ptr, i8 zeroext %off, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_or1_uint16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r5
+; CHECK-P10-NEXT: or r3, r4, r3
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_or1_uint16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r5
+; CHECK-P9-NEXT: or r3, r4, r3
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_or1_uint16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r5
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i16 %str to double
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_uint16_t_double(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint16_uint16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: ori r3, r3, 6
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint16_uint16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: ori r3, r3, 6
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint16_uint16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i16 %str to double
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_uint16_t_double(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align16_uint16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 24(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align16_uint16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, 24(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align16_uint16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = uitofp i16 %str to double
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_uint16_t_double(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint32_uint16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: ori r3, r3, 34463
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: oris r3, r3, 1
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint32_uint16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: ori r3, r3, 34463
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: oris r3, r3, 1
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint32_uint16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i16 %str to double
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_uint16_t_double(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: stfdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stfdx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = uitofp i16 %str to double
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_uint16_t_double(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_uint16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint64_uint16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i16 %str to double
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_uint16_t_double(i64 %ptr, i16 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: stfdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align64_uint16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stfdx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align64_uint16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: lis r5, 3725
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-NEXT: ori r4, r5, 19025
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: stfdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = uitofp i16 %str to double
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_uint16_t_double(i16 zeroext %str) {
+; CHECK-LABEL: st_cst_align16_uint16_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprwz f0, r3
+; CHECK-NEXT: xscvuxddp f0, f0
+; CHECK-NEXT: stfd f0, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = uitofp i16 %str to double
+ store double %conv, double* inttoptr (i64 4080 to double*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_uint16_t_double(i16 zeroext %str) {
+; CHECK-P10-LABEL: st_cst_align32_uint16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r3
+; CHECK-P10-NEXT: lis r3, 153
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, -27108(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align32_uint16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r3
+; CHECK-P9-NEXT: lis r3, 153
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, -27108(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align32_uint16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i16 %str to double
+ store double %conv, double* inttoptr (i64 9999900 to double*), align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_uint16_t_double(i16 zeroext %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r3
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align64_uint16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r3
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align64_uint16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i16 %str to double
+ store double %conv, double* inttoptr (i64 1000000000000 to double*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_int16_t_uint32_t(i64 %ptr, i16 signext %str) {
+; CHECK-LABEL: st_0_int16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stw r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i16 %str to i32
+ %0 = inttoptr i64 %ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_int16_t_uint32_t(i8* nocapture %ptr, i16 signext %str) {
+; CHECK-LABEL: st_align16_int16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stw r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i16 %str to i32
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_int16_t_uint32_t(i8* nocapture %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_align32_int16_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_int16_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: stwx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = sext i16 %str to i32
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_int16_t_uint32_t(i8* nocapture %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_align64_int16_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_int16_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stwx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = sext i16 %str to i32
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_int16_t_uint32_t(i8* nocapture %ptr, i64 %off, i16 signext %str) {
+; CHECK-LABEL: st_reg_int16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stwx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i16 %str to i32
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_int16_t_uint32_t(i64 %ptr, i8 zeroext %off, i16 signext %str) {
+; CHECK-LABEL: st_or1_int16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: stw r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i16 %str to i32
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_int16_t_uint32_t(i64 %ptr, i16 signext %str) {
+; CHECK-LABEL: st_not_disjoint16_int16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: stw r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i16 %str to i32
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_int16_t_uint32_t(i64 %ptr, i16 signext %str) {
+; CHECK-LABEL: st_disjoint_align16_int16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: stw r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = sext i16 %str to i32
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_int16_t_uint32_t(i64 %ptr, i16 signext %str) {
+; CHECK-LABEL: st_not_disjoint32_int16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: stw r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i16 %str to i32
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_int16_t_uint32_t(i64 %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_int16_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_int16_t_uint32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: stwx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_int16_t_uint32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: stwx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = sext i16 %str to i32
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_int16_t_uint32_t(i64 %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_int16_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: stw r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_int16_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: stw r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = sext i16 %str to i32
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_int16_t_uint32_t(i64 %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_int16_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_int16_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stwx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = sext i16 %str to i32
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_int16_t_uint32_t(i16 signext %str) {
+; CHECK-LABEL: st_cst_align16_int16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stw r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i16 %str to i32
+ store i32 %conv, i32* inttoptr (i64 4080 to i32*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_int16_t_uint32_t(i16 signext %str) {
+; CHECK-LABEL: st_cst_align32_int16_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: stw r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i16 %str to i32
+ store i32 %conv, i32* inttoptr (i64 9999900 to i32*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_int16_t_uint32_t(i16 signext %str) {
+; CHECK-P10-LABEL: st_cst_align64_int16_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stw r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_int16_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stw r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = sext i16 %str to i32
+ store i32 %conv, i32* inttoptr (i64 1000000000000 to i32*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_int16_t_uint64_t(i64 %ptr, i16 signext %str) {
+; CHECK-LABEL: st_0_int16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i16 %str to i64
+ %0 = inttoptr i64 %ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_int16_t_uint64_t(i8* nocapture %ptr, i16 signext %str) {
+; CHECK-LABEL: st_align16_int16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i16 %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_int16_t_uint64_t(i8* nocapture %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_align32_int16_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_int16_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = sext i16 %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_int16_t_uint64_t(i8* nocapture %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_align64_int16_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_int16_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = sext i16 %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_int16_t_uint64_t(i8* nocapture %ptr, i64 %off, i16 signext %str) {
+; CHECK-LABEL: st_reg_int16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stdx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i16 %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_int16_t_uint64_t(i64 %ptr, i8 zeroext %off, i16 signext %str) {
+; CHECK-LABEL: st_or1_int16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: std r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i16 %str to i64
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_int16_t_uint64_t(i64 %ptr, i16 signext %str) {
+; CHECK-LABEL: st_not_disjoint16_int16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i16 %str to i64
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_int16_t_uint64_t(i64 %ptr, i16 signext %str) {
+; CHECK-LABEL: st_disjoint_align16_int16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: std r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = sext i16 %str to i64
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_int16_t_uint64_t(i64 %ptr, i16 signext %str) {
+; CHECK-LABEL: st_not_disjoint32_int16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i16 %str to i64
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_int16_t_uint64_t(i64 %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_int16_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_int16_t_uint64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: stdx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_int16_t_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: stdx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = sext i16 %str to i64
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_int16_t_uint64_t(i64 %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_int16_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: std r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_int16_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: std r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = sext i16 %str to i64
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_int16_t_uint64_t(i64 %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_int16_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_int16_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = sext i16 %str to i64
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_int16_t_uint64_t(i16 signext %str) {
+; CHECK-LABEL: st_cst_align16_int16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i16 %str to i64
+ store i64 %conv, i64* inttoptr (i64 4080 to i64*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_int16_t_uint64_t(i16 signext %str) {
+; CHECK-LABEL: st_cst_align32_int16_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: std r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i16 %str to i64
+ store i64 %conv, i64* inttoptr (i64 9999900 to i64*), align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_int16_t_uint64_t(i16 signext %str) {
+; CHECK-P10-LABEL: st_cst_align64_int16_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: std r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_int16_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: std r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = sext i16 %str to i64
+ store i64 %conv, i64* inttoptr (i64 1000000000000 to i64*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_int16_t_float(i64 %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_0_int16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_0_int16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_0_int16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i16 %str to float
+ %0 = inttoptr i64 %ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_int16_t_float(i8* nocapture %ptr, i16 signext %str) {
+; CHECK-LABEL: st_align16_int16_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprwa f0, r4
+; CHECK-NEXT: xscvsxdsp f0, f0
+; CHECK-NEXT: stfs f0, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sitofp i16 %str to float
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_int16_t_float(i8* nocapture %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_align32_int16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: stfsx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align32_int16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: lis r4, 1525
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 56600
+; CHECK-P9-NEXT: stfsx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align32_int16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: lis r4, 1525
+; CHECK-P8-NEXT: ori r4, r4, 56600
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i16 %str to float
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_int16_t_float(i8* nocapture %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_align64_int16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: stfsx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align64_int16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stfsx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align64_int16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: stfsx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i16 %str to float
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_int16_t_float(i8* nocapture %ptr, i64 %off, i16 signext %str) {
+; CHECK-LABEL: st_reg_int16_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprwa f0, r5
+; CHECK-NEXT: xscvsxdsp f0, f0
+; CHECK-NEXT: stfsx f0, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = sitofp i16 %str to float
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_int16_t_float(i64 %ptr, i8 zeroext %off, i16 signext %str) {
+; CHECK-P10-LABEL: st_or1_int16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r5
+; CHECK-P10-NEXT: or r3, r4, r3
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_or1_int16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r5
+; CHECK-P9-NEXT: or r3, r4, r3
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_or1_int16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r5
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i16 %str to float
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_int16_t_float(i64 %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_not_disjoint16_int16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: ori r3, r3, 6
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint16_int16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: ori r3, r3, 6
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint16_int16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i16 %str to float
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_int16_t_float(i64 %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align16_int16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 24(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align16_int16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, 24(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align16_int16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = sitofp i16 %str to float
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_int16_t_float(i64 %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_not_disjoint32_int16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: ori r3, r3, 34463
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: oris r3, r3, 1
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint32_int16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: ori r3, r3, 34463
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: oris r3, r3, 1
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint32_int16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i16 %str to float
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_int16_t_float(i64 %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_int16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: stfsx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_int16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stfsx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_int16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = sitofp i16 %str to float
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_int16_t_float(i64 %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_int16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_int16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint64_int16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i16 %str to float
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_int16_t_float(i64 %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_int16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: stfsx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align64_int16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stfsx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align64_int16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: lis r5, 3725
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-NEXT: ori r4, r5, 19025
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: stfsx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = sitofp i16 %str to float
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_int16_t_float(i16 signext %str) {
+; CHECK-LABEL: st_cst_align16_int16_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprwa f0, r3
+; CHECK-NEXT: xscvsxdsp f0, f0
+; CHECK-NEXT: stfs f0, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = sitofp i16 %str to float
+ store float %conv, float* inttoptr (i64 4080 to float*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_int16_t_float(i16 signext %str) {
+; CHECK-P10-LABEL: st_cst_align32_int16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r3
+; CHECK-P10-NEXT: lis r3, 153
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, -27108(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align32_int16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r3
+; CHECK-P9-NEXT: lis r3, 153
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, -27108(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align32_int16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i16 %str to float
+ store float %conv, float* inttoptr (i64 9999900 to float*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_int16_t_float(i16 signext %str) {
+; CHECK-P10-LABEL: st_cst_align64_int16_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r3
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align64_int16_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r3
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align64_int16_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i16 %str to float
+ store float %conv, float* inttoptr (i64 1000000000000 to float*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_int16_t_double(i64 %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_0_int16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_0_int16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_0_int16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i16 %str to double
+ %0 = inttoptr i64 %ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_int16_t_double(i8* nocapture %ptr, i16 signext %str) {
+; CHECK-LABEL: st_align16_int16_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprwa f0, r4
+; CHECK-NEXT: xscvsxddp f0, f0
+; CHECK-NEXT: stfd f0, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sitofp i16 %str to double
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_int16_t_double(i8* nocapture %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_align32_int16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: stfdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align32_int16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: lis r4, 1525
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 56600
+; CHECK-P9-NEXT: stfdx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align32_int16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: lis r4, 1525
+; CHECK-P8-NEXT: ori r4, r4, 56600
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i16 %str to double
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_int16_t_double(i8* nocapture %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_align64_int16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: stfdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align64_int16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stfdx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align64_int16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: stfdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i16 %str to double
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_int16_t_double(i8* nocapture %ptr, i64 %off, i16 signext %str) {
+; CHECK-LABEL: st_reg_int16_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprwa f0, r5
+; CHECK-NEXT: xscvsxddp f0, f0
+; CHECK-NEXT: stfdx f0, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = sitofp i16 %str to double
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_int16_t_double(i64 %ptr, i8 zeroext %off, i16 signext %str) {
+; CHECK-P10-LABEL: st_or1_int16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r5
+; CHECK-P10-NEXT: or r3, r4, r3
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_or1_int16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r5
+; CHECK-P9-NEXT: or r3, r4, r3
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_or1_int16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r5
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i16 %str to double
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_int16_t_double(i64 %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_not_disjoint16_int16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: ori r3, r3, 6
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint16_int16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: ori r3, r3, 6
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint16_int16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i16 %str to double
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_int16_t_double(i64 %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align16_int16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 24(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align16_int16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, 24(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align16_int16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = sitofp i16 %str to double
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_int16_t_double(i64 %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_not_disjoint32_int16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: ori r3, r3, 34463
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: oris r3, r3, 1
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint32_int16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: ori r3, r3, 34463
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: oris r3, r3, 1
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint32_int16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i16 %str to double
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_int16_t_double(i64 %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_int16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: stfdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_int16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stfdx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_int16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = sitofp i16 %str to double
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_int16_t_double(i64 %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_int16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_int16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint64_int16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i16 %str to double
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_int16_t_double(i64 %ptr, i16 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_int16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: stfdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align64_int16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stfdx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align64_int16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: lis r5, 3725
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-NEXT: ori r4, r5, 19025
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: stfdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = sitofp i16 %str to double
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_int16_t_double(i16 signext %str) {
+; CHECK-LABEL: st_cst_align16_int16_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprwa f0, r3
+; CHECK-NEXT: xscvsxddp f0, f0
+; CHECK-NEXT: stfd f0, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = sitofp i16 %str to double
+ store double %conv, double* inttoptr (i64 4080 to double*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_int16_t_double(i16 signext %str) {
+; CHECK-P10-LABEL: st_cst_align32_int16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r3
+; CHECK-P10-NEXT: lis r3, 153
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, -27108(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align32_int16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r3
+; CHECK-P9-NEXT: lis r3, 153
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, -27108(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align32_int16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i16 %str to double
+ store double %conv, double* inttoptr (i64 9999900 to double*), align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_int16_t_double(i16 signext %str) {
+; CHECK-P10-LABEL: st_cst_align64_int16_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r3
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align64_int16_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r3
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align64_int16_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i16 %str to double
+ store double %conv, double* inttoptr (i64 1000000000000 to double*), align 4096
+ ret void
+}
--- /dev/null
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-P10,CHECK-LE,CHECK-P10-LE
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-P10,CHECK-BE,CHECK-P10-BE
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P9,CHECK-LE,CHECK-P9-LE
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P9,CHECK-BE,CHECK-P9-BE
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P8,CHECK-LE,CHECK-P8-LE
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P8,CHECK-BE,CHECK-P8-BE
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_0_int32_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_int32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = sext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_align16_int32_t_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_int32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 8(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = sext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_align32_int32_t_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_int32_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_int32_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = sext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_align64_int32_t_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_int32_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_int32_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = sext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_reg_int32_t_int8_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_int32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbzx r3, r3, r4
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = sext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_or_int32_t_int8_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_int32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv1 = sext i8 %1 to i32
+ ret i32 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_or2_int32_t_int8_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or2_int32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lbzx r3, r3, r4
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = zext i8 %off to i64
+ %or = or i64 %and, %conv
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv1 = sext i8 %1 to i32
+ ret i32 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_not_disjoint16_int32_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_int32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = sext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_disjoint_align16_int32_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_int32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lbz r3, 24(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 8
+ %conv = sext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_not_disjoint32_int32_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_int32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = sext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_disjoint_align32_int32_t_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_int32_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_int32_t_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lbzx r3, r3, r4
+; CHECK-P9-NEXT: extsb r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_int32_t_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 16
+ %conv = sext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_not_disjoint64_int32_t_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_int32_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_int32_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = sext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_disjoint_align64_int32_t_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_int32_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_int32_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 4096
+ %conv = sext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_cst_align16_int32_t_int8_t() {
+; CHECK-LABEL: ld_cst_align16_int32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 4080(0)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 4080 to i8*), align 16
+ %conv = sext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_cst_align32_int32_t_int8_t() {
+; CHECK-LABEL: ld_cst_align32_int32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lbz r3, -27108(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 9999900 to i8*), align 4
+ %conv = sext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_cst_align64_int32_t_int8_t() {
+; CHECK-P10-LABEL: ld_cst_align64_int32_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_int32_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 1000000000000 to i8*), align 4096
+ %conv = sext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_0_int32_t_int16_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_int32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lha r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_align16_int32_t_int16_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_int32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lha r3, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_align32_int32_t_int16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_int32_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lhax r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_int32_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lhax r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_align64_int32_t_int16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_int32_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhax r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_int32_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhax r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_reg_int32_t_int16_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_int32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhax r3, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_or_int32_t_int16_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_int32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lha r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv1 = sext i16 %1 to i32
+ ret i32 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_or2_int32_t_int16_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or2_int32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lhax r3, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = zext i8 %off to i64
+ %or = or i64 %and, %conv
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv1 = sext i16 %1 to i32
+ ret i32 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_not_disjoint16_int32_t_int16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_int32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lha r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_disjoint_align16_int32_t_int16_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_int32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lha r3, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 8
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_not_disjoint32_int32_t_int16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_int32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lha r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_disjoint_align32_int32_t_int16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_int32_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lhax r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_int32_t_int16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lhax r3, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_int32_t_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lhax r3, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 16
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_not_disjoint64_int32_t_int16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_int32_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lha r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_int32_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lha r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_disjoint_align64_int32_t_int16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_int32_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhax r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_int32_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhax r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 4096
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_cst_align16_int32_t_int16_t() {
+; CHECK-LABEL: ld_cst_align16_int32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lha r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 4080 to i16*), align 16
+ %conv = sext i16 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_cst_align32_int32_t_int16_t() {
+; CHECK-LABEL: ld_cst_align32_int32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lha r3, -27108(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 9999900 to i16*), align 4
+ %conv = sext i16 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_cst_align64_int32_t_int16_t() {
+; CHECK-P10-LABEL: ld_cst_align64_int32_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lha r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_int32_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lha r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 1000000000000 to i16*), align 4096
+ %conv = sext i16 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_0_int32_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_int32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwa r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ ret i32 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_align16_int32_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_int32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwa r3, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ ret i32 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_align32_int32_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_int32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lwax r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_int32_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lwax r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ ret i32 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_align64_int32_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_int32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lwax r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_int32_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lwax r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ ret i32 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_reg_int32_t_uint32_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_int32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwax r3, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ ret i32 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_or_int32_t_uint32_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_int32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lwa r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ ret i32 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_or2_int32_t_uint32_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or2_int32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lwax r3, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = zext i8 %off to i64
+ %or = or i64 %and, %conv
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ ret i32 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_not_disjoint16_int32_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_int32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lwa r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ ret i32 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_disjoint_unalign16_int32_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_unalign16_int32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-NEXT: li r4, 6
+; CHECK-P10-NEXT: lwax r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_unalign16_int32_t_uint32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-NEXT: li r4, 6
+; CHECK-P9-NEXT: lwax r3, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_unalign16_int32_t_uint32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 6
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: lwax r3, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 6
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ ret i32 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_disjoint_align16_int32_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_int32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lwa r3, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 8
+ ret i32 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_not_disjoint32_int32_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_int32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lwa r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ ret i32 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_disjoint_align32_int32_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_int32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lwax r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_int32_t_uint32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lwax r3, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_int32_t_uint32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lwax r3, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 16
+ ret i32 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_not_disjoint64_int32_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_int32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lwa r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_int32_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lwa r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ ret i32 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_disjoint_align64_int32_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_int32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lwax r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_int32_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lwax r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4096
+ ret i32 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_cst_align16_int32_t_uint32_t() {
+; CHECK-LABEL: ld_cst_align16_int32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwa r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 4080 to i32*), align 16
+ ret i32 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_cst_align32_int32_t_uint32_t() {
+; CHECK-LABEL: ld_cst_align32_int32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lwa r3, -27108(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 9999900 to i32*), align 4
+ ret i32 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_cst_align64_int32_t_uint32_t() {
+; CHECK-P10-LABEL: ld_cst_align64_int32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lwa r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_int32_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lwa r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 1000000000000 to i32*), align 4096
+ ret i32 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_0_int32_t_uint64_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_0_int32_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lwa r3, 0(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_0_int32_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lwa r3, 4(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_unalign16_int32_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-LE-LABEL: ld_unalign16_int32_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: li r4, 1
+; CHECK-LE-NEXT: lwax r3, r3, r4
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_unalign16_int32_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: li r4, 5
+; CHECK-BE-NEXT: lwax r3, r3, r4
+; CHECK-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_align16_int32_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-LE-LABEL: ld_align16_int32_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lwa r3, 8(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_align16_int32_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lwa r3, 12(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_align32_int32_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LE-LABEL: ld_align32_int32_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 99999000
+; CHECK-P10-LE-NEXT: lwax r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_align32_int32_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 99999004
+; CHECK-P10-BE-NEXT: lwax r3, r3, r4
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_align32_int32_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, 1525
+; CHECK-P9-LE-NEXT: ori r4, r4, 56600
+; CHECK-P9-LE-NEXT: lwax r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_align32_int32_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: lis r4, 1525
+; CHECK-P9-BE-NEXT: ori r4, r4, 56604
+; CHECK-P9-BE-NEXT: lwax r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_align32_int32_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 1525
+; CHECK-P8-LE-NEXT: ori r4, r4, 56600
+; CHECK-P8-LE-NEXT: lwax r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_align32_int32_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r4, 1525
+; CHECK-P8-BE-NEXT: ori r4, r4, 56604
+; CHECK-P8-BE-NEXT: lwax r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_align64_int32_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LE-LABEL: ld_align64_int32_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 244140625
+; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-LE-NEXT: lwax r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_align64_int32_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587332
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: lwax r3, r3, r5
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_align64_int32_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, 3725
+; CHECK-P9-LE-NEXT: ori r4, r4, 19025
+; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-LE-NEXT: lwax r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_align64_int32_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4100
+; CHECK-P9-BE-NEXT: lwax r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_align64_int32_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 3725
+; CHECK-P8-LE-NEXT: ori r4, r4, 19025
+; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-LE-NEXT: lwax r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_align64_int32_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4100
+; CHECK-P8-BE-NEXT: lwax r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_reg_int32_t_uint64_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LE-LABEL: ld_reg_int32_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lwax r3, r3, r4
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_reg_int32_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: add r3, r3, r4
+; CHECK-BE-NEXT: lwa r3, 4(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_or_int32_t_uint64_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LE-LABEL: ld_or_int32_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: or r3, r4, r3
+; CHECK-LE-NEXT: lwa r3, 0(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_or_int32_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: or r3, r4, r3
+; CHECK-BE-NEXT: lwa r3, 4(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv1 = trunc i64 %1 to i32
+ ret i32 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_or2_int32_t_uint64_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LE-LABEL: ld_or2_int32_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-LE-NEXT: lwax r3, r3, r4
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_or2_int32_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: rotldi r3, r3, 52
+; CHECK-BE-NEXT: rldimi r4, r3, 12, 0
+; CHECK-BE-NEXT: lwa r3, 4(r4)
+; CHECK-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = zext i8 %off to i64
+ %or = or i64 %and, %conv
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv1 = trunc i64 %1 to i32
+ ret i32 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_not_disjoint16_int32_t_uint64_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_not_disjoint16_int32_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: ori r3, r3, 6
+; CHECK-LE-NEXT: lwa r3, 0(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_not_disjoint16_int32_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: ori r3, r3, 6
+; CHECK-BE-NEXT: lwa r3, 4(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_disjoint_unalign16_int32_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_disjoint_unalign16_int32_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-LE-NEXT: li r4, 6
+; CHECK-P10-LE-NEXT: lwax r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_disjoint_unalign16_int32_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-BE-NEXT: li r4, 10
+; CHECK-P10-BE-NEXT: lwax r3, r3, r4
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_disjoint_unalign16_int32_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-LE-NEXT: li r4, 6
+; CHECK-P9-LE-NEXT: lwax r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_disjoint_unalign16_int32_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-BE-NEXT: li r4, 10
+; CHECK-P9-BE-NEXT: lwax r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_disjoint_unalign16_int32_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: li r4, 6
+; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-LE-NEXT: lwax r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_disjoint_unalign16_int32_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 10
+; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-BE-NEXT: lwax r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 6
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_disjoint_align16_int32_t_uint64_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_disjoint_align16_int32_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-LE-NEXT: lwa r3, 24(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_disjoint_align16_int32_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-BE-NEXT: lwa r3, 28(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_not_disjoint32_int32_t_uint64_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_not_disjoint32_int32_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: ori r3, r3, 34463
+; CHECK-LE-NEXT: oris r3, r3, 1
+; CHECK-LE-NEXT: lwa r3, 0(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_not_disjoint32_int32_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: ori r3, r3, 34463
+; CHECK-BE-NEXT: oris r3, r3, 1
+; CHECK-BE-NEXT: lwa r3, 4(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_disjoint_align32_int32_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_disjoint_align32_int32_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: lis r4, -15264
+; CHECK-P10-LE-NEXT: and r3, r3, r4
+; CHECK-P10-LE-NEXT: pli r4, 999990000
+; CHECK-P10-LE-NEXT: lwax r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_disjoint_align32_int32_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: lis r4, -15264
+; CHECK-P10-BE-NEXT: and r3, r3, r4
+; CHECK-P10-BE-NEXT: pli r4, 999990004
+; CHECK-P10-BE-NEXT: lwax r3, r3, r4
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_disjoint_align32_int32_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, -15264
+; CHECK-P9-LE-NEXT: and r3, r3, r4
+; CHECK-P9-LE-NEXT: lis r4, 15258
+; CHECK-P9-LE-NEXT: ori r4, r4, 41712
+; CHECK-P9-LE-NEXT: lwax r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_disjoint_align32_int32_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: lis r4, -15264
+; CHECK-P9-BE-NEXT: and r3, r3, r4
+; CHECK-P9-BE-NEXT: lis r4, 15258
+; CHECK-P9-BE-NEXT: ori r4, r4, 41716
+; CHECK-P9-BE-NEXT: lwax r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_disjoint_align32_int32_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, -15264
+; CHECK-P8-LE-NEXT: lis r5, 15258
+; CHECK-P8-LE-NEXT: and r3, r3, r4
+; CHECK-P8-LE-NEXT: ori r4, r5, 41712
+; CHECK-P8-LE-NEXT: lwax r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_disjoint_align32_int32_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r4, -15264
+; CHECK-P8-BE-NEXT: lis r5, 15258
+; CHECK-P8-BE-NEXT: and r3, r3, r4
+; CHECK-P8-BE-NEXT: ori r4, r5, 41716
+; CHECK-P8-BE-NEXT: lwax r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 16
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_not_disjoint64_int32_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_not_disjoint64_int32_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 232
+; CHECK-P10-LE-NEXT: pli r5, 3567587329
+; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-LE-NEXT: or r3, r3, r5
+; CHECK-P10-LE-NEXT: lwa r3, 0(r3)
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_not_disjoint64_int32_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587329
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: or r3, r3, r5
+; CHECK-P10-BE-NEXT: lwa r3, 4(r3)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_not_disjoint64_int32_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: li r4, 29
+; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-LE-NEXT: oris r4, r4, 54437
+; CHECK-P9-LE-NEXT: ori r4, r4, 4097
+; CHECK-P9-LE-NEXT: or r3, r3, r4
+; CHECK-P9-LE-NEXT: lwa r3, 0(r3)
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_not_disjoint64_int32_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4097
+; CHECK-P9-BE-NEXT: or r3, r3, r4
+; CHECK-P9-BE-NEXT: lwa r3, 4(r3)
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_not_disjoint64_int32_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: li r4, 29
+; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-LE-NEXT: oris r4, r4, 54437
+; CHECK-P8-LE-NEXT: ori r4, r4, 4097
+; CHECK-P8-LE-NEXT: or r3, r3, r4
+; CHECK-P8-LE-NEXT: lwa r3, 0(r3)
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_not_disjoint64_int32_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4097
+; CHECK-P8-BE-NEXT: or r3, r3, r4
+; CHECK-P8-BE-NEXT: lwa r3, 4(r3)
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_disjoint_align64_int32_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_disjoint_align64_int32_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 244140625
+; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-LE-NEXT: lwax r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_disjoint_align64_int32_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587332
+; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: lwax r3, r3, r5
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_disjoint_align64_int32_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, 3725
+; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-LE-NEXT: ori r4, r4, 19025
+; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-LE-NEXT: lwax r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_disjoint_align64_int32_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4100
+; CHECK-P9-BE-NEXT: lwax r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_disjoint_align64_int32_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 3725
+; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-LE-NEXT: ori r4, r4, 19025
+; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-LE-NEXT: lwax r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_disjoint_align64_int32_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4100
+; CHECK-P8-BE-NEXT: lwax r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 4096
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_cst_align16_int32_t_uint64_t() {
+; CHECK-LE-LABEL: ld_cst_align16_int32_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lwa r3, 4080(0)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_cst_align16_int32_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lwa r3, 4084(0)
+; CHECK-BE-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 4080 to i64*), align 16
+ %conv = trunc i64 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_cst_align32_int32_t_uint64_t() {
+; CHECK-LE-LABEL: ld_cst_align32_int32_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lis r3, 153
+; CHECK-LE-NEXT: lwa r3, -27108(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_cst_align32_int32_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lis r3, 153
+; CHECK-BE-NEXT: lwa r3, -27104(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 9999900 to i64*), align 8
+ %conv = trunc i64 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_cst_align64_int32_t_uint64_t() {
+; CHECK-P10-LE-LABEL: ld_cst_align64_int32_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r3, 244140625
+; CHECK-P10-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-LE-NEXT: lwa r3, 0(r3)
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_cst_align64_int32_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r3, 232
+; CHECK-P10-BE-NEXT: pli r4, 3567587332
+; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
+; CHECK-P10-BE-NEXT: lwa r3, 0(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_cst_align64_int32_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r3, 3725
+; CHECK-P9-LE-NEXT: ori r3, r3, 19025
+; CHECK-P9-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-LE-NEXT: lwa r3, 0(r3)
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_cst_align64_int32_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r3, 29
+; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P9-BE-NEXT: oris r3, r3, 54437
+; CHECK-P9-BE-NEXT: ori r3, r3, 4100
+; CHECK-P9-BE-NEXT: lwa r3, 0(r3)
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_cst_align64_int32_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r3, 3725
+; CHECK-P8-LE-NEXT: ori r3, r3, 19025
+; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-LE-NEXT: lwa r3, 0(r3)
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_cst_align64_int32_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r3, 29
+; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P8-BE-NEXT: oris r3, r3, 54437
+; CHECK-P8-BE-NEXT: ori r3, r3, 4100
+; CHECK-P8-BE-NEXT: lwa r3, 0(r3)
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 1000000000000 to i64*), align 4096
+ %conv = trunc i64 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_0_int32_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_0_int32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_0_int32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_0_int32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptosi float %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_align16_int32_t_float(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_int32_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfs f0, 8(r3)
+; CHECK-NEXT: xscvdpsxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptosi float %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_align32_int32_t_float(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_int32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lfsx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_int32_t_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lfsx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptosi float %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_align64_int32_t_float(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_int32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfsx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_int32_t_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfsx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptosi float %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_reg_int32_t_float(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_int32_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfsx f0, r3, r4
+; CHECK-NEXT: xscvdpsxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptosi float %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_or_int32_t_float(i64 %ptr, i8 zeroext %off) {
+; CHECK-P10-LABEL: ld_or_int32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: or r3, r4, r3
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_or_int32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: or r3, r4, r3
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_or_int32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv1 = fptosi float %1 to i32
+ ret i32 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_or2_int32_t_float(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or2_int32_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lfsx f0, r3, r4
+; CHECK-NEXT: xscvdpsxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = zext i8 %off to i64
+ %or = or i64 %and, %conv
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv1 = fptosi float %1 to i32
+ ret i32 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_not_disjoint16_int32_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint16_int32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: ori r3, r3, 6
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint16_int32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: ori r3, r3, 6
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint16_int32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptosi float %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_disjoint_align16_int32_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align16_int32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-NEXT: lfs f0, 24(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align16_int32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-NEXT: lfs f0, 24(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align16_int32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 8
+ %conv = fptosi float %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_not_disjoint32_int32_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint32_int32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: ori r3, r3, 34463
+; CHECK-P10-NEXT: oris r3, r3, 1
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint32_int32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: ori r3, r3, 34463
+; CHECK-P9-NEXT: oris r3, r3, 1
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint32_int32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptosi float %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_disjoint_align32_int32_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_int32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lfsx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_int32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lfsx f0, r3, r4
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_int32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lfsx f0, r3, r4
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 16
+ %conv = fptosi float %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_not_disjoint64_int32_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_int32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint64_int32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint64_int32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptosi float %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_disjoint_align64_int32_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_int32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfsx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_int32_t_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfsx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4096
+ %conv = fptosi float %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_cst_align16_int32_t_float() {
+; CHECK-LABEL: ld_cst_align16_int32_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfs f0, 4080(0)
+; CHECK-NEXT: xscvdpsxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load float, float* inttoptr (i64 4080 to float*), align 16
+ %conv = fptosi float %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_cst_align32_int32_t_float() {
+; CHECK-P10-LABEL: ld_cst_align32_int32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r3, 153
+; CHECK-P10-NEXT: lfs f0, -27108(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align32_int32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 153
+; CHECK-P9-NEXT: lfs f0, -27108(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align32_int32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load float, float* inttoptr (i64 9999900 to float*), align 4
+ %conv = fptosi float %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_cst_align64_int32_t_float() {
+; CHECK-P10-LABEL: ld_cst_align64_int32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align64_int32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align64_int32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load float, float* inttoptr (i64 1000000000000 to float*), align 4096
+ %conv = fptosi float %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_0_int32_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_0_int32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_0_int32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_0_int32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptosi double %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_align16_int32_t_double(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_int32_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfd f0, 8(r3)
+; CHECK-NEXT: xscvdpsxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptosi double %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_align32_int32_t_double(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_int32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_int32_t_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptosi double %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_align64_int32_t_double(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_int32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_int32_t_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptosi double %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_reg_int32_t_double(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_int32_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfdx f0, r3, r4
+; CHECK-NEXT: xscvdpsxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptosi double %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_or_int32_t_double(i64 %ptr, i8 zeroext %off) {
+; CHECK-P10-LABEL: ld_or_int32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: or r3, r4, r3
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_or_int32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: or r3, r4, r3
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_or_int32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv1 = fptosi double %1 to i32
+ ret i32 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_or2_int32_t_double(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or2_int32_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lfdx f0, r3, r4
+; CHECK-NEXT: xscvdpsxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = zext i8 %off to i64
+ %or = or i64 %and, %conv
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv1 = fptosi double %1 to i32
+ ret i32 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_not_disjoint16_int32_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint16_int32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: ori r3, r3, 6
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint16_int32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: ori r3, r3, 6
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint16_int32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptosi double %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_disjoint_align16_int32_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align16_int32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-NEXT: lfd f0, 24(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align16_int32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-NEXT: lfd f0, 24(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align16_int32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptosi double %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_not_disjoint32_int32_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint32_int32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: ori r3, r3, 34463
+; CHECK-P10-NEXT: oris r3, r3, 1
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint32_int32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: ori r3, r3, 34463
+; CHECK-P9-NEXT: oris r3, r3, 1
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint32_int32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptosi double %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_disjoint_align32_int32_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_int32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_int32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lfdx f0, r3, r4
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_int32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lfdx f0, r3, r4
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 16
+ %conv = fptosi double %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_not_disjoint64_int32_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_int32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint64_int32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint64_int32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptosi double %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_disjoint_align64_int32_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_int32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_int32_t_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 4096
+ %conv = fptosi double %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_cst_align16_int32_t_double() {
+; CHECK-LABEL: ld_cst_align16_int32_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfd f0, 4080(0)
+; CHECK-NEXT: xscvdpsxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load double, double* inttoptr (i64 4080 to double*), align 16
+ %conv = fptosi double %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_cst_align32_int32_t_double() {
+; CHECK-P10-LABEL: ld_cst_align32_int32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r3, 153
+; CHECK-P10-NEXT: lfd f0, -27108(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align32_int32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 153
+; CHECK-P9-NEXT: lfd f0, -27108(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align32_int32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load double, double* inttoptr (i64 9999900 to double*), align 8
+ %conv = fptosi double %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i32 @ld_cst_align64_int32_t_double() {
+; CHECK-P10-LABEL: ld_cst_align64_int32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align64_int32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align64_int32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load double, double* inttoptr (i64 1000000000000 to double*), align 4096
+ %conv = fptosi double %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_0_uint32_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = zext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_align16_uint32_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = zext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_align32_uint32_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint32_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint32_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = zext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_align64_uint32_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint32_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint32_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = zext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_reg_uint32_t_uint8_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbzx r3, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = zext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_or_uint32_t_uint8_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv1 = zext i8 %1 to i32
+ ret i32 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint16_uint32_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = zext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align16_uint32_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lbz r3, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 8
+ %conv = zext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint32_uint32_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = zext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align32_uint32_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint32_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint32_t_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lbzx r3, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint32_t_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 16
+ %conv = zext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint64_uint32_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint32_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint32_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = zext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align64_uint32_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint32_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint32_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 4096
+ %conv = zext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align16_uint32_t_uint8_t() {
+; CHECK-LABEL: ld_cst_align16_uint32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 4080 to i8*), align 16
+ %conv = zext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align32_uint32_t_uint8_t() {
+; CHECK-LABEL: ld_cst_align32_uint32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lbz r3, -27108(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 9999900 to i8*), align 4
+ %conv = zext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align64_uint32_t_uint8_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint32_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint32_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 1000000000000 to i8*), align 4096
+ %conv = zext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_0_uint32_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = sext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_align16_uint32_t_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 8(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = sext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_align32_uint32_t_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint32_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint32_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = sext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_align64_uint32_t_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint32_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint32_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = sext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_reg_uint32_t_int8_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbzx r3, r3, r4
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = sext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_or_uint32_t_int8_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv1 = sext i8 %1 to i32
+ ret i32 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint16_uint32_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = sext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align16_uint32_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lbz r3, 24(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 8
+ %conv = sext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint32_uint32_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = sext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align32_uint32_t_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint32_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint32_t_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lbzx r3, r3, r4
+; CHECK-P9-NEXT: extsb r3, r3
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint32_t_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 16
+ %conv = sext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint64_uint32_t_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint32_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint32_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = sext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align64_uint32_t_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint32_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint32_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 4096
+ %conv = sext i8 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align16_uint32_t_int8_t() {
+; CHECK-LABEL: ld_cst_align16_uint32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 4080(0)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 4080 to i8*), align 16
+ %conv = sext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align32_uint32_t_int8_t() {
+; CHECK-LABEL: ld_cst_align32_uint32_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lbz r3, -27108(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 9999900 to i8*), align 4
+ %conv = sext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align64_uint32_t_int8_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint32_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint32_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 1000000000000 to i8*), align 4096
+ %conv = sext i8 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_0_uint32_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = zext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_align16_uint32_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = zext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_align32_uint32_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint32_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint32_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = zext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_align64_uint32_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint32_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint32_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = zext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_reg_uint32_t_uint16_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhzx r3, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = zext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_or_uint32_t_uint16_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv1 = zext i16 %1 to i32
+ ret i32 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint16_uint32_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = zext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align16_uint32_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lhz r3, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 8
+ %conv = zext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint32_uint32_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = zext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align32_uint32_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint32_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint32_t_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lhzx r3, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint32_t_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lhzx r3, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 16
+ %conv = zext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint64_uint32_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint32_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lhz r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint32_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lhz r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = zext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align64_uint32_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint32_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint32_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 4096
+ %conv = zext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align16_uint32_t_uint16_t() {
+; CHECK-LABEL: ld_cst_align16_uint32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 4080 to i16*), align 16
+ %conv = zext i16 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align32_uint32_t_uint16_t() {
+; CHECK-LABEL: ld_cst_align32_uint32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lhz r3, -27108(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 9999900 to i16*), align 4
+ %conv = zext i16 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align64_uint32_t_uint16_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint32_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lhz r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint32_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lhz r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 1000000000000 to i16*), align 4096
+ %conv = zext i16 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_0_uint32_t_int16_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lha r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_align16_uint32_t_int16_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lha r3, 8(r3)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_align32_uint32_t_int16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint32_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lhax r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint32_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lhax r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_align64_uint32_t_int16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint32_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhax r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint32_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhax r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_reg_uint32_t_int16_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhax r3, r3, r4
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_or_uint32_t_int16_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lha r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv1 = sext i16 %1 to i32
+ ret i32 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint16_uint32_t_int16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lha r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align16_uint32_t_int16_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lha r3, 24(r3)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 8
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint32_uint32_t_int16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lha r3, 0(r3)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align32_uint32_t_int16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint32_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lhax r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint32_t_int16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lhax r3, r3, r4
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint32_t_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lhax r3, r3, r4
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 16
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint64_uint32_t_int16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint32_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lha r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint32_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lha r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align64_uint32_t_int16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint32_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhax r3, r3, r4
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint32_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhax r3, r3, r4
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 4096
+ %conv = sext i16 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align16_uint32_t_int16_t() {
+; CHECK-LABEL: ld_cst_align16_uint32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lha r3, 4080(0)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 4080 to i16*), align 16
+ %conv = sext i16 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align32_uint32_t_int16_t() {
+; CHECK-LABEL: ld_cst_align32_uint32_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lha r3, -27108(r3)
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 9999900 to i16*), align 4
+ %conv = sext i16 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align64_uint32_t_int16_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint32_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lha r3, 0(r3)
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint32_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lha r3, 0(r3)
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 1000000000000 to i16*), align 4096
+ %conv = sext i16 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_0_uint32_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ ret i32 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_align16_uint32_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ ret i32 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_align32_uint32_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint32_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ ret i32 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_align64_uint32_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint32_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ ret i32 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_reg_uint32_t_uint32_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwzx r3, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ ret i32 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_or_uint32_t_uint32_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ ret i32 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint16_uint32_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ ret i32 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align16_uint32_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lwz r3, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 8
+ ret i32 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint32_uint32_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ ret i32 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align32_uint32_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint32_t_uint32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lwzx r3, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint32_t_uint32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lwzx r3, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 16
+ ret i32 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint64_uint32_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lwz r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint32_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lwz r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ ret i32 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align64_uint32_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint32_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4096
+ ret i32 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align16_uint32_t_uint32_t() {
+; CHECK-LABEL: ld_cst_align16_uint32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 4080 to i32*), align 16
+ ret i32 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align32_uint32_t_uint32_t() {
+; CHECK-LABEL: ld_cst_align32_uint32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lwz r3, -27108(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 9999900 to i32*), align 4
+ ret i32 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align64_uint32_t_uint32_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lwz r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint32_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lwz r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 1000000000000 to i32*), align 4096
+ ret i32 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_0_uint32_t_uint64_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_0_uint32_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lwz r3, 0(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_0_uint32_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lwz r3, 4(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_align16_uint32_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-LE-LABEL: ld_align16_uint32_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lwz r3, 8(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_align16_uint32_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lwz r3, 12(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_align32_uint32_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LE-LABEL: ld_align32_uint32_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 99999000
+; CHECK-P10-LE-NEXT: lwzx r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_align32_uint32_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 99999004
+; CHECK-P10-BE-NEXT: lwzx r3, r3, r4
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_align32_uint32_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, 1525
+; CHECK-P9-LE-NEXT: ori r4, r4, 56600
+; CHECK-P9-LE-NEXT: lwzx r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_align32_uint32_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: lis r4, 1525
+; CHECK-P9-BE-NEXT: ori r4, r4, 56604
+; CHECK-P9-BE-NEXT: lwzx r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_align32_uint32_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 1525
+; CHECK-P8-LE-NEXT: ori r4, r4, 56600
+; CHECK-P8-LE-NEXT: lwzx r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_align32_uint32_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r4, 1525
+; CHECK-P8-BE-NEXT: ori r4, r4, 56604
+; CHECK-P8-BE-NEXT: lwzx r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_align64_uint32_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LE-LABEL: ld_align64_uint32_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 244140625
+; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-LE-NEXT: lwzx r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_align64_uint32_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587332
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: lwzx r3, r3, r5
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_align64_uint32_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, 3725
+; CHECK-P9-LE-NEXT: ori r4, r4, 19025
+; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-LE-NEXT: lwzx r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_align64_uint32_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4100
+; CHECK-P9-BE-NEXT: lwzx r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_align64_uint32_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 3725
+; CHECK-P8-LE-NEXT: ori r4, r4, 19025
+; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-LE-NEXT: lwzx r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_align64_uint32_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4100
+; CHECK-P8-BE-NEXT: lwzx r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_reg_uint32_t_uint64_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LE-LABEL: ld_reg_uint32_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lwzx r3, r3, r4
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_reg_uint32_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: add r3, r3, r4
+; CHECK-BE-NEXT: lwz r3, 4(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_or_uint32_t_uint64_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LE-LABEL: ld_or_uint32_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: or r3, r4, r3
+; CHECK-LE-NEXT: lwz r3, 0(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_or_uint32_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: or r3, r4, r3
+; CHECK-BE-NEXT: lwz r3, 4(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv1 = trunc i64 %1 to i32
+ ret i32 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint16_uint32_t_uint64_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_not_disjoint16_uint32_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: ori r3, r3, 6
+; CHECK-LE-NEXT: lwz r3, 0(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_not_disjoint16_uint32_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: ori r3, r3, 6
+; CHECK-BE-NEXT: lwz r3, 4(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align16_uint32_t_uint64_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_disjoint_align16_uint32_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-LE-NEXT: lwz r3, 24(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_disjoint_align16_uint32_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-BE-NEXT: lwz r3, 28(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint32_uint32_t_uint64_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_not_disjoint32_uint32_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: ori r3, r3, 34463
+; CHECK-LE-NEXT: oris r3, r3, 1
+; CHECK-LE-NEXT: lwz r3, 0(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_not_disjoint32_uint32_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: ori r3, r3, 34463
+; CHECK-BE-NEXT: oris r3, r3, 1
+; CHECK-BE-NEXT: lwz r3, 4(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align32_uint32_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_disjoint_align32_uint32_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: lis r4, -15264
+; CHECK-P10-LE-NEXT: and r3, r3, r4
+; CHECK-P10-LE-NEXT: pli r4, 999990000
+; CHECK-P10-LE-NEXT: lwzx r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_disjoint_align32_uint32_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: lis r4, -15264
+; CHECK-P10-BE-NEXT: and r3, r3, r4
+; CHECK-P10-BE-NEXT: pli r4, 999990004
+; CHECK-P10-BE-NEXT: lwzx r3, r3, r4
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_disjoint_align32_uint32_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, -15264
+; CHECK-P9-LE-NEXT: and r3, r3, r4
+; CHECK-P9-LE-NEXT: lis r4, 15258
+; CHECK-P9-LE-NEXT: ori r4, r4, 41712
+; CHECK-P9-LE-NEXT: lwzx r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_disjoint_align32_uint32_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: lis r4, -15264
+; CHECK-P9-BE-NEXT: and r3, r3, r4
+; CHECK-P9-BE-NEXT: lis r4, 15258
+; CHECK-P9-BE-NEXT: ori r4, r4, 41716
+; CHECK-P9-BE-NEXT: lwzx r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_disjoint_align32_uint32_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, -15264
+; CHECK-P8-LE-NEXT: lis r5, 15258
+; CHECK-P8-LE-NEXT: and r3, r3, r4
+; CHECK-P8-LE-NEXT: ori r4, r5, 41712
+; CHECK-P8-LE-NEXT: lwzx r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_disjoint_align32_uint32_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r4, -15264
+; CHECK-P8-BE-NEXT: lis r5, 15258
+; CHECK-P8-BE-NEXT: and r3, r3, r4
+; CHECK-P8-BE-NEXT: ori r4, r5, 41716
+; CHECK-P8-BE-NEXT: lwzx r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 16
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint64_uint32_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_not_disjoint64_uint32_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 232
+; CHECK-P10-LE-NEXT: pli r5, 3567587329
+; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-LE-NEXT: or r3, r3, r5
+; CHECK-P10-LE-NEXT: lwz r3, 0(r3)
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_not_disjoint64_uint32_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587329
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: or r3, r3, r5
+; CHECK-P10-BE-NEXT: lwz r3, 4(r3)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_not_disjoint64_uint32_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: li r4, 29
+; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-LE-NEXT: oris r4, r4, 54437
+; CHECK-P9-LE-NEXT: ori r4, r4, 4097
+; CHECK-P9-LE-NEXT: or r3, r3, r4
+; CHECK-P9-LE-NEXT: lwz r3, 0(r3)
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_not_disjoint64_uint32_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4097
+; CHECK-P9-BE-NEXT: or r3, r3, r4
+; CHECK-P9-BE-NEXT: lwz r3, 4(r3)
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_not_disjoint64_uint32_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: li r4, 29
+; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-LE-NEXT: oris r4, r4, 54437
+; CHECK-P8-LE-NEXT: ori r4, r4, 4097
+; CHECK-P8-LE-NEXT: or r3, r3, r4
+; CHECK-P8-LE-NEXT: lwz r3, 0(r3)
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_not_disjoint64_uint32_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4097
+; CHECK-P8-BE-NEXT: or r3, r3, r4
+; CHECK-P8-BE-NEXT: lwz r3, 4(r3)
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align64_uint32_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_disjoint_align64_uint32_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 244140625
+; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-LE-NEXT: lwzx r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_disjoint_align64_uint32_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587332
+; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: lwzx r3, r3, r5
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_disjoint_align64_uint32_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, 3725
+; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-LE-NEXT: ori r4, r4, 19025
+; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-LE-NEXT: lwzx r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_disjoint_align64_uint32_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4100
+; CHECK-P9-BE-NEXT: lwzx r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_disjoint_align64_uint32_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 3725
+; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-LE-NEXT: ori r4, r4, 19025
+; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-LE-NEXT: lwzx r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_disjoint_align64_uint32_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4100
+; CHECK-P8-BE-NEXT: lwzx r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 4096
+ %conv = trunc i64 %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align16_uint32_t_uint64_t() {
+; CHECK-LE-LABEL: ld_cst_align16_uint32_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lwz r3, 4080(0)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_cst_align16_uint32_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lwz r3, 4084(0)
+; CHECK-BE-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 4080 to i64*), align 16
+ %conv = trunc i64 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align32_uint32_t_uint64_t() {
+; CHECK-LE-LABEL: ld_cst_align32_uint32_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lis r3, 153
+; CHECK-LE-NEXT: lwz r3, -27108(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_cst_align32_uint32_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lis r3, 153
+; CHECK-BE-NEXT: lwz r3, -27104(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 9999900 to i64*), align 8
+ %conv = trunc i64 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align64_uint32_t_uint64_t() {
+; CHECK-P10-LE-LABEL: ld_cst_align64_uint32_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r3, 244140625
+; CHECK-P10-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-LE-NEXT: lwz r3, 0(r3)
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_cst_align64_uint32_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r3, 232
+; CHECK-P10-BE-NEXT: pli r4, 3567587332
+; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
+; CHECK-P10-BE-NEXT: lwz r3, 0(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_cst_align64_uint32_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r3, 3725
+; CHECK-P9-LE-NEXT: ori r3, r3, 19025
+; CHECK-P9-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-LE-NEXT: lwz r3, 0(r3)
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_cst_align64_uint32_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r3, 29
+; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P9-BE-NEXT: oris r3, r3, 54437
+; CHECK-P9-BE-NEXT: ori r3, r3, 4100
+; CHECK-P9-BE-NEXT: lwz r3, 0(r3)
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_cst_align64_uint32_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r3, 3725
+; CHECK-P8-LE-NEXT: ori r3, r3, 19025
+; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-LE-NEXT: lwz r3, 0(r3)
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_cst_align64_uint32_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r3, 29
+; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P8-BE-NEXT: oris r3, r3, 54437
+; CHECK-P8-BE-NEXT: ori r3, r3, 4100
+; CHECK-P8-BE-NEXT: lwz r3, 0(r3)
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 1000000000000 to i64*), align 4096
+ %conv = trunc i64 %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_0_uint32_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_0_uint32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpuxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_0_uint32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpuxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_0_uint32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpuxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_align16_uint32_t_float(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint32_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfs f0, 8(r3)
+; CHECK-NEXT: xscvdpuxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_align32_uint32_t_float(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lfsx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpuxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint32_t_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lfsx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpuxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_align64_uint32_t_float(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfsx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpuxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint32_t_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfsx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpuxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_reg_uint32_t_float(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint32_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfsx f0, r3, r4
+; CHECK-NEXT: xscvdpuxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_or_uint32_t_float(i64 %ptr, i8 zeroext %off) {
+; CHECK-P10-LABEL: ld_or_uint32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: or r3, r4, r3
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpuxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_or_uint32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: or r3, r4, r3
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpuxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_or_uint32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpuxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv1 = fptoui float %1 to i32
+ ret i32 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint16_uint32_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint16_uint32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: ori r3, r3, 6
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpuxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint16_uint32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: ori r3, r3, 6
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpuxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint16_uint32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpuxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align16_uint32_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align16_uint32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-NEXT: lfs f0, 24(r3)
+; CHECK-P10-NEXT: xscvdpuxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align16_uint32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-NEXT: lfs f0, 24(r3)
+; CHECK-P9-NEXT: xscvdpuxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align16_uint32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpuxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 8
+ %conv = fptoui float %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint32_uint32_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint32_uint32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: ori r3, r3, 34463
+; CHECK-P10-NEXT: oris r3, r3, 1
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpuxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint32_uint32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: ori r3, r3, 34463
+; CHECK-P9-NEXT: oris r3, r3, 1
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpuxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint32_uint32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpuxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align32_uint32_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lfsx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpuxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lfsx f0, r3, r4
+; CHECK-P9-NEXT: xscvdpuxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lfsx f0, r3, r4
+; CHECK-P8-NEXT: xscvdpuxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 16
+ %conv = fptoui float %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint64_uint32_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpuxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint64_uint32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpuxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint64_uint32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpuxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align64_uint32_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfsx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpuxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint32_t_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfsx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpuxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4096
+ %conv = fptoui float %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align16_uint32_t_float() {
+; CHECK-LABEL: ld_cst_align16_uint32_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfs f0, 4080(0)
+; CHECK-NEXT: xscvdpuxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %0 = load float, float* inttoptr (i64 4080 to float*), align 16
+ %conv = fptoui float %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align32_uint32_t_float() {
+; CHECK-P10-LABEL: ld_cst_align32_uint32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r3, 153
+; CHECK-P10-NEXT: lfs f0, -27108(r3)
+; CHECK-P10-NEXT: xscvdpuxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align32_uint32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 153
+; CHECK-P9-NEXT: lfs f0, -27108(r3)
+; CHECK-P9-NEXT: xscvdpuxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align32_uint32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpuxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load float, float* inttoptr (i64 9999900 to float*), align 4
+ %conv = fptoui float %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align64_uint32_t_float() {
+; CHECK-P10-LABEL: ld_cst_align64_uint32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpuxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align64_uint32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpuxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align64_uint32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpuxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load float, float* inttoptr (i64 1000000000000 to float*), align 4096
+ %conv = fptoui float %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_0_uint32_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_0_uint32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpuxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_0_uint32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpuxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_0_uint32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpuxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_align16_uint32_t_double(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint32_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfd f0, 8(r3)
+; CHECK-NEXT: xscvdpuxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_align32_uint32_t_double(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpuxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint32_t_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpuxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_align64_uint32_t_double(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpuxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint32_t_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpuxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_reg_uint32_t_double(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint32_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfdx f0, r3, r4
+; CHECK-NEXT: xscvdpuxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_or_uint32_t_double(i64 %ptr, i8 zeroext %off) {
+; CHECK-P10-LABEL: ld_or_uint32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: or r3, r4, r3
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpuxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_or_uint32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: or r3, r4, r3
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpuxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_or_uint32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpuxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv1 = fptoui double %1 to i32
+ ret i32 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint16_uint32_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint16_uint32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: ori r3, r3, 6
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpuxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint16_uint32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: ori r3, r3, 6
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpuxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint16_uint32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpuxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align16_uint32_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align16_uint32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-NEXT: lfd f0, 24(r3)
+; CHECK-P10-NEXT: xscvdpuxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align16_uint32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-NEXT: lfd f0, 24(r3)
+; CHECK-P9-NEXT: xscvdpuxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align16_uint32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpuxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint32_uint32_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint32_uint32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: ori r3, r3, 34463
+; CHECK-P10-NEXT: oris r3, r3, 1
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpuxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint32_uint32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: ori r3, r3, 34463
+; CHECK-P9-NEXT: oris r3, r3, 1
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpuxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint32_uint32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpuxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align32_uint32_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpuxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lfdx f0, r3, r4
+; CHECK-P9-NEXT: xscvdpuxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lfdx f0, r3, r4
+; CHECK-P8-NEXT: xscvdpuxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 16
+ %conv = fptoui double %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_not_disjoint64_uint32_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpuxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint64_uint32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpuxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint64_uint32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpuxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_disjoint_align64_uint32_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpuxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint32_t_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpuxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 4096
+ %conv = fptoui double %1 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align16_uint32_t_double() {
+; CHECK-LABEL: ld_cst_align16_uint32_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfd f0, 4080(0)
+; CHECK-NEXT: xscvdpuxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %0 = load double, double* inttoptr (i64 4080 to double*), align 16
+ %conv = fptoui double %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align32_uint32_t_double() {
+; CHECK-P10-LABEL: ld_cst_align32_uint32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r3, 153
+; CHECK-P10-NEXT: lfd f0, -27108(r3)
+; CHECK-P10-NEXT: xscvdpuxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align32_uint32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 153
+; CHECK-P9-NEXT: lfd f0, -27108(r3)
+; CHECK-P9-NEXT: xscvdpuxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align32_uint32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpuxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load double, double* inttoptr (i64 9999900 to double*), align 8
+ %conv = fptoui double %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i32 @ld_cst_align64_uint32_t_double() {
+; CHECK-P10-LABEL: ld_cst_align64_uint32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpuxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align64_uint32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpuxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align64_uint32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpuxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load double, double* inttoptr (i64 1000000000000 to double*), align 4096
+ %conv = fptoui double %0 to i32
+ ret i32 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_uint32_t_uint8_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_0_uint32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stb r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i32 %str to i8
+ %0 = inttoptr i64 %ptr to i8*
+ store i8 %conv, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_uint32_t_uint8_t(i8* nocapture %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_align16_uint32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stb r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i32 %str to i8
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ store i8 %conv, i8* %add.ptr, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_uint32_t_uint8_t(i8* nocapture %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_align32_uint32_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: stbx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_uint32_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: stbx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = trunc i32 %str to i8
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ store i8 %conv, i8* %add.ptr, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_uint32_t_uint8_t(i8* nocapture %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_align64_uint32_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stbx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_uint32_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stbx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = trunc i32 %str to i8
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ store i8 %conv, i8* %add.ptr, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_uint32_t_uint8_t(i8* nocapture %ptr, i64 %off, i32 zeroext %str) {
+; CHECK-LABEL: st_reg_uint32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stbx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i32 %str to i8
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ store i8 %conv, i8* %add.ptr, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_uint32_t_uint8_t(i64 %ptr, i8 zeroext %off, i32 zeroext %str) {
+; CHECK-LABEL: st_or1_uint32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: stb r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i32 %str to i8
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_uint32_t_uint8_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint16_uint32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: stb r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i32 %str to i8
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_uint32_t_uint8_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_disjoint_align16_uint32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: stb r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = trunc i32 %str to i8
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_uint32_t_uint8_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint32_uint32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: stb r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i32 %str to i8
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_uint32_t_uint8_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint32_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: stbx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint32_t_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: stbx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint32_t_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: stbx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = trunc i32 %str to i8
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_uint32_t_uint8_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint32_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: stb r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_uint32_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: stb r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = trunc i32 %str to i8
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_uint32_t_uint8_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint32_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stbx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_uint32_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stbx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = trunc i32 %str to i8
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_uint32_t_uint8_t(i32 zeroext %str) {
+; CHECK-LABEL: st_cst_align16_uint32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stb r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i32 %str to i8
+ store i8 %conv, i8* inttoptr (i64 4080 to i8*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_uint32_t_uint8_t(i32 zeroext %str) {
+; CHECK-LABEL: st_cst_align32_uint32_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: stb r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i32 %str to i8
+ store i8 %conv, i8* inttoptr (i64 9999900 to i8*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_uint32_t_uint8_t(i32 zeroext %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint32_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stb r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_uint32_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stb r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = trunc i32 %str to i8
+ store i8 %conv, i8* inttoptr (i64 1000000000000 to i8*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_uint32_t_uint16_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_0_uint32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sth r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i32 %str to i16
+ %0 = inttoptr i64 %ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_uint32_t_uint16_t(i8* nocapture %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_align16_uint32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sth r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i32 %str to i16
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_uint32_t_uint16_t(i8* nocapture %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_align32_uint32_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_uint32_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: sthx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = trunc i32 %str to i16
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_uint32_t_uint16_t(i8* nocapture %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_align64_uint32_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_uint32_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: sthx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = trunc i32 %str to i16
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_uint32_t_uint16_t(i8* nocapture %ptr, i64 %off, i32 zeroext %str) {
+; CHECK-LABEL: st_reg_uint32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sthx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i32 %str to i16
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_uint32_t_uint16_t(i64 %ptr, i8 zeroext %off, i32 zeroext %str) {
+; CHECK-LABEL: st_or1_uint32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: sth r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i32 %str to i16
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_uint32_t_uint16_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint16_uint32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: sth r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i32 %str to i16
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_uint32_t_uint16_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_disjoint_align16_uint32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: sth r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = trunc i32 %str to i16
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_uint32_t_uint16_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint32_uint32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: sth r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i32 %str to i16
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_uint32_t_uint16_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint32_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint32_t_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: sthx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint32_t_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: sthx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = trunc i32 %str to i16
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_uint32_t_uint16_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint32_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: sth r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_uint32_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: sth r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = trunc i32 %str to i16
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_uint32_t_uint16_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint32_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_uint32_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: sthx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = trunc i32 %str to i16
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_uint32_t_uint16_t(i32 zeroext %str) {
+; CHECK-LABEL: st_cst_align16_uint32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sth r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i32 %str to i16
+ store i16 %conv, i16* inttoptr (i64 4080 to i16*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_uint32_t_uint16_t(i32 zeroext %str) {
+; CHECK-LABEL: st_cst_align32_uint32_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: sth r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i32 %str to i16
+ store i16 %conv, i16* inttoptr (i64 9999900 to i16*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_uint32_t_uint16_t(i32 zeroext %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint32_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: sth r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_uint32_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: sth r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = trunc i32 %str to i16
+ store i16 %conv, i16* inttoptr (i64 1000000000000 to i16*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_uint32_t_uint32_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_0_uint32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stw r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i32*
+ store i32 %str, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_uint32_t_uint32_t(i8* nocapture %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_align16_uint32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stw r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %str, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_uint32_t_uint32_t(i8* nocapture %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_align32_uint32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_uint32_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: stwx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %str, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_uint32_t_uint32_t(i8* nocapture %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_align64_uint32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_uint32_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stwx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %str, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_uint32_t_uint32_t(i8* nocapture %ptr, i64 %off, i32 zeroext %str) {
+; CHECK-LABEL: st_reg_uint32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stwx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %str, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_uint32_t_uint32_t(i64 %ptr, i8 zeroext %off, i32 zeroext %str) {
+; CHECK-LABEL: st_or1_uint32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: stw r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i32*
+ store i32 %str, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_uint32_t_uint32_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint16_uint32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: stw r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ store i32 %str, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_uint32_t_uint32_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_disjoint_align16_uint32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: stw r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ store i32 %str, i32* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_uint32_t_uint32_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint32_uint32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: stw r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ store i32 %str, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_uint32_t_uint32_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint32_t_uint32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: stwx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint32_t_uint32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: stwx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ store i32 %str, i32* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_uint32_t_uint32_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: stw r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_uint32_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: stw r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ store i32 %str, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_uint32_t_uint32_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_uint32_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stwx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ store i32 %str, i32* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_uint32_t_uint32_t(i32 zeroext %str) {
+; CHECK-LABEL: st_cst_align16_uint32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stw r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ store i32 %str, i32* inttoptr (i64 4080 to i32*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_uint32_t_uint32_t(i32 zeroext %str) {
+; CHECK-LABEL: st_cst_align32_uint32_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: stw r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ store i32 %str, i32* inttoptr (i64 9999900 to i32*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_uint32_t_uint32_t(i32 zeroext %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint32_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stw r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_uint32_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stw r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ store i32 %str, i32* inttoptr (i64 1000000000000 to i32*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_uint32_t_uint64_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_0_uint32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i32 %str to i64
+ %0 = inttoptr i64 %ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_uint32_t_uint64_t(i8* nocapture %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_align16_uint32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i32 %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_uint32_t_uint64_t(i8* nocapture %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_align32_uint32_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_uint32_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = zext i32 %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_uint32_t_uint64_t(i8* nocapture %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_align64_uint32_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_uint32_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = zext i32 %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_uint32_t_uint64_t(i8* nocapture %ptr, i64 %off, i32 zeroext %str) {
+; CHECK-LABEL: st_reg_uint32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stdx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i32 %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_uint32_t_uint64_t(i64 %ptr, i8 zeroext %off, i32 zeroext %str) {
+; CHECK-LABEL: st_or1_uint32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: std r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i32 %str to i64
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_uint32_t_uint64_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint16_uint32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i32 %str to i64
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_uint32_t_uint64_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_disjoint_align16_uint32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: std r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = zext i32 %str to i64
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_uint32_t_uint64_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint32_uint32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i32 %str to i64
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_uint32_t_uint64_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint32_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint32_t_uint64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: stdx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint32_t_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: stdx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = zext i32 %str to i64
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_uint32_t_uint64_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint32_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: std r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_uint32_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: std r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = zext i32 %str to i64
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_uint32_t_uint64_t(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint32_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_uint32_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = zext i32 %str to i64
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_uint32_t_uint64_t(i32 zeroext %str) {
+; CHECK-LABEL: st_cst_align16_uint32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i32 %str to i64
+ store i64 %conv, i64* inttoptr (i64 4080 to i64*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_uint32_t_uint64_t(i32 zeroext %str) {
+; CHECK-LABEL: st_cst_align32_uint32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: std r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i32 %str to i64
+ store i64 %conv, i64* inttoptr (i64 9999900 to i64*), align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_uint32_t_uint64_t(i32 zeroext %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint32_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: std r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_uint32_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: std r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = zext i32 %str to i64
+ store i64 %conv, i64* inttoptr (i64 1000000000000 to i64*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_uint32_t_float(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_0_uint32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_0_uint32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_0_uint32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i32 %str to float
+ %0 = inttoptr i64 %ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_uint32_t_float(i8* nocapture %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_align16_uint32_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprwz f0, r4
+; CHECK-NEXT: xscvuxdsp f0, f0
+; CHECK-NEXT: stfs f0, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = uitofp i32 %str to float
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_uint32_t_float(i8* nocapture %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_align32_uint32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: stfsx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align32_uint32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: lis r4, 1525
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 56600
+; CHECK-P9-NEXT: stfsx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align32_uint32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: lis r4, 1525
+; CHECK-P8-NEXT: ori r4, r4, 56600
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i32 %str to float
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_uint32_t_float(i8* nocapture %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_align64_uint32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: stfsx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align64_uint32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stfsx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align64_uint32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: stfsx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i32 %str to float
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_uint32_t_float(i8* nocapture %ptr, i64 %off, i32 zeroext %str) {
+; CHECK-LABEL: st_reg_uint32_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprwz f0, r5
+; CHECK-NEXT: xscvuxdsp f0, f0
+; CHECK-NEXT: stfsx f0, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = uitofp i32 %str to float
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_uint32_t_float(i64 %ptr, i8 zeroext %off, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_or1_uint32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r5
+; CHECK-P10-NEXT: or r3, r4, r3
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_or1_uint32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r5
+; CHECK-P9-NEXT: or r3, r4, r3
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_or1_uint32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r5
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i32 %str to float
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_uint32_t_float(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint16_uint32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: ori r3, r3, 6
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint16_uint32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: ori r3, r3, 6
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint16_uint32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i32 %str to float
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_uint32_t_float(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align16_uint32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 24(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align16_uint32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, 24(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align16_uint32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = uitofp i32 %str to float
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_uint32_t_float(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint32_uint32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: ori r3, r3, 34463
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: oris r3, r3, 1
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint32_uint32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: ori r3, r3, 34463
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: oris r3, r3, 1
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint32_uint32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i32 %str to float
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_uint32_t_float(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: stfsx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stfsx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = uitofp i32 %str to float
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_uint32_t_float(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_uint32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint64_uint32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i32 %str to float
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_uint32_t_float(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: stfsx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align64_uint32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stfsx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align64_uint32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: lis r5, 3725
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-NEXT: ori r4, r5, 19025
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: stfsx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = uitofp i32 %str to float
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_uint32_t_float(i32 zeroext %str) {
+; CHECK-LABEL: st_cst_align16_uint32_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprwz f0, r3
+; CHECK-NEXT: xscvuxdsp f0, f0
+; CHECK-NEXT: stfs f0, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = uitofp i32 %str to float
+ store float %conv, float* inttoptr (i64 4080 to float*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_uint32_t_float(i32 zeroext %str) {
+; CHECK-P10-LABEL: st_cst_align32_uint32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r3
+; CHECK-P10-NEXT: lis r3, 153
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, -27108(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align32_uint32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r3
+; CHECK-P9-NEXT: lis r3, 153
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, -27108(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align32_uint32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i32 %str to float
+ store float %conv, float* inttoptr (i64 9999900 to float*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_uint32_t_float(i32 zeroext %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r3
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align64_uint32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r3
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align64_uint32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i32 %str to float
+ store float %conv, float* inttoptr (i64 1000000000000 to float*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_uint32_t_double(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_0_uint32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_0_uint32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_0_uint32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i32 %str to double
+ %0 = inttoptr i64 %ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_uint32_t_double(i8* nocapture %ptr, i32 zeroext %str) {
+; CHECK-LABEL: st_align16_uint32_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprwz f0, r4
+; CHECK-NEXT: xscvuxddp f0, f0
+; CHECK-NEXT: stfd f0, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = uitofp i32 %str to double
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_uint32_t_double(i8* nocapture %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_align32_uint32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: stfdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align32_uint32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: lis r4, 1525
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 56600
+; CHECK-P9-NEXT: stfdx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align32_uint32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: lis r4, 1525
+; CHECK-P8-NEXT: ori r4, r4, 56600
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i32 %str to double
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_uint32_t_double(i8* nocapture %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_align64_uint32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: stfdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align64_uint32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stfdx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align64_uint32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: stfdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i32 %str to double
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_uint32_t_double(i8* nocapture %ptr, i64 %off, i32 zeroext %str) {
+; CHECK-LABEL: st_reg_uint32_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprwz f0, r5
+; CHECK-NEXT: xscvuxddp f0, f0
+; CHECK-NEXT: stfdx f0, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = uitofp i32 %str to double
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_uint32_t_double(i64 %ptr, i8 zeroext %off, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_or1_uint32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r5
+; CHECK-P10-NEXT: or r3, r4, r3
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_or1_uint32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r5
+; CHECK-P9-NEXT: or r3, r4, r3
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_or1_uint32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r5
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i32 %str to double
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_uint32_t_double(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint16_uint32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: ori r3, r3, 6
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint16_uint32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: ori r3, r3, 6
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint16_uint32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i32 %str to double
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_uint32_t_double(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align16_uint32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 24(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align16_uint32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, 24(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align16_uint32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = uitofp i32 %str to double
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_uint32_t_double(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint32_uint32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: ori r3, r3, 34463
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: oris r3, r3, 1
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint32_uint32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: ori r3, r3, 34463
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: oris r3, r3, 1
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint32_uint32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i32 %str to double
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_uint32_t_double(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: stfdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stfdx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = uitofp i32 %str to double
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_uint32_t_double(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_uint32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint64_uint32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i32 %str to double
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_uint32_t_double(i64 %ptr, i32 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: stfdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align64_uint32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stfdx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align64_uint32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: lis r5, 3725
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-NEXT: ori r4, r5, 19025
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: stfdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = uitofp i32 %str to double
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_uint32_t_double(i32 zeroext %str) {
+; CHECK-LABEL: st_cst_align16_uint32_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprwz f0, r3
+; CHECK-NEXT: xscvuxddp f0, f0
+; CHECK-NEXT: stfd f0, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = uitofp i32 %str to double
+ store double %conv, double* inttoptr (i64 4080 to double*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_uint32_t_double(i32 zeroext %str) {
+; CHECK-P10-LABEL: st_cst_align32_uint32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r3
+; CHECK-P10-NEXT: lis r3, 153
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, -27108(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align32_uint32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r3
+; CHECK-P9-NEXT: lis r3, 153
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, -27108(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align32_uint32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i32 %str to double
+ store double %conv, double* inttoptr (i64 9999900 to double*), align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_uint32_t_double(i32 zeroext %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r3
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align64_uint32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r3
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align64_uint32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i32 %str to double
+ store double %conv, double* inttoptr (i64 1000000000000 to double*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_int32_t_uint64_t(i64 %ptr, i32 signext %str) {
+; CHECK-LABEL: st_0_int32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i32 %str to i64
+ %0 = inttoptr i64 %ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_int32_t_uint64_t(i8* nocapture %ptr, i32 signext %str) {
+; CHECK-LABEL: st_align16_int32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i32 %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_int32_t_uint64_t(i8* nocapture %ptr, i32 signext %str) {
+; CHECK-P10-LABEL: st_align32_int32_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_int32_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = sext i32 %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_int32_t_uint64_t(i8* nocapture %ptr, i32 signext %str) {
+; CHECK-P10-LABEL: st_align64_int32_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_int32_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = sext i32 %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_int32_t_uint64_t(i8* nocapture %ptr, i64 %off, i32 signext %str) {
+; CHECK-LABEL: st_reg_int32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stdx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i32 %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_int32_t_uint64_t(i64 %ptr, i8 zeroext %off, i32 signext %str) {
+; CHECK-LABEL: st_or1_int32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: std r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i32 %str to i64
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_int32_t_uint64_t(i64 %ptr, i32 signext %str) {
+; CHECK-LABEL: st_not_disjoint16_int32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i32 %str to i64
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_int32_t_uint64_t(i64 %ptr, i32 signext %str) {
+; CHECK-LABEL: st_disjoint_align16_int32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: std r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = sext i32 %str to i64
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_int32_t_uint64_t(i64 %ptr, i32 signext %str) {
+; CHECK-LABEL: st_not_disjoint32_int32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i32 %str to i64
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_int32_t_uint64_t(i64 %ptr, i32 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_int32_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_int32_t_uint64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: stdx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_int32_t_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: stdx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = sext i32 %str to i64
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_int32_t_uint64_t(i64 %ptr, i32 signext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_int32_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: std r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_int32_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: std r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = sext i32 %str to i64
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_int32_t_uint64_t(i64 %ptr, i32 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_int32_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_int32_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = sext i32 %str to i64
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_int32_t_uint64_t(i32 signext %str) {
+; CHECK-LABEL: st_cst_align16_int32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i32 %str to i64
+ store i64 %conv, i64* inttoptr (i64 4080 to i64*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_int32_t_uint64_t(i32 signext %str) {
+; CHECK-LABEL: st_cst_align32_int32_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: std r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i32 %str to i64
+ store i64 %conv, i64* inttoptr (i64 9999900 to i64*), align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_int32_t_uint64_t(i32 signext %str) {
+; CHECK-P10-LABEL: st_cst_align64_int32_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: std r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_int32_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: std r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = sext i32 %str to i64
+ store i64 %conv, i64* inttoptr (i64 1000000000000 to i64*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_int32_t_float(i64 %ptr, i32 signext %str) {
+; CHECK-P10-LABEL: st_0_int32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_0_int32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_0_int32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i32 %str to float
+ %0 = inttoptr i64 %ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_int32_t_float(i8* nocapture %ptr, i32 signext %str) {
+; CHECK-LABEL: st_align16_int32_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprwa f0, r4
+; CHECK-NEXT: xscvsxdsp f0, f0
+; CHECK-NEXT: stfs f0, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sitofp i32 %str to float
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_int32_t_float(i8* nocapture %ptr, i32 signext %str) {
+; CHECK-P10-LABEL: st_align32_int32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: stfsx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align32_int32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: lis r4, 1525
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 56600
+; CHECK-P9-NEXT: stfsx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align32_int32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: lis r4, 1525
+; CHECK-P8-NEXT: ori r4, r4, 56600
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i32 %str to float
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_int32_t_float(i8* nocapture %ptr, i32 signext %str) {
+; CHECK-P10-LABEL: st_align64_int32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: stfsx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align64_int32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stfsx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align64_int32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: stfsx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i32 %str to float
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_int32_t_float(i8* nocapture %ptr, i64 %off, i32 signext %str) {
+; CHECK-LABEL: st_reg_int32_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprwa f0, r5
+; CHECK-NEXT: xscvsxdsp f0, f0
+; CHECK-NEXT: stfsx f0, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = sitofp i32 %str to float
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_int32_t_float(i64 %ptr, i8 zeroext %off, i32 signext %str) {
+; CHECK-P10-LABEL: st_or1_int32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r5
+; CHECK-P10-NEXT: or r3, r4, r3
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_or1_int32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r5
+; CHECK-P9-NEXT: or r3, r4, r3
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_or1_int32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r5
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i32 %str to float
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_int32_t_float(i64 %ptr, i32 signext %str) {
+; CHECK-P10-LABEL: st_not_disjoint16_int32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: ori r3, r3, 6
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint16_int32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: ori r3, r3, 6
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint16_int32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i32 %str to float
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_int32_t_float(i64 %ptr, i32 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align16_int32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 24(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align16_int32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, 24(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align16_int32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = sitofp i32 %str to float
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_int32_t_float(i64 %ptr, i32 signext %str) {
+; CHECK-P10-LABEL: st_not_disjoint32_int32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: ori r3, r3, 34463
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: oris r3, r3, 1
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint32_int32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: ori r3, r3, 34463
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: oris r3, r3, 1
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint32_int32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i32 %str to float
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_int32_t_float(i64 %ptr, i32 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_int32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: stfsx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_int32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stfsx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_int32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = sitofp i32 %str to float
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_int32_t_float(i64 %ptr, i32 signext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_int32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_int32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint64_int32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i32 %str to float
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_int32_t_float(i64 %ptr, i32 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_int32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: stfsx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align64_int32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stfsx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align64_int32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: lis r5, 3725
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-NEXT: ori r4, r5, 19025
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: stfsx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = sitofp i32 %str to float
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_int32_t_float(i32 signext %str) {
+; CHECK-LABEL: st_cst_align16_int32_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprwa f0, r3
+; CHECK-NEXT: xscvsxdsp f0, f0
+; CHECK-NEXT: stfs f0, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = sitofp i32 %str to float
+ store float %conv, float* inttoptr (i64 4080 to float*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_int32_t_float(i32 signext %str) {
+; CHECK-P10-LABEL: st_cst_align32_int32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r3
+; CHECK-P10-NEXT: lis r3, 153
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, -27108(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align32_int32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r3
+; CHECK-P9-NEXT: lis r3, 153
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, -27108(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align32_int32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i32 %str to float
+ store float %conv, float* inttoptr (i64 9999900 to float*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_int32_t_float(i32 signext %str) {
+; CHECK-P10-LABEL: st_cst_align64_int32_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r3
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align64_int32_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r3
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align64_int32_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i32 %str to float
+ store float %conv, float* inttoptr (i64 1000000000000 to float*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_int32_t_double(i64 %ptr, i32 signext %str) {
+; CHECK-P10-LABEL: st_0_int32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_0_int32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_0_int32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i32 %str to double
+ %0 = inttoptr i64 %ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_int32_t_double(i8* nocapture %ptr, i32 signext %str) {
+; CHECK-LABEL: st_align16_int32_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprwa f0, r4
+; CHECK-NEXT: xscvsxddp f0, f0
+; CHECK-NEXT: stfd f0, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sitofp i32 %str to double
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_int32_t_double(i8* nocapture %ptr, i32 signext %str) {
+; CHECK-P10-LABEL: st_align32_int32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: stfdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align32_int32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: lis r4, 1525
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 56600
+; CHECK-P9-NEXT: stfdx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align32_int32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: lis r4, 1525
+; CHECK-P8-NEXT: ori r4, r4, 56600
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i32 %str to double
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_int32_t_double(i8* nocapture %ptr, i32 signext %str) {
+; CHECK-P10-LABEL: st_align64_int32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: stfdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align64_int32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stfdx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align64_int32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: stfdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i32 %str to double
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_int32_t_double(i8* nocapture %ptr, i64 %off, i32 signext %str) {
+; CHECK-LABEL: st_reg_int32_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprwa f0, r5
+; CHECK-NEXT: xscvsxddp f0, f0
+; CHECK-NEXT: stfdx f0, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = sitofp i32 %str to double
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_int32_t_double(i64 %ptr, i8 zeroext %off, i32 signext %str) {
+; CHECK-P10-LABEL: st_or1_int32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r5
+; CHECK-P10-NEXT: or r3, r4, r3
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_or1_int32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r5
+; CHECK-P9-NEXT: or r3, r4, r3
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_or1_int32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r5
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i32 %str to double
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_int32_t_double(i64 %ptr, i32 signext %str) {
+; CHECK-P10-LABEL: st_not_disjoint16_int32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: ori r3, r3, 6
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint16_int32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: ori r3, r3, 6
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint16_int32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i32 %str to double
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_int32_t_double(i64 %ptr, i32 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align16_int32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 24(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align16_int32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, 24(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align16_int32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = sitofp i32 %str to double
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_int32_t_double(i64 %ptr, i32 signext %str) {
+; CHECK-P10-LABEL: st_not_disjoint32_int32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: ori r3, r3, 34463
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: oris r3, r3, 1
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint32_int32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: ori r3, r3, 34463
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: oris r3, r3, 1
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint32_int32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i32 %str to double
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_int32_t_double(i64 %ptr, i32 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_int32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: stfdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_int32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stfdx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_int32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = sitofp i32 %str to double
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_int32_t_double(i64 %ptr, i32 signext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_int32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_int32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint64_int32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i32 %str to double
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_int32_t_double(i64 %ptr, i32 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_int32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: stfdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align64_int32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stfdx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align64_int32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: lis r5, 3725
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-NEXT: ori r4, r5, 19025
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: stfdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = sitofp i32 %str to double
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_int32_t_double(i32 signext %str) {
+; CHECK-LABEL: st_cst_align16_int32_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprwa f0, r3
+; CHECK-NEXT: xscvsxddp f0, f0
+; CHECK-NEXT: stfd f0, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = sitofp i32 %str to double
+ store double %conv, double* inttoptr (i64 4080 to double*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_int32_t_double(i32 signext %str) {
+; CHECK-P10-LABEL: st_cst_align32_int32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r3
+; CHECK-P10-NEXT: lis r3, 153
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, -27108(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align32_int32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r3
+; CHECK-P9-NEXT: lis r3, 153
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, -27108(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align32_int32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i32 %str to double
+ store double %conv, double* inttoptr (i64 9999900 to double*), align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_int32_t_double(i32 signext %str) {
+; CHECK-P10-LABEL: st_cst_align64_int32_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r3
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align64_int32_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r3
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align64_int32_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i32 %str to double
+ store double %conv, double* inttoptr (i64 1000000000000 to double*), align 4096
+ ret void
+}
--- /dev/null
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-P10
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-P10
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P9
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P9
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P8
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P8
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_0_int64_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_0_int64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_0_int64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_0_int64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptosi float %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_align16_int64_t_float(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_int64_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfs f0, 8(r3)
+; CHECK-NEXT: xscvdpsxds f0, f0
+; CHECK-NEXT: mffprd r3, f0
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptosi float %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_align32_int64_t_float(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_int64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lfsx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_int64_t_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lfsx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
+; CHECK-PREP10-NEXT: mffprd r3, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptosi float %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_align64_int64_t_float(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_int64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfsx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_int64_t_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfsx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
+; CHECK-PREP10-NEXT: mffprd r3, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptosi float %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_reg_int64_t_float(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_int64_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfsx f0, r3, r4
+; CHECK-NEXT: xscvdpsxds f0, f0
+; CHECK-NEXT: mffprd r3, f0
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptosi float %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_or_int64_t_float(i64 %ptr, i8 zeroext %off) {
+; CHECK-P10-LABEL: ld_or_int64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: or r3, r4, r3
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_or_int64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: or r3, r4, r3
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_or_int64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv1 = fptosi float %1 to i64
+ ret i64 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_not_disjoint16_int64_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint16_int64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: ori r3, r3, 6
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint16_int64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: ori r3, r3, 6
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint16_int64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptosi float %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_align16_int64_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align16_int64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-NEXT: lfs f0, 24(r3)
+; CHECK-P10-NEXT: xscvdpsxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align16_int64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-NEXT: lfs f0, 24(r3)
+; CHECK-P9-NEXT: xscvdpsxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align16_int64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 8
+ %conv = fptosi float %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_not_disjoint32_int64_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint32_int64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: ori r3, r3, 34463
+; CHECK-P10-NEXT: oris r3, r3, 1
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint32_int64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: ori r3, r3, 34463
+; CHECK-P9-NEXT: oris r3, r3, 1
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint32_int64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptosi float %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_align32_int64_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_int64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lfsx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_int64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lfsx f0, r3, r4
+; CHECK-P9-NEXT: xscvdpsxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_int64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lfsx f0, r3, r4
+; CHECK-P8-NEXT: xscvdpsxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 16
+ %conv = fptosi float %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_not_disjoint64_int64_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_int64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint64_int64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint64_int64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptosi float %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_align64_int64_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_int64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfsx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_int64_t_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfsx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
+; CHECK-PREP10-NEXT: mffprd r3, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4096
+ %conv = fptosi float %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_align16_int64_t_float() {
+; CHECK-LABEL: ld_cst_align16_int64_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfs f0, 4080(0)
+; CHECK-NEXT: xscvdpsxds f0, f0
+; CHECK-NEXT: mffprd r3, f0
+; CHECK-NEXT: blr
+entry:
+ %0 = load float, float* inttoptr (i64 4080 to float*), align 16
+ %conv = fptosi float %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_align32_int64_t_float() {
+; CHECK-P10-LABEL: ld_cst_align32_int64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r3, 153
+; CHECK-P10-NEXT: lfs f0, -27108(r3)
+; CHECK-P10-NEXT: xscvdpsxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align32_int64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 153
+; CHECK-P9-NEXT: lfs f0, -27108(r3)
+; CHECK-P9-NEXT: xscvdpsxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align32_int64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load float, float* inttoptr (i64 9999900 to float*), align 4
+ %conv = fptosi float %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_align64_int64_t_float() {
+; CHECK-P10-LABEL: ld_cst_align64_int64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align64_int64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align64_int64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load float, float* inttoptr (i64 1000000000000 to float*), align 4096
+ %conv = fptosi float %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_0_int64_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_0_int64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_0_int64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_0_int64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptosi double %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_align16_int64_t_double(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_int64_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfd f0, 8(r3)
+; CHECK-NEXT: xscvdpsxds f0, f0
+; CHECK-NEXT: mffprd r3, f0
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptosi double %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_align32_int64_t_double(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_int64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_int64_t_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
+; CHECK-PREP10-NEXT: mffprd r3, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptosi double %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_align64_int64_t_double(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_int64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_int64_t_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
+; CHECK-PREP10-NEXT: mffprd r3, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptosi double %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_reg_int64_t_double(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_int64_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfdx f0, r3, r4
+; CHECK-NEXT: xscvdpsxds f0, f0
+; CHECK-NEXT: mffprd r3, f0
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptosi double %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_or_int64_t_double(i64 %ptr, i8 zeroext %off) {
+; CHECK-P10-LABEL: ld_or_int64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: or r3, r4, r3
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_or_int64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: or r3, r4, r3
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_or_int64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv1 = fptosi double %1 to i64
+ ret i64 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_not_disjoint16_int64_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint16_int64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: ori r3, r3, 6
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint16_int64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: ori r3, r3, 6
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint16_int64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptosi double %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_align16_int64_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align16_int64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-NEXT: lfd f0, 24(r3)
+; CHECK-P10-NEXT: xscvdpsxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align16_int64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-NEXT: lfd f0, 24(r3)
+; CHECK-P9-NEXT: xscvdpsxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align16_int64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptosi double %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_not_disjoint32_int64_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint32_int64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: ori r3, r3, 34463
+; CHECK-P10-NEXT: oris r3, r3, 1
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint32_int64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: ori r3, r3, 34463
+; CHECK-P9-NEXT: oris r3, r3, 1
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint32_int64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptosi double %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_align32_int64_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_int64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_int64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lfdx f0, r3, r4
+; CHECK-P9-NEXT: xscvdpsxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_int64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lfdx f0, r3, r4
+; CHECK-P8-NEXT: xscvdpsxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 16
+ %conv = fptosi double %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_not_disjoint64_int64_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_int64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint64_int64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint64_int64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptosi double %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_align64_int64_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_int64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_int64_t_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
+; CHECK-PREP10-NEXT: mffprd r3, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 4096
+ %conv = fptosi double %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_align16_int64_t_double() {
+; CHECK-LABEL: ld_cst_align16_int64_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfd f0, 4080(0)
+; CHECK-NEXT: xscvdpsxds f0, f0
+; CHECK-NEXT: mffprd r3, f0
+; CHECK-NEXT: blr
+entry:
+ %0 = load double, double* inttoptr (i64 4080 to double*), align 16
+ %conv = fptosi double %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_align32_int64_t_double() {
+; CHECK-P10-LABEL: ld_cst_align32_int64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r3, 153
+; CHECK-P10-NEXT: lfd f0, -27108(r3)
+; CHECK-P10-NEXT: xscvdpsxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align32_int64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 153
+; CHECK-P9-NEXT: lfd f0, -27108(r3)
+; CHECK-P9-NEXT: xscvdpsxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align32_int64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load double, double* inttoptr (i64 9999900 to double*), align 8
+ %conv = fptosi double %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_align64_int64_t_double() {
+; CHECK-P10-LABEL: ld_cst_align64_int64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align64_int64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align64_int64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load double, double* inttoptr (i64 1000000000000 to double*), align 4096
+ %conv = fptosi double %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_0_uint64_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = zext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_unalign16_uint64_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_unalign16_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 1(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = zext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_align16_uint64_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = zext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_unalign32_uint64_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_unalign32_uint64_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_unalign32_uint64_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1
+; CHECK-PREP10-NEXT: ori r4, r4, 34463
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = zext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_align32_uint64_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint64_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint64_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = zext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_unalign64_uint64_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_unalign64_uint64_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: lbzx r3, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_unalign64_uint64_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = zext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_align64_uint64_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint64_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint64_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = zext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_reg_uint64_t_uint8_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbzx r3, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = zext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_or_uint64_t_uint8_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv1 = zext i8 %1 to i64
+ ret i64 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_or2_uint64_t_uint8_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or2_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lbzx r3, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = zext i8 %off to i64
+ %or = or i64 %and, %conv
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv1 = zext i8 %1 to i64
+ ret i64 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_not_disjoint16_uint64_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = zext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_unalign16_uint64_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_unalign16_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lbz r3, 6(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 6
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 2
+ %conv = zext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_align16_uint64_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lbz r3, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 8
+ %conv = zext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_not_disjoint32_uint64_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = zext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_unalign32_uint64_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_unalign32_uint64_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
+; CHECK-P10-NEXT: pli r4, 99999
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_unalign32_uint64_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
+; CHECK-PREP10-NEXT: ori r4, r4, 34463
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1048576
+ %or = or i64 %and, 99999
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = zext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_align32_uint64_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint64_t_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lbzx r3, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint64_t_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 16
+ %conv = zext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_not_disjoint64_uint64_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = zext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_unalign64_uint64_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_unalign64_uint64_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: lbzx r3, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint64_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = zext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_align64_uint64_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 4096
+ %conv = zext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_unalign16_uint64_t_uint8_t() {
+; CHECK-LABEL: ld_cst_unalign16_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 255(0)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 255 to i8*), align 1
+ %conv = zext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_align16_uint64_t_uint8_t() {
+; CHECK-LABEL: ld_cst_align16_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 4080 to i8*), align 16
+ %conv = zext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_unalign32_uint64_t_uint8_t() {
+; CHECK-LABEL: ld_cst_unalign32_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 2
+; CHECK-NEXT: lbz r3, -31073(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 99999 to i8*), align 1
+ %conv = zext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_align32_uint64_t_uint8_t() {
+; CHECK-LABEL: ld_cst_align32_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lbz r3, -27108(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 9999900 to i8*), align 4
+ %conv = zext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_unalign64_uint64_t_uint8_t() {
+; CHECK-P10-LABEL: ld_cst_unalign64_uint64_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 232
+; CHECK-P10-NEXT: pli r4, 3567587329
+; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
+; CHECK-P10-NEXT: lbz r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_unalign64_uint64_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r3, 29
+; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
+; CHECK-PREP10-NEXT: oris r3, r3, 54437
+; CHECK-PREP10-NEXT: ori r3, r3, 4097
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 1000000000001 to i8*), align 1
+ %conv = zext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_align64_uint64_t_uint8_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint64_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 1000000000000 to i8*), align 4096
+ %conv = zext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_0_uint64_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint64_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = sext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_unalign16_uint64_t_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_unalign16_uint64_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 1(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = sext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_align16_uint64_t_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint64_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 8(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = sext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_unalign32_uint64_t_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_unalign32_uint64_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_unalign32_uint64_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1
+; CHECK-PREP10-NEXT: ori r4, r4, 34463
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = sext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_align32_uint64_t_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint64_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint64_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = sext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_unalign64_uint64_t_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_unalign64_uint64_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: lbzx r3, r3, r5
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_unalign64_uint64_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = sext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_align64_uint64_t_int8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint64_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint64_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = sext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_reg_uint64_t_int8_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint64_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbzx r3, r3, r4
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = load i8, i8* %add.ptr, align 1
+ %conv = sext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_or_uint64_t_int8_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint64_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv1 = sext i8 %1 to i64
+ ret i64 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_or2_uint64_t_int8_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or2_uint64_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lbzx r3, r3, r4
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = zext i8 %off to i64
+ %or = or i64 %and, %conv
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv1 = sext i8 %1 to i64
+ ret i64 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_not_disjoint16_uint64_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint64_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = sext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_unalign16_uint64_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_unalign16_uint64_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lbz r3, 6(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 6
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 2
+ %conv = sext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_align16_uint64_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint64_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lbz r3, 24(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 8
+ %conv = sext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_not_disjoint32_uint64_t_int8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint64_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = sext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_unalign32_uint64_t_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_unalign32_uint64_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
+; CHECK-P10-NEXT: pli r4, 99999
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_unalign32_uint64_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
+; CHECK-PREP10-NEXT: ori r4, r4, 34463
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1048576
+ %or = or i64 %and, 99999
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = sext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_align32_uint64_t_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint64_t_int8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lbzx r3, r3, r4
+; CHECK-P9-NEXT: extsb r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint64_t_int8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 16
+ %conv = sext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_not_disjoint64_uint64_t_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = sext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_unalign64_uint64_t_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_unalign64_uint64_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: lbzx r3, r3, r5
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint64_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ %conv = sext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_align64_uint64_t_int8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 4096
+ %conv = sext i8 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_unalign16_uint64_t_int8_t() {
+; CHECK-LABEL: ld_cst_unalign16_uint64_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 255(0)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 255 to i8*), align 1
+ %conv = sext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_align16_uint64_t_int8_t() {
+; CHECK-LABEL: ld_cst_align16_uint64_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 4080(0)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 4080 to i8*), align 16
+ %conv = sext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_unalign32_uint64_t_int8_t() {
+; CHECK-LABEL: ld_cst_unalign32_uint64_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 2
+; CHECK-NEXT: lbz r3, -31073(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 99999 to i8*), align 1
+ %conv = sext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_align32_uint64_t_int8_t() {
+; CHECK-LABEL: ld_cst_align32_uint64_t_int8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lbz r3, -27108(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 9999900 to i8*), align 4
+ %conv = sext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_unalign64_uint64_t_int8_t() {
+; CHECK-P10-LABEL: ld_cst_unalign64_uint64_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 232
+; CHECK-P10-NEXT: pli r4, 3567587329
+; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
+; CHECK-P10-NEXT: lbz r3, 0(r4)
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_unalign64_uint64_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r3, 29
+; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
+; CHECK-PREP10-NEXT: oris r3, r3, 54437
+; CHECK-PREP10-NEXT: ori r3, r3, 4097
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 1000000000001 to i8*), align 1
+ %conv = sext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_align64_uint64_t_int8_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint64_t_int8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_int8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 1000000000000 to i8*), align 4096
+ %conv = sext i8 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_0_uint64_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_unalign16_uint64_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_unalign16_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 1(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_align16_uint64_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_unalign32_uint64_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_unalign32_uint64_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_unalign32_uint64_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1
+; CHECK-PREP10-NEXT: ori r4, r4, 34463
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_align32_uint64_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint64_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint64_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_unalign64_uint64_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_unalign64_uint64_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: lhzx r3, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_unalign64_uint64_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_align64_uint64_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint64_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint64_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_reg_uint64_t_uint16_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhzx r3, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_or_uint64_t_uint16_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv1 = zext i16 %1 to i64
+ ret i64 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_or2_uint64_t_uint16_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or2_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lhzx r3, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = zext i8 %off to i64
+ %or = or i64 %and, %conv
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv1 = zext i16 %1 to i64
+ ret i64 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_not_disjoint16_uint64_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_unalign16_uint64_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_unalign16_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lhz r3, 6(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 6
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_align16_uint64_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lhz r3, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 8
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_not_disjoint32_uint64_t_uint16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lhz r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_unalign32_uint64_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_unalign32_uint64_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
+; CHECK-P10-NEXT: pli r4, 99999
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_unalign32_uint64_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
+; CHECK-PREP10-NEXT: ori r4, r4, 34463
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1048576
+ %or = or i64 %and, 99999
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_align32_uint64_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint64_t_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lhzx r3, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint64_t_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lhzx r3, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 16
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_not_disjoint64_uint64_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lhz r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lhz r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_unalign64_uint64_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_unalign64_uint64_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: lhzx r3, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint64_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_align64_uint64_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 4096
+ %conv = zext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_unalign16_uint64_t_uint16_t() {
+; CHECK-LABEL: ld_cst_unalign16_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 255(0)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 255 to i16*), align 2
+ %conv = zext i16 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_align16_uint64_t_uint16_t() {
+; CHECK-LABEL: ld_cst_align16_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhz r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 4080 to i16*), align 16
+ %conv = zext i16 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_unalign32_uint64_t_uint16_t() {
+; CHECK-LABEL: ld_cst_unalign32_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 2
+; CHECK-NEXT: lhz r3, -31073(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 99999 to i16*), align 2
+ %conv = zext i16 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_align32_uint64_t_uint16_t() {
+; CHECK-LABEL: ld_cst_align32_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lhz r3, -27108(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 9999900 to i16*), align 4
+ %conv = zext i16 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_unalign64_uint64_t_uint16_t() {
+; CHECK-P10-LABEL: ld_cst_unalign64_uint64_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 232
+; CHECK-P10-NEXT: pli r4, 3567587329
+; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
+; CHECK-P10-NEXT: lhz r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_unalign64_uint64_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r3, 29
+; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
+; CHECK-PREP10-NEXT: oris r3, r3, 54437
+; CHECK-PREP10-NEXT: ori r3, r3, 4097
+; CHECK-PREP10-NEXT: lhz r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 1000000000001 to i16*), align 2
+ %conv = zext i16 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_align64_uint64_t_uint16_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint64_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lhz r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lhz r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 1000000000000 to i16*), align 4096
+ %conv = zext i16 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_0_uint64_t_int16_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lha r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_unalign16_uint64_t_int16_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_unalign16_uint64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lha r3, 1(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_align16_uint64_t_int16_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lha r3, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_unalign32_uint64_t_int16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_unalign32_uint64_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999
+; CHECK-P10-NEXT: lhax r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_unalign32_uint64_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1
+; CHECK-PREP10-NEXT: ori r4, r4, 34463
+; CHECK-PREP10-NEXT: lhax r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_align32_uint64_t_int16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint64_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lhax r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint64_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lhax r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_unalign64_uint64_t_int16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_unalign64_uint64_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: lhax r3, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_unalign64_uint64_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: lhax r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_align64_uint64_t_int16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint64_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhax r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint64_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhax r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_reg_uint64_t_int16_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lhax r3, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_or_uint64_t_int16_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lha r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv1 = sext i16 %1 to i64
+ ret i64 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_or2_uint64_t_int16_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or2_uint64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lhax r3, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = zext i8 %off to i64
+ %or = or i64 %and, %conv
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv1 = sext i16 %1 to i64
+ ret i64 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_not_disjoint16_uint64_t_int16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lha r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_unalign16_uint64_t_int16_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_unalign16_uint64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lha r3, 6(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 6
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_align16_uint64_t_int16_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lha r3, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 8
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_not_disjoint32_uint64_t_int16_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lha r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_unalign32_uint64_t_int16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_unalign32_uint64_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
+; CHECK-P10-NEXT: pli r4, 99999
+; CHECK-P10-NEXT: lhax r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_unalign32_uint64_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
+; CHECK-PREP10-NEXT: ori r4, r4, 34463
+; CHECK-PREP10-NEXT: lhax r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1048576
+ %or = or i64 %and, 99999
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_align32_uint64_t_int16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lhax r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint64_t_int16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lhax r3, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint64_t_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lhax r3, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 16
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_not_disjoint64_uint64_t_int16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lha r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lha r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_unalign64_uint64_t_int16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_unalign64_uint64_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: lhax r3, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint64_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: lhax r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_align64_uint64_t_int16_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lhax r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lhax r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 4096
+ %conv = sext i16 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_unalign16_uint64_t_int16_t() {
+; CHECK-LABEL: ld_cst_unalign16_uint64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lha r3, 255(0)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 255 to i16*), align 2
+ %conv = sext i16 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_align16_uint64_t_int16_t() {
+; CHECK-LABEL: ld_cst_align16_uint64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lha r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 4080 to i16*), align 16
+ %conv = sext i16 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_unalign32_uint64_t_int16_t() {
+; CHECK-LABEL: ld_cst_unalign32_uint64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 2
+; CHECK-NEXT: lha r3, -31073(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 99999 to i16*), align 2
+ %conv = sext i16 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_align32_uint64_t_int16_t() {
+; CHECK-LABEL: ld_cst_align32_uint64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lha r3, -27108(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 9999900 to i16*), align 4
+ %conv = sext i16 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_unalign64_uint64_t_int16_t() {
+; CHECK-P10-LABEL: ld_cst_unalign64_uint64_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 232
+; CHECK-P10-NEXT: pli r4, 3567587329
+; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
+; CHECK-P10-NEXT: lha r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_unalign64_uint64_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r3, 29
+; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
+; CHECK-PREP10-NEXT: oris r3, r3, 54437
+; CHECK-PREP10-NEXT: ori r3, r3, 4097
+; CHECK-PREP10-NEXT: lha r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 1000000000001 to i16*), align 2
+ %conv = sext i16 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_align64_uint64_t_int16_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint64_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lha r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lha r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 1000000000000 to i16*), align 4096
+ %conv = sext i16 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_0_uint64_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_unalign16_uint64_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_unalign16_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 1(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_align16_uint64_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_unalign32_uint64_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_unalign32_uint64_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_unalign32_uint64_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1
+; CHECK-PREP10-NEXT: ori r4, r4, 34463
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_align32_uint64_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint64_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint64_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_unalign64_uint64_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_unalign64_uint64_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: lwzx r3, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_unalign64_uint64_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_align64_uint64_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint64_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint64_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_reg_uint64_t_uint32_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwzx r3, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_or_uint64_t_uint32_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv1 = zext i32 %1 to i64
+ ret i64 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_or2_uint64_t_uint32_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or2_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lwzx r3, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = zext i8 %off to i64
+ %or = or i64 %and, %conv
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv1 = zext i32 %1 to i64
+ ret i64 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_not_disjoint16_uint64_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_unalign16_uint64_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_unalign16_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lwz r3, 6(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 6
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_align16_uint64_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lwz r3, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 8
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_not_disjoint32_uint64_t_uint32_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lwz r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_unalign32_uint64_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_unalign32_uint64_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
+; CHECK-P10-NEXT: pli r4, 99999
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_unalign32_uint64_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
+; CHECK-PREP10-NEXT: ori r4, r4, 34463
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1048576
+ %or = or i64 %and, 99999
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_align32_uint64_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint64_t_uint32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lwzx r3, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint64_t_uint32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lwzx r3, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 16
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_not_disjoint64_uint64_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lwz r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lwz r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_unalign64_uint64_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_unalign64_uint64_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: lwzx r3, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint64_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_align64_uint64_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lwzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lwzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4096
+ %conv = zext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_unalign16_uint64_t_uint32_t() {
+; CHECK-LABEL: ld_cst_unalign16_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 255(0)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 255 to i32*), align 4
+ %conv = zext i32 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_align16_uint64_t_uint32_t() {
+; CHECK-LABEL: ld_cst_align16_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwz r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 4080 to i32*), align 16
+ %conv = zext i32 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_unalign32_uint64_t_uint32_t() {
+; CHECK-LABEL: ld_cst_unalign32_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 2
+; CHECK-NEXT: lwz r3, -31073(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 99999 to i32*), align 4
+ %conv = zext i32 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_align32_uint64_t_uint32_t() {
+; CHECK-LABEL: ld_cst_align32_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lwz r3, -27108(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 9999900 to i32*), align 4
+ %conv = zext i32 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_unalign64_uint64_t_uint32_t() {
+; CHECK-P10-LABEL: ld_cst_unalign64_uint64_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 232
+; CHECK-P10-NEXT: pli r4, 3567587329
+; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
+; CHECK-P10-NEXT: lwz r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_unalign64_uint64_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r3, 29
+; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
+; CHECK-PREP10-NEXT: oris r3, r3, 54437
+; CHECK-PREP10-NEXT: ori r3, r3, 4097
+; CHECK-PREP10-NEXT: lwz r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 1000000000001 to i32*), align 4
+ %conv = zext i32 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_align64_uint64_t_uint32_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint64_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lwz r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lwz r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 1000000000000 to i32*), align 4096
+ %conv = zext i32 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_0_uint64_t_int32_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint64_t_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwa r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_unalign16_uint64_t_int32_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_unalign16_uint64_t_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: li r4, 1
+; CHECK-NEXT: lwax r3, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_align16_uint64_t_int32_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint64_t_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwa r3, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_unalign32_uint64_t_int32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_unalign32_uint64_t_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999
+; CHECK-P10-NEXT: lwax r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_unalign32_uint64_t_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1
+; CHECK-PREP10-NEXT: ori r4, r4, 34463
+; CHECK-PREP10-NEXT: lwax r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_align32_uint64_t_int32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint64_t_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lwax r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint64_t_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lwax r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_unalign64_uint64_t_int32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_unalign64_uint64_t_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: lwax r3, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_unalign64_uint64_t_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: lwax r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_align64_uint64_t_int32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint64_t_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lwax r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint64_t_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lwax r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_reg_uint64_t_int32_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint64_t_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwax r3, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_or_uint64_t_int32_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint64_t_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lwa r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv1 = sext i32 %1 to i64
+ ret i64 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_or2_uint64_t_int32_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or2_uint64_t_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lwax r3, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = zext i8 %off to i64
+ %or = or i64 %and, %conv
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv1 = sext i32 %1 to i64
+ ret i64 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_not_disjoint16_uint64_t_int32_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint64_t_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lwa r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_unalign16_uint64_t_int32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_unalign16_uint64_t_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-NEXT: li r4, 6
+; CHECK-P10-NEXT: lwax r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_unalign16_uint64_t_int32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-NEXT: li r4, 6
+; CHECK-P9-NEXT: lwax r3, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_unalign16_uint64_t_int32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 6
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: lwax r3, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 6
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_align16_uint64_t_int32_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint64_t_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lwa r3, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 8
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_not_disjoint32_uint64_t_int32_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint64_t_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lwa r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_unalign32_uint64_t_int32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_unalign32_uint64_t_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
+; CHECK-P10-NEXT: pli r4, 99999
+; CHECK-P10-NEXT: lwax r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_unalign32_uint64_t_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
+; CHECK-PREP10-NEXT: ori r4, r4, 34463
+; CHECK-PREP10-NEXT: lwax r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1048576
+ %or = or i64 %and, 99999
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_align32_uint64_t_int32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lwax r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint64_t_int32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lwax r3, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint64_t_int32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lwax r3, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 16
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_not_disjoint64_uint64_t_int32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lwa r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lwa r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_unalign64_uint64_t_int32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_unalign64_uint64_t_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: lwax r3, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint64_t_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: lwax r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_align64_uint64_t_int32_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lwax r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lwax r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4096
+ %conv = sext i32 %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_unalign16_uint64_t_int32_t() {
+; CHECK-LABEL: ld_cst_unalign16_uint64_t_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: li r3, 255
+; CHECK-NEXT: lwa r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 255 to i32*), align 4
+ %conv = sext i32 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_align16_uint64_t_int32_t() {
+; CHECK-LABEL: ld_cst_align16_uint64_t_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lwa r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 4080 to i32*), align 16
+ %conv = sext i32 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_unalign32_uint64_t_int32_t() {
+; CHECK-P10-LABEL: ld_cst_unalign32_uint64_t_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 99999
+; CHECK-P10-NEXT: lwa r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_unalign32_uint64_t_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 1
+; CHECK-PREP10-NEXT: ori r3, r3, 34463
+; CHECK-PREP10-NEXT: lwa r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 99999 to i32*), align 4
+ %conv = sext i32 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_align32_uint64_t_int32_t() {
+; CHECK-LABEL: ld_cst_align32_uint64_t_int32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lwa r3, -27108(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 9999900 to i32*), align 4
+ %conv = sext i32 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_unalign64_uint64_t_int32_t() {
+; CHECK-P10-LABEL: ld_cst_unalign64_uint64_t_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 232
+; CHECK-P10-NEXT: pli r4, 3567587329
+; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
+; CHECK-P10-NEXT: lwa r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_unalign64_uint64_t_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r3, 29
+; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
+; CHECK-PREP10-NEXT: oris r3, r3, 54437
+; CHECK-PREP10-NEXT: ori r3, r3, 4097
+; CHECK-PREP10-NEXT: lwa r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 1000000000001 to i32*), align 4
+ %conv = sext i32 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_align64_uint64_t_int32_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint64_t_int32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lwa r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_int32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lwa r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 1000000000000 to i32*), align 4096
+ %conv = sext i32 %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_0_uint64_t_uint64_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ ret i64 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_unalign16_uint64_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_unalign16_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: li r4, 1
+; CHECK-NEXT: ldx r3, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ ret i64 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_align16_uint64_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ld r3, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ ret i64 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_unalign32_uint64_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_unalign32_uint64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_unalign32_uint64_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1
+; CHECK-PREP10-NEXT: ori r4, r4, 34463
+; CHECK-PREP10-NEXT: ldx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ ret i64 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_align32_uint64_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint64_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: ldx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ ret i64 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_unalign64_uint64_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_unalign64_uint64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: ldx r3, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_unalign64_uint64_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: ldx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ ret i64 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_align64_uint64_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint64_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: ldx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ ret i64 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_reg_uint64_t_uint64_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ldx r3, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ ret i64 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_or_uint64_t_uint64_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ ret i64 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_or2_uint64_t_uint64_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or2_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: ldx r3, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = zext i8 %off to i64
+ %or = or i64 %and, %conv
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ ret i64 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_not_disjoint16_uint64_t_uint64_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ ret i64 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_unalign16_uint64_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_unalign16_uint64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-NEXT: li r4, 6
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_unalign16_uint64_t_uint64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-NEXT: li r4, 6
+; CHECK-P9-NEXT: ldx r3, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_unalign16_uint64_t_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 6
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ldx r3, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 6
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ ret i64 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_align16_uint64_t_uint64_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: ld r3, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ ret i64 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_not_disjoint32_uint64_t_uint64_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ ret i64 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_unalign32_uint64_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_unalign32_uint64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
+; CHECK-P10-NEXT: pli r4, 99999
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_unalign32_uint64_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
+; CHECK-PREP10-NEXT: ori r4, r4, 34463
+; CHECK-PREP10-NEXT: ldx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1048576
+ %or = or i64 %and, 99999
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ ret i64 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_align32_uint64_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint64_t_uint64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: ldx r3, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint64_t_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: ldx r3, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 16
+ ret i64 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_not_disjoint64_uint64_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: ld r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint64_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: ld r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ ret i64 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_unalign64_uint64_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_unalign64_uint64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: ldx r3, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint64_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: ldx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ ret i64 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_align64_uint64_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: ldx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: ldx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 4096
+ ret i64 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_unalign16_uint64_t_uint64_t() {
+; CHECK-LABEL: ld_cst_unalign16_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: li r3, 255
+; CHECK-NEXT: ld r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 255 to i64*), align 8
+ ret i64 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_align16_uint64_t_uint64_t() {
+; CHECK-LABEL: ld_cst_align16_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ld r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 4080 to i64*), align 16
+ ret i64 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_unalign32_uint64_t_uint64_t() {
+; CHECK-P10-LABEL: ld_cst_unalign32_uint64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 99999
+; CHECK-P10-NEXT: ld r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_unalign32_uint64_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 1
+; CHECK-PREP10-NEXT: ori r3, r3, 34463
+; CHECK-PREP10-NEXT: ld r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 99999 to i64*), align 8
+ ret i64 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_align32_uint64_t_uint64_t() {
+; CHECK-LABEL: ld_cst_align32_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: ld r3, -27108(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 9999900 to i64*), align 8
+ ret i64 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_unalign64_uint64_t_uint64_t() {
+; CHECK-P10-LABEL: ld_cst_unalign64_uint64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 232
+; CHECK-P10-NEXT: pli r4, 3567587329
+; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
+; CHECK-P10-NEXT: ld r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_unalign64_uint64_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r3, 29
+; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
+; CHECK-PREP10-NEXT: oris r3, r3, 54437
+; CHECK-PREP10-NEXT: ori r3, r3, 4097
+; CHECK-PREP10-NEXT: ld r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 1000000000001 to i64*), align 8
+ ret i64 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_align64_uint64_t_uint64_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: ld r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint64_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: ld r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 1000000000000 to i64*), align 4096
+ ret i64 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_0_uint64_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_0_uint64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_0_uint64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpuxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_0_uint64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpuxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_unalign16_uint64_t_float(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_unalign16_uint64_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfs f0, 1(r3)
+; CHECK-NEXT: xscvdpuxds f0, f0
+; CHECK-NEXT: mffprd r3, f0
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_align16_uint64_t_float(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint64_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfs f0, 8(r3)
+; CHECK-NEXT: xscvdpuxds f0, f0
+; CHECK-NEXT: mffprd r3, f0
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_unalign32_uint64_t_float(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_unalign32_uint64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999
+; CHECK-P10-NEXT: lfsx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_unalign32_uint64_t_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1
+; CHECK-PREP10-NEXT: ori r4, r4, 34463
+; CHECK-PREP10-NEXT: lfsx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
+; CHECK-PREP10-NEXT: mffprd r3, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_align32_uint64_t_float(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lfsx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint64_t_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lfsx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
+; CHECK-PREP10-NEXT: mffprd r3, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_unalign64_uint64_t_float(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_unalign64_uint64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: lfsx f0, r3, r5
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_unalign64_uint64_t_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: lfsx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
+; CHECK-PREP10-NEXT: mffprd r3, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_align64_uint64_t_float(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfsx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint64_t_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfsx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
+; CHECK-PREP10-NEXT: mffprd r3, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_reg_uint64_t_float(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint64_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfsx f0, r3, r4
+; CHECK-NEXT: xscvdpuxds f0, f0
+; CHECK-NEXT: mffprd r3, f0
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_or_uint64_t_float(i64 %ptr, i8 zeroext %off) {
+; CHECK-P10-LABEL: ld_or_uint64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: or r3, r4, r3
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_or_uint64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: or r3, r4, r3
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpuxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_or_uint64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpuxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv1 = fptoui float %1 to i64
+ ret i64 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_or2_uint64_t_float(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or2_uint64_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lfsx f0, r3, r4
+; CHECK-NEXT: xscvdpuxds f0, f0
+; CHECK-NEXT: mffprd r3, f0
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = zext i8 %off to i64
+ %or = or i64 %and, %conv
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv1 = fptoui float %1 to i64
+ ret i64 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_not_disjoint16_uint64_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint16_uint64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: ori r3, r3, 6
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint16_uint64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: ori r3, r3, 6
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpuxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint16_uint64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpuxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_unalign16_uint64_t_float(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_unalign16_uint64_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lfsx f0, 0, r3
+; CHECK-NEXT: xscvdpuxds f0, f0
+; CHECK-NEXT: mffprd r3, f0
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 6
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_align16_uint64_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align16_uint64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-NEXT: lfs f0, 24(r3)
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align16_uint64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-NEXT: lfs f0, 24(r3)
+; CHECK-P9-NEXT: xscvdpuxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align16_uint64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpuxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 8
+ %conv = fptoui float %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_not_disjoint32_uint64_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint32_uint64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: ori r3, r3, 34463
+; CHECK-P10-NEXT: oris r3, r3, 1
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint32_uint64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: ori r3, r3, 34463
+; CHECK-P9-NEXT: oris r3, r3, 1
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpuxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint32_uint64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpuxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_unalign32_uint64_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_unalign32_uint64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
+; CHECK-P10-NEXT: pli r4, 99999
+; CHECK-P10-NEXT: lfsx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_unalign32_uint64_t_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
+; CHECK-PREP10-NEXT: ori r4, r4, 34463
+; CHECK-PREP10-NEXT: lfsx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
+; CHECK-PREP10-NEXT: mffprd r3, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1048576
+ %or = or i64 %and, 99999
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_align32_uint64_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lfsx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lfsx f0, r3, r4
+; CHECK-P9-NEXT: xscvdpuxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lfsx f0, r3, r4
+; CHECK-P8-NEXT: xscvdpuxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 16
+ %conv = fptoui float %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_not_disjoint64_uint64_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint64_uint64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpuxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint64_uint64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpuxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_unalign64_uint64_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_unalign64_uint64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: lfsx f0, r3, r5
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint64_t_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: lfsx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
+; CHECK-PREP10-NEXT: mffprd r3, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000001
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_align64_uint64_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfsx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfsx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
+; CHECK-PREP10-NEXT: mffprd r3, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4096
+ %conv = fptoui float %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_unalign16_uint64_t_float() {
+; CHECK-P10-LABEL: ld_cst_unalign16_uint64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: li r3, 255
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_unalign16_uint64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r3, 255
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpuxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_unalign16_uint64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lfs f0, 255(0)
+; CHECK-P8-NEXT: xscvdpuxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load float, float* inttoptr (i64 255 to float*), align 4
+ %conv = fptoui float %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_align16_uint64_t_float() {
+; CHECK-LABEL: ld_cst_align16_uint64_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfs f0, 4080(0)
+; CHECK-NEXT: xscvdpuxds f0, f0
+; CHECK-NEXT: mffprd r3, f0
+; CHECK-NEXT: blr
+entry:
+ %0 = load float, float* inttoptr (i64 4080 to float*), align 16
+ %conv = fptoui float %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_unalign32_uint64_t_float() {
+; CHECK-P10-LABEL: ld_cst_unalign32_uint64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 99999
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_unalign32_uint64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 1
+; CHECK-P9-NEXT: ori r3, r3, 34463
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpuxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_unalign32_uint64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 1
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpuxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load float, float* inttoptr (i64 99999 to float*), align 4
+ %conv = fptoui float %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_align32_uint64_t_float() {
+; CHECK-P10-LABEL: ld_cst_align32_uint64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r3, 153
+; CHECK-P10-NEXT: lfs f0, -27108(r3)
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align32_uint64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 153
+; CHECK-P9-NEXT: lfs f0, -27108(r3)
+; CHECK-P9-NEXT: xscvdpuxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align32_uint64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpuxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load float, float* inttoptr (i64 9999900 to float*), align 4
+ %conv = fptoui float %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_unalign64_uint64_t_float() {
+; CHECK-P10-LABEL: ld_cst_unalign64_uint64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 232
+; CHECK-P10-NEXT: pli r4, 3567587329
+; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
+; CHECK-P10-NEXT: lfs f0, 0(r4)
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_unalign64_uint64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r3, 29
+; CHECK-P9-NEXT: rldic r3, r3, 35, 24
+; CHECK-P9-NEXT: oris r3, r3, 54437
+; CHECK-P9-NEXT: ori r3, r3, 4097
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpuxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_unalign64_uint64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r3, 29
+; CHECK-P8-NEXT: rldic r3, r3, 35, 24
+; CHECK-P8-NEXT: oris r3, r3, 54437
+; CHECK-P8-NEXT: ori r3, r3, 4097
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpuxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load float, float* inttoptr (i64 1000000000001 to float*), align 4
+ %conv = fptoui float %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_align64_uint64_t_float() {
+; CHECK-P10-LABEL: ld_cst_align64_uint64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align64_uint64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpuxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align64_uint64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpuxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load float, float* inttoptr (i64 1000000000000 to float*), align 4096
+ %conv = fptoui float %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_0_uint64_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_0_uint64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_0_uint64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpuxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_0_uint64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpuxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_unalign16_uint64_t_double(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_unalign16_uint64_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfd f0, 1(r3)
+; CHECK-NEXT: xscvdpuxds f0, f0
+; CHECK-NEXT: mffprd r3, f0
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_align16_uint64_t_double(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint64_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfd f0, 8(r3)
+; CHECK-NEXT: xscvdpuxds f0, f0
+; CHECK-NEXT: mffprd r3, f0
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_unalign32_uint64_t_double(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_unalign32_uint64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_unalign32_uint64_t_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1
+; CHECK-PREP10-NEXT: ori r4, r4, 34463
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
+; CHECK-PREP10-NEXT: mffprd r3, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_align32_uint64_t_double(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint64_t_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
+; CHECK-PREP10-NEXT: mffprd r3, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_unalign64_uint64_t_double(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_unalign64_uint64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: lfdx f0, r3, r5
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_unalign64_uint64_t_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
+; CHECK-PREP10-NEXT: mffprd r3, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_align64_uint64_t_double(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint64_t_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
+; CHECK-PREP10-NEXT: mffprd r3, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_reg_uint64_t_double(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint64_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfdx f0, r3, r4
+; CHECK-NEXT: xscvdpuxds f0, f0
+; CHECK-NEXT: mffprd r3, f0
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_or_uint64_t_double(i64 %ptr, i8 zeroext %off) {
+; CHECK-P10-LABEL: ld_or_uint64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: or r3, r4, r3
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_or_uint64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: or r3, r4, r3
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpuxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_or_uint64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpuxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv1 = fptoui double %1 to i64
+ ret i64 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_or2_uint64_t_double(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or2_uint64_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lfdx f0, r3, r4
+; CHECK-NEXT: xscvdpuxds f0, f0
+; CHECK-NEXT: mffprd r3, f0
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = zext i8 %off to i64
+ %or = or i64 %and, %conv
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv1 = fptoui double %1 to i64
+ ret i64 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_not_disjoint16_uint64_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint16_uint64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: ori r3, r3, 6
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint16_uint64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: ori r3, r3, 6
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpuxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint16_uint64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpuxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_unalign16_uint64_t_double(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_unalign16_uint64_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lfdx f0, 0, r3
+; CHECK-NEXT: xscvdpuxds f0, f0
+; CHECK-NEXT: mffprd r3, f0
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 6
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_align16_uint64_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align16_uint64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-NEXT: lfd f0, 24(r3)
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align16_uint64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-NEXT: lfd f0, 24(r3)
+; CHECK-P9-NEXT: xscvdpuxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align16_uint64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpuxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_not_disjoint32_uint64_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint32_uint64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: ori r3, r3, 34463
+; CHECK-P10-NEXT: oris r3, r3, 1
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint32_uint64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: ori r3, r3, 34463
+; CHECK-P9-NEXT: oris r3, r3, 1
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpuxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint32_uint64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpuxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_unalign32_uint64_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_unalign32_uint64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
+; CHECK-P10-NEXT: pli r4, 99999
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_unalign32_uint64_t_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 43
+; CHECK-PREP10-NEXT: ori r4, r4, 34463
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
+; CHECK-PREP10-NEXT: mffprd r3, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1048576
+ %or = or i64 %and, 99999
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_align32_uint64_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lfdx f0, r3, r4
+; CHECK-P9-NEXT: xscvdpuxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lfdx f0, r3, r4
+; CHECK-P8-NEXT: xscvdpuxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 16
+ %conv = fptoui double %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_not_disjoint64_uint64_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint64_uint64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpuxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint64_uint64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpuxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_unalign64_uint64_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_unalign64_uint64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: lfdx f0, r3, r5
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint64_t_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
+; CHECK-PREP10-NEXT: mffprd r3, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000001
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_disjoint_align64_uint64_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint64_t_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
+; CHECK-PREP10-NEXT: mffprd r3, f0
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 4096
+ %conv = fptoui double %1 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_unalign16_uint64_t_double() {
+; CHECK-P10-LABEL: ld_cst_unalign16_uint64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: li r3, 255
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_unalign16_uint64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r3, 255
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpuxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_unalign16_uint64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lfd f0, 255(0)
+; CHECK-P8-NEXT: xscvdpuxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load double, double* inttoptr (i64 255 to double*), align 8
+ %conv = fptoui double %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_align16_uint64_t_double() {
+; CHECK-LABEL: ld_cst_align16_uint64_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfd f0, 4080(0)
+; CHECK-NEXT: xscvdpuxds f0, f0
+; CHECK-NEXT: mffprd r3, f0
+; CHECK-NEXT: blr
+entry:
+ %0 = load double, double* inttoptr (i64 4080 to double*), align 16
+ %conv = fptoui double %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_unalign32_uint64_t_double() {
+; CHECK-P10-LABEL: ld_cst_unalign32_uint64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 99999
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_unalign32_uint64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 1
+; CHECK-P9-NEXT: ori r3, r3, 34463
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpuxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_unalign32_uint64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 1
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpuxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load double, double* inttoptr (i64 99999 to double*), align 8
+ %conv = fptoui double %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_align32_uint64_t_double() {
+; CHECK-P10-LABEL: ld_cst_align32_uint64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r3, 153
+; CHECK-P10-NEXT: lfd f0, -27108(r3)
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align32_uint64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 153
+; CHECK-P9-NEXT: lfd f0, -27108(r3)
+; CHECK-P9-NEXT: xscvdpuxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align32_uint64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpuxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load double, double* inttoptr (i64 9999900 to double*), align 8
+ %conv = fptoui double %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_unalign64_uint64_t_double() {
+; CHECK-P10-LABEL: ld_cst_unalign64_uint64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 232
+; CHECK-P10-NEXT: pli r4, 3567587329
+; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
+; CHECK-P10-NEXT: lfd f0, 0(r4)
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_unalign64_uint64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r3, 29
+; CHECK-P9-NEXT: rldic r3, r3, 35, 24
+; CHECK-P9-NEXT: oris r3, r3, 54437
+; CHECK-P9-NEXT: ori r3, r3, 4097
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpuxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_unalign64_uint64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r3, 29
+; CHECK-P8-NEXT: rldic r3, r3, 35, 24
+; CHECK-P8-NEXT: oris r3, r3, 54437
+; CHECK-P8-NEXT: ori r3, r3, 4097
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpuxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load double, double* inttoptr (i64 1000000000001 to double*), align 8
+ %conv = fptoui double %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local i64 @ld_cst_align64_uint64_t_double() {
+; CHECK-P10-LABEL: ld_cst_align64_uint64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpuxds f0, f0
+; CHECK-P10-NEXT: mffprd r3, f0
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align64_uint64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpuxds f0, f0
+; CHECK-P9-NEXT: mffprd r3, f0
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align64_uint64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpuxds f0, f0
+; CHECK-P8-NEXT: mffprd r3, f0
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load double, double* inttoptr (i64 1000000000000 to double*), align 4096
+ %conv = fptoui double %0 to i64
+ ret i64 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_uint64_t_uint8_t(i64 %ptr, i64 %str) {
+; CHECK-LABEL: st_0_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stb r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i8
+ %0 = inttoptr i64 %ptr to i8*
+ store i8 %conv, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_uint64_t_uint8_t(i8* nocapture %ptr, i64 %str) {
+; CHECK-LABEL: st_align16_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stb r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i8
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ store i8 %conv, i8* %add.ptr, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_uint64_t_uint8_t(i8* nocapture %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_align32_uint64_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: stbx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_uint64_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: stbx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i8
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ store i8 %conv, i8* %add.ptr, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_uint64_t_uint8_t(i8* nocapture %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_align64_uint64_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stbx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_uint64_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stbx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i8
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ store i8 %conv, i8* %add.ptr, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_uint64_t_uint8_t(i8* nocapture %ptr, i64 %off, i64 %str) {
+; CHECK-LABEL: st_reg_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stbx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i8
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ store i8 %conv, i8* %add.ptr, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_uint64_t_uint8_t(i64 %ptr, i8 zeroext %off, i64 %str) {
+; CHECK-LABEL: st_or1_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: stb r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i8
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or2_uint64_t_uint8_t(i64 %ptr, i8 zeroext %off, i64 %str) {
+; CHECK-LABEL: st_or2_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: stbx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = trunc i64 %str to i8
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %and, %conv1
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_uint64_t_uint8_t(i64 %ptr, i64 %str) {
+; CHECK-LABEL: st_not_disjoint16_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: stb r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i8
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_uint64_t_uint8_t(i64 %ptr, i64 %str) {
+; CHECK-LABEL: st_disjoint_align16_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: stb r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = trunc i64 %str to i8
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_uint64_t_uint8_t(i64 %ptr, i64 %str) {
+; CHECK-LABEL: st_not_disjoint32_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: stb r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i8
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_uint64_t_uint8_t(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint64_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: stbx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint64_t_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: stbx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint64_t_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: stbx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = trunc i64 %str to i8
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_uint64_t_uint8_t(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint64_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: stb r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_uint64_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: stb r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i8
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_uint64_t_uint8_t(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint64_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stbx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_uint64_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stbx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = trunc i64 %str to i8
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ store i8 %conv, i8* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_uint64_t_uint8_t(i64 %str) {
+; CHECK-LABEL: st_cst_align16_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stb r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i8
+ store i8 %conv, i8* inttoptr (i64 4080 to i8*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_uint64_t_uint8_t(i64 %str) {
+; CHECK-LABEL: st_cst_align32_uint64_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: stb r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i8
+ store i8 %conv, i8* inttoptr (i64 9999900 to i8*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_uint64_t_uint8_t(i64 %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint64_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stb r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_uint64_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stb r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i8
+ store i8 %conv, i8* inttoptr (i64 1000000000000 to i8*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_uint64_t_uint16_t(i64 %ptr, i64 %str) {
+; CHECK-LABEL: st_0_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sth r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i16
+ %0 = inttoptr i64 %ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_uint64_t_uint16_t(i8* nocapture %ptr, i64 %str) {
+; CHECK-LABEL: st_align16_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sth r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i16
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_uint64_t_uint16_t(i8* nocapture %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_align32_uint64_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_uint64_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: sthx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i16
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_uint64_t_uint16_t(i8* nocapture %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_align64_uint64_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_uint64_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: sthx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i16
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_uint64_t_uint16_t(i8* nocapture %ptr, i64 %off, i64 %str) {
+; CHECK-LABEL: st_reg_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sthx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i16
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_uint64_t_uint16_t(i64 %ptr, i8 zeroext %off, i64 %str) {
+; CHECK-LABEL: st_or1_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: sth r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i16
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or2_uint64_t_uint16_t(i64 %ptr, i8 zeroext %off, i64 %str) {
+; CHECK-LABEL: st_or2_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: sthx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = trunc i64 %str to i16
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %and, %conv1
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_uint64_t_uint16_t(i64 %ptr, i64 %str) {
+; CHECK-LABEL: st_not_disjoint16_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: sth r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i16
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_uint64_t_uint16_t(i64 %ptr, i64 %str) {
+; CHECK-LABEL: st_disjoint_align16_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: sth r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = trunc i64 %str to i16
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_uint64_t_uint16_t(i64 %ptr, i64 %str) {
+; CHECK-LABEL: st_not_disjoint32_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: sth r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i16
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_uint64_t_uint16_t(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint64_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint64_t_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: sthx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint64_t_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: sthx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = trunc i64 %str to i16
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_uint64_t_uint16_t(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint64_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: sth r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_uint64_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: sth r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i16
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_uint64_t_uint16_t(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint64_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_uint64_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: sthx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = trunc i64 %str to i16
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_uint64_t_uint16_t(i64 %str) {
+; CHECK-LABEL: st_cst_align16_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sth r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i16
+ store i16 %conv, i16* inttoptr (i64 4080 to i16*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_uint64_t_uint16_t(i64 %str) {
+; CHECK-LABEL: st_cst_align32_uint64_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: sth r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i16
+ store i16 %conv, i16* inttoptr (i64 9999900 to i16*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_uint64_t_uint16_t(i64 %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint64_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: sth r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_uint64_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: sth r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i16
+ store i16 %conv, i16* inttoptr (i64 1000000000000 to i16*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_uint64_t_int16_t(i64 %ptr, i64 %str) {
+; CHECK-LABEL: st_0_uint64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sth r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i16
+ %0 = inttoptr i64 %ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_uint64_t_int16_t(i8* nocapture %ptr, i64 %str) {
+; CHECK-LABEL: st_align16_uint64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sth r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i16
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_uint64_t_int16_t(i8* nocapture %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_align32_uint64_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_uint64_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: sthx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i16
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_uint64_t_int16_t(i8* nocapture %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_align64_uint64_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_uint64_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: sthx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i16
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_uint64_t_int16_t(i8* nocapture %ptr, i64 %off, i64 %str) {
+; CHECK-LABEL: st_reg_uint64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sthx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i16
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_uint64_t_int16_t(i64 %ptr, i8 zeroext %off, i64 %str) {
+; CHECK-LABEL: st_or1_uint64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: sth r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i16
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or2_uint64_t_int16_t(i64 %ptr, i8 zeroext %off, i64 %str) {
+; CHECK-LABEL: st_or2_uint64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: sthx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = trunc i64 %str to i16
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %and, %conv1
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_uint64_t_int16_t(i64 %ptr, i64 %str) {
+; CHECK-LABEL: st_not_disjoint16_uint64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: sth r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i16
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_uint64_t_int16_t(i64 %ptr, i64 %str) {
+; CHECK-LABEL: st_disjoint_align16_uint64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: sth r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = trunc i64 %str to i16
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_uint64_t_int16_t(i64 %ptr, i64 %str) {
+; CHECK-LABEL: st_not_disjoint32_uint64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: sth r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i16
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_uint64_t_int16_t(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint64_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint64_t_int16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: sthx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint64_t_int16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: sthx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = trunc i64 %str to i16
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_uint64_t_int16_t(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint64_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: sth r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_uint64_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: sth r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i16
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_uint64_t_int16_t(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint64_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_uint64_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: sthx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = trunc i64 %str to i16
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_uint64_t_int16_t(i64 %str) {
+; CHECK-LABEL: st_cst_align16_uint64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sth r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i16
+ store i16 %conv, i16* inttoptr (i64 4080 to i16*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_uint64_t_int16_t(i64 %str) {
+; CHECK-LABEL: st_cst_align32_uint64_t_int16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: sth r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i16
+ store i16 %conv, i16* inttoptr (i64 9999900 to i16*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_uint64_t_int16_t(i64 %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint64_t_int16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: sth r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_uint64_t_int16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: sth r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i16
+ store i16 %conv, i16* inttoptr (i64 1000000000000 to i16*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_uint64_t_uint32_t(i64 %ptr, i64 %str) {
+; CHECK-LABEL: st_0_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stw r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i32
+ %0 = inttoptr i64 %ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_uint64_t_uint32_t(i8* nocapture %ptr, i64 %str) {
+; CHECK-LABEL: st_align16_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stw r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i32
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_uint64_t_uint32_t(i8* nocapture %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_align32_uint64_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_uint64_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: stwx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i32
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_uint64_t_uint32_t(i8* nocapture %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_align64_uint64_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_uint64_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stwx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i32
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_uint64_t_uint32_t(i8* nocapture %ptr, i64 %off, i64 %str) {
+; CHECK-LABEL: st_reg_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stwx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i32
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_uint64_t_uint32_t(i64 %ptr, i8 zeroext %off, i64 %str) {
+; CHECK-LABEL: st_or1_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: stw r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i32
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or2_uint64_t_uint32_t(i64 %ptr, i8 zeroext %off, i64 %str) {
+; CHECK-LABEL: st_or2_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: stwx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = trunc i64 %str to i32
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %and, %conv1
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_uint64_t_uint32_t(i64 %ptr, i64 %str) {
+; CHECK-LABEL: st_not_disjoint16_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: stw r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i32
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_uint64_t_uint32_t(i64 %ptr, i64 %str) {
+; CHECK-LABEL: st_disjoint_align16_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: stw r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = trunc i64 %str to i32
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_uint64_t_uint32_t(i64 %ptr, i64 %str) {
+; CHECK-LABEL: st_not_disjoint32_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: stw r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i32
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_uint64_t_uint32_t(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint64_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint64_t_uint32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: stwx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint64_t_uint32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: stwx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = trunc i64 %str to i32
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_uint64_t_uint32_t(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint64_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: stw r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_uint64_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: stw r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i32
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_uint64_t_uint32_t(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint64_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_uint64_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stwx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = trunc i64 %str to i32
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_uint64_t_uint32_t(i64 %str) {
+; CHECK-LABEL: st_cst_align16_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stw r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i32
+ store i32 %conv, i32* inttoptr (i64 4080 to i32*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_uint64_t_uint32_t(i64 %str) {
+; CHECK-LABEL: st_cst_align32_uint64_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: stw r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i32
+ store i32 %conv, i32* inttoptr (i64 9999900 to i32*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_uint64_t_uint32_t(i64 %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint64_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stw r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_uint64_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stw r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = trunc i64 %str to i32
+ store i32 %conv, i32* inttoptr (i64 1000000000000 to i32*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_uint64_t_uint64_t(i64 %ptr, i64 %str) {
+; CHECK-LABEL: st_0_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i64*
+ store i64 %str, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_uint64_t_uint64_t(i8* nocapture %ptr, i64 %str) {
+; CHECK-LABEL: st_align16_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %str, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_uint64_t_uint64_t(i8* nocapture %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_align32_uint64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_uint64_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %str, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_uint64_t_uint64_t(i8* nocapture %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_align64_uint64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_uint64_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %str, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_uint64_t_uint64_t(i8* nocapture %ptr, i64 %off, i64 %str) {
+; CHECK-LABEL: st_reg_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stdx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %str, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_uint64_t_uint64_t(i64 %ptr, i8 zeroext %off, i64 %str) {
+; CHECK-LABEL: st_or1_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: std r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i64*
+ store i64 %str, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or2_uint64_t_uint64_t(i64 %ptr, i8 zeroext %off, i64 %str) {
+; CHECK-LABEL: st_or2_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: stdx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = zext i8 %off to i64
+ %or = or i64 %and, %conv
+ %0 = inttoptr i64 %or to i64*
+ store i64 %str, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_uint64_t_uint64_t(i64 %ptr, i64 %str) {
+; CHECK-LABEL: st_not_disjoint16_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ store i64 %str, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_uint64_t_uint64_t(i64 %ptr, i64 %str) {
+; CHECK-LABEL: st_disjoint_align16_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: std r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ store i64 %str, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_uint64_t_uint64_t(i64 %ptr, i64 %str) {
+; CHECK-LABEL: st_not_disjoint32_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ store i64 %str, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_uint64_t_uint64_t(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint64_t_uint64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: stdx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint64_t_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: stdx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ store i64 %str, i64* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_uint64_t_uint64_t(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: std r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_uint64_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: std r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ store i64 %str, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_uint64_t_uint64_t(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_uint64_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ store i64 %str, i64* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_uint64_t_uint64_t(i64 %str) {
+; CHECK-LABEL: st_cst_align16_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ store i64 %str, i64* inttoptr (i64 4080 to i64*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_uint64_t_uint64_t(i64 %str) {
+; CHECK-LABEL: st_cst_align32_uint64_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: std r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ store i64 %str, i64* inttoptr (i64 9999900 to i64*), align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_uint64_t_uint64_t(i64 %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint64_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: std r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_uint64_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: std r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ store i64 %str, i64* inttoptr (i64 1000000000000 to i64*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_uint64_t_float(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_0_uint64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r4
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_0_uint64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r4
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_0_uint64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r4
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i64 %str to float
+ %0 = inttoptr i64 %ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_uint64_t_float(i8* nocapture %ptr, i64 %str) {
+; CHECK-LABEL: st_align16_uint64_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprd f0, r4
+; CHECK-NEXT: xscvuxdsp f0, f0
+; CHECK-NEXT: stfs f0, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = uitofp i64 %str to float
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_uint64_t_float(i8* nocapture %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_align32_uint64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r4
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: stfsx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align32_uint64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r4
+; CHECK-P9-NEXT: lis r4, 1525
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 56600
+; CHECK-P9-NEXT: stfsx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align32_uint64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r4
+; CHECK-P8-NEXT: lis r4, 1525
+; CHECK-P8-NEXT: ori r4, r4, 56600
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i64 %str to float
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_uint64_t_float(i8* nocapture %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_align64_uint64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r4
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: stfsx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align64_uint64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r4
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stfsx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align64_uint64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r4
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: stfsx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i64 %str to float
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_uint64_t_float(i8* nocapture %ptr, i64 %off, i64 %str) {
+; CHECK-LABEL: st_reg_uint64_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprd f0, r5
+; CHECK-NEXT: xscvuxdsp f0, f0
+; CHECK-NEXT: stfsx f0, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = uitofp i64 %str to float
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_uint64_t_float(i64 %ptr, i8 zeroext %off, i64 %str) {
+; CHECK-P10-LABEL: st_or1_uint64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r5
+; CHECK-P10-NEXT: or r3, r4, r3
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_or1_uint64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r5
+; CHECK-P9-NEXT: or r3, r4, r3
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_or1_uint64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r5
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i64 %str to float
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or2_uint64_t_float(i64 %ptr, i8 zeroext %off, i64 %str) {
+; CHECK-LABEL: st_or2_uint64_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprd f0, r5
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: xscvuxdsp f0, f0
+; CHECK-NEXT: stfsx f0, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = uitofp i64 %str to float
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %and, %conv1
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_uint64_t_float(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_not_disjoint16_uint64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r4
+; CHECK-P10-NEXT: ori r3, r3, 6
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint16_uint64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r4
+; CHECK-P9-NEXT: ori r3, r3, 6
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint16_uint64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r4
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i64 %str to float
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_uint64_t_float(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_disjoint_align16_uint64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r4
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 24(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align16_uint64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r4
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, 24(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align16_uint64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r4
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = uitofp i64 %str to float
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_uint64_t_float(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_not_disjoint32_uint64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r4
+; CHECK-P10-NEXT: ori r3, r3, 34463
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: oris r3, r3, 1
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint32_uint64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r4
+; CHECK-P9-NEXT: ori r3, r3, 34463
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: oris r3, r3, 1
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint32_uint64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r4
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i64 %str to float
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_uint64_t_float(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r4
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: stfsx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r4
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stfsx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r4
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = uitofp i64 %str to float
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_uint64_t_float(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r4
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_uint64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r4
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint64_uint64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r4
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i64 %str to float
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_uint64_t_float(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r4
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: stfsx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align64_uint64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r4
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stfsx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align64_uint64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r4
+; CHECK-P8-NEXT: lis r5, 3725
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-NEXT: ori r4, r5, 19025
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: stfsx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = uitofp i64 %str to float
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_uint64_t_float(i64 %str) {
+; CHECK-LABEL: st_cst_align16_uint64_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprd f0, r3
+; CHECK-NEXT: xscvuxdsp f0, f0
+; CHECK-NEXT: stfs f0, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = uitofp i64 %str to float
+ store float %conv, float* inttoptr (i64 4080 to float*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_uint64_t_float(i64 %str) {
+; CHECK-P10-LABEL: st_cst_align32_uint64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r3
+; CHECK-P10-NEXT: lis r3, 153
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, -27108(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align32_uint64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r3
+; CHECK-P9-NEXT: lis r3, 153
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, -27108(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align32_uint64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r3
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i64 %str to float
+ store float %conv, float* inttoptr (i64 9999900 to float*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_uint64_t_float(i64 %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r3
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align64_uint64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r3
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align64_uint64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r3
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i64 %str to float
+ store float %conv, float* inttoptr (i64 1000000000000 to float*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_uint64_t_double(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_0_uint64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r4
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_0_uint64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r4
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_0_uint64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r4
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i64 %str to double
+ %0 = inttoptr i64 %ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_uint64_t_double(i8* nocapture %ptr, i64 %str) {
+; CHECK-LABEL: st_align16_uint64_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprd f0, r4
+; CHECK-NEXT: xscvuxddp f0, f0
+; CHECK-NEXT: stfd f0, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = uitofp i64 %str to double
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_uint64_t_double(i8* nocapture %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_align32_uint64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r4
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: stfdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align32_uint64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r4
+; CHECK-P9-NEXT: lis r4, 1525
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 56600
+; CHECK-P9-NEXT: stfdx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align32_uint64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r4
+; CHECK-P8-NEXT: lis r4, 1525
+; CHECK-P8-NEXT: ori r4, r4, 56600
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i64 %str to double
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_uint64_t_double(i8* nocapture %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_align64_uint64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r4
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: stfdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align64_uint64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r4
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stfdx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align64_uint64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r4
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: stfdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i64 %str to double
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_uint64_t_double(i8* nocapture %ptr, i64 %off, i64 %str) {
+; CHECK-LABEL: st_reg_uint64_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprd f0, r5
+; CHECK-NEXT: xscvuxddp f0, f0
+; CHECK-NEXT: stfdx f0, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = uitofp i64 %str to double
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_uint64_t_double(i64 %ptr, i8 zeroext %off, i64 %str) {
+; CHECK-P10-LABEL: st_or1_uint64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r5
+; CHECK-P10-NEXT: or r3, r4, r3
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_or1_uint64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r5
+; CHECK-P9-NEXT: or r3, r4, r3
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_or1_uint64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r5
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i64 %str to double
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or2_uint64_t_double(i64 %ptr, i8 zeroext %off, i64 %str) {
+; CHECK-LABEL: st_or2_uint64_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprd f0, r5
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: xscvuxddp f0, f0
+; CHECK-NEXT: stfdx f0, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = uitofp i64 %str to double
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %and, %conv1
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_uint64_t_double(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_not_disjoint16_uint64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r4
+; CHECK-P10-NEXT: ori r3, r3, 6
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint16_uint64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r4
+; CHECK-P9-NEXT: ori r3, r3, 6
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint16_uint64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r4
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i64 %str to double
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_uint64_t_double(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_disjoint_align16_uint64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r4
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 24(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align16_uint64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r4
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, 24(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align16_uint64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r4
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = uitofp i64 %str to double
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_uint64_t_double(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_not_disjoint32_uint64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r4
+; CHECK-P10-NEXT: ori r3, r3, 34463
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: oris r3, r3, 1
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint32_uint64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r4
+; CHECK-P9-NEXT: ori r3, r3, 34463
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: oris r3, r3, 1
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint32_uint64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r4
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i64 %str to double
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_uint64_t_double(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r4
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: stfdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r4
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stfdx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r4
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = uitofp i64 %str to double
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_uint64_t_double(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r4
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_uint64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r4
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint64_uint64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r4
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i64 %str to double
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_uint64_t_double(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r4
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: stfdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align64_uint64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r4
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stfdx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align64_uint64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r4
+; CHECK-P8-NEXT: lis r5, 3725
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-NEXT: ori r4, r5, 19025
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: stfdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = uitofp i64 %str to double
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_uint64_t_double(i64 %str) {
+; CHECK-LABEL: st_cst_align16_uint64_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprd f0, r3
+; CHECK-NEXT: xscvuxddp f0, f0
+; CHECK-NEXT: stfd f0, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = uitofp i64 %str to double
+ store double %conv, double* inttoptr (i64 4080 to double*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_uint64_t_double(i64 %str) {
+; CHECK-P10-LABEL: st_cst_align32_uint64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r3
+; CHECK-P10-NEXT: lis r3, 153
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, -27108(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align32_uint64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r3
+; CHECK-P9-NEXT: lis r3, 153
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, -27108(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align32_uint64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r3
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i64 %str to double
+ store double %conv, double* inttoptr (i64 9999900 to double*), align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_uint64_t_double(i64 %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r3
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align64_uint64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r3
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align64_uint64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r3
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i64 %str to double
+ store double %conv, double* inttoptr (i64 1000000000000 to double*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_int64_t_float(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_0_int64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r4
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_0_int64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r4
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_0_int64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r4
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i64 %str to float
+ %0 = inttoptr i64 %ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_int64_t_float(i8* nocapture %ptr, i64 %str) {
+; CHECK-LABEL: st_align16_int64_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprd f0, r4
+; CHECK-NEXT: xscvsxdsp f0, f0
+; CHECK-NEXT: stfs f0, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sitofp i64 %str to float
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_int64_t_float(i8* nocapture %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_align32_int64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r4
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: stfsx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align32_int64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r4
+; CHECK-P9-NEXT: lis r4, 1525
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 56600
+; CHECK-P9-NEXT: stfsx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align32_int64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r4
+; CHECK-P8-NEXT: lis r4, 1525
+; CHECK-P8-NEXT: ori r4, r4, 56600
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i64 %str to float
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_int64_t_float(i8* nocapture %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_align64_int64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r4
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: stfsx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align64_int64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r4
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stfsx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align64_int64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r4
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: stfsx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i64 %str to float
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_int64_t_float(i8* nocapture %ptr, i64 %off, i64 %str) {
+; CHECK-LABEL: st_reg_int64_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprd f0, r5
+; CHECK-NEXT: xscvsxdsp f0, f0
+; CHECK-NEXT: stfsx f0, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = sitofp i64 %str to float
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_int64_t_float(i64 %ptr, i8 zeroext %off, i64 %str) {
+; CHECK-P10-LABEL: st_or1_int64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r5
+; CHECK-P10-NEXT: or r3, r4, r3
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_or1_int64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r5
+; CHECK-P9-NEXT: or r3, r4, r3
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_or1_int64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r5
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i64 %str to float
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or2_int64_t_float(i64 %ptr, i8 zeroext %off, i64 %str) {
+; CHECK-LABEL: st_or2_int64_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprd f0, r5
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: xscvsxdsp f0, f0
+; CHECK-NEXT: stfsx f0, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = sitofp i64 %str to float
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %and, %conv1
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_int64_t_float(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_not_disjoint16_int64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r4
+; CHECK-P10-NEXT: ori r3, r3, 6
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint16_int64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r4
+; CHECK-P9-NEXT: ori r3, r3, 6
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint16_int64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r4
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i64 %str to float
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_int64_t_float(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_disjoint_align16_int64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r4
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 24(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align16_int64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r4
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, 24(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align16_int64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r4
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = sitofp i64 %str to float
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_int64_t_float(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_not_disjoint32_int64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r4
+; CHECK-P10-NEXT: ori r3, r3, 34463
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: oris r3, r3, 1
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint32_int64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r4
+; CHECK-P9-NEXT: ori r3, r3, 34463
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: oris r3, r3, 1
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint32_int64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r4
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i64 %str to float
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_int64_t_float(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_int64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r4
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: stfsx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_int64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r4
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stfsx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_int64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r4
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = sitofp i64 %str to float
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_int64_t_float(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_int64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r4
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_int64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r4
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint64_int64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r4
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i64 %str to float
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_int64_t_float(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_int64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r4
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: stfsx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align64_int64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r4
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stfsx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align64_int64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r4
+; CHECK-P8-NEXT: lis r5, 3725
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-NEXT: ori r4, r5, 19025
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: stfsx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = sitofp i64 %str to float
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_int64_t_float(i64 %str) {
+; CHECK-LABEL: st_cst_align16_int64_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprd f0, r3
+; CHECK-NEXT: xscvsxdsp f0, f0
+; CHECK-NEXT: stfs f0, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = sitofp i64 %str to float
+ store float %conv, float* inttoptr (i64 4080 to float*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_int64_t_float(i64 %str) {
+; CHECK-P10-LABEL: st_cst_align32_int64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r3
+; CHECK-P10-NEXT: lis r3, 153
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, -27108(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align32_int64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r3
+; CHECK-P9-NEXT: lis r3, 153
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, -27108(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align32_int64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r3
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i64 %str to float
+ store float %conv, float* inttoptr (i64 9999900 to float*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_int64_t_float(i64 %str) {
+; CHECK-P10-LABEL: st_cst_align64_int64_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r3
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align64_int64_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r3
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align64_int64_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r3
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i64 %str to float
+ store float %conv, float* inttoptr (i64 1000000000000 to float*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_int64_t_double(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_0_int64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r4
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_0_int64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r4
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_0_int64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r4
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i64 %str to double
+ %0 = inttoptr i64 %ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_int64_t_double(i8* nocapture %ptr, i64 %str) {
+; CHECK-LABEL: st_align16_int64_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprd f0, r4
+; CHECK-NEXT: xscvsxddp f0, f0
+; CHECK-NEXT: stfd f0, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sitofp i64 %str to double
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_int64_t_double(i8* nocapture %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_align32_int64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r4
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: stfdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align32_int64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r4
+; CHECK-P9-NEXT: lis r4, 1525
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 56600
+; CHECK-P9-NEXT: stfdx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align32_int64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r4
+; CHECK-P8-NEXT: lis r4, 1525
+; CHECK-P8-NEXT: ori r4, r4, 56600
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i64 %str to double
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_int64_t_double(i8* nocapture %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_align64_int64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r4
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: stfdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align64_int64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r4
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stfdx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align64_int64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r4
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: stfdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i64 %str to double
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_int64_t_double(i8* nocapture %ptr, i64 %off, i64 %str) {
+; CHECK-LABEL: st_reg_int64_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprd f0, r5
+; CHECK-NEXT: xscvsxddp f0, f0
+; CHECK-NEXT: stfdx f0, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = sitofp i64 %str to double
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_int64_t_double(i64 %ptr, i8 zeroext %off, i64 %str) {
+; CHECK-P10-LABEL: st_or1_int64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r5
+; CHECK-P10-NEXT: or r3, r4, r3
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_or1_int64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r5
+; CHECK-P9-NEXT: or r3, r4, r3
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_or1_int64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r5
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i64 %str to double
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or2_int64_t_double(i64 %ptr, i8 zeroext %off, i64 %str) {
+; CHECK-LABEL: st_or2_int64_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprd f0, r5
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: xscvsxddp f0, f0
+; CHECK-NEXT: stfdx f0, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = sitofp i64 %str to double
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %and, %conv1
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_int64_t_double(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_not_disjoint16_int64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r4
+; CHECK-P10-NEXT: ori r3, r3, 6
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint16_int64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r4
+; CHECK-P9-NEXT: ori r3, r3, 6
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint16_int64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r4
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i64 %str to double
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_int64_t_double(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_disjoint_align16_int64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r4
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 24(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align16_int64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r4
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, 24(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align16_int64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r4
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = sitofp i64 %str to double
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_int64_t_double(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_not_disjoint32_int64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r4
+; CHECK-P10-NEXT: ori r3, r3, 34463
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: oris r3, r3, 1
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint32_int64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r4
+; CHECK-P9-NEXT: ori r3, r3, 34463
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: oris r3, r3, 1
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint32_int64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r4
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i64 %str to double
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_int64_t_double(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_int64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r4
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: stfdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_int64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r4
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stfdx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_int64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r4
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = sitofp i64 %str to double
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_int64_t_double(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_int64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r4
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_int64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r4
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint64_int64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r4
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i64 %str to double
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_int64_t_double(i64 %ptr, i64 %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_int64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r4
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: stfdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align64_int64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r4
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stfdx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align64_int64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r4
+; CHECK-P8-NEXT: lis r5, 3725
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-NEXT: ori r4, r5, 19025
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: stfdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = sitofp i64 %str to double
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_int64_t_double(i64 %str) {
+; CHECK-LABEL: st_cst_align16_int64_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprd f0, r3
+; CHECK-NEXT: xscvsxddp f0, f0
+; CHECK-NEXT: stfd f0, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = sitofp i64 %str to double
+ store double %conv, double* inttoptr (i64 4080 to double*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_int64_t_double(i64 %str) {
+; CHECK-P10-LABEL: st_cst_align32_int64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r3
+; CHECK-P10-NEXT: lis r3, 153
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, -27108(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align32_int64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r3
+; CHECK-P9-NEXT: lis r3, 153
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, -27108(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align32_int64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r3
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i64 %str to double
+ store double %conv, double* inttoptr (i64 9999900 to double*), align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_int64_t_double(i64 %str) {
+; CHECK-P10-LABEL: st_cst_align64_int64_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprd f0, r3
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align64_int64_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprd f0, r3
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align64_int64_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprd f0, r3
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i64 %str to double
+ store double %conv, double* inttoptr (i64 1000000000000 to double*), align 4096
+ ret void
+}
--- /dev/null
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-P10,CHECK-LE,CHECK-P10-LE
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-P10,CHECK-BE,CHECK-P10-BE
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P9,CHECK-LE,CHECK-P9-LE
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P9,CHECK-BE,CHECK-P9-BE
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P8,CHECK-LE,CHECK-P8-LE
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P8,CHECK-BE,CHECK-P8-BE
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_0_int8_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_int8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i8*
+ %1 = load i8, i8* %0, align 1
+ ret i8 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_align16_int8_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_int8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 8(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = load i8, i8* %add.ptr, align 1
+ ret i8 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_align32_int8_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_int8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_int8_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = load i8, i8* %add.ptr, align 1
+ ret i8 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_align64_int8_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_int8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_int8_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = load i8, i8* %add.ptr, align 1
+ ret i8 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_reg_int8_t_uint8_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_int8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbzx r3, r3, r4
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = load i8, i8* %add.ptr, align 1
+ ret i8 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_or_int8_t_uint8_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_int8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ ret i8 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_not_disjoint16_int8_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_int8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ ret i8 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_disjoint_align16_int8_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_int8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lbz r3, 24(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 8
+ ret i8 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_not_disjoint32_int8_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_int8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ ret i8 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_disjoint_align32_int8_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_int8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_int8_t_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lbzx r3, r3, r4
+; CHECK-P9-NEXT: extsb r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_int8_t_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: extsb r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 16
+ ret i8 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_not_disjoint64_int8_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_int8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_int8_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ ret i8 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_disjoint_align64_int8_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_int8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_int8_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 4096
+ ret i8 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_cst_align16_int8_t_uint8_t() {
+; CHECK-LABEL: ld_cst_align16_int8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 4080(0)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 4080 to i8*), align 16
+ ret i8 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_cst_align32_int8_t_uint8_t() {
+; CHECK-LABEL: ld_cst_align32_int8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lbz r3, -27108(r3)
+; CHECK-NEXT: extsb r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 9999900 to i8*), align 4
+ ret i8 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_cst_align64_int8_t_uint8_t() {
+; CHECK-P10-LABEL: ld_cst_align64_int8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: extsb r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_int8_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: extsb r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 1000000000000 to i8*), align 4096
+ ret i8 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_0_int8_t_uint16_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_0_int8_t_uint16_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lbz r3, 0(r3)
+; CHECK-LE-NEXT: extsb r3, r3
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_0_int8_t_uint16_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lbz r3, 1(r3)
+; CHECK-BE-NEXT: extsb r3, r3
+; CHECK-BE-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_align16_int8_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-LE-LABEL: ld_align16_int8_t_uint16_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lbz r3, 8(r3)
+; CHECK-LE-NEXT: extsb r3, r3
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_align16_int8_t_uint16_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lbz r3, 9(r3)
+; CHECK-BE-NEXT: extsb r3, r3
+; CHECK-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_align32_int8_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LE-LABEL: ld_align32_int8_t_uint16_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 99999000
+; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P10-LE-NEXT: extsb r3, r3
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_align32_int8_t_uint16_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 99999001
+; CHECK-P10-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P10-BE-NEXT: extsb r3, r3
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_align32_int8_t_uint16_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, 1525
+; CHECK-P9-LE-NEXT: ori r4, r4, 56600
+; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-LE-NEXT: extsb r3, r3
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_align32_int8_t_uint16_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: lis r4, 1525
+; CHECK-P9-BE-NEXT: ori r4, r4, 56601
+; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-BE-NEXT: extsb r3, r3
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_align32_int8_t_uint16_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 1525
+; CHECK-P8-LE-NEXT: ori r4, r4, 56600
+; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-LE-NEXT: extsb r3, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_align32_int8_t_uint16_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r4, 1525
+; CHECK-P8-BE-NEXT: ori r4, r4, 56601
+; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-BE-NEXT: extsb r3, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_align64_int8_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LE-LABEL: ld_align64_int8_t_uint16_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 244140625
+; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P10-LE-NEXT: extsb r3, r3
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_align64_int8_t_uint16_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587329
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
+; CHECK-P10-BE-NEXT: extsb r3, r3
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_align64_int8_t_uint16_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, 3725
+; CHECK-P9-LE-NEXT: ori r4, r4, 19025
+; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-LE-NEXT: extsb r3, r3
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_align64_int8_t_uint16_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4097
+; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-BE-NEXT: extsb r3, r3
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_align64_int8_t_uint16_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 3725
+; CHECK-P8-LE-NEXT: ori r4, r4, 19025
+; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-LE-NEXT: extsb r3, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_align64_int8_t_uint16_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4097
+; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-BE-NEXT: extsb r3, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_reg_int8_t_uint16_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LE-LABEL: ld_reg_int8_t_uint16_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lbzx r3, r3, r4
+; CHECK-LE-NEXT: extsb r3, r3
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_reg_int8_t_uint16_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: add r3, r3, r4
+; CHECK-BE-NEXT: lbz r3, 1(r3)
+; CHECK-BE-NEXT: extsb r3, r3
+; CHECK-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_or_int8_t_uint16_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LE-LABEL: ld_or_int8_t_uint16_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: or r3, r4, r3
+; CHECK-LE-NEXT: lbz r3, 0(r3)
+; CHECK-LE-NEXT: extsb r3, r3
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_or_int8_t_uint16_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: or r3, r4, r3
+; CHECK-BE-NEXT: lbz r3, 1(r3)
+; CHECK-BE-NEXT: extsb r3, r3
+; CHECK-BE-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv1 = trunc i16 %1 to i8
+ ret i8 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_not_disjoint16_int8_t_uint16_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_not_disjoint16_int8_t_uint16_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: ori r3, r3, 6
+; CHECK-LE-NEXT: lbz r3, 0(r3)
+; CHECK-LE-NEXT: extsb r3, r3
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_not_disjoint16_int8_t_uint16_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: ori r3, r3, 6
+; CHECK-BE-NEXT: lbz r3, 1(r3)
+; CHECK-BE-NEXT: extsb r3, r3
+; CHECK-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_disjoint_align16_int8_t_uint16_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_disjoint_align16_int8_t_uint16_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-LE-NEXT: lbz r3, 24(r3)
+; CHECK-LE-NEXT: extsb r3, r3
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_disjoint_align16_int8_t_uint16_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-BE-NEXT: lbz r3, 25(r3)
+; CHECK-BE-NEXT: extsb r3, r3
+; CHECK-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 8
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_not_disjoint32_int8_t_uint16_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_not_disjoint32_int8_t_uint16_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: ori r3, r3, 34463
+; CHECK-LE-NEXT: oris r3, r3, 1
+; CHECK-LE-NEXT: lbz r3, 0(r3)
+; CHECK-LE-NEXT: extsb r3, r3
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_not_disjoint32_int8_t_uint16_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: ori r3, r3, 34463
+; CHECK-BE-NEXT: oris r3, r3, 1
+; CHECK-BE-NEXT: lbz r3, 1(r3)
+; CHECK-BE-NEXT: extsb r3, r3
+; CHECK-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_disjoint_align32_int8_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_disjoint_align32_int8_t_uint16_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: lis r4, -15264
+; CHECK-P10-LE-NEXT: and r3, r3, r4
+; CHECK-P10-LE-NEXT: pli r4, 999990000
+; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P10-LE-NEXT: extsb r3, r3
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_disjoint_align32_int8_t_uint16_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: lis r4, -15264
+; CHECK-P10-BE-NEXT: and r3, r3, r4
+; CHECK-P10-BE-NEXT: pli r4, 999990001
+; CHECK-P10-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P10-BE-NEXT: extsb r3, r3
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_disjoint_align32_int8_t_uint16_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, -15264
+; CHECK-P9-LE-NEXT: and r3, r3, r4
+; CHECK-P9-LE-NEXT: lis r4, 15258
+; CHECK-P9-LE-NEXT: ori r4, r4, 41712
+; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-LE-NEXT: extsb r3, r3
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_disjoint_align32_int8_t_uint16_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: lis r4, -15264
+; CHECK-P9-BE-NEXT: and r3, r3, r4
+; CHECK-P9-BE-NEXT: lis r4, 15258
+; CHECK-P9-BE-NEXT: ori r4, r4, 41713
+; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-BE-NEXT: extsb r3, r3
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_disjoint_align32_int8_t_uint16_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, -15264
+; CHECK-P8-LE-NEXT: lis r5, 15258
+; CHECK-P8-LE-NEXT: and r3, r3, r4
+; CHECK-P8-LE-NEXT: ori r4, r5, 41712
+; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-LE-NEXT: extsb r3, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_disjoint_align32_int8_t_uint16_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r4, -15264
+; CHECK-P8-BE-NEXT: lis r5, 15258
+; CHECK-P8-BE-NEXT: and r3, r3, r4
+; CHECK-P8-BE-NEXT: ori r4, r5, 41713
+; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-BE-NEXT: extsb r3, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 16
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_not_disjoint64_int8_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_not_disjoint64_int8_t_uint16_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 232
+; CHECK-P10-LE-NEXT: pli r5, 3567587329
+; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-LE-NEXT: or r3, r3, r5
+; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P10-LE-NEXT: extsb r3, r3
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_not_disjoint64_int8_t_uint16_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587329
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: or r3, r3, r5
+; CHECK-P10-BE-NEXT: lbz r3, 1(r3)
+; CHECK-P10-BE-NEXT: extsb r3, r3
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_not_disjoint64_int8_t_uint16_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: li r4, 29
+; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-LE-NEXT: oris r4, r4, 54437
+; CHECK-P9-LE-NEXT: ori r4, r4, 4097
+; CHECK-P9-LE-NEXT: or r3, r3, r4
+; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P9-LE-NEXT: extsb r3, r3
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_not_disjoint64_int8_t_uint16_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4097
+; CHECK-P9-BE-NEXT: or r3, r3, r4
+; CHECK-P9-BE-NEXT: lbz r3, 1(r3)
+; CHECK-P9-BE-NEXT: extsb r3, r3
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_not_disjoint64_int8_t_uint16_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: li r4, 29
+; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-LE-NEXT: oris r4, r4, 54437
+; CHECK-P8-LE-NEXT: ori r4, r4, 4097
+; CHECK-P8-LE-NEXT: or r3, r3, r4
+; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P8-LE-NEXT: extsb r3, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_not_disjoint64_int8_t_uint16_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4097
+; CHECK-P8-BE-NEXT: or r3, r3, r4
+; CHECK-P8-BE-NEXT: lbz r3, 1(r3)
+; CHECK-P8-BE-NEXT: extsb r3, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_disjoint_align64_int8_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_disjoint_align64_int8_t_uint16_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 244140625
+; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P10-LE-NEXT: extsb r3, r3
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_disjoint_align64_int8_t_uint16_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587329
+; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
+; CHECK-P10-BE-NEXT: extsb r3, r3
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_disjoint_align64_int8_t_uint16_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, 3725
+; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-LE-NEXT: ori r4, r4, 19025
+; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-LE-NEXT: extsb r3, r3
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_disjoint_align64_int8_t_uint16_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4097
+; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-BE-NEXT: extsb r3, r3
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_disjoint_align64_int8_t_uint16_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 3725
+; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-LE-NEXT: ori r4, r4, 19025
+; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-LE-NEXT: extsb r3, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_disjoint_align64_int8_t_uint16_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4097
+; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-BE-NEXT: extsb r3, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 4096
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_cst_align16_int8_t_uint16_t() {
+; CHECK-LE-LABEL: ld_cst_align16_int8_t_uint16_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lbz r3, 4080(0)
+; CHECK-LE-NEXT: extsb r3, r3
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_cst_align16_int8_t_uint16_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lbz r3, 4081(0)
+; CHECK-BE-NEXT: extsb r3, r3
+; CHECK-BE-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 4080 to i16*), align 16
+ %conv = trunc i16 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_cst_align32_int8_t_uint16_t() {
+; CHECK-LE-LABEL: ld_cst_align32_int8_t_uint16_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lis r3, 153
+; CHECK-LE-NEXT: lbz r3, -27108(r3)
+; CHECK-LE-NEXT: extsb r3, r3
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_cst_align32_int8_t_uint16_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lis r3, 153
+; CHECK-BE-NEXT: lbz r3, -27107(r3)
+; CHECK-BE-NEXT: extsb r3, r3
+; CHECK-BE-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 9999900 to i16*), align 4
+ %conv = trunc i16 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_cst_align64_int8_t_uint16_t() {
+; CHECK-P10-LE-LABEL: ld_cst_align64_int8_t_uint16_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r3, 244140625
+; CHECK-P10-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P10-LE-NEXT: extsb r3, r3
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_cst_align64_int8_t_uint16_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r3, 232
+; CHECK-P10-BE-NEXT: pli r4, 3567587329
+; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
+; CHECK-P10-BE-NEXT: lbz r3, 0(r4)
+; CHECK-P10-BE-NEXT: extsb r3, r3
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_cst_align64_int8_t_uint16_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r3, 3725
+; CHECK-P9-LE-NEXT: ori r3, r3, 19025
+; CHECK-P9-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P9-LE-NEXT: extsb r3, r3
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_cst_align64_int8_t_uint16_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r3, 29
+; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P9-BE-NEXT: oris r3, r3, 54437
+; CHECK-P9-BE-NEXT: ori r3, r3, 4097
+; CHECK-P9-BE-NEXT: lbz r3, 0(r3)
+; CHECK-P9-BE-NEXT: extsb r3, r3
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_cst_align64_int8_t_uint16_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r3, 3725
+; CHECK-P8-LE-NEXT: ori r3, r3, 19025
+; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P8-LE-NEXT: extsb r3, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_cst_align64_int8_t_uint16_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r3, 29
+; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P8-BE-NEXT: oris r3, r3, 54437
+; CHECK-P8-BE-NEXT: ori r3, r3, 4097
+; CHECK-P8-BE-NEXT: lbz r3, 0(r3)
+; CHECK-P8-BE-NEXT: extsb r3, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 1000000000000 to i16*), align 4096
+ %conv = trunc i16 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_0_int8_t_uint32_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_0_int8_t_uint32_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lbz r3, 0(r3)
+; CHECK-LE-NEXT: extsb r3, r3
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_0_int8_t_uint32_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lbz r3, 3(r3)
+; CHECK-BE-NEXT: extsb r3, r3
+; CHECK-BE-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_align16_int8_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-LE-LABEL: ld_align16_int8_t_uint32_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lbz r3, 8(r3)
+; CHECK-LE-NEXT: extsb r3, r3
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_align16_int8_t_uint32_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lbz r3, 11(r3)
+; CHECK-BE-NEXT: extsb r3, r3
+; CHECK-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_align32_int8_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LE-LABEL: ld_align32_int8_t_uint32_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 99999000
+; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P10-LE-NEXT: extsb r3, r3
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_align32_int8_t_uint32_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 99999003
+; CHECK-P10-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P10-BE-NEXT: extsb r3, r3
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_align32_int8_t_uint32_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, 1525
+; CHECK-P9-LE-NEXT: ori r4, r4, 56600
+; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-LE-NEXT: extsb r3, r3
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_align32_int8_t_uint32_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: lis r4, 1525
+; CHECK-P9-BE-NEXT: ori r4, r4, 56603
+; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-BE-NEXT: extsb r3, r3
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_align32_int8_t_uint32_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 1525
+; CHECK-P8-LE-NEXT: ori r4, r4, 56600
+; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-LE-NEXT: extsb r3, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_align32_int8_t_uint32_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r4, 1525
+; CHECK-P8-BE-NEXT: ori r4, r4, 56603
+; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-BE-NEXT: extsb r3, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_align64_int8_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LE-LABEL: ld_align64_int8_t_uint32_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 244140625
+; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P10-LE-NEXT: extsb r3, r3
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_align64_int8_t_uint32_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587331
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
+; CHECK-P10-BE-NEXT: extsb r3, r3
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_align64_int8_t_uint32_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, 3725
+; CHECK-P9-LE-NEXT: ori r4, r4, 19025
+; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-LE-NEXT: extsb r3, r3
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_align64_int8_t_uint32_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4099
+; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-BE-NEXT: extsb r3, r3
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_align64_int8_t_uint32_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 3725
+; CHECK-P8-LE-NEXT: ori r4, r4, 19025
+; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-LE-NEXT: extsb r3, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_align64_int8_t_uint32_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4099
+; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-BE-NEXT: extsb r3, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_reg_int8_t_uint32_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LE-LABEL: ld_reg_int8_t_uint32_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lbzx r3, r3, r4
+; CHECK-LE-NEXT: extsb r3, r3
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_reg_int8_t_uint32_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: add r3, r3, r4
+; CHECK-BE-NEXT: lbz r3, 3(r3)
+; CHECK-BE-NEXT: extsb r3, r3
+; CHECK-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_or_int8_t_uint32_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LE-LABEL: ld_or_int8_t_uint32_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: or r3, r4, r3
+; CHECK-LE-NEXT: lbz r3, 0(r3)
+; CHECK-LE-NEXT: extsb r3, r3
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_or_int8_t_uint32_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: or r3, r4, r3
+; CHECK-BE-NEXT: lbz r3, 3(r3)
+; CHECK-BE-NEXT: extsb r3, r3
+; CHECK-BE-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv1 = trunc i32 %1 to i8
+ ret i8 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_not_disjoint16_int8_t_uint32_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_not_disjoint16_int8_t_uint32_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: ori r3, r3, 6
+; CHECK-LE-NEXT: lbz r3, 0(r3)
+; CHECK-LE-NEXT: extsb r3, r3
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_not_disjoint16_int8_t_uint32_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: ori r3, r3, 6
+; CHECK-BE-NEXT: lbz r3, 3(r3)
+; CHECK-BE-NEXT: extsb r3, r3
+; CHECK-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_disjoint_align16_int8_t_uint32_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_disjoint_align16_int8_t_uint32_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-LE-NEXT: lbz r3, 24(r3)
+; CHECK-LE-NEXT: extsb r3, r3
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_disjoint_align16_int8_t_uint32_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-BE-NEXT: lbz r3, 27(r3)
+; CHECK-BE-NEXT: extsb r3, r3
+; CHECK-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 8
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_not_disjoint32_int8_t_uint32_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_not_disjoint32_int8_t_uint32_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: ori r3, r3, 34463
+; CHECK-LE-NEXT: oris r3, r3, 1
+; CHECK-LE-NEXT: lbz r3, 0(r3)
+; CHECK-LE-NEXT: extsb r3, r3
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_not_disjoint32_int8_t_uint32_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: ori r3, r3, 34463
+; CHECK-BE-NEXT: oris r3, r3, 1
+; CHECK-BE-NEXT: lbz r3, 3(r3)
+; CHECK-BE-NEXT: extsb r3, r3
+; CHECK-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_disjoint_align32_int8_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_disjoint_align32_int8_t_uint32_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: lis r4, -15264
+; CHECK-P10-LE-NEXT: and r3, r3, r4
+; CHECK-P10-LE-NEXT: pli r4, 999990000
+; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P10-LE-NEXT: extsb r3, r3
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_disjoint_align32_int8_t_uint32_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: lis r4, -15264
+; CHECK-P10-BE-NEXT: and r3, r3, r4
+; CHECK-P10-BE-NEXT: pli r4, 999990003
+; CHECK-P10-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P10-BE-NEXT: extsb r3, r3
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_disjoint_align32_int8_t_uint32_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, -15264
+; CHECK-P9-LE-NEXT: and r3, r3, r4
+; CHECK-P9-LE-NEXT: lis r4, 15258
+; CHECK-P9-LE-NEXT: ori r4, r4, 41712
+; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-LE-NEXT: extsb r3, r3
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_disjoint_align32_int8_t_uint32_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: lis r4, -15264
+; CHECK-P9-BE-NEXT: and r3, r3, r4
+; CHECK-P9-BE-NEXT: lis r4, 15258
+; CHECK-P9-BE-NEXT: ori r4, r4, 41715
+; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-BE-NEXT: extsb r3, r3
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_disjoint_align32_int8_t_uint32_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, -15264
+; CHECK-P8-LE-NEXT: lis r5, 15258
+; CHECK-P8-LE-NEXT: and r3, r3, r4
+; CHECK-P8-LE-NEXT: ori r4, r5, 41712
+; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-LE-NEXT: extsb r3, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_disjoint_align32_int8_t_uint32_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r4, -15264
+; CHECK-P8-BE-NEXT: lis r5, 15258
+; CHECK-P8-BE-NEXT: and r3, r3, r4
+; CHECK-P8-BE-NEXT: ori r4, r5, 41715
+; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-BE-NEXT: extsb r3, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 16
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_not_disjoint64_int8_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_not_disjoint64_int8_t_uint32_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 232
+; CHECK-P10-LE-NEXT: pli r5, 3567587329
+; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-LE-NEXT: or r3, r3, r5
+; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P10-LE-NEXT: extsb r3, r3
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_not_disjoint64_int8_t_uint32_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587329
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: or r3, r3, r5
+; CHECK-P10-BE-NEXT: lbz r3, 3(r3)
+; CHECK-P10-BE-NEXT: extsb r3, r3
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_not_disjoint64_int8_t_uint32_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: li r4, 29
+; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-LE-NEXT: oris r4, r4, 54437
+; CHECK-P9-LE-NEXT: ori r4, r4, 4097
+; CHECK-P9-LE-NEXT: or r3, r3, r4
+; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P9-LE-NEXT: extsb r3, r3
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_not_disjoint64_int8_t_uint32_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4097
+; CHECK-P9-BE-NEXT: or r3, r3, r4
+; CHECK-P9-BE-NEXT: lbz r3, 3(r3)
+; CHECK-P9-BE-NEXT: extsb r3, r3
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_not_disjoint64_int8_t_uint32_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: li r4, 29
+; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-LE-NEXT: oris r4, r4, 54437
+; CHECK-P8-LE-NEXT: ori r4, r4, 4097
+; CHECK-P8-LE-NEXT: or r3, r3, r4
+; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P8-LE-NEXT: extsb r3, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_not_disjoint64_int8_t_uint32_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4097
+; CHECK-P8-BE-NEXT: or r3, r3, r4
+; CHECK-P8-BE-NEXT: lbz r3, 3(r3)
+; CHECK-P8-BE-NEXT: extsb r3, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_disjoint_align64_int8_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_disjoint_align64_int8_t_uint32_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 244140625
+; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P10-LE-NEXT: extsb r3, r3
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_disjoint_align64_int8_t_uint32_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587331
+; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
+; CHECK-P10-BE-NEXT: extsb r3, r3
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_disjoint_align64_int8_t_uint32_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, 3725
+; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-LE-NEXT: ori r4, r4, 19025
+; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-LE-NEXT: extsb r3, r3
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_disjoint_align64_int8_t_uint32_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4099
+; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-BE-NEXT: extsb r3, r3
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_disjoint_align64_int8_t_uint32_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 3725
+; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-LE-NEXT: ori r4, r4, 19025
+; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-LE-NEXT: extsb r3, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_disjoint_align64_int8_t_uint32_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4099
+; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-BE-NEXT: extsb r3, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4096
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_cst_align16_int8_t_uint32_t() {
+; CHECK-LE-LABEL: ld_cst_align16_int8_t_uint32_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lbz r3, 4080(0)
+; CHECK-LE-NEXT: extsb r3, r3
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_cst_align16_int8_t_uint32_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lbz r3, 4083(0)
+; CHECK-BE-NEXT: extsb r3, r3
+; CHECK-BE-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 4080 to i32*), align 16
+ %conv = trunc i32 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_cst_align32_int8_t_uint32_t() {
+; CHECK-LE-LABEL: ld_cst_align32_int8_t_uint32_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lis r3, 153
+; CHECK-LE-NEXT: lbz r3, -27108(r3)
+; CHECK-LE-NEXT: extsb r3, r3
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_cst_align32_int8_t_uint32_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lis r3, 153
+; CHECK-BE-NEXT: lbz r3, -27105(r3)
+; CHECK-BE-NEXT: extsb r3, r3
+; CHECK-BE-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 9999900 to i32*), align 4
+ %conv = trunc i32 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_cst_align64_int8_t_uint32_t() {
+; CHECK-P10-LE-LABEL: ld_cst_align64_int8_t_uint32_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r3, 244140625
+; CHECK-P10-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P10-LE-NEXT: extsb r3, r3
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_cst_align64_int8_t_uint32_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r3, 232
+; CHECK-P10-BE-NEXT: pli r4, 3567587331
+; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
+; CHECK-P10-BE-NEXT: lbz r3, 0(r4)
+; CHECK-P10-BE-NEXT: extsb r3, r3
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_cst_align64_int8_t_uint32_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r3, 3725
+; CHECK-P9-LE-NEXT: ori r3, r3, 19025
+; CHECK-P9-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P9-LE-NEXT: extsb r3, r3
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_cst_align64_int8_t_uint32_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r3, 29
+; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P9-BE-NEXT: oris r3, r3, 54437
+; CHECK-P9-BE-NEXT: ori r3, r3, 4099
+; CHECK-P9-BE-NEXT: lbz r3, 0(r3)
+; CHECK-P9-BE-NEXT: extsb r3, r3
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_cst_align64_int8_t_uint32_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r3, 3725
+; CHECK-P8-LE-NEXT: ori r3, r3, 19025
+; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P8-LE-NEXT: extsb r3, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_cst_align64_int8_t_uint32_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r3, 29
+; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P8-BE-NEXT: oris r3, r3, 54437
+; CHECK-P8-BE-NEXT: ori r3, r3, 4099
+; CHECK-P8-BE-NEXT: lbz r3, 0(r3)
+; CHECK-P8-BE-NEXT: extsb r3, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 1000000000000 to i32*), align 4096
+ %conv = trunc i32 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_0_int8_t_uint64_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_0_int8_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lbz r3, 0(r3)
+; CHECK-LE-NEXT: extsb r3, r3
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_0_int8_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lbz r3, 7(r3)
+; CHECK-BE-NEXT: extsb r3, r3
+; CHECK-BE-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_align16_int8_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-LE-LABEL: ld_align16_int8_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lbz r3, 8(r3)
+; CHECK-LE-NEXT: extsb r3, r3
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_align16_int8_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lbz r3, 15(r3)
+; CHECK-BE-NEXT: extsb r3, r3
+; CHECK-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_align32_int8_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LE-LABEL: ld_align32_int8_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 99999000
+; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P10-LE-NEXT: extsb r3, r3
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_align32_int8_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 99999007
+; CHECK-P10-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P10-BE-NEXT: extsb r3, r3
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_align32_int8_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, 1525
+; CHECK-P9-LE-NEXT: ori r4, r4, 56600
+; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-LE-NEXT: extsb r3, r3
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_align32_int8_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: lis r4, 1525
+; CHECK-P9-BE-NEXT: ori r4, r4, 56607
+; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-BE-NEXT: extsb r3, r3
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_align32_int8_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 1525
+; CHECK-P8-LE-NEXT: ori r4, r4, 56600
+; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-LE-NEXT: extsb r3, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_align32_int8_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r4, 1525
+; CHECK-P8-BE-NEXT: ori r4, r4, 56607
+; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-BE-NEXT: extsb r3, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_align64_int8_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LE-LABEL: ld_align64_int8_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 244140625
+; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P10-LE-NEXT: extsb r3, r3
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_align64_int8_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587335
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
+; CHECK-P10-BE-NEXT: extsb r3, r3
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_align64_int8_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, 3725
+; CHECK-P9-LE-NEXT: ori r4, r4, 19025
+; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-LE-NEXT: extsb r3, r3
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_align64_int8_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4103
+; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-BE-NEXT: extsb r3, r3
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_align64_int8_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 3725
+; CHECK-P8-LE-NEXT: ori r4, r4, 19025
+; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-LE-NEXT: extsb r3, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_align64_int8_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4103
+; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-BE-NEXT: extsb r3, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_reg_int8_t_uint64_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LE-LABEL: ld_reg_int8_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lbzx r3, r3, r4
+; CHECK-LE-NEXT: extsb r3, r3
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_reg_int8_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: add r3, r3, r4
+; CHECK-BE-NEXT: lbz r3, 7(r3)
+; CHECK-BE-NEXT: extsb r3, r3
+; CHECK-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_or_int8_t_uint64_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LE-LABEL: ld_or_int8_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: or r3, r4, r3
+; CHECK-LE-NEXT: lbz r3, 0(r3)
+; CHECK-LE-NEXT: extsb r3, r3
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_or_int8_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: or r3, r4, r3
+; CHECK-BE-NEXT: lbz r3, 7(r3)
+; CHECK-BE-NEXT: extsb r3, r3
+; CHECK-BE-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv1 = trunc i64 %1 to i8
+ ret i8 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_not_disjoint16_int8_t_uint64_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_not_disjoint16_int8_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: ori r3, r3, 6
+; CHECK-LE-NEXT: lbz r3, 0(r3)
+; CHECK-LE-NEXT: extsb r3, r3
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_not_disjoint16_int8_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: ori r3, r3, 6
+; CHECK-BE-NEXT: lbz r3, 7(r3)
+; CHECK-BE-NEXT: extsb r3, r3
+; CHECK-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_disjoint_align16_int8_t_uint64_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_disjoint_align16_int8_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-LE-NEXT: lbz r3, 24(r3)
+; CHECK-LE-NEXT: extsb r3, r3
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_disjoint_align16_int8_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-BE-NEXT: lbz r3, 31(r3)
+; CHECK-BE-NEXT: extsb r3, r3
+; CHECK-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_not_disjoint32_int8_t_uint64_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_not_disjoint32_int8_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: ori r3, r3, 34463
+; CHECK-LE-NEXT: oris r3, r3, 1
+; CHECK-LE-NEXT: lbz r3, 0(r3)
+; CHECK-LE-NEXT: extsb r3, r3
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_not_disjoint32_int8_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: ori r3, r3, 34463
+; CHECK-BE-NEXT: oris r3, r3, 1
+; CHECK-BE-NEXT: lbz r3, 7(r3)
+; CHECK-BE-NEXT: extsb r3, r3
+; CHECK-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_disjoint_align32_int8_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_disjoint_align32_int8_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: lis r4, -15264
+; CHECK-P10-LE-NEXT: and r3, r3, r4
+; CHECK-P10-LE-NEXT: pli r4, 999990000
+; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P10-LE-NEXT: extsb r3, r3
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_disjoint_align32_int8_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: lis r4, -15264
+; CHECK-P10-BE-NEXT: and r3, r3, r4
+; CHECK-P10-BE-NEXT: pli r4, 999990007
+; CHECK-P10-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P10-BE-NEXT: extsb r3, r3
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_disjoint_align32_int8_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, -15264
+; CHECK-P9-LE-NEXT: and r3, r3, r4
+; CHECK-P9-LE-NEXT: lis r4, 15258
+; CHECK-P9-LE-NEXT: ori r4, r4, 41712
+; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-LE-NEXT: extsb r3, r3
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_disjoint_align32_int8_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: lis r4, -15264
+; CHECK-P9-BE-NEXT: and r3, r3, r4
+; CHECK-P9-BE-NEXT: lis r4, 15258
+; CHECK-P9-BE-NEXT: ori r4, r4, 41719
+; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-BE-NEXT: extsb r3, r3
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_disjoint_align32_int8_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, -15264
+; CHECK-P8-LE-NEXT: lis r5, 15258
+; CHECK-P8-LE-NEXT: and r3, r3, r4
+; CHECK-P8-LE-NEXT: ori r4, r5, 41712
+; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-LE-NEXT: extsb r3, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_disjoint_align32_int8_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r4, -15264
+; CHECK-P8-BE-NEXT: lis r5, 15258
+; CHECK-P8-BE-NEXT: and r3, r3, r4
+; CHECK-P8-BE-NEXT: ori r4, r5, 41719
+; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-BE-NEXT: extsb r3, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 16
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_not_disjoint64_int8_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_not_disjoint64_int8_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 232
+; CHECK-P10-LE-NEXT: pli r5, 3567587329
+; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-LE-NEXT: or r3, r3, r5
+; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P10-LE-NEXT: extsb r3, r3
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_not_disjoint64_int8_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587329
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: or r3, r3, r5
+; CHECK-P10-BE-NEXT: lbz r3, 7(r3)
+; CHECK-P10-BE-NEXT: extsb r3, r3
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_not_disjoint64_int8_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: li r4, 29
+; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-LE-NEXT: oris r4, r4, 54437
+; CHECK-P9-LE-NEXT: ori r4, r4, 4097
+; CHECK-P9-LE-NEXT: or r3, r3, r4
+; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P9-LE-NEXT: extsb r3, r3
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_not_disjoint64_int8_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4097
+; CHECK-P9-BE-NEXT: or r3, r3, r4
+; CHECK-P9-BE-NEXT: lbz r3, 7(r3)
+; CHECK-P9-BE-NEXT: extsb r3, r3
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_not_disjoint64_int8_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: li r4, 29
+; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-LE-NEXT: oris r4, r4, 54437
+; CHECK-P8-LE-NEXT: ori r4, r4, 4097
+; CHECK-P8-LE-NEXT: or r3, r3, r4
+; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P8-LE-NEXT: extsb r3, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_not_disjoint64_int8_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4097
+; CHECK-P8-BE-NEXT: or r3, r3, r4
+; CHECK-P8-BE-NEXT: lbz r3, 7(r3)
+; CHECK-P8-BE-NEXT: extsb r3, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_disjoint_align64_int8_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_disjoint_align64_int8_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 244140625
+; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P10-LE-NEXT: extsb r3, r3
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_disjoint_align64_int8_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587335
+; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
+; CHECK-P10-BE-NEXT: extsb r3, r3
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_disjoint_align64_int8_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, 3725
+; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-LE-NEXT: ori r4, r4, 19025
+; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-LE-NEXT: extsb r3, r3
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_disjoint_align64_int8_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4103
+; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-BE-NEXT: extsb r3, r3
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_disjoint_align64_int8_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 3725
+; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-LE-NEXT: ori r4, r4, 19025
+; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-LE-NEXT: extsb r3, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_disjoint_align64_int8_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4103
+; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-BE-NEXT: extsb r3, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 4096
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_cst_align16_int8_t_uint64_t() {
+; CHECK-LE-LABEL: ld_cst_align16_int8_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lbz r3, 4080(0)
+; CHECK-LE-NEXT: extsb r3, r3
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_cst_align16_int8_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lbz r3, 4087(0)
+; CHECK-BE-NEXT: extsb r3, r3
+; CHECK-BE-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 4080 to i64*), align 16
+ %conv = trunc i64 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_cst_align32_int8_t_uint64_t() {
+; CHECK-LE-LABEL: ld_cst_align32_int8_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lis r3, 153
+; CHECK-LE-NEXT: lbz r3, -27108(r3)
+; CHECK-LE-NEXT: extsb r3, r3
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_cst_align32_int8_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lis r3, 153
+; CHECK-BE-NEXT: lbz r3, -27101(r3)
+; CHECK-BE-NEXT: extsb r3, r3
+; CHECK-BE-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 9999900 to i64*), align 8
+ %conv = trunc i64 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_cst_align64_int8_t_uint64_t() {
+; CHECK-P10-LE-LABEL: ld_cst_align64_int8_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r3, 244140625
+; CHECK-P10-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P10-LE-NEXT: extsb r3, r3
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_cst_align64_int8_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r3, 232
+; CHECK-P10-BE-NEXT: pli r4, 3567587335
+; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
+; CHECK-P10-BE-NEXT: lbz r3, 0(r4)
+; CHECK-P10-BE-NEXT: extsb r3, r3
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_cst_align64_int8_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r3, 3725
+; CHECK-P9-LE-NEXT: ori r3, r3, 19025
+; CHECK-P9-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P9-LE-NEXT: extsb r3, r3
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_cst_align64_int8_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r3, 29
+; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P9-BE-NEXT: oris r3, r3, 54437
+; CHECK-P9-BE-NEXT: ori r3, r3, 4103
+; CHECK-P9-BE-NEXT: lbz r3, 0(r3)
+; CHECK-P9-BE-NEXT: extsb r3, r3
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_cst_align64_int8_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r3, 3725
+; CHECK-P8-LE-NEXT: ori r3, r3, 19025
+; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P8-LE-NEXT: extsb r3, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_cst_align64_int8_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r3, 29
+; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P8-BE-NEXT: oris r3, r3, 54437
+; CHECK-P8-BE-NEXT: ori r3, r3, 4103
+; CHECK-P8-BE-NEXT: lbz r3, 0(r3)
+; CHECK-P8-BE-NEXT: extsb r3, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 1000000000000 to i64*), align 4096
+ %conv = trunc i64 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_0_int8_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_0_int8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_0_int8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_0_int8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptosi float %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_align16_int8_t_float(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_int8_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfs f0, 8(r3)
+; CHECK-NEXT: xscvdpsxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptosi float %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_align32_int8_t_float(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_int8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lfsx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_int8_t_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lfsx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptosi float %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_align64_int8_t_float(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_int8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfsx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_int8_t_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfsx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptosi float %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_reg_int8_t_float(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_int8_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfsx f0, r3, r4
+; CHECK-NEXT: xscvdpsxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptosi float %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_or_int8_t_float(i64 %ptr, i8 zeroext %off) {
+; CHECK-P10-LABEL: ld_or_int8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: or r3, r4, r3
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_or_int8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: or r3, r4, r3
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_or_int8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv1 = fptosi float %1 to i8
+ ret i8 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_not_disjoint16_int8_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint16_int8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: ori r3, r3, 6
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint16_int8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: ori r3, r3, 6
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint16_int8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptosi float %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_disjoint_align16_int8_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align16_int8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-NEXT: lfs f0, 24(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align16_int8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-NEXT: lfs f0, 24(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align16_int8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 8
+ %conv = fptosi float %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_not_disjoint32_int8_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint32_int8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: ori r3, r3, 34463
+; CHECK-P10-NEXT: oris r3, r3, 1
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint32_int8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: ori r3, r3, 34463
+; CHECK-P9-NEXT: oris r3, r3, 1
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint32_int8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptosi float %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_disjoint_align32_int8_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_int8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lfsx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_int8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lfsx f0, r3, r4
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_int8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lfsx f0, r3, r4
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 16
+ %conv = fptosi float %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_not_disjoint64_int8_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_int8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint64_int8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint64_int8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptosi float %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_disjoint_align64_int8_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_int8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfsx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_int8_t_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfsx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4096
+ %conv = fptosi float %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_cst_align16_int8_t_float() {
+; CHECK-LABEL: ld_cst_align16_int8_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfs f0, 4080(0)
+; CHECK-NEXT: xscvdpsxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load float, float* inttoptr (i64 4080 to float*), align 16
+ %conv = fptosi float %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_cst_align32_int8_t_float() {
+; CHECK-P10-LABEL: ld_cst_align32_int8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r3, 153
+; CHECK-P10-NEXT: lfs f0, -27108(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align32_int8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 153
+; CHECK-P9-NEXT: lfs f0, -27108(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align32_int8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load float, float* inttoptr (i64 9999900 to float*), align 4
+ %conv = fptosi float %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_cst_align64_int8_t_float() {
+; CHECK-P10-LABEL: ld_cst_align64_int8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align64_int8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align64_int8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load float, float* inttoptr (i64 1000000000000 to float*), align 4096
+ %conv = fptosi float %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_0_int8_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_0_int8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_0_int8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_0_int8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptosi double %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_align16_int8_t_double(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_int8_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfd f0, 8(r3)
+; CHECK-NEXT: xscvdpsxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptosi double %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_align32_int8_t_double(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_int8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_int8_t_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptosi double %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_align64_int8_t_double(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_int8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_int8_t_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptosi double %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_reg_int8_t_double(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_int8_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfdx f0, r3, r4
+; CHECK-NEXT: xscvdpsxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptosi double %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_or_int8_t_double(i64 %ptr, i8 zeroext %off) {
+; CHECK-P10-LABEL: ld_or_int8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: or r3, r4, r3
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_or_int8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: or r3, r4, r3
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_or_int8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv1 = fptosi double %1 to i8
+ ret i8 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_not_disjoint16_int8_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint16_int8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: ori r3, r3, 6
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint16_int8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: ori r3, r3, 6
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint16_int8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptosi double %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_disjoint_align16_int8_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align16_int8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-NEXT: lfd f0, 24(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align16_int8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-NEXT: lfd f0, 24(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align16_int8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptosi double %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_not_disjoint32_int8_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint32_int8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: ori r3, r3, 34463
+; CHECK-P10-NEXT: oris r3, r3, 1
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint32_int8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: ori r3, r3, 34463
+; CHECK-P9-NEXT: oris r3, r3, 1
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint32_int8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptosi double %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_disjoint_align32_int8_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_int8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_int8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lfdx f0, r3, r4
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_int8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lfdx f0, r3, r4
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 16
+ %conv = fptosi double %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_not_disjoint64_int8_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_int8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint64_int8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint64_int8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptosi double %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_disjoint_align64_int8_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_int8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_int8_t_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: extsw r3, r3
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 4096
+ %conv = fptosi double %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_cst_align16_int8_t_double() {
+; CHECK-LABEL: ld_cst_align16_int8_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfd f0, 4080(0)
+; CHECK-NEXT: xscvdpsxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: extsw r3, r3
+; CHECK-NEXT: blr
+entry:
+ %0 = load double, double* inttoptr (i64 4080 to double*), align 16
+ %conv = fptosi double %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_cst_align32_int8_t_double() {
+; CHECK-P10-LABEL: ld_cst_align32_int8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r3, 153
+; CHECK-P10-NEXT: lfd f0, -27108(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align32_int8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 153
+; CHECK-P9-NEXT: lfd f0, -27108(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align32_int8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load double, double* inttoptr (i64 9999900 to double*), align 8
+ %conv = fptosi double %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local signext i8 @ld_cst_align64_int8_t_double() {
+; CHECK-P10-LABEL: ld_cst_align64_int8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: extsw r3, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align64_int8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: extsw r3, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align64_int8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: extsw r3, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load double, double* inttoptr (i64 1000000000000 to double*), align 4096
+ %conv = fptosi double %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_0_uint8_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_0_uint8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i8*
+ %1 = load i8, i8* %0, align 1
+ ret i8 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_align16_uint8_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = load i8, i8* %add.ptr, align 1
+ ret i8 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_align32_uint8_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint8_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = load i8, i8* %add.ptr, align 1
+ ret i8 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_unalign64_uint8_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_unalign64_uint8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: lbzx r3, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_unalign64_uint8_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
+ %0 = load i8, i8* %add.ptr, align 1
+ ret i8 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_align64_uint8_t_uint8_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint8_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = load i8, i8* %add.ptr, align 1
+ ret i8 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_reg_uint8_t_uint8_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbzx r3, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = load i8, i8* %add.ptr, align 1
+ ret i8 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_or_uint8_t_uint8_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_uint8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ ret i8 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_not_disjoint16_uint8_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_uint8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ ret i8 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_disjoint_align16_uint8_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_uint8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lbz r3, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 8
+ ret i8 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_not_disjoint32_uint8_t_uint8_t(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_uint8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lbz r3, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ ret i8 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_disjoint_align32_uint8_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint8_t_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lbzx r3, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint8_t_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lbzx r3, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 16
+ ret i8 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_not_disjoint64_uint8_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_not_disjoint64_uint8_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r4
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ ret i8 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_disjoint_unalign64_uint8_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_unalign64_uint8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: lbzx r3, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint8_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 1
+ ret i8 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_disjoint_align64_uint8_t_uint8_t(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lbzx r3, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint8_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lbzx r3, r3, r4
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ %1 = load i8, i8* %0, align 4096
+ ret i8 %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_cst_align16_uint8_t_uint8_t() {
+; CHECK-LABEL: ld_cst_align16_uint8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lbz r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 4080 to i8*), align 16
+ ret i8 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_cst_align32_uint8_t_uint8_t() {
+; CHECK-LABEL: ld_cst_align32_uint8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r3, 153
+; CHECK-NEXT: lbz r3, -27108(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 9999900 to i8*), align 4
+ ret i8 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_cst_unalign64_uint8_t_uint8_t() {
+; CHECK-P10-LABEL: ld_cst_unalign64_uint8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 232
+; CHECK-P10-NEXT: pli r4, 3567587329
+; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
+; CHECK-P10-NEXT: lbz r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_unalign64_uint8_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r3, 29
+; CHECK-PREP10-NEXT: rldic r3, r3, 35, 24
+; CHECK-PREP10-NEXT: oris r3, r3, 54437
+; CHECK-PREP10-NEXT: ori r3, r3, 4097
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 1000000000001 to i8*), align 1
+ ret i8 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_cst_align64_uint8_t_uint8_t() {
+; CHECK-P10-LABEL: ld_cst_align64_uint8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lbz r3, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_cst_align64_uint8_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r3, 3725
+; CHECK-PREP10-NEXT: ori r3, r3, 19025
+; CHECK-PREP10-NEXT: rldic r3, r3, 12, 24
+; CHECK-PREP10-NEXT: lbz r3, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %0 = load i8, i8* inttoptr (i64 1000000000000 to i8*), align 4096
+ ret i8 %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_0_uint8_t_uint16_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_0_uint8_t_uint16_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lbz r3, 0(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_0_uint8_t_uint16_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lbz r3, 1(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_align16_uint8_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-LE-LABEL: ld_align16_uint8_t_uint16_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lbz r3, 8(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_align16_uint8_t_uint16_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lbz r3, 9(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_align32_uint8_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LE-LABEL: ld_align32_uint8_t_uint16_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 99999000
+; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_align32_uint8_t_uint16_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 99999001
+; CHECK-P10-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_align32_uint8_t_uint16_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, 1525
+; CHECK-P9-LE-NEXT: ori r4, r4, 56600
+; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_align32_uint8_t_uint16_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: lis r4, 1525
+; CHECK-P9-BE-NEXT: ori r4, r4, 56601
+; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_align32_uint8_t_uint16_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 1525
+; CHECK-P8-LE-NEXT: ori r4, r4, 56600
+; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_align32_uint8_t_uint16_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r4, 1525
+; CHECK-P8-BE-NEXT: ori r4, r4, 56601
+; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_unalign64_uint8_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LE-LABEL: ld_unalign64_uint8_t_uint16_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 232
+; CHECK-P10-LE-NEXT: pli r5, 3567587329
+; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-LE-NEXT: lbzx r3, r3, r5
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_unalign64_uint8_t_uint16_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587330
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_unalign64_uint8_t_uint16_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: li r4, 29
+; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-LE-NEXT: oris r4, r4, 54437
+; CHECK-P9-LE-NEXT: ori r4, r4, 4097
+; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_unalign64_uint8_t_uint16_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4098
+; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_unalign64_uint8_t_uint16_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: li r4, 29
+; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-LE-NEXT: oris r4, r4, 54437
+; CHECK-P8-LE-NEXT: ori r4, r4, 4097
+; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_unalign64_uint8_t_uint16_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4098
+; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_align64_uint8_t_uint16_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LE-LABEL: ld_align64_uint8_t_uint16_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 244140625
+; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_align64_uint8_t_uint16_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587329
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_align64_uint8_t_uint16_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, 3725
+; CHECK-P9-LE-NEXT: ori r4, r4, 19025
+; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_align64_uint8_t_uint16_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4097
+; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_align64_uint8_t_uint16_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 3725
+; CHECK-P8-LE-NEXT: ori r4, r4, 19025
+; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_align64_uint8_t_uint16_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4097
+; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_reg_uint8_t_uint16_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LE-LABEL: ld_reg_uint8_t_uint16_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lbzx r3, r3, r4
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_reg_uint8_t_uint16_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: add r3, r3, r4
+; CHECK-BE-NEXT: lbz r3, 1(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_or_uint8_t_uint16_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LE-LABEL: ld_or_uint8_t_uint16_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: or r3, r4, r3
+; CHECK-LE-NEXT: lbz r3, 0(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_or_uint8_t_uint16_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: or r3, r4, r3
+; CHECK-BE-NEXT: lbz r3, 1(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv1 = trunc i16 %1 to i8
+ ret i8 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_not_disjoint16_uint8_t_uint16_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_not_disjoint16_uint8_t_uint16_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: ori r3, r3, 6
+; CHECK-LE-NEXT: lbz r3, 0(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_not_disjoint16_uint8_t_uint16_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: ori r3, r3, 6
+; CHECK-BE-NEXT: lbz r3, 1(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_disjoint_align16_uint8_t_uint16_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_disjoint_align16_uint8_t_uint16_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-LE-NEXT: lbz r3, 24(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_disjoint_align16_uint8_t_uint16_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-BE-NEXT: lbz r3, 25(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 8
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_not_disjoint32_uint8_t_uint16_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_not_disjoint32_uint8_t_uint16_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: ori r3, r3, 34463
+; CHECK-LE-NEXT: oris r3, r3, 1
+; CHECK-LE-NEXT: lbz r3, 0(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_not_disjoint32_uint8_t_uint16_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: ori r3, r3, 34463
+; CHECK-BE-NEXT: oris r3, r3, 1
+; CHECK-BE-NEXT: lbz r3, 1(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_disjoint_align32_uint8_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_disjoint_align32_uint8_t_uint16_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: lis r4, -15264
+; CHECK-P10-LE-NEXT: and r3, r3, r4
+; CHECK-P10-LE-NEXT: pli r4, 999990000
+; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_disjoint_align32_uint8_t_uint16_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: lis r4, -15264
+; CHECK-P10-BE-NEXT: and r3, r3, r4
+; CHECK-P10-BE-NEXT: pli r4, 999990001
+; CHECK-P10-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_disjoint_align32_uint8_t_uint16_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, -15264
+; CHECK-P9-LE-NEXT: and r3, r3, r4
+; CHECK-P9-LE-NEXT: lis r4, 15258
+; CHECK-P9-LE-NEXT: ori r4, r4, 41712
+; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_disjoint_align32_uint8_t_uint16_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: lis r4, -15264
+; CHECK-P9-BE-NEXT: and r3, r3, r4
+; CHECK-P9-BE-NEXT: lis r4, 15258
+; CHECK-P9-BE-NEXT: ori r4, r4, 41713
+; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_disjoint_align32_uint8_t_uint16_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, -15264
+; CHECK-P8-LE-NEXT: lis r5, 15258
+; CHECK-P8-LE-NEXT: and r3, r3, r4
+; CHECK-P8-LE-NEXT: ori r4, r5, 41712
+; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_disjoint_align32_uint8_t_uint16_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r4, -15264
+; CHECK-P8-BE-NEXT: lis r5, 15258
+; CHECK-P8-BE-NEXT: and r3, r3, r4
+; CHECK-P8-BE-NEXT: ori r4, r5, 41713
+; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 16
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_not_disjoint64_uint8_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_not_disjoint64_uint8_t_uint16_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 232
+; CHECK-P10-LE-NEXT: pli r5, 3567587329
+; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-LE-NEXT: or r3, r3, r5
+; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_not_disjoint64_uint8_t_uint16_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587329
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: or r3, r3, r5
+; CHECK-P10-BE-NEXT: lbz r3, 1(r3)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_not_disjoint64_uint8_t_uint16_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: li r4, 29
+; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-LE-NEXT: oris r4, r4, 54437
+; CHECK-P9-LE-NEXT: ori r4, r4, 4097
+; CHECK-P9-LE-NEXT: or r3, r3, r4
+; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_not_disjoint64_uint8_t_uint16_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4097
+; CHECK-P9-BE-NEXT: or r3, r3, r4
+; CHECK-P9-BE-NEXT: lbz r3, 1(r3)
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_not_disjoint64_uint8_t_uint16_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: li r4, 29
+; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-LE-NEXT: oris r4, r4, 54437
+; CHECK-P8-LE-NEXT: ori r4, r4, 4097
+; CHECK-P8-LE-NEXT: or r3, r3, r4
+; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_not_disjoint64_uint8_t_uint16_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4097
+; CHECK-P8-BE-NEXT: or r3, r3, r4
+; CHECK-P8-BE-NEXT: lbz r3, 1(r3)
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_disjoint_unalign64_uint8_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_disjoint_unalign64_uint8_t_uint16_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 232
+; CHECK-P10-LE-NEXT: pli r5, 3567587329
+; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-LE-NEXT: lbzx r3, r3, r5
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_disjoint_unalign64_uint8_t_uint16_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587330
+; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_disjoint_unalign64_uint8_t_uint16_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: li r4, 29
+; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-LE-NEXT: oris r4, r4, 54437
+; CHECK-P9-LE-NEXT: ori r4, r4, 4097
+; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_disjoint_unalign64_uint8_t_uint16_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4098
+; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_disjoint_unalign64_uint8_t_uint16_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: li r4, 29
+; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-LE-NEXT: oris r4, r4, 54437
+; CHECK-P8-LE-NEXT: ori r4, r4, 4097
+; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_disjoint_unalign64_uint8_t_uint16_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4098
+; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 2
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_disjoint_align64_uint8_t_uint16_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_disjoint_align64_uint8_t_uint16_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 244140625
+; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_disjoint_align64_uint8_t_uint16_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587329
+; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_disjoint_align64_uint8_t_uint16_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, 3725
+; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-LE-NEXT: ori r4, r4, 19025
+; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_disjoint_align64_uint8_t_uint16_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4097
+; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_disjoint_align64_uint8_t_uint16_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 3725
+; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-LE-NEXT: ori r4, r4, 19025
+; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_disjoint_align64_uint8_t_uint16_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4097
+; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ %1 = load i16, i16* %0, align 4096
+ %conv = trunc i16 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_cst_align16_uint8_t_uint16_t() {
+; CHECK-LE-LABEL: ld_cst_align16_uint8_t_uint16_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lbz r3, 4080(0)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_cst_align16_uint8_t_uint16_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lbz r3, 4081(0)
+; CHECK-BE-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 4080 to i16*), align 16
+ %conv = trunc i16 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_cst_align32_uint8_t_uint16_t() {
+; CHECK-LE-LABEL: ld_cst_align32_uint8_t_uint16_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lis r3, 153
+; CHECK-LE-NEXT: lbz r3, -27108(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_cst_align32_uint8_t_uint16_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lis r3, 153
+; CHECK-BE-NEXT: lbz r3, -27107(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 9999900 to i16*), align 4
+ %conv = trunc i16 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_cst_unalign64_uint8_t_uint16_t() {
+; CHECK-P10-LE-LABEL: ld_cst_unalign64_uint8_t_uint16_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r3, 232
+; CHECK-P10-LE-NEXT: pli r4, 3567587329
+; CHECK-P10-LE-NEXT: rldimi r4, r3, 32, 0
+; CHECK-P10-LE-NEXT: lbz r3, 0(r4)
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_cst_unalign64_uint8_t_uint16_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r3, 232
+; CHECK-P10-BE-NEXT: pli r4, 3567587330
+; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
+; CHECK-P10-BE-NEXT: lbz r3, 0(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_cst_unalign64_uint8_t_uint16_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: li r3, 29
+; CHECK-P9-LE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P9-LE-NEXT: oris r3, r3, 54437
+; CHECK-P9-LE-NEXT: ori r3, r3, 4097
+; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_cst_unalign64_uint8_t_uint16_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r3, 29
+; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P9-BE-NEXT: oris r3, r3, 54437
+; CHECK-P9-BE-NEXT: ori r3, r3, 4098
+; CHECK-P9-BE-NEXT: lbz r3, 0(r3)
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_cst_unalign64_uint8_t_uint16_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: li r3, 29
+; CHECK-P8-LE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P8-LE-NEXT: oris r3, r3, 54437
+; CHECK-P8-LE-NEXT: ori r3, r3, 4097
+; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_cst_unalign64_uint8_t_uint16_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r3, 29
+; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P8-BE-NEXT: oris r3, r3, 54437
+; CHECK-P8-BE-NEXT: ori r3, r3, 4098
+; CHECK-P8-BE-NEXT: lbz r3, 0(r3)
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 1000000000001 to i16*), align 2
+ %conv = trunc i16 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_cst_align64_uint8_t_uint16_t() {
+; CHECK-P10-LE-LABEL: ld_cst_align64_uint8_t_uint16_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r3, 244140625
+; CHECK-P10-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_cst_align64_uint8_t_uint16_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r3, 232
+; CHECK-P10-BE-NEXT: pli r4, 3567587329
+; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
+; CHECK-P10-BE-NEXT: lbz r3, 0(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_cst_align64_uint8_t_uint16_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r3, 3725
+; CHECK-P9-LE-NEXT: ori r3, r3, 19025
+; CHECK-P9-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_cst_align64_uint8_t_uint16_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r3, 29
+; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P9-BE-NEXT: oris r3, r3, 54437
+; CHECK-P9-BE-NEXT: ori r3, r3, 4097
+; CHECK-P9-BE-NEXT: lbz r3, 0(r3)
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_cst_align64_uint8_t_uint16_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r3, 3725
+; CHECK-P8-LE-NEXT: ori r3, r3, 19025
+; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_cst_align64_uint8_t_uint16_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r3, 29
+; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P8-BE-NEXT: oris r3, r3, 54437
+; CHECK-P8-BE-NEXT: ori r3, r3, 4097
+; CHECK-P8-BE-NEXT: lbz r3, 0(r3)
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %0 = load i16, i16* inttoptr (i64 1000000000000 to i16*), align 4096
+ %conv = trunc i16 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_0_uint8_t_uint32_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_0_uint8_t_uint32_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lbz r3, 0(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_0_uint8_t_uint32_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lbz r3, 3(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_align16_uint8_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-LE-LABEL: ld_align16_uint8_t_uint32_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lbz r3, 8(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_align16_uint8_t_uint32_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lbz r3, 11(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_align32_uint8_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LE-LABEL: ld_align32_uint8_t_uint32_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 99999000
+; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_align32_uint8_t_uint32_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 99999003
+; CHECK-P10-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_align32_uint8_t_uint32_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, 1525
+; CHECK-P9-LE-NEXT: ori r4, r4, 56600
+; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_align32_uint8_t_uint32_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: lis r4, 1525
+; CHECK-P9-BE-NEXT: ori r4, r4, 56603
+; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_align32_uint8_t_uint32_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 1525
+; CHECK-P8-LE-NEXT: ori r4, r4, 56600
+; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_align32_uint8_t_uint32_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r4, 1525
+; CHECK-P8-BE-NEXT: ori r4, r4, 56603
+; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_unalign64_uint8_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LE-LABEL: ld_unalign64_uint8_t_uint32_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 232
+; CHECK-P10-LE-NEXT: pli r5, 3567587329
+; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-LE-NEXT: lbzx r3, r3, r5
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_unalign64_uint8_t_uint32_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587332
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_unalign64_uint8_t_uint32_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: li r4, 29
+; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-LE-NEXT: oris r4, r4, 54437
+; CHECK-P9-LE-NEXT: ori r4, r4, 4097
+; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_unalign64_uint8_t_uint32_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4100
+; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_unalign64_uint8_t_uint32_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: li r4, 29
+; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-LE-NEXT: oris r4, r4, 54437
+; CHECK-P8-LE-NEXT: ori r4, r4, 4097
+; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_unalign64_uint8_t_uint32_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4100
+; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_align64_uint8_t_uint32_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LE-LABEL: ld_align64_uint8_t_uint32_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 244140625
+; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_align64_uint8_t_uint32_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587331
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_align64_uint8_t_uint32_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, 3725
+; CHECK-P9-LE-NEXT: ori r4, r4, 19025
+; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_align64_uint8_t_uint32_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4099
+; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_align64_uint8_t_uint32_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 3725
+; CHECK-P8-LE-NEXT: ori r4, r4, 19025
+; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_align64_uint8_t_uint32_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4099
+; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_reg_uint8_t_uint32_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LE-LABEL: ld_reg_uint8_t_uint32_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lbzx r3, r3, r4
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_reg_uint8_t_uint32_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: add r3, r3, r4
+; CHECK-BE-NEXT: lbz r3, 3(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_or_uint8_t_uint32_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LE-LABEL: ld_or_uint8_t_uint32_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: or r3, r4, r3
+; CHECK-LE-NEXT: lbz r3, 0(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_or_uint8_t_uint32_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: or r3, r4, r3
+; CHECK-BE-NEXT: lbz r3, 3(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv1 = trunc i32 %1 to i8
+ ret i8 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_not_disjoint16_uint8_t_uint32_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_not_disjoint16_uint8_t_uint32_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: ori r3, r3, 6
+; CHECK-LE-NEXT: lbz r3, 0(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_not_disjoint16_uint8_t_uint32_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: ori r3, r3, 6
+; CHECK-BE-NEXT: lbz r3, 3(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_disjoint_align16_uint8_t_uint32_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_disjoint_align16_uint8_t_uint32_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-LE-NEXT: lbz r3, 24(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_disjoint_align16_uint8_t_uint32_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-BE-NEXT: lbz r3, 27(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 8
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_not_disjoint32_uint8_t_uint32_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_not_disjoint32_uint8_t_uint32_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: ori r3, r3, 34463
+; CHECK-LE-NEXT: oris r3, r3, 1
+; CHECK-LE-NEXT: lbz r3, 0(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_not_disjoint32_uint8_t_uint32_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: ori r3, r3, 34463
+; CHECK-BE-NEXT: oris r3, r3, 1
+; CHECK-BE-NEXT: lbz r3, 3(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_disjoint_align32_uint8_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_disjoint_align32_uint8_t_uint32_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: lis r4, -15264
+; CHECK-P10-LE-NEXT: and r3, r3, r4
+; CHECK-P10-LE-NEXT: pli r4, 999990000
+; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_disjoint_align32_uint8_t_uint32_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: lis r4, -15264
+; CHECK-P10-BE-NEXT: and r3, r3, r4
+; CHECK-P10-BE-NEXT: pli r4, 999990003
+; CHECK-P10-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_disjoint_align32_uint8_t_uint32_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, -15264
+; CHECK-P9-LE-NEXT: and r3, r3, r4
+; CHECK-P9-LE-NEXT: lis r4, 15258
+; CHECK-P9-LE-NEXT: ori r4, r4, 41712
+; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_disjoint_align32_uint8_t_uint32_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: lis r4, -15264
+; CHECK-P9-BE-NEXT: and r3, r3, r4
+; CHECK-P9-BE-NEXT: lis r4, 15258
+; CHECK-P9-BE-NEXT: ori r4, r4, 41715
+; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_disjoint_align32_uint8_t_uint32_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, -15264
+; CHECK-P8-LE-NEXT: lis r5, 15258
+; CHECK-P8-LE-NEXT: and r3, r3, r4
+; CHECK-P8-LE-NEXT: ori r4, r5, 41712
+; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_disjoint_align32_uint8_t_uint32_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r4, -15264
+; CHECK-P8-BE-NEXT: lis r5, 15258
+; CHECK-P8-BE-NEXT: and r3, r3, r4
+; CHECK-P8-BE-NEXT: ori r4, r5, 41715
+; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 16
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_not_disjoint64_uint8_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_not_disjoint64_uint8_t_uint32_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 232
+; CHECK-P10-LE-NEXT: pli r5, 3567587329
+; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-LE-NEXT: or r3, r3, r5
+; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_not_disjoint64_uint8_t_uint32_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587329
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: or r3, r3, r5
+; CHECK-P10-BE-NEXT: lbz r3, 3(r3)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_not_disjoint64_uint8_t_uint32_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: li r4, 29
+; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-LE-NEXT: oris r4, r4, 54437
+; CHECK-P9-LE-NEXT: ori r4, r4, 4097
+; CHECK-P9-LE-NEXT: or r3, r3, r4
+; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_not_disjoint64_uint8_t_uint32_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4097
+; CHECK-P9-BE-NEXT: or r3, r3, r4
+; CHECK-P9-BE-NEXT: lbz r3, 3(r3)
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_not_disjoint64_uint8_t_uint32_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: li r4, 29
+; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-LE-NEXT: oris r4, r4, 54437
+; CHECK-P8-LE-NEXT: ori r4, r4, 4097
+; CHECK-P8-LE-NEXT: or r3, r3, r4
+; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_not_disjoint64_uint8_t_uint32_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4097
+; CHECK-P8-BE-NEXT: or r3, r3, r4
+; CHECK-P8-BE-NEXT: lbz r3, 3(r3)
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_disjoint_unalign64_uint8_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_disjoint_unalign64_uint8_t_uint32_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 232
+; CHECK-P10-LE-NEXT: pli r5, 3567587329
+; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-LE-NEXT: lbzx r3, r3, r5
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_disjoint_unalign64_uint8_t_uint32_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587332
+; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_disjoint_unalign64_uint8_t_uint32_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: li r4, 29
+; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-LE-NEXT: oris r4, r4, 54437
+; CHECK-P9-LE-NEXT: ori r4, r4, 4097
+; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_disjoint_unalign64_uint8_t_uint32_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4100
+; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_disjoint_unalign64_uint8_t_uint32_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: li r4, 29
+; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-LE-NEXT: oris r4, r4, 54437
+; CHECK-P8-LE-NEXT: ori r4, r4, 4097
+; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_disjoint_unalign64_uint8_t_uint32_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4100
+; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_disjoint_align64_uint8_t_uint32_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_disjoint_align64_uint8_t_uint32_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 244140625
+; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_disjoint_align64_uint8_t_uint32_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587331
+; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_disjoint_align64_uint8_t_uint32_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, 3725
+; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-LE-NEXT: ori r4, r4, 19025
+; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_disjoint_align64_uint8_t_uint32_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4099
+; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_disjoint_align64_uint8_t_uint32_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 3725
+; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-LE-NEXT: ori r4, r4, 19025
+; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_disjoint_align64_uint8_t_uint32_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4099
+; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ %1 = load i32, i32* %0, align 4096
+ %conv = trunc i32 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_cst_align16_uint8_t_uint32_t() {
+; CHECK-LE-LABEL: ld_cst_align16_uint8_t_uint32_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lbz r3, 4080(0)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_cst_align16_uint8_t_uint32_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lbz r3, 4083(0)
+; CHECK-BE-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 4080 to i32*), align 16
+ %conv = trunc i32 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_cst_align32_uint8_t_uint32_t() {
+; CHECK-LE-LABEL: ld_cst_align32_uint8_t_uint32_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lis r3, 153
+; CHECK-LE-NEXT: lbz r3, -27108(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_cst_align32_uint8_t_uint32_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lis r3, 153
+; CHECK-BE-NEXT: lbz r3, -27105(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 9999900 to i32*), align 4
+ %conv = trunc i32 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_cst_unalign64_uint8_t_uint32_t() {
+; CHECK-P10-LE-LABEL: ld_cst_unalign64_uint8_t_uint32_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r3, 232
+; CHECK-P10-LE-NEXT: pli r4, 3567587329
+; CHECK-P10-LE-NEXT: rldimi r4, r3, 32, 0
+; CHECK-P10-LE-NEXT: lbz r3, 0(r4)
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_cst_unalign64_uint8_t_uint32_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r3, 232
+; CHECK-P10-BE-NEXT: pli r4, 3567587332
+; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
+; CHECK-P10-BE-NEXT: lbz r3, 0(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_cst_unalign64_uint8_t_uint32_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: li r3, 29
+; CHECK-P9-LE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P9-LE-NEXT: oris r3, r3, 54437
+; CHECK-P9-LE-NEXT: ori r3, r3, 4097
+; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_cst_unalign64_uint8_t_uint32_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r3, 29
+; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P9-BE-NEXT: oris r3, r3, 54437
+; CHECK-P9-BE-NEXT: ori r3, r3, 4100
+; CHECK-P9-BE-NEXT: lbz r3, 0(r3)
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_cst_unalign64_uint8_t_uint32_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: li r3, 29
+; CHECK-P8-LE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P8-LE-NEXT: oris r3, r3, 54437
+; CHECK-P8-LE-NEXT: ori r3, r3, 4097
+; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_cst_unalign64_uint8_t_uint32_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r3, 29
+; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P8-BE-NEXT: oris r3, r3, 54437
+; CHECK-P8-BE-NEXT: ori r3, r3, 4100
+; CHECK-P8-BE-NEXT: lbz r3, 0(r3)
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 1000000000001 to i32*), align 4
+ %conv = trunc i32 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_cst_align64_uint8_t_uint32_t() {
+; CHECK-P10-LE-LABEL: ld_cst_align64_uint8_t_uint32_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r3, 244140625
+; CHECK-P10-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_cst_align64_uint8_t_uint32_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r3, 232
+; CHECK-P10-BE-NEXT: pli r4, 3567587331
+; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
+; CHECK-P10-BE-NEXT: lbz r3, 0(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_cst_align64_uint8_t_uint32_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r3, 3725
+; CHECK-P9-LE-NEXT: ori r3, r3, 19025
+; CHECK-P9-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_cst_align64_uint8_t_uint32_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r3, 29
+; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P9-BE-NEXT: oris r3, r3, 54437
+; CHECK-P9-BE-NEXT: ori r3, r3, 4099
+; CHECK-P9-BE-NEXT: lbz r3, 0(r3)
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_cst_align64_uint8_t_uint32_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r3, 3725
+; CHECK-P8-LE-NEXT: ori r3, r3, 19025
+; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_cst_align64_uint8_t_uint32_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r3, 29
+; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P8-BE-NEXT: oris r3, r3, 54437
+; CHECK-P8-BE-NEXT: ori r3, r3, 4099
+; CHECK-P8-BE-NEXT: lbz r3, 0(r3)
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %0 = load i32, i32* inttoptr (i64 1000000000000 to i32*), align 4096
+ %conv = trunc i32 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_0_uint8_t_uint64_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_0_uint8_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lbz r3, 0(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_0_uint8_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lbz r3, 7(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_align16_uint8_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-LE-LABEL: ld_align16_uint8_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lbz r3, 8(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_align16_uint8_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lbz r3, 15(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_align32_uint8_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LE-LABEL: ld_align32_uint8_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 99999000
+; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_align32_uint8_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 99999007
+; CHECK-P10-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_align32_uint8_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, 1525
+; CHECK-P9-LE-NEXT: ori r4, r4, 56600
+; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_align32_uint8_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: lis r4, 1525
+; CHECK-P9-BE-NEXT: ori r4, r4, 56607
+; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_align32_uint8_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 1525
+; CHECK-P8-LE-NEXT: ori r4, r4, 56600
+; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_align32_uint8_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r4, 1525
+; CHECK-P8-BE-NEXT: ori r4, r4, 56607
+; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_unalign64_uint8_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LE-LABEL: ld_unalign64_uint8_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 232
+; CHECK-P10-LE-NEXT: pli r5, 3567587329
+; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-LE-NEXT: lbzx r3, r3, r5
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_unalign64_uint8_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587336
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_unalign64_uint8_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: li r4, 29
+; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-LE-NEXT: oris r4, r4, 54437
+; CHECK-P9-LE-NEXT: ori r4, r4, 4097
+; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_unalign64_uint8_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4104
+; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_unalign64_uint8_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: li r4, 29
+; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-LE-NEXT: oris r4, r4, 54437
+; CHECK-P8-LE-NEXT: ori r4, r4, 4097
+; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_unalign64_uint8_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4104
+; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_align64_uint8_t_uint64_t(i8* nocapture readonly %ptr) {
+; CHECK-P10-LE-LABEL: ld_align64_uint8_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 244140625
+; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_align64_uint8_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587335
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_align64_uint8_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, 3725
+; CHECK-P9-LE-NEXT: ori r4, r4, 19025
+; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_align64_uint8_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4103
+; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_align64_uint8_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 3725
+; CHECK-P8-LE-NEXT: ori r4, r4, 19025
+; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_align64_uint8_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4103
+; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_reg_uint8_t_uint64_t(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LE-LABEL: ld_reg_uint8_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lbzx r3, r3, r4
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_reg_uint8_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: add r3, r3, r4
+; CHECK-BE-NEXT: lbz r3, 7(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_or_uint8_t_uint64_t(i64 %ptr, i8 zeroext %off) {
+; CHECK-LE-LABEL: ld_or_uint8_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: or r3, r4, r3
+; CHECK-LE-NEXT: lbz r3, 0(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_or_uint8_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: or r3, r4, r3
+; CHECK-BE-NEXT: lbz r3, 7(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv1 = trunc i64 %1 to i8
+ ret i8 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_not_disjoint16_uint8_t_uint64_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_not_disjoint16_uint8_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: ori r3, r3, 6
+; CHECK-LE-NEXT: lbz r3, 0(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_not_disjoint16_uint8_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: ori r3, r3, 6
+; CHECK-BE-NEXT: lbz r3, 7(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_disjoint_align16_uint8_t_uint64_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_disjoint_align16_uint8_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-LE-NEXT: lbz r3, 24(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_disjoint_align16_uint8_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-BE-NEXT: lbz r3, 31(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_not_disjoint32_uint8_t_uint64_t(i64 %ptr) {
+; CHECK-LE-LABEL: ld_not_disjoint32_uint8_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: ori r3, r3, 34463
+; CHECK-LE-NEXT: oris r3, r3, 1
+; CHECK-LE-NEXT: lbz r3, 0(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_not_disjoint32_uint8_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: ori r3, r3, 34463
+; CHECK-BE-NEXT: oris r3, r3, 1
+; CHECK-BE-NEXT: lbz r3, 7(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_disjoint_align32_uint8_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_disjoint_align32_uint8_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: lis r4, -15264
+; CHECK-P10-LE-NEXT: and r3, r3, r4
+; CHECK-P10-LE-NEXT: pli r4, 999990000
+; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_disjoint_align32_uint8_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: lis r4, -15264
+; CHECK-P10-BE-NEXT: and r3, r3, r4
+; CHECK-P10-BE-NEXT: pli r4, 999990007
+; CHECK-P10-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_disjoint_align32_uint8_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, -15264
+; CHECK-P9-LE-NEXT: and r3, r3, r4
+; CHECK-P9-LE-NEXT: lis r4, 15258
+; CHECK-P9-LE-NEXT: ori r4, r4, 41712
+; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_disjoint_align32_uint8_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: lis r4, -15264
+; CHECK-P9-BE-NEXT: and r3, r3, r4
+; CHECK-P9-BE-NEXT: lis r4, 15258
+; CHECK-P9-BE-NEXT: ori r4, r4, 41719
+; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_disjoint_align32_uint8_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, -15264
+; CHECK-P8-LE-NEXT: lis r5, 15258
+; CHECK-P8-LE-NEXT: and r3, r3, r4
+; CHECK-P8-LE-NEXT: ori r4, r5, 41712
+; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_disjoint_align32_uint8_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r4, -15264
+; CHECK-P8-BE-NEXT: lis r5, 15258
+; CHECK-P8-BE-NEXT: and r3, r3, r4
+; CHECK-P8-BE-NEXT: ori r4, r5, 41719
+; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 16
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_not_disjoint64_uint8_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_not_disjoint64_uint8_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 232
+; CHECK-P10-LE-NEXT: pli r5, 3567587329
+; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-LE-NEXT: or r3, r3, r5
+; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_not_disjoint64_uint8_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587329
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: or r3, r3, r5
+; CHECK-P10-BE-NEXT: lbz r3, 7(r3)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_not_disjoint64_uint8_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: li r4, 29
+; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-LE-NEXT: oris r4, r4, 54437
+; CHECK-P9-LE-NEXT: ori r4, r4, 4097
+; CHECK-P9-LE-NEXT: or r3, r3, r4
+; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_not_disjoint64_uint8_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4097
+; CHECK-P9-BE-NEXT: or r3, r3, r4
+; CHECK-P9-BE-NEXT: lbz r3, 7(r3)
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_not_disjoint64_uint8_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: li r4, 29
+; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-LE-NEXT: oris r4, r4, 54437
+; CHECK-P8-LE-NEXT: ori r4, r4, 4097
+; CHECK-P8-LE-NEXT: or r3, r3, r4
+; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_not_disjoint64_uint8_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4097
+; CHECK-P8-BE-NEXT: or r3, r3, r4
+; CHECK-P8-BE-NEXT: lbz r3, 7(r3)
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_disjoint_unalign64_uint8_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_disjoint_unalign64_uint8_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 232
+; CHECK-P10-LE-NEXT: pli r5, 3567587329
+; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-LE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-LE-NEXT: lbzx r3, r3, r5
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_disjoint_unalign64_uint8_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587336
+; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_disjoint_unalign64_uint8_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: li r4, 29
+; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-LE-NEXT: oris r4, r4, 54437
+; CHECK-P9-LE-NEXT: ori r4, r4, 4097
+; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_disjoint_unalign64_uint8_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4104
+; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_disjoint_unalign64_uint8_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: li r4, 29
+; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-LE-NEXT: oris r4, r4, 54437
+; CHECK-P8-LE-NEXT: ori r4, r4, 4097
+; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_disjoint_unalign64_uint8_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4104
+; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 8
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_disjoint_align64_uint8_t_uint64_t(i64 %ptr) {
+; CHECK-P10-LE-LABEL: ld_disjoint_align64_uint8_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r4, 244140625
+; CHECK-P10-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_disjoint_align64_uint8_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r4, 232
+; CHECK-P10-BE-NEXT: pli r5, 3567587335
+; CHECK-P10-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-BE-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-BE-NEXT: lbzx r3, r3, r5
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_disjoint_align64_uint8_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r4, 3725
+; CHECK-P9-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-LE-NEXT: ori r4, r4, 19025
+; CHECK-P9-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_disjoint_align64_uint8_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r4, 29
+; CHECK-P9-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-BE-NEXT: oris r4, r4, 54437
+; CHECK-P9-BE-NEXT: ori r4, r4, 4103
+; CHECK-P9-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_disjoint_align64_uint8_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 3725
+; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-LE-NEXT: ori r4, r4, 19025
+; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-LE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_disjoint_align64_uint8_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4103
+; CHECK-P8-BE-NEXT: lbzx r3, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ %1 = load i64, i64* %0, align 4096
+ %conv = trunc i64 %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_cst_align16_uint8_t_uint64_t() {
+; CHECK-LE-LABEL: ld_cst_align16_uint8_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lbz r3, 4080(0)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_cst_align16_uint8_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lbz r3, 4087(0)
+; CHECK-BE-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 4080 to i64*), align 16
+ %conv = trunc i64 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_cst_align32_uint8_t_uint64_t() {
+; CHECK-LE-LABEL: ld_cst_align32_uint8_t_uint64_t:
+; CHECK-LE: # %bb.0: # %entry
+; CHECK-LE-NEXT: lis r3, 153
+; CHECK-LE-NEXT: lbz r3, -27108(r3)
+; CHECK-LE-NEXT: blr
+;
+; CHECK-BE-LABEL: ld_cst_align32_uint8_t_uint64_t:
+; CHECK-BE: # %bb.0: # %entry
+; CHECK-BE-NEXT: lis r3, 153
+; CHECK-BE-NEXT: lbz r3, -27101(r3)
+; CHECK-BE-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 9999900 to i64*), align 8
+ %conv = trunc i64 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_cst_unalign64_uint8_t_uint64_t() {
+; CHECK-P10-LE-LABEL: ld_cst_unalign64_uint8_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r3, 232
+; CHECK-P10-LE-NEXT: pli r4, 3567587329
+; CHECK-P10-LE-NEXT: rldimi r4, r3, 32, 0
+; CHECK-P10-LE-NEXT: lbz r3, 0(r4)
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_cst_unalign64_uint8_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r3, 232
+; CHECK-P10-BE-NEXT: pli r4, 3567587336
+; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
+; CHECK-P10-BE-NEXT: lbz r3, 0(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_cst_unalign64_uint8_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: li r3, 29
+; CHECK-P9-LE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P9-LE-NEXT: oris r3, r3, 54437
+; CHECK-P9-LE-NEXT: ori r3, r3, 4097
+; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_cst_unalign64_uint8_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r3, 29
+; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P9-BE-NEXT: oris r3, r3, 54437
+; CHECK-P9-BE-NEXT: ori r3, r3, 4104
+; CHECK-P9-BE-NEXT: lbz r3, 0(r3)
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_cst_unalign64_uint8_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: li r3, 29
+; CHECK-P8-LE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P8-LE-NEXT: oris r3, r3, 54437
+; CHECK-P8-LE-NEXT: ori r3, r3, 4097
+; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_cst_unalign64_uint8_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r3, 29
+; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P8-BE-NEXT: oris r3, r3, 54437
+; CHECK-P8-BE-NEXT: ori r3, r3, 4104
+; CHECK-P8-BE-NEXT: lbz r3, 0(r3)
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 1000000000001 to i64*), align 8
+ %conv = trunc i64 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_cst_align64_uint8_t_uint64_t() {
+; CHECK-P10-LE-LABEL: ld_cst_align64_uint8_t_uint64_t:
+; CHECK-P10-LE: # %bb.0: # %entry
+; CHECK-P10-LE-NEXT: pli r3, 244140625
+; CHECK-P10-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P10-LE-NEXT: blr
+;
+; CHECK-P10-BE-LABEL: ld_cst_align64_uint8_t_uint64_t:
+; CHECK-P10-BE: # %bb.0: # %entry
+; CHECK-P10-BE-NEXT: pli r3, 232
+; CHECK-P10-BE-NEXT: pli r4, 3567587335
+; CHECK-P10-BE-NEXT: rldimi r4, r3, 32, 0
+; CHECK-P10-BE-NEXT: lbz r3, 0(r4)
+; CHECK-P10-BE-NEXT: blr
+;
+; CHECK-P9-LE-LABEL: ld_cst_align64_uint8_t_uint64_t:
+; CHECK-P9-LE: # %bb.0: # %entry
+; CHECK-P9-LE-NEXT: lis r3, 3725
+; CHECK-P9-LE-NEXT: ori r3, r3, 19025
+; CHECK-P9-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P9-LE-NEXT: blr
+;
+; CHECK-P9-BE-LABEL: ld_cst_align64_uint8_t_uint64_t:
+; CHECK-P9-BE: # %bb.0: # %entry
+; CHECK-P9-BE-NEXT: li r3, 29
+; CHECK-P9-BE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P9-BE-NEXT: oris r3, r3, 54437
+; CHECK-P9-BE-NEXT: ori r3, r3, 4103
+; CHECK-P9-BE-NEXT: lbz r3, 0(r3)
+; CHECK-P9-BE-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_cst_align64_uint8_t_uint64_t:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r3, 3725
+; CHECK-P8-LE-NEXT: ori r3, r3, 19025
+; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-LE-NEXT: lbz r3, 0(r3)
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_cst_align64_uint8_t_uint64_t:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r3, 29
+; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P8-BE-NEXT: oris r3, r3, 54437
+; CHECK-P8-BE-NEXT: ori r3, r3, 4103
+; CHECK-P8-BE-NEXT: lbz r3, 0(r3)
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %0 = load i64, i64* inttoptr (i64 1000000000000 to i64*), align 4096
+ %conv = trunc i64 %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_0_uint8_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_0_uint8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_0_uint8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_0_uint8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_align16_uint8_t_float(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint8_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfs f0, 8(r3)
+; CHECK-NEXT: xscvdpsxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_align32_uint8_t_float(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lfsx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint8_t_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lfsx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_unalign64_uint8_t_float(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_unalign64_uint8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: lfsx f0, r3, r5
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_unalign64_uint8_t_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: lfsx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_align64_uint8_t_float(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfsx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint8_t_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfsx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_reg_uint8_t_float(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint8_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfsx f0, r3, r4
+; CHECK-NEXT: xscvdpsxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_or_uint8_t_float(i64 %ptr, i8 zeroext %off) {
+; CHECK-P10-LABEL: ld_or_uint8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: or r3, r4, r3
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_or_uint8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: or r3, r4, r3
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_or_uint8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv1 = fptoui float %1 to i8
+ ret i8 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_not_disjoint16_uint8_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint16_uint8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: ori r3, r3, 6
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint16_uint8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: ori r3, r3, 6
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint16_uint8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_disjoint_align16_uint8_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align16_uint8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-NEXT: lfs f0, 24(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align16_uint8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-NEXT: lfs f0, 24(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align16_uint8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 8
+ %conv = fptoui float %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_not_disjoint32_uint8_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint32_uint8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: ori r3, r3, 34463
+; CHECK-P10-NEXT: oris r3, r3, 1
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint32_uint8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: ori r3, r3, 34463
+; CHECK-P9-NEXT: oris r3, r3, 1
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint32_uint8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_disjoint_align32_uint8_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lfsx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lfsx f0, r3, r4
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lfsx f0, r3, r4
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 16
+ %conv = fptoui float %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_not_disjoint64_uint8_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint64_uint8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint64_uint8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_disjoint_unalign64_uint8_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_unalign64_uint8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: lfsx f0, r3, r5
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint8_t_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: lfsx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000001
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4
+ %conv = fptoui float %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_disjoint_align64_uint8_t_float(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfsx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint8_t_float:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfsx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to float*
+ %1 = load float, float* %0, align 4096
+ %conv = fptoui float %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_cst_align16_uint8_t_float() {
+; CHECK-LABEL: ld_cst_align16_uint8_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfs f0, 4080(0)
+; CHECK-NEXT: xscvdpsxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %0 = load float, float* inttoptr (i64 4080 to float*), align 16
+ %conv = fptoui float %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_cst_align32_uint8_t_float() {
+; CHECK-P10-LABEL: ld_cst_align32_uint8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r3, 153
+; CHECK-P10-NEXT: lfs f0, -27108(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align32_uint8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 153
+; CHECK-P9-NEXT: lfs f0, -27108(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align32_uint8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load float, float* inttoptr (i64 9999900 to float*), align 4
+ %conv = fptoui float %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_cst_unalign64_uint8_t_float() {
+; CHECK-P10-LABEL: ld_cst_unalign64_uint8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 232
+; CHECK-P10-NEXT: pli r4, 3567587329
+; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
+; CHECK-P10-NEXT: lfs f0, 0(r4)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_unalign64_uint8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r3, 29
+; CHECK-P9-NEXT: rldic r3, r3, 35, 24
+; CHECK-P9-NEXT: oris r3, r3, 54437
+; CHECK-P9-NEXT: ori r3, r3, 4097
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_unalign64_uint8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r3, 29
+; CHECK-P8-NEXT: rldic r3, r3, 35, 24
+; CHECK-P8-NEXT: oris r3, r3, 54437
+; CHECK-P8-NEXT: ori r3, r3, 4097
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load float, float* inttoptr (i64 1000000000001 to float*), align 4
+ %conv = fptoui float %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_cst_align64_uint8_t_float() {
+; CHECK-P10-LABEL: ld_cst_align64_uint8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lfs f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align64_uint8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: lfs f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align64_uint8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: lfsx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load float, float* inttoptr (i64 1000000000000 to float*), align 4096
+ %conv = fptoui float %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_0_uint8_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_0_uint8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_0_uint8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_0_uint8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_align16_uint8_t_double(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_uint8_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfd f0, 8(r3)
+; CHECK-NEXT: xscvdpsxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_align32_uint8_t_double(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_uint8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align32_uint8_t_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 1525
+; CHECK-PREP10-NEXT: ori r4, r4, 56600
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_unalign64_uint8_t_double(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_unalign64_uint8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: lfdx f0, r3, r5
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_unalign64_uint8_t_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_align64_uint8_t_double(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_uint8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_align64_uint8_t_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_reg_uint8_t_double(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_uint8_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfdx f0, r3, r4
+; CHECK-NEXT: xscvdpsxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_or_uint8_t_double(i64 %ptr, i8 zeroext %off) {
+; CHECK-P10-LABEL: ld_or_uint8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: or r3, r4, r3
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_or_uint8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: or r3, r4, r3
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_or_uint8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv1 = fptoui double %1 to i8
+ ret i8 %conv1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_not_disjoint16_uint8_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint16_uint8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: ori r3, r3, 6
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint16_uint8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: ori r3, r3, 6
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint16_uint8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_disjoint_align16_uint8_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align16_uint8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-NEXT: lfd f0, 24(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align16_uint8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-NEXT: lfd f0, 24(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align16_uint8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_not_disjoint32_uint8_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint32_uint8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: ori r3, r3, 34463
+; CHECK-P10-NEXT: oris r3, r3, 1
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint32_uint8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: ori r3, r3, 34463
+; CHECK-P9-NEXT: oris r3, r3, 1
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint32_uint8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_disjoint_align32_uint8_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_uint8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_uint8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lfdx f0, r3, r4
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_disjoint_align32_uint8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: lfdx f0, r3, r4
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 16
+ %conv = fptoui double %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_not_disjoint64_uint8_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_uint8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint64_uint8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_not_disjoint64_uint8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_disjoint_unalign64_uint8_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_unalign64_uint8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: lfdx f0, r3, r5
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_unalign64_uint8_t_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r4, 29
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
+; CHECK-PREP10-NEXT: oris r4, r4, 54437
+; CHECK-PREP10-NEXT: ori r4, r4, 4097
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000001
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 8
+ %conv = fptoui double %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_disjoint_align64_uint8_t_double(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_uint8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lfdx f0, r3, r4
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: ld_disjoint_align64_uint8_t_double:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: lfdx f0, r3, r4
+; CHECK-PREP10-NEXT: xscvdpsxws f0, f0
+; CHECK-PREP10-NEXT: mffprwz r3, f0
+; CHECK-PREP10-NEXT: clrldi r3, r3, 32
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to double*
+ %1 = load double, double* %0, align 4096
+ %conv = fptoui double %1 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_cst_align16_uint8_t_double() {
+; CHECK-LABEL: ld_cst_align16_uint8_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lfd f0, 4080(0)
+; CHECK-NEXT: xscvdpsxws f0, f0
+; CHECK-NEXT: mffprwz r3, f0
+; CHECK-NEXT: clrldi r3, r3, 32
+; CHECK-NEXT: blr
+entry:
+ %0 = load double, double* inttoptr (i64 4080 to double*), align 16
+ %conv = fptoui double %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_cst_align32_uint8_t_double() {
+; CHECK-P10-LABEL: ld_cst_align32_uint8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r3, 153
+; CHECK-P10-NEXT: lfd f0, -27108(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align32_uint8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 153
+; CHECK-P9-NEXT: lfd f0, -27108(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align32_uint8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load double, double* inttoptr (i64 9999900 to double*), align 8
+ %conv = fptoui double %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_cst_unalign64_uint8_t_double() {
+; CHECK-P10-LABEL: ld_cst_unalign64_uint8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 232
+; CHECK-P10-NEXT: pli r4, 3567587329
+; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
+; CHECK-P10-NEXT: lfd f0, 0(r4)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_unalign64_uint8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r3, 29
+; CHECK-P9-NEXT: rldic r3, r3, 35, 24
+; CHECK-P9-NEXT: oris r3, r3, 54437
+; CHECK-P9-NEXT: ori r3, r3, 4097
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_unalign64_uint8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: li r3, 29
+; CHECK-P8-NEXT: rldic r3, r3, 35, 24
+; CHECK-P8-NEXT: oris r3, r3, 54437
+; CHECK-P8-NEXT: ori r3, r3, 4097
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load double, double* inttoptr (i64 1000000000001 to double*), align 8
+ %conv = fptoui double %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local zeroext i8 @ld_cst_align64_uint8_t_double() {
+; CHECK-P10-LABEL: ld_cst_align64_uint8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lfd f0, 0(r3)
+; CHECK-P10-NEXT: xscvdpsxws f0, f0
+; CHECK-P10-NEXT: mffprwz r3, f0
+; CHECK-P10-NEXT: clrldi r3, r3, 32
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align64_uint8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: lfd f0, 0(r3)
+; CHECK-P9-NEXT: xscvdpsxws f0, f0
+; CHECK-P9-NEXT: mffprwz r3, f0
+; CHECK-P9-NEXT: clrldi r3, r3, 32
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: ld_cst_align64_uint8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: lfdx f0, 0, r3
+; CHECK-P8-NEXT: xscvdpsxws f0, f0
+; CHECK-P8-NEXT: mffprwz r3, f0
+; CHECK-P8-NEXT: clrldi r3, r3, 32
+; CHECK-P8-NEXT: blr
+entry:
+ %0 = load double, double* inttoptr (i64 1000000000000 to double*), align 4096
+ %conv = fptoui double %0 to i8
+ ret i8 %conv
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_uint8_t_uint8_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_0_uint8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stb r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to i8*
+ store i8 %str, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_uint8_t_uint8_t(i8* nocapture %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_align16_uint8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stb r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ store i8 %str, i8* %add.ptr, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_uint8_t_uint8_t(i8* nocapture %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_align32_uint8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: stbx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_uint8_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: stbx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ store i8 %str, i8* %add.ptr, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_uint8_t_uint8_t(i8* nocapture %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_align64_uint8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stbx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_uint8_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stbx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ store i8 %str, i8* %add.ptr, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_uint8_t_uint8_t(i8* nocapture %ptr, i64 %off, i8 zeroext %str) {
+; CHECK-LABEL: st_reg_uint8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stbx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ store i8 %str, i8* %add.ptr, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_uint8_t_uint8_t(i64 %ptr, i8 zeroext %off, i8 zeroext %str) {
+; CHECK-LABEL: st_or1_uint8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: stb r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to i8*
+ store i8 %str, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_uint8_t_uint8_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint16_uint8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: stb r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i8*
+ store i8 %str, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_uint8_t_uint8_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_disjoint_align16_uint8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: stb r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i8*
+ store i8 %str, i8* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_uint8_t_uint8_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint32_uint8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: stb r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i8*
+ store i8 %str, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_uint8_t_uint8_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: stbx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint8_t_uint8_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: stbx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint8_t_uint8_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: stbx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i8*
+ store i8 %str, i8* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_uint8_t_uint8_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: stb r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_uint8_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: stb r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i8*
+ store i8 %str, i8* %0, align 1
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_uint8_t_uint8_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stbx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_uint8_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stbx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i8*
+ store i8 %str, i8* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_uint8_t_uint8_t(i8 zeroext %str) {
+; CHECK-LABEL: st_cst_align16_uint8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stb r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ store i8 %str, i8* inttoptr (i64 4080 to i8*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_uint8_t_uint8_t(i8 zeroext %str) {
+; CHECK-LABEL: st_cst_align32_uint8_t_uint8_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: stb r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ store i8 %str, i8* inttoptr (i64 9999900 to i8*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_uint8_t_uint8_t(i8 zeroext %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint8_t_uint8_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stb r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_uint8_t_uint8_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stb r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ store i8 %str, i8* inttoptr (i64 1000000000000 to i8*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_uint8_t_uint16_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_0_uint8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sth r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %str to i16
+ %0 = inttoptr i64 %ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_uint8_t_uint16_t(i8* nocapture %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_align16_uint8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sth r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %str to i16
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_uint8_t_uint16_t(i8* nocapture %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_align32_uint8_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_uint8_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: sthx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = zext i8 %str to i16
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_uint8_t_uint16_t(i8* nocapture %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_align64_uint8_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_uint8_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: sthx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = zext i8 %str to i16
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_uint8_t_uint16_t(i8* nocapture %ptr, i64 %off, i8 zeroext %str) {
+; CHECK-LABEL: st_reg_uint8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sthx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %str to i16
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_uint8_t_uint16_t(i64 %ptr, i8 zeroext %off, i8 zeroext %str) {
+; CHECK-LABEL: st_or1_uint8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: sth r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %str to i16
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_uint8_t_uint16_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint16_uint8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: sth r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %str to i16
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_uint8_t_uint16_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_disjoint_align16_uint8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: sth r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = zext i8 %str to i16
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_uint8_t_uint16_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint32_uint8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: sth r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %str to i16
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_uint8_t_uint16_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint8_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint8_t_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: sthx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint8_t_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: sthx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = zext i8 %str to i16
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_uint8_t_uint16_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint8_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: sth r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_uint8_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: sth r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = zext i8 %str to i16
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_uint8_t_uint16_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint8_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_uint8_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: sthx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = zext i8 %str to i16
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_uint8_t_uint16_t(i8 zeroext %str) {
+; CHECK-LABEL: st_cst_align16_uint8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sth r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %str to i16
+ store i16 %conv, i16* inttoptr (i64 4080 to i16*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_uint8_t_uint16_t(i8 zeroext %str) {
+; CHECK-LABEL: st_cst_align32_uint8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: sth r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %str to i16
+ store i16 %conv, i16* inttoptr (i64 9999900 to i16*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_uint8_t_uint16_t(i8 zeroext %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint8_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: sth r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_uint8_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: sth r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = zext i8 %str to i16
+ store i16 %conv, i16* inttoptr (i64 1000000000000 to i16*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_uint8_t_uint32_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_0_uint8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stw r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %str to i32
+ %0 = inttoptr i64 %ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_uint8_t_uint32_t(i8* nocapture %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_align16_uint8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stw r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %str to i32
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_uint8_t_uint32_t(i8* nocapture %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_align32_uint8_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_uint8_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: stwx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = zext i8 %str to i32
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_uint8_t_uint32_t(i8* nocapture %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_align64_uint8_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_uint8_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stwx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = zext i8 %str to i32
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_uint8_t_uint32_t(i8* nocapture %ptr, i64 %off, i8 zeroext %str) {
+; CHECK-LABEL: st_reg_uint8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stwx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %str to i32
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_uint8_t_uint32_t(i64 %ptr, i8 zeroext %off, i8 zeroext %str) {
+; CHECK-LABEL: st_or1_uint8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: stw r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %str to i32
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_uint8_t_uint32_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint16_uint8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: stw r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %str to i32
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_uint8_t_uint32_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_disjoint_align16_uint8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: stw r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = zext i8 %str to i32
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_uint8_t_uint32_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint32_uint8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: stw r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %str to i32
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_uint8_t_uint32_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint8_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint8_t_uint32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: stwx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint8_t_uint32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: stwx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = zext i8 %str to i32
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_uint8_t_uint32_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint8_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: stw r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_uint8_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: stw r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = zext i8 %str to i32
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_uint8_t_uint32_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint8_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_uint8_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stwx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = zext i8 %str to i32
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_uint8_t_uint32_t(i8 zeroext %str) {
+; CHECK-LABEL: st_cst_align16_uint8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stw r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %str to i32
+ store i32 %conv, i32* inttoptr (i64 4080 to i32*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_uint8_t_uint32_t(i8 zeroext %str) {
+; CHECK-LABEL: st_cst_align32_uint8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: stw r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %str to i32
+ store i32 %conv, i32* inttoptr (i64 9999900 to i32*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_uint8_t_uint32_t(i8 zeroext %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint8_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stw r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_uint8_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stw r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = zext i8 %str to i32
+ store i32 %conv, i32* inttoptr (i64 1000000000000 to i32*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_uint8_t_uint64_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_0_uint8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %str to i64
+ %0 = inttoptr i64 %ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_uint8_t_uint64_t(i8* nocapture %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_align16_uint8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_uint8_t_uint64_t(i8* nocapture %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_align32_uint8_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_uint8_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = zext i8 %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_uint8_t_uint64_t(i8* nocapture %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_align64_uint8_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_uint8_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = zext i8 %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_uint8_t_uint64_t(i8* nocapture %ptr, i64 %off, i8 zeroext %str) {
+; CHECK-LABEL: st_reg_uint8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stdx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_uint8_t_uint64_t(i64 %ptr, i8 zeroext %off, i8 zeroext %str) {
+; CHECK-LABEL: st_or1_uint8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: std r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %str to i64
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_uint8_t_uint64_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint16_uint8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %str to i64
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_uint8_t_uint64_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_disjoint_align16_uint8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: std r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = zext i8 %str to i64
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_uint8_t_uint64_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_not_disjoint32_uint8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %str to i64
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_uint8_t_uint64_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint8_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint8_t_uint64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: stdx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint8_t_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: stdx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = zext i8 %str to i64
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_uint8_t_uint64_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint8_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: std r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_uint8_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: std r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = zext i8 %str to i64
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_uint8_t_uint64_t(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint8_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_uint8_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = zext i8 %str to i64
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_uint8_t_uint64_t(i8 zeroext %str) {
+; CHECK-LABEL: st_cst_align16_uint8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %str to i64
+ store i64 %conv, i64* inttoptr (i64 4080 to i64*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_uint8_t_uint64_t(i8 zeroext %str) {
+; CHECK-LABEL: st_cst_align32_uint8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: std r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = zext i8 %str to i64
+ store i64 %conv, i64* inttoptr (i64 9999900 to i64*), align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_uint8_t_uint64_t(i8 zeroext %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint8_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: std r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_uint8_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: std r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = zext i8 %str to i64
+ store i64 %conv, i64* inttoptr (i64 1000000000000 to i64*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_uint8_t_float(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_0_uint8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_0_uint8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_0_uint8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i8 %str to float
+ %0 = inttoptr i64 %ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_uint8_t_float(i8* nocapture %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_align16_uint8_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprwz f0, r4
+; CHECK-NEXT: xscvuxdsp f0, f0
+; CHECK-NEXT: stfs f0, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = uitofp i8 %str to float
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_uint8_t_float(i8* nocapture %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_align32_uint8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: stfsx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align32_uint8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: lis r4, 1525
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 56600
+; CHECK-P9-NEXT: stfsx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align32_uint8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: lis r4, 1525
+; CHECK-P8-NEXT: ori r4, r4, 56600
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i8 %str to float
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_uint8_t_float(i8* nocapture %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_align64_uint8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: stfsx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align64_uint8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stfsx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align64_uint8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: stfsx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i8 %str to float
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_uint8_t_float(i8* nocapture %ptr, i64 %off, i8 zeroext %str) {
+; CHECK-LABEL: st_reg_uint8_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprwz f0, r5
+; CHECK-NEXT: xscvuxdsp f0, f0
+; CHECK-NEXT: stfsx f0, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = uitofp i8 %str to float
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_uint8_t_float(i64 %ptr, i8 zeroext %off, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_or1_uint8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r5
+; CHECK-P10-NEXT: or r3, r4, r3
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_or1_uint8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r5
+; CHECK-P9-NEXT: or r3, r4, r3
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_or1_uint8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r5
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i8 %str to float
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_uint8_t_float(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint16_uint8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: ori r3, r3, 6
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint16_uint8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: ori r3, r3, 6
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint16_uint8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i8 %str to float
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_uint8_t_float(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align16_uint8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 24(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align16_uint8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, 24(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align16_uint8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = uitofp i8 %str to float
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_uint8_t_float(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint32_uint8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: ori r3, r3, 34463
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: oris r3, r3, 1
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint32_uint8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: ori r3, r3, 34463
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: oris r3, r3, 1
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint32_uint8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i8 %str to float
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_uint8_t_float(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: stfsx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stfsx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = uitofp i8 %str to float
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_uint8_t_float(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_uint8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint64_uint8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i8 %str to float
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_uint8_t_float(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: stfsx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align64_uint8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stfsx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align64_uint8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: lis r5, 3725
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-NEXT: ori r4, r5, 19025
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: stfsx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = uitofp i8 %str to float
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_uint8_t_float(i8 zeroext %str) {
+; CHECK-LABEL: st_cst_align16_uint8_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprwz f0, r3
+; CHECK-NEXT: xscvuxdsp f0, f0
+; CHECK-NEXT: stfs f0, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = uitofp i8 %str to float
+ store float %conv, float* inttoptr (i64 4080 to float*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_uint8_t_float(i8 zeroext %str) {
+; CHECK-P10-LABEL: st_cst_align32_uint8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r3
+; CHECK-P10-NEXT: lis r3, 153
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, -27108(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align32_uint8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r3
+; CHECK-P9-NEXT: lis r3, 153
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, -27108(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align32_uint8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i8 %str to float
+ store float %conv, float* inttoptr (i64 9999900 to float*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_uint8_t_float(i8 zeroext %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r3
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: xscvuxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align64_uint8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r3
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: xscvuxdsp f0, f0
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align64_uint8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: xscvuxdsp f0, f0
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i8 %str to float
+ store float %conv, float* inttoptr (i64 1000000000000 to float*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_uint8_t_double(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_0_uint8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_0_uint8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_0_uint8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i8 %str to double
+ %0 = inttoptr i64 %ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_uint8_t_double(i8* nocapture %ptr, i8 zeroext %str) {
+; CHECK-LABEL: st_align16_uint8_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprwz f0, r4
+; CHECK-NEXT: xscvuxddp f0, f0
+; CHECK-NEXT: stfd f0, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = uitofp i8 %str to double
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_uint8_t_double(i8* nocapture %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_align32_uint8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: stfdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align32_uint8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: lis r4, 1525
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 56600
+; CHECK-P9-NEXT: stfdx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align32_uint8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: lis r4, 1525
+; CHECK-P8-NEXT: ori r4, r4, 56600
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i8 %str to double
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_uint8_t_double(i8* nocapture %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_align64_uint8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: stfdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align64_uint8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stfdx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align64_uint8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: stfdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i8 %str to double
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_uint8_t_double(i8* nocapture %ptr, i64 %off, i8 zeroext %str) {
+; CHECK-LABEL: st_reg_uint8_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprwz f0, r5
+; CHECK-NEXT: xscvuxddp f0, f0
+; CHECK-NEXT: stfdx f0, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = uitofp i8 %str to double
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_uint8_t_double(i64 %ptr, i8 zeroext %off, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_or1_uint8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r5
+; CHECK-P10-NEXT: or r3, r4, r3
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_or1_uint8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r5
+; CHECK-P9-NEXT: or r3, r4, r3
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_or1_uint8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r5
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i8 %str to double
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_uint8_t_double(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint16_uint8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: ori r3, r3, 6
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint16_uint8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: ori r3, r3, 6
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint16_uint8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i8 %str to double
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_uint8_t_double(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align16_uint8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 24(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align16_uint8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, 24(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align16_uint8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = uitofp i8 %str to double
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_uint8_t_double(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint32_uint8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: ori r3, r3, 34463
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: oris r3, r3, 1
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint32_uint8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: ori r3, r3, 34463
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: oris r3, r3, 1
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint32_uint8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i8 %str to double
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_uint8_t_double(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_uint8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: stfdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_uint8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stfdx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_uint8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = uitofp i8 %str to double
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_uint8_t_double(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_uint8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_uint8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint64_uint8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i8 %str to double
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_uint8_t_double(i64 %ptr, i8 zeroext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_uint8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r4
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: stfdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align64_uint8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r4
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stfdx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align64_uint8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r4
+; CHECK-P8-NEXT: lis r5, 3725
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-NEXT: ori r4, r5, 19025
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: stfdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = uitofp i8 %str to double
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_uint8_t_double(i8 zeroext %str) {
+; CHECK-LABEL: st_cst_align16_uint8_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprwz f0, r3
+; CHECK-NEXT: xscvuxddp f0, f0
+; CHECK-NEXT: stfd f0, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = uitofp i8 %str to double
+ store double %conv, double* inttoptr (i64 4080 to double*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_uint8_t_double(i8 zeroext %str) {
+; CHECK-P10-LABEL: st_cst_align32_uint8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r3
+; CHECK-P10-NEXT: lis r3, 153
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, -27108(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align32_uint8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r3
+; CHECK-P9-NEXT: lis r3, 153
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, -27108(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align32_uint8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i8 %str to double
+ store double %conv, double* inttoptr (i64 9999900 to double*), align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_uint8_t_double(i8 zeroext %str) {
+; CHECK-P10-LABEL: st_cst_align64_uint8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwz f0, r3
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: xscvuxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align64_uint8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwz f0, r3
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: xscvuxddp f0, f0
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align64_uint8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwz f0, r3
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: xscvuxddp f0, f0
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = uitofp i8 %str to double
+ store double %conv, double* inttoptr (i64 1000000000000 to double*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_int8_t_uint16_t(i64 %ptr, i8 signext %str) {
+; CHECK-LABEL: st_0_int8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sth r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i8 %str to i16
+ %0 = inttoptr i64 %ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_int8_t_uint16_t(i8* nocapture %ptr, i8 signext %str) {
+; CHECK-LABEL: st_align16_int8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sth r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i8 %str to i16
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_int8_t_uint16_t(i8* nocapture %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_align32_int8_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_int8_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: sthx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = sext i8 %str to i16
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_int8_t_uint16_t(i8* nocapture %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_align64_int8_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_int8_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: sthx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = sext i8 %str to i16
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_int8_t_uint16_t(i8* nocapture %ptr, i64 %off, i8 signext %str) {
+; CHECK-LABEL: st_reg_int8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sthx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i8 %str to i16
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_int8_t_uint16_t(i64 %ptr, i8 zeroext %off, i8 signext %str) {
+; CHECK-LABEL: st_or1_int8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: sth r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i8 %str to i16
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_int8_t_uint16_t(i64 %ptr, i8 signext %str) {
+; CHECK-LABEL: st_not_disjoint16_int8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: sth r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i8 %str to i16
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_int8_t_uint16_t(i64 %ptr, i8 signext %str) {
+; CHECK-LABEL: st_disjoint_align16_int8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: sth r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = sext i8 %str to i16
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_int8_t_uint16_t(i64 %ptr, i8 signext %str) {
+; CHECK-LABEL: st_not_disjoint32_int8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: sth r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i8 %str to i16
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_int8_t_uint16_t(i64 %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_int8_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_int8_t_uint16_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: sthx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_int8_t_uint16_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: sthx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = sext i8 %str to i16
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_int8_t_uint16_t(i64 %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_int8_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: sth r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_int8_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: sth r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = sext i8 %str to i16
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 2
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_int8_t_uint16_t(i64 %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_int8_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: sthx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_int8_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: sthx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = sext i8 %str to i16
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i16*
+ store i16 %conv, i16* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_int8_t_uint16_t(i8 signext %str) {
+; CHECK-LABEL: st_cst_align16_int8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: sth r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i8 %str to i16
+ store i16 %conv, i16* inttoptr (i64 4080 to i16*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_int8_t_uint16_t(i8 signext %str) {
+; CHECK-LABEL: st_cst_align32_int8_t_uint16_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: sth r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i8 %str to i16
+ store i16 %conv, i16* inttoptr (i64 9999900 to i16*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_int8_t_uint16_t(i8 signext %str) {
+; CHECK-P10-LABEL: st_cst_align64_int8_t_uint16_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: sth r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_int8_t_uint16_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: sth r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = sext i8 %str to i16
+ store i16 %conv, i16* inttoptr (i64 1000000000000 to i16*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_int8_t_uint32_t(i64 %ptr, i8 signext %str) {
+; CHECK-LABEL: st_0_int8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stw r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i8 %str to i32
+ %0 = inttoptr i64 %ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_int8_t_uint32_t(i8* nocapture %ptr, i8 signext %str) {
+; CHECK-LABEL: st_align16_int8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stw r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i8 %str to i32
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_int8_t_uint32_t(i8* nocapture %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_align32_int8_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_int8_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: stwx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = sext i8 %str to i32
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_int8_t_uint32_t(i8* nocapture %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_align64_int8_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_int8_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stwx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = sext i8 %str to i32
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_int8_t_uint32_t(i8* nocapture %ptr, i64 %off, i8 signext %str) {
+; CHECK-LABEL: st_reg_int8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stwx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i8 %str to i32
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_int8_t_uint32_t(i64 %ptr, i8 zeroext %off, i8 signext %str) {
+; CHECK-LABEL: st_or1_int8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: stw r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i8 %str to i32
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_int8_t_uint32_t(i64 %ptr, i8 signext %str) {
+; CHECK-LABEL: st_not_disjoint16_int8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: stw r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i8 %str to i32
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_int8_t_uint32_t(i64 %ptr, i8 signext %str) {
+; CHECK-LABEL: st_disjoint_align16_int8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: stw r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = sext i8 %str to i32
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_int8_t_uint32_t(i64 %ptr, i8 signext %str) {
+; CHECK-LABEL: st_not_disjoint32_int8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: stw r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i8 %str to i32
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_int8_t_uint32_t(i64 %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_int8_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_int8_t_uint32_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: stwx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_int8_t_uint32_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: stwx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = sext i8 %str to i32
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_int8_t_uint32_t(i64 %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_int8_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: stw r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_int8_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: stw r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = sext i8 %str to i32
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_int8_t_uint32_t(i64 %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_int8_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stwx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_int8_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stwx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = sext i8 %str to i32
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i32*
+ store i32 %conv, i32* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_int8_t_uint32_t(i8 signext %str) {
+; CHECK-LABEL: st_cst_align16_int8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stw r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i8 %str to i32
+ store i32 %conv, i32* inttoptr (i64 4080 to i32*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_int8_t_uint32_t(i8 signext %str) {
+; CHECK-LABEL: st_cst_align32_int8_t_uint32_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: stw r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i8 %str to i32
+ store i32 %conv, i32* inttoptr (i64 9999900 to i32*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_int8_t_uint32_t(i8 signext %str) {
+; CHECK-P10-LABEL: st_cst_align64_int8_t_uint32_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stw r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_int8_t_uint32_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: stw r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = sext i8 %str to i32
+ store i32 %conv, i32* inttoptr (i64 1000000000000 to i32*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_int8_t_uint64_t(i64 %ptr, i8 signext %str) {
+; CHECK-LABEL: st_0_int8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i8 %str to i64
+ %0 = inttoptr i64 %ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_int8_t_uint64_t(i8* nocapture %ptr, i8 signext %str) {
+; CHECK-LABEL: st_align16_int8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r4, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i8 %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_int8_t_uint64_t(i8* nocapture %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_align32_int8_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 99999000
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align32_int8_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 1525
+; CHECK-PREP10-NEXT: ori r5, r5, 56600
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = sext i8 %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_int8_t_uint64_t(i8* nocapture %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_align64_int8_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_align64_int8_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = sext i8 %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_int8_t_uint64_t(i8* nocapture %ptr, i64 %off, i8 signext %str) {
+; CHECK-LABEL: st_reg_int8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stdx r5, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i8 %str to i64
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_int8_t_uint64_t(i64 %ptr, i8 zeroext %off, i8 signext %str) {
+; CHECK-LABEL: st_or1_int8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: std r5, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i8 %str to i64
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_int8_t_uint64_t(i64 %ptr, i8 signext %str) {
+; CHECK-LABEL: st_not_disjoint16_int8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i8 %str to i64
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_int8_t_uint64_t(i64 %ptr, i8 signext %str) {
+; CHECK-LABEL: st_disjoint_align16_int8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: std r4, 24(r3)
+; CHECK-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = sext i8 %str to i64
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_int8_t_uint64_t(i64 %ptr, i8 signext %str) {
+; CHECK-LABEL: st_not_disjoint32_int8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: std r4, 0(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i8 %str to i64
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_int8_t_uint64_t(i64 %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_int8_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: pli r5, 999990000
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_int8_t_uint64_t:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: lis r5, 15258
+; CHECK-P9-NEXT: ori r5, r5, 41712
+; CHECK-P9-NEXT: stdx r4, r3, r5
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_int8_t_uint64_t:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: lis r5, -15264
+; CHECK-P8-NEXT: lis r6, 15258
+; CHECK-P8-NEXT: and r3, r3, r5
+; CHECK-P8-NEXT: ori r5, r6, 41712
+; CHECK-P8-NEXT: stdx r4, r3, r5
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = sext i8 %str to i64
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_int8_t_uint64_t(i64 %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_int8_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 232
+; CHECK-P10-NEXT: pli r6, 3567587329
+; CHECK-P10-NEXT: rldimi r6, r5, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r6
+; CHECK-P10-NEXT: std r4, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_not_disjoint64_int8_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: li r5, 29
+; CHECK-PREP10-NEXT: rldic r5, r5, 35, 24
+; CHECK-PREP10-NEXT: oris r5, r5, 54437
+; CHECK-PREP10-NEXT: ori r5, r5, 4097
+; CHECK-PREP10-NEXT: or r3, r3, r5
+; CHECK-PREP10-NEXT: std r4, 0(r3)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = sext i8 %str to i64
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_int8_t_uint64_t(i64 %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_int8_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r5, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r5, r5, 12, 24
+; CHECK-P10-NEXT: stdx r4, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_disjoint_align64_int8_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r5, 3725
+; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-PREP10-NEXT: ori r5, r5, 19025
+; CHECK-PREP10-NEXT: rldic r5, r5, 12, 24
+; CHECK-PREP10-NEXT: stdx r4, r3, r5
+; CHECK-PREP10-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = sext i8 %str to i64
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to i64*
+ store i64 %conv, i64* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_int8_t_uint64_t(i8 signext %str) {
+; CHECK-LABEL: st_cst_align16_int8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: std r3, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i8 %str to i64
+ store i64 %conv, i64* inttoptr (i64 4080 to i64*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_int8_t_uint64_t(i8 signext %str) {
+; CHECK-LABEL: st_cst_align32_int8_t_uint64_t:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lis r4, 153
+; CHECK-NEXT: std r3, -27108(r4)
+; CHECK-NEXT: blr
+entry:
+ %conv = sext i8 %str to i64
+ store i64 %conv, i64* inttoptr (i64 9999900 to i64*), align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_int8_t_uint64_t(i8 signext %str) {
+; CHECK-P10-LABEL: st_cst_align64_int8_t_uint64_t:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: std r3, 0(r4)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-PREP10-LABEL: st_cst_align64_int8_t_uint64_t:
+; CHECK-PREP10: # %bb.0: # %entry
+; CHECK-PREP10-NEXT: lis r4, 3725
+; CHECK-PREP10-NEXT: ori r4, r4, 19025
+; CHECK-PREP10-NEXT: rldic r4, r4, 12, 24
+; CHECK-PREP10-NEXT: std r3, 0(r4)
+; CHECK-PREP10-NEXT: blr
+entry:
+ %conv = sext i8 %str to i64
+ store i64 %conv, i64* inttoptr (i64 1000000000000 to i64*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_int8_t_float(i64 %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_0_int8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_0_int8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_0_int8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i8 %str to float
+ %0 = inttoptr i64 %ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_int8_t_float(i8* nocapture %ptr, i8 signext %str) {
+; CHECK-LABEL: st_align16_int8_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprwa f0, r4
+; CHECK-NEXT: xscvsxdsp f0, f0
+; CHECK-NEXT: stfs f0, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sitofp i8 %str to float
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_int8_t_float(i8* nocapture %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_align32_int8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: stfsx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align32_int8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: lis r4, 1525
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 56600
+; CHECK-P9-NEXT: stfsx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align32_int8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: lis r4, 1525
+; CHECK-P8-NEXT: ori r4, r4, 56600
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i8 %str to float
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_int8_t_float(i8* nocapture %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_align64_int8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: stfsx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align64_int8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stfsx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align64_int8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: stfsx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i8 %str to float
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_int8_t_float(i8* nocapture %ptr, i64 %off, i8 signext %str) {
+; CHECK-LABEL: st_reg_int8_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprwa f0, r5
+; CHECK-NEXT: xscvsxdsp f0, f0
+; CHECK-NEXT: stfsx f0, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = sitofp i8 %str to float
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_int8_t_float(i64 %ptr, i8 zeroext %off, i8 signext %str) {
+; CHECK-P10-LABEL: st_or1_int8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r5
+; CHECK-P10-NEXT: or r3, r4, r3
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_or1_int8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r5
+; CHECK-P9-NEXT: or r3, r4, r3
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_or1_int8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r5
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i8 %str to float
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_int8_t_float(i64 %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_not_disjoint16_int8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: ori r3, r3, 6
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint16_int8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: ori r3, r3, 6
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint16_int8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i8 %str to float
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_int8_t_float(i64 %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align16_int8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 24(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align16_int8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, 24(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align16_int8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = sitofp i8 %str to float
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_int8_t_float(i64 %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_not_disjoint32_int8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: ori r3, r3, 34463
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: oris r3, r3, 1
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint32_int8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: ori r3, r3, 34463
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: oris r3, r3, 1
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint32_int8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i8 %str to float
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_int8_t_float(i64 %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_int8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: stfsx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_int8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stfsx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_int8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = sitofp i8 %str to float
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_int8_t_float(i64 %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_int8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_int8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint64_int8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i8 %str to float
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_int8_t_float(i64 %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_int8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: stfsx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align64_int8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stfsx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align64_int8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: lis r5, 3725
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-NEXT: ori r4, r5, 19025
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: stfsx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = sitofp i8 %str to float
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to float*
+ store float %conv, float* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_int8_t_float(i8 signext %str) {
+; CHECK-LABEL: st_cst_align16_int8_t_float:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprwa f0, r3
+; CHECK-NEXT: xscvsxdsp f0, f0
+; CHECK-NEXT: stfs f0, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = sitofp i8 %str to float
+ store float %conv, float* inttoptr (i64 4080 to float*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_int8_t_float(i8 signext %str) {
+; CHECK-P10-LABEL: st_cst_align32_int8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r3
+; CHECK-P10-NEXT: lis r3, 153
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, -27108(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align32_int8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r3
+; CHECK-P9-NEXT: lis r3, 153
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: stfs f0, -27108(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align32_int8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i8 %str to float
+ store float %conv, float* inttoptr (i64 9999900 to float*), align 4
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_int8_t_float(i8 signext %str) {
+; CHECK-P10-LABEL: st_cst_align64_int8_t_float:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r3
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: xscvsxdsp f0, f0
+; CHECK-P10-NEXT: stfs f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align64_int8_t_float:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r3
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: xscvsxdsp f0, f0
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: stfs f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align64_int8_t_float:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: xscvsxdsp f0, f0
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: stfsx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i8 %str to float
+ store float %conv, float* inttoptr (i64 1000000000000 to float*), align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_int8_t_double(i64 %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_0_int8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_0_int8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_0_int8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i8 %str to double
+ %0 = inttoptr i64 %ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_int8_t_double(i8* nocapture %ptr, i8 signext %str) {
+; CHECK-LABEL: st_align16_int8_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprwa f0, r4
+; CHECK-NEXT: xscvsxddp f0, f0
+; CHECK-NEXT: stfd f0, 8(r3)
+; CHECK-NEXT: blr
+entry:
+ %conv = sitofp i8 %str to double
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_int8_t_double(i8* nocapture %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_align32_int8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: stfdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align32_int8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: lis r4, 1525
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 56600
+; CHECK-P9-NEXT: stfdx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align32_int8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: lis r4, 1525
+; CHECK-P8-NEXT: ori r4, r4, 56600
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i8 %str to double
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_int8_t_double(i8* nocapture %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_align64_int8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: stfdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align64_int8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stfdx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_align64_int8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: lis r4, 3725
+; CHECK-P8-NEXT: ori r4, r4, 19025
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: stfdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i8 %str to double
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_int8_t_double(i8* nocapture %ptr, i64 %off, i8 signext %str) {
+; CHECK-LABEL: st_reg_int8_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprwa f0, r5
+; CHECK-NEXT: xscvsxddp f0, f0
+; CHECK-NEXT: stfdx f0, r3, r4
+; CHECK-NEXT: blr
+entry:
+ %conv = sitofp i8 %str to double
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_int8_t_double(i64 %ptr, i8 zeroext %off, i8 signext %str) {
+; CHECK-P10-LABEL: st_or1_int8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r5
+; CHECK-P10-NEXT: or r3, r4, r3
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_or1_int8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r5
+; CHECK-P9-NEXT: or r3, r4, r3
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_or1_int8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r5
+; CHECK-P8-NEXT: or r3, r4, r3
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i8 %str to double
+ %conv1 = zext i8 %off to i64
+ %or = or i64 %conv1, %ptr
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_int8_t_double(i64 %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_not_disjoint16_int8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: ori r3, r3, 6
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint16_int8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: ori r3, r3, 6
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint16_int8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: ori r3, r3, 6
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i8 %str to double
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_int8_t_double(i64 %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align16_int8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 24(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align16_int8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, 24(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align16_int8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-NEXT: ori r3, r3, 24
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = sitofp i8 %str to double
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_int8_t_double(i64 %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_not_disjoint32_int8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: ori r3, r3, 34463
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: oris r3, r3, 1
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint32_int8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: ori r3, r3, 34463
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: oris r3, r3, 1
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint32_int8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: ori r3, r3, 34463
+; CHECK-P8-NEXT: oris r3, r3, 1
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i8 %str to double
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_int8_t_double(i64 %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_int8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: lis r5, -15264
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: and r3, r3, r5
+; CHECK-P10-NEXT: stfdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_int8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: lis r5, -15264
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: and r3, r3, r5
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stfdx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align32_int8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: lis r4, -15264
+; CHECK-P8-NEXT: lis r5, 15258
+; CHECK-P8-NEXT: and r3, r3, r4
+; CHECK-P8-NEXT: ori r4, r5, 41712
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %conv = sitofp i8 %str to double
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_int8_t_double(i64 %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_int8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_int8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_not_disjoint64_int8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: li r4, 29
+; CHECK-P8-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: oris r4, r4, 54437
+; CHECK-P8-NEXT: ori r4, r4, 4097
+; CHECK-P8-NEXT: or r3, r3, r4
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i8 %str to double
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_int8_t_double(i64 %ptr, i8 signext %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_int8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r4
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: stfdx f0, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align64_int8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r4
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stfdx f0, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_disjoint_align64_int8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r4
+; CHECK-P8-NEXT: lis r5, 3725
+; CHECK-P8-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-NEXT: ori r4, r5, 19025
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-NEXT: stfdx f0, r3, r4
+; CHECK-P8-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %conv = sitofp i8 %str to double
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to double*
+ store double %conv, double* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_int8_t_double(i8 signext %str) {
+; CHECK-LABEL: st_cst_align16_int8_t_double:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: mtfprwa f0, r3
+; CHECK-NEXT: xscvsxddp f0, f0
+; CHECK-NEXT: stfd f0, 4080(0)
+; CHECK-NEXT: blr
+entry:
+ %conv = sitofp i8 %str to double
+ store double %conv, double* inttoptr (i64 4080 to double*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_int8_t_double(i8 signext %str) {
+; CHECK-P10-LABEL: st_cst_align32_int8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r3
+; CHECK-P10-NEXT: lis r3, 153
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, -27108(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align32_int8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r3
+; CHECK-P9-NEXT: lis r3, 153
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: stfd f0, -27108(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align32_int8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: lis r3, 152
+; CHECK-P8-NEXT: ori r3, r3, 38428
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i8 %str to double
+ store double %conv, double* inttoptr (i64 9999900 to double*), align 8
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_int8_t_double(i8 signext %str) {
+; CHECK-P10-LABEL: st_cst_align64_int8_t_double:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: mtfprwa f0, r3
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: xscvsxddp f0, f0
+; CHECK-P10-NEXT: stfd f0, 0(r3)
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align64_int8_t_double:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: mtfprwa f0, r3
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: xscvsxddp f0, f0
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: stfd f0, 0(r3)
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LABEL: st_cst_align64_int8_t_double:
+; CHECK-P8: # %bb.0: # %entry
+; CHECK-P8-NEXT: mtfprwa f0, r3
+; CHECK-P8-NEXT: lis r3, 3725
+; CHECK-P8-NEXT: ori r3, r3, 19025
+; CHECK-P8-NEXT: xscvsxddp f0, f0
+; CHECK-P8-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-NEXT: stfdx f0, 0, r3
+; CHECK-P8-NEXT: blr
+entry:
+ %conv = sitofp i8 %str to double
+ store double %conv, double* inttoptr (i64 1000000000000 to double*), align 4096
+ ret void
+}
--- /dev/null
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-P10
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-P10
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-P9
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-P9
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK-P8-LE
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
+; RUN: -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \
+; RUN: < %s | FileCheck %s --check-prefixes=CHECK-P8-BE
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local <16 x i8> @ld_0_vector(i64 %ptr) {
+; CHECK-LABEL: ld_0_vector:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lxv v2, 0(r3)
+; CHECK-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_0_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lvx v2, 0, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_0_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lxvw4x v2, 0, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to <16 x i8>*
+ %1 = load <16 x i8>, <16 x i8>* %0, align 16
+ ret <16 x i8> %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local <16 x i8> @ld_unalign16_vector(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_unalign16_vector:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addi r3, r3, 1
+; CHECK-NEXT: lxvx v2, 0, r3
+; CHECK-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_unalign16_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: addi r3, r3, 1
+; CHECK-P8-LE-NEXT: lvx v2, 0, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_unalign16_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: addi r3, r3, 1
+; CHECK-P8-BE-NEXT: lxvw4x v2, 0, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1
+ %0 = bitcast i8* %add.ptr to <16 x i8>*
+ %1 = load <16 x i8>, <16 x i8>* %0, align 16
+ ret <16 x i8> %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local <16 x i8> @ld_align16_vector(i8* nocapture readonly %ptr) {
+; CHECK-LABEL: ld_align16_vector:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addi r3, r3, 8
+; CHECK-NEXT: lxvx v2, 0, r3
+; CHECK-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_align16_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: addi r3, r3, 8
+; CHECK-P8-LE-NEXT: lvx v2, 0, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_align16_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: addi r3, r3, 8
+; CHECK-P8-BE-NEXT: lxvw4x v2, 0, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to <16 x i8>*
+ %1 = load <16 x i8>, <16 x i8>* %0, align 16
+ ret <16 x i8> %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local <16 x i8> @ld_unalign32_vector(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_unalign32_vector:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999
+; CHECK-P10-NEXT: lxvx v2, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_unalign32_vector:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, 1
+; CHECK-P9-NEXT: ori r4, r4, 34463
+; CHECK-P9-NEXT: lxvx v2, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_unalign32_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 1
+; CHECK-P8-LE-NEXT: ori r4, r4, 34463
+; CHECK-P8-LE-NEXT: lvx v2, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_unalign32_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r4, 1
+; CHECK-P8-BE-NEXT: ori r4, r4, 34463
+; CHECK-P8-BE-NEXT: lxvw4x v2, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999
+ %0 = bitcast i8* %add.ptr to <16 x i8>*
+ %1 = load <16 x i8>, <16 x i8>* %0, align 16
+ ret <16 x i8> %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local <16 x i8> @ld_align32_vector(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align32_vector:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: lxvx v2, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_align32_vector:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, 1525
+; CHECK-P9-NEXT: ori r4, r4, 56600
+; CHECK-P9-NEXT: lxvx v2, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_align32_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 1525
+; CHECK-P8-LE-NEXT: ori r4, r4, 56600
+; CHECK-P8-LE-NEXT: lvx v2, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_align32_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r4, 1525
+; CHECK-P8-BE-NEXT: ori r4, r4, 56600
+; CHECK-P8-BE-NEXT: lxvw4x v2, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to <16 x i8>*
+ %1 = load <16 x i8>, <16 x i8>* %0, align 16
+ ret <16 x i8> %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local <16 x i8> @ld_unalign64_vector(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_unalign64_vector:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: lxvx v2, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_unalign64_vector:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: lxvx v2, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_unalign64_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: li r4, 29
+; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-LE-NEXT: oris r4, r4, 54437
+; CHECK-P8-LE-NEXT: ori r4, r4, 4097
+; CHECK-P8-LE-NEXT: lvx v2, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_unalign64_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4097
+; CHECK-P8-BE-NEXT: lxvw4x v2, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
+ %0 = bitcast i8* %add.ptr to <16 x i8>*
+ %1 = load <16 x i8>, <16 x i8>* %0, align 16
+ ret <16 x i8> %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local <16 x i8> @ld_align64_vector(i8* nocapture readonly %ptr) {
+; CHECK-P10-LABEL: ld_align64_vector:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lxvx v2, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_align64_vector:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: lxvx v2, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_align64_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 3725
+; CHECK-P8-LE-NEXT: ori r4, r4, 19025
+; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-LE-NEXT: lvx v2, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_align64_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r4, 3725
+; CHECK-P8-BE-NEXT: ori r4, r4, 19025
+; CHECK-P8-BE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-BE-NEXT: lxvw4x v2, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to <16 x i8>*
+ %1 = load <16 x i8>, <16 x i8>* %0, align 16
+ ret <16 x i8> %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local <16 x i8> @ld_reg_vector(i8* nocapture readonly %ptr, i64 %off) {
+; CHECK-LABEL: ld_reg_vector:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lxvx v2, r3, r4
+; CHECK-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_reg_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lvx v2, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_reg_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lxvw4x v2, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to <16 x i8>*
+ %1 = load <16 x i8>, <16 x i8>* %0, align 16
+ ret <16 x i8> %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local <16 x i8> @ld_or_vector(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or_vector:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: lxvx v2, 0, r3
+; CHECK-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_or_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: or r3, r4, r3
+; CHECK-P8-LE-NEXT: lvx v2, 0, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_or_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: or r3, r4, r3
+; CHECK-P8-BE-NEXT: lxvw4x v2, 0, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to <16 x i8>*
+ %1 = load <16 x i8>, <16 x i8>* %0, align 16
+ ret <16 x i8> %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local <16 x i8> @ld_or2_vector(i64 %ptr, i8 zeroext %off) {
+; CHECK-LABEL: ld_or2_vector:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: lxvx v2, r3, r4
+; CHECK-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_or2_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-LE-NEXT: lvx v2, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_or2_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-BE-NEXT: lxvw4x v2, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = zext i8 %off to i64
+ %or = or i64 %and, %conv
+ %0 = inttoptr i64 %or to <16 x i8>*
+ %1 = load <16 x i8>, <16 x i8>* %0, align 16
+ ret <16 x i8> %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local <16 x i8> @ld_not_disjoint16_vector(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint16_vector:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lxvx v2, 0, r3
+; CHECK-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_not_disjoint16_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: ori r3, r3, 6
+; CHECK-P8-LE-NEXT: lvx v2, 0, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_not_disjoint16_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: ori r3, r3, 6
+; CHECK-P8-BE-NEXT: lxvw4x v2, 0, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to <16 x i8>*
+ %1 = load <16 x i8>, <16 x i8>* %0, align 16
+ ret <16 x i8> %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local <16 x i8> @ld_disjoint_unalign16_vector(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_unalign16_vector:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: lxvx v2, 0, r3
+; CHECK-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_disjoint_unalign16_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-LE-NEXT: ori r3, r3, 6
+; CHECK-P8-LE-NEXT: lvx v2, 0, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_disjoint_unalign16_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-BE-NEXT: ori r3, r3, 6
+; CHECK-P8-BE-NEXT: lxvw4x v2, 0, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 6
+ %0 = inttoptr i64 %or to <16 x i8>*
+ %1 = load <16 x i8>, <16 x i8>* %0, align 16
+ ret <16 x i8> %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local <16 x i8> @ld_disjoint_align16_vector(i64 %ptr) {
+; CHECK-LABEL: ld_disjoint_align16_vector:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: ori r3, r3, 24
+; CHECK-NEXT: lxvx v2, 0, r3
+; CHECK-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_disjoint_align16_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-LE-NEXT: ori r3, r3, 24
+; CHECK-P8-LE-NEXT: lvx v2, 0, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_disjoint_align16_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-BE-NEXT: ori r3, r3, 24
+; CHECK-P8-BE-NEXT: lxvw4x v2, 0, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to <16 x i8>*
+ %1 = load <16 x i8>, <16 x i8>* %0, align 16
+ ret <16 x i8> %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local <16 x i8> @ld_not_disjoint32_vector(i64 %ptr) {
+; CHECK-LABEL: ld_not_disjoint32_vector:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: lxvx v2, 0, r3
+; CHECK-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_not_disjoint32_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: ori r3, r3, 34463
+; CHECK-P8-LE-NEXT: oris r3, r3, 1
+; CHECK-P8-LE-NEXT: lvx v2, 0, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_not_disjoint32_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: ori r3, r3, 34463
+; CHECK-P8-BE-NEXT: oris r3, r3, 1
+; CHECK-P8-BE-NEXT: lxvw4x v2, 0, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to <16 x i8>*
+ %1 = load <16 x i8>, <16 x i8>* %0, align 16
+ ret <16 x i8> %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local <16 x i8> @ld_disjoint_unalign32_vector(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_unalign32_vector:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
+; CHECK-P10-NEXT: pli r4, 99999
+; CHECK-P10-NEXT: lxvx v2, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_unalign32_vector:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, 1
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 43
+; CHECK-P9-NEXT: ori r4, r4, 34463
+; CHECK-P9-NEXT: lxvx v2, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_disjoint_unalign32_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 1
+; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 43
+; CHECK-P8-LE-NEXT: ori r4, r4, 34463
+; CHECK-P8-LE-NEXT: lvx v2, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_disjoint_unalign32_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r4, 1
+; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 43
+; CHECK-P8-BE-NEXT: ori r4, r4, 34463
+; CHECK-P8-BE-NEXT: lxvw4x v2, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1048576
+ %or = or i64 %and, 99999
+ %0 = inttoptr i64 %or to <16 x i8>*
+ %1 = load <16 x i8>, <16 x i8>* %0, align 16
+ ret <16 x i8> %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local <16 x i8> @ld_disjoint_align32_vector(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align32_vector:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: lxvx v2, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align32_vector:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: lxvx v2, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_disjoint_align32_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, -15264
+; CHECK-P8-LE-NEXT: lis r5, 15258
+; CHECK-P8-LE-NEXT: and r3, r3, r4
+; CHECK-P8-LE-NEXT: ori r4, r5, 41712
+; CHECK-P8-LE-NEXT: lvx v2, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_disjoint_align32_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r4, -15264
+; CHECK-P8-BE-NEXT: lis r5, 15258
+; CHECK-P8-BE-NEXT: and r3, r3, r4
+; CHECK-P8-BE-NEXT: ori r4, r5, 41712
+; CHECK-P8-BE-NEXT: lxvw4x v2, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to <16 x i8>*
+ %1 = load <16 x i8>, <16 x i8>* %0, align 16
+ ret <16 x i8> %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local <16 x i8> @ld_not_disjoint64_vector(i64 %ptr) {
+; CHECK-P10-LABEL: ld_not_disjoint64_vector:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: lxvx v2, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_not_disjoint64_vector:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: lxvx v2, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_not_disjoint64_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: li r4, 29
+; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-LE-NEXT: oris r4, r4, 54437
+; CHECK-P8-LE-NEXT: ori r4, r4, 4097
+; CHECK-P8-LE-NEXT: or r3, r3, r4
+; CHECK-P8-LE-NEXT: lvx v2, 0, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_not_disjoint64_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4097
+; CHECK-P8-BE-NEXT: or r3, r3, r4
+; CHECK-P8-BE-NEXT: lxvw4x v2, 0, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to <16 x i8>*
+ %1 = load <16 x i8>, <16 x i8>* %0, align 16
+ ret <16 x i8> %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local <16 x i8> @ld_disjoint_unalign64_vector(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_unalign64_vector:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: lxvx v2, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_unalign64_vector:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: lxvx v2, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_disjoint_unalign64_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: li r4, 29
+; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-LE-NEXT: oris r4, r4, 54437
+; CHECK-P8-LE-NEXT: ori r4, r4, 4097
+; CHECK-P8-LE-NEXT: lvx v2, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_disjoint_unalign64_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4097
+; CHECK-P8-BE-NEXT: lxvw4x v2, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000001
+ %0 = inttoptr i64 %or to <16 x i8>*
+ %1 = load <16 x i8>, <16 x i8>* %0, align 16
+ ret <16 x i8> %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local <16 x i8> @ld_disjoint_align64_vector(i64 %ptr) {
+; CHECK-P10-LABEL: ld_disjoint_align64_vector:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: lxvx v2, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_disjoint_align64_vector:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: lxvx v2, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_disjoint_align64_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 3725
+; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-LE-NEXT: ori r4, r4, 19025
+; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-LE-NEXT: lvx v2, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_disjoint_align64_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r4, 3725
+; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-BE-NEXT: ori r4, r4, 19025
+; CHECK-P8-BE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-BE-NEXT: lxvw4x v2, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to <16 x i8>*
+ %1 = load <16 x i8>, <16 x i8>* %0, align 4096
+ ret <16 x i8> %1
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local <16 x i8> @ld_cst_unalign16_vector() {
+; CHECK-LABEL: ld_cst_unalign16_vector:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: li r3, 255
+; CHECK-NEXT: lxvx v2, 0, r3
+; CHECK-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_cst_unalign16_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: li r3, 255
+; CHECK-P8-LE-NEXT: lvx v2, 0, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_cst_unalign16_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r3, 255
+; CHECK-P8-BE-NEXT: lxvw4x v2, 0, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %0 = load <16 x i8>, <16 x i8>* inttoptr (i64 255 to <16 x i8>*), align 16
+ ret <16 x i8> %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local <16 x i8> @ld_cst_align16_vector() {
+; CHECK-LABEL: ld_cst_align16_vector:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: lxv v2, 4080(0)
+; CHECK-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_cst_align16_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: li r3, 4080
+; CHECK-P8-LE-NEXT: lvx v2, 0, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_cst_align16_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r3, 4080
+; CHECK-P8-BE-NEXT: lxvw4x v2, 0, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %0 = load <16 x i8>, <16 x i8>* inttoptr (i64 4080 to <16 x i8>*), align 16
+ ret <16 x i8> %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local <16 x i8> @ld_cst_unalign32_vector() {
+; CHECK-P10-LABEL: ld_cst_unalign32_vector:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 99999
+; CHECK-P10-NEXT: lxvx v2, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_unalign32_vector:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 1
+; CHECK-P9-NEXT: ori r3, r3, 34463
+; CHECK-P9-NEXT: lxvx v2, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_cst_unalign32_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r3, 1
+; CHECK-P8-LE-NEXT: ori r3, r3, 34463
+; CHECK-P8-LE-NEXT: lvx v2, 0, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_cst_unalign32_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r3, 1
+; CHECK-P8-BE-NEXT: ori r3, r3, 34463
+; CHECK-P8-BE-NEXT: lxvw4x v2, 0, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %0 = load <16 x i8>, <16 x i8>* inttoptr (i64 99999 to <16 x i8>*), align 16
+ ret <16 x i8> %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local <16 x i8> @ld_cst_align32_vector() {
+; CHECK-P10-LABEL: ld_cst_align32_vector:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 9999900
+; CHECK-P10-NEXT: lxvx v2, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align32_vector:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 152
+; CHECK-P9-NEXT: ori r3, r3, 38428
+; CHECK-P9-NEXT: lxvx v2, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_cst_align32_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r3, 152
+; CHECK-P8-LE-NEXT: ori r3, r3, 38428
+; CHECK-P8-LE-NEXT: lvx v2, 0, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_cst_align32_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r3, 152
+; CHECK-P8-BE-NEXT: ori r3, r3, 38428
+; CHECK-P8-BE-NEXT: lxvw4x v2, 0, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %0 = load <16 x i8>, <16 x i8>* inttoptr (i64 9999900 to <16 x i8>*), align 16
+ ret <16 x i8> %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local <16 x i8> @ld_cst_unalign64_vector() {
+; CHECK-P10-LABEL: ld_cst_unalign64_vector:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 232
+; CHECK-P10-NEXT: pli r4, 3567587329
+; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
+; CHECK-P10-NEXT: lxvx v2, 0, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_unalign64_vector:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r3, 29
+; CHECK-P9-NEXT: rldic r3, r3, 35, 24
+; CHECK-P9-NEXT: oris r3, r3, 54437
+; CHECK-P9-NEXT: ori r3, r3, 4097
+; CHECK-P9-NEXT: lxvx v2, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_cst_unalign64_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: li r3, 29
+; CHECK-P8-LE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P8-LE-NEXT: oris r3, r3, 54437
+; CHECK-P8-LE-NEXT: ori r3, r3, 4097
+; CHECK-P8-LE-NEXT: lvx v2, 0, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_cst_unalign64_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r3, 29
+; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P8-BE-NEXT: oris r3, r3, 54437
+; CHECK-P8-BE-NEXT: ori r3, r3, 4097
+; CHECK-P8-BE-NEXT: lxvw4x v2, 0, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %0 = load <16 x i8>, <16 x i8>* inttoptr (i64 1000000000001 to <16 x i8>*), align 16
+ ret <16 x i8> %0
+}
+
+; Function Attrs: norecurse nounwind readonly uwtable willreturn
+define dso_local <16 x i8> @ld_cst_align64_vector() {
+; CHECK-P10-LABEL: ld_cst_align64_vector:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: lxvx v2, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: ld_cst_align64_vector:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: lxvx v2, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: ld_cst_align64_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r3, 3725
+; CHECK-P8-LE-NEXT: ori r3, r3, 19025
+; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-LE-NEXT: lvx v2, 0, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: ld_cst_align64_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r3, 3725
+; CHECK-P8-BE-NEXT: ori r3, r3, 19025
+; CHECK-P8-BE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-BE-NEXT: lxvw4x v2, 0, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %0 = load <16 x i8>, <16 x i8>* inttoptr (i64 1000000000000 to <16 x i8>*), align 4096
+ ret <16 x i8> %0
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_0_vector(i64 %ptr, <16 x i8> %str) {
+; CHECK-LABEL: st_0_vector:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stxv v2, 0(r3)
+; CHECK-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: st_0_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: stvx v2, 0, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: st_0_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: stxvw4x v2, 0, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %0 = inttoptr i64 %ptr to <16 x i8>*
+ store <16 x i8> %str, <16 x i8>* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_unalign16_vector(i8* nocapture %ptr, <16 x i8> %str) {
+; CHECK-LABEL: st_unalign16_vector:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addi r3, r3, 1
+; CHECK-NEXT: stxvx v2, 0, r3
+; CHECK-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: st_unalign16_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: addi r3, r3, 1
+; CHECK-P8-LE-NEXT: stvx v2, 0, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: st_unalign16_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: addi r3, r3, 1
+; CHECK-P8-BE-NEXT: stxvw4x v2, 0, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1
+ %0 = bitcast i8* %add.ptr to <16 x i8>*
+ store <16 x i8> %str, <16 x i8>* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align16_vector(i8* nocapture %ptr, <16 x i8> %str) {
+; CHECK-LABEL: st_align16_vector:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: addi r3, r3, 8
+; CHECK-NEXT: stxvx v2, 0, r3
+; CHECK-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: st_align16_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: addi r3, r3, 8
+; CHECK-P8-LE-NEXT: stvx v2, 0, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: st_align16_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: addi r3, r3, 8
+; CHECK-P8-BE-NEXT: stxvw4x v2, 0, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 8
+ %0 = bitcast i8* %add.ptr to <16 x i8>*
+ store <16 x i8> %str, <16 x i8>* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_unalign32_vector(i8* nocapture %ptr, <16 x i8> %str) {
+; CHECK-P10-LABEL: st_unalign32_vector:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999
+; CHECK-P10-NEXT: stxvx v2, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_unalign32_vector:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, 1
+; CHECK-P9-NEXT: ori r4, r4, 34463
+; CHECK-P9-NEXT: stxvx v2, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: st_unalign32_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 1
+; CHECK-P8-LE-NEXT: ori r4, r4, 34463
+; CHECK-P8-LE-NEXT: stvx v2, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: st_unalign32_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r4, 1
+; CHECK-P8-BE-NEXT: ori r4, r4, 34463
+; CHECK-P8-BE-NEXT: stxvw4x v2, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999
+ %0 = bitcast i8* %add.ptr to <16 x i8>*
+ store <16 x i8> %str, <16 x i8>* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align32_vector(i8* nocapture %ptr, <16 x i8> %str) {
+; CHECK-P10-LABEL: st_align32_vector:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 99999000
+; CHECK-P10-NEXT: stxvx v2, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align32_vector:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, 1525
+; CHECK-P9-NEXT: ori r4, r4, 56600
+; CHECK-P9-NEXT: stxvx v2, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: st_align32_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 1525
+; CHECK-P8-LE-NEXT: ori r4, r4, 56600
+; CHECK-P8-LE-NEXT: stvx v2, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: st_align32_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r4, 1525
+; CHECK-P8-BE-NEXT: ori r4, r4, 56600
+; CHECK-P8-BE-NEXT: stxvw4x v2, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 99999000
+ %0 = bitcast i8* %add.ptr to <16 x i8>*
+ store <16 x i8> %str, <16 x i8>* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_unalign64_vector(i8* nocapture %ptr, <16 x i8> %str) {
+; CHECK-P10-LABEL: st_unalign64_vector:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: stxvx v2, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_unalign64_vector:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: stxvx v2, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: st_unalign64_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: li r4, 29
+; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-LE-NEXT: oris r4, r4, 54437
+; CHECK-P8-LE-NEXT: ori r4, r4, 4097
+; CHECK-P8-LE-NEXT: stvx v2, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: st_unalign64_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4097
+; CHECK-P8-BE-NEXT: stxvw4x v2, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000001
+ %0 = bitcast i8* %add.ptr to <16 x i8>*
+ store <16 x i8> %str, <16 x i8>* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_align64_vector(i8* nocapture %ptr, <16 x i8> %str) {
+; CHECK-P10-LABEL: st_align64_vector:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stxvx v2, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_align64_vector:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stxvx v2, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: st_align64_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 3725
+; CHECK-P8-LE-NEXT: ori r4, r4, 19025
+; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-LE-NEXT: stvx v2, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: st_align64_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r4, 3725
+; CHECK-P8-BE-NEXT: ori r4, r4, 19025
+; CHECK-P8-BE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-BE-NEXT: stxvw4x v2, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 1000000000000
+ %0 = bitcast i8* %add.ptr to <16 x i8>*
+ store <16 x i8> %str, <16 x i8>* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_reg_vector(i8* nocapture %ptr, i64 %off, <16 x i8> %str) {
+; CHECK-LABEL: st_reg_vector:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stxvx v2, r3, r4
+; CHECK-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: st_reg_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: stvx v2, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: st_reg_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: stxvw4x v2, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %add.ptr = getelementptr inbounds i8, i8* %ptr, i64 %off
+ %0 = bitcast i8* %add.ptr to <16 x i8>*
+ store <16 x i8> %str, <16 x i8>* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or1_vector(i64 %ptr, i8 zeroext %off, <16 x i8> %str) {
+; CHECK-LABEL: st_or1_vector:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: or r3, r4, r3
+; CHECK-NEXT: stxvx v2, 0, r3
+; CHECK-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: st_or1_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: or r3, r4, r3
+; CHECK-P8-LE-NEXT: stvx v2, 0, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: st_or1_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: or r3, r4, r3
+; CHECK-P8-BE-NEXT: stxvw4x v2, 0, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %conv = zext i8 %off to i64
+ %or = or i64 %conv, %ptr
+ %0 = inttoptr i64 %or to <16 x i8>*
+ store <16 x i8> %str, <16 x i8>* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_or2_vector(i64 %ptr, i8 zeroext %off, <16 x i8> %str) {
+; CHECK-LABEL: st_or2_vector:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: stxvx v2, r3, r4
+; CHECK-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: st_or2_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-LE-NEXT: stvx v2, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: st_or2_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-BE-NEXT: stxvw4x v2, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %conv = zext i8 %off to i64
+ %or = or i64 %and, %conv
+ %0 = inttoptr i64 %or to <16 x i8>*
+ store <16 x i8> %str, <16 x i8>* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint16_vector(i64 %ptr, <16 x i8> %str) {
+; CHECK-LABEL: st_not_disjoint16_vector:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: stxvx v2, 0, r3
+; CHECK-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: st_not_disjoint16_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: ori r3, r3, 6
+; CHECK-P8-LE-NEXT: stvx v2, 0, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: st_not_disjoint16_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: ori r3, r3, 6
+; CHECK-P8-BE-NEXT: stxvw4x v2, 0, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 6
+ %0 = inttoptr i64 %or to <16 x i8>*
+ store <16 x i8> %str, <16 x i8>* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_unalign16_vector(i64 %ptr, <16 x i8> %str) {
+; CHECK-LABEL: st_disjoint_unalign16_vector:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: ori r3, r3, 6
+; CHECK-NEXT: stxvx v2, 0, r3
+; CHECK-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: st_disjoint_unalign16_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-LE-NEXT: ori r3, r3, 6
+; CHECK-P8-LE-NEXT: stvx v2, 0, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: st_disjoint_unalign16_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-BE-NEXT: ori r3, r3, 6
+; CHECK-P8-BE-NEXT: stxvw4x v2, 0, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 6
+ %0 = inttoptr i64 %or to <16 x i8>*
+ store <16 x i8> %str, <16 x i8>* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align16_vector(i64 %ptr, <16 x i8> %str) {
+; CHECK-LABEL: st_disjoint_align16_vector:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rldicr r3, r3, 0, 51
+; CHECK-NEXT: ori r3, r3, 24
+; CHECK-NEXT: stxvx v2, 0, r3
+; CHECK-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: st_disjoint_align16_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-LE-NEXT: ori r3, r3, 24
+; CHECK-P8-LE-NEXT: stvx v2, 0, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: st_disjoint_align16_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 51
+; CHECK-P8-BE-NEXT: ori r3, r3, 24
+; CHECK-P8-BE-NEXT: stxvw4x v2, 0, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -4096
+ %or = or i64 %and, 24
+ %0 = inttoptr i64 %or to <16 x i8>*
+ store <16 x i8> %str, <16 x i8>* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint32_vector(i64 %ptr, <16 x i8> %str) {
+; CHECK-LABEL: st_not_disjoint32_vector:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: ori r3, r3, 34463
+; CHECK-NEXT: oris r3, r3, 1
+; CHECK-NEXT: stxvx v2, 0, r3
+; CHECK-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: st_not_disjoint32_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: ori r3, r3, 34463
+; CHECK-P8-LE-NEXT: oris r3, r3, 1
+; CHECK-P8-LE-NEXT: stvx v2, 0, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: st_not_disjoint32_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: ori r3, r3, 34463
+; CHECK-P8-BE-NEXT: oris r3, r3, 1
+; CHECK-P8-BE-NEXT: stxvw4x v2, 0, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 99999
+ %0 = inttoptr i64 %or to <16 x i8>*
+ store <16 x i8> %str, <16 x i8>* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_unalign32_vector(i64 %ptr, <16 x i8> %str) {
+; CHECK-P10-LABEL: st_disjoint_unalign32_vector:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 43
+; CHECK-P10-NEXT: pli r4, 99999
+; CHECK-P10-NEXT: stxvx v2, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_unalign32_vector:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, 1
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 43
+; CHECK-P9-NEXT: ori r4, r4, 34463
+; CHECK-P9-NEXT: stxvx v2, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: st_disjoint_unalign32_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 1
+; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 43
+; CHECK-P8-LE-NEXT: ori r4, r4, 34463
+; CHECK-P8-LE-NEXT: stvx v2, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: st_disjoint_unalign32_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r4, 1
+; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 43
+; CHECK-P8-BE-NEXT: ori r4, r4, 34463
+; CHECK-P8-BE-NEXT: stxvw4x v2, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1048576
+ %or = or i64 %and, 99999
+ %0 = inttoptr i64 %or to <16 x i8>*
+ store <16 x i8> %str, <16 x i8>* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align32_vector(i64 %ptr, <16 x i8> %str) {
+; CHECK-P10-LABEL: st_disjoint_align32_vector:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: lis r4, -15264
+; CHECK-P10-NEXT: and r3, r3, r4
+; CHECK-P10-NEXT: pli r4, 999990000
+; CHECK-P10-NEXT: stxvx v2, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align32_vector:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, -15264
+; CHECK-P9-NEXT: and r3, r3, r4
+; CHECK-P9-NEXT: lis r4, 15258
+; CHECK-P9-NEXT: ori r4, r4, 41712
+; CHECK-P9-NEXT: stxvx v2, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: st_disjoint_align32_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, -15264
+; CHECK-P8-LE-NEXT: lis r5, 15258
+; CHECK-P8-LE-NEXT: and r3, r3, r4
+; CHECK-P8-LE-NEXT: ori r4, r5, 41712
+; CHECK-P8-LE-NEXT: stvx v2, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: st_disjoint_align32_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r4, -15264
+; CHECK-P8-BE-NEXT: lis r5, 15258
+; CHECK-P8-BE-NEXT: and r3, r3, r4
+; CHECK-P8-BE-NEXT: ori r4, r5, 41712
+; CHECK-P8-BE-NEXT: stxvw4x v2, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1000341504
+ %or = or i64 %and, 999990000
+ %0 = inttoptr i64 %or to <16 x i8>*
+ store <16 x i8> %str, <16 x i8>* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_not_disjoint64_vector(i64 %ptr, <16 x i8> %str) {
+; CHECK-P10-LABEL: st_not_disjoint64_vector:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: or r3, r3, r5
+; CHECK-P10-NEXT: stxvx v2, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_not_disjoint64_vector:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: or r3, r3, r4
+; CHECK-P9-NEXT: stxvx v2, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: st_not_disjoint64_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: li r4, 29
+; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-LE-NEXT: oris r4, r4, 54437
+; CHECK-P8-LE-NEXT: ori r4, r4, 4097
+; CHECK-P8-LE-NEXT: or r3, r3, r4
+; CHECK-P8-LE-NEXT: stvx v2, 0, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: st_not_disjoint64_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4097
+; CHECK-P8-BE-NEXT: or r3, r3, r4
+; CHECK-P8-BE-NEXT: stxvw4x v2, 0, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %or = or i64 %ptr, 1000000000001
+ %0 = inttoptr i64 %or to <16 x i8>*
+ store <16 x i8> %str, <16 x i8>* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_unalign64_vector(i64 %ptr, <16 x i8> %str) {
+; CHECK-P10-LABEL: st_disjoint_unalign64_vector:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 232
+; CHECK-P10-NEXT: pli r5, 3567587329
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldimi r5, r4, 32, 0
+; CHECK-P10-NEXT: stxvx v2, r3, r5
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_unalign64_vector:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r4, 29
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: rldic r4, r4, 35, 24
+; CHECK-P9-NEXT: oris r4, r4, 54437
+; CHECK-P9-NEXT: ori r4, r4, 4097
+; CHECK-P9-NEXT: stxvx v2, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: st_disjoint_unalign64_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: li r4, 29
+; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-LE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-LE-NEXT: oris r4, r4, 54437
+; CHECK-P8-LE-NEXT: ori r4, r4, 4097
+; CHECK-P8-LE-NEXT: stvx v2, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: st_disjoint_unalign64_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r4, 29
+; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-BE-NEXT: rldic r4, r4, 35, 24
+; CHECK-P8-BE-NEXT: oris r4, r4, 54437
+; CHECK-P8-BE-NEXT: ori r4, r4, 4097
+; CHECK-P8-BE-NEXT: stxvw4x v2, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000001
+ %0 = inttoptr i64 %or to <16 x i8>*
+ store <16 x i8> %str, <16 x i8>* %0, align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_disjoint_align64_vector(i64 %ptr, <16 x i8> %str) {
+; CHECK-P10-LABEL: st_disjoint_align64_vector:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r4, 244140625
+; CHECK-P10-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P10-NEXT: rldic r4, r4, 12, 24
+; CHECK-P10-NEXT: stxvx v2, r3, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_disjoint_align64_vector:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r4, 3725
+; CHECK-P9-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P9-NEXT: ori r4, r4, 19025
+; CHECK-P9-NEXT: rldic r4, r4, 12, 24
+; CHECK-P9-NEXT: stxvx v2, r3, r4
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: st_disjoint_align64_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r4, 3725
+; CHECK-P8-LE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-LE-NEXT: ori r4, r4, 19025
+; CHECK-P8-LE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-LE-NEXT: stvx v2, r3, r4
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: st_disjoint_align64_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r4, 3725
+; CHECK-P8-BE-NEXT: rldicr r3, r3, 0, 23
+; CHECK-P8-BE-NEXT: ori r4, r4, 19025
+; CHECK-P8-BE-NEXT: rldic r4, r4, 12, 24
+; CHECK-P8-BE-NEXT: stxvw4x v2, r3, r4
+; CHECK-P8-BE-NEXT: blr
+entry:
+ %and = and i64 %ptr, -1099511627776
+ %or = or i64 %and, 1000000000000
+ %0 = inttoptr i64 %or to <16 x i8>*
+ store <16 x i8> %str, <16 x i8>* %0, align 4096
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_unalign16_vector(<16 x i8> %str) {
+; CHECK-LABEL: st_cst_unalign16_vector:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: li r3, 255
+; CHECK-NEXT: stxvx v2, 0, r3
+; CHECK-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: st_cst_unalign16_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: li r3, 255
+; CHECK-P8-LE-NEXT: stvx v2, 0, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: st_cst_unalign16_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r3, 255
+; CHECK-P8-BE-NEXT: stxvw4x v2, 0, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ store <16 x i8> %str, <16 x i8>* inttoptr (i64 255 to <16 x i8>*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align16_vector(<16 x i8> %str) {
+; CHECK-LABEL: st_cst_align16_vector:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: stxv v2, 4080(0)
+; CHECK-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: st_cst_align16_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: li r3, 4080
+; CHECK-P8-LE-NEXT: stvx v2, 0, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: st_cst_align16_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r3, 4080
+; CHECK-P8-BE-NEXT: stxvw4x v2, 0, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ store <16 x i8> %str, <16 x i8>* inttoptr (i64 4080 to <16 x i8>*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_unalign32_vector(<16 x i8> %str) {
+; CHECK-P10-LABEL: st_cst_unalign32_vector:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 99999
+; CHECK-P10-NEXT: stxvx v2, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_unalign32_vector:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 1
+; CHECK-P9-NEXT: ori r3, r3, 34463
+; CHECK-P9-NEXT: stxvx v2, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: st_cst_unalign32_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r3, 1
+; CHECK-P8-LE-NEXT: ori r3, r3, 34463
+; CHECK-P8-LE-NEXT: stvx v2, 0, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: st_cst_unalign32_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r3, 1
+; CHECK-P8-BE-NEXT: ori r3, r3, 34463
+; CHECK-P8-BE-NEXT: stxvw4x v2, 0, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ store <16 x i8> %str, <16 x i8>* inttoptr (i64 99999 to <16 x i8>*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align32_vector(<16 x i8> %str) {
+; CHECK-P10-LABEL: st_cst_align32_vector:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 9999900
+; CHECK-P10-NEXT: stxvx v2, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align32_vector:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 152
+; CHECK-P9-NEXT: ori r3, r3, 38428
+; CHECK-P9-NEXT: stxvx v2, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: st_cst_align32_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r3, 152
+; CHECK-P8-LE-NEXT: ori r3, r3, 38428
+; CHECK-P8-LE-NEXT: stvx v2, 0, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: st_cst_align32_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r3, 152
+; CHECK-P8-BE-NEXT: ori r3, r3, 38428
+; CHECK-P8-BE-NEXT: stxvw4x v2, 0, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ store <16 x i8> %str, <16 x i8>* inttoptr (i64 9999900 to <16 x i8>*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_unalign64_vector(<16 x i8> %str) {
+; CHECK-P10-LABEL: st_cst_unalign64_vector:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 232
+; CHECK-P10-NEXT: pli r4, 3567587329
+; CHECK-P10-NEXT: rldimi r4, r3, 32, 0
+; CHECK-P10-NEXT: stxvx v2, 0, r4
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_unalign64_vector:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: li r3, 29
+; CHECK-P9-NEXT: rldic r3, r3, 35, 24
+; CHECK-P9-NEXT: oris r3, r3, 54437
+; CHECK-P9-NEXT: ori r3, r3, 4097
+; CHECK-P9-NEXT: stxvx v2, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: st_cst_unalign64_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: li r3, 29
+; CHECK-P8-LE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P8-LE-NEXT: oris r3, r3, 54437
+; CHECK-P8-LE-NEXT: ori r3, r3, 4097
+; CHECK-P8-LE-NEXT: stvx v2, 0, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: st_cst_unalign64_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: li r3, 29
+; CHECK-P8-BE-NEXT: rldic r3, r3, 35, 24
+; CHECK-P8-BE-NEXT: oris r3, r3, 54437
+; CHECK-P8-BE-NEXT: ori r3, r3, 4097
+; CHECK-P8-BE-NEXT: stxvw4x v2, 0, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ store <16 x i8> %str, <16 x i8>* inttoptr (i64 1000000000001 to <16 x i8>*), align 16
+ ret void
+}
+
+; Function Attrs: nofree norecurse nounwind uwtable willreturn writeonly
+define dso_local void @st_cst_align64_vector(<16 x i8> %str) {
+; CHECK-P10-LABEL: st_cst_align64_vector:
+; CHECK-P10: # %bb.0: # %entry
+; CHECK-P10-NEXT: pli r3, 244140625
+; CHECK-P10-NEXT: rldic r3, r3, 12, 24
+; CHECK-P10-NEXT: stxvx v2, 0, r3
+; CHECK-P10-NEXT: blr
+;
+; CHECK-P9-LABEL: st_cst_align64_vector:
+; CHECK-P9: # %bb.0: # %entry
+; CHECK-P9-NEXT: lis r3, 3725
+; CHECK-P9-NEXT: ori r3, r3, 19025
+; CHECK-P9-NEXT: rldic r3, r3, 12, 24
+; CHECK-P9-NEXT: stxvx v2, 0, r3
+; CHECK-P9-NEXT: blr
+;
+; CHECK-P8-LE-LABEL: st_cst_align64_vector:
+; CHECK-P8-LE: # %bb.0: # %entry
+; CHECK-P8-LE-NEXT: lis r3, 3725
+; CHECK-P8-LE-NEXT: ori r3, r3, 19025
+; CHECK-P8-LE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-LE-NEXT: stvx v2, 0, r3
+; CHECK-P8-LE-NEXT: blr
+;
+; CHECK-P8-BE-LABEL: st_cst_align64_vector:
+; CHECK-P8-BE: # %bb.0: # %entry
+; CHECK-P8-BE-NEXT: lis r3, 3725
+; CHECK-P8-BE-NEXT: ori r3, r3, 19025
+; CHECK-P8-BE-NEXT: rldic r3, r3, 12, 24
+; CHECK-P8-BE-NEXT: stxvw4x v2, 0, r3
+; CHECK-P8-BE-NEXT: blr
+entry:
+ store <16 x i8> %str, <16 x i8>* inttoptr (i64 1000000000000 to <16 x i8>*), align 4096
+ ret void
+}