[llvm] [RISCV] Add reusable SelectCC_GPR_riirr multiclass. NFC (PR #140224)

Sudharsan Veeravalli via llvm-commits llvm-commits at lists.llvm.org
Fri May 16 07:29:14 PDT 2025


================
@@ -802,16 +802,12 @@ let Predicates = [HasVendorXCVbi, IsRV32], AddedComplexity = 2 in {
   def : Pat<(riscv_brcc GPR:$rs1, simm5:$imm5, SETNE, bb:$imm12),
             (CV_BNEIMM GPR:$rs1, simm5:$imm5, bare_simm13_lsb0:$imm12)>;
 
-  let usesCustomInserter = 1 in
-  def Select_GPR_Using_CC_Imm : Pseudo<(outs GPR:$dst),
-                             (ins GPR:$lhs, simm5:$imm5, cond_code:$cc,
-                              GPR:$truev, GPR:$falsev), []>;
-
+  defm SImm5 : SelectCC_GPR_riirr<GPR, simm5>;
----------------
svs-quic wrote:

Could we rename this so that people dont confuse it with the ImmOperandType? Maybe CC_SImm5 or something like that.

https://github.com/llvm/llvm-project/pull/140224


More information about the llvm-commits mailing list