From eef65d60a8bb2e9328fd9d2b6cd869618be4f08e Mon Sep 17 00:00:00 2001 From: Wang Pengcheng Date: Wed, 20 Dec 2023 10:32:59 -0700 Subject: [PATCH] RISC-V: Fix RISCV_FUSE_ZEXTWS fusion condition The condition is RISCV_FUSE_ZEXTH, which is a mistake. gcc/ChangeLog: * config/riscv/riscv.cc (riscv_macro_fusion_pair_p): Fix condition. --- gcc/config/riscv/riscv.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc index d9b45f1..c6784a2 100644 --- a/gcc/config/riscv/riscv.cc +++ b/gcc/config/riscv/riscv.cc @@ -8096,8 +8096,9 @@ riscv_macro_fusion_pair_p (rtx_insn *prev, rtx_insn *curr) if (!riscv_macro_fusion_p ()) return false; - if (simple_sets_p && (riscv_fusion_enabled_p (RISCV_FUSE_ZEXTW) || - riscv_fusion_enabled_p (RISCV_FUSE_ZEXTH))) + if (simple_sets_p + && (riscv_fusion_enabled_p (RISCV_FUSE_ZEXTW) + || riscv_fusion_enabled_p (RISCV_FUSE_ZEXTWS))) { /* We are trying to match the following: prev (slli) == (set (reg:DI rD) -- cgit v1.1