diff options
author | Evan Cheng <evan.cheng@apple.com> | 2010-04-30 01:12:32 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2010-04-30 01:12:32 +0000 |
commit | 1facdf2c6ffbb942e5d13d60ddb763cdb37c2991 (patch) | |
tree | 596812cefc7f290cb41bec659a9eeb4e156b3ca9 /test | |
parent | 9dcf5529eb20919cd6179f227dcc7a3ef77f75df (diff) | |
download | external_llvm-1facdf2c6ffbb942e5d13d60ddb763cdb37c2991.zip external_llvm-1facdf2c6ffbb942e5d13d60ddb763cdb37c2991.tar.gz external_llvm-1facdf2c6ffbb942e5d13d60ddb763cdb37c2991.tar.bz2 |
Another sibcall bug. If caller and callee calling conventions differ, then it's only safe to do a tail call if the results are returned in the same way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102683 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/X86/sibcall.ll | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGen/X86/sibcall.ll b/test/CodeGen/X86/sibcall.ll index 8e52a7c..ff581ae 100644 --- a/test/CodeGen/X86/sibcall.ll +++ b/test/CodeGen/X86/sibcall.ll @@ -313,3 +313,21 @@ entry: } declare void @foo() + +; If caller / callee calling convention mismatch then check if the return +; values are returned in the same registers. +; rdar://7874780 + +define double @t20(double %x) nounwind { +entry: +; 32: t20: +; 32: call {{_?}}foo20 +; 32: fldl (%esp) + +; 64: t20: +; 64: jmp {{_?}}foo20 + %0 = tail call fastcc double @foo20(double %x) nounwind + ret double %0 +} + +declare fastcc double @foo20(double) nounwind |