-
Notifications
You must be signed in to change notification settings - Fork 15.3k
[VPlan] Handle VPWidenCastRecipe without underlying value in EVL transform #120194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
1634aaf
6dd9322
b611446
f57e06a
4335c21
cf73213
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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))); | ||
|
||
| Ops.push_back(Mask); | ||
| Ops.push_back(&EVL); | ||
| return new VPWidenIntrinsicRecipe( | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -1058,6 +1058,125 @@ loop: | |||||
| exit: | ||||||
| ret void | ||||||
| } | ||||||
|
|
||||||
| define void @truncate_to_minimal_bitwidths_widen_cast_recipe(ptr noalias %dst, ptr noalias %src, i32 %mvx) { | ||||||
|
||||||
| define void @truncate_to_minimal_bitwidths_widen_cast_recipe(ptr noalias %dst, ptr noalias %src, i32 %mvx) { | |
| define void @truncate_to_minimal_bitwidths_widen_cast_recipe(ptr %dst, ptr %src, i32 %mvx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was under the impression that we preferred noalias to avoid the memcheck block if we weren't explicitly testing for it? E.g. I remember seeing #107225 do it as a cleanup
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move to a dedicated file with a descriptive name. The test file is already far too big
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clean up this bb if possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name here is also confusing, as
Instimplies an instructions, while this is a cast recipe... Better name itCastR