RFR: 8284992: Fix misleading Vector API doc for LSHR operator
Jie Fu
jiefu at openjdk.java.net
Tue Apr 19 09:02:44 UTC 2022
Hi all,
The Current Vector API doc for `LSHR` is
Produce a>>>(n&(ESIZE*8-1)). Integral only.
This is misleading which may lead to bugs for Java developers.
This is because for negative byte/short elements, the results computed by `LSHR` will be different from that of `>>>`.
For more details, please see https://github.com/openjdk/jdk/pull/8276#issue-1206391831 .
After the patch, the doc for `LSHR` is
Produce zero-extended right shift of a by (n&(ESIZE*8-1)) bits. Integral only.
Thanks.
Best regards,
Jie
-------------
Commit messages:
- 8284992: Fix misleading Vector API doc for LSHR operator
Changes: https://git.openjdk.java.net/jdk/pull/8291/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8291&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8284992
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.java.net/jdk/pull/8291.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/8291/head:pull/8291
PR: https://git.openjdk.java.net/jdk/pull/8291
More information about the core-libs-dev
mailing list