[Mlir-commits] [mlir] [mlir][gpu] Fix crash in RemoveDeadValues pass with gpu.launch ops (PR #182711)

Fedor Nikolaev llvmlistbot at llvm.org
Mon Feb 23 00:35:31 PST 2026


================
@@ -573,6 +576,29 @@ static void cleanUpDeadVals(MLIRContext *ctx, RDVFinalCleanupList &list) {
          << OpWithFlags(b.b->getParent()->getParentOp(),
                         OpPrintingFlags().skipRegions().printGenericOpForm());
     });
+    // Skip if already processed
+    if (processedBlocks.count(b.b))
+      continue;
+    // Skip entry blocks of functions - handled by processFuncOp
+    if (b.b->isEntryBlock() && isa<FunctionOpInterface>(b.b->getParentOp()))
----------------
felichita wrote:

`gpu.launch` has a region with an entry block whose parent op is not FunctionOpInterface. Previously this block wasn't skipped by the entry block check and wasn't handled correctly since the solver doesn't analyze `gpu.launch` regions. There are a lot of ops who have the same symptoms, but first bug is related to gpu.launch

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


More information about the Mlir-commits mailing list