================
@@ -99,5 +146,146 @@ let hasSideEffects = 0, mayLoad = 0, mayStore = 0 in {
         !if(EarlyClobber, "@earlyclobber $vd_wb, $vd = $vd_wb", "$vd = 
$vd_wb");
     let UseNamedOperandTable = true;
   }
-}
 
+  class SMTVMADotII<bits<2> sign, string opcodestr, bit EarlyClobber = 0>
+      : RVInst<(outs VRM2:$vd_wb),
+               (ins VRM2:$vd, VR:$vs1, VR:$vs2, SMT_INT:$vtype), opcodestr,
+               "$vd, $vs1, $vs2$vtype", [], InstFormatR> {
+    bits<5> vd;
+    bits<5> vs1;
+    bits<5> vs2;
+    bits<2> vtype;
+
+    let Inst{31} = 0b1;
+    let Inst{30-29} = vtype;
+    let Inst{28-25} = 0b0001;
+    let Inst{24-20} = vs2;
+    let Inst{19-15} = vs1;
+    let Inst{14} = 0b0;
+    let Inst{13-12} = sign;
+    let Inst{11-7} = vd;
+    let Inst{6-0} = OPC_CUSTOM_1.Value;
+    let Constraints =
+        !if(EarlyClobber, "@earlyclobber $vd_wb, $vd = $vd_wb", "$vd = 
$vd_wb");
+    let UseNamedOperandTable = true;
+  }
+
+  // Currently only i8 element type is supported for sliding-window dot-product
+  // instructions
+  class SMTVMADotSlideII<bits<2> slide, bits<2> sign, string opcodestr,
+                         bit EarlyClobber = 0>
+      : RVInst<(outs VRM2:$vd_wb),
+               (ins VRM2:$vd, VRM2:$vs1, VR:$vs2, SMT_I8:$vtype), opcodestr,
+               "$vd, $vs1, $vs2$vtype", [], InstFormatR> {
+    bits<5> vd;
+    bits<5> vs1;
+    bits<5> vs2;
+    bits<2> vtype;
+
+    let Inst{31} = 1;
+    let Inst{30-29} = vtype;
+    let Inst{28-25} = 0b0011;
+    let Inst{24-20} = vs2;
+    let Inst{19-16} = vs1{4-1};
+    let Inst{15-14} = slide;
+    let Inst{13-12} = sign;
+    let Inst{11-7} = vd;
+    let Inst{6-0} = OPC_CUSTOM_1.Value;
+    let Constraints =
+        !if(EarlyClobber, "@earlyclobber $vd_wb, $vd = $vd_wb", "$vd = 
$vd_wb");
+    let UseNamedOperandTable = true;
+  }
+
+  class SMTVMADOTSP<bits<2> sign, string opcodestr, string argstr,
+                    bit EarlyClobber = 0>
+      : RVInst<(outs VRM2:$vd_wb),
+               (ins VRM2:$vd, VRM2:$vs1, VR:$vs2, VR:$vmask, uimm2:$imm2, 
SMT_INT:$vtype),
----------------
LiqinWeng wrote:

Yes, to facilitate the processing of certain information during the 
pseudo-instruction phase 

https://github.com/llvm/llvm-project/pull/202533
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to