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

Michael Maitland via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 22 13:10:03 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));
----------------
michaelmaitland wrote:

Is this assert redundant? isCandidate explicitly blocks insertion to the Worklist in `PushOperands`. That being said, isCandidate is cheap, so I don't have a strong objection.

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


More information about the llvm-commits mailing list