[llvm] [RISCV][GISel] Add isel patterns for ADDIW/SRLIW/SRAIW/SLLIW and remove custom selection. (PR #68470)

Nitin John Raj via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 10 11:09:05 PDT 2023


================
@@ -18,10 +18,24 @@ include "RISCVCombine.td"
 
 def simm12Plus1 : ImmLeaf<XLenVT, [{
     return (isInt<12>(Imm) && Imm != -2048) || Imm == 2048;}]>;
+def simm12Plus1i32 : ImmLeaf<i32, [{
+    return (isInt<12>(Imm) && Imm != -2048) || Imm == 2048;}]>;
+
+def simm12i32 : ImmLeaf<i32, [{return isInt<12>(Imm);}]>;
+
+def uimm5i32 : ImmLeaf<i32, [{return isUInt<5>(Imm);}]>;
 
-def GINegImm : GICustomOperandRenderer<"renderNegImm">,
+def gi_NegImm : GICustomOperandRenderer<"renderNegImm">,
----------------
nitinjohnraj wrote:

Should we consider sticking to camel case for identifiers? I know we haven't preserved any convention in the tablegen so far, but should we try and use a consistent capitalization scheme in this file?

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


More information about the llvm-commits mailing list