[llvm] [RISCV] Lower (select c, y, 0) -> (qc.muliadd c, y-1) (PR #190323)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 3 21:09:25 PDT 2026


================
@@ -99,6 +105,8 @@ def uimm10 : RISCVUImmLeafOp<10>;
 
 def uimm11 : RISCVUImmLeafOp<11>;
 
+def timm12 : TImmLeaf<XLenVT, [{return isInt<12>(Imm);}]>;
----------------
topperc wrote:

You should be able to use `timm`. Since the constant is already correct by construction we don't need to range check it in isel.

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


More information about the llvm-commits mailing list