brintos

brintos / llvm-project-archived public Read only

0
0
Text · 7.8 KiB · 02d794f Raw
178 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 32; RUN: llc  -verify-machineinstrs -mcpu=pwr7 -ppc-asm-full-reg-names \3; RUN:      -mtriple powerpc64-ibm-aix-xcoff -mattr=+aix-small-local-exec-tls < %s \4; RUN:      | FileCheck %s --check-prefix=SMALL-LOCAL-EXEC-SMALLCM645; RUN: llc  -verify-machineinstrs -mcpu=pwr7 -ppc-asm-full-reg-names \6; RUN:      -mtriple powerpc64-ibm-aix-xcoff --code-model=large \7; RUN:      -mattr=+aix-small-local-exec-tls < %s | FileCheck %s \8; RUN:      --check-prefix=SMALL-LOCAL-EXEC-LARGECM649 10@ThreadLocalVarInit = thread_local(localexec) global double 1.000000e+00, align 811@VarInit = local_unnamed_addr global double 8.700000e+01, align 812@IThreadLocalVarInit = internal thread_local(localexec) global double 1.000000e+00, align 813declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #114@f = thread_local(localexec) global [87 x double] zeroinitializer, align 815 16define nonnull ptr @AddrTest1() local_unnamed_addr #0 {17; SMALL-LOCAL-EXEC-SMALLCM64-LABEL: AddrTest1:18; SMALL-LOCAL-EXEC-SMALLCM64:       # %bb.0: # %entry19; SMALL-LOCAL-EXEC-SMALLCM64-NEXT:    la r3, f[TL]@le+48(r13)20; SMALL-LOCAL-EXEC-SMALLCM64-NEXT:    blr21;22; SMALL-LOCAL-EXEC-LARGECM64-LABEL: AddrTest1:23; SMALL-LOCAL-EXEC-LARGECM64:       # %bb.0: # %entry24; SMALL-LOCAL-EXEC-LARGECM64-NEXT:    la r3, f[TL]@le+48(r13)25; SMALL-LOCAL-EXEC-LARGECM64-NEXT:    blr26entry:27  %0 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @f)28  %arrayidx = getelementptr inbounds [87 x double], ptr %0, i64 0, i64 629  ret ptr %arrayidx30}31 32define void @storeITLInit(double noundef %x) {33; SMALL-LOCAL-EXEC-SMALLCM64-LABEL: storeITLInit:34; SMALL-LOCAL-EXEC-SMALLCM64:       # %bb.0: # %entry35; SMALL-LOCAL-EXEC-SMALLCM64-NEXT:    stfd f1, IThreadLocalVarInit[TL]@le(r13)36; SMALL-LOCAL-EXEC-SMALLCM64-NEXT:    blr37;38; SMALL-LOCAL-EXEC-LARGECM64-LABEL: storeITLInit:39; SMALL-LOCAL-EXEC-LARGECM64:       # %bb.0: # %entry40; SMALL-LOCAL-EXEC-LARGECM64-NEXT:    stfd f1, IThreadLocalVarInit[TL]@le(r13)41; SMALL-LOCAL-EXEC-LARGECM64-NEXT:    blr42entry:43  %0 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @IThreadLocalVarInit)44  store double %x, ptr %0, align 845  ret void46}47 48define void @storeTLInit(double noundef %x) {49; SMALL-LOCAL-EXEC-SMALLCM64-LABEL: storeTLInit:50; SMALL-LOCAL-EXEC-SMALLCM64:       # %bb.0: # %entry51; SMALL-LOCAL-EXEC-SMALLCM64-NEXT:    stfd f1, ThreadLocalVarInit[TL]@le(r13)52; SMALL-LOCAL-EXEC-SMALLCM64-NEXT:    blr53;54; SMALL-LOCAL-EXEC-LARGECM64-LABEL: storeTLInit:55; SMALL-LOCAL-EXEC-LARGECM64:       # %bb.0: # %entry56; SMALL-LOCAL-EXEC-LARGECM64-NEXT:    stfd f1, ThreadLocalVarInit[TL]@le(r13)57; SMALL-LOCAL-EXEC-LARGECM64-NEXT:    blr58entry:59  %0 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @ThreadLocalVarInit)60  store double %x, ptr %0, align 861  ret void62}63 64define double @loadITLInit() {65; SMALL-LOCAL-EXEC-SMALLCM64-LABEL: loadITLInit:66; SMALL-LOCAL-EXEC-SMALLCM64:       # %bb.0: # %entry67; SMALL-LOCAL-EXEC-SMALLCM64-NEXT:    lfd f1, IThreadLocalVarInit[TL]@le(r13)68; SMALL-LOCAL-EXEC-SMALLCM64-NEXT:    blr69;70; SMALL-LOCAL-EXEC-LARGECM64-LABEL: loadITLInit:71; SMALL-LOCAL-EXEC-LARGECM64:       # %bb.0: # %entry72; SMALL-LOCAL-EXEC-LARGECM64-NEXT:    lfd f1, IThreadLocalVarInit[TL]@le(r13)73; SMALL-LOCAL-EXEC-LARGECM64-NEXT:    blr74entry:75  %0 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @IThreadLocalVarInit)76  %1 = load double, ptr %0, align 877  ret double %178}79 80define double @loadITLInit2() {81; SMALL-LOCAL-EXEC-SMALLCM64-LABEL: loadITLInit2:82; SMALL-LOCAL-EXEC-SMALLCM64:       # %bb.0: # %entry83; SMALL-LOCAL-EXEC-SMALLCM64-NEXT:    ld r3, L..C0(r2) # @VarInit84; SMALL-LOCAL-EXEC-SMALLCM64-NEXT:    lfd f0, IThreadLocalVarInit[TL]@le(r13)85; SMALL-LOCAL-EXEC-SMALLCM64-NEXT:    lfd f1, 0(r3)86; SMALL-LOCAL-EXEC-SMALLCM64-NEXT:    xsadddp f1, f0, f187; SMALL-LOCAL-EXEC-SMALLCM64-NEXT:    blr88;89; SMALL-LOCAL-EXEC-LARGECM64-LABEL: loadITLInit2:90; SMALL-LOCAL-EXEC-LARGECM64:       # %bb.0: # %entry91; SMALL-LOCAL-EXEC-LARGECM64-NEXT:    addis r3, L..C0@u(r2)92; SMALL-LOCAL-EXEC-LARGECM64-NEXT:    lfd f0, IThreadLocalVarInit[TL]@le(r13)93; SMALL-LOCAL-EXEC-LARGECM64-NEXT:    ld r3, L..C0@l(r3)94; SMALL-LOCAL-EXEC-LARGECM64-NEXT:    lfd f1, 0(r3)95; SMALL-LOCAL-EXEC-LARGECM64-NEXT:    xsadddp f1, f0, f196; SMALL-LOCAL-EXEC-LARGECM64-NEXT:    blr97entry:98  %0 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @IThreadLocalVarInit)99  %1 = load double, ptr %0, align 8100  %2 = load double, ptr @VarInit, align 8101  %add = fadd double %1, %2102  ret double %add103}104 105define double @loadTLInit() {106; SMALL-LOCAL-EXEC-SMALLCM64-LABEL: loadTLInit:107; SMALL-LOCAL-EXEC-SMALLCM64:       # %bb.0: # %entry108; SMALL-LOCAL-EXEC-SMALLCM64-NEXT:    lfd f1, ThreadLocalVarInit[TL]@le(r13)109; SMALL-LOCAL-EXEC-SMALLCM64-NEXT:    blr110;111; SMALL-LOCAL-EXEC-LARGECM64-LABEL: loadTLInit:112; SMALL-LOCAL-EXEC-LARGECM64:       # %bb.0: # %entry113; SMALL-LOCAL-EXEC-LARGECM64-NEXT:    lfd f1, ThreadLocalVarInit[TL]@le(r13)114; SMALL-LOCAL-EXEC-LARGECM64-NEXT:    blr115entry:116  %0 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @ThreadLocalVarInit)117  %1 = load double, ptr %0, align 8118  ret double %1119}120 121define double @loadTLInit2() {122; SMALL-LOCAL-EXEC-SMALLCM64-LABEL: loadTLInit2:123; SMALL-LOCAL-EXEC-SMALLCM64:       # %bb.0: # %entry124; SMALL-LOCAL-EXEC-SMALLCM64-NEXT:    ld r3, L..C0(r2) # @VarInit125; SMALL-LOCAL-EXEC-SMALLCM64-NEXT:    lfd f0, ThreadLocalVarInit[TL]@le(r13)126; SMALL-LOCAL-EXEC-SMALLCM64-NEXT:    lfd f1, 0(r3)127; SMALL-LOCAL-EXEC-SMALLCM64-NEXT:    xsadddp f1, f0, f1128; SMALL-LOCAL-EXEC-SMALLCM64-NEXT:    blr129;130; SMALL-LOCAL-EXEC-LARGECM64-LABEL: loadTLInit2:131; SMALL-LOCAL-EXEC-LARGECM64:       # %bb.0: # %entry132; SMALL-LOCAL-EXEC-LARGECM64-NEXT:    addis r3, L..C0@u(r2)133; SMALL-LOCAL-EXEC-LARGECM64-NEXT:    lfd f0, ThreadLocalVarInit[TL]@le(r13)134; SMALL-LOCAL-EXEC-LARGECM64-NEXT:    ld r3, L..C0@l(r3)135; SMALL-LOCAL-EXEC-LARGECM64-NEXT:    lfd f1, 0(r3)136; SMALL-LOCAL-EXEC-LARGECM64-NEXT:    xsadddp f1, f0, f1137; SMALL-LOCAL-EXEC-LARGECM64-NEXT:    blr138entry:139  %0 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @ThreadLocalVarInit)140  %1 = load double, ptr %0, align 8141  %2 = load double, ptr @VarInit, align 8142  %add = fadd double %1, %2143  ret double %add144}145 146define void @loadStore1(double noundef %x) {147; SMALL-LOCAL-EXEC-SMALLCM64-LABEL: loadStore1:148; SMALL-LOCAL-EXEC-SMALLCM64:       # %bb.0: # %entry149; SMALL-LOCAL-EXEC-SMALLCM64-NEXT:    vspltisw v2, 1150; SMALL-LOCAL-EXEC-SMALLCM64-NEXT:    lfd f1, IThreadLocalVarInit[TL]@le(r13)151; SMALL-LOCAL-EXEC-SMALLCM64-NEXT:    xvcvsxwdp vs0, vs34152; SMALL-LOCAL-EXEC-SMALLCM64-NEXT:    vspltisw v3, 8153; SMALL-LOCAL-EXEC-SMALLCM64-NEXT:    xsadddp f0, f1, f0154; SMALL-LOCAL-EXEC-SMALLCM64-NEXT:    xvcvsxwdp vs1, vs35155; SMALL-LOCAL-EXEC-SMALLCM64-NEXT:    xsadddp f0, f0, f1156; SMALL-LOCAL-EXEC-SMALLCM64-NEXT:    stfd f0, IThreadLocalVarInit[TL]@le(r13)157; SMALL-LOCAL-EXEC-SMALLCM64-NEXT:    blr158;159; SMALL-LOCAL-EXEC-LARGECM64-LABEL: loadStore1:160; SMALL-LOCAL-EXEC-LARGECM64:       # %bb.0: # %entry161; SMALL-LOCAL-EXEC-LARGECM64-NEXT:    vspltisw v2, 1162; SMALL-LOCAL-EXEC-LARGECM64-NEXT:    lfd f1, IThreadLocalVarInit[TL]@le(r13)163; SMALL-LOCAL-EXEC-LARGECM64-NEXT:    xvcvsxwdp vs0, vs34164; SMALL-LOCAL-EXEC-LARGECM64-NEXT:    vspltisw v3, 8165; SMALL-LOCAL-EXEC-LARGECM64-NEXT:    xsadddp f0, f1, f0166; SMALL-LOCAL-EXEC-LARGECM64-NEXT:    xvcvsxwdp vs1, vs35167; SMALL-LOCAL-EXEC-LARGECM64-NEXT:    xsadddp f0, f0, f1168; SMALL-LOCAL-EXEC-LARGECM64-NEXT:    stfd f0, IThreadLocalVarInit[TL]@le(r13)169; SMALL-LOCAL-EXEC-LARGECM64-NEXT:    blr170entry:171  %0 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @IThreadLocalVarInit)172  %1 = load double, ptr %0, align 8173  %inc = fadd double %1, 1.000000e+00174  %add = fadd double %inc, 8.000000e+00175  store double %add, ptr %0, align 8176  ret void177}178