blob: b124b5f9b7d5521f7f9e09c2b6b6f9773fc52065 [file] [log] [blame]
Dan Gohmanda594cf2009-09-09 00:09:15 +00001; RUN: llc < %s
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002
Tanya Lattnerf28e0ce2008-02-19 01:41:04 +00003declare i8* @llvm.stacksave()
Dan Gohmanf17a25c2007-07-18 16:29:46 +00004
Tanya Lattnerf28e0ce2008-02-19 01:41:04 +00005declare void @llvm.stackrestore(i8*)
6
7define i32* @test(i32 %N) {
8 %tmp = call i8* @llvm.stacksave( ) ; <i8*> [#uses=1]
9 %P = alloca i32, i32 %N ; <i32*> [#uses=1]
10 call void @llvm.stackrestore( i8* %tmp )
11 %Q = alloca i32, i32 %N ; <i32*> [#uses=0]
12 ret i32* %P
Dan Gohmanf17a25c2007-07-18 16:29:46 +000013}
Tanya Lattnerf28e0ce2008-02-19 01:41:04 +000014