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 | 5117a555e0aa36013d6191bab6f0cc297b3dc31d (patch) | |
| tree | f3ac085f0cc253321a1d39a0e7618bedc4f9a82f /llvm/test/CodeGen/X86/sibcall.ll | |
| parent | 4a623eed2641a777202a8c1adc8ae0490f597dad (diff) | |
| download | bcm5719-llvm-5117a555e0aa36013d6191bab6f0cc297b3dc31d.tar.gz bcm5719-llvm-5117a555e0aa36013d6191bab6f0cc297b3dc31d.zip | |
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.
llvm-svn: 102683
Diffstat (limited to 'llvm/test/CodeGen/X86/sibcall.ll')
| -rw-r--r-- | llvm/test/CodeGen/X86/sibcall.ll | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/sibcall.ll b/llvm/test/CodeGen/X86/sibcall.ll index 8e52a7cbfe7..ff581ae2b5e 100644 --- a/llvm/test/CodeGen/X86/sibcall.ll +++ b/llvm/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 |

