On Tue, 2024-03-05 at 16:05 +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.
> 
> ---
> Update in v2:
>     Remove useless support for op[1] is const_imm12_operand.
> 
> ---
>  gcc/config/loongarch/loongarch.md | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gcc/config/loongarch/loongarch.md 
> b/gcc/config/loongarch/loongarch.md
> index f3b5c641fce..e35a001e0ed 100644
> --- a/gcc/config/loongarch/loongarch.md
> +++ b/gcc/config/loongarch/loongarch.md
> @@ -3360,7 +3360,7 @@ (define_insn "*sge<u>_<X:mode><GPR:mode>"
>       (any_ge:GPR (match_operand:X 1 "register_operand" "r")
>                    (const_int 1)))]
>    ""
> -  "slt<u>i\t%0,%.,%1"
> +  "slt<u>\t%0,%.,%1"
>    [(set_attr "type" "slt")
>     (set_attr "mode" "<X:MODE>")])

Hmm, this define_insn seems never really used or it would generate
something like "sltui $r4,$r0,$r4" and trigger an assembler failure. 
The generic path seems already converting "x >= 1" to "x > 0".

So it seems we should just remove this define_insn?


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

Reply via email to