[llvm] [VPlan] Add VPValue for VF, use it for VPWidenIntOrFpInductionRecipe. (PR #95305)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 15 04:52:30 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 05f663081513c6293f80469132d083e2603ed036 907c19fdff0baac3f6998e385bf7fc701ff5acc1 --extensions cpp,h -- llvm/lib/Transforms/Vectorize/LoopVectorize.cpp llvm/lib/Transforms/Vectorize/VPlan.cpp llvm/lib/Transforms/Vectorize/VPlan.h llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.cpp b/llvm/lib/Transforms/Vectorize/VPlan.cpp
index c6c155b46e..690f7822bd 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlan.cpp
@@ -930,13 +930,14 @@ void VPlan::prepareToExecute(Value *TripCountV, Value *VectorTripCountV,
IRBuilder<> Builder(State.CFG.PrevBB->getTerminator());
// FIXME: Model VF * UF computation completely in VPlan.
if (VF.getNumUsers()) {
- Value *RuntimeVF = createStepForVF(Builder, TripCountV->getType(), State.VF, 1);
+ Value *RuntimeVF =
+ createStepForVF(Builder, TripCountV->getType(), State.VF, 1);
VF.setUnderlyingValue(RuntimeVF);
VFxUF.setUnderlyingValue(
- State.UF > 1 ? Builder.CreateMul(
- RuntimeVF,
- ConstantInt::get(TripCountV->getType(), State.UF))
- : RuntimeVF);
+ State.UF > 1
+ ? Builder.CreateMul(
+ RuntimeVF, ConstantInt::get(TripCountV->getType(), State.UF))
+ : RuntimeVF);
} else {
VFxUF.setUnderlyingValue(
createStepForVF(Builder, TripCountV->getType(), State.VF, State.UF));
``````````
</details>
https://github.com/llvm/llvm-project/pull/95305
More information about the llvm-commits
mailing list