mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
Don't forget the existing root.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19531 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
39ce11b97b
commit
5a6c6d98d5
@ -878,10 +878,8 @@ void SelectionDAGISel::BuildSelectionDAG(SelectionDAG &DAG, BasicBlock *LLVMBB,
|
|||||||
ConstantsOut.clear();
|
ConstantsOut.clear();
|
||||||
|
|
||||||
// Turn all of the unordered chains into one factored node.
|
// Turn all of the unordered chains into one factored node.
|
||||||
switch (UnorderedChains.size()) {
|
if (!UnorderedChains.empty()) {
|
||||||
case 0: break;
|
UnorderedChains.push_back(DAG.getRoot());
|
||||||
case 1: DAG.setRoot(UnorderedChains[0]); break;
|
|
||||||
default:
|
|
||||||
DAG.setRoot(DAG.getNode(ISD::TokenFactor, MVT::Other, UnorderedChains));
|
DAG.setRoot(DAG.getNode(ISD::TokenFactor, MVT::Other, UnorderedChains));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user