mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 19:31:58 +00:00
LoopVectorize: PHI nodes are always at the beginning of a block, no need to scan the whole block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190422 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fd2210a78d
commit
8e12d95d15
@ -2175,7 +2175,7 @@ InnerLoopVectorizer::vectorizeLoop(LoopVectorizationLegality *Legal) {
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user