[vectorIntrinsics+mask] RFR: 8264563: Add masked vector intrinsics for binary/store operations [v2]

Sandhya Viswanathan sviswanathan at openjdk.java.net
Thu Apr 8 23:56:22 UTC 2021


On Wed, 7 Apr 2021 09:01:23 GMT, Xiaohong Gong <xgong at openjdk.org> wrote:

>> src/jdk.incubator.vector/share/classes/jdk/incubator/vector/X-Vector.java.template line 701:
>> 
>>> 699:             } else if (op == DIV) {
>>> 700:                 VectorMask<$Boxtype$> eqz = that.eq(($type$)0);
>>> 701:                 if (m != null) {
>> 
>> Checking for m!=null would cause boxing here.
>
> See the above solution. Thanks!

ok.

>> src/jdk.incubator.vector/share/classes/jdk/incubator/vector/X-Vector.java.template line 823:
>> 
>>> 821:         if (opKind(op, VO_SHIFT) && ($type$)(int)e == e) {
>>> 822:             $abstractvectortype$ shift = lanewiseShift(op, (int) e);
>>> 823:             return m != null ? blend(shift, m) : shift;
>> 
>> Checking for m!=null would cause boxing here.
>
> Since I didn't add the masked intrinisic version for `broadcastInt` that is called by `lanewiseShift`. I think it can be fixed with the same solution for other binary `lanewise`. Once the masked `broadcastInt` is added, the code might look like:
>    if (opKind(op, VO_SHIFT) && ($type$)(int)e == e) {
>          return lanewiseShift(op, (int) e, m);
>    }

sounds good.

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

PR: https://git.openjdk.java.net/panama-vector/pull/57


More information about the panama-dev mailing list