[gcc r13-6482] RISC-V: Fix wrong partial subreg check for bsetidisi
Kito Cheng
kito@gcc.gnu.org
Sun Mar 5 09:17:03 GMT 2023
https://gcc.gnu.org/g:9debb240a4b1a711c0648fd9e4385dbde5ad45fd
commit r13-6482-g9debb240a4b1a711c0648fd9e4385dbde5ad45fd
Author: Lin Sinan <sinan.lin@linux.alibaba.com>
Date: Tue Feb 28 13:00:36 2023 +0800
RISC-V: Fix wrong partial subreg check for bsetidisi
The partial subreg check should be for subreg operand(operand 1) instead of
the immediate operand(operand 2). This change also fix pr68648.c in zbs.
gcc/ChangeLog:
* config/riscv/bitmanip.md: Fix wrong index in the check.
Reviewed-by: <philipp.tomsich@vrull.eu>
Diff:
---
gcc/config/riscv/bitmanip.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/config/riscv/bitmanip.md b/gcc/config/riscv/bitmanip.md
index 14d18edbe62..58a86bd929f 100644
--- a/gcc/config/riscv/bitmanip.md
+++ b/gcc/config/riscv/bitmanip.md
@@ -442,7 +442,7 @@
(ior:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "r"))
(match_operand 2 "single_bit_mask_operand" "i")))]
"TARGET_ZBS && TARGET_64BIT
- && !partial_subreg_p (operands[2])"
+ && !partial_subreg_p (operands[1])"
"bseti\t%0,%1,%S2"
[(set_attr "type" "bitmanip")])
More information about the Gcc-cvs
mailing list