[llvm-commits] [llvm] r82215 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Evan Cheng evan.cheng at apple.com
Fri Sep 18 01:26:06 PDT 2009


Author: evancheng
Date: Fri Sep 18 03:26:06 2009
New Revision: 82215

URL: http://llvm.org/viewvc/llvm-project?rev=82215&view=rev
Log:
Revert r82214. It broke 403.gcc on x86_64 / Darwin.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=82215&r1=82214&r2=82215&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Fri Sep 18 03:26:06 2009
@@ -982,7 +982,6 @@
   
   // 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 @@
         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;
+          }
         }
       }
       





More information about the llvm-commits mailing list