[PATCH] D147814: [RISCV][Tablegen] Make VLXSched and VSXSched classes aware of data and index lmul
Nitin John Raj via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 11 10:55:45 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rGa38b2d77610f: [RISCV][Tablegen] Make VLXSched and VSXSched classes aware of data and index… (authored by nitinjohnraj).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147814/new/
https://reviews.llvm.org/D147814
Files:
llvm/lib/Target/RISCV/RISCVInstrInfoV.td
llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
Index: llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
===================================================================
--- llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
+++ llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
@@ -1735,7 +1735,7 @@
// Calculate emul = eew * lmul / sew
defvar octuple_emul = !srl(!mul(eew, octuple_lmul), log2<sew>.val);
if !and(!ge(octuple_emul, 1), !le(octuple_emul, 64)) then {
- defvar LInfo = lmul.MX;
+ defvar DataLInfo = lmul.MX;
defvar IdxLInfo = octuple_to_str<octuple_emul>.ret;
defvar idx_lmul = !cast<LMULInfo>("V_" # IdxLInfo);
defvar Vreg = lmul.vrclass;
@@ -1743,16 +1743,16 @@
defvar HasConstraint = !ne(sew, eew);
defvar Order = !if(Ordered, "O", "U");
let VLMul = lmul.value in {
- def "EI" # eew # "_V_" # IdxLInfo # "_" # LInfo :
+ def "EI" # eew # "_V_" # IdxLInfo # "_" # DataLInfo :
VPseudoILoadNoMask<Vreg, IdxVreg, eew, idx_lmul.value, Ordered, HasConstraint>,
- VLXSched<eew, Order, LInfo>;
- def "EI" # eew # "_V_" # IdxLInfo # "_" # LInfo # "_TU":
+ VLXSched<eew, Order, DataLInfo, IdxLInfo>;
+ def "EI" # eew # "_V_" # IdxLInfo # "_" # DataLInfo # "_TU":
VPseudoILoadNoMaskTU<Vreg, IdxVreg, eew, idx_lmul.value, Ordered, HasConstraint>,
- VLXSched<eew, Order, LInfo>;
- def "EI" # eew # "_V_" # IdxLInfo # "_" # LInfo # "_MASK" :
+ VLXSched<eew, Order, DataLInfo, IdxLInfo>;
+ def "EI" # eew # "_V_" # IdxLInfo # "_" # DataLInfo # "_MASK" :
VPseudoILoadMask<Vreg, IdxVreg, eew, idx_lmul.value, Ordered, HasConstraint>,
RISCVMaskedPseudo</*MaskOpIdx*/ 3>,
- VLXSched<eew, Order, LInfo>;
+ VLXSched<eew, Order, DataLInfo, IdxLInfo>;
}
}
}
@@ -1809,19 +1809,19 @@
// Calculate emul = eew * lmul / sew
defvar octuple_emul = !srl(!mul(eew, octuple_lmul), log2<sew>.val);
if !and(!ge(octuple_emul, 1), !le(octuple_emul, 64)) then {
- defvar LInfo = lmul.MX;
+ defvar DataLInfo = lmul.MX;
defvar IdxLInfo = octuple_to_str<octuple_emul>.ret;
defvar idx_lmul = !cast<LMULInfo>("V_" # IdxLInfo);
defvar Vreg = lmul.vrclass;
defvar IdxVreg = idx_lmul.vrclass;
defvar Order = !if(Ordered, "O", "U");
let VLMul = lmul.value in {
- def "EI" # eew # "_V_" # IdxLInfo # "_" # LInfo :
+ def "EI" # eew # "_V_" # IdxLInfo # "_" # DataLInfo :
VPseudoIStoreNoMask<Vreg, IdxVreg, eew, idx_lmul.value, Ordered>,
- VSXSched<eew, Order, LInfo>;
- def "EI" # eew # "_V_" # IdxLInfo # "_" # LInfo # "_MASK" :
+ VSXSched<eew, Order, DataLInfo, IdxLInfo>;
+ def "EI" # eew # "_V_" # IdxLInfo # "_" # DataLInfo # "_MASK" :
VPseudoIStoreMask<Vreg, IdxVreg, eew, idx_lmul.value, Ordered>,
- VSXSched<eew, Order, LInfo>;
+ VSXSched<eew, Order, DataLInfo, IdxLInfo>;
}
}
}
Index: llvm/lib/Target/RISCV/RISCVInstrInfoV.td
===================================================================
--- llvm/lib/Target/RISCV/RISCVInstrInfoV.td
+++ llvm/lib/Target/RISCV/RISCVInstrInfoV.td
@@ -125,16 +125,20 @@
ReadVSTX, ReadVSTSX, ReadVMask
]>;
-class VLXSched<int n, string o, string suffix = "WorstCase"> : Sched<[
- !cast<SchedReadWrite>("WriteVLD" #o #"X" #n #"_" # suffix),
+class VLXSched<int n, string o,
+ string dataSuffix = "WorstCase",
+ string idxSuffix = "WorstCase"> : Sched<[
+ !cast<SchedReadWrite>("WriteVLD" #o #"X" #n #"_" # dataSuffix),
ReadVLDX,
- !cast<SchedReadWrite>("ReadVLD" #o #"XV_" # suffix), ReadVMask
+ !cast<SchedReadWrite>("ReadVLD" #o #"XV_" # idxSuffix), ReadVMask
]>;
-class VSXSched<int n, string o, string suffix = "WorstCase"> : Sched<[
- !cast<SchedReadWrite>("WriteVST" #o #"X" #n #"_"#suffix),
- !cast<SchedReadWrite>("ReadVST" #o #"X" #n #"_"#suffix),
- ReadVSTX, !cast<SchedReadWrite>("ReadVST" #o #"XV_"#suffix), ReadVMask
+class VSXSched<int n, string o,
+ string dataSuffix = "WorstCase",
+ string idxSuffix = "WorstCase"> : Sched<[
+ !cast<SchedReadWrite>("WriteVST" #o #"X" #n #"_"#dataSuffix),
+ !cast<SchedReadWrite>("ReadVST" #o #"X" #n #"_"#dataSuffix),
+ ReadVSTX, !cast<SchedReadWrite>("ReadVST" #o #"XV_"#idxSuffix), ReadVMask
]>;
class VLFSched<string suffix = "WorstCase"> : Sched<[
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147814.512523.patch
Type: text/x-patch
Size: 4649 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230411/dc21f146/attachment.bin>
More information about the llvm-commits
mailing list