[llvm] r190422 - LoopVectorize: PHI nodes are always at the beginning of a block, no need to scan the whole block.
Benjamin Kramer
benny.kra at googlemail.com
Tue Sep 10 11:46:16 PDT 2013
Author: d0k
Date: Tue Sep 10 13:46:15 2013
New Revision: 190422
URL: http://llvm.org/viewvc/llvm-project?rev=190422&view=rev
Log:
LoopVectorize: PHI nodes are always at the beginning of a block, no need to scan the whole block.
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=190422&r1=190421&r2=190422&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp Tue Sep 10 13:46:15 2013
@@ -2175,7 +2175,7 @@ InnerLoopVectorizer::vectorizeLoop(LoopV
for (BasicBlock::iterator LEI = LoopExitBlock->begin(),
LEE = LoopExitBlock->end(); LEI != LEE; ++LEI) {
PHINode *LCSSAPhi = dyn_cast<PHINode>(LEI);
- if (!LCSSAPhi) continue;
+ if (!LCSSAPhi) break;
// All PHINodes need to have a single entry edge, or two if
// we already fixed them.
@@ -2208,7 +2208,7 @@ void InnerLoopVectorizer::fixLCSSAPHIs()
for (BasicBlock::iterator LEI = LoopExitBlock->begin(),
LEE = LoopExitBlock->end(); LEI != LEE; ++LEI) {
PHINode *LCSSAPhi = dyn_cast<PHINode>(LEI);
- if (!LCSSAPhi) continue;
+ if (!LCSSAPhi) break;
if (LCSSAPhi->getNumIncomingValues() == 1)
LCSSAPhi->addIncoming(UndefValue::get(LCSSAPhi->getType()),
LoopMiddleBlock);
More information about the llvm-commits
mailing list