Skip to content

Commit c81f541

Browse files
committed
nfc, replace m_VPInstruction<VPInstruction::Reverse> with m_Reverse
1 parent eb88d09 commit c81f541

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2283,7 +2283,7 @@ InstructionCost VPWidenCastRecipe::computeCost(ElementCount VF,
22832283
};
22842284

22852285
if (VPRecipeBase *Recipe = GetOnlyUser(this)) {
2286-
if (match(Recipe, m_VPInstruction<VPInstruction::Reverse>(m_VPValue())))
2286+
if (match(Recipe, m_Reverse(m_VPValue())))
22872287
Recipe = GetOnlyUser(cast<VPInstruction>(Recipe));
22882288
if (Recipe)
22892289
CCH = ComputeCCH(Recipe);
@@ -2296,8 +2296,7 @@ InstructionCost VPWidenCastRecipe::computeCost(ElementCount VF,
22962296
CCH = TTI::CastContextHint::Normal;
22972297
else if (auto *Recipe = Operand->getDefiningRecipe()) {
22982298
VPValue *ReverseOp;
2299-
if (match(Recipe,
2300-
m_VPInstruction<VPInstruction::Reverse>(m_VPValue(ReverseOp))))
2299+
if (match(Recipe, m_Reverse(m_VPValue(ReverseOp))))
23012300
Recipe = ReverseOp->getDefiningRecipe();
23022301
if (Recipe)
23032302
CCH = ComputeCCH(Recipe);

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2984,7 +2984,7 @@ static void transformRecipestoEVLRecipes(VPlan &Plan, VPValue &EVL) {
29842984

29852985
// TODO: Only convert reverse to vp.reverse if it uses the result of
29862986
// vp.load, or defines the stored value of vp.store.
2987-
if (match(&R, m_VPInstruction<VPInstruction::Reverse>(m_VPValue(V1)))) {
2987+
if (match(&R, m_Reverse(m_VPValue(V1)))) {
29882988
NewRecipe = new VPWidenIntrinsicRecipe(
29892989
Intrinsic::experimental_vp_reverse, {V1, Plan.getTrue(), &EVL},
29902990
TypeInfo.inferScalarType(R.getVPSingleValue()), {}, {},

0 commit comments

Comments
 (0)