[PATCH] D143883: [InstCombine] canonicalize urem as cmp+select

Allen zhong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 16 04:39:56 PST 2023


Allen updated this revision to Diff 497963.
Allen marked an inline comment as done.
Allen added a comment.

Address comments

- use **match(Val, m_One())** to replace CVal->isOneValue()
- Drop the attribute **noundef **of function urem_assume_without_nuw, then it will see freeze
- Add a new negative case urem_assume_with_unexpected_const


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

https://reviews.llvm.org/D143883

Files:
  llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
  llvm/test/Transforms/InstCombine/urem-via-cmp-select.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143883.497963.patch
Type: text/x-patch
Size: 4408 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230216/23cb8c94/attachment.bin>


More information about the llvm-commits mailing list