[llvm] [LAA] Hoist setting condition for RT-checks (PR #128045)
Igor Kirillov via llvm-commits
llvm-commits at lists.llvm.org
Fri May 2 07:43:37 PDT 2025
igogo-x86 wrote:
I looked at the `retry_after_dep_check_with_unknown_offset` test, and I’m a bit unclear about the current logic behind when `shouldRetryWithRuntimeCheck()` returns true.
>From what I can tell, we can have multiple `DepType::Unknown` dependences that, by themselves, do not trigger the retry with runtime memory checks, and therefore block vectorisation. But once a single `FoundNonConstantDistanceDependence` is found, the analysis seems to switch to the **"LAA: Retrying with memory checks"** path and allows all these dependences to be handled via runtime checks.
Is this the intended behaviour? If so, is there a rationale for treating `DepType::Unknown` differently depending on the presence of a non-constant distance dependence?
Also, as noted above, the patch does not appear to be NFC in practice, but that might be acceptable. Making it truly NFC would require hoisting quite a bit of logic from `MemoryDepChecker::isDependent` into `getDependenceDistanceStrideAndSize`, which doesn’t seem sensible.
In any case, I’d appreciate some insight into the retry logic.
https://github.com/llvm/llvm-project/pull/128045
More information about the llvm-commits
mailing list