[PATCH] D53340: [Intrinsic] Unigned Saturation Addition Intrinsic

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 17 00:01:32 PDT 2018


bjope added a comment.

Is this intrinsic really needed for the fixed point support?

Maybe I've missed something in the discussions about support for unsigned fixed point types, but in our implementation the unsigned types are using the positive range of the signed type, such as [0, SIGNED_MAX].  So we keep the sign bit zero for the unsigned fixed point types.  Are you planning for something different here?

In our implementation we lower addition of two saturated unsigned fixed point types to `sadd.sat` (if the input values are in the range [0, SIGNED_MAX] the result will be in the range [0, SIGNED_MAX] as well). So we haven't really found a need for implementing `uadd.sat`.


Repository:
  rL LLVM

https://reviews.llvm.org/D53340





More information about the llvm-commits mailing list