[vectorIntrinsics+mask] RFR: 8271273: Java API and IR changes for masked compare operation
Xiaohong Gong
xgong at openjdk.java.net
Mon Jul 26 10:19:23 UTC 2021
On Mon, 26 Jul 2021 09:33:38 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
> - Re-organized the Java API implementation to use one common entry point of masked/non-masked vector compare operation.
> - Intrinsic side changes to absorb newly passed mask if target support predicated instructions else handled appropriately by performing vector AND b/w comparison result and explicit mask.
src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ByteVector.java line 1889:
> 1887: <M extends VectorMask<Byte>>
> 1888: M compareTemplate(Class<M> maskType, Comparison op, Vector<Byte> v, M m) {
> 1889: Objects.requireNonNull(v);
It's better to check the argument `M m` for masked API, since we'd better to make sure it is not "null" when going into hotspot intrinsics. Calling `m.check(maskType, this)` can guarantee this.
-------------
PR: https://git.openjdk.java.net/panama-vector/pull/103
More information about the panama-dev
mailing list