Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame^] | 1 | ; RUN: llvm-as < %s | \ |
| 2 | ; RUN: llc -mtriple=i686-pc-linux-gnu -relocation-model=pic -o %t -f |
| 3 | ; RUN: grep _GLOBAL_OFFSET_TABLE_ %t |
| 4 | ; RUN: grep piclabel %t | wc -l | grep 3 |
| 5 | ; RUN: grep GOT %t | wc -l | grep 3 |
| 6 | ; RUN: not grep GOTOFF %t | wc -l |
| 7 | |
| 8 | @ptr = external global i32* |
| 9 | @dst = external global i32 |
| 10 | @src = external global i32 |
| 11 | |
| 12 | define void @foo() { |
| 13 | entry: |
| 14 | store i32* @dst, i32** @ptr |
| 15 | %tmp.s = load i32* @src |
| 16 | store i32 %tmp.s, i32* @dst |
| 17 | ret void |
| 18 | } |
| 19 | |