aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/sibcall.ll
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2010-04-30 01:12:32 +0000
committerEvan Cheng <evan.cheng@apple.com>2010-04-30 01:12:32 +0000
commit1361796dd081f5d6c6be4981e7563c5e46799aa4 (patch)
tree596812cefc7f290cb41bec659a9eeb4e156b3ca9 /test/CodeGen/X86/sibcall.ll
parent71cee76d26bdbb50d86a206717fe5b4265b396e7 (diff)
downloadexternal_llvm-1361796dd081f5d6c6be4981e7563c5e46799aa4.zip
external_llvm-1361796dd081f5d6c6be4981e7563c5e46799aa4.tar.gz
external_llvm-1361796dd081f5d6c6be4981e7563c5e46799aa4.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/CodeGen/X86/sibcall.ll')
-rw-r--r--test/CodeGen/X86/sibcall.ll18
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