[vectorIntrinsics] RFR: 8281562:[vectorapi] Add support for popcount operation

Quan Anh Mai duke at openjdk.java.net
Thu Feb 10 01:22:17 UTC 2022


On Thu, 10 Feb 2022 01:17:39 GMT, Quan Anh Mai <duke at openjdk.java.net> wrote:

>> src/hotspot/share/prims/vectorSupport.cpp line 482:
>> 
>>> 480:       break;
>>> 481:     }
>>> 482:     case VECTOR_OP_POPCNT: {
>> 
>> Can the fall through ever occur? since the operation is only supported for `int` and `long`.
>
> It is also wrong, you can't use the scalar `PopCountI` on byte and short

Also, are you sure this will work? Since PopCountVL takes a long vector and returns an int vector, I think you need to adjust the C2 compiler before trying to intrinsify this.

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

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


More information about the panama-dev mailing list