From: Simon Pilgrim Date: Sat, 23 Mar 2019 12:11:25 +0000 (+0000) Subject: [SLPVectorizer] Don't repeat VL.size() call. NFCI. X-Git-Tag: llvmorg-10-init~9321 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f4f01f3cffde43af9539212158a5a9fd5a34ded5;p=platform%2Fupstream%2Fllvm.git [SLPVectorizer] Don't repeat VL.size() call. NFCI. llvm-svn: 356830 --- diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp index 1e1f45a..8865dc4 100644 --- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp +++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp @@ -2809,7 +2809,7 @@ void BoUpSLP::reorderAltShuffleOperands(const InstructionsState &S, // Reorder if we have a commutative operation and consecutive access // are on either side of the alternate instructions. - for (unsigned j = 0; j < VL.size() - 1; ++j) { + for (unsigned j = 0, e = VL.size() - 1; j < e; ++j) { if (LoadInst *L = dyn_cast(Left[j])) { if (LoadInst *L1 = dyn_cast(Right[j + 1])) { Instruction *VL1 = cast(VL[j]);