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