RFR: 8341068: [s390x] intrinsics for divideUnsigned and remainderUnsigned methods in java.lang.Integer and java.lang.Long [v2]
Lutz Schmidt
lucy at openjdk.org
Fri Oct 18 13:44:26 UTC 2024
On Thu, 17 Oct 2024 13:07:49 GMT, Amit Kumar <amitkumar at openjdk.org> wrote:
>> Add match rules for UDivI, UModI, UDivL, UModL. And also adds `dlr` and `dlgr` instruction.
>>
>> Tier1 test are clean for fastdebug vm;
>>
>> Before this patch, `compiler/c2/TestDivModNodes.java` was failing (see jbs issue) but with this patch test is passing.
>>
>> Without Patch:
>>
>>
>> Benchmark (BUFFER_SIZE) (divisorType) Mode Cnt Score Error Units
>> IntegerDivMod.testDivideRemainderUnsigned 1024 mixed avgt 15 1935.176 ± 2.191 ns/op
>> IntegerDivMod.testDivideRemainderUnsigned 1024 positive avgt 15 1934.915 ± 3.207 ns/op
>> IntegerDivMod.testDivideRemainderUnsigned 1024 negative avgt 15 1934.325 ± 1.108 ns/op
>> IntegerDivMod.testDivideUnsigned 1024 mixed avgt 15 1809.782 ± 49.341 ns/op
>> IntegerDivMod.testDivideUnsigned 1024 positive avgt 15 1769.326 ± 2.607 ns/op
>> IntegerDivMod.testDivideUnsigned 1024 negative avgt 15 1784.053 ± 71.190 ns/op
>> IntegerDivMod.testRemainderUnsigned 1024 mixed avgt 15 2026.978 ± 1.534 ns/op
>> IntegerDivMod.testRemainderUnsigned 1024 positive avgt 15 2028.039 ± 3.812 ns/op
>> IntegerDivMod.testRemainderUnsigned 1024 negative avgt 15 2437.843 ± 636.808 ns/op
>> Finished running test 'micro:java.lang.IntegerDivMod'
>>
>>
>> Benchmark (BUFFER_SIZE) (divisorType) Mode Cnt Score Error Units
>> LongDivMod.testDivideRemainderUnsigned 1024 mixed avgt 15 4524.897 ± 16.566 ns/op
>> LongDivMod.testDivideRemainderUnsigned 1024 positive avgt 15 4373.714 ± 9.514 ns/op
>> LongDivMod.testDivideRemainderUnsigned 1024 negative avgt 15 2018.309 ± 1.788 ns/op
>> LongDivMod.testDivideUnsigned 1024 mixed avgt 15 4320.382 ± 19.055 ns/op
>> LongDivMod.testDivideUnsigned 1024 positive avgt 15 3988.953 ± 8.770 ns/op
>> LongDivMod.testDivideUnsigned 1024 negative avgt 15 1069.703 ± 1.525 ns/op
>> LongDivMod.testRemainderUnsigned 1024 mixed avgt 15 5589.319 ± 4.247 ns/op
>> LongDivMod.testRemainderUnsigned 1024 positive avgt 15 3904.555 ± 3.191 ns/op
>> LongDivMod.testRemainderUnsigned 10...
>
> Amit Kumar has updated the pull request incrementally with one additional commit since the last revision:
>
> changes leftmost->upper and rightmost -> lower
LGTM.
One minor formatting suggestion.
src/hotspot/cpu/s390/s390.ad line 6263:
> 6261: effect(TEMP r4_reven_tmp, KILL cr);
> 6262: // TODO: size(4);
> 6263: format %{ "UDIV $r5_rodd_dst, $r5_rodd_dst,$src2" %}
Suggestion: no whitespace between instruction operands.
src/hotspot/cpu/s390/s390.ad line 6343:
> 6341: ins_cost(DEFAULT_COST);
> 6342: // TODO: size(4);
> 6343: format %{ "UDIVG $r5_rodd_dst, $r5_rodd_dst, $src" %}
Suggestion: no whitespace between instruction operands.
-------------
Marked as reviewed by lucy (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/21559#pullrequestreview-2378073572
PR Review Comment: https://git.openjdk.org/jdk/pull/21559#discussion_r1806490141
PR Review Comment: https://git.openjdk.org/jdk/pull/21559#discussion_r1806490519
More information about the hotspot-compiler-dev
mailing list