[llvm] r356830 - [SLPVectorizer] Don't repeat VL.size() call. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 23 05:11:25 PDT 2019
Author: rksimon
Date: Sat Mar 23 05:11:25 2019
New Revision: 356830
URL: http://llvm.org/viewvc/llvm-project?rev=356830&view=rev
Log:
[SLPVectorizer] Don't repeat VL.size() call. NFCI.
Modified:
llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp
Modified: llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp?rev=356830&r1=356829&r2=356830&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp Sat Mar 23 05:11:25 2019
@@ -2809,7 +2809,7 @@ void BoUpSLP::reorderAltShuffleOperands(
// 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]);
More information about the llvm-commits
mailing list