[llvm] Reapply "[VPlan] Extract reverse mask from reverse accesses" (PR #189930)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 1 04:10:37 PDT 2026
================
@@ -1046,8 +1045,13 @@ InstructionCost VPRecipeWithIRFlags::getCostForRecipeWithOpcode(
return dyn_cast<VPRecipeBase>(*R->user_begin());
};
if (VPRecipeBase *Recipe = GetOnlyUser(this)) {
- if (match(Recipe, m_Reverse(m_VPValue())))
- Recipe = GetOnlyUser(cast<VPInstruction>(Recipe));
+ if (match(Recipe,
+ m_CombineOr(m_Reverse(m_VPValue()),
+ m_Intrinsic<Intrinsic::experimental_vp_reverse>(
+ m_VPValue(), m_VPValue(), m_VPValue())))) {
----------------
fhahn wrote:
this may deserve a dedicated matcher?
https://github.com/llvm/llvm-project/pull/189930
More information about the llvm-commits
mailing list