On 11/9/26 9:53 AM, Jiawei wrote:
Eliminate separate count negations for native and word rotations.
gcc/ChangeLog:
* config/riscv/bitmanip.md
(*<bitmanip_optab><GPR:mode>3_neg_mask): New pattern.
(*<bitmanip_optab>si3_sext_neg_mask): Likewise.
* config/riscv/iterators.md (bitmanip_insn_rev): New attribute.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/zbb-rol-ror-10.c: New test.
It seems to me that this would be better in simplify-rtx.cc as the
concept is general. If we do it in simplify-rtx, then I don't think we
need special patterns and it works for other targets too.
jeff