RFR(M): 8213134: AArch64: vector shift failed with MaxVectorSize=8
vladimir.kozlov at oracle.com
Wed Nov 21 17:55:47 UTC 2018
You are right. I think I was confused that you are not limiting MaxVectorSize but simple use min(16, MaxVectorSize).
The assert is fine.
On 11/20/18 10:28 PM, Yang Zhang (Arm Technology China) wrote:
>> I don't see any checking or setting for MaxVectorSize in vm_version_aarch64.cpp.
>> In such case you will definitely hit your new assert Matcher::vector_shift_count_ideal_reg().
>> aarch64.ad code Matcher::vector_width_in_bytes() has limit vector size to 16 bytes. So using MaxVectorSize > 16 will hit the assert.
> Matcher::vector_width_in_bytes() limits vector size to min(16, MaxVectorSize).
> Matcher::vector_shift_count_ideal_reg() assert(MaxVectorSize >= size, "Length isn't supported");
> When MaxVectorSize is 8, size is 8.
> When MaxVectorSize is greater than or equal 16, size is 16.
> So (MaxVectorSize >= size) is always true.
> Test cases of cr6340864 are passed with or without this new assert.
> Do I need to remove this new assert?
> On 11/18/18 11:53 PM, Yang Zhang (Arm Technology China) wrote:
>> When I implemented AArch64 NEON for Vector API (http://openjdk.java.net/jeps/338), I found an issue about vector shift. I have a patch which could fix this issue. Could anyone help to review this patch?
>> Webrev: http://cr.openjdk.java.net/~yzhang/8213134/webrev.01/
>> JBS: https://bugs.openjdk.java.net/browse/JDK-8213134
>> This patch is verified both in jdk/jdk master and panama/vectorIntrinsics, and tests are passed.
>> Hotspt jtreg contains the following test cases that can cover all the patterns of vector shift. But only default option "-XX:MaxVectorSize=64" is tested, so this issue isn't detected. Now I add "-XX:MaxVectorSize=8", "-XX:MaxVectorSize=16" and "-XX:MaxVectorSize=32" to these jtreg tests in this patch.
> IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
More information about the hotspot-dev