[vector] Mask.shiftLR/xor, Int/LongVector.numberOfLeadingZeros

Paul Sandoz paul.sandoz at oracle.com
Tue Mar 27 00:14:54 UTC 2018


Hi,

Please see this patch to add Mask.shiftL/shiftR/xor/leadingFalseCount, Int/LongVector.numberOfLeadingZeros.

  http://cr.openjdk.java.net/~psandoz/panama/mask-shiftlr-xor/webrev/

I believe these are likely to be easy to optimize, some more than others. Is that so?

Mask.shiftL/shiftR can be translated to lane-wise shifting when not mapped to opmask registers.

Int/LongVector.numberOfLeadingZeros can be mapped to the VPLZCNTD/Q instructions.

I am unsure about Mask.leadingFalseCount. There might various optimal strategies, such as using pmovmskb or ptest to convert to a 64 bit value and then using lzcnt or tzcnt.

Thanks,
Paul.


More information about the panama-dev mailing list