Re: RFR: 8285973: x86_64: Improve fp comparison and cmove for eq/ne [v3]

2022-05-23 Thread Quan Anh Mai
On Sat, 21 May 2022 10:31:25 GMT, Quan Anh Mai wrote: >> Hi, >> >> This patch optimises the matching rules for floating-point comparison with >> respects to eq/ne on x86-64 >> >> 1, When the inputs of a comparison is the same (i.e `isNaN` patterns), `ZF` >> is always set, so we don't need

Re: RFR: 8285973: x86_64: Improve fp comparison and cmove for eq/ne [v3]

2022-05-23 Thread Sandhya Viswanathan
On Sat, 21 May 2022 10:31:25 GMT, Quan Anh Mai wrote: >> Hi, >> >> This patch optimises the matching rules for floating-point comparison with >> respects to eq/ne on x86-64 >> >> 1, When the inputs of a comparison is the same (i.e `isNaN` patterns), `ZF` >> is always set, so we don't need

Re: RFR: 8285973: x86_64: Improve fp comparison and cmove for eq/ne [v3]

2022-05-21 Thread Vladimir Kozlov
On Sat, 21 May 2022 15:30:29 GMT, Vladimir Kozlov wrote: > I started our testing. Please, wait results. Testing passed clean. - PR: https://git.openjdk.java.net/jdk/pull/8525

Re: RFR: 8285973: x86_64: Improve fp comparison and cmove for eq/ne [v3]

2022-05-21 Thread Vladimir Kozlov
On Sat, 21 May 2022 10:31:25 GMT, Quan Anh Mai wrote: >> Hi, >> >> This patch optimises the matching rules for floating-point comparison with >> respects to eq/ne on x86-64 >> >> 1, When the inputs of a comparison is the same (i.e `isNaN` patterns), `ZF` >> is always set, so we don't need

Re: RFR: 8285973: x86_64: Improve fp comparison and cmove for eq/ne [v3]

2022-05-21 Thread Quan Anh Mai
On Wed, 4 May 2022 23:27:45 GMT, Vladimir Kozlov wrote: >> The changes to `Float` and `Double` look good. I don't think we need >> additional tests, see test/jdk/java/lang/Math/IeeeRecommendedTests.java. >> >> At first i thought we no longer need PR #8459 but it seems both PRs are >>

Re: RFR: 8285973: x86_64: Improve fp comparison and cmove for eq/ne [v3]

2022-05-21 Thread Quan Anh Mai
> Hi, > > This patch optimises the matching rules for floating-point comparison with > respects to eq/ne on x86-64 > > 1, When the inputs of a comparison is the same (i.e `isNaN` patterns), `ZF` > is always set, so we don't need `cmpOpUCF2` for the eq/ne cases, which > improves the sequence

Re: RFR: 8285973: x86_64: Improve fp comparison and cmove for eq/ne [v2]

2022-05-20 Thread Vladimir Kozlov
On Fri, 20 May 2022 22:22:43 GMT, Sandhya Viswanathan wrote: >> 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

Re: RFR: 8285973: x86_64: Improve fp comparison and cmove for eq/ne [v2]

2022-05-20 Thread Sandhya Viswanathan
On Wed, 4 May 2022 23:16:41 GMT, Vladimir Kozlov 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

Re: RFR: 8285973: x86_64: Improve fp comparison and cmove for eq/ne

2022-05-20 Thread Sandhya Viswanathan
On Wed, 18 May 2022 14:59:33 GMT, Quan Anh Mai wrote: >> Hi, >> >> This patch optimises the matching rules for floating-point comparison with >> respects to eq/ne on x86-64 >> >> 1, When the inputs of a comparison is the same (i.e `isNaN` patterns), `ZF` >> is always set, so we don't need

Re: RFR: 8285973: x86_64: Improve fp comparison and cmove for eq/ne [v2]

2022-05-19 Thread Srinivas Vamsi Parasa
On Wed, 18 May 2022 14:59:49 GMT, Quan Anh Mai wrote: >> Hi, >> >> This patch optimises the matching rules for floating-point comparison with >> respects to eq/ne on x86-64 >> >> 1, When the inputs of a comparison is the same (i.e `isNaN` patterns), `ZF` >> is always set, so we don't need

Re: RFR: 8285973: x86_64: Improve fp comparison and cmove for eq/ne [v2]

2022-05-18 Thread Quan Anh Mai
On Wed, 4 May 2022 23:16:41 GMT, Vladimir Kozlov 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

Re: RFR: 8285973: x86_64: Improve fp comparison and cmove for eq/ne

2022-05-18 Thread Quan Anh Mai
On Wed, 4 May 2022 01:59:17 GMT, Quan Anh Mai wrote: > Hi, > > This patch optimises the matching rules for floating-point comparison with > respects to eq/ne on x86-64 > > 1, When the inputs of a comparison is the same (i.e `isNaN` patterns), `ZF` > is always set, so we don't need

Re: RFR: 8285973: x86_64: Improve fp comparison and cmove for eq/ne [v2]

2022-05-18 Thread Quan Anh Mai
> Hi, > > This patch optimises the matching rules for floating-point comparison with > respects to eq/ne on x86-64 > > 1, When the inputs of a comparison is the same (i.e `isNaN` patterns), `ZF` > is always set, so we don't need `cmpOpUCF2` for the eq/ne cases, which > improves the sequence

Re: RFR: 8285973: x86_64: Improve fp comparison and cmove for eq/ne

2022-05-04 Thread Vladimir Kozlov
On Wed, 4 May 2022 22:27:48 GMT, Paul Sandoz wrote: > The changes to `Float` and `Double` look good. I don't think we need > additional tests, see test/jdk/java/lang/Math/IeeeRecommendedTests.java. Thank you, Paul for pointing the test. It means we need to run tier4 (which runs these tests

Re: RFR: 8285973: x86_64: Improve fp comparison and cmove for eq/ne

2022-05-04 Thread Vladimir Kozlov
On Wed, 4 May 2022 19:32:41 GMT, Vladimir Kozlov wrote: >> Hi, >> >> This patch optimises the matching rules for floating-point comparison with >> respects to eq/ne on x86-64 >> >> 1, When the inputs of a comparison is the same (i.e `isNaN` patterns), `ZF` >> is always set, so we don't need

Re: RFR: 8285973: x86_64: Improve fp comparison and cmove for eq/ne

2022-05-04 Thread Paul Sandoz
On Wed, 4 May 2022 01:59:17 GMT, Quan Anh Mai wrote: > Hi, > > This patch optimises the matching rules for floating-point comparison with > respects to eq/ne on x86-64 > > 1, When the inputs of a comparison is the same (i.e `isNaN` patterns), `ZF` > is always set, so we don't need

Re: RFR: 8285973: x86_64: Improve fp comparison and cmove for eq/ne

2022-05-04 Thread Vladimir Kozlov
On Wed, 4 May 2022 01:59:17 GMT, Quan Anh Mai wrote: > Hi, > > This patch optimises the matching rules for floating-point comparison with > respects to eq/ne on x86-64 > > 1, When the inputs of a comparison is the same (i.e `isNaN` patterns), `ZF` > is always set, so we don't need