[llvm] [VPlan] Thread scalar types through VPInstruction and VPPhi. (NFC) (PR #199378)
via llvm-commits
llvm-commits at lists.llvm.org
Sun May 24 05:19:06 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 h,cpp -- llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h llvm/lib/Transforms/Vectorize/VPlan.h llvm/lib/Transforms/Vectorize/VPlanAnalysis.cpp llvm/lib/Transforms/Vectorize/VPlanAnalysis.h llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp llvm/unittests/Transforms/Vectorize/VPDomTreeTest.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 2ce171840..73458ddab 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
@@ -445,9 +445,8 @@ static unsigned getCalledFnOperandIndex(ArrayRef<VPValue *> Operands) {
auto *LastOp = dyn_cast<VPIRValue>(Operands[NumOps - 1]);
if (LastOp && isa<Function>(LastOp->getValue()))
return NumOps - 1;
- assert(
- isa<Function>(cast<VPIRValue>(Operands[NumOps - 2])->getValue()) &&
- "expected function operand");
+ assert(isa<Function>(cast<VPIRValue>(Operands[NumOps - 2])->getValue()) &&
+ "expected function operand");
return NumOps - 2;
}
diff --git a/llvm/unittests/Transforms/Vectorize/VPlanTest.cpp b/llvm/unittests/Transforms/Vectorize/VPlanTest.cpp
index 15e4512f6..b4ba5f8c5 100644
--- a/llvm/unittests/Transforms/Vectorize/VPlanTest.cpp
+++ b/llvm/unittests/Transforms/Vectorize/VPlanTest.cpp
@@ -1871,8 +1871,9 @@ TEST_F(VPUtilsTest, IsUniformAcrossVFsAndUFsForSingleScalarOpcodes) {
EXPECT_TRUE(vputils::isUniformAcrossVFsAndUFs(EVL.get()));
// isVectorToScalar opcode with a uniform operand.
- std::unique_ptr<VPInstruction> FirstActiveLane(new VPInstructionWithType(
- VPInstruction::FirstActiveLane, {&Plan.getVF()}, IntegerType::get(C, 32)));
+ std::unique_ptr<VPInstruction> FirstActiveLane(
+ new VPInstructionWithType(VPInstruction::FirstActiveLane, {&Plan.getVF()},
+ IntegerType::get(C, 32)));
EXPECT_TRUE(vputils::isUniformAcrossVFsAndUFs(FirstActiveLane.get()));
// StepVector produces a distinct value per lane and is non-uniform; use it
``````````
</details>
https://github.com/llvm/llvm-project/pull/199378
More information about the llvm-commits
mailing list