aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorWang Pengcheng <wangpengcheng.pp@bytedance.com>2023-12-20 10:32:59 -0700
committerJeff Law <jlaw@ventanamicro.com>2023-12-20 10:34:13 -0700
commiteef65d60a8bb2e9328fd9d2b6cd869618be4f08e (patch)
treef43a930a363e2580c74abd6e78a2bb1cb751f27a /gcc
parent02c0b49798228d777610f898cd9d63ebec43656d (diff)
downloadgcc-eef65d60a8bb2e9328fd9d2b6cd869618be4f08e.zip
gcc-eef65d60a8bb2e9328fd9d2b6cd869618be4f08e.tar.gz
gcc-eef65d60a8bb2e9328fd9d2b6cd869618be4f08e.tar.bz2
[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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/riscv/riscv.cc5
1 files changed, 3 insertions, 2 deletions
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)