File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -2419,14 +2419,13 @@ void VPlanTransforms::canonicalizeEVLLoops(VPlan &Plan) {
24192419 EVLPhi->eraseFromParent ();
24202420
24212421 // Replace CanonicalIVInc with EVL-PHI increment.
2422- VPRecipeBase *CanonicalIV = &*HeaderVPBB->begin ();
2422+ auto *CanonicalIV = cast<VPPhi>( &*HeaderVPBB->begin () );
24232423 assert (
2424- isa<VPPhi>(CanonicalIV) &&
2425- match (CanonicalIV->getOperand (1 ),
2424+ match (CanonicalIV->getIncomingValue (1 ),
24262425 m_c_Binary<Instruction::Add>(m_Specific (cast<VPPhi>(CanonicalIV)),
24272426 m_Specific (&Plan.getVFxUF ()))) &&
2428- " Unexpected canoincal iv" );
2429- VPValue *Backedge = CanonicalIV->getOperand (1 );
2427+ " Unexpected canonical iv" );
2428+ VPValue *Backedge = CanonicalIV->getIncomingValue (1 );
24302429 Backedge->replaceAllUsesWith (EVLIncrement);
24312430
24322431 // Remove unused phi and increment.
Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ bool VPlanVerifier::verifyEVLRecipe(const VPInstruction &EVL) const {
197197 // EVLIVIncrement is only used by EVLIV & BranchOnCount.
198198 // Having more than two users is unexpected.
199199 if ((I->getNumUsers () != 1 ) &&
200- (I->getNumUsers () != 2 || ! any_of (I->users (), [&I](VPUser *U) {
200+ (I->getNumUsers () != 2 || none_of (I->users (), [&I](VPUser *U) {
201201 using namespace llvm ::VPlanPatternMatch;
202202 return match (U, m_BranchOnCount (m_Specific (I), m_VPValue ()));
203203 }))) {
You can’t perform that action at this time.
0 commit comments