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

via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 1 03:14:32 PDT 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h -- llvm/lib/Transforms/Vectorize/LoopVectorize.cpp llvm/lib/Transforms/Vectorize/VPlan.h llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp llvm/unittests/Transforms/Vectorize/VPlanTest.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
index 7104201b5..26a814e86 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
@@ -1061,11 +1061,11 @@ InstructionCost VPRecipeWithIRFlags::getCostForRecipeWithOpcode(
              Opcode == Instruction::FPExt) {
       if (auto *Recipe = Operand->getDefiningRecipe()) {
         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())))) {
+        if (match(Recipe,
+                  m_CombineOr(
+                      m_Reverse(m_VPValue(ReverseOp)),
+                      m_Intrinsic<Intrinsic::experimental_vp_reverse>(
+                          m_VPValue(ReverseOp), m_VPValue(), m_VPValue())))) {
           Recipe = ReverseOp->getDefiningRecipe();
           IsReverse = true;
         }

``````````

</details>


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


More information about the llvm-commits mailing list