Skip to content

Commit 933dd03

Browse files
committed
[RISCV] Remove checks that MI's info is valid. NFC
It's always guaranteed to be valid since we compute it ourselves from MI. This should simplify an upcoming change in #72352
1 parent 69f64de commit 933dd03

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,6 +1023,7 @@ void RISCVInsertVSETVLI::transferBefore(VSETVLIInfo &Info,
10231023
return;
10241024

10251025
const VSETVLIInfo NewInfo = computeInfoForInstr(MI, TSFlags, MRI);
1026+
assert(NewInfo.isValid() && !NewInfo.isUnknown());
10261027
if (Info.isValid() && !needVSETVLI(MI, NewInfo, Info))
10271028
return;
10281029

@@ -1036,8 +1037,8 @@ void RISCVInsertVSETVLI::transferBefore(VSETVLIInfo &Info,
10361037
// maintain the SEW/LMUL ratio. This allows us to eliminate VL toggles in more
10371038
// places.
10381039
DemandedFields Demanded = getDemanded(MI, MRI, ST);
1039-
if (!Demanded.LMUL && !Demanded.SEWLMULRatio && Info.isValid() &&
1040-
PrevInfo.isValid() && !Info.isUnknown() && !PrevInfo.isUnknown()) {
1040+
if (!Demanded.LMUL && !Demanded.SEWLMULRatio && PrevInfo.isValid() &&
1041+
!PrevInfo.isUnknown()) {
10411042
if (auto NewVLMul = RISCVVType::getSameRatioLMUL(
10421043
PrevInfo.getSEW(), PrevInfo.getVLMUL(), Info.getSEW()))
10431044
Info.setVLMul(*NewVLMul);

0 commit comments

Comments
 (0)