summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/ARM/load-global.ll
blob: 56a4a477f510cd817f6d08ecba23a8b7ddad8db6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
; RUN: llc < %s -mtriple=arm-apple-darwin -relocation-model=static | \
; RUN:   not grep {L_G\$non_lazy_ptr}
; RUN: llc < %s -mtriple=arm-apple-darwin -relocation-model=dynamic-no-pic | \
; RUN:   grep {L_G\$non_lazy_ptr} | count 2
; RUN: llc < %s -mtriple=arm-apple-darwin -relocation-model=pic | \
; RUN:   grep {ldr.*pc} | count 1
; RUN: llc < %s -mtriple=arm-linux-gnueabi -relocation-model=pic | \
; RUN:   grep {GOT} | count 1

@G = external global i32

define i32 @test1() {
	%tmp = load i32* @G
	ret i32 %tmp
}
OpenPOWER on IntegriCloud