On Mon, 18 Apr 2022 04:14:39 GMT, Jie Fu <ji...@openjdk.org> wrote:

> However, just image that someone would like to optimize some code segments of 
> bytes/shorts `>>>`

Then that person can just use signed shift (`VectorOperators.ASHR`), right? 
Shifting on masked shift counts means that the shift count cannot be greater 
than 8 for bytes and 16 for shorts, which means that `(byte)(src[i] >>> 3)` is 
exactly the same as `(byte)(src[i] >> 3)`. Please correct me if I misunderstood 
something here.

Your proposed changes make unsigned shifts for subwords behave exactly the same 
as signed shifts, which is both redundant (we have 2 operations doing exactly 
the same thing) and inadequate (we lack the operation to do the proper unsigned 
shifts)

Thank you very much.

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

PR: https://git.openjdk.java.net/jdk/pull/8276

Reply via email to