RFR: 8279508: Auto-vectorize Math.round API [v3]
Andrew Haley
aph at openjdk.java.net
Sun Feb 13 11:01:06 UTC 2022
On Sun, 13 Feb 2022 03:09:43 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
>> Summary of changes:
>> - Intrinsify Math.round(float) and Math.round(double) APIs.
>> - Extend auto-vectorizer to infer vector operations on encountering scalar IR nodes for above intrinsics.
>> - Test creation using new IR testing framework.
>>
>> Following are the performance number of a JMH micro included with the patch
>>
>> Test System: Intel(R) Xeon(R) Platinum 8380 CPU @ 2.30GHz (Icelake Server)
>>
>>
>> Benchmark | TESTSIZE | Baseline AVX3 (ops/ms) | Withopt AVX3 (ops/ms) | Gain ratio | Baseline AVX2 (ops/ms) | Withopt AVX2 (ops/ms) | Gain ratio
>> -- | -- | -- | -- | -- | -- | -- | --
>> FpRoundingBenchmark.test_round_double | 1024.00 | 584.99 | 1870.70 | 3.20 | 510.35 | 548.60 | 1.07
>> FpRoundingBenchmark.test_round_double | 2048.00 | 257.17 | 965.33 | 3.75 | 293.60 | 273.15 | 0.93
>> FpRoundingBenchmark.test_round_float | 1024.00 | 825.69 | 3592.54 | 4.35 | 825.32 | 1836.42 | 2.23
>> FpRoundingBenchmark.test_round_float | 2048.00 | 388.55 | 1895.77 | 4.88 | 412.31 | 945.82 | 2.29
>>
>>
>> Kindly review and share your feedback.
>>
>> Best Regards,
>> Jatin
>
> Jatin Bhateja has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
>
> - 8279508: Adding vectorized algorithms to match the semantics of rounding operations.
> - Merge branch 'master' of http://github.com/openjdk/jdk into JDK-8279508
> - 8279508: Adding a test for scalar intrinsification.
> - 8279508: Auto-vectorize Math.round API
src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp line 4066:
> 4064: }
> 4065:
> 4066: void C2_MacroAssembler::vector_cast_double_special_cases_evex(XMMRegister dst, XMMRegister src, XMMRegister xtmp1,
What does this do? Comment, even pseudo code, would be nice.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7094
More information about the hotspot-compiler-dev
mailing list