[llvm] [RISCV] Remove -riscv-insert-vsetvl-strict-asserts flag (PR #90171)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 26 02:01:08 PDT 2024
================
@@ -1430,32 +1426,14 @@ void RISCVInsertVSETVLI::emitVSETVLIs(MachineBasicBlock &MBB) {
transferAfter(CurInfo, MI);
}
- // If we reach the end of the block and our current info doesn't match the
- // expected info, insert a vsetvli to correct.
- if (!UseStrictAsserts) {
- const VSETVLIInfo &ExitInfo = BlockInfo[MBB.getNumber()].Exit;
- if (CurInfo.isValid() && ExitInfo.isValid() && !ExitInfo.isUnknown() &&
- CurInfo != ExitInfo) {
- // Note there's an implicit assumption here that terminators never use
- // or modify VL or VTYPE. Also, fallthrough will return end().
- auto InsertPt = MBB.getFirstInstrTerminator();
- insertVSETVLI(MBB, InsertPt, MBB.findDebugLoc(InsertPt), ExitInfo,
- CurInfo);
- CurInfo = ExitInfo;
- }
- }
-
- if (UseStrictAsserts && CurInfo.isValid()) {
- const auto &Info = BlockInfo[MBB.getNumber()];
- if (CurInfo != Info.Exit) {
- LLVM_DEBUG(dbgs() << "in block " << printMBBReference(MBB) << "\n");
- LLVM_DEBUG(dbgs() << " begin state: " << Info.Pred << "\n");
- LLVM_DEBUG(dbgs() << " expected end state: " << Info.Exit << "\n");
- LLVM_DEBUG(dbgs() << " actual end state: " << CurInfo << "\n");
- }
- assert(CurInfo == Info.Exit &&
- "InsertVSETVLI dataflow invariant violated");
+ const auto &Info = BlockInfo[MBB.getNumber()];
+ if (CurInfo != Info.Exit) {
----------------
lukel97 wrote:
Won't it trap at the assert though, and then none of the debug stuff will get printed?
https://github.com/llvm/llvm-project/pull/90171
More information about the llvm-commits
mailing list