summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-05-24 02:35:39 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-05-24 02:35:39 +0000
commita4d187b8ce92dfec127542940e37acf325ac3576 (patch)
tree9ab0e99692671be7002332a9da09205ff90b738a /llvm/lib/CodeGen
parentb58bf9760328d96663d3127ca3545d22516ed0e7 (diff)
downloadbcm5719-llvm-a4d187b8ce92dfec127542940e37acf325ac3576.tar.gz
bcm5719-llvm-a4d187b8ce92dfec127542940e37acf325ac3576.zip
Fix a typo that caused combiner to create mal-formed pre-indexed store where value store is the same as the base pointer.
llvm-svn: 37318
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 05000115417..b646f5ecdc5 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -3267,12 +3267,12 @@ bool DAGCombiner::CombineToPreIndexedLoadStore(SDNode *N) {
return false;
// Try turning it into a pre-indexed load / store except when:
- // 1) The base is a frame index.
- // 2) If N is a store and the ptr is either the same as or is a
+ // 1) The new base ptr is a frame index.
+ // 2) If N is a store and the new base ptr is either the same as or is a
// predecessor of the value being stored.
- // 3) Another use of base ptr is a predecessor of N. If ptr is folded
+ // 3) Another use of old base ptr is a predecessor of N. If ptr is folded
// that would create a cycle.
- // 4) All uses are load / store ops that use it as base ptr.
+ // 4) All uses are load / store ops that use it as old base ptr.
// Check #1. Preinc'ing a frame index would require copying the stack pointer
// (plus the implicit offset) to a register to preinc anyway.
@@ -3282,11 +3282,11 @@ bool DAGCombiner::CombineToPreIndexedLoadStore(SDNode *N) {
// Check #2.
if (!isLoad) {
SDOperand Val = cast<StoreSDNode>(N)->getValue();
- if (Val == Ptr || Ptr.Val->isPredecessor(Val.Val))
+ if (Val == BasePtr || BasePtr.Val->isPredecessor(Val.Val))
return false;
}
- // Now check for #2 and #3.
+ // Now check for #3 and #4.
bool RealUse = false;
for (SDNode::use_iterator I = Ptr.Val->use_begin(),
E = Ptr.Val->use_end(); I != E; ++I) {
OpenPOWER on IntegriCloud