blob: 9f6d3f75cf843a5e7bd65a9f284361d9e4dd650b [file] [log] [blame]
Dan Gohman36a09472009-09-08 23:54:48 +00001; RUN: llc < %s -march=x86 > %t
Dan Gohman6520e202008-10-18 02:06:02 +00002; RUN: not grep lea %t
3; RUN: not grep add %t
4; RUN: grep mov %t | count 1
Dan Gohman36a09472009-09-08 23:54:48 +00005; RUN: llc < %s -mtriple=x86_64-linux -relocation-model=static > %t
Dan Gohman6520e202008-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}