[llvm] r275243 - [LoopVectorize] Further cleanups
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 12 20:24:38 PDT 2016
Author: majnemer
Date: Tue Jul 12 22:24:38 2016
New Revision: 275243
URL: http://llvm.org/viewvc/llvm-project?rev=275243&view=rev
Log:
[LoopVectorize] Further cleanups
No functional change is intended, just a minor cleanup.
Modified:
llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
Modified: llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp?rev=275243&r1=275242&r2=275243&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp Tue Jul 12 22:24:38 2016
@@ -2601,9 +2601,7 @@ void InnerLoopVectorizer::scalarizeInstr
setDebugLocFromInst(Builder, Instr);
// Find all of the vectorized parameters.
- for (unsigned op = 0, e = Instr->getNumOperands(); op != e; ++op) {
- Value *SrcOp = Instr->getOperand(op);
-
+ for (Value *SrcOp : Instr->operands()) {
// If we are accessing the old induction variable, use the new one.
if (SrcOp == OldInduction) {
Params.push_back(getVectorValue(SrcOp));
@@ -2611,7 +2609,7 @@ void InnerLoopVectorizer::scalarizeInstr
}
// Try using previously calculated values.
- Instruction *SrcInst = dyn_cast<Instruction>(SrcOp);
+ auto *SrcInst = dyn_cast<Instruction>(SrcOp);
// If the src is an instruction that appeared earlier in the basic block,
// then it should already be vectorized.
More information about the llvm-commits
mailing list