[llvm] [LV][EVL] Support cast instruction with EVL-vectorization (PR #108351)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 29 06:55:19 PST 2024
================
@@ -1484,6 +1484,24 @@ static void transformRecipestoEVLRecipes(VPlan &Plan, VPValue &EVL) {
VPValue *NewMask = GetNewMask(Red->getCondOp());
return new VPReductionEVLRecipe(*Red, EVL, NewMask);
})
+ .Case<VPWidenCastRecipe>(
+ [&](VPWidenCastRecipe *CInst) -> VPRecipeBase * {
+ auto *CI = cast<CastInst>(CInst->getUnderlyingInstr());
+ SmallVector<VPValue *> Ops(CInst->operands());
+ Ops.push_back(&EVL);
+ Intrinsic::ID VPID =
+ VPIntrinsic::getForOpcode(CI->getOpcode());
+ if (VPID == Intrinsic::not_intrinsic)
+ return nullptr;
----------------
alexey-bataev wrote:
Make it an assertion then?
https://github.com/llvm/llvm-project/pull/108351
More information about the llvm-commits
mailing list