Test case for X86 inline asm constraint 'I'
[oota-llvm.git] / test / CodeGen / X86 / test-pic-2.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 GOTOFF | wc -l | grep 4
5
6 @ptr = internal global i32* null
7 @dst = internal global i32 0
8 @src = internal global i32 0
9
10 define void @foo() {
11 entry:
12     store i32* @dst, i32** @ptr
13     %tmp.s = load i32* @src
14     store i32 %tmp.s, i32* @dst
15     ret void
16 }
17