RFR: 8269725: AArch64: Add VectorMask query implementation for NEON [v5]
Xiaohong Gong
xgong at openjdk.java.net
Wed Jul 14 10:24:16 UTC 2021
On Wed, 14 Jul 2021 09:49:22 GMT, Andrew Haley <aph at openjdk.org> wrote:
>> Xiaohong Gong has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains five commits:
>>
>> - Merge jdk:master into JDK-8269725
>> - Add more comments
>> - Remove the begining "negr" for "firsttrue,lasttrue"
>> - Merge branch 'jdk:master' into JDK-8269725
>> - 8269725: AArch64: Add VectorMask query implementation for NEON
>
> src/hotspot/cpu/aarch64/aarch64.ad line 1320:
>
>> 1318: const TypeVect* vt = def->bottom_type()->is_vect();
>> 1319: return vt->length();
>> 1320: }
>
> There doesn't seem to be anything AArch64-specific about these functions. I guess if no-one else uses them they can go in aarch64.ad, but it doesn't seem to make much sense.
Yes, actually they are not AAch64-specific. Besides AArch64, x86 also defines the same methods in `x86.ad` and they are used widely in there match rules.
> src/hotspot/cpu/aarch64/aarch64_neon.ad line 5355:
>
>> 5353: __ lsrw($dst$$Register, $dst$$Register, 3);
>> 5354: __ movw(rscratch1, vector_length(this, $src));
>> 5355: __ cmpw($dst$$Register, rscratch1);
>
> You should be able to use `cmpw($dst$$Register, vector_length(this, $src));` here if `operand_valid_for_add_sub_immediate(vector_length(this, $src))`
Good suggestion! I will fix this. Thanks so much!
-------------
PR: https://git.openjdk.java.net/jdk/pull/4699
More information about the hotspot-compiler-dev
mailing list