RFR: 8349582: APX NDD code generation for OpenJDK [v2]
Sandhya Viswanathan
sviswanathan at openjdk.org
Wed Mar 5 01:10:58 UTC 2025
On Fri, 7 Feb 2025 21:53:41 GMT, Srinivas Vamsi Parasa <sparasa at openjdk.org> wrote:
>> The goal of this PR is to generate code using APX NDD instructions.
>>
>> **Please note:** I'm on vacation till March 3rd. Responses to the PR comments will be delayed until March 4th. Thank You for your understanding!
>
> Srinivas Vamsi Parasa has updated the pull request incrementally with one additional commit since the last revision:
>
> revert to nf version for {pop/tz/lz}cnt count instructions
src/hotspot/cpu/x86/x86_64.ad line 4398:
> 4396: %}
> 4397: ins_encode %{
> 4398: __ eshrl($dst$$Register, $mem$$Address, markWord::klass_shift_at_offset, false);
This change could be done as part of loadNKlassCompactHeaders instruct itself as there is no additional register needed.
Something like below:
if (UseAPX_ {
__ eshrl($dst$$Register, $mem$$Address, markWord::klass_shift_at_offset, false);
} else {
__ movl($dst$$Register, $mem$$Address);
__ shrl($dst$$Register, markWord::klass_shift_at_offset);
}
src/hotspot/cpu/x86/x86_64.ad line 5573:
> 5571: ins_pipe(ialu_reg);
> 5572: %}
> 5573:
This instruct could be removed as this is already an unary operation with separate destination, Likewise other unary operator instructs could also be removed where the destination is already separate from source.
src/hotspot/cpu/x86/x86_64.ad line 5587:
> 5585:
> 5586: instruct countLeadingZerosI_mem_nf(rRegI dst, memory src) %{
> 5587: predicate(UseAPX && UseCountLeadingZerosInstruction);
This instruct could be removed as this is already an unary operation with separate destination,
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23501#discussion_r1980081435
PR Review Comment: https://git.openjdk.org/jdk/pull/23501#discussion_r1980098430
PR Review Comment: https://git.openjdk.org/jdk/pull/23501#discussion_r1980104739
More information about the hotspot-compiler-dev
mailing list