fix copy/paste/modify think-o
authorJim Grosbach <grosbach@apple.com>
Tue, 8 Jun 2010 22:53:32 +0000 (22:53 +0000)
committerJim Grosbach <grosbach@apple.com>
Tue, 8 Jun 2010 22:53:32 +0000 (22:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105653 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMLoadStoreOptimizer.cpp

index f11575eacfe06ec22af910f9a91af6fc9fb23e3d..b39d44fb6f9717f6a27625f09e4a54b7e7e481e4 100644 (file)
@@ -694,7 +694,7 @@ bool ARMLoadStoreOpt::MergeBaseUpdateLoadStore(MachineBasicBlock &MBB,
   }
 
   // Try merging with the next instruction.
-  MachineBasicBlock::iterator EndMBBI = MBB.begin();
+  MachineBasicBlock::iterator EndMBBI = MBB.end();
   if (!DoMerge && MBBI != EndMBBI) {
     MachineBasicBlock::iterator NextMBBI = llvm::next(MBBI);
     while (NextMBBI != EndMBBI && NextMBBI->isDebugValue())