Skip to content

Commit 98e51c8

Browse files
committed
Try to reduce code diff
1 parent 47b7583 commit 98e51c8

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,16 +1059,15 @@ void RISCVInsertVSETVLI::transferBefore(VSETVLIInfo &Info,
10591059
if (Info.hasSEWLMULRatioOnly() || !Info.isValid() || Info.isUnknown())
10601060
Info = NewInfo;
10611061

1062-
DemandedFields Demanded = getDemanded(MI, MRI, ST);
1063-
10641062
// If we don't use LMUL or the SEW/LMUL ratio, then adjust LMUL so that we
10651063
// maintain the SEW/LMUL ratio. This allows us to eliminate VL toggles in more
10661064
// places.
1065+
DemandedFields Demanded = getDemanded(MI, MRI, ST);
10671066
if (!Demanded.LMUL && !Demanded.SEWLMULRatio && Info.isValid() &&
10681067
!Info.isUnknown()) {
1069-
if (auto SameRatioLMUL = RISCVVType::getSameRatioLMUL(
1068+
if (auto NewVLMul = RISCVVType::getSameRatioLMUL(
10701069
Info.getSEW(), Info.getVLMUL(), NewInfo.getSEW())) {
1071-
NewInfo.setVLMul(*SameRatioLMUL);
1070+
NewInfo.setVLMul(*NewVLMul);
10721071
Demanded.LMUL = true;
10731072
}
10741073
}

0 commit comments

Comments
 (0)