blob: 4499f67bc4fd0226c3368baf2cea4dd6533cf33e [file] [log] [blame]
Dan Gohman1b4c27772009-09-08 16:50:01 +00001; RUN: opt %s -scalarrepl -mem2reg | llvm-dis | not grep alloca
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002
Tanya Lattner307f46e2008-03-18 04:14:37 +00003define i32 @test() {
4 %X = alloca [4 x i32] ; <[4 x i32]*> [#uses=1]
5 %Y = getelementptr [4 x i32]* %X, i64 0, i64 0 ; <i32*> [#uses=2]
6 store i32 0, i32* %Y
7 %Z = load i32* %Y ; <i32> [#uses=1]
8 ret i32 %Z
Dan Gohmanf17a25c2007-07-18 16:29:46 +00009}
Tanya Lattner307f46e2008-03-18 04:14:37 +000010