From 23ce502cb7d9d06a1786d276a10be42e65759eca Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 25 Apr 2008 18:27:55 +0000 Subject: 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50279 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../multiple-return-values-cross-block-with-invoke.ll | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll (limited to 'test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll') diff --git a/test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll b/test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll new file mode 100644 index 0000000000..f21b645615 --- /dev/null +++ b/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 +} + -- cgit v1.2.3-70-g09d2