fix a bug I introduced that broke recursive expansion of nodes (e.g. scalarizing vectors)

llvm-svn: 24905
This commit is contained in:
Chris Lattner 2005-12-21 18:02:52 +00:00
parent a054d129ea
commit ac12f68424
1 changed files with 6 additions and 3 deletions

View File

@ -3827,9 +3827,12 @@ void SelectionDAGLegalize::ExpandOp(SDOperand Op, SDOperand &Lo, SDOperand &Hi){
std::make_pair(Lo, Hi))).second;
assert(isNew && "Value already expanded?!?");
// Make sure the resultant values have been legalized themselves.
Lo = LegalizeOp(Lo);
Hi = LegalizeOp(Hi);
// Make sure the resultant values have been legalized themselves, unless this
// is a type that requires multi-step expansion.
if (getTypeAction(NVT) != Expand && NVT != MVT::isVoid) {
Lo = LegalizeOp(Lo);
Hi = LegalizeOp(Hi);
}
}