From afb0e664e6440bfc8c5f19546b82555c8c598431 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Sun, 5 May 2019 17:53:09 +0000 Subject: [PATCH] [SLPVectorizer] Prefer pre-increments. NFCI. llvm-svn: 359989 --- llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp index 56176e5..ff9a2d2 100644 --- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp +++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp @@ -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 PostProcessInstructions; SmallDenseSet 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 && -- 2.7.4