summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit6823900e556d5c5b7f5e7ddbf251eb26cd3732e4 (patch)
tree772cdaee609c403b0cc2b0acafdab4e7e4fb3913 /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parentdba1c5587c374d493c25e1d36d8a525d0f00c690 (diff)
downloadbcm5719-llvm-6823900e556d5c5b7f5e7ddbf251eb26cd3732e4.tar.gz
bcm5719-llvm-6823900e556d5c5b7f5e7ddbf251eb26cd3732e4.zip
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 llvm-svn: 185419
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 00469b0f32a..1688fc495ad 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud