diff options
author | Nirav Dave <niravd@google.com> | 2017-03-14 01:42:23 +0000 |
---|---|---|
committer | Nirav Dave <niravd@google.com> | 2017-03-14 01:42:23 +0000 |
commit | 4fc8401abf0ab748d041843cb7a02cfac44686be (patch) | |
tree | a3a01bf569c640938103651f2fe01ebabe7ffa73 /llvm/lib/CodeGen | |
parent | 4f821702ec4d443f0cf0987d87a52da444a16def (diff) | |
download | bcm5719-llvm-4fc8401abf0ab748d041843cb7a02cfac44686be.tar.gz bcm5719-llvm-4fc8401abf0ab748d041843cb7a02cfac44686be.zip |
Recommitting Craig Topper's patch now that r296476 has been recommitted.
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: 297698
Diffstat (limited to 'llvm/lib/CodeGen')
-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 fb1c3bcea59..123938646a3 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -3355,7 +3355,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; } |