RFR: 8346038: [REDO] - [C1] LIR Operations with one input should be implemented as LIR_Op1 [v2]

Sandhya Viswanathan sviswanathan at openjdk.org
Mon Jan 13 17:50:45 UTC 2025


On Fri, 10 Jan 2025 23:03:20 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:

>> 1st commit: Same as https://github.com/openjdk/jdk/commit/a21d21f4d7b74e21f68b6bf9c5dc9ba7d3f9963c
>> 2nd commit: Removal of special "Knights Landing" code for `lir_abs` and `lir_neg` from C1.
>> 
>> Testing:
>> make run-test TEST="test/hotspot/jtreg/compiler" JTREG="VM_OPTIONS=-XX:UseAVX=3 -XX:+UnlockDiagnosticVMOptions -XX:+UseKNLSetting"
>> All passed.
>> 
>> This is how this PR changes the C1 code on Knights Landing CPUs (emulated by -XX:+UseKNLSetting):
>> 
>> `lir_abs` without this patch:
>> 
>> vmovsd -0x63(%rip),%xmm1
>> vpandnd %zmm0,%zmm1,%zmm0
>> 
>> 
>> `lir_neg` without this patch:
>> 
>> vmovsd -0x63(%rip),%xmm1
>> vpxord %zmm0,%zmm1,%zmm0
>> 
>> 
>> (The `vmovsd` loads the `LIR_OprFact::doubleConst(-0.0)`.)
>> 
>> `lir_abs` with this patch:
>> 
>> vandpd 0xa1b213d(%rip),%xmm0,%xmm0
>> 
>> 
>> `lir_neg` with this patch:
>> 
>> vxorpd 0xa12585d(%rip),%xmm0,%xmm0
>> 
>> 
>> New code is faster on our machine (using -XX:+UseKNLSetting).
>
> Martin Doerr has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update Copyright year.

Changes in commit 2 - commit 6 look good to me.

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

Marked as reviewed by sviswanathan (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/22709#pullrequestreview-2547356929


More information about the hotspot-compiler-dev mailing list