Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame^] | 1 | ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic \ |
2 | ; RUN: -o %t -f | ||||
3 | ; RUN: grep _GLOBAL_OFFSET_TABLE_ %t | ||||
4 | ; RUN: grep piclabel %t | wc -l | grep 3 | ||||
5 | ; RUN: grep GOTOFF %t | wc -l | grep 4 | ||||
6 | |||||
7 | @ptr = internal global i32* null | ||||
8 | @dst = internal global i32 0 | ||||
9 | @src = internal global i32 0 | ||||
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 |