diff options
author | Michael Zolotukhin <mzolotukhin@apple.com> | 2015-07-08 21:47:56 +0000 |
---|---|---|
committer | Michael Zolotukhin <mzolotukhin@apple.com> | 2015-07-08 21:47:56 +0000 |
commit | 66f5591f9b767658d9f1b87c64f083e9e2dc3404 (patch) | |
tree | e8733dd4114ac4afdfb28f6341180f3968146108 /llvm | |
parent | 00345cadd5b2620adaa4f8b03fd56638bff945f8 (diff) | |
download | bcm5719-llvm-66f5591f9b767658d9f1b87c64f083e9e2dc3404.tar.gz bcm5719-llvm-66f5591f9b767658d9f1b87c64f083e9e2dc3404.zip |
[LoopVectorizer] Remove redundant variables PastOverflowCheck and OverflowCheckAnchor. NFCI.
llvm-svn: 241740
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index 0a3f8bfe44b..740ee15de33 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -2564,14 +2564,6 @@ void InnerLoopVectorizer::createEmptyLoop() { IdxTy): ConstantInt::get(IdxTy, 0); - // We need an instruction to anchor the overflow check on. StartIdx needs to - // be defined before the overflow check branch. Because the scalar preheader - // is going to merge the start index and so the overflow branch block needs to - // contain a definition of the start index. - Instruction *OverflowCheckAnchor = BinaryOperator::CreateAdd( - StartIdx, ConstantInt::get(IdxTy, 0), "overflow.check.anchor", - BypassBlock->getTerminator()); - // Count holds the overall loop count (N). Value *Count = Exp.expandCodeFor(ExitCount, ExitCount->getType(), BypassBlock->getTerminator()); @@ -2617,9 +2609,8 @@ void InnerLoopVectorizer::createEmptyLoop() { // Generate code to check that the loop's trip count that we computed by // adding one to the backedge-taken count will not overflow. - auto PastOverflowCheck = std::next(BasicBlock::iterator(OverflowCheckAnchor)); - BasicBlock *CheckBlock = - BypassBlock->splitBasicBlock(PastOverflowCheck, "overflow.checked"); + BasicBlock *CheckBlock = BypassBlock->splitBasicBlock( + BypassBlock->getTerminator(), "overflow.checked"); if (ParentLoop) ParentLoop->addBasicBlockToLoop(CheckBlock, *LI); LoopBypassBlocks.push_back(CheckBlock); |