From d64e0df32b2779827022624dde24d2763d4210b3 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11434 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CBackend/2004-02-13-FrameReturnAddress.llx | 14 ++++++++++++++ .../CBackend/2004-02-13-FrameReturnAddress.llx | 14 ++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 test/CBackend/2004-02-13-FrameReturnAddress.llx create mode 100644 test/CodeGen/CBackend/2004-02-13-FrameReturnAddress.llx diff --git a/test/CBackend/2004-02-13-FrameReturnAddress.llx b/test/CBackend/2004-02-13-FrameReturnAddress.llx new file mode 100644 index 00000000000..613c03ecc98 --- /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 00000000000..613c03ecc98 --- /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 +} -- 2.34.1