]> granicus.if.org Git - llvm/commitdiff
[SLPVectorizer] Don't repeat VL.size() call. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 23 Mar 2019 12:11:25 +0000 (12:11 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 23 Mar 2019 12:11:25 +0000 (12:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356830 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Vectorize/SLPVectorizer.cpp

index 1e1f45a4ec03894d6497719d17d66ad727590085..8865dc4dc0b4831aa49f497c321d58c6d98fafea 100644 (file)
@@ -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<LoadInst>(Left[j])) {
       if (LoadInst *L1 = dyn_cast<LoadInst>(Right[j + 1])) {
         Instruction *VL1 = cast<Instruction>(VL[j]);