[llvm] 5fc1b82 - [RISCV] Refactor VPseudoVROL and VPseudoVROR multiclasses to use inheritance. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 7 18:53:48 PDT 2024
Author: Craig Topper
Date: 2024-06-07T18:42:27-07:00
New Revision: 5fc1b82277dc4dd4ef133432ac8d8b1fa300d7c5
URL: https://github.com/llvm/llvm-project/commit/5fc1b82277dc4dd4ef133432ac8d8b1fa300d7c5
DIFF: https://github.com/llvm/llvm-project/commit/5fc1b82277dc4dd4ef133432ac8d8b1fa300d7c5.diff
LOG: [RISCV] Refactor VPseudoVROL and VPseudoVROR multiclasses to use inheritance. NFC
VPseudoVROR can inherit from VPseudoVROL. Adjust the names to
VPseudoVROT_VV_VX and VPseudoVROT_VV_VX_VI.
Added:
Modified:
llvm/lib/Target/RISCV/RISCVInstrInfoZvk.td
Removed:
################################################################################
diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoZvk.td b/llvm/lib/Target/RISCV/RISCVInstrInfoZvk.td
index 957d295d5eca0..fd4823306b029 100644
--- a/llvm/lib/Target/RISCV/RISCVInstrInfoZvk.td
+++ b/llvm/lib/Target/RISCV/RISCVInstrInfoZvk.td
@@ -494,7 +494,7 @@ multiclass VPseudoVREV8 {
}
}
-multiclass VPseudoVROL {
+multiclass VPseudoVROT_VV_VX {
foreach m = MxList in {
defm "" : VPseudoBinaryV_VV<m>,
SchedBinary<"WriteVRotV", "ReadVRotV", "ReadVRotV", m.MX,
@@ -505,18 +505,12 @@ multiclass VPseudoVROL {
}
}
-multiclass VPseudoVROR<Operand ImmType> {
- defvar Constraint = "";
+multiclass VPseudoVROT_VV_VX_VI
+ : VPseudoVROT_VV_VX {
foreach m = MxList in {
- defvar mx = m.MX;
- defm "" : VPseudoBinaryV_VV<m>,
- SchedBinary<"WriteVRotV", "ReadVRotV", "ReadVRotV", mx,
- forceMergeOpRead=true>;
- defm "" : VPseudoBinaryV_VX<m>,
- SchedBinary<"WriteVRotX", "ReadVRotV", "ReadVRotX", mx,
- forceMergeOpRead=true>;
- defm "" : VPseudoBinaryV_VI<ImmType, m>,
- SchedUnary<"WriteVRotI", "ReadVRotV", mx, forceMergeOpRead=true>;
+ defm "" : VPseudoBinaryV_VI<uimm6, m>,
+ SchedUnary<"WriteVRotI", "ReadVRotV", m.MX,
+ forceMergeOpRead=true>;
}
}
@@ -537,8 +531,8 @@ let Predicates = [HasStdExtZvkb] in {
defm PseudoVANDN : VPseudoVANDN;
defm PseudoVBREV8 : VPseudoVBREV8;
defm PseudoVREV8 : VPseudoVREV8;
- defm PseudoVROL : VPseudoVROL;
- defm PseudoVROR : VPseudoVROR<uimm6>;
+ defm PseudoVROL : VPseudoVROT_VV_VX;
+ defm PseudoVROR : VPseudoVROT_VV_VX_VI;
} // Predicates = [HasStdExtZvkb]
let Predicates = [HasStdExtZvkg] in {
More information about the llvm-commits
mailing list