2009-09-09 08:09:15 +08:00
|
|
|
; RUN: llc < %s
|
2006-01-13 10:25:08 +08:00
|
|
|
|
2008-02-19 09:41:04 +08:00
|
|
|
declare i8* @llvm.stacksave()
|
2006-01-13 10:25:08 +08:00
|
|
|
|
2008-02-19 09:41:04 +08:00
|
|
|
declare void @llvm.stackrestore(i8*)
|
|
|
|
|
|
|
|
define i32* @test(i32 %N) {
|
|
|
|
%tmp = call i8* @llvm.stacksave( ) ; <i8*> [#uses=1]
|
|
|
|
%P = alloca i32, i32 %N ; <i32*> [#uses=1]
|
|
|
|
call void @llvm.stackrestore( i8* %tmp )
|
|
|
|
%Q = alloca i32, i32 %N ; <i32*> [#uses=0]
|
|
|
|
ret i32* %P
|
2006-01-13 10:25:08 +08:00
|
|
|
}
|
2008-02-19 09:41:04 +08:00
|
|
|
|