[llvm] [VPlan] Add new VPInstruction ocpode for header mask. (PR #89603)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 22 05:52:36 PDT 2024
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 c93f02978c33897615a312a85c6149911544ad63 aa8890cd1511150dc76825f440d87837fa7fe379 -- 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/lib/Transforms/Vectorize/VPlanTransforms.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
index 6d643b81b2..9c56e4b8d2 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
@@ -1167,12 +1167,11 @@ static VPActiveLaneMaskPHIRecipe *addVPLaneMaskPhiAndUpdateExitBranch(
/// Return the header mask recipe of the VPlan, if there is one.
static VPInstruction *getHeaderMask(VPlan &Plan) {
VPBasicBlock *HeaderVPBB = Plan.getVectorLoopRegion()->getEntryBasicBlock();
- auto R = find_if(*HeaderVPBB, [](VPRecipeBase &R)
- {
+ auto R = find_if(*HeaderVPBB, [](VPRecipeBase &R) {
using namespace llvm::VPlanPatternMatch;
return match(&R, m_VPInstruction<VPInstruction::HeaderMask>(m_VPValue()));
- });
- return R == HeaderVPBB->end() ? nullptr : cast<VPInstruction>(&*R);
+ });
+ return R == HeaderVPBB->end() ? nullptr : cast<VPInstruction>(&*R);
}
static VPValue *getOrCreateWideCanonicalIV(VPlan &Plan,
diff --git a/llvm/lib/Transforms/Vectorize/VPlanTransforms.h b/llvm/lib/Transforms/Vectorize/VPlanTransforms.h
index 86a29e0a11..607c43458c 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanTransforms.h
+++ b/llvm/lib/Transforms/Vectorize/VPlanTransforms.h
@@ -106,7 +106,8 @@ struct VPlanTransforms {
/// this transformation.
static void addExplicitVectorLength(VPlan &Plan);
- /// Lower abstract VPInstruction recipes to a concrete sequence of recipes for which code can be generated.
+ /// Lower abstract VPInstruction recipes to a concrete sequence of recipes for
+ /// which code can be generated.
static void lowerRecipes(VPlan &Plan);
};
``````````
</details>
https://github.com/llvm/llvm-project/pull/89603
More information about the llvm-commits
mailing list