aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-11-08 06:56:05 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-11-08 06:56:05 +0000
commita4f53ef527e20310555f73e624e7343cda3496cd (patch)
treea0f2f4bf7f3486333623d0b75ceb10275f0a9682
parent3822ff5c71478c7c90a50ca57045fb676fcb5005 (diff)
Fixed a minor bug preventing some pre-indexed load / store transformation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31543 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/SelectionDAG/DAGCombiner.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index d8e2027d11..491a753b56 100644
--- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -239,8 +239,8 @@ namespace {
}
// Now check for #1 and #2.
- unsigned NumRealUses = 0;
if (OffIsAMImm) {
+ unsigned NumRealUses = 0;
for (SDNode::use_iterator I = Ptr.Val->use_begin(),
E = Ptr.Val->use_end(); I != E; ++I) {
SDNode *Use = *I;
@@ -260,9 +260,9 @@ namespace {
} else
NumRealUses++;
}
+ if (NumRealUses == 0)
+ return false;
}
- if (NumRealUses == 0)
- return false;
SDOperand Result = isLoad
? DAG.getIndexedLoad(SDOperand(N,0), BasePtr, Offset, AM)