[PATCH] D108049: [InstCombine] Extend canonicalizeClampLike to handle truncated inputs

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 28 04:32:42 PDT 2021


dmgreen updated this revision to Diff 382985.
dmgreen added a comment.

Use m_ImmConstant, `match(X, m_TruncOrSelf(m_Value(X)))` (I hope that's OK) and add a one use check for the truncate.


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

https://reviews.llvm.org/D108049

Files:
  llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
  llvm/test/Transforms/InstCombine/truncating-saturate.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108049.382985.patch
Type: text/x-patch
Size: 10260 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211028/324f0d65/attachment.bin>


More information about the llvm-commits mailing list