[LAA] We only need pointer checks if there are non-zero checks (NFC).
authorFlorian Hahn <flo@fhahn.com>
Wed, 27 May 2020 11:19:22 +0000 (12:19 +0100)
committerFlorian Hahn <flo@fhahn.com>
Wed, 27 May 2020 11:37:20 +0000 (12:37 +0100)
commit259abfc7cbc11cd98c05b1eb8e4b3fb6a9664bc0
treeecda1d9cb06c01bee76526efe85e390afd203255
parent706b22e3e446621b20befe1094c26e4eda133bc9
[LAA] We only need pointer checks if there are non-zero checks (NFC).

If it turns out that we can do runtime checks, but there are no
runtime-checks to generate, set RtCheck.Need to false.

This can happen if we can prove statically that the pointers passed in
to canCheckPtrAtRT do not alias. This should not change any results, but
allows us to skip some work and assert that runtime checks are
generated, if LAA indicates that runtime checks are required.

Reviewers: anemet, Ayal

Reviewed By: Ayal

Differential Revision: https://reviews.llvm.org/D79969
llvm/lib/Analysis/LoopAccessAnalysis.cpp
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp