diff options
author | Chris Lattner <sabre@nondot.org> | 2006-01-13 02:25:08 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-01-13 02:25:08 +0000 |
commit | 929db42702255b82b784f6353a1c960914be5208 (patch) | |
tree | fe4dc8d528cbb1a6cb00bf9f2e3ed948eb6dd013 | |
parent | e8f7a4bbee5b29d0c94120e7e24365113758f0a2 (diff) | |
download | external_llvm-929db42702255b82b784f6353a1c960914be5208.zip external_llvm-929db42702255b82b784f6353a1c960914be5208.tar.gz external_llvm-929db42702255b82b784f6353a1c960914be5208.tar.bz2 |
testcase for the llvm.stacksave/llvm.stackrestore intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25269 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/CodeGen/stacksave-restore.ll | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGen/stacksave-restore.ll b/test/CodeGen/stacksave-restore.ll new file mode 100644 index 0000000..8ef0dac --- /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 +} |