Skip to content

Commit 92e2acb

Browse files
committed
Address first round of review comments
1 parent c37b00f commit 92e2acb

File tree

2 files changed

+9
-20
lines changed

2 files changed

+9
-20
lines changed

llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,6 @@ static bool isFloatScalarMoveOrScalarSplatInstr(const MachineInstr &MI) {
9494
}
9595
}
9696

97-
static bool isVInsertInstr(const MachineInstr &MI) {
98-
return RISCV::getRVVMCOpcode(MI.getOpcode()) == RISCV::RI_VINSERT;
99-
}
100-
10197
static bool isVExtractInstr(const MachineInstr &MI) {
10298
return RISCV::getRVVMCOpcode(MI.getOpcode()) == RISCV::RI_VEXTRACT;
10399
}
@@ -550,12 +546,6 @@ DemandedFields getDemanded(const MachineInstr &MI, const RISCVSubtarget *ST) {
550546
assert(!RISCVII::hasVLOp(TSFlags));
551547
// TODO: LMUL can be any larger value (without cost)
552548
Res.TailPolicy = false;
553-
Res.MaskPolicy = false;
554-
}
555-
556-
if (isVInsertInstr(MI)) {
557-
// TODO: LMUL can be any larger value (without cost)
558-
Res.MaskPolicy = false;
559549
}
560550

561551
return Res;

llvm/lib/Target/RISCV/RISCVInstrInfoXRivos.td

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -131,17 +131,16 @@ def RI_VEXTRACT : CustomRivosXVI<0b010111, OPMVV, (outs GPR:$rd),
131131

132132

133133
def ri_vextract : SDNode<"RISCVISD::RI_VEXTRACT",
134-
SDTypeProfile<1, 2, [SDTCisInt<0>, SDTCisVec<1>,
135-
SDTCisInt<2>,
136-
SDTCisInt<1>]>>;
134+
SDTypeProfile<1, 2, [SDTCisInt<0>, SDTCisVec<1>,
135+
SDTCisInt<2>,
136+
SDTCisInt<1>]>>;
137137

138138
def ri_vinsert_vl : SDNode<"RISCVISD::RI_VINSERT_VL",
139-
SDTypeProfile<1, 5, [SDTCisSameAs<0, 1>,
140-
SDTCisInt<0>,
141-
SDTCisVT<2, XLenVT>,
142-
SDTCisVT<3, XLenVT>,
143-
SDTCisVT<4, XLenVT>]>>;
144-
139+
SDTypeProfile<1, 5, [SDTCisSameAs<0, 1>,
140+
SDTCisInt<0>,
141+
SDTCisVT<2, XLenVT>,
142+
SDTCisVT<3, XLenVT>,
143+
SDTCisVT<4, XLenVT>]>>;
145144

146145
let Predicates = [HasVendorXRivosVisni], mayLoad = 0, mayStore = 0,
147146
hasSideEffects = 0, HasSEWOp = 1 in
@@ -150,7 +149,7 @@ foreach m = MxList in {
150149
let VLMul = m.value in {
151150
let BaseInstr = RI_VEXTRACT in
152151
def PseudoRI_VEXTRACT_ # mx :
153-
Pseudo<(outs GPR:$rd), (ins m.vrclass:$rs2, uimm6:$idx, ixlenimm:$sew),
152+
Pseudo<(outs GPR:$rd), (ins m.vrclass:$rs2, uimm5:$idx, ixlenimm:$sew),
154153
[]>,
155154
RISCVVPseudo;
156155

0 commit comments

Comments
 (0)