blob: aaa2f84b88c94789942d705b4d45ee8b83a55452 [file] [log] [blame]
Dan Gohman36322c72008-10-18 02:06:02 +00001; RUN: llvm-as < %s | llc -march=x86 > %t
2; RUN: not grep lea %t
3; RUN: not grep add %t
4; RUN: grep mov %t | count 1
Evan Chengabb785b2009-06-03 21:13:54 +00005; RUN: llvm-as < %s | llc -mtriple=x86_64-linux -relocation-model=static > %t
Dan Gohman36322c72008-10-18 02:06:02 +00006; 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
15define void @foo() nounwind {
16 store i32* getelementptr ([131072 x i32]* @dst, i32 0, i32 16), i32** @ptr
17 ret void
18}