[llvm] [VPlan] Support VPWidenIntOrFpInductionRecipes with EVL tail folding (PR #144666)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 20 11:21:25 PDT 2025
================
@@ -2594,14 +2595,16 @@ expandVPWidenIntOrFpInduction(VPWidenIntOrFpInductionRecipe *WidenIVR,
Inc = SplatVF;
Prev = WidenIVR->getLastUnrolledPartOperand();
} else {
+ if (VPRecipeBase *R = VF->getDefiningRecipe())
+ Builder.setInsertPoint(R->getParent(), std::next(R->getIterator()));
+ Type *VFTy = TypeInfo.inferScalarType(VF);
// Multiply the vectorization factor by the step using integer or
// floating-point arithmetic as appropriate.
if (StepTy->isFloatingPointTy())
VF = Builder.createScalarCast(Instruction::CastOps::UIToFP, VF, StepTy,
DL);
else
- VF =
- Builder.createScalarCast(Instruction::CastOps::Trunc, VF, StepTy, DL);
+ VF = Builder.createScalarZExtOrTrunc(VF, StepTy, VFTy, DL);
----------------
lukel97 wrote:
Done in 521adc9fa270c1524f125f155327bf8f3743bb87
https://github.com/llvm/llvm-project/pull/144666
More information about the llvm-commits
mailing list