summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
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
commit2810bacafb75574c92b2437cc2dce1353764160b (patch)
treedcd4d9015175f3cae3f70a9d7eb2557edd73d1e8 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
parent9dfbb844641577069627105d5423a4f1d7812d7d (diff)
downloadbcm5719-llvm-2810bacafb75574c92b2437cc2dce1353764160b.tar.gz
bcm5719-llvm-2810bacafb75574c92b2437cc2dce1353764160b.zip
Handle Values with no value in getCopyFromRegs.
llvm-svn: 109415
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index 723e0f0a914..1c8f22a2a25 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud