public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-6482] RISC-V: Fix wrong partial subreg check for bsetidisi
@ 2023-03-05  9:17 Kito Cheng
  0 siblings, 0 replies; only message in thread
From: Kito Cheng @ 2023-03-05  9:17 UTC (permalink / raw)
  To: gcc-cvs

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")])

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-03-05  9:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-05  9:17 [gcc r13-6482] RISC-V: Fix wrong partial subreg check for bsetidisi Kito Cheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).