RFR: 8333382: [s390x] Enhance popcnt Instruction to use Z15 facilities [v4]
Amit Kumar
amitkumar at openjdk.org
Mon Jun 10 13:38:13 UTC 2024
On Mon, 10 Jun 2024 13:16:55 GMT, Lutz Schmidt <lucy at openjdk.org> wrote:
>> src/hotspot/cpu/s390/macroAssembler_s390.cpp line 5816:
>>
>>> 5814:
>>> 5815: assert(r_tmp != noreg, "temp register required for popcnt, for machines < z15");
>>> 5816: assert_different_registers(r_dst, r_tmp); // if r_src is same as r_tmp, it should be fine
>>
>> Please move these assertions out of the if block. We want to ensure this for testing purposes at all times, so that even if we test on Z15 we expect it to run on others.
>
> @theRealAph,
> I understand your argument. Nonetheless, I'm not happy with this request. The match rules in s390.ad have been designed such that, in case the more potent instruction is available, the register allocator does not need to provide a temp register.
> Regards, Lutz
I agree with Lutz. I have added a separate match rule which will be applicable only for machines `Z15 onwards`. Which will not pass `r_tmp` and it will be considered `noreg` will not satisfy first assert requirement.
> so that even if we test on Z15 we expect it to run on others.
`else` block will never run on `Z15 or Z16` machines.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19509#discussion_r1633265264
More information about the hotspot-dev
mailing list