How to remove vector.memcheck when noalias is really safe


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 (, discussed a bit here, 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?)