Skip to content

Commit fb7bcc0

Browse files
committed
Remove unused MRI argument
1 parent 761da60 commit fb7bcc0

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,7 @@ static bool isMaskRegOp(const MachineInstr &MI) {
173173
/// Note that this is different from "agnostic" as defined by the vector
174174
/// specification. Agnostic requires each lane to either be undisturbed, or
175175
/// take the value -1; no other value is allowed.
176-
static bool hasUndefinedMergeOp(const MachineInstr &MI,
177-
const MachineRegisterInfo &MRI) {
176+
static bool hasUndefinedMergeOp(const MachineInstr &MI) {
178177

179178
unsigned UseOpIdx;
180179
if (!MI.isRegTiedToUseOperand(0, &UseOpIdx))
@@ -404,7 +403,7 @@ DemandedFields getDemanded(const MachineInstr &MI,
404403
// this for any tail agnostic operation, but we can't as TA requires
405404
// tail lanes to either be the original value or -1. We are writing
406405
// unknown bits to the lanes here.
407-
if (hasUndefinedMergeOp(MI, *MRI)) {
406+
if (hasUndefinedMergeOp(MI)) {
408407
if (isFloatScalarMoveOrScalarSplatInstr(MI) && !ST->hasVInstructionsF64())
409408
Res.SEW = DemandedFields::SEWGreaterThanOrEqualAndLessThan64;
410409
else
@@ -888,7 +887,7 @@ static VSETVLIInfo computeInfoForInstr(const MachineInstr &MI, uint64_t TSFlags,
888887

889888
bool TailAgnostic = true;
890889
bool MaskAgnostic = true;
891-
if (!hasUndefinedMergeOp(MI, *MRI)) {
890+
if (!hasUndefinedMergeOp(MI)) {
892891
// Start with undisturbed.
893892
TailAgnostic = false;
894893
MaskAgnostic = false;
@@ -1084,7 +1083,7 @@ bool RISCVInsertVSETVLI::needVSETVLI(const MachineInstr &MI,
10841083
// * The LMUL1 restriction is for machines whose latency may depend on VL.
10851084
// * As above, this is only legal for tail "undefined" not "agnostic".
10861085
if (isVSlideInstr(MI) && Require.hasAVLImm() && Require.getAVLImm() == 1 &&
1087-
isLMUL1OrSmaller(CurInfo.getVLMUL()) && hasUndefinedMergeOp(MI, *MRI)) {
1086+
isLMUL1OrSmaller(CurInfo.getVLMUL()) && hasUndefinedMergeOp(MI)) {
10881087
Used.VLAny = false;
10891088
Used.VLZeroness = true;
10901089
Used.LMUL = false;
@@ -1096,8 +1095,9 @@ bool RISCVInsertVSETVLI::needVSETVLI(const MachineInstr &MI,
10961095
// immediate form of vmv.s.x, and thus frequently use vmv.v.i in it's place.
10971096
// Since a splat is non-constant time in LMUL, we do need to be careful to not
10981097
// increase the number of active vector registers (unlike for vmv.s.x.)
1099-
if (isScalarSplatInstr(MI) && Require.hasAVLImm() && Require.getAVLImm() == 1 &&
1100-
isLMUL1OrSmaller(CurInfo.getVLMUL()) && hasUndefinedMergeOp(MI, *MRI)) {
1098+
if (isScalarSplatInstr(MI) && Require.hasAVLImm() &&
1099+
Require.getAVLImm() == 1 && isLMUL1OrSmaller(CurInfo.getVLMUL()) &&
1100+
hasUndefinedMergeOp(MI)) {
11011101
Used.LMUL = false;
11021102
Used.SEWLMULRatio = false;
11031103
Used.VLAny = false;

0 commit comments

Comments
 (0)