@@ -523,7 +523,7 @@ class VSETVLIInfo {
523
523
bool getTailAgnostic () const { return TailAgnostic; }
524
524
bool getMaskAgnostic () const { return MaskAgnostic; }
525
525
526
- bool hasNonZeroAVL (const MachineRegisterInfo &MRI ) const {
526
+ bool hasNonZeroAVL () const {
527
527
if (hasAVLImm ())
528
528
return getAVLImm () > 0 ;
529
529
if (hasAVLReg ()) {
@@ -536,11 +536,10 @@ class VSETVLIInfo {
536
536
return false ;
537
537
}
538
538
539
- bool hasEquallyZeroAVL (const VSETVLIInfo &Other,
540
- const MachineRegisterInfo &MRI) const {
539
+ bool hasEquallyZeroAVL (const VSETVLIInfo &Other) const {
541
540
if (hasSameAVL (Other))
542
541
return true ;
543
- return (hasNonZeroAVL (MRI ) && Other.hasNonZeroAVL (MRI ));
542
+ return (hasNonZeroAVL () && Other.hasNonZeroAVL ());
544
543
}
545
544
546
545
bool hasSameAVL (const VSETVLIInfo &Other) const {
@@ -635,7 +634,7 @@ class VSETVLIInfo {
635
634
if (Used.VLAny && !(hasSameAVL (Require) && hasSameVLMAX (Require)))
636
635
return false ;
637
636
638
- if (Used.VLZeroness && !hasEquallyZeroAVL (Require, MRI ))
637
+ if (Used.VLZeroness && !hasEquallyZeroAVL (Require))
639
638
return false ;
640
639
641
640
return hasCompatibleVTYPE (Used, Require);
@@ -1170,7 +1169,7 @@ void RISCVInsertVSETVLI::transferBefore(VSETVLIInfo &Info,
1170
1169
// variant, so we avoid the transform to prevent extending live range of an
1171
1170
// avl register operand.
1172
1171
// TODO: We can probably relax this for immediates.
1173
- bool EquallyZero = IncomingInfo.hasEquallyZeroAVL (PrevInfo, *MRI ) &&
1172
+ bool EquallyZero = IncomingInfo.hasEquallyZeroAVL (PrevInfo) &&
1174
1173
IncomingInfo.hasSameVLMAX (PrevInfo);
1175
1174
if (Demanded.VLAny || (Demanded.VLZeroness && !EquallyZero))
1176
1175
Info.setAVL (IncomingInfo);
@@ -1565,7 +1564,7 @@ static bool canMutatePriorConfig(const MachineInstr &PrevMI,
1565
1564
if (isVLPreservingConfig (PrevMI))
1566
1565
return false ;
1567
1566
if (!getInfoForVSETVLI (PrevMI, MRI)
1568
- .hasEquallyZeroAVL (getInfoForVSETVLI (MI, MRI), MRI ))
1567
+ .hasEquallyZeroAVL (getInfoForVSETVLI (MI, MRI)))
1569
1568
return false ;
1570
1569
}
1571
1570
0 commit comments