[llvm] [RISCV] Add Sched classes for vector crypto instructions (PR #90068)
Pengcheng Wang via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 25 20:04:10 PDT 2024
================
@@ -340,28 +420,111 @@ multiclass VPseudoUnaryV_V<LMULInfo m> {
}
}
-multiclass VPseudoVALU_V {
+multiclass VPseudoVBREV {
foreach m = MxList in {
defvar mx = m.MX;
defm "" : VPseudoUnaryV_V<m>,
- SchedUnary<"WriteVIALUV", "ReadVIALUV", mx,
- forceMergeOpRead=true>;
+ SchedUnary<"WriteVBREVV", "ReadVBREVV", mx, forceMergeOpRead=true>;
}
}
-multiclass VPseudoVWALU_VV_VX_VI<Operand ImmType> : VPseudoVWALU_VV_VX {
+multiclass VPseudoVCLZ {
+ foreach m = MxList in {
+ defvar mx = m.MX;
+ defm "" : VPseudoUnaryV_V<m>,
+ SchedUnary<"WriteVCLZV", "ReadVCLZV", mx, forceMergeOpRead=true>;
+ }
+}
+
+multiclass VPseudoVCTZ {
+ foreach m = MxList in {
+ defvar mx = m.MX;
+ defm "" : VPseudoUnaryV_V<m>,
+ SchedUnary<"WriteVCTZV", "ReadVCTZV", mx, forceMergeOpRead=true>;
+ }
+}
+
+multiclass VPseudoVCPOP {
+ foreach m = MxList in {
+ defvar mx = m.MX;
+ defm "" : VPseudoUnaryV_V<m>,
+ SchedUnary<"WriteVCPOPV", "ReadVCPOPV", mx, forceMergeOpRead=true>;
+ }
+}
+
+multiclass VPseudoVWALU_VV_VX_VI<Operand ImmType> {
foreach m = MxListW in {
+ defvar mx = m.MX;
+ defm "" : VPseudoBinaryW_VV<m>,
+ SchedBinary<"WriteVWSLLV", "ReadVWSLLV", "ReadVWSLLV", mx,
+ forceMergeOpRead=true>;
+ defm "" : VPseudoBinaryW_VX<m>,
+ SchedBinary<"WriteVWSLLX", "ReadVWSLLV", "ReadVWSLLX", mx,
+ forceMergeOpRead=true>;
defm "" : VPseudoBinaryW_VI<ImmType, m>,
- SchedUnary<"WriteVIWALUV", "ReadVIWALUV", m.MX,
+ SchedUnary<"WriteVWSLLI", "ReadVWSLLV", mx,
forceMergeOpRead=true>;
}
}
+multiclass VPseudoVANDN {
+ foreach m = MxList in {
+ defm "" : VPseudoBinaryV_VV<m>,
+ SchedBinary<"WriteVIALUV", "ReadVIALUV", "ReadVIALUV", m.MX,
+ forceMergeOpRead=true>;
+ defm "" : VPseudoBinaryV_VX<m>,
+ SchedBinary<"WriteVIALUX", "ReadVIALUV", "ReadVIALUX", m.MX,
+ forceMergeOpRead=true>;
+ }
+}
+
+multiclass VPseudoVBREV8 {
+ foreach m = MxList in {
+ defvar mx = m.MX;
+ defm "" : VPseudoUnaryV_V<m>,
+ SchedUnary<"WriteVBREV8V", "ReadVBREV8V", mx, forceMergeOpRead=true>;
+ }
+}
+
+multiclass VPseudoVREV8 {
+ foreach m = MxList in {
+ defvar mx = m.MX;
+ defm "" : VPseudoUnaryV_V<m>,
+ SchedUnary<"WriteVREV8V", "ReadVREV8V", mx, forceMergeOpRead=true>;
+ }
+}
+
+multiclass VPseudoVROL {
+ foreach m = MxList in {
+ defm "" : VPseudoBinaryV_VV<m>,
+ SchedBinary<"WriteVRotV", "ReadVRotV", "ReadVRotV", m.MX,
+ forceMergeOpRead=true>;
+ defm "" : VPseudoBinaryV_VX<m>,
+ SchedBinary<"WriteVRotX", "ReadVRotV", "ReadVRotX", m.MX,
+ forceMergeOpRead=true>;
+ }
+}
+
+multiclass VPseudoVROR<Operand ImmType> {
+ defvar Constraint = "";
+ foreach m = MxList in {
+ defvar mx = m.MX;
+ defm "" : VPseudoBinaryV_VV<m>,
+ SchedBinary<"WriteVRotV", "ReadVRotV", "ReadVRotV", mx,
----------------
wangpc-pp wrote:
ditto.
https://github.com/llvm/llvm-project/pull/90068
More information about the llvm-commits
mailing list