diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoV.td b/llvm/lib/Target/RISCV/RISCVInstrInfoV.td --- a/llvm/lib/Target/RISCV/RISCVInstrInfoV.td +++ b/llvm/lib/Target/RISCV/RISCVInstrInfoV.td @@ -942,13 +942,13 @@ multiclass VGTR_IV_V_X_I funct6, Operand optype = simm5, string vw = "v"> { def V : VALUVV, - Sched<[WriteVGatherV_UpperBound, ReadVGatherV_UpperBound, - ReadVGatherV_UpperBound, ReadVMask]>; + Sched<[WriteVRGatherVV_UpperBound, ReadVRGatherVV_UpperBound, + ReadVRGatherVV_UpperBound, ReadVMask]>; def X : VALUVX, - Sched<[WriteVGatherX_UpperBound, ReadVGatherV_UpperBound, - ReadVGatherX_UpperBound, ReadVMask]>; + Sched<[WriteVRGatherVX_UpperBound, ReadVRGatherVV_UpperBound, + ReadVRGatherVX_UpperBound, ReadVMask]>; def I : VALUVI, - Sched<[WriteVGatherI_UpperBound, ReadVGatherV_UpperBound, + Sched<[WriteVRGatherVI_UpperBound, ReadVRGatherVV_UpperBound, ReadVMask]>; } @@ -1662,8 +1662,8 @@ let Constraints = "@earlyclobber $vd", RVVConstraint = Vrgather in { defm VRGATHER_V : VGTR_IV_V_X_I<"vrgather", 0b001100, uimm5>; def VRGATHEREI16_VV : VALUVV<0b001110, OPIVV, "vrgatherei16.vv">, - Sched<[WriteVGatherV_UpperBound, ReadVGatherV_UpperBound, - ReadVGatherV_UpperBound]>; + Sched<[WriteVRGatherVV_UpperBound, ReadVRGatherVV_UpperBound, + ReadVRGatherVV_UpperBound]>; } // Constraints = "@earlyclobber $vd", RVVConstraint = Vrgather // Vector Compress Instruction diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td b/llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td --- a/llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td +++ b/llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td @@ -1987,8 +1987,8 @@ multiclass VPseudoVGTR_VV_EEW { foreach m = MxList in { defvar mx = m.MX; - defvar WriteVGatherV_MX = !cast("WriteVGatherV_" # mx); - defvar ReadVGatherV_MX = !cast("ReadVGatherV_" # mx); + defvar WriteVRGatherVV_MX = !cast("WriteVRGatherVV_" # mx); + defvar ReadVRGatherVV_MX = !cast("ReadVRGatherVV_" # mx); foreach sew = EEWList in { defvar octuple_lmul = m.octuple; @@ -1998,7 +1998,8 @@ defvar emulMX = octuple_to_str.ret; defvar emul = !cast("V_" # emulMX); defm _VV : VPseudoBinaryEmul, - Sched<[WriteVGatherV_MX, ReadVGatherV_MX, ReadVGatherV_MX]>; + Sched<[WriteVRGatherVV_MX, ReadVRGatherVV_MX, + ReadVRGatherVV_MX]>; } } } @@ -2394,18 +2395,20 @@ multiclass VPseudoVGTR_VV_VX_VI { foreach m = MxList in { defvar mx = m.MX; - defvar WriteVGatherV_MX = !cast("WriteVGatherV_" # mx); - defvar WriteVGatherX_MX = !cast("WriteVGatherX_" # mx); - defvar WriteVGatherI_MX = !cast("WriteVGatherI_" # mx); - defvar ReadVGatherV_MX = !cast("ReadVGatherV_" # mx); - defvar ReadVGatherX_MX = !cast("ReadVGatherX_" # mx); + defvar WriteVRGatherVV_MX = !cast("WriteVRGatherVV_" # mx); + defvar WriteVRGatherVX_MX = !cast("WriteVRGatherVX_" # mx); + defvar WriteVRGatherVI_MX = !cast("WriteVRGatherVI_" # mx); + defvar ReadVRGatherVV_MX = !cast("ReadVRGatherVV_" # mx); + defvar ReadVRGatherVX_MX = !cast("ReadVRGatherVX_" # mx); defm "" : VPseudoBinaryV_VV, - Sched<[WriteVGatherV_MX, ReadVGatherV_MX, ReadVGatherV_MX, ReadVMask]>; + Sched<[WriteVRGatherVV_MX, ReadVRGatherVV_MX, + ReadVRGatherVV_MX, ReadVMask]>; defm "" : VPseudoBinaryV_VX, - Sched<[WriteVGatherX_MX, ReadVGatherV_MX, ReadVGatherX_MX, ReadVMask]>; + Sched<[WriteVRGatherVX_MX, ReadVRGatherVV_MX, + ReadVRGatherVX_MX, ReadVMask]>; defm "" : VPseudoBinaryV_VI, - Sched<[WriteVGatherI_MX, ReadVGatherV_MX, ReadVMask]>; + Sched<[WriteVRGatherVI_MX, ReadVRGatherVV_MX, ReadVMask]>; } } diff --git a/llvm/lib/Target/RISCV/RISCVScheduleV.td b/llvm/lib/Target/RISCV/RISCVScheduleV.td --- a/llvm/lib/Target/RISCV/RISCVScheduleV.td +++ b/llvm/lib/Target/RISCV/RISCVScheduleV.td @@ -327,9 +327,9 @@ defm "" : LMULSchedWrites<"WriteVISlide1X">; defm "" : LMULSchedWrites<"WriteVFSlide1F">; // 16.4. Vector Register Gather Instructions -defm "" : LMULSchedWrites<"WriteVGatherV">; -defm "" : LMULSchedWrites<"WriteVGatherX">; -defm "" : LMULSchedWrites<"WriteVGatherI">; +defm "" : LMULSchedWrites<"WriteVRGatherVV">; +defm "" : LMULSchedWrites<"WriteVRGatherVX">; +defm "" : LMULSchedWrites<"WriteVRGatherVI">; // 16.5. Vector Compress Instruction defm "" : LMULSchedWrites<"WriteVCompressV">; // 16.6. Whole Vector Register Move @@ -549,8 +549,8 @@ defm "" : LMULSchedReads<"ReadVFSlideV">; defm "" : LMULSchedReads<"ReadVFSlideF">; // 16.4. Vector Register Gather Instructions -defm "" : LMULSchedReads<"ReadVGatherV">; -defm "" : LMULSchedReads<"ReadVGatherX">; +defm "" : LMULSchedReads<"ReadVRGatherVV">; +defm "" : LMULSchedReads<"ReadVRGatherVX">; // 16.5. Vector Compress Instruction defm "" : LMULSchedReads<"ReadVCompressV">; // 16.6. Whole Vector Register Move @@ -741,9 +741,9 @@ defm "" : LMULWriteRes<"WriteVISlideI", []>; defm "" : LMULWriteRes<"WriteVISlide1X", []>; defm "" : LMULWriteRes<"WriteVFSlide1F", []>; -defm "" : LMULWriteRes<"WriteVGatherV", []>; -defm "" : LMULWriteRes<"WriteVGatherX", []>; -defm "" : LMULWriteRes<"WriteVGatherI", []>; +defm "" : LMULWriteRes<"WriteVRGatherVV", []>; +defm "" : LMULWriteRes<"WriteVRGatherVX", []>; +defm "" : LMULWriteRes<"WriteVRGatherVI", []>; defm "" : LMULWriteRes<"WriteVCompressV", []>; // These are already LMUL aware def : WriteRes; @@ -899,8 +899,8 @@ defm "" : LMULReadAdvance<"ReadVISlideX", 0>; defm "" : LMULReadAdvance<"ReadVFSlideV", 0>; defm "" : LMULReadAdvance<"ReadVFSlideF", 0>; -defm "" : LMULReadAdvance<"ReadVGatherV", 0>; -defm "" : LMULReadAdvance<"ReadVGatherX", 0>; +defm "" : LMULReadAdvance<"ReadVRGatherVV", 0>; +defm "" : LMULReadAdvance<"ReadVRGatherVX", 0>; defm "" : LMULReadAdvance<"ReadVCompressV", 0>; // These are already LMUL aware def : ReadAdvance;