From f4f01f3cffde43af9539212158a5a9fd5a34ded5 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Sat, 23 Mar 2019 12:11:25 +0000 Subject: [PATCH] [SLPVectorizer] Don't repeat VL.size() call. NFCI. llvm-svn: 356830 --- llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]); -- 2.7.4