[llvm] [VPlan] Delay adding canonical IV increment and exit branches. (PR #82270)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 12 13:57:27 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 d6bbe2e20ff21cc2d31106742dfe1711ae5c641e 025037e9eb5d4d55bb5457c08df64551c11f7362 -- llvm/lib/Transforms/Vectorize/LoopVectorize.cpp llvm/lib/Transforms/Vectorize/VPlan.cpp llvm/lib/Transforms/Vectorize/VPlan.h llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp llvm/lib/Transforms/Vectorize/VPlanTransforms.h llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp llvm/lib/Transforms/Vectorize/VPlanVerifier.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 7a72d50eb7..27ff80b06a 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
@@ -1394,11 +1394,10 @@ bool VPlanTransforms::tryAddExplicitVectorLength(VPlan &Plan) {
OpVPEVL = new VPScalarCastRecipe(IVSize < 32 ? Instruction::Trunc
: Instruction::ZExt,
OpVPEVL, CanonicalIVPHI->getScalarType());
- Latch->appendRecipe(OpVPEVL);
+ Latch->appendRecipe(OpVPEVL);
}
auto *NextEVLIV =
- new VPInstruction(Instruction::Add, {OpVPEVL, EVLPhi},
- {false, false},
+ new VPInstruction(Instruction::Add, {OpVPEVL, EVLPhi}, {false, false},
CanonicalIVPHI->getDebugLoc(), "index.evl.next");
Latch->appendRecipe(NextEVLIV);
EVLPhi->addOperand(NextEVLIV);
diff --git a/llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp b/llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp
index ee7fec7823..fc32caed1e 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp
@@ -56,7 +56,8 @@ class VPlanVerifier {
bool verifyRegionRec(const VPRegionBlock *Region);
public:
- VPlanVerifier(VPDominatorTree &VPDT, bool IsAbstract) : VPDT(VPDT), IsAbstract(IsAbstract) {}
+ VPlanVerifier(VPDominatorTree &VPDT, bool IsAbstract)
+ : VPDT(VPDT), IsAbstract(IsAbstract) {}
bool verify(const VPlan &Plan);
};
``````````
</details>
https://github.com/llvm/llvm-project/pull/82270
More information about the llvm-commits
mailing list