On Mon, 2024-03-04 at 11:03 +0800, Guo Jie wrote:
> The constraint of op[1] is inconsistent with the output template.
> 
> gcc/ChangeLog:
> 
>       * config/loongarch/loongarch.md
>       (define_insn "*sge<u>_<X:mode><GPR:mode>"): Fix inconsistency
>       error.
>
> ---
>  gcc/config/loongarch/loongarch.md | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/gcc/config/loongarch/loongarch.md
> b/gcc/config/loongarch/loongarch.md
> index f3b5c641fce..2d25374bdc9 100644
> --- a/gcc/config/loongarch/loongarch.md
> +++ b/gcc/config/loongarch/loongarch.md
> @@ -3357,10 +3357,10 @@ (define_insn "*sgt<u>_<X:mode><GPR:mode>"
>  
>  (define_insn "*sge<u>_<X:mode><GPR:mode>"
>    [(set (match_operand:GPR 0 "register_operand" "=r")
> -     (any_ge:GPR (match_operand:X 1 "register_operand" "r")
> +     (any_ge:GPR (match_operand:X 1 "arith_operand" "rI")
>                    (const_int 1)))]

No, arith_operand is just register_operand or const_imm12_operand, but
comparing a const_imm12_operand with (const_int 1) should be folded into
a constant (even at -O0, AFAIK).  So allowing const_imm12_operand here
makes no benefit.

>    ""
> -  "slt<u>i\t%0,%.,%1"
> +  "slt<u>%i1\t%0,%.,%1"
>    [(set_attr "type" "slt")
>     (set_attr "mode" "<X:MODE>")])
>  

-- 
Xi Ruoyao <xry...@xry111.site>
School of Aerospace Science and Technology, Xidian University

Reply via email to