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.
---
 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 5240655f458..f23265ad380 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
-- 
2.52.0

Reply via email to