blob: 40787cb9463cb9556d61f61e1922ab204b6bb97a [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 Cheng6c9275c2009-06-02 20:09:31 +00005; RUN: llvm-as < %s | llc -mtriple=x86_64-unknown-linux-gnu -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}