[jdk16] RFR: 8260585: AArch64: Wrong code generated for shifting right and accumulating four unsigned short integers [v3]

Andrew Haley aph at redhat.com
Sun Jan 31 11:49:49 UTC 2021


On 1/31/21 10:34 AM, Dong Bo wrote:
> This was wrong, both src and dst should have the same value as before.
> Actually, when the shift is `>= 16`, the URShift is optimized to zero by the compiler.
> So we don't have a `vsrla4S_imm` match if `shift >= 16`, the wrong `eor` is not generated.
> Check the assembly code of the following test:
> # test
> public void shiftURightAccumulateChar() {
>       for (int i = 0; i < count; i++) {
>            charsD[i] = (char) (charsA[i] + (charsB[i] >>> 16));
>       }
> }

We need to make sure this is in a regression test. Also, please make
sure that a shift if e.g. 35 works correctly.

-- 
Andrew Haley  (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671



More information about the hotspot-compiler-dev mailing list