[PATCH] D108112: [LoopIdiom] Let LIR fold memset pointer / stride SCEV regarding loop guards

Yueh-Ting Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 9 08:15:29 PST 2021


eopXD added a comment.

Hi @bmahjour,

Sorry for such delay.

I think the example you raised don't cause a problem to the current implementation.
The comparison is between "pointer stride" and "memset size", which all need to be non-negative.
The start/end of the induction variable don't matter because if the origin stride is negative it will be turned positive before comparison.

I have addressed your comment on renaming the SCEV folding structure and added test case for negative start loops like your example.
(Your example is loop strided store, I modified it to memset in the examples)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108112



More information about the llvm-commits mailing list