diff options
| author | Chris Lattner <sabre@nondot.org> | 2005-01-13 19:53:14 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2005-01-13 19:53:14 +0000 |
| commit | 2451684678ab9c59affd5f7a36885f8164a38573 (patch) | |
| tree | 98715e6d69b869cbdb0c15f6e14ed6c1a7b45ed7 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
| parent | 74bc42304ca538a72a99ea7429f9f281ea7f1ef4 (diff) | |
| download | bcm5719-llvm-2451684678ab9c59affd5f7a36885f8164a38573.tar.gz bcm5719-llvm-2451684678ab9c59affd5f7a36885f8164a38573.zip | |
Don't forget the existing root.
llvm-svn: 19531
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 8f0a916d68d..6a81975292c 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -878,10 +878,8 @@ void SelectionDAGISel::BuildSelectionDAG(SelectionDAG &DAG, BasicBlock *LLVMBB, ConstantsOut.clear(); // Turn all of the unordered chains into one factored node. - switch (UnorderedChains.size()) { - case 0: break; - case 1: DAG.setRoot(UnorderedChains[0]); break; - default: + if (!UnorderedChains.empty()) { + UnorderedChains.push_back(DAG.getRoot()); DAG.setRoot(DAG.getNode(ISD::TokenFactor, MVT::Other, UnorderedChains)); } |

