@@ -173,8 +173,7 @@ static bool isMaskRegOp(const MachineInstr &MI) {
173
173
// / Note that this is different from "agnostic" as defined by the vector
174
174
// / specification. Agnostic requires each lane to either be undisturbed, or
175
175
// / 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) {
178
177
179
178
unsigned UseOpIdx;
180
179
if (!MI.isRegTiedToUseOperand (0 , &UseOpIdx))
@@ -404,7 +403,7 @@ DemandedFields getDemanded(const MachineInstr &MI,
404
403
// this for any tail agnostic operation, but we can't as TA requires
405
404
// tail lanes to either be the original value or -1. We are writing
406
405
// unknown bits to the lanes here.
407
- if (hasUndefinedMergeOp (MI, *MRI )) {
406
+ if (hasUndefinedMergeOp (MI)) {
408
407
if (isFloatScalarMoveOrScalarSplatInstr (MI) && !ST->hasVInstructionsF64 ())
409
408
Res.SEW = DemandedFields::SEWGreaterThanOrEqualAndLessThan64;
410
409
else
@@ -888,7 +887,7 @@ static VSETVLIInfo computeInfoForInstr(const MachineInstr &MI, uint64_t TSFlags,
888
887
889
888
bool TailAgnostic = true ;
890
889
bool MaskAgnostic = true ;
891
- if (!hasUndefinedMergeOp (MI, *MRI )) {
890
+ if (!hasUndefinedMergeOp (MI)) {
892
891
// Start with undisturbed.
893
892
TailAgnostic = false ;
894
893
MaskAgnostic = false ;
@@ -1083,7 +1082,7 @@ bool RISCVInsertVSETVLI::needVSETVLI(const MachineInstr &MI,
1083
1082
// * The LMUL1 restriction is for machines whose latency may depend on VL.
1084
1083
// * As above, this is only legal for tail "undefined" not "agnostic".
1085
1084
if (isVSlideInstr (MI) && Require.hasAVLImm () && Require.getAVLImm () == 1 &&
1086
- isLMUL1OrSmaller (CurInfo.getVLMUL ()) && hasUndefinedMergeOp (MI, *MRI )) {
1085
+ isLMUL1OrSmaller (CurInfo.getVLMUL ()) && hasUndefinedMergeOp (MI)) {
1087
1086
Used.VLAny = false ;
1088
1087
Used.VLZeroness = true ;
1089
1088
Used.LMUL = false ;
@@ -1095,8 +1094,9 @@ bool RISCVInsertVSETVLI::needVSETVLI(const MachineInstr &MI,
1095
1094
// immediate form of vmv.s.x, and thus frequently use vmv.v.i in it's place.
1096
1095
// Since a splat is non-constant time in LMUL, we do need to be careful to not
1097
1096
// increase the number of active vector registers (unlike for vmv.s.x.)
1098
- if (isScalarSplatInstr (MI) && Require.hasAVLImm () && Require.getAVLImm () == 1 &&
1099
- isLMUL1OrSmaller (CurInfo.getVLMUL ()) && hasUndefinedMergeOp (MI, *MRI)) {
1097
+ if (isScalarSplatInstr (MI) && Require.hasAVLImm () &&
1098
+ Require.getAVLImm () == 1 && isLMUL1OrSmaller (CurInfo.getVLMUL ()) &&
1099
+ hasUndefinedMergeOp (MI)) {
1100
1100
Used.LMUL = false ;
1101
1101
Used.SEWLMULRatio = false ;
1102
1102
Used.VLAny = false ;
0 commit comments