Skip to content

Commit c599894

Browse files
authored
[RISCV] Remove policy and merge operand from unmasked vmsbf/vmsif/vmsof.m. (#94530)
These instructions always update the destination under a tail agnostic policy.
1 parent d99cf1b commit c599894

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,6 +1033,22 @@ class VPseudoUnaryNoMask<DAGOperand RetClass,
10331033
let HasVecPolicyOp = 1;
10341034
}
10351035

1036+
class VPseudoUnaryNoMaskNoPolicy<DAGOperand RetClass,
1037+
DAGOperand OpClass,
1038+
string Constraint = "",
1039+
int TargetConstraintType = 1> :
1040+
Pseudo<(outs RetClass:$rd),
1041+
(ins OpClass:$rs2, AVL:$vl, ixlenimm:$sew), []>,
1042+
RISCVVPseudo {
1043+
let mayLoad = 0;
1044+
let mayStore = 0;
1045+
let hasSideEffects = 0;
1046+
let Constraints = Constraint;
1047+
let TargetOverlapConstraintType = TargetConstraintType;
1048+
let HasVLOp = 1;
1049+
let HasSEWOp = 1;
1050+
}
1051+
10361052
class VPseudoUnaryNoMaskRoundingMode<DAGOperand RetClass,
10371053
DAGOperand OpClass,
10381054
string Constraint = "",
@@ -2056,7 +2072,7 @@ multiclass VPseudoVSFS_M {
20562072
foreach mti = AllMasks in {
20572073
defvar mx = mti.LMul.MX;
20582074
let VLMul = mti.LMul.value in {
2059-
def "_M_" # mti.BX : VPseudoUnaryNoMask<VR, VR, constraint>,
2075+
def "_M_" # mti.BX : VPseudoUnaryNoMaskNoPolicy<VR, VR, constraint>,
20602076
SchedUnary<"WriteVMSFSV", "ReadVMSFSV", mx,
20612077
forceMergeOpRead=true>;
20622078
def "_M_" # mti.BX # "_MASK" : VPseudoUnaryMask<VR, VR, constraint>,
@@ -4078,9 +4094,8 @@ class VPatMaskUnaryNoMask<string intrinsic_name,
40784094
(mti.Mask VR:$rs2),
40794095
VLOpFrag)),
40804096
(!cast<Instruction>(inst#"_M_"#mti.BX)
4081-
(mti.Mask (IMPLICIT_DEF)),
40824097
(mti.Mask VR:$rs2),
4083-
GPR:$vl, mti.Log2SEW, TA_MA)>;
4098+
GPR:$vl, mti.Log2SEW)>;
40844099

40854100
class VPatMaskUnaryMask<string intrinsic_name,
40864101
string inst,

0 commit comments

Comments
 (0)