@@ -3288,10 +3288,10 @@ void VPlanTransforms::materializeVectorTripCount(VPlan &Plan,
32883288 // IR value has already been set.
32893289 if (VectorTC.getNumUsers () == 0 || VectorTC.getLiveInIRValue ())
32903290 return ;
3291+
32913292 VPValue *TC = Plan.getTripCount ();
32923293 Type *TCTy = VPTypeAnalysis (Plan).inferScalarType (TC);
32933294 VPBuilder Builder (VectorPHVPBB, VectorPHVPBB->begin ());
3294-
32953295 VPValue *Step = &Plan.getVFxUF ();
32963296
32973297 // If the tail is to be folded by masking, round the number of iterations N
@@ -3327,14 +3327,14 @@ void VPlanTransforms::materializeVectorTripCount(VPlan &Plan,
33273327 // since there will already be scalar iterations. Note that the minimum
33283328 // iterations check ensures that N >= Step.
33293329 if (RequiresScalarEpilogue) {
3330- auto *IsZero = Builder.createICmp (
3330+ VPValue *IsZero = Builder.createICmp (
33313331 CmpInst::ICMP_EQ, R, Plan.getOrAddLiveIn (ConstantInt::get (TCTy, 0 )));
33323332 R = Builder.createSelect (IsZero, Step, R);
33333333 }
33343334
3335- auto Res = Builder.createNaryOp (Instruction::Sub, {TC, R},
3336- DebugLoc::getCompilerGenerated (), " n.vec" );
3337- Plan. getVectorTripCount () .replaceAllUsesWith (Res);
3335+ VPValue * Res = Builder.createNaryOp (
3336+ Instruction::Sub, {TC, R}, DebugLoc::getCompilerGenerated (), " n.vec" );
3337+ VectorTC .replaceAllUsesWith (Res);
33383338}
33393339
33403340// / Returns true if \p V is VPWidenLoadRecipe or VPInterleaveRecipe that can be
0 commit comments