Issue 242375
Summary [mlir][remove-dead-values] A valid wasmssa module becomes invalid after running the pass
Labels mlir
Assignees
Reporter LiRvs-Miria
    ### Environment

- `mlir-opt` from llvm-project main @ `32384fac169a` (2026-11-13 build), Release + `LLVM_ENABLE_ASSERTIONS=ON`
- The `wasmssa` dialect is in-tree: `mlir/include/mlir/Dialect/WasmSSA`

### Reproducer

This module is valid — parsing and canonicalize both accept it:

```mlir
wasmssa.func @f() -> f64 {
  %0 = wasmssa.const 3.14 : f64
  wasmssa.return %0 : f64
}
```

### Steps

```
mlir-opt repro.mlir -remove-dead-values -o /dev/null
```

### Actual

```
error: 'wasmssa.return' op has 1 operands, but enclosing function returns 0
```

The pass removes the function's result, but `wasmssa.return` still has
its operand, so after the pass the module no longer verifies.

### Expected

The pass should not leave the module in a state that fails verification.

### Note

I will follow up with a deeper analysis of the root cause. Possibly
related: #226073 (wasmssa.func result-side verification).

### Found by

The in-tree fuzz target `mlir-opt-fuzzer` (#239171) mutating
mlir/test-derived inputs.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to