Files
Mehdi Amini 5e3202749a [MLIR] Fix crash in FrozenRewritePatternSet when PDL lowering is skipped by debug counter (#186159)
When using --mlir-debug-counter=pass-execution-skip=N, the MLIR debug
counter can skip the internal PDL-to-PDLInterp lowering pass that runs
inside FrozenRewritePatternSet's constructor. This caused an assertion
failure in PDLByteCode::Generator::generate() because the PDL module
wasn't properly converted to the interpreter dialect.

The fix adds a check after the PDL lowering pipeline runs to verify that
the expected matcher function symbol was produced. If the symbol is
absent (e.g., because the lowering was skipped by a debug counter),
bytecode generation is skipped entirely and PDL patterns are not
applied. This allows debug counter bisection to work without crashing.

Fixes #131441
Fixes #128342

Assisted-by: Claude Code
2026-03-18 16:01:49 +01:00
..