52 lines · plain
1; RUN: llc < %s -mtriple=sparc -relocation-model=static -code-model=small | FileCheck --check-prefix=abs32 %s2; RUN: llc < %s -mtriple=sparcv9 -relocation-model=static -code-model=small | FileCheck --check-prefix=abs32 %s3; RUN: llc < %s -mtriple=sparcv9 -relocation-model=static -code-model=medium | FileCheck --check-prefix=abs44 %s4; RUN: llc < %s -mtriple=sparcv9 -relocation-model=static -code-model=large | FileCheck --check-prefix=abs64 %s5; RUN: llc < %s -mtriple=sparc -relocation-model=pic -code-model=medium | FileCheck --check-prefix=v8pic32 %s6; RUN: llc < %s -mtriple=sparcv9 -relocation-model=pic -code-model=medium | FileCheck --check-prefix=v9pic32 %s7 8define void @func1() #0 {9entry:10 ret void11}12 13define void @test() #0 {14entry:15 %pFunc = alloca ptr, align 416 store ptr @func1, ptr %pFunc, align 417 %0 = load ptr, ptr %pFunc, align 418 %callee.knr.cast = bitcast ptr %0 to ptr19 call void %callee.knr.cast()20 21; abs32-LABEL: test22; abs32: sethi %hi(func1), %i023; abs32: add %i0, %lo(func1), %i124; abs32: call %i0+%lo(func1)25 26; abs44-LABEL: test27; abs44: sethi %h44(func1), %i028; abs44: add %i0, %m44(func1), %i029; abs44: sllx %i0, 12, %i030; abs44: add %i0, %l44(func1), %i131; abs44: call %i0+%l44(func1)32 33; abs64-LABEL: test34; abs64: sethi %hi(func1), %i035; abs64: add %i0, %lo(func1), %i036; abs64: sethi %hh(func1), %i137; abs64: add %i1, %hm(func1), %i138 39; v8pic32-LABEL: test40; v8pic32: sethi %hi(func1), %i141; v8pic32: add %i1, %lo(func1), %i142; v8pic32: ld [%i0+%i1], %i043 44; v9pic32-LABEL: test45; v9pic32: sethi %hi(func1), %i146; v9pic32: add %i1, %lo(func1), %i147; v9pic32: ldx [%i0+%i1], %i048; v9pic32: call %i049 50 ret void51}52