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 @@ -1027,7 +1027,6 @@ let BaseInstr = !cast(BaseInst); } -// RetClass could be GPR or VReg. class VPseudoUnaryNoMask : Pseudo<(outs RetClass:$rd), @@ -1041,7 +1040,6 @@ let HasSEWOp = 1; } -// RetClass could be GPR or VReg. class VPseudoUnaryNoMaskTU : Pseudo<(outs RetClass:$rd), @@ -1114,8 +1112,18 @@ let usesCustomInserter = 1; } -// mask unary operation without maskedoff -class VPseudoMaskUnarySOutMask: +class VPseudoUnaryNoMaskGPROut : + Pseudo<(outs GPR:$rd), + (ins VR:$rs2, AVL:$vl, ixlenimm:$sew), []>, + RISCVVPseudo { + let mayLoad = 0; + let mayStore = 0; + let hasSideEffects = 0; + let HasVLOp = 1; + let HasSEWOp = 1; +} + +class VPseudoUnaryMaskGPROut: Pseudo<(outs GPR:$rd), (ins VR:$rs1, VMaskOp:$vm, AVL:$vl, ixlenimm:$sew), []>, RISCVVPseudo { @@ -1884,9 +1892,9 @@ defvar WriteVMPopV_MX = !cast("WriteVMPopV_" # mx); defvar ReadVMPopV_MX = !cast("ReadVMPopV_" # mx); let VLMul = mti.LMul.value in { - def "_M_" # mti.BX : VPseudoUnaryNoMask, + def "_M_" # mti.BX : VPseudoUnaryNoMaskGPROut, Sched<[WriteVMPopV_MX, ReadVMPopV_MX, ReadVMPopV_MX]>; - def "_M_" # mti.BX # "_MASK" : VPseudoMaskUnarySOutMask, + def "_M_" # mti.BX # "_MASK" : VPseudoUnaryMaskGPROut, Sched<[WriteVMPopV_MX, ReadVMPopV_MX, ReadVMPopV_MX]>; } } @@ -1899,9 +1907,9 @@ defvar WriteVMFFSV_MX = !cast("WriteVMFFSV_" # mx); defvar ReadVMFFSV_MX = !cast("ReadVMFFSV_" # mx); let VLMul = mti.LMul.value in { - def "_M_" # mti.BX : VPseudoUnaryNoMask, + def "_M_" # mti.BX : VPseudoUnaryNoMaskGPROut, Sched<[WriteVMFFSV_MX, ReadVMFFSV_MX, ReadVMFFSV_MX]>; - def "_M_" # mti.BX # "_MASK" : VPseudoMaskUnarySOutMask, + def "_M_" # mti.BX # "_MASK" : VPseudoUnaryMaskGPROut, Sched<[WriteVMFFSV_MX, ReadVMFFSV_MX, ReadVMFFSV_MX]>; } }