diff options
author | Bill Wendling <isanbard@gmail.com> | 2009-01-16 19:25:27 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2009-01-16 19:25:27 +0000 |
commit | 64e87326d9cec962018d3f6274a8f2b84d0274a1 (patch) | |
tree | a9715679e1da6ffbeead60e880cf6757a8bbd8bc /test/CodeGen/X86 | |
parent | 4d544a2c807756af6bffc71f1967f22e8045d02e (diff) | |
download | external_llvm-64e87326d9cec962018d3f6274a8f2b84d0274a1.zip external_llvm-64e87326d9cec962018d3f6274a8f2b84d0274a1.tar.gz external_llvm-64e87326d9cec962018d3f6274a8f2b84d0274a1.tar.bz2 |
Add support for non-zero __builtin_return_address values on X86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62338 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86')
-rw-r--r-- | test/CodeGen/X86/ret-addr.ll | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/CodeGen/X86/ret-addr.ll b/test/CodeGen/X86/ret-addr.ll new file mode 100644 index 0000000..06a10c6 --- /dev/null +++ b/test/CodeGen/X86/ret-addr.ll @@ -0,0 +1,22 @@ +; RUN: llvm-as < %s | llc -disable-fp-elim -march=x86 | not grep xor +; RUN: llvm-as < %s | llc -disable-fp-elim -march=x86-64 | not grep xor + +define i8* @h() nounwind readnone optsize { +entry: + %0 = tail call i8* @llvm.returnaddress(i32 2) ; <i8*> [#uses=1] + ret i8* %0 +} + +declare i8* @llvm.returnaddress(i32) nounwind readnone + +define i8* @g() nounwind readnone optsize { +entry: + %0 = tail call i8* @llvm.returnaddress(i32 1) ; <i8*> [#uses=1] + ret i8* %0 +} + +define i8* @f() nounwind readnone optsize { +entry: + %0 = tail call i8* @llvm.returnaddress(i32 0) ; <i8*> [#uses=1] + ret i8* %0 +} |