[gcc r17-2222] [PATCH] RISC-V: Fix dead cpop reservation for spacemit-x60

Jeff Law via Gcc-cvs <[email protected]>
Newsgroups gmane.comp.gcc.cvs
Message-ID <[email protected]>
https://gcc.gnu.org/g:83b0befb611af61e0b4efbbc0ee235fe773ae891

commit r17-2222-g83b0befb611af61e0b4efbbc0ee235fe773ae891
Author: Jim Lin <[email protected]>
Date:   Wed Jul 8 07:59:30 2026 -0600

    [PATCH] RISC-V: Fix dead cpop reservation for spacemit-x60
    
    The type "cpop" was listed in both spacemit_x60_alu (latency 1) and the
    dedicated spacemit_x60_alu2c reservation (latency 2).  Since
    spacemit_x60_alu appears first, it always matched cpop and left
    spacemit_x60_alu2c dead, so cpop was scheduled with the wrong latency.
    
    Remove cpop from spacemit_x60_alu so the dedicated 2-cycle reservation
    takes effect.
    
    gcc/ChangeLog:
    
            * config/riscv/spacemit-x60.md (spacemit_x60_alu): Remove cpop
            from the type list.

Diff:
---
 gcc/config/riscv/spacemit-x60.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/config/riscv/spacemit-x60.md b/gcc/config/riscv/spacemit-x60.md
index 5240655f4586..f23265ad3808 100644
--- a/gcc/config/riscv/spacemit-x60.md
+++ b/gcc/config/riscv/spacemit-x60.md
@@ -116,7 +116,7 @@
   (and (eq_attr "tune" "spacemit_x60")
        (eq_attr "type" "unknown,const,arith,shift,slt,multi,auipc,nop,logical,\
 			move,bitmanip,min,max,minu,maxu,clz,ctz,rotate,\
-			condmove,crypto,mvpair,zicond,cpop"))
+			condmove,crypto,mvpair,zicond"))
   "spacemit_x60_alu")
 
 (define_insn_reservation "spacemit_x60_alu2c" 2
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.