[llvm] [VPlan] Guard VPPartialReductionRecipe::computeCost() against ilist sentinel(#148389) (PR #148555)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 13 16:24:42 PDT 2025
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 HEAD~1 HEAD --extensions cpp -- llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
``````````
</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 fc918c669..5f4fc4c32 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
@@ -301,11 +301,11 @@ VPPartialReductionRecipe::computeCost(ElementCount VF,
// -----------------------------------------------------------------------
auto safe = [](VPRecipeBase *R) -> VPRecipeBase * {
return isa_and_present<VPRecipeBase>(R) ? R : nullptr;
- };
+ };
std::optional<unsigned> Opcode;
- VPValue *Op = getOperand(0);
- VPRecipeBase *OpR = safe(Op->getDefiningRecipe());
+ VPValue *Op = getOperand(0);
+ VPRecipeBase *OpR = safe(Op->getDefiningRecipe());
// If the partial reduction is predicated, a select will be operand 0
using namespace llvm::VPlanPatternMatch;
``````````
</details>
https://github.com/llvm/llvm-project/pull/148555
More information about the llvm-commits
mailing list