[llvm] [VPlan] Handle VPWidenCastRecipe without underlying value in EVL transform (PR #120194)
Mel Chen via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 16 23:52:57 PST 2024
================
@@ -1506,18 +1506,17 @@ static void transformRecipestoEVLRecipes(VPlan &Plan, VPValue &EVL) {
})
.Case<VPWidenCastRecipe>(
[&](VPWidenCastRecipe *CInst) -> VPRecipeBase * {
- auto *CI = dyn_cast<CastInst>(CInst->getUnderlyingInstr());
Intrinsic::ID VPID =
- VPIntrinsic::getForOpcode(CI->getOpcode());
+ VPIntrinsic::getForOpcode(CInst->getOpcode());
assert(VPID != Intrinsic::not_intrinsic &&
"Expected vp.casts Instrinsic");
SmallVector<VPValue *> Ops(CInst->operands());
assert(VPIntrinsic::getMaskParamPos(VPID) &&
VPIntrinsic::getVectorLengthParamPos(VPID) &&
"Expected VP intrinsic");
- VPValue *Mask = Plan.getOrAddLiveIn(ConstantInt::getTrue(
- IntegerType::getInt1Ty(CI->getContext())));
+ VPValue *Mask = Plan.getOrAddLiveIn(
+ ConstantInt::getTrue(IntegerType::getInt1Ty(Ctx)));
----------------
Mel-Chen wrote:
ConstantInt::getTrue(Ctx));
https://github.com/llvm/llvm-project/pull/120194
More information about the llvm-commits
mailing list