RFR: JDK-8153837: AArch64: Handle special cases for MaxINode & MinINode [v2]

Dmitry Chuyko dchuyko at openjdk.org
Thu Dec 15 21:29:08 UTC 2022


On Wed, 7 Dec 2022 18:52:29 GMT, Andrew Haley <aph at openjdk.org> wrote:

>> Dmitry Chuyko has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Reverted Ideal change, moved definitions to m4
>
> src/hotspot/cpu/aarch64/aarch64.ad line 15816:
> 
>> 15814:   %}
>> 15815: %}
>> 15816: 
> 
> Please put all this repetitive stuff into aarch64_ad.m4 and we'll review that.

As min/max ideal transformation https://git.openjdk.org/jdk/pull/9703 looks into child nodes with add and nested min/max, it is tricky to add guarantee of constant being in a fixed input (initial PR variant broke the test ). I rolled the Ideal change back but it leads to doubling of matching rules. So thanks for the advice, that makes even more sense to move things to .m4. I've done that.

CMOV_INSN macro declares instruct-s for generic min/max case with csel.
CMOV_DRAW_INSN macro declares instruct-s that "draw" one of (-1, 0, 1) constants using zr.
MINMAX_DRAW_INSN macro declares instruct-s with matching rules for (-1, 0, 1) immediate operand and a generic register in different order.
There are also helper string macros for upper and lower case to reduce the number of word repetitions.

Existing generic min and max rules were renamed for consistency.

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

PR: https://git.openjdk.org/jdk/pull/11570


More information about the hotspot-compiler-dev mailing list