diff options
author | Florian Hahn <flo@fhahn.com> | 2025-08-26 15:52:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-26 15:52:31 +0100 |
commit | 5faed1ad84c44b0093ee32c07dc39b33ea674ca1 (patch) | |
tree | bde9749b3c56262ec0ad2d2c92c06d4b02d8bdb2 /llvm/lib/Analysis/ScalarEvolution.cpp | |
parent | 445415219708f9539801018e03282049ca33e0e2 (diff) | |
download | llvm-5faed1ad84c44b0093ee32c07dc39b33ea674ca1.zip llvm-5faed1ad84c44b0093ee32c07dc39b33ea674ca1.tar.gz llvm-5faed1ad84c44b0093ee32c07dc39b33ea674ca1.tar.bz2 |
[VPlan] Add VPlan-based addMinIterCheck, replace ILV for non-epilogue. (#153643)
This patch adds a new VPlan-based addMinimumIterationCheck, which
replaced the ILV version for the non-epilogue case.
The VPlan-based version constructs a SCEV expression to compute the
minimum iterations, use that to check if the check is known true or
false. Otherwise it creates a VPExpandSCEV recipe and emits a
compare-and-branch.
When using epilogue vectorization, we still need to create the minimum
trip-count-check during the legacy skeleton creation. The patch moves
the definitions out of ILV.
PR: https://github.com/llvm/llvm-project/pull/153643
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolution.cpp')
-rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index f60a1e9..13b9aa2 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -500,10 +500,11 @@ const SCEV *ScalarEvolution::getVScale(Type *Ty) { return S; } -const SCEV *ScalarEvolution::getElementCount(Type *Ty, ElementCount EC) { +const SCEV *ScalarEvolution::getElementCount(Type *Ty, ElementCount EC, + SCEV::NoWrapFlags Flags) { const SCEV *Res = getConstant(Ty, EC.getKnownMinValue()); if (EC.isScalable()) - Res = getMulExpr(Res, getVScale(Ty)); + Res = getMulExpr(Res, getVScale(Ty), Flags); return Res; } |