Re: [PATCH] [RISC-V] fix PR 111259 invalid zcmp mov predicate.

2023-09-15 Thread Palmer Dabbelt
On Fri, 15 Sep 2023 09:37:48 PDT (-0700), Patrick O'Neill wrote: On 9/15/23 01:49, Kito Cheng via Gcc-patches wrote: I guess another solution is using reg_or_subregno instead of REGNO, but that should not catch more cases, and just more run-time check, so this version is LGTM. I tested an equi

Re: [PATCH] [RISC-V] fix PR 111259 invalid zcmp mov predicate.

2023-09-15 Thread Patrick O'Neill
On 9/15/23 01:49, Kito Cheng via Gcc-patches wrote: I guess another solution is using reg_or_subregno instead of REGNO, but that should not catch more cases, and just more run-time check, so this version is LGTM. I tested an equivalent patch (without the comment changes). This patch resolves th

Re: [PATCH] [RISC-V] fix PR 111259 invalid zcmp mov predicate.

2023-09-15 Thread Kito Cheng via Gcc-patches
I guess another solution is using reg_or_subregno instead of REGNO, but that should not catch more cases, and just more run-time check, so this version is LGTM.

[PATCH] [RISC-V] fix PR 111259 invalid zcmp mov predicate.

2023-09-14 Thread Fei Gao
The code changes are from Palmer. root cause: In a gcc build with --enable-checking=yes, REGNO (op) checks rtx code and expected code 'reg'. so a rtx with 'subreg' causes an internal compiler error. solution: Restrict predicate to allow 'reg' only. gcc/ChangeLog: * config/riscv/predicat