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 @@ -2402,14 +2402,13 @@ void VPlanTransforms::canonicalizeEVLLoops(VPlan &Plan) {
2402
2402
EVLPhi->eraseFromParent ();
2403
2403
2404
2404
// Replace CanonicalIVInc with EVL-PHI increment.
2405
- VPRecipeBase *CanonicalIV = &*HeaderVPBB->begin ();
2405
+ auto *CanonicalIV = cast<VPPhi>( &*HeaderVPBB->begin () );
2406
2406
assert (
2407
- isa<VPPhi>(CanonicalIV) &&
2408
- match (CanonicalIV->getOperand (1 ),
2407
+ match (CanonicalIV->getIncomingValue (1 ),
2409
2408
m_c_Binary<Instruction::Add>(m_Specific (cast<VPPhi>(CanonicalIV)),
2410
2409
m_Specific (&Plan.getVFxUF ()))) &&
2411
- " Unexpected canoincal iv" );
2412
- VPValue *Backedge = CanonicalIV->getOperand (1 );
2410
+ " Unexpected canonical iv" );
2411
+ VPValue *Backedge = CanonicalIV->getIncomingValue (1 );
2413
2412
Backedge->replaceAllUsesWith (EVLIncrement);
2414
2413
2415
2414
// Remove unused phi and increment.
Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ bool VPlanVerifier::verifyEVLRecipe(const VPInstruction &EVL) const {
196
196
// EVLIVIncrement is only used by EVLIV & BranchOnCount.
197
197
// Having more than two users is unexpected.
198
198
if ((I->getNumUsers () != 1 ) &&
199
- (I->getNumUsers () != 2 || ! any_of (I->users (), [&I](VPUser *U) {
199
+ (I->getNumUsers () != 2 || none_of (I->users (), [&I](VPUser *U) {
200
200
using namespace llvm ::VPlanPatternMatch;
201
201
return match (U, m_BranchOnCount (m_Specific (I), m_VPValue ()));
202
202
}))) {
You can’t perform that action at this time.
0 commit comments