1; RUN: llc < %s -mtriple=powerpc-unknown-linux-gnu -relocation-model=pic | FileCheck -check-prefix=LARGE-BSS %s 2; RUN: llc < %s -mtriple=powerpc-unknown-linux-gnu -mattr=+secure-plt -relocation-model=pic | FileCheck -check-prefix=LARGE-SECUREPLT %s 3@bar = common global i32 0, align 4 4 5declare i32 @call_foo(i32, ...) 6 7define i32 @foo() { 8entry: 9 %0 = load i32, i32* @bar, align 4 10 %call = call i32 (i32, ...) @call_foo(i32 %0, i32 0, i32 1, i32 2, i32 4, i32 8, i32 16, i32 32, i32 64) 11 ret i32 %0 12} 13 14!llvm.module.flags = !{!0} 15!0 = !{i32 1, !"PIC Level", i32 2} 16; LARGE-BSS: [[POFF:\.L[0-9]+\$poff]]: 17; LARGE-BSS-NEXT: .long .LTOC-[[PB:\.L[0-9]+\$pb]] 18; LARGE-BSS-NEXT: foo: 19; LARGE-BSS: stwu 1, -32(1) 20; LARGE-BSS: stw 30, 24(1) 21; LARGE-BSS: bl [[PB]] 22; LARGE-BSS-NEXT: [[PB]]: 23; LARGE-BSS: mflr 30 24; LARGE-BSS: lwz [[REG:[0-9]+]], [[POFF]]-[[PB]](30) 25; LARGE-BSS-NEXT: add 30, [[REG]], 30 26; LARGE-BSS-DAG: lwz [[VREG:[0-9]+]], [[VREF:\.LC[0-9]+]]-.LTOC(30) 27; LARGE-BSS-DAG: lwz {{[0-9]+}}, 0([[VREG]]) 28; LARGE-BSS-DAG: stw {{[0-9]+}}, 8(1) 29; LARGE-BSS: lwz 30, 24(1) 30; LARGE-BSS: [[VREF]]: 31; LARGE-BSS-NEXT: .p2align 2 32; LARGE-BSS-NEXT: .long bar 33; LARGE-SECUREPLT: addis 30, 30, .LTOC-.L0$pb@ha 34; LARGE-SECUREPLT: addi 30, 30, .LTOC-.L0$pb@l 35; LARGE-SECUREPLT: bl call_foo@PLT+32768 36