[vector] Questions on addSaturate and subSaturate

John Rose john.r.rose at oracle.com
Wed Mar 28 23:09:45 UTC 2018


On Mar 28, 2018, at 3:32 PM, Paul Sandoz <paul.sandoz at oracle.com> wrote:
> 
> I don’t know how important they are although i would note the VNNI instructions also have saturated fused multiple and accumulate versions.

I think saturating operations can be viewed as additional intrinsic ops
beyond the normal four-function-calculator stuff (+-*/ etc.).

Eventually someone finds them important, which is why hardware
vendors tend to supply them, though never (AFAIK) in a first release
of vector ops.

Like unsigned operations, they can be viewed as different operators
on the same type (Java >>> vs. >>) or the same operator on different
types (C unsigned types).  This choice of viewpoint affects the user
model but not the actual machine instructions.  But it does suggest
that it wouldn't be crazy to imagine "saturating" as a property that
applies to integral types, along with "unsigned" and the size of the
type.

I don't think we need to spend a lot of time on them, except to make
sure that they have a place, with other less-loved operations, in our
backend treatment of operators.  (And have I mentioned AES steps
lately?)

— John


More information about the panama-dev mailing list