From e2568a81dcc3c64b48315c57bbc66a4be383da88 Mon Sep 17 00:00:00 2001 From: James Molloy Date: Wed, 2 Sep 2015 10:15:32 +0000 Subject: [PATCH] [LV] Move some code around slightly to make the intent of the function more clear. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246636 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Vectorize/LoopVectorize.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/Transforms/Vectorize/LoopVectorize.cpp b/lib/Transforms/Vectorize/LoopVectorize.cpp index 6d4a134aa67..0975b03da17 100644 --- a/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -2870,12 +2870,10 @@ void InnerLoopVectorizer::createEmptyLoop() { // faster. emitMemRuntimeChecks(Lp, MiddleBlock); - // Add the start index to the loop count to get the new end index. - Value *CountRoundDown = getOrCreateVectorTripCount(Lp); - // Generate the induction variable. // The loop step is equal to the vectorization factor (num of SIMD elements) // times the unroll factor (num of SIMD instructions). + Value *CountRoundDown = getOrCreateVectorTripCount(Lp); Constant *Step = ConstantInt::get(IdxTy, VF * UF); Induction = createInductionVariable(Lp, StartIdx, CountRoundDown, Step, -- 2.34.1