Dan Gohman | 36a0947 | 2009-09-08 23:54:48 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -march=x86 > %t |
Dan Gohman | 6520e20 | 2008-10-18 02:06:02 +0000 | [diff] [blame] | 2 | ; RUN: not grep lea %t |
| 3 | ; RUN: not grep add %t |
| 4 | ; RUN: grep mov %t | count 1 |
Dan Gohman | 36a0947 | 2009-09-08 23:54:48 +0000 | [diff] [blame] | 5 | ; RUN: llc < %s -mtriple=x86_64-linux -relocation-model=static > %t |
Dan Gohman | 6520e20 | 2008-10-18 02:06:02 +0000 | [diff] [blame] | 6 | ; RUN: not grep lea %t |
| 7 | ; RUN: not grep add %t |
| 8 | ; RUN: grep mov %t | count 1 |
| 9 | |
| 10 | ; This store should fold to a single mov instruction. |
| 11 | |
| 12 | @ptr = global i32* null |
| 13 | @dst = global [131072 x i32] zeroinitializer |
| 14 | |
| 15 | define void @foo() nounwind { |
| 16 | store i32* getelementptr ([131072 x i32]* @dst, i32 0, i32 16), i32** @ptr |
| 17 | ret void |
| 18 | } |