Re: [PATCH v2, rs6000] Fix ICE on expand bcd__ [PR100736]

2022-06-06 Thread HAO CHEN GUI via Gcc-patches
On 2/6/2022 下午 5:04, Segher Boessenkool wrote: > Hi! > > On Thu, Jun 02, 2022 at 01:30:04PM +0800, HAO CHEN GUI wrote: >> Segher, >> Does BCD comparison return false when either operand is invalid coding? > > It sets all of LT, GT, and EQ to 0 (it normally sets exactly one of them > to 1).

Re: [PATCH v2, rs6000] Fix ICE on expand bcd__ [PR100736]

2022-06-02 Thread Segher Boessenkool
Hi! On Thu, Jun 02, 2022 at 01:30:04PM +0800, HAO CHEN GUI wrote: > Segher, > Does BCD comparison return false when either operand is invalid coding? It sets all of LT, GT, and EQ to 0 (it normally sets exactly one of them to 1). It sets bit 3 (the "SO" bit usually) to 1. That is what the mac

Re: [PATCH v2, rs6000] Fix ICE on expand bcd__ [PR100736]

2022-06-01 Thread HAO CHEN GUI via Gcc-patches
Segher, Does BCD comparison return false when either operand is invalid coding? If yes, the result could be 3-way. We can check gt and eq bits for ge. We still can't use crnot to only check lt bit as there could be invalid coding. Also, do you think finite-math-only excludes invalid coding? See

Re: [PATCH v2, rs6000] Fix ICE on expand bcd__ [PR100736]

2022-06-01 Thread Segher Boessenkool
Hi! On Tue, May 31, 2022 at 06:56:00PM -0500, Segher Boessenkool wrote: > It's not clear to me how this can ever happen without finite_math_only? > The patch is safe, sure, but it may the real problem is elsewhere. So, it is incorrect the RTL for our bcd{add,sub} insns uses CCFP at all. CCFP sta

Re: [PATCH v2, rs6000] Fix ICE on expand bcd__ [PR100736]

2022-05-31 Thread Segher Boessenkool
Hi! On Mon, May 30, 2022 at 06:12:26PM +0800, Kewen.Lin wrote: > on 2022/5/26 15:35, HAO CHEN GUI wrote: > > This patch fixes the ICE reported in PR100736. It removes the condition > > check of finite math only flag not setting in "*_cc" pattern. > > With or without this flag, we still can use "

Re: [PATCH v2, rs6000] Fix ICE on expand bcd__ [PR100736]

2022-05-30 Thread Kewen.Lin via Gcc-patches
Hi Haochen, on 2022/5/26 15:35, HAO CHEN GUI wrote: > Hi, > This patch fixes the ICE reported in PR100736. It removes the condition > check of finite math only flag not setting in "*_cc" pattern. > With or without this flag, we still can use "cror" to check if either > two bits of CC is set or n

Ping [PATCH v2, rs6000] Fix ICE on expand bcd__ [PR100736]

2022-05-29 Thread HAO CHEN GUI via Gcc-patches
Hi, Gentle ping this: https://gcc.gnu.org/pipermail/gcc-patches/2022-May/595661.html Thanks. On 26/5/2022 下午 3:35, HAO CHEN GUI wrote: > Hi, > This patch fixes the ICE reported in PR100736. It removes the condition > check of finite math only flag not setting in "*_cc" pattern. > With or with

[PATCH v2, rs6000] Fix ICE on expand bcd__ [PR100736]

2022-05-26 Thread HAO CHEN GUI via Gcc-patches
Hi, This patch fixes the ICE reported in PR100736. It removes the condition check of finite math only flag not setting in "*_cc" pattern. With or without this flag, we still can use "cror" to check if either two bits of CC is set or not for "fp_two" codes. We don't need a reverse comparison (impl