On Tue, 26 Apr 2022 17:31:40 GMT, Jatin Bhateja <jbhat...@openjdk.org> wrote:

> > > According to the Vector API doc, the LSHR operator computes 
> > > a>>>(n&(ESIZE*8-1))
> 
> Documentation is correct if viewed strictly in context of subword vector 
> lane, JVM internally promotes/sign extends subword type scalar variables into 
> int type, but vectors are loaded from continuous memory holding subwords, it 
> will not be correct for developer to imagine that individual subword type 
> lanes will be upcasted into int lanes before being operated upon.
> 
> Thus both java implementation and compiler handling looks correct.

Thanks @jatin-bhateja for taking a look at this.
After the discussion, I think it's fine to keep the current implementation of 
LSHR.
So we're now fixing the misleading doc here: 
https://github.com/openjdk/jdk/pull/8291 .

And I think it would be better to add one more operator for `>>>`.
Thanks.

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

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

Reply via email to