diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2009-09-18 08:26:06 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2009-09-18 08:26:06 +0000 |
| commit | f4db6396e084dc2253a63fbd42335bed2bcac22b (patch) | |
| tree | 18bd42e19e351bdbe02c9639f27507f3c75b8d5e /llvm/lib/CodeGen | |
| parent | 6ba1931d6017eb40a8bf605a7b15d37f18f61bca (diff) | |
| download | bcm5719-llvm-f4db6396e084dc2253a63fbd42335bed2bcac22b.tar.gz bcm5719-llvm-f4db6396e084dc2253a63fbd42335bed2bcac22b.zip | |
Revert r82214. It broke 403.gcc on x86_64 / Darwin.
llvm-svn: 82215
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index e2fab1b1b80..19ea6473115 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -982,7 +982,6 @@ SelectionDAGISel::FinishBasicBlock() { // If we generated any switch lowering information, build and codegen any // additional DAGs necessary. - SmallSet<unsigned, 4> Processed; for (unsigned i = 0, e = SDL->SwitchCases.size(); i != e; ++i) { // Set the current basic block to the mbb we wish to insert the code into BB = SDL->SwitchCases[i].ThisBB; @@ -1005,18 +1004,12 @@ SelectionDAGISel::FinishBasicBlock() { for (unsigned pn = 0; ; ++pn) { assert(pn != SDL->PHINodesToUpdate.size() && "Didn't find PHI entry!"); - if (SDL->PHINodesToUpdate[pn].first != Phi) - continue; - if (!Processed.insert(pn)) - // Already processed, done. We can't have the value from more than - // one edges. + if (SDL->PHINodesToUpdate[pn].first == Phi) { + Phi->addOperand(MachineOperand::CreateReg(SDL->PHINodesToUpdate[pn]. + second, false)); + Phi->addOperand(MachineOperand::CreateMBB(SDL->SwitchCases[i].ThisBB)); break; - Phi->addOperand(MachineOperand::CreateReg(SDL->PHINodesToUpdate[pn]. - second, false)); - assert(BB->isPred(SDL->SwitchCases[i].ThisBB) && - "phi value cannot come from a bb that is not a predecessor!"); - Phi->addOperand(MachineOperand::CreateMBB(SDL->SwitchCases[i].ThisBB)); - break; + } } } |

