Skip to content

Commit c76d928

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

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
@@ -2282,7 +2282,7 @@ InstructionCost VPWidenCastRecipe::computeCost(ElementCount VF,
22822282
};
22832283

22842284
if (VPRecipeBase *Recipe = GetOnlyUser(this)) {
2285-
if (match(Recipe, m_VPInstruction<VPInstruction::Reverse>(m_VPValue())))
2285+
if (match(Recipe, m_Reverse(m_VPValue())))
22862286
Recipe = GetOnlyUser(cast<VPInstruction>(Recipe));
22872287
if (Recipe)
22882288
CCH = ComputeCCH(Recipe);
@@ -2295,8 +2295,7 @@ InstructionCost VPWidenCastRecipe::computeCost(ElementCount VF,
22952295
CCH = TTI::CastContextHint::Normal;
22962296
else if (auto *Recipe = Operand->getDefiningRecipe()) {
22972297
VPValue *ReverseOp;
2298-
if (match(Recipe,
2299-
m_VPInstruction<VPInstruction::Reverse>(m_VPValue(ReverseOp))))
2298+
if (match(Recipe, m_Reverse(m_VPValue(ReverseOp))))
23002299
Recipe = ReverseOp->getDefiningRecipe();
23012300
if (Recipe)
23022301
CCH = ComputeCCH(Recipe);

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

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

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

0 commit comments

Comments
 (0)