diff --git a/test/CodeGen/stacksave-restore.ll b/test/CodeGen/stacksave-restore.ll new file mode 100644 index 00000000000..8ef0dac46d7 --- /dev/null +++ b/test/CodeGen/stacksave-restore.ll @@ -0,0 +1,12 @@ +; RUN: llvm-as < %s | llc + +declare sbyte* %llvm.stacksave() +declare void %llvm.stackrestore(sbyte*) + +int *%test(uint %N) { + %tmp = call sbyte* %llvm.stacksave() + %P = alloca int, uint %N + call void %llvm.stackrestore(sbyte* %tmp) + %Q = alloca int, uint %N + ret int* %P +}