[llvm] [RISCV][VLOpt] Minor worklist invariant cleanup [NFC] (PR #123989)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 22 13:46:32 PST 2025


================
@@ -1388,6 +1386,7 @@ bool RISCVVLOptimizer::runOnMachineFunction(MachineFunction &MF) {
   while (!Worklist.empty()) {
     assert(MadeChange);
     MachineInstr &MI = *Worklist.pop_back_val();
+    assert(isCandidate(MI));
----------------
preames wrote:

I can drop it if you want.  Personally, I find it helpful to have the assertion at the point of extraction from a worklist.  This is particular true when there's more than one insert point though - which doesn't apply here.  Happy to defer to your preference.

https://github.com/llvm/llvm-project/pull/123989


More information about the llvm-commits mailing list