summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-12-21 18:02:52 +0000
committerChris Lattner <sabre@nondot.org>2005-12-21 18:02:52 +0000
commitac12f684240b5f868cbbeb0e82ae9c9a9b052ef1 (patch)
treedb3149d9a0e485a49a8fb1d01b053a8ab950c77b /llvm/lib/CodeGen
parenta054d129ea1a8f2525bf6588066a00c1f1dfcca6 (diff)
downloadbcm5719-llvm-ac12f684240b5f868cbbeb0e82ae9c9a9b052ef1.tar.gz
bcm5719-llvm-ac12f684240b5f868cbbeb0e82ae9c9a9b052ef1.zip
fix a bug I introduced that broke recursive expansion of nodes (e.g. scalarizing vectors)
llvm-svn: 24905
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index a1bd7e832f8..69ed69cc643 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -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);
+ }
}
OpenPOWER on IntegriCloud