[PATCH] D75981: [LV] Allow large RT checks, if they are a fraction of the scalar cost (WIP)
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 15 08:54:25 PDT 2021
fhahn added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp:269-270
NumRuntimePointerChecks > VectorizerParams::RuntimeMemoryCheckThreshold;
- if ((ThresholdReached && !Hints.allowReordering()) ||
- PragmaThresholdReached) {
ORE.emit([&]() {
----------------
lebedev.ri wrote:
> Hm, why does `PragmaThresholdReached` not check for `Hints.allowReordering()`?
> If i really asked for loop to be vectorized, why are there further limits on the sanity checks?
> Or, for that matter, doesn't forcing vectorization disable those checks in the first place?
I can't really comment much on why the existing code does what it does. But it is indeed surprising that runtime checks can block vectorization if a width is explicitly set. I put up D98634 and D98633 to move the `doesNotMeet` restrictions to what seems more appropriate places to me. The updated code also skips the checks if an explicit VF is forced by the user.
I updated the code in this patch to always use the cost-based check if a constant TC is available here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75981/new/
https://reviews.llvm.org/D75981
More information about the llvm-commits
mailing list