[llvm] [VPlan] Update scalar induction resume values in VPlan. (PR #110577)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 20 14:21:02 PST 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 d5032b9f4b6aa415e7fd39701f29edb93028d8b3 5d2eb8bb576675a958c4ba661babb113760fdcda --extensions cpp -- llvm/lib/Transforms/Vectorize/LoopVectorize.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/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 299b44b3b4..9f850ad7a6 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -522,9 +522,8 @@ public:
/// provides this additional bypass block along with the resume value coming
/// from it.
void createInductionResumeVPValue(
- VPIRInstruction *PhiIRI, const InductionDescriptor &ID,
- Value *Step, ArrayRef<BasicBlock *> BypassBlocks,
- VPBuilder &ScalarPHBuilder,
+ VPIRInstruction *PhiIRI, const InductionDescriptor &ID, Value *Step,
+ ArrayRef<BasicBlock *> BypassBlocks, VPBuilder &ScalarPHBuilder,
std::pair<BasicBlock *, Value *> AdditionalBypass = {nullptr, nullptr});
/// Returns the original loop trip count.
@@ -2593,9 +2592,8 @@ void InnerLoopVectorizer::createVectorLoopSkeleton(StringRef Prefix) {
}
void InnerLoopVectorizer::createInductionResumeVPValue(
- VPIRInstruction *PhiR, const InductionDescriptor &II,
- Value *Step, ArrayRef<BasicBlock *> BypassBlocks,
- VPBuilder &ScalarPHBuilder,
+ VPIRInstruction *PhiR, const InductionDescriptor &II, Value *Step,
+ ArrayRef<BasicBlock *> BypassBlocks, VPBuilder &ScalarPHBuilder,
std::pair<BasicBlock *, Value *> AdditionalBypass) {
auto *OrigPhi = cast<PHINode>(&PhiR->getInstruction());
Value *VectorTripCount = getOrCreateVectorTripCount(LoopVectorPreHeader);
@@ -2682,9 +2680,9 @@ void InnerLoopVectorizer::createInductionResumeVPValues(
if (!Legal->getInductionVars().contains(Phi))
continue;
const InductionDescriptor &II = Legal->getInductionVars().find(Phi)->second;
- createInductionResumeVPValue(
- PhiR, II, getExpandedStep(II, ExpandedSCEVs), LoopBypassBlocks,
- ScalarPHBuilder, AdditionalBypass);
+ createInductionResumeVPValue(PhiR, II, getExpandedStep(II, ExpandedSCEVs),
+ LoopBypassBlocks, ScalarPHBuilder,
+ AdditionalBypass);
}
}
@@ -8045,8 +8043,8 @@ EpilogueVectorizerEpilogueLoop::createEpilogueVectorizedLoopSkeleton(
// the trip count of the main vector loop, hence passing the AdditionalBypass
// argument.
createInductionResumeVPValues(ExpandedSCEVs,
- {VecEpilogueIterationCountCheck,
- EPI.VectorTripCount} /* AdditionalBypass */);
+ {VecEpilogueIterationCountCheck,
+ EPI.VectorTripCount} /* AdditionalBypass */);
return {LoopVectorPreHeader, EPResumeVal};
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/110577
More information about the llvm-commits
mailing list