[llvm-dev] Saturating float-to-int casts

David Lloyd via llvm-dev llvm-dev at lists.llvm.org
Fri Sep 4 07:42:55 PDT 2020


On Fri, Aug 7, 2020 at 9:19 AM David Lloyd <david.lloyd at redhat.com> wrote:
>
> I have encountered a need for float-to-int casts that saturate to
> min/max when the value is out of the range of the target type.  It
> seems that there is no intrinsic to do this, currently, but on IRC it
> was pointed out that a patch [1] has been proposed to implement this
> functionality in exactly the way that I was looking for.
>
> It looks like the discussion has died out but I was hoping maybe to
> kick it off again.
>
> [1] https://reviews.llvm.org/D54749

Looks like a little more activity has happened, and the patch was
rebased, but some unit tests are currently failing (I have no idea how
normal that is but I'm assuming it's a problem - at least the failures
seem related, on the surface anyway).  Seems like the failures are
related to applying these operations to vectors.

-- 
- DML • he/him



More information about the llvm-dev mailing list