aboutsummaryrefslogtreecommitdiffstats
path: root/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
commit83397363348662e9352455ea1e6e88e7026300a4 (patch)
tree693fa9fb65e49cff9f9f75adab1bc41893653494 /lib/CodeGen
parent7aa6189629bc85cb50bc57a2c2d7a5505176fa2b (diff)
downloadexternal_llvm-83397363348662e9352455ea1e6e88e7026300a4.zip
external_llvm-83397363348662e9352455ea1e6e88e7026300a4.tar.gz
external_llvm-83397363348662e9352455ea1e6e88e7026300a4.tar.bz2
fix a bug I introduced that broke recursive expansion of nodes (e.g. scalarizing vectors)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24905 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeDAG.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index a1bd7e8..69ed69c 100644
--- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/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);
+ }
}