[PATCH] D141568: [SCEV] Support SMin/Umin for GetMinTrailingZeros

Joshua Cao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 12 20:50:30 PST 2023


caojoshua updated this revision to Diff 488855.
caojoshua added a comment.

- support UMinSequential. Add a test (see note below)
- single `isa<SCEVMinMaxExpr>(S)` instead of checking each subtype
- fix code style based on comments

I am unable to create a testcase for GetMinTrailingZeroes on UMinSequential
SCEVs. I tried adapting some tests from https://reviews.llvm.org/D116766, but
however I modify tests, either the Trip Multiple is not returning what I would
expect, or the UMinSequential turns into a regular umin.

All existing integration tests pass. Not sure if we need more testing, or we
can support UMinSequential in a separate work.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141568

Files:
  llvm/lib/Analysis/ScalarEvolution.cpp
  llvm/test/Analysis/ScalarEvolution/trip-count-minmax.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141568.488855.patch
Type: text/x-patch
Size: 18267 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230113/2989aef8/attachment.bin>


More information about the llvm-commits mailing list