summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-04-25 18:27:55 +0000
committerDan Gohman <gohman@apple.com>2008-04-25 18:27:55 +0000
commitca95a5f49f976c45ef931a4eca8d1ec2e3f1738b (patch)
treedb27b120fee1f7cb62d2955d9b9d8f85a22c09f3 /llvm/test/CodeGen
parent6d653b58f994b13f84f71dfaacfa5249cd6de20e (diff)
downloadbcm5719-llvm-ca95a5f49f976c45ef931a4eca8d1ec2e3f1738b.tar.gz
bcm5719-llvm-ca95a5f49f976c45ef931a4eca8d1ec2e3f1738b.zip
Remove the code from CodeGenPrepare that moved getresult instructions
to the block that defines their operands. This doesn't work in the case that the operand is an invoke, because invoke is a terminator and must be the last instruction in a block. Replace it with support in SelectionDAGISel for copying struct values into sequences of virtual registers. llvm-svn: 50279
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r--llvm/test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll18
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll b/llvm/test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll
new file mode 100644
index 00000000000..f21b645615a
--- /dev/null
+++ b/llvm/test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll
@@ -0,0 +1,18 @@
+; RUN: llvm-as < %s | llc
+
+declare { i64, double } @wild()
+
+define void @foo(i64* %p, double* %q) nounwind {
+ %t = invoke { i64, double } @wild() to label %normal unwind label %handler
+
+normal:
+ %mrv_gr = getresult { i64, double } %t, 0
+ store i64 %mrv_gr, i64* %p
+ %mrv_gr12681 = getresult { i64, double } %t, 1
+ store double %mrv_gr12681, double* %q
+ ret void
+
+handler:
+ ret void
+}
+
OpenPOWER on IntegriCloud