File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -51,15 +51,15 @@ struct DemandedVL {
5151 bool operator !=(const DemandedVL &Other) const {
5252 return !VL.isIdenticalTo (Other.VL );
5353 }
54- };
5554
56- static DemandedVL max (const DemandedVL &LHS, const DemandedVL &RHS) {
57- if (RISCV::isVLKnownLE (LHS.VL , RHS.VL ))
58- return RHS;
59- if (RISCV::isVLKnownLE (RHS.VL , LHS.VL ))
60- return LHS;
61- return DemandedVL::vlmax ();
62- }
55+ DemandedVL max (const DemandedVL &X) const {
56+ if (RISCV::isVLKnownLE (VL, X.VL ))
57+ return X;
58+ if (RISCV::isVLKnownLE (X.VL , VL))
59+ return *this ;
60+ return DemandedVL::vlmax ();
61+ }
62+ };
6363
6464class RISCVVLOptimizer : public MachineFunctionPass {
6565 const MachineRegisterInfo *MRI;
@@ -1637,7 +1637,7 @@ void RISCVVLOptimizer::transfer(const MachineInstr &MI) {
16371637 for (const MachineOperand &MO : make_filter_range (MI.uses (), isVirtualVec)) {
16381638 const MachineInstr *Def = MRI->getVRegDef (MO.getReg ());
16391639 DemandedVL Prev = DemandedVLs[Def];
1640- DemandedVLs[Def] = max ( DemandedVLs[Def], getMinimumVLForUser (MO));
1640+ DemandedVLs[Def] = DemandedVLs[Def]. max ( getMinimumVLForUser (MO));
16411641 if (DemandedVLs[Def] != Prev)
16421642 Worklist.insert (Def);
16431643 }
You can’t perform that action at this time.
0 commit comments