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 @@ -2086,6 +2086,7 @@ Sched<[WriteVExtV, ReadVExtV, ReadVMask]>; def "_" # m.MX # "_MASK" : VPseudoUnaryMaskTA, + RISCVMaskedPseudo, Sched<[WriteVExtV, ReadVExtV, ReadVMask]>; } } @@ -2102,6 +2103,7 @@ Sched<[WriteVExtV, ReadVExtV, ReadVMask]>; def "_" # m.MX # "_MASK" : VPseudoUnaryMaskTA, + RISCVMaskedPseudo, Sched<[WriteVExtV, ReadVExtV, ReadVMask]>; } } @@ -2118,6 +2120,7 @@ Sched<[WriteVExtV, ReadVExtV, ReadVMask]>; def "_" # m.MX # "_MASK" : VPseudoUnaryMaskTA, + RISCVMaskedPseudo, Sched<[WriteVExtV, ReadVExtV, ReadVMask]>; } } @@ -2652,7 +2655,8 @@ def "_" # MInfo.MX : VPseudoUnaryNoMask; def "_" # MInfo.MX # "_TU": VPseudoUnaryNoMaskTU; def "_" # MInfo.MX # "_MASK" : VPseudoUnaryMaskTA; + Constraint>, + RISCVMaskedPseudo; } } diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td b/llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td --- a/llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td +++ b/llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td @@ -549,10 +549,6 @@ foreach vtiTofti = fraction_list in { defvar vti = vtiTofti.Vti; defvar fti = vtiTofti.Fti; - def : Pat<(vti.Vector (vop (fti.Vector fti.RegClass:$rs2), - true_mask, VLOpFrag)), - (!cast(inst_name#"_"#suffix#"_"#vti.LMul.MX) - fti.RegClass:$rs2, GPR:$vl, vti.Log2SEW)>; def : Pat<(vti.Vector (vop (fti.Vector fti.RegClass:$rs2), (fti.Mask V0), VLOpFrag)), (!cast(inst_name#"_"#suffix#"_"#vti.LMul.MX#"_MASK") @@ -565,11 +561,6 @@ multiclass VPatConvertFP2ISDNode_V_VL { foreach fvti = AllFloatVectors in { defvar ivti = GetIntVTypeInfo.Vti; - def : Pat<(ivti.Vector (vop (fvti.Vector fvti.RegClass:$rs1), - (fvti.Mask true_mask), - VLOpFrag)), - (!cast(instruction_name#"_"#ivti.LMul.MX) - fvti.RegClass:$rs1, GPR:$vl, ivti.Log2SEW)>; def : Pat<(ivti.Vector (vop (fvti.Vector fvti.RegClass:$rs1), (fvti.Mask V0), VLOpFrag)), @@ -582,11 +573,6 @@ multiclass VPatConvertI2FPSDNode_V_VL { foreach fvti = AllFloatVectors in { defvar ivti = GetIntVTypeInfo.Vti; - def : Pat<(fvti.Vector (vop (ivti.Vector ivti.RegClass:$rs1), - (ivti.Mask true_mask), - VLOpFrag)), - (!cast(instruction_name#"_"#fvti.LMul.MX) - ivti.RegClass:$rs1, GPR:$vl, fvti.Log2SEW)>; def : Pat<(fvti.Vector (vop (ivti.Vector ivti.RegClass:$rs1), (ivti.Mask V0), VLOpFrag)), @@ -600,11 +586,6 @@ foreach fvtiToFWti = AllWidenableFloatVectors in { defvar fvti = fvtiToFWti.Vti; defvar iwti = GetIntVTypeInfo.Vti; - def : Pat<(iwti.Vector (vop (fvti.Vector fvti.RegClass:$rs1), - (fvti.Mask true_mask), - VLOpFrag)), - (!cast(instruction_name#"_"#fvti.LMul.MX) - fvti.RegClass:$rs1, GPR:$vl, fvti.Log2SEW)>; def : Pat<(iwti.Vector (vop (fvti.Vector fvti.RegClass:$rs1), (fvti.Mask V0), VLOpFrag)), @@ -618,11 +599,6 @@ foreach vtiToWti = AllWidenableIntToFloatVectors in { defvar ivti = vtiToWti.Vti; defvar fwti = vtiToWti.Wti; - def : Pat<(fwti.Vector (vop (ivti.Vector ivti.RegClass:$rs1), - (ivti.Mask true_mask), - VLOpFrag)), - (!cast(instruction_name#"_"#ivti.LMul.MX) - ivti.RegClass:$rs1, GPR:$vl, ivti.Log2SEW)>; def : Pat<(fwti.Vector (vop (ivti.Vector ivti.RegClass:$rs1), (ivti.Mask V0), VLOpFrag)), @@ -636,11 +612,6 @@ foreach vtiToWti = AllWidenableIntToFloatVectors in { defvar vti = vtiToWti.Vti; defvar fwti = vtiToWti.Wti; - def : Pat<(vti.Vector (vop (fwti.Vector fwti.RegClass:$rs1), - (fwti.Mask true_mask), - VLOpFrag)), - (!cast(instruction_name#"_"#vti.LMul.MX) - fwti.RegClass:$rs1, GPR:$vl, vti.Log2SEW)>; def : Pat<(vti.Vector (vop (fwti.Vector fwti.RegClass:$rs1), (fwti.Mask V0), VLOpFrag)), @@ -654,11 +625,6 @@ foreach fvtiToFWti = AllWidenableFloatVectors in { defvar fvti = fvtiToFWti.Vti; defvar iwti = GetIntVTypeInfo.Vti; - def : Pat<(fvti.Vector (vop (iwti.Vector iwti.RegClass:$rs1), - (iwti.Mask true_mask), - VLOpFrag)), - (!cast(instruction_name#"_"#fvti.LMul.MX) - iwti.RegClass:$rs1, GPR:$vl, fvti.Log2SEW)>; def : Pat<(fvti.Vector (vop (iwti.Vector iwti.RegClass:$rs1), (iwti.Mask V0), VLOpFrag)), @@ -1547,11 +1513,6 @@ foreach fvtiToFWti = AllWidenableFloatVectors in { defvar fvti = fvtiToFWti.Vti; defvar fwti = fvtiToFWti.Wti; - def : Pat<(fwti.Vector (riscv_fpextend_vl (fvti.Vector fvti.RegClass:$rs1), - (fvti.Mask true_mask), - VLOpFrag)), - (!cast("PseudoVFWCVT_F_F_V_"#fvti.LMul.MX) - fvti.RegClass:$rs1, GPR:$vl, fvti.Log2SEW)>; def : Pat<(fwti.Vector (riscv_fpextend_vl (fvti.Vector fvti.RegClass:$rs1), (fvti.Mask V0), VLOpFrag)), @@ -1568,11 +1529,6 @@ foreach fvtiToFWti = AllWidenableFloatVectors in { defvar fvti = fvtiToFWti.Vti; defvar fwti = fvtiToFWti.Wti; - def : Pat<(fvti.Vector (riscv_fpround_vl (fwti.Vector fwti.RegClass:$rs1), - (fwti.Mask true_mask), - VLOpFrag)), - (!cast("PseudoVFNCVT_F_F_W_"#fvti.LMul.MX) - fwti.RegClass:$rs1, GPR:$vl, fvti.Log2SEW)>; def : Pat<(fvti.Vector (riscv_fpround_vl (fwti.Vector fwti.RegClass:$rs1), (fwti.Mask V0), VLOpFrag)),