diff options
author | Nadav Rotem <nrotem@apple.com> | 2012-11-30 22:37:11 +0000 |
---|---|---|
committer | Nadav Rotem <nrotem@apple.com> | 2012-11-30 22:37:11 +0000 |
commit | d6964741f52d2553517209319fa214afe8b3812b (patch) | |
tree | 0262b62f66873b1adffc1e0dc5ba50a61da7bbe9 /lib/Transforms/Vectorize/LoopVectorize.cpp | |
parent | 999d8bc38e2d8fad5acd978517bc6ba3047fa201 (diff) |
minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169048 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Vectorize/LoopVectorize.cpp')
-rw-r--r-- | lib/Transforms/Vectorize/LoopVectorize.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/Transforms/Vectorize/LoopVectorize.cpp b/lib/Transforms/Vectorize/LoopVectorize.cpp index d55b7bd360..8be31dc86d 100644 --- a/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -712,7 +712,7 @@ SingleBlockLoopVectorizer::addRuntimeCheck(LoopVectorizationLegality *Legal, const SCEV *Sc = SE->getSCEV(Ptr); if (SE->isLoopInvariant(Sc, OrigLoop)) { - DEBUG(dbgs() << "LV1: Adding RT check for a loop invariant ptr:" << + DEBUG(dbgs() << "LV: Adding RT check for a loop invariant ptr:" << *Ptr <<"\n"); Starts.push_back(Ptr); Ends.push_back(Ptr); @@ -1423,11 +1423,7 @@ void SingleBlockLoopVectorizer::updateAnalysis() { } bool LoopVectorizationLegality::canVectorize() { - if (!TheLoop->getLoopPreheader()) { - assert(false && "No preheader!!"); - DEBUG(dbgs() << "LV: Loop not normalized." << "\n"); - return false; - } + assert(TheLoop->getLoopPreheader() && "No preheader!!"); // We can only vectorize single basic block loops. unsigned NumBlocks = TheLoop->getNumBlocks(); @@ -2008,9 +2004,8 @@ LoopVectorizationCostModel::getInstructionCost(Instruction *I, unsigned VF) { case Instruction::AShr: case Instruction::And: case Instruction::Or: - case Instruction::Xor: { + case Instruction::Xor: return VTTI->getArithmeticInstrCost(I->getOpcode(), VectorTy); - } case Instruction::Select: { SelectInst *SI = cast<SelectInst>(I); const SCEV *CondSCEV = SE->getSCEV(SI->getCondition()); |