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

David Holmes dholmes at openjdk.org
Wed Dec 11 20:30:42 UTC 2024


On Thu, 5 Dec 2024 21:29:51 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:

>> Change `lir_sqrt`, `lir_abs`, `lir_neg`, `lir_f2hf`, `lir_hf2f` to use `LIR_Op1`. Extend `LIR_Op1` to support one temp register operand. Also see JBS issue.
>> 
>> Remove `lir_tan` and `lir_log10` which are unused (dead and incomplete code). They should have been removed with or after https://github.com/openjdk/jdk/commit/ad79a5ae65d24861ead3ae96cf148c8bc0f02736 and the corresponding changes on other platforms.
>> 
>> The removal of the unnecessary float constant loads improves performance:
>> make run-test TEST="micro:Fp16ConversionBenchmark" MICRO="VM_OPTIONS=-XX:TieredStopAtLevel=1"
>> 
>> Power 10 without patch:
>> 
>> Benchmark                                     (size)   Mode  Cnt      Score    Error   Units
>> Fp16ConversionBenchmark.floatToFloat16          2048  thrpt   15    247.064 ±  0.189  ops/ms
>> 
>> 
>> Power 10 with patch:
>> 
>> Benchmark                                     (size)   Mode  Cnt      Score    Error   Units
>> Fp16ConversionBenchmark.floatToFloat16          2048  thrpt   15    308.372 ±  0.432  ops/ms
>> 
>> 
>> x64 machine without patch:
>> 
>> Benchmark                                     (size)   Mode  Cnt      Score    Error   Units
>> Fp16ConversionBenchmark.floatToFloat16          2048  thrpt   15     384.565 ±    3.758  ops/ms
>> 
>> 
>> x64 machine with patch:
>> 
>> Benchmark                                     (size)   Mode  Cnt      Score    Error   Units
>> Fp16ConversionBenchmark.floatToFloat16          2048  thrpt   15     406.121 ±    3.228  ops/ms
>> 
>> 
>> Testing: tier1-4 on x64 (Windows, linux, MacOS), aarch64 (linux, MacOS), ppc64 (linux, AIX)
>
> Martin Doerr has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update Copyright headers.

We have a large number of failures in our tier 2 (so far) CI after this was integrated, all with issues in the JIT.

There is a crash in LIR_Assembler::negate

`#  assert(regs[i] != regs[j]) failed: regs[0] and regs[1] are both: xmm2`

There are FP failures of different kinds

`assertEquals expected: 1.401298464324817E-45 but was: 1.727233711018889E-77`

`RuntimeException: pow(+Infinity, 0.5), expected: Infinity, actual: Infinity`

Sorry but this change will be backed out.

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

PR Comment: https://git.openjdk.org/jdk/pull/22582#issuecomment-2537056214


More information about the hotspot-compiler-dev mailing list