RFR: 8285973: x86_64: Improve fp comparison and cmove for eq/ne [v2]
Sandhya Viswanathan
sviswanathan at openjdk.java.net
Fri May 20 22:26:55 UTC 2022
On Wed, 4 May 2022 23:16:41 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>> src/hotspot/cpu/x86/x86_64.ad line 6998:
>>
>>> 6996: ins_encode %{
>>> 6997: __ cmovl(Assembler::parity, $dst$$Register, $src$$Register);
>>> 6998: __ cmovl(Assembler::notEqual, $dst$$Register, $src$$Register);
>>
>> Should this be `equal`?
>
> I see that you swapped `src, dst` in `match()` but `format` is sill incorrect and the code is confusing.
I agree with @vnkozlov that this needs explanation. Could you please add comments here with IR and example code generated for both the eq case and ne case? You have some explanation in the PR description but not in the code. The description needs to be in the code as well for maintenance.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8525
More information about the core-libs-dev
mailing list