[LV] Remove type restriction for vector phi creation
We previously only created a vector phi node for an induction variable if its type matched the type of the canonical induction variable. Differential Revision: https://reviews.llvm.org/D29776 llvm-svn: 294755
This commit is contained in:
@@ -2421,8 +2421,7 @@ void InnerLoopVectorizer::widenIntInduction(PHINode *IV, TruncInst *Trunc) {
|
||||
// Try to create a new independent vector induction variable. If we can't
|
||||
// create the phi node, we will splat the scalar induction variable in each
|
||||
// loop iteration.
|
||||
if (VF > 1 && IV->getType() == Induction->getType() && Step &&
|
||||
!shouldScalarizeInstruction(EntryVal)) {
|
||||
if (VF > 1 && Step && !shouldScalarizeInstruction(EntryVal)) {
|
||||
createVectorIntInductionPHI(ID, EntryVal);
|
||||
VectorizedIV = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user