[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Evan Cheng evan.cheng at apple.com
Tue Nov 7 22:56:19 PST 2006



Changes in directory llvm/lib/CodeGen/SelectionDAG:

DAGCombiner.cpp updated: 1.240 -> 1.241
---
Log message:

Fixed a minor bug preventing some pre-indexed load / store transformation.


---
Diffs of the changes:  (+3 -3)

 DAGCombiner.cpp |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.240 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.241
--- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.240	Tue Nov  7 20:38:55 2006
+++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp	Wed Nov  8 00:56:05 2006
@@ -239,8 +239,8 @@
           }
 
           // 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 @@
               } else
                 NumRealUses++;
             }
+            if (NumRealUses == 0)
+              return false;
           }
-          if (NumRealUses == 0)
-            return false;
 
           SDOperand Result = isLoad
             ? DAG.getIndexedLoad(SDOperand(N,0), BasePtr, Offset, AM)






More information about the llvm-commits mailing list