From 89f186267107229794e6eebfb9da8b9d8f00be62 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 14 Feb 2004 02:55:47 +0000 Subject: [PATCH] Add a testcase for the frameaddress and returnaddress intrinsics. llvm-svn: 11434 --- .../CBackend/2004-02-13-FrameReturnAddress.llx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/Regression/CBackend/2004-02-13-FrameReturnAddress.llx diff --git a/test/Regression/CBackend/2004-02-13-FrameReturnAddress.llx b/test/Regression/CBackend/2004-02-13-FrameReturnAddress.llx new file mode 100644 index 00000000000..613c03ecc98 --- /dev/null +++ b/test/Regression/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 +}