summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
index 73e29969a21..85154ffb14d 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
@@ -1027,8 +1027,13 @@ bool DAGTypeLegalizer::CustomWidenLowerNode(SDNode *N, EVT VT) {
// Update the widening map.
assert(Results.size() == N->getNumValues() &&
"Custom lowering returned the wrong number of results!");
- for (unsigned i = 0, e = Results.size(); i != e; ++i)
- SetWidenedVector(SDValue(N, i), Results[i]);
+ for (unsigned i = 0, e = Results.size(); i != e; ++i) {
+ // If this is a chain output just replace it.
+ if (Results[i].getValueType() == MVT::Other)
+ ReplaceValueWith(SDValue(N, i), Results[i]);
+ else
+ SetWidenedVector(SDValue(N, i), Results[i]);
+ }
return true;
}
OpenPOWER on IntegriCloud