public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-9474] LoongArch: Remove unused and incorrect "sge<u>_<X:mode><GPR:mode>" define_insn
@ 2024-03-14 15:22 Xi Ruoyao
  0 siblings, 0 replies; only message in thread
From: Xi Ruoyao @ 2024-03-14 15:22 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:f98b85b1ef74b7c5c0852b3d063262bce63df14e

commit r14-9474-gf98b85b1ef74b7c5c0852b3d063262bce63df14e
Author: Xi Ruoyao <xry111@xry111.site>
Date:   Wed Mar 13 20:44:38 2024 +0800

    LoongArch: Remove unused and incorrect "sge<u>_<X:mode><GPR:mode>" define_insn
    
    If this insn is really used, we'll have something like
    
        slti $r4,$r0,$r5
    
    in the code.  The assembler will reject it because slti wants 2
    register operands and 1 immediate operand.  But we've not got any bug
    report for this, indicating this define_insn is unused at all.
    
    Note that do_store_flag (in expr.cc) is already converting x >= 1 to
    x > 0 unconditionally, so this define_insn is indeed unused and we can
    just remove it.
    
    gcc/ChangeLog:
    
            * config/loongarch/loongarch.md (any_ge): Remove.
            (sge<u>_<X:mode><GPR:mode>): Remove.

Diff:
---
 gcc/config/loongarch/loongarch.md | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/gcc/config/loongarch/loongarch.md b/gcc/config/loongarch/loongarch.md
index 525e1e82183..18fd9c1e7d5 100644
--- a/gcc/config/loongarch/loongarch.md
+++ b/gcc/config/loongarch/loongarch.md
@@ -517,7 +517,6 @@
 ;; These code iterators allow the signed and unsigned scc operations to use
 ;; the same template.
 (define_code_iterator any_gt [gt gtu])
-(define_code_iterator any_ge [ge geu])
 (define_code_iterator any_lt [lt ltu])
 (define_code_iterator any_le [le leu])
 
@@ -3355,15 +3354,6 @@
   [(set_attr "type" "slt")
    (set_attr "mode" "<X: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")
-		     (const_int 1)))]
-  ""
-  "slt<u>i\t%0,%.,%1"
-  [(set_attr "type" "slt")
-   (set_attr "mode" "<X:MODE>")])
-
 (define_insn "*slt<u>_<X:mode><GPR:mode>"
   [(set (match_operand:GPR 0 "register_operand" "=r")
 	(any_lt:GPR (match_operand:X 1 "register_operand" "r")

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-03-14 15:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-14 15:22 [gcc r14-9474] LoongArch: Remove unused and incorrect "sge<u>_<X:mode><GPR:mode>" define_insn Xi Ruoyao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).