forked from OSchip/llvm-project
[SelectionDAG] Allow custom vector widening through ReplaceNodeResults to handle nodes with chain outputs.
Previously we were assuming all results were vectors and calling SetWidenedVector, but if its a chain result we should just replace uses instead. This fixes an error found by expensive checks after r318368. llvm-svn: 318509
This commit is contained in:
parent
1ac6e8ae61
commit
e9a6456ab3
|
@ -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)
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue