diff options
| author | Michael Kuperstein <mkuper@google.com> | 2016-07-12 21:24:06 +0000 | 
|---|---|---|
| committer | Michael Kuperstein <mkuper@google.com> | 2016-07-12 21:24:06 +0000 | 
| commit | a99c46cc73a70b57972c07562072ec5aeb6d8f4c (patch) | |
| tree | f5baa8c5bc71fac921cf6f07da339caa399cea56 /llvm/lib/Transforms | |
| parent | 1e44b5d3abc7b8180d2479c39faadf507693401d (diff) | |
| download | bcm5719-llvm-a99c46cc73a70b57972c07562072ec5aeb6d8f4c.tar.gz bcm5719-llvm-a99c46cc73a70b57972c07562072ec5aeb6d8f4c.zip | |
[LV] Remove wrong assumption about LCSSA
The LCSSA pass itself will not generate several redundant PHI nodes in a single
exit block. However, such redundant PHI nodes don't violate LCSSA form, and may
be introduced by passes that preserve LCSSA, and/or preserved by the LCSSA pass
itself. So, assuming a single PHI node per exit block is not safe.
llvm-svn: 275217
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 5 | 
1 files changed, 0 insertions, 5 deletions
| diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index 5c74ad5d851..a8937b09f90 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -3112,9 +3112,6 @@ void InnerLoopVectorizer::fixupIVUsers(PHINode *OrigPhi,    // value (the value that feeds into the phi from the loop latch).    // We allow both, but they, obviously, have different values. -  // We only expect at most one of each kind of user. This is because LCSSA will -  // canonicalize the users to a single PHI node per exit block, and we -  // currently only vectorize loops with a single exit.    assert(OrigLoop->getExitBlock() && "Expected a single exit block");    // An external user of the last iteration's value should see the value that @@ -3132,7 +3129,6 @@ void InnerLoopVectorizer::fixupIVUsers(PHINode *OrigPhi,        auto *User = cast<PHINode>(UI);        if (User->getBasicBlockIndex(MiddleBlock) == -1)          User->addIncoming(EndValue, MiddleBlock); -      break;      }    } @@ -3159,7 +3155,6 @@ void InnerLoopVectorizer::fixupIVUsers(PHINode *OrigPhi,        Value *Escape = II.transform(B, CMO, PSE.getSE(), DL);        Escape->setName("ind.escape");        User->addIncoming(Escape, MiddleBlock); -      break;      }    }  } | 

