[SLPVectorizer] Prefer pre-increments. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 5 May 2019 17:53:09 +0000 (17:53 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 5 May 2019 17:53:09 +0000 (17:53 +0000)
llvm-svn: 359989

llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

index 56176e5..ff9a2d2 100644 (file)
@@ -4350,7 +4350,7 @@ bool BoUpSLP::BlockScheduling::extendSchedulingRegion(Value *V,
                           << "\n");
         return true;
       }
-      UpIter++;
+      ++UpIter;
     }
     if (DownIter != LowerEnd) {
       if (&*DownIter == I) {
@@ -4364,7 +4364,7 @@ bool BoUpSLP::BlockScheduling::extendSchedulingRegion(Value *V,
                           << "\n");
         return true;
       }
-      DownIter++;
+      ++DownIter;
     }
     assert((UpIter != UpperEnd || DownIter != LowerEnd) &&
            "instruction not found in block");
@@ -6650,7 +6650,7 @@ bool SLPVectorizerPass::vectorizeChainsInBlock(BasicBlock *BB, BoUpSLP &R) {
 
   SmallVector<WeakVH, 8> PostProcessInstructions;
   SmallDenseSet<Instruction *, 4> KeyNodes;
-  for (BasicBlock::iterator it = BB->begin(), e = BB->end(); it != e; it++) {
+  for (BasicBlock::iterator it = BB->begin(), e = BB->end(); it != e; ++it) {
     // We may go through BB multiple times so skip the one we have checked.
     if (!VisitedInstrs.insert(&*it).second) {
       if (it->use_empty() && KeyNodes.count(&*it) > 0 &&