@@ -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 ;
@@ -1084,7 +1083,7 @@ bool RISCVInsertVSETVLI::needVSETVLI(const MachineInstr &MI,
1084
1083
// * The LMUL1 restriction is for machines whose latency may depend on VL.
1085
1084
// * As above, this is only legal for tail "undefined" not "agnostic".
1086
1085
if (isVSlideInstr (MI) && Require.hasAVLImm () && Require.getAVLImm () == 1 &&
1087
- isLMUL1OrSmaller (CurInfo.getVLMUL ()) && hasUndefinedMergeOp (MI, *MRI )) {
1086
+ isLMUL1OrSmaller (CurInfo.getVLMUL ()) && hasUndefinedMergeOp (MI)) {
1088
1087
Used.VLAny = false ;
1089
1088
Used.VLZeroness = true ;
1090
1089
Used.LMUL = false ;
@@ -1096,8 +1095,9 @@ bool RISCVInsertVSETVLI::needVSETVLI(const MachineInstr &MI,
1096
1095
// immediate form of vmv.s.x, and thus frequently use vmv.v.i in it's place.
1097
1096
// Since a splat is non-constant time in LMUL, we do need to be careful to not
1098
1097
// 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)) {
1101
1101
Used.LMUL = false ;
1102
1102
Used.SEWLMULRatio = false ;
1103
1103
Used.VLAny = false ;
0 commit comments