diff options
author | Craig Topper <craig.topper@gmail.com> | 2017-02-28 16:52:05 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2017-02-28 16:52:05 +0000 |
commit | 419f145ebb6fb7d31fd0c2d415ba44c2fe3be21f (patch) | |
tree | e8c0135aedde575e82a867612a80f25b7ee9f633 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
parent | d088de61168a162670cb10d0b99820c5eab849e9 (diff) | |
download | bcm5719-llvm-419f145ebb6fb7d31fd0c2d415ba44c2fe3be21f.tar.gz bcm5719-llvm-419f145ebb6fb7d31fd0c2d415ba44c2fe3be21f.zip |
[DAGISel] When checking if chain node is foldable, make sure the intermediate nodes have a single use across all results not just the result that was used to reach the chain node.
This recovers a test case that was severely broken by r296476, my making sure we don't create ADD/ADC that loads and stores when there is also a flag dependency.
llvm-svn: 296486
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index d980c4d019a..645c9d2616a 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -3345,7 +3345,7 @@ void SelectionDAGISel::SelectCodeCommon(SDNode *NodeToMatch, // a single use. bool HasMultipleUses = false; for (unsigned i = 1, e = NodeStack.size()-1; i != e; ++i) - if (!NodeStack[i].hasOneUse()) { + if (!NodeStack[i].getNode()->hasOneUse()) { HasMultipleUses = true; break; } |