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) {
2419
2419
EVLPhi->eraseFromParent ();
2420
2420
2421
2421
// Replace CanonicalIVInc with EVL-PHI increment.
2422
- VPRecipeBase *CanonicalIV = &*HeaderVPBB->begin ();
2422
+ auto *CanonicalIV = cast<VPPhi>( &*HeaderVPBB->begin () );
2423
2423
assert (
2424
- isa<VPPhi>(CanonicalIV) &&
2425
- match (CanonicalIV->getOperand (1 ),
2424
+ match (CanonicalIV->getIncomingValue (1 ),
2426
2425
m_c_Binary<Instruction::Add>(m_Specific (cast<VPPhi>(CanonicalIV)),
2427
2426
m_Specific (&Plan.getVFxUF ()))) &&
2428
- " Unexpected canoincal iv" );
2429
- VPValue *Backedge = CanonicalIV->getOperand (1 );
2427
+ " Unexpected canonical iv" );
2428
+ VPValue *Backedge = CanonicalIV->getIncomingValue (1 );
2430
2429
Backedge->replaceAllUsesWith (EVLIncrement);
2431
2430
2432
2431
// 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 {
197
197
// EVLIVIncrement is only used by EVLIV & BranchOnCount.
198
198
// Having more than two users is unexpected.
199
199
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) {
201
201
using namespace llvm ::VPlanPatternMatch;
202
202
return match (U, m_BranchOnCount (m_Specific (I), m_VPValue ()));
203
203
}))) {
You can’t perform that action at this time.
0 commit comments