RFR: 8269725: AArch64: Add VectorMask query implementation for NEON [v2]
Xiaohong Gong
xgong at openjdk.java.net
Thu Jul 8 10:50:53 UTC 2021
On Thu, 8 Jul 2021 09:52:42 GMT, Andrew Haley <aph at openjdk.org> wrote:
>> Thanks for your comment @theRealAph ! Yeah, it's "Reverse the bits". Thanks for pointing out this!
>> `negr` is used to convert the original mask values from `0/1` to `0/-1`. So that we can firstly calculate the trailing zero numbers in bits, and then divide it by 8. Note that the mask input for these operations are different from others. It is actually a boolean vector with `0/1` as the element value.
>
> Yes, but you reverse the bits in $dst, which reverses the byte order and changes each 0x01 byte to 0x80. You then count the leading zeroes. What, then, is the point of negating each 0x01 byte to 0xff first?
Yes, I was intending to make the bits right after reversing. But seems it's also ok to remove the `negr` for `firsttrue`. And for `lasttrue`, I think it's better to keep the `negr`. I will remove it for `firsttrue` and have a test. Thanks for the review!
-------------
PR: https://git.openjdk.java.net/jdk/pull/4699
More information about the hotspot-compiler-dev
mailing list