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

Bevin Hansson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 17 01:20:36 PDT 2018


ebevhan added a comment.

LGTM!

In https://reviews.llvm.org/D53340#1267393, @bjope wrote:

> 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`.


Our implementation is one without the padding bit on unsigned types, so we don't need a `uadd.sat`. The same applies to `fixumul` (which we also don't have). As you say, unsigned operations can be implemented in terms of the signed ones in that kind of implementation.


Repository:
  rL LLVM

https://reviews.llvm.org/D53340





More information about the llvm-commits mailing list