[PATCH] D146457: [LSR] Use evaluateAtIteration in lsr-term-fold

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 20 14:17:04 PDT 2023


reames created this revision.
reames added reviewers: nikic, eopXD.
Herald added subscribers: StephenFan, bollu, hiraditya, mcrosier.
Herald added a project: All.
reames requested review of this revision.
Herald added a project: LLVM.

This is a follow up to one of the side discussions on D146429 <https://reviews.llvm.org/D146429>.  All of the test changes are, to my eye, semantically the same.

The motivation to the legality condition introduced in D146429 <https://reviews.llvm.org/D146429> comes from the fact that we only check the post-inc form.  As such, as long as the values of the post-inc variable don't self wrap, it's actually okay if we wrap past the starting value of the pre-inc IV.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D146457

Files:
  llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
  llvm/test/Transforms/LoopStrengthReduce/lsr-term-fold.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146457.506716.patch
Type: text/x-patch
Size: 7315 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230320/1b701eb2/attachment.bin>


More information about the llvm-commits mailing list