RFR: 8286847: Rotate vectors don't support byte or short [v3]
Haomin
duke at openjdk.java.net
Wed May 18 07:01:00 UTC 2022
> static void test_fun(byte[] a0, int[] b0, byte[] c0) {
> for (int i=0; i<ARRLEN; i++) {
> c0[i] = (byte)(a0[i] << (7) | a0[i] >>> (-7));
> }
> }
>
>
> when I implement RotateLeftV in loongarch.ad, I found this executed by c2 vector and executed by interpreter are not equal.
>
> It's executed on x86 would create an assert error.
>
>
> # Internal Error (/home/wanghaomin/jdk/src/hotspot/share/opto/vectornode.cpp:347), pid=26469, tid=26485
> # assert(false) failed: not supported: byte
>
>
> RotateLeftV for byte, short values produces incorrect Java result. Because java code should convert a byte, short value into int value, and then do RotateI.
Haomin has updated the pull request incrementally with one additional commit since the last revision:
merge the two cases into one
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/8740/files
- new: https://git.openjdk.java.net/jdk/pull/8740/files/05ebce18..ba5428de
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8740&range=02
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8740&range=01-02
Stats: 364 lines in 3 files changed: 156 ins; 208 del; 0 mod
Patch: https://git.openjdk.java.net/jdk/pull/8740.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/8740/head:pull/8740
PR: https://git.openjdk.java.net/jdk/pull/8740
More information about the hotspot-compiler-dev
mailing list