[llvm] Reapply "[VPlan] Extract reverse mask from reverse accesses" (PR #189930)

Mel Chen via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 13 07:11:09 PDT 2026


================
@@ -1057,12 +1061,20 @@ InstructionCost VPRecipeWithIRFlags::getCostForRecipeWithOpcode(
              Opcode == Instruction::FPExt) {
       if (auto *Recipe = Operand->getDefiningRecipe()) {
         VPValue *ReverseOp;
-        if (match(Recipe, m_Reverse(m_VPValue(ReverseOp))))
+        if (match(Recipe,
+                  m_CombineOr(
+                      m_Reverse(m_VPValue(ReverseOp)),
+                      m_Intrinsic<Intrinsic::experimental_vp_reverse>(
+                          m_VPValue(ReverseOp), m_VPValue(), m_VPValue())))) {
----------------
Mel-Chen wrote:

It worked, thanks!
eef2ac3aa0d61ac2edd416027bb69b289887d11a

https://github.com/llvm/llvm-project/pull/189930


More information about the llvm-commits mailing list