forked from OSchip/llvm-project
8439 lines
276 KiB
LLVM
8439 lines
276 KiB
LLVM
; 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-LABEL: ld_0_int64_t_float:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: lfs f0, 0(r3)
|
|
; CHECK-NEXT: xscvdpsxds f0, f0
|
|
; CHECK-NEXT: mffprd r3, f0
|
|
; CHECK-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: plfs f0, 99999000(r3), 0
|
|
; 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-LABEL: ld_or_int64_t_float:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: or r3, r4, r3
|
|
; CHECK-NEXT: lfs f0, 0(r3)
|
|
; CHECK-NEXT: xscvdpsxds f0, f0
|
|
; CHECK-NEXT: mffprd r3, f0
|
|
; CHECK-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-LABEL: ld_not_disjoint16_int64_t_float:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: ori r3, r3, 6
|
|
; CHECK-NEXT: lfs f0, 0(r3)
|
|
; CHECK-NEXT: xscvdpsxds f0, f0
|
|
; CHECK-NEXT: mffprd r3, f0
|
|
; CHECK-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-LABEL: ld_disjoint_align16_int64_t_float:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: rldicr r3, r3, 0, 51
|
|
; CHECK-NEXT: lfs f0, 24(r3)
|
|
; CHECK-NEXT: xscvdpsxds f0, f0
|
|
; CHECK-NEXT: mffprd r3, f0
|
|
; CHECK-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-LABEL: ld_not_disjoint32_int64_t_float:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: ori r3, r3, 34463
|
|
; CHECK-NEXT: oris r3, r3, 1
|
|
; CHECK-NEXT: lfs f0, 0(r3)
|
|
; CHECK-NEXT: xscvdpsxds f0, f0
|
|
; CHECK-NEXT: mffprd r3, f0
|
|
; CHECK-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: plfs f0, 999990000(r3), 0
|
|
; 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-PREP10-LABEL: ld_not_disjoint64_int64_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: or r3, r3, r4
|
|
; CHECK-PREP10-NEXT: lfs f0, 0(r3)
|
|
; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
|
|
; CHECK-PREP10-NEXT: mffprd r3, f0
|
|
; CHECK-PREP10-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-LABEL: ld_cst_align32_int64_t_float:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: lis r3, 153
|
|
; CHECK-NEXT: lfs f0, -27108(r3)
|
|
; CHECK-NEXT: xscvdpsxds f0, f0
|
|
; CHECK-NEXT: mffprd r3, f0
|
|
; CHECK-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-PREP10-LABEL: ld_cst_align64_int64_t_float:
|
|
; 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: lfs f0, 0(r3)
|
|
; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
|
|
; CHECK-PREP10-NEXT: mffprd r3, f0
|
|
; CHECK-PREP10-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-LABEL: ld_0_int64_t_double:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: lfd f0, 0(r3)
|
|
; CHECK-NEXT: xscvdpsxds f0, f0
|
|
; CHECK-NEXT: mffprd r3, f0
|
|
; CHECK-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: plfd f0, 99999000(r3), 0
|
|
; 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-LABEL: ld_or_int64_t_double:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: or r3, r4, r3
|
|
; CHECK-NEXT: lfd f0, 0(r3)
|
|
; CHECK-NEXT: xscvdpsxds f0, f0
|
|
; CHECK-NEXT: mffprd r3, f0
|
|
; CHECK-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-LABEL: ld_not_disjoint16_int64_t_double:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: ori r3, r3, 6
|
|
; CHECK-NEXT: lfd f0, 0(r3)
|
|
; CHECK-NEXT: xscvdpsxds f0, f0
|
|
; CHECK-NEXT: mffprd r3, f0
|
|
; CHECK-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-LABEL: ld_disjoint_align16_int64_t_double:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: rldicr r3, r3, 0, 51
|
|
; CHECK-NEXT: lfd f0, 24(r3)
|
|
; CHECK-NEXT: xscvdpsxds f0, f0
|
|
; CHECK-NEXT: mffprd r3, f0
|
|
; CHECK-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-LABEL: ld_not_disjoint32_int64_t_double:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: ori r3, r3, 34463
|
|
; CHECK-NEXT: oris r3, r3, 1
|
|
; CHECK-NEXT: lfd f0, 0(r3)
|
|
; CHECK-NEXT: xscvdpsxds f0, f0
|
|
; CHECK-NEXT: mffprd r3, f0
|
|
; CHECK-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: plfd f0, 999990000(r3), 0
|
|
; 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-PREP10-LABEL: ld_not_disjoint64_int64_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: or r3, r3, r4
|
|
; CHECK-PREP10-NEXT: lfd f0, 0(r3)
|
|
; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
|
|
; CHECK-PREP10-NEXT: mffprd r3, f0
|
|
; CHECK-PREP10-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-LABEL: ld_cst_align32_int64_t_double:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: lis r3, 153
|
|
; CHECK-NEXT: lfd f0, -27108(r3)
|
|
; CHECK-NEXT: xscvdpsxds f0, f0
|
|
; CHECK-NEXT: mffprd r3, f0
|
|
; CHECK-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-PREP10-LABEL: ld_cst_align64_int64_t_double:
|
|
; 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: lfd f0, 0(r3)
|
|
; CHECK-PREP10-NEXT: xscvdpsxds f0, f0
|
|
; CHECK-PREP10-NEXT: mffprd r3, f0
|
|
; CHECK-PREP10-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: plbz r3, 99999(r3), 0
|
|
; 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: plbz r3, 99999000(r3), 0
|
|
; 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: plbz r3, 99999(r3), 0
|
|
; 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: plbz r3, 999990000(r3), 0
|
|
; 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: plbz r3, 99999(r3), 0
|
|
; 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: plbz r3, 99999000(r3), 0
|
|
; 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: plbz r3, 99999(r3), 0
|
|
; 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: plbz r3, 999990000(r3), 0
|
|
; 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: plhz r3, 99999(r3), 0
|
|
; 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: plhz r3, 99999000(r3), 0
|
|
; 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: plhz r3, 99999(r3), 0
|
|
; 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: plhz r3, 999990000(r3), 0
|
|
; 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: plha r3, 99999(r3), 0
|
|
; 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: plha r3, 99999000(r3), 0
|
|
; 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: plha r3, 99999(r3), 0
|
|
; 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: plha r3, 999990000(r3), 0
|
|
; 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: plwz r3, 99999(r3), 0
|
|
; 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: plwz r3, 99999000(r3), 0
|
|
; 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: plwz r3, 99999(r3), 0
|
|
; 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: plwz r3, 999990000(r3), 0
|
|
; 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-P10-LABEL: ld_unalign16_uint64_t_int32_t:
|
|
; CHECK-P10: # %bb.0: # %entry
|
|
; CHECK-P10-NEXT: plwa r3, 1(r3), 0
|
|
; CHECK-P10-NEXT: blr
|
|
;
|
|
; CHECK-PREP10-LABEL: ld_unalign16_uint64_t_int32_t:
|
|
; CHECK-PREP10: # %bb.0: # %entry
|
|
; CHECK-PREP10-NEXT: li r4, 1
|
|
; CHECK-PREP10-NEXT: lwax r3, r3, r4
|
|
; CHECK-PREP10-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: plwa r3, 99999(r3), 0
|
|
; 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: plwa r3, 99999000(r3), 0
|
|
; 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: plwa r3, 6(r3), 0
|
|
; 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: plwa r3, 99999(r3), 0
|
|
; 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: plwa r3, 999990000(r3), 0
|
|
; 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-P10-LABEL: ld_unalign16_uint64_t_uint64_t:
|
|
; CHECK-P10: # %bb.0: # %entry
|
|
; CHECK-P10-NEXT: pld r3, 1(r3), 0
|
|
; CHECK-P10-NEXT: blr
|
|
;
|
|
; CHECK-PREP10-LABEL: ld_unalign16_uint64_t_uint64_t:
|
|
; CHECK-PREP10: # %bb.0: # %entry
|
|
; CHECK-PREP10-NEXT: li r4, 1
|
|
; CHECK-PREP10-NEXT: ldx r3, r3, r4
|
|
; CHECK-PREP10-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: pld r3, 99999(r3), 0
|
|
; 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: pld r3, 99999000(r3), 0
|
|
; 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: pld r3, 6(r3), 0
|
|
; 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: pld r3, 99999(r3), 0
|
|
; 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: pld r3, 999990000(r3), 0
|
|
; 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-LABEL: ld_0_uint64_t_float:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: lfs f0, 0(r3)
|
|
; CHECK-NEXT: xscvdpuxds f0, f0
|
|
; CHECK-NEXT: mffprd r3, f0
|
|
; CHECK-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-P10-LABEL: ld_unalign16_uint64_t_float:
|
|
; CHECK-P10: # %bb.0: # %entry
|
|
; CHECK-P10-NEXT: plfs f0, 1(r3), 0
|
|
; CHECK-P10-NEXT: xscvdpuxds f0, f0
|
|
; CHECK-P10-NEXT: mffprd r3, f0
|
|
; CHECK-P10-NEXT: blr
|
|
;
|
|
; CHECK-PREP10-LABEL: ld_unalign16_uint64_t_float:
|
|
; CHECK-PREP10: # %bb.0: # %entry
|
|
; CHECK-PREP10-NEXT: lfs f0, 1(r3)
|
|
; 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 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: plfs f0, 99999(r3), 0
|
|
; 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: plfs f0, 99999000(r3), 0
|
|
; 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-LABEL: ld_or_uint64_t_float:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: or r3, r4, r3
|
|
; CHECK-NEXT: lfs f0, 0(r3)
|
|
; CHECK-NEXT: xscvdpuxds f0, f0
|
|
; CHECK-NEXT: mffprd r3, f0
|
|
; CHECK-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-LABEL: ld_not_disjoint16_uint64_t_float:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: ori r3, r3, 6
|
|
; CHECK-NEXT: lfs f0, 0(r3)
|
|
; CHECK-NEXT: xscvdpuxds f0, f0
|
|
; CHECK-NEXT: mffprd r3, f0
|
|
; CHECK-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-P10-LABEL: ld_disjoint_unalign16_uint64_t_float:
|
|
; CHECK-P10: # %bb.0: # %entry
|
|
; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
|
|
; CHECK-P10-NEXT: plfs f0, 6(r3), 0
|
|
; CHECK-P10-NEXT: xscvdpuxds f0, f0
|
|
; CHECK-P10-NEXT: mffprd r3, f0
|
|
; CHECK-P10-NEXT: blr
|
|
;
|
|
; CHECK-PREP10-LABEL: ld_disjoint_unalign16_uint64_t_float:
|
|
; CHECK-PREP10: # %bb.0: # %entry
|
|
; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 51
|
|
; CHECK-PREP10-NEXT: lfs f0, 6(r3)
|
|
; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
|
|
; CHECK-PREP10-NEXT: mffprd r3, f0
|
|
; CHECK-PREP10-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-LABEL: ld_disjoint_align16_uint64_t_float:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: rldicr r3, r3, 0, 51
|
|
; CHECK-NEXT: lfs f0, 24(r3)
|
|
; CHECK-NEXT: xscvdpuxds f0, f0
|
|
; CHECK-NEXT: mffprd r3, f0
|
|
; CHECK-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-LABEL: ld_not_disjoint32_uint64_t_float:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: ori r3, r3, 34463
|
|
; CHECK-NEXT: oris r3, r3, 1
|
|
; CHECK-NEXT: lfs f0, 0(r3)
|
|
; CHECK-NEXT: xscvdpuxds f0, f0
|
|
; CHECK-NEXT: mffprd r3, f0
|
|
; CHECK-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: plfs f0, 99999(r3), 0
|
|
; 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: plfs f0, 999990000(r3), 0
|
|
; 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-PREP10-LABEL: ld_not_disjoint64_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: or r3, r3, r4
|
|
; CHECK-PREP10-NEXT: lfs f0, 0(r3)
|
|
; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
|
|
; CHECK-PREP10-NEXT: mffprd r3, f0
|
|
; CHECK-PREP10-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, 2
|
|
; CHECK-P8-NEXT: lfs f0, -31073(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-LABEL: ld_cst_align32_uint64_t_float:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: lis r3, 153
|
|
; CHECK-NEXT: lfs f0, -27108(r3)
|
|
; CHECK-NEXT: xscvdpuxds f0, f0
|
|
; CHECK-NEXT: mffprd r3, f0
|
|
; CHECK-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-PREP10-LABEL: ld_cst_unalign64_uint64_t_float:
|
|
; 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: lfs f0, 0(r3)
|
|
; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
|
|
; CHECK-PREP10-NEXT: mffprd r3, f0
|
|
; CHECK-PREP10-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-PREP10-LABEL: ld_cst_align64_uint64_t_float:
|
|
; 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: lfs f0, 0(r3)
|
|
; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
|
|
; CHECK-PREP10-NEXT: mffprd r3, f0
|
|
; CHECK-PREP10-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-LABEL: ld_0_uint64_t_double:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: lfd f0, 0(r3)
|
|
; CHECK-NEXT: xscvdpuxds f0, f0
|
|
; CHECK-NEXT: mffprd r3, f0
|
|
; CHECK-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-P10-LABEL: ld_unalign16_uint64_t_double:
|
|
; CHECK-P10: # %bb.0: # %entry
|
|
; CHECK-P10-NEXT: plfd f0, 1(r3), 0
|
|
; CHECK-P10-NEXT: xscvdpuxds f0, f0
|
|
; CHECK-P10-NEXT: mffprd r3, f0
|
|
; CHECK-P10-NEXT: blr
|
|
;
|
|
; CHECK-PREP10-LABEL: ld_unalign16_uint64_t_double:
|
|
; CHECK-PREP10: # %bb.0: # %entry
|
|
; CHECK-PREP10-NEXT: lfd f0, 1(r3)
|
|
; 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 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: plfd f0, 99999(r3), 0
|
|
; 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: plfd f0, 99999000(r3), 0
|
|
; 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-LABEL: ld_or_uint64_t_double:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: or r3, r4, r3
|
|
; CHECK-NEXT: lfd f0, 0(r3)
|
|
; CHECK-NEXT: xscvdpuxds f0, f0
|
|
; CHECK-NEXT: mffprd r3, f0
|
|
; CHECK-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-LABEL: ld_not_disjoint16_uint64_t_double:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: ori r3, r3, 6
|
|
; CHECK-NEXT: lfd f0, 0(r3)
|
|
; CHECK-NEXT: xscvdpuxds f0, f0
|
|
; CHECK-NEXT: mffprd r3, f0
|
|
; CHECK-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-P10-LABEL: ld_disjoint_unalign16_uint64_t_double:
|
|
; CHECK-P10: # %bb.0: # %entry
|
|
; CHECK-P10-NEXT: rldicr r3, r3, 0, 51
|
|
; CHECK-P10-NEXT: plfd f0, 6(r3), 0
|
|
; CHECK-P10-NEXT: xscvdpuxds f0, f0
|
|
; CHECK-P10-NEXT: mffprd r3, f0
|
|
; CHECK-P10-NEXT: blr
|
|
;
|
|
; CHECK-PREP10-LABEL: ld_disjoint_unalign16_uint64_t_double:
|
|
; CHECK-PREP10: # %bb.0: # %entry
|
|
; CHECK-PREP10-NEXT: rldicr r3, r3, 0, 51
|
|
; CHECK-PREP10-NEXT: lfd f0, 6(r3)
|
|
; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
|
|
; CHECK-PREP10-NEXT: mffprd r3, f0
|
|
; CHECK-PREP10-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-LABEL: ld_disjoint_align16_uint64_t_double:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: rldicr r3, r3, 0, 51
|
|
; CHECK-NEXT: lfd f0, 24(r3)
|
|
; CHECK-NEXT: xscvdpuxds f0, f0
|
|
; CHECK-NEXT: mffprd r3, f0
|
|
; CHECK-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-LABEL: ld_not_disjoint32_uint64_t_double:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: ori r3, r3, 34463
|
|
; CHECK-NEXT: oris r3, r3, 1
|
|
; CHECK-NEXT: lfd f0, 0(r3)
|
|
; CHECK-NEXT: xscvdpuxds f0, f0
|
|
; CHECK-NEXT: mffprd r3, f0
|
|
; CHECK-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: plfd f0, 99999(r3), 0
|
|
; 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: plfd f0, 999990000(r3), 0
|
|
; 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-PREP10-LABEL: ld_not_disjoint64_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: or r3, r3, r4
|
|
; CHECK-PREP10-NEXT: lfd f0, 0(r3)
|
|
; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
|
|
; CHECK-PREP10-NEXT: mffprd r3, f0
|
|
; CHECK-PREP10-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, 2
|
|
; CHECK-P8-NEXT: lfd f0, -31073(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-LABEL: ld_cst_align32_uint64_t_double:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: lis r3, 153
|
|
; CHECK-NEXT: lfd f0, -27108(r3)
|
|
; CHECK-NEXT: xscvdpuxds f0, f0
|
|
; CHECK-NEXT: mffprd r3, f0
|
|
; CHECK-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-PREP10-LABEL: ld_cst_unalign64_uint64_t_double:
|
|
; 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: lfd f0, 0(r3)
|
|
; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
|
|
; CHECK-PREP10-NEXT: mffprd r3, f0
|
|
; CHECK-PREP10-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-PREP10-LABEL: ld_cst_align64_uint64_t_double:
|
|
; 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: lfd f0, 0(r3)
|
|
; CHECK-PREP10-NEXT: xscvdpuxds f0, f0
|
|
; CHECK-PREP10-NEXT: mffprd r3, f0
|
|
; CHECK-PREP10-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: pstb r4, 99999000(r3), 0
|
|
; 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: pstb r4, 999990000(r3), 0
|
|
; 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: psth r4, 99999000(r3), 0
|
|
; 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: psth r4, 999990000(r3), 0
|
|
; 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: psth r4, 99999000(r3), 0
|
|
; 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: psth r4, 999990000(r3), 0
|
|
; 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: pstw r4, 99999000(r3), 0
|
|
; 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: pstw r4, 999990000(r3), 0
|
|
; 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: pstd r4, 99999000(r3), 0
|
|
; 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: pstd r4, 999990000(r3), 0
|
|
; 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-LABEL: st_0_uint64_t_float:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: mtfprd f0, r4
|
|
; CHECK-NEXT: xscvuxdsp f0, f0
|
|
; CHECK-NEXT: stfs f0, 0(r3)
|
|
; CHECK-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: xscvuxdsp f0, f0
|
|
; CHECK-P10-NEXT: pstfs f0, 99999000(r3), 0
|
|
; 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-LABEL: st_or1_uint64_t_float:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: mtfprd f0, r5
|
|
; CHECK-NEXT: or r3, r4, r3
|
|
; CHECK-NEXT: xscvuxdsp f0, f0
|
|
; CHECK-NEXT: stfs f0, 0(r3)
|
|
; CHECK-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-LABEL: st_not_disjoint16_uint64_t_float:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: mtfprd f0, r4
|
|
; CHECK-NEXT: ori r3, r3, 6
|
|
; CHECK-NEXT: xscvuxdsp f0, f0
|
|
; CHECK-NEXT: stfs f0, 0(r3)
|
|
; CHECK-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-LABEL: st_disjoint_align16_uint64_t_float:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: mtfprd f0, r4
|
|
; CHECK-NEXT: rldicr r3, r3, 0, 51
|
|
; CHECK-NEXT: xscvuxdsp f0, f0
|
|
; CHECK-NEXT: stfs f0, 24(r3)
|
|
; CHECK-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: stfs 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: xscvuxdsp f0, f0
|
|
; CHECK-P10-NEXT: and r3, r3, r5
|
|
; CHECK-P10-NEXT: pstfs f0, 999990000(r3), 0
|
|
; 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-PREP10-LABEL: st_not_disjoint64_uint64_t_float:
|
|
; CHECK-PREP10: # %bb.0: # %entry
|
|
; CHECK-PREP10-NEXT: mtfprd f0, r4
|
|
; CHECK-PREP10-NEXT: li r4, 29
|
|
; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
|
|
; CHECK-PREP10-NEXT: xscvuxdsp f0, f0
|
|
; CHECK-PREP10-NEXT: oris r4, r4, 54437
|
|
; CHECK-PREP10-NEXT: ori r4, r4, 4097
|
|
; CHECK-PREP10-NEXT: or r3, r3, r4
|
|
; CHECK-PREP10-NEXT: stfs f0, 0(r3)
|
|
; CHECK-PREP10-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-LABEL: st_cst_align32_uint64_t_float:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: mtfprd f0, r3
|
|
; CHECK-NEXT: lis r3, 153
|
|
; CHECK-NEXT: xscvuxdsp f0, f0
|
|
; CHECK-NEXT: stfs f0, -27108(r3)
|
|
; CHECK-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: stfs 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-LABEL: st_0_uint64_t_double:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: mtfprd f0, r4
|
|
; CHECK-NEXT: xscvuxddp f0, f0
|
|
; CHECK-NEXT: stfd f0, 0(r3)
|
|
; CHECK-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: xscvuxddp f0, f0
|
|
; CHECK-P10-NEXT: pstfd f0, 99999000(r3), 0
|
|
; 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-LABEL: st_or1_uint64_t_double:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: mtfprd f0, r5
|
|
; CHECK-NEXT: or r3, r4, r3
|
|
; CHECK-NEXT: xscvuxddp f0, f0
|
|
; CHECK-NEXT: stfd f0, 0(r3)
|
|
; CHECK-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-LABEL: st_not_disjoint16_uint64_t_double:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: mtfprd f0, r4
|
|
; CHECK-NEXT: ori r3, r3, 6
|
|
; CHECK-NEXT: xscvuxddp f0, f0
|
|
; CHECK-NEXT: stfd f0, 0(r3)
|
|
; CHECK-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-LABEL: st_disjoint_align16_uint64_t_double:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: mtfprd f0, r4
|
|
; CHECK-NEXT: rldicr r3, r3, 0, 51
|
|
; CHECK-NEXT: xscvuxddp f0, f0
|
|
; CHECK-NEXT: stfd f0, 24(r3)
|
|
; CHECK-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: stfd 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: xscvuxddp f0, f0
|
|
; CHECK-P10-NEXT: and r3, r3, r5
|
|
; CHECK-P10-NEXT: pstfd f0, 999990000(r3), 0
|
|
; 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-PREP10-LABEL: st_not_disjoint64_uint64_t_double:
|
|
; CHECK-PREP10: # %bb.0: # %entry
|
|
; CHECK-PREP10-NEXT: mtfprd f0, r4
|
|
; CHECK-PREP10-NEXT: li r4, 29
|
|
; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
|
|
; CHECK-PREP10-NEXT: xscvuxddp f0, f0
|
|
; CHECK-PREP10-NEXT: oris r4, r4, 54437
|
|
; CHECK-PREP10-NEXT: ori r4, r4, 4097
|
|
; CHECK-PREP10-NEXT: or r3, r3, r4
|
|
; CHECK-PREP10-NEXT: stfd f0, 0(r3)
|
|
; CHECK-PREP10-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-LABEL: st_cst_align32_uint64_t_double:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: mtfprd f0, r3
|
|
; CHECK-NEXT: lis r3, 153
|
|
; CHECK-NEXT: xscvuxddp f0, f0
|
|
; CHECK-NEXT: stfd f0, -27108(r3)
|
|
; CHECK-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: stfd 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-LABEL: st_0_int64_t_float:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: mtfprd f0, r4
|
|
; CHECK-NEXT: xscvsxdsp f0, f0
|
|
; CHECK-NEXT: stfs f0, 0(r3)
|
|
; CHECK-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: xscvsxdsp f0, f0
|
|
; CHECK-P10-NEXT: pstfs f0, 99999000(r3), 0
|
|
; 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-LABEL: st_or1_int64_t_float:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: mtfprd f0, r5
|
|
; CHECK-NEXT: or r3, r4, r3
|
|
; CHECK-NEXT: xscvsxdsp f0, f0
|
|
; CHECK-NEXT: stfs f0, 0(r3)
|
|
; CHECK-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-LABEL: st_not_disjoint16_int64_t_float:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: mtfprd f0, r4
|
|
; CHECK-NEXT: ori r3, r3, 6
|
|
; CHECK-NEXT: xscvsxdsp f0, f0
|
|
; CHECK-NEXT: stfs f0, 0(r3)
|
|
; CHECK-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-LABEL: st_disjoint_align16_int64_t_float:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: mtfprd f0, r4
|
|
; CHECK-NEXT: rldicr r3, r3, 0, 51
|
|
; CHECK-NEXT: xscvsxdsp f0, f0
|
|
; CHECK-NEXT: stfs f0, 24(r3)
|
|
; CHECK-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: stfs 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: xscvsxdsp f0, f0
|
|
; CHECK-P10-NEXT: and r3, r3, r5
|
|
; CHECK-P10-NEXT: pstfs f0, 999990000(r3), 0
|
|
; 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-PREP10-LABEL: st_not_disjoint64_int64_t_float:
|
|
; CHECK-PREP10: # %bb.0: # %entry
|
|
; CHECK-PREP10-NEXT: mtfprd f0, r4
|
|
; CHECK-PREP10-NEXT: li r4, 29
|
|
; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
|
|
; CHECK-PREP10-NEXT: xscvsxdsp f0, f0
|
|
; CHECK-PREP10-NEXT: oris r4, r4, 54437
|
|
; CHECK-PREP10-NEXT: ori r4, r4, 4097
|
|
; CHECK-PREP10-NEXT: or r3, r3, r4
|
|
; CHECK-PREP10-NEXT: stfs f0, 0(r3)
|
|
; CHECK-PREP10-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-LABEL: st_cst_align32_int64_t_float:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: mtfprd f0, r3
|
|
; CHECK-NEXT: lis r3, 153
|
|
; CHECK-NEXT: xscvsxdsp f0, f0
|
|
; CHECK-NEXT: stfs f0, -27108(r3)
|
|
; CHECK-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: stfs 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-LABEL: st_0_int64_t_double:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: mtfprd f0, r4
|
|
; CHECK-NEXT: xscvsxddp f0, f0
|
|
; CHECK-NEXT: stfd f0, 0(r3)
|
|
; CHECK-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: xscvsxddp f0, f0
|
|
; CHECK-P10-NEXT: pstfd f0, 99999000(r3), 0
|
|
; 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-LABEL: st_or1_int64_t_double:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: mtfprd f0, r5
|
|
; CHECK-NEXT: or r3, r4, r3
|
|
; CHECK-NEXT: xscvsxddp f0, f0
|
|
; CHECK-NEXT: stfd f0, 0(r3)
|
|
; CHECK-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-LABEL: st_not_disjoint16_int64_t_double:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: mtfprd f0, r4
|
|
; CHECK-NEXT: ori r3, r3, 6
|
|
; CHECK-NEXT: xscvsxddp f0, f0
|
|
; CHECK-NEXT: stfd f0, 0(r3)
|
|
; CHECK-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-LABEL: st_disjoint_align16_int64_t_double:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: mtfprd f0, r4
|
|
; CHECK-NEXT: rldicr r3, r3, 0, 51
|
|
; CHECK-NEXT: xscvsxddp f0, f0
|
|
; CHECK-NEXT: stfd f0, 24(r3)
|
|
; CHECK-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: stfd 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: xscvsxddp f0, f0
|
|
; CHECK-P10-NEXT: and r3, r3, r5
|
|
; CHECK-P10-NEXT: pstfd f0, 999990000(r3), 0
|
|
; 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-PREP10-LABEL: st_not_disjoint64_int64_t_double:
|
|
; CHECK-PREP10: # %bb.0: # %entry
|
|
; CHECK-PREP10-NEXT: mtfprd f0, r4
|
|
; CHECK-PREP10-NEXT: li r4, 29
|
|
; CHECK-PREP10-NEXT: rldic r4, r4, 35, 24
|
|
; CHECK-PREP10-NEXT: xscvsxddp f0, f0
|
|
; CHECK-PREP10-NEXT: oris r4, r4, 54437
|
|
; CHECK-PREP10-NEXT: ori r4, r4, 4097
|
|
; CHECK-PREP10-NEXT: or r3, r3, r4
|
|
; CHECK-PREP10-NEXT: stfd f0, 0(r3)
|
|
; CHECK-PREP10-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-LABEL: st_cst_align32_int64_t_double:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: mtfprd f0, r3
|
|
; CHECK-NEXT: lis r3, 153
|
|
; CHECK-NEXT: xscvsxddp f0, f0
|
|
; CHECK-NEXT: stfd f0, -27108(r3)
|
|
; CHECK-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: stfd 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
|
|
}
|