81e283f8117f2119143aadbfc0d599f4fdadbdf4
[oota-llvm.git] / test / CodeGen / X86 / test-pic-1.ll
1 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic &&
2 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep _GLOBAL_OFFSET_TABLE_ &&
3 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep piclabel | wc -l | grep 3 &&
4 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep GOT | wc -l | grep 3 &&
5 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep GOTOFF | wc -l | grep 0
6
7 @ptr = external global i32* 
8 @dst = external global i32 
9 @src = external global i32 
10
11 define void @foo() {
12 entry:
13     store i32* @dst, i32** @ptr
14     %tmp.s = load i32* @src
15     store i32 %tmp.s, i32* @dst
16     ret void
17 }
18