aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2013-07-02 09:58:53 +0000
committerTim Northover <tnorthover@apple.com>2013-07-02 09:58:53 +0000
commit5bce67a95feb136389ca630cc5dd6a81e97ff1eb (patch)
tree1bfc49fd1475a3b8752ae9a9a2f5eca5c9f38bbe /lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parentb19dd2bcaf219a3b5f144815c40b3f1b11a3d35d (diff)
downloadexternal_llvm-5bce67a95feb136389ca630cc5dd6a81e97ff1eb.zip
external_llvm-5bce67a95feb136389ca630cc5dd6a81e97ff1eb.tar.gz
external_llvm-5bce67a95feb136389ca630cc5dd6a81e97ff1eb.tar.bz2
DAGCombiner: fix use-counting issue when forming zextload
DAGCombiner was counting all uses of a load node when considering whether it's worth combining into a zextload. Really, it wants to ignore the chain and just count real uses. rdar://problem/13896307 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185419 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/DAGCombiner.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 00469b0..1688fc4 100644
--- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -2755,7 +2755,7 @@ SDValue DAGCombiner::visitAND(SDNode *N) {
? cast<LoadSDNode>(N0.getOperand(0))
: cast<LoadSDNode>(N0);
if (LN0->getExtensionType() != ISD::SEXTLOAD &&
- LN0->isUnindexed() && N0.hasOneUse() && LN0->hasOneUse()) {
+ LN0->isUnindexed() && N0.hasOneUse() && SDValue(LN0, 0).hasOneUse()) {
uint32_t ActiveBits = N1C->getAPIntValue().getActiveBits();
if (ActiveBits > 0 && APIntOps::isMask(ActiveBits, N1C->getAPIntValue())){
EVT ExtVT = EVT::getIntegerVT(*DAG.getContext(), ActiveBits);