summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
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
commit6072435756f5b29dd2c957165a24aad2afc9a5ad (patch)
tree0a87eb28e13c9d1bd2db6592fc9e3aeb2c8ff94e /llvm/lib/CodeGen
parentfdff938a7e4988da80be038acb1c6717d61b531a (diff)
downloadbcm5719-llvm-6072435756f5b29dd2c957165a24aad2afc9a5ad.tar.gz
bcm5719-llvm-6072435756f5b29dd2c957165a24aad2afc9a5ad.zip
Fixed a minor bug preventing some pre-indexed load / store transformation.
llvm-svn: 31543
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index d8e2027d11a..491a753b56e 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/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)
OpenPOWER on IntegriCloud