[PATCH] D127966: [LV] Move LoopVersioning creation to LVP::execute.

Ayal Zaks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 27 09:48:02 PDT 2022


Ayal added a comment.

In D127966#3611652 <https://reviews.llvm.org/D127966#3611652>, @fhahn wrote:

> Add extra check if there are any runtime checks before creating LoopVersioning, move code up.

Great, thanks!
Currently noalias is introduced by emitMemRuntimeChecks() when called from ILV::createVectorizedLoopSkeleton() and from its overriding EpilogueVectorizerMainLoop::createEpilogueVectorizedLoopSkeleton(), but is missed by its overriding EpilogueVectorizerEpilogueLoop::createEpilogueVectorizedLoopSkeleton(). How about placing it in completeLoopSkeleton(), which all three skeleton creators call? It does, after all, seem to belong to ILV* than to LVP?

> In D127966#3611068 <https://reviews.llvm.org/D127966#3611068>, @Ayal wrote:
>
>> Curious if current lack of proper noalias metadata of an epilogue vector loop may result in missed optimization or potentially wrong code?
>
> The lack of noalias metadata currently leads to potentially missing optimizations later on. The noalias properties must hold for the epilogue loop, otherwise the vectorization decisions may be incorrect. Missing metadata should never impact correctness, as LLVM optimizations are free to drop it.

OK, good, sure; just making sure "lack of proper" does not mean "existence of improper".


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127966/new/

https://reviews.llvm.org/D127966



More information about the llvm-commits mailing list