[jdk16] RFR: 8260585: AArch64: Wrong code generated for shifting right and accumulating four unsigned short integers [v3]
dongbo (E)
dongbo4 at huawei.com
Mon Feb 1 08:11:35 UTC 2021
On 2021/1/31 19:49, Andrew Haley wrote:
> 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.
Hi,
Added regresstion tests for serveral shift counts.
The tests passed with the newest version and still can catch the typo.
Also tested a few of injected errors, the tests failed as expected.
More information about the hotspot-compiler-dev
mailing list