RFR: 8349686: [s390x] C1: Improve Class.isInstance intrinsic [v2]

Andrew Haley aph at openjdk.org
Tue Feb 11 08:16:11 UTC 2025


On Tue, 11 Feb 2025 04:14:28 GMT, Amit Kumar <amitkumar at openjdk.org> wrote:

>> s390x implementation for Class.isInstance intrinsic. 
>> 
>> Tier1 test on release & fastdebug vm are clean with flag: `-XX:-UseSecondarySupersCache -XX:+UseSecondarySupersTable -XX:+VerifySecondarySupers -XX:+StressSecondarySupers`. 
>> 
>> Benchmark results will be updated soon.
>
> Amit Kumar has updated the pull request incrementally with one additional commit since the last revision:
> 
>   optimize branching

src/hotspot/cpu/s390/c1_Runtime1_s390.cpp line 596:

> 594:       // Mirror: Z_ARG1(R2)
> 595:       // Object: Z_ARG2
> 596:       // Temps: Z_ARG3, Z_ARG4, Z_ARG5, Z_tmp_1, Z_tmp_2

Suggestion:

      // Temps: Z_ARG3, Z_ARG4, Z_ARG5, Z_R11, Z_R12
      // Z_R11 and Z_R12 are call saved, so we must push them before any use

src/hotspot/cpu/s390/c1_Runtime1_s390.cpp line 601:

> 599:       // Get the Klass* into Z_ARG3
> 600:       Register klass = Z_ARG3 , obj = Z_ARG2, result = Z_RET;
> 601:       Register temp0 = Z_ARG4, temp1 = Z_ARG5, temp2 = Z_tmp_1, temp3 = Z_tmp_2;

Suggestion:

      Register temp0 = Z_ARG4, temp1 = Z_ARG5, temp2 = Z_R11, temp3 = Z_R12;

Aliasing `temp2` to `Z_tmp_1` is just too confusing to the reader.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23535#discussion_r1950401236
PR Review Comment: https://git.openjdk.org/jdk/pull/23535#discussion_r1950399763


More information about the hotspot-dev mailing list