summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2017-02-28 16:52:05 +0000
committerCraig Topper <craig.topper@gmail.com>2017-02-28 16:52:05 +0000
commit419f145ebb6fb7d31fd0c2d415ba44c2fe3be21f (patch)
treee8c0135aedde575e82a867612a80f25b7ee9f633 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
parentd088de61168a162670cb10d0b99820c5eab849e9 (diff)
downloadbcm5719-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.cpp2
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;
}
OpenPOWER on IntegriCloud