[PATCH] D104636: [LoopIdiom] [LoopNest] let the pass deal with runtime memset size

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 26 13:29:36 PDT 2021


efriedma added a comment.

Oh, hmm.  Yes, you need to do some sort of SCEV folding to handle that case, but you can perform the check at compile-time using something like ScalarEvolution::isLoopEntryGuardedByCond.

In D104636#2902181 <https://reviews.llvm.org/D104636#2902181>, @eopXD wrote:

> - no need to check overflow, the assumption is no consecutive memory exceeds 2^N (where N is DataLayout::getIndexTypeSizeInBits()).

Maybe to be conservative, restrict this to memset in address-space zero.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104636



More information about the llvm-commits mailing list