Re: [PATCH 1/5] RISC-V: Remove float vector eqne pattern

2024-06-10 Thread Jeff Law
On 6/10/24 8:52 AM, Li, Pan2 wrote: Not sure if below float eq implement in sail-riscv is useful or not, but looks like some special handling for nan, as well as snan. https://github.com/riscv/sail-riscv/blob/master/c_emulator/SoftFloat-3e/source/f32_eq.c Yes, but it's symmetrical, which is

Re: [PATCH 1/5] RISC-V: Remove float vector eqne pattern

2024-06-10 Thread Jeff Law
On 6/10/24 10:16 AM, Demin Han wrote: Hi, I‘m on vacation rencently. I will return in a few days and summit new patch with the test. No problem. Enjoy your vacation, this can certainly wait until you return. jeff

Re: [PATCH 1/5] RISC-V: Remove float vector eqne pattern

2024-06-10 Thread Demin Han
-V: Remove float vector eqne pattern On 6/10/24 1:33 AM, Robin Dapp wrote: >> But isn't canonicalization of EQ/NE safe, even for IEEE NaN and +-0.0? >> >> target = (a == b) ? x : y >> target = (a != b) ? y : x >> >> Are equivalent, even for IEEE IIRC. >

RE: [PATCH 1/5] RISC-V: Remove float vector eqne pattern

2024-06-10 Thread Li, Pan2
, 2024 9:50 PM To: Robin Dapp ; Demin Han ; 钟居哲 ; gcc-patches Cc: kito.cheng ; Li, Pan2 Subject: Re: [PATCH 1/5] RISC-V: Remove float vector eqne pattern On 6/10/24 1:33 AM, Robin Dapp wrote: >> But isn't canonicalization of EQ/NE safe, even for IEEE NaN and +-0.0? >> >> ta

Re: [PATCH 1/5] RISC-V: Remove float vector eqne pattern

2024-06-10 Thread Jeff Law
On 6/10/24 1:33 AM, Robin Dapp wrote: But isn't canonicalization of EQ/NE safe, even for IEEE NaN and +-0.0? target = (a == b) ? x : y target = (a != b) ? y : x Are equivalent, even for IEEE IIRC. Yes, that should be fine. My concern was not that we do a canonicalization but that we might

Re: [PATCH 1/5] RISC-V: Remove float vector eqne pattern

2024-06-10 Thread Robin Dapp
> But isn't canonicalization of EQ/NE safe, even for IEEE NaN and +-0.0? > > target = (a == b) ? x : y > target = (a != b) ? y : x > > Are equivalent, even for IEEE IIRC. Yes, that should be fine. My concern was not that we do a canonicalization but that we might not do it for some of the vecto

Re: [PATCH 1/5] RISC-V: Remove float vector eqne pattern

2024-06-08 Thread Jeff Law
On 3/1/24 1:12 AM, Demin Han wrote: Hi juzhe, I also thought it’s related to commutive firstly. Following things make me to do the removal: 1.No tests fails in regression 2.When I write if (a == 2) and if (2 == a), the results are same GCC canonicalizes comparisons so that constants appea

Re: [PATCH 1/5] RISC-V: Remove float vector eqne pattern

2024-06-08 Thread Jeff Law
On 2/29/24 11:27 PM, demin.han wrote: We can unify eqne and other comparison operations. Tested on RV32 and RV64 gcc/ChangeLog: * config/riscv/riscv-vector-builtins-bases.cc: Remove eqne cond * config/riscv/vector.md (@pred_eqne_scalar): Remove patterns (*pred_eqne_s

Re: [PATCH 1/5] RISC-V: Remove float vector eqne pattern

2024-06-08 Thread Jeff Law
On 5/16/24 1:21 PM, Robin Dapp wrote: Can eqne pattern removal patches be committed firstly? Please first make sure you test with corner cases, NaNs in particular. I'm pretty sure we don't have any test cases for those. But isn't canonicalization of EQ/NE safe, even for IEEE NaN and +-0.0?

Re: [PATCH 1/5] RISC-V: Remove float vector eqne pattern

2024-05-16 Thread Robin Dapp
> Can eqne pattern removal patches be committed firstly? Please first make sure you test with corner cases, NaNs in particular. I'm pretty sure we don't have any test cases for those. Regards Robin

RE: [PATCH 1/5] RISC-V: Remove float vector eqne pattern

2024-05-15 Thread Demin Han
/ Regards, Demin From: 钟居哲 Sent: 2024年5月16日 10:02 To: Robin Dapp ; Demin Han ; gcc-patches Cc: rdapp.gcc ; kito.cheng ; Li, Pan2 ; jeffreyalaw Subject: Re: [PATCH 1/5] RISC-V: Remove float vector eqne pattern Would you minding sending this patch again? I can not find the patch now

Re: [PATCH 1/5] RISC-V: Remove float vector eqne pattern

2024-05-15 Thread ??????
Would you minding sending this patch again?? I can not find the patch now. --Reply to Message-- On Thu, May 16, 2024 03:48 AM Robin Dapp

RE: [PATCH 1/5] RISC-V: Remove float vector eqne pattern

2024-05-15 Thread Demin Han
ct: Re: [PATCH 1/5] RISC-V: Remove float vector eqne pattern > > Hi Demin, > > are you still going to continue with this? > > Regards > Robin

Re: [PATCH 1/5] RISC-V: Remove float vector eqne pattern

2024-05-15 Thread Robin Dapp
Hi Demin, are you still going to continue with this? Regards Robin

Re: [PATCH 1/5] RISC-V: Remove float vector eqne pattern

2024-03-01 Thread Robin Dapp
> 2. When I write if (a == 2) and if (2 == a), the results are > same > > 3. The vec_duplicate operand is the 5th operand in both cmp and > eqne patterns. I think they are equal. A comparison with a constant is always canonicalized to have the constant second, that's why you won't see

RE: Re:[PATCH 1/5] RISC-V: Remove float vector eqne pattern

2024-03-01 Thread Demin Han
patterns. I think they are equal. From: 钟居哲 Sent: 2024年3月1日 15:24 To: Demin Han ; gcc-patches Cc: kito.cheng ; Li, Pan2 ; jeffreyalaw ; Robin Dapp Subject: Re:[PATCH 1/5] RISC-V: Remove float vector eqne pattern Hello, han. Thanks for trying to optimize the codes. But I believe those vector

Re:[PATCH 1/5] RISC-V: Remove float vector eqne pattern

2024-02-29 Thread 钟居哲
Hello, han.  Thanks for trying to optimize the codes. But I believe those vector-scalar patterns (eq/ne) you remove in this patch are necessary. This is the story: 1. For commutative RTL code in GCC like plus, eq, ne, ... etc,     we known in semantic Both (eq: (reg) (vec_duplicate ... ) and