RFR: 8301739: AArch64: Add optimized rules for vector compare with immediate for SVE

Quan Anh Mai qamai at openjdk.org
Wed Apr 12 09:07:35 UTC 2023


On Wed, 12 Apr 2023 08:47:06 GMT, Chang Peng <duke at openjdk.org> wrote:

>> src/hotspot/cpu/aarch64/aarch64.ad line 4438:
>> 
>>> 4436: operand immI5()
>>> 4437: %{
>>> 4438:   predicate(((-(1 << 4)) <= n->get_int()) && (n->get_int() < (1 << 4)));
>> 
>> At some point someone must realize that
>> 
>> `((-(1 << size)) <= n->get_int()) && (n->get_int() < (1 << size))`
>> 
>> could be a function.
>
>> At some point someone must realize that
>> 
>> `((-(1 << size)) <= n->get_int()) && (n->get_int() < (1 << size))`
>> 
>> could be a function.
> 
> I think this function can make this predicate more clearly, but I found there are many predicates to modify in aarch64.ad.
> I suggest using an extra patch to add this function and modify all similar predicates.

We have `AbstractAssembler::is_simm(int64_t, uint)` which does exactly this.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/13200#discussion_r1163841475


More information about the hotspot-compiler-dev mailing list