RFR: JDK-8331732 : [PPC64] Unify and optimize code which converts != 0 to 1 [v3]

Suchismith Roy sroy at openjdk.org
Thu Jun 27 16:02:11 UTC 2024


On Thu, 27 Jun 2024 08:22:38 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:

>> Suchismith Roy has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   space after comma
>
> src/hotspot/cpu/ppc/macroAssembler_ppc.cpp line 348:
> 
>> 346: // Branch-free implementation to convert !0 to false
>> 347: // Set register dst to true if dst is non zero using temp for calculations on Power Version<10.
>> 348: // Set register dst to true if dst is non zero for Power 10 and above machines.
> 
> Please don't use the term "true". It's not defined in assembler.
> In addition: We do the same for older processors. Just by other instructions.
> I think these 2 lines could be removed.

Can i instead just write 1? I feel the comments can explain the logic in short ?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19886#discussion_r1657400271


More information about the hotspot-dev mailing list