aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-02-14 02:55:47 +0000
committerChris Lattner <sabre@nondot.org>2004-02-14 02:55:47 +0000
commitd64e0df32b2779827022624dde24d2763d4210b3 (patch)
treee3405612903ac02040903eb2c72b51881ad2a63a /test
parentfe1554a080cb820249eaf1777ab3236766f5e101 (diff)
downloadexternal_llvm-d64e0df32b2779827022624dde24d2763d4210b3.zip
external_llvm-d64e0df32b2779827022624dde24d2763d4210b3.tar.gz
external_llvm-d64e0df32b2779827022624dde24d2763d4210b3.tar.bz2
Add a testcase for the frameaddress and returnaddress intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11434 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CBackend/2004-02-13-FrameReturnAddress.llx14
-rw-r--r--test/CodeGen/CBackend/2004-02-13-FrameReturnAddress.llx14
2 files changed, 28 insertions, 0 deletions
diff --git a/test/CBackend/2004-02-13-FrameReturnAddress.llx b/test/CBackend/2004-02-13-FrameReturnAddress.llx
new file mode 100644
index 0000000..613c03e
--- /dev/null
+++ b/test/CBackend/2004-02-13-FrameReturnAddress.llx
@@ -0,0 +1,14 @@
+; RUN: llvm-as < %s | llc -march=c | grep builtin_return_address
+
+declare sbyte* %llvm.returnaddress(uint)
+declare sbyte* %llvm.frameaddress(uint)
+
+sbyte *%test1() {
+ %X = call sbyte* %llvm.returnaddress(uint 0)
+ ret sbyte* %X
+}
+
+sbyte *%test2() {
+ %X = call sbyte* %llvm.frameaddress(uint 0)
+ ret sbyte* %X
+}
diff --git a/test/CodeGen/CBackend/2004-02-13-FrameReturnAddress.llx b/test/CodeGen/CBackend/2004-02-13-FrameReturnAddress.llx
new file mode 100644
index 0000000..613c03e
--- /dev/null
+++ b/test/CodeGen/CBackend/2004-02-13-FrameReturnAddress.llx
@@ -0,0 +1,14 @@
+; RUN: llvm-as < %s | llc -march=c | grep builtin_return_address
+
+declare sbyte* %llvm.returnaddress(uint)
+declare sbyte* %llvm.frameaddress(uint)
+
+sbyte *%test1() {
+ %X = call sbyte* %llvm.returnaddress(uint 0)
+ ret sbyte* %X
+}
+
+sbyte *%test2() {
+ %X = call sbyte* %llvm.frameaddress(uint 0)
+ ret sbyte* %X
+}