RFR: 8331935: Add support for primitive array C1 clone intrinsic in PPC [v2]
Amit Kumar
amitkumar at openjdk.org
Mon May 20 07:32:03 UTC 2024
On Mon, 20 May 2024 06:36:28 GMT, Varada M <varadam at openjdk.org> wrote:
>> https://bugs.openjdk.org/browse/JDK-8302850 port for PPC64
>>
>> JMH Benchmark Results
>>
>>
>> Before :
>>
>> Benchmark (size) Mode Cnt Score Error Units
>> ArrayClone.byteArraycopy 0 avgt 15 114.107 ? 1.337 ns/op
>> ArrayClone.byteArraycopy 10 avgt 15 130.492 ? 0.991 ns/op
>> ArrayClone.byteArraycopy 100 avgt 15 139.103 ? 1.913 ns/op
>> ArrayClone.byteArraycopy 1000 avgt 15 321.688 ? 6.033 ns/op
>> ArrayClone.byteClone 0 avgt 15 227.602 ? 3.393 ns/op
>> ArrayClone.byteClone 10 avgt 15 237.624 ? 2.996 ns/op
>> ArrayClone.byteClone 100 avgt 15 239.219 ? 2.835 ns/op
>>
>> ArrayClone.byteClone 1000 avgt 15 355.571 ? 2.946 ns/op
>> ArrayClone.intArraycopy 0 avgt 15 113.275 ? 1.099 ns/op
>> ArrayClone.intArraycopy 10 avgt 15 129.763 ? 1.458 ns/op
>> ArrayClone.intArraycopy 100 avgt 15 213.327 ? 2.524 ns/op
>> ArrayClone.intArraycopy 1000 avgt 15 449.650 ? 7.338 ns/op
>> ArrayClone.intClone 0 avgt 15 225.682 ? 3.048 ns/op
>> ArrayClone.intClone 10 avgt 15 234.532 ? 2.817 ns/op
>> ArrayClone.intClone 100 avgt 15 295.934 ? 4.925 ns/op
>> ArrayClone.intClone 1000 avgt 15 573.368 ? 5.739 ns/op
>> Finished running test 'micro:java.lang.ArrayClone'
>> Test report is stored in build/aix-ppc64-server-release/test-results/micro_java_lang_ArrayClone
>>
>> ==============================
>> Test summary
>> ==============================
>> TEST TOTAL PASS FAIL ERROR
>> micro:java.lang.ArrayClone 1 1 0 0
>> ==============================
>> TEST SUCCESS
>>
>> Finished building target 'test' in configuration 'aix-ppc64-server-release'
>>
>>
>>
>>
>> After:
>>
>> Benchmark (size) Mode Cnt Score Error Units
>> ArrayClone.byteArraycopy 0 avgt 15 113.894 ? 0.993 ns/op
>> ArrayClone.byteArraycopy 10 avgt 15 131.455 ? 0.956 ns/op
>> ArrayClone.byteArraycopy 100 avgt 15 139.145 ? 3.002 ns/op
>> ArrayClone.byteArraycopy 1000 avgt 15 315.957 ? 14.591 ns/op
>> ArrayClone.byteClone 0 avgt 15 43.753 ? 3.669 ns/op
>> ArrayClone.byteClone 10 avgt 15 52.329 ? 1.041 ns/op
>> ArrayClone.byteClone 100 avgt 15 127.711 ? 3.938 ns/op
>>
>> ArrayClone.byteClone 1000 avgt 15 225.937 ? 1.987 ns/op
>> Arr...
>
> Varada M has updated the pull request incrementally with one additional commit since the last revision:
>
> Add support for primitive array C1 clone intrinsic
I guess you can update this as well:
diff --git a/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp b/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp
index 2424d820177..0c1e23c6353 100644
--- a/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp
+++ b/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp
@@ -2107,7 +2107,7 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
// subtype which we can't check or src is the same array as dst
// but not necessarily exactly of type default_type.
Label known_ok, halt;
- metadata2reg(op->expected_type()->constant_encoding(), tmp);
+ metadata2reg(default_type->constant_encoding(), tmp);
if (UseCompressedClassPointers) {
// Tmp holds the default type. It currently comes uncompressed after the
// load of a constant, so encode it.
-------------
Changes requested by amitkumar (Committer).
PR Review: https://git.openjdk.org/jdk/pull/19250#pullrequestreview-2065550268
More information about the hotspot-compiler-dev
mailing list