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

David Lloyd via llvm-dev llvm-dev at lists.llvm.org
Fri Aug 7 07:19:01 PDT 2020


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

-- 
- DML • he/him



More information about the llvm-dev mailing list