RFR: 8339983: [s390x] secondary_super_cache does not scale well: C1 and interpreter [v2]

Andrew Haley aph at openjdk.org
Tue Nov 26 12:04:38 UTC 2024


On Tue, 26 Nov 2024 11:57:08 GMT, Andrew Haley <aph at openjdk.org> wrote:

>> Amit Kumar has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   suggestion from Andrew
>
> src/hotspot/cpu/s390/macroAssembler_s390.cpp line 3495:
> 
>> 3493:   z_lngr(slot, slot); // slot = -slot
>> 3494:   z_aghi(slot, 64); // slot = slot + 64
>> 3495: 
> 
> So, I'm trying to make sense of this.
> 
> First, you do
> 
> 
>    slot = 63 - slot
>    slot = 64 - slot
> 
> 
> Why not instead reduce
> `   slot = 64 - (63 - slot)`
> which is
> `   slot = slot - 63 + 64`
> which is
> `   slot = slot + 1`
> 
> 
> jshell> void p() {
>    ...>     for (int s = 0; s < 64; s++) {
>    ...>         int n1 = s;
>    ...>         n1 = 63 - n1;
>    ...>         n1 = 64 - n1;
>    ...>         int n2 = s + 1;
>    ...>         if (n1 != n2) {
>    ...>             throw new RuntimeException();
>    ...>         }
>    ...>     }
>    ...> }
> |  created method p()
> 
> jshell> p()

I am assuming that on s390 rotate right by 64 is equivalent to rotate right by 0, but I didn't check that.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22341#discussion_r1858360190


More information about the hotspot-dev mailing list