On 11/17/26 10:35 PM, Jiawei wrote:
Use bset, binv and bclr when a zero-extended word-sized bit mask is
combined with a 64-bit value. Match the canonical complemented form
directly with Zbs alone, keeping the SImode shift and its count mask.
gcc/ChangeLog:
* config/riscv/bitmanip.md (*<bit_optab>di_zext_si): New pattern.
(*bclrdi_zext_si): Ditto.
(*bclrdi_zext_si_canonical): Ditto.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/zbs-word-mask-2.c: New test.
* gcc.target/riscv/zbs-word-mask.c: New test.
LGTM and sashiko clean. OK for the trunk.
jeff