[PATCH] D133017: [LV] Use SCEV to check if the trip count <= VF * UF.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 1 14:24:06 PDT 2022
fhahn added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.cpp:608
+ SE.getConstant(TCS->getType(), State.VF.getKnownMinValue() * State.UF);
+ if (SE.isKnownViaNonRecursiveReasoning(CmpInst::ICMP_ULE, TCS, C)) {
auto *BOC =
----------------
reames wrote:
> Please don't change the SCEV interface for this. Just use isKnownPredicate. You don't care if the reasoning is recursive or not.
The issue here is that we would need to limit the reasoning to methods that don’t try to look at the current IR, just at the SCEV expression, because the IR is in incomplete/partially modified state.
Using non-recursive reasoning is a proxy for that, but I’m not sure if it provides the required guarantees in all cases.
The alternative would be to compute the property before we start modifying the CFG, like we do for trip count expansion.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133017/new/
https://reviews.llvm.org/D133017
More information about the llvm-commits
mailing list