RFR: 8256973: Intrinsic creation for VectorMask query (lastTrue, firstTrue, trueCount) APIs [v2]

Jatin Bhateja jbhateja at openjdk.java.net
Sat May 15 02:30:40 UTC 2021


On Fri, 14 May 2021 21:23:31 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

> Ok, fair enough. We can revisit that later and merge them if needed.
> Some suggestions to consider to align it with `reductionCoerced`:
> 
> * reflect in the name that it's effectively a reduction, but on masks (`maskReductionCoerced`?);
> * return type can be generalized to `long`;

Hi @iwanowww,  Can you kindly elaborate why should the return type be long here ? 
We will need to again downcast it to integer since these APIs return an integer value.

> * bound on M: `<M extends VectorMask>`;
> * no need to introduce a special interface, `Function<T,R>` just works: `VectorMaskOp<M>` -> `Function<M, Long>`;

-------------

PR: https://git.openjdk.java.net/jdk/pull/3916


More information about the hotspot-compiler-dev mailing list