[RISCV] Instruction grouping problem encountered while reusing B extension in K ext

Hello to those working on RISCV,

As formerly discussed in riscv/riscv-crypto#81, we are currently implementing MC Layer of K extension for LLVM. While setting predicates property for instructions, we encountered the problem that the Zkg​ and Zkb​ feature sets are reusing part but not all instructions from Zbp​ and Zbc​ extensions, as shown in the image in the issue (the same image in attachment; asterisk “means the extensions are expected to be unchanged in the official version”).

By acknowledging that we cannot simply reuse the whole set of Zbp​ and Zbc​ instructions, this might require us to further group the instructions by modifying the definition file (.td TableGen file) of B extension. This seems a bit invasive since it requires to rename things like HasStdExtZbbOrZbp into **HasStdExtZbbOrZbpOrZkb**, take instruction ror​ for example.

This problem seems applies to both GCC and LLVM in a similar way and I am wondering whether this modification is acceptable, or are there any other ideas?

Best Regards,
Qixing Xue (@ksyx)