Dan Gohman | 0a06310 | 2009-09-08 23:54:48 +0000 | [diff] [blame^] | 1 | ; RUN: llc < %s -fast-isel -mtriple=i386-apple-darwin | \ |
Dan Gohman | 0dd5fd9 | 2008-09-19 22:16:54 +0000 | [diff] [blame] | 2 | ; RUN: grep lazy_ptr, | count 2 |
Dan Gohman | 0a06310 | 2009-09-08 23:54:48 +0000 | [diff] [blame^] | 3 | ; RUN: llc < %s -fast-isel -march=x86 -relocation-model=static | \ |
Evan Cheng | 483f0db | 2008-09-09 01:26:59 +0000 | [diff] [blame] | 4 | ; RUN: grep lea |
Evan Cheng | ca0fb99 | 2008-09-04 06:18:33 +0000 | [diff] [blame] | 5 | |
| 6 | @src = external global i32 |
| 7 | |
| 8 | define i32 @loadgv() nounwind { |
| 9 | entry: |
| 10 | %0 = load i32* @src, align 4 |
| 11 | %1 = load i32* @src, align 4 |
| 12 | %2 = add i32 %0, %1 |
Evan Cheng | 483f0db | 2008-09-09 01:26:59 +0000 | [diff] [blame] | 13 | store i32 %2, i32* @src |
Evan Cheng | ca0fb99 | 2008-09-04 06:18:33 +0000 | [diff] [blame] | 14 | ret i32 %2 |
| 15 | } |
Evan Cheng | 483f0db | 2008-09-09 01:26:59 +0000 | [diff] [blame] | 16 | |
| 17 | %stuff = type { i32 (...)** } |
| 18 | @LotsStuff = external constant [4 x i32 (...)*] |
| 19 | |
| 20 | define void @t(%stuff* %this) nounwind { |
| 21 | entry: |
| 22 | store i32 (...)** getelementptr ([4 x i32 (...)*]* @LotsStuff, i32 0, i32 2), i32 (...)*** null, align 4 |
| 23 | ret void |
| 24 | } |