blob: 2f68af8a464a2f81ad37d1f5f801ebe668c6def7 [file] [log] [blame]
Dan Gohman3c7d3082009-09-11 18:01:28 +00001; RUN: opt < %s -scalarrepl -mem2reg -S | 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