On Sun, 17 Apr 2022 14:35:14 GMT, Jie Fu <ji...@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. ------------- PR: https://git.openjdk.java.net/jdk/pull/8276