[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)
llvm-svn: 356830

llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

index 1e1f45a..8865dc4 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]);