aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-07-26 18:15:41 +0000
committerDan Gohman <gohman@apple.com>2010-07-26 18:15:41 +0000
commit7da5d3fc657bf434a245d11ad91f22feb86296c5 (patch)
tree8fc80d7ac32c406de16feb1220143659a7543526
parentd805bcbb0662ef82aa3864cd71a26dedbcc38e79 (diff)
Handle Values with no value in getCopyFromRegs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109415 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index 723e0f0a91..1c8f22a2a2 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -530,6 +530,10 @@ SDValue RegsForValue::getCopyFromRegs(SelectionDAG &DAG,
FunctionLoweringInfo &FuncInfo,
DebugLoc dl,
SDValue &Chain, SDValue *Flag) const {
+ // A Value with type {} or [0 x %t] needs no registers.
+ if (ValueVTs.empty())
+ return SDValue();
+
const TargetLowering &TLI = DAG.getTargetLoweringInfo();
// Assemble the legal parts into the final values.