summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r--llvm/test/CodeGen/X86/arg_returned_bitcast.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/arg_returned_bitcast.ll b/llvm/test/CodeGen/X86/arg_returned_bitcast.ll
new file mode 100644
index 00000000000..2287c129b75
--- /dev/null
+++ b/llvm/test/CodeGen/X86/arg_returned_bitcast.ll
@@ -0,0 +1,12 @@
+; RUN: llc < %s -mtriple=i686-unknown-linux-gnu | FileCheck %s
+
+; Test that the "returned" attribute "works" even if there is a bitcast between
+; the argument and return value.
+
+declare double* @bar(i8* returned)
+
+define double* @foo(i8*) {
+ %r = tail call double* @bar(i8* %0)
+; CHECK: jmp bar
+ ret double* %r
+}
OpenPOWER on IntegriCloud