[PATCH] D108077: [InstCombine] Add call to matchSignedSaturate from min/max

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 15 00:11:42 PDT 2021


dmgreen added a comment.

In D108077#2945281 <https://reviews.llvm.org/D108077#2945281>, @lebedev.ri wrote:

> LG, thank you.

Cheers



================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp:2281
   // the two items of min/max (the compare and the select).
   if (MinMax2->hasNUsesOrMore(3) || Base->hasNUsesOrMore(3))
     return nullptr;
----------------
nikic wrote:
> These "one-use" checks aren't going to work correctly for the intrinsic form, where we don't have the duplicate cmp+select use.
Oh yeah good point. Will fix.


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

https://reviews.llvm.org/D108077



More information about the llvm-commits mailing list