2007-01-18 07:20:43 +08:00
|
|
|
; RUN: llvm-as < %s | llc -march=c | grep __builtin_stack_save
|
|
|
|
; RUN: llvm-as < %s | llc -march=c | grep __builtin_stack_restore
|
|
|
|
; PR1028
|
|
|
|
|
2007-01-26 16:25:06 +08:00
|
|
|
declare i8* @llvm.stacksave()
|
|
|
|
declare void @llvm.stackrestore(i8*)
|
2007-01-18 07:20:43 +08:00
|
|
|
|
2007-01-26 16:25:06 +08:00
|
|
|
define i8* @test() {
|
|
|
|
%s = call i8* @llvm.stacksave()
|
|
|
|
call void @llvm.stackrestore(i8* %s)
|
2007-01-18 07:20:43 +08:00
|
|
|
ret i8* %s
|
|
|
|
}
|