[RISCV] Add scheduler class to PseudoReadVLENB.
authorCraig Topper <craig.topper@sifive.com>
Tue, 2 Aug 2022 16:29:22 +0000 (09:29 -0700)
committerCraig Topper <craig.topper@sifive.com>
Tue, 2 Aug 2022 16:38:32 +0000 (09:38 -0700)
Reviewed By: monkchiang

Differential Revision: https://reviews.llvm.org/D130938

llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
llvm/lib/Target/RISCV/RISCVScheduleV.td

index fbe396d..8bae021 100644 (file)
@@ -4332,7 +4332,8 @@ let hasSideEffects = 0, mayLoad = 0, mayStore = 0 in {
 
 let hasSideEffects = 0, mayLoad = 0, mayStore = 0, isCodeGenOnly = 1 in {
   def PseudoReadVLENB : Pseudo<(outs GPR:$rd), (ins),
-                               [(set GPR:$rd, (riscv_read_vlenb))]>;
+                               [(set GPR:$rd, (riscv_read_vlenb))]>,
+                        Sched<[WriteRdVLENB]>;
 }
 
 let hasSideEffects = 0, mayLoad = 0, mayStore = 0, isCodeGenOnly = 1,
index bafcf47..6b648cb 100644 (file)
@@ -9,6 +9,9 @@
 //===----------------------------------------------------------------------===//
 /// Define scheduler resources associated with def operands.
 
+// 3.6 Vector Byte Length vlenb
+def WriteRdVLENB      : SchedWrite;
+
 // 7. Vector Loads and Stores
 // 7.4. Vector Unit-Stride Instructions
 def WriteVLDE8        : SchedWrite;
@@ -493,6 +496,9 @@ def ReadVMask         : SchedRead;
 multiclass UnsupportedSchedV {
 let Unsupported = true in {
 
+// 3.6 Vector Byte Length vlenb
+def : WriteRes<WriteRdVLENB, []>;
+
 // 7. Vector Loads and Stores
 def : WriteRes<WriteVLDE8, []>;
 def : WriteRes<WriteVLDE16, []>;