1 ; RUN: llc < %s -mtriple=sparc -relocation-model=static -code-model=small | FileCheck --check-prefix=abs32 %s
2 ; RUN: llc < %s -mtriple=sparcv9 -relocation-model=static -code-model=small | FileCheck --check-prefix=abs32 %s
3 ; RUN: llc < %s -mtriple=sparcv9 -relocation-model=static -code-model=medium | FileCheck --check-prefix=abs44 %s
4 ; RUN: llc < %s -mtriple=sparcv9 -relocation-model=static -code-model=large | FileCheck --check-prefix=abs64 %s
5 ; RUN: llc < %s -mtriple=sparc -relocation-model=pic -code-model=medium | FileCheck --check-prefix=v8pic32 %s
6 ; RUN: llc < %s -mtriple=sparcv9 -relocation-model=pic -code-model=medium | FileCheck --check-prefix=v9pic32 %s
8 define void @func1() #0 {
13 define void @test() #0 {
15 %pFunc = alloca ptr, align 4
16 store ptr @func1, ptr %pFunc, align 4
17 %0 = load ptr, ptr %pFunc, align 4
18 %callee.knr.cast = bitcast ptr %0 to ptr
19 call void %callee.knr.cast()
22 ; abs32: sethi %hi(func1), %i0
23 ; abs32: add %i0, %lo(func1), %i1
24 ; abs32: call %i0+%lo(func1)
27 ; abs44: sethi %h44(func1), %i0
28 ; abs44: add %i0, %m44(func1), %i0
29 ; abs44: sllx %i0, 12, %i0
30 ; abs44: add %i0, %l44(func1), %i1
31 ; abs44: call %i0+%l44(func1)
34 ; abs64: sethi %hi(func1), %i0
35 ; abs64: add %i0, %lo(func1), %i0
36 ; abs64: sethi %hh(func1), %i1
37 ; abs64: add %i1, %hm(func1), %i1
40 ; v8pic32: sethi %hi(func1), %i1
41 ; v8pic32: add %i1, %lo(func1), %i1
42 ; v8pic32: ld [%i0+%i1], %i0
45 ; v9pic32: sethi %hi(func1), %i1
46 ; v9pic32: add %i1, %lo(func1), %i1
47 ; v9pic32: ldx [%i0+%i1], %i0