[llvm-dev] How to remove vector.memcheck when noalias is really safe

Alexandre Mutel via llvm-dev llvm-dev at lists.llvm.org
Wed Jan 17 03:38:27 PST 2018


Hi,

We are having an issue with the loop vectorizer and noalias pointers, as it is generating `vector.memcheck` while we can guarantee that the pointers will not overlap.

It seems that in `LoopVectorize.cpp` the function `emitMemRuntimeChecks` is called but there are no checks to disable this behavior (like "strong noalias")

We are actually using a technique similar to the llvm.noalias (https://llvm.org/devmtg/2017-02-04/Restrict-Qualified-Pointers-in-LLVM.pdf), discussed a bit here http://lists.llvm.org/pipermail/llvm-dev/2017-September/117443.html, but we are not using the llvm.noalias PR.

Still, from the document above, it seems that the llvm.noalias is able to get rid off these checks, but I'm failing to see why it is related to the introduction of this new intrinsic. I assume this optimization should work with any noalias pointers no?, not only the ones returned by llvm.noalias...

Any ideas how to workaround this? (using the llvm.noalias PR?)

Thanks!


<https://llvm.org/devmtg/2017-02-04/Restrict-Qualified-Pointers-in-LLVM.pdf>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180117/a32aceb8/attachment.html>


More information about the llvm-dev mailing list