[PATCH] D71550: [Intrinsic] Add fixed point saturating division intrinsics.

Bevin Hansson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 21 08:05:38 PST 2020


ebevhan added a comment.

In D71550#1885169 <https://reviews.llvm.org/D71550#1885169>, @leonardchan wrote:

> Not being able to do s.63 saturating multiplication kind of leaves a bad taste in my mouth, but for the purposes of implementing the standard, *I don't think* there's an instance where division for the proposed types can result in this (at least on a typical desktop processor). The main issues I can see down the road are frontend related, like if we perhaps will want to add something like `long long _Fract` that has a signed 64 bit width, or other frontends want to have types of varying scale and width.


Yes, it's pretty unfortunate that it's not as general as it could be. The largest (default) scale that Clang will output for the existing fixed-point types is 32, so I don't think it will hit the limit there. The `long long _Fract` case is compelling but we'll see if we ever get there.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71550





More information about the llvm-commits mailing list