llvm.org GIT mirror llvm / 8535072
Test load global in static mode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36719 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 13 years ago
1 changed file(s) with 10 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
None ; RUN: llvm-upgrade < %s | llvm-as | \
0 ; RUN: llvm-as < %s | \
1 ; RUN: llc -mtriple=arm-apple-darwin -relocation-model=static | \
2 ; RUN: not grep {L_G\$non_lazy_ptr}
3 ; RUN: llvm-as < %s | \
14 ; RUN: llc -mtriple=arm-apple-darwin -relocation-model=dynamic-no-pic | \
25 ; RUN: grep {L_G\$non_lazy_ptr} | wc -l | grep 2
3 ; RUN: llvm-upgrade < %s | llvm-as | \
6 ; RUN: llvm-as < %s | \
47 ; RUN: llc -mtriple=arm-apple-darwin -relocation-model=pic | \
58 ; RUN: grep {ldr.*pc} | wc -l | grep 1
6 ; RUN: llvm-upgrade < %s | llvm-as | \
9 ; RUN: llvm-as < %s | \
710 ; RUN: llc -mtriple=arm-linux-gnueabi -relocation-model=pic | \
811 ; RUN: grep {GOT} | wc -l | grep 1
912
10 %G = external global int
13 @G = external global i32
1114
12 int %test1() {
13 %tmp = load int* %G
14 ret int %tmp
15 define i32 @test1() {
16 %tmp = load i32* @G
17 ret i32 %tmp
1518 }