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

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 3 06:07:43 PDT 2021


dmgreen updated this revision to Diff 370557.
dmgreen retitled this revision from "[InstCombine] Canonicalize saturate with shift and xor to min/max clamp" to "[InstCombine] Extend canonicalizeClampLike to handle truncated inputs".
dmgreen edited the summary of this revision.
dmgreen added a comment.

Change to now extend canonicalizeClampLike to handle truncated inputs, which further gets folded to a saturating min/max pattern. With the other combines added in D109151 <https://reviews.llvm.org/D109151> and D109155 <https://reviews.llvm.org/D109155> the original case becomes a sadd.sat.


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.370557.patch
Type: text/x-patch
Size: 12272 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210903/0b304a9e/attachment.bin>


More information about the llvm-commits mailing list