llvm-project
63e87ab0 - [mlir][WasmSSA] Mark wasmssa.return as ReturnLike (#243023)

Commit
6 days ago
[mlir][WasmSSA] Mark wasmssa.return as ReturnLike (#243023) Fixes #242375. When erasing dead results of a `FunctionOpInterface` operation, `-remove-dead-values` checks each block terminator for the statically declared `ReturnLike` trait and erases the corresponding terminator operands. `wasmssa.return` was only declared as a terminator, so after the pass erased `wasmssa.func`'s dead results, `wasmssa.return` kept its operands and the module no longer verified: ``` error: 'wasmssa.return' op has 1 operands, but enclosing function returns 0 ``` This marks `wasmssa.return` as `ReturnLike` (the trait lives in ControlFlowInterfaces.td, hence the new include) and adds a regression test under `mlir/test/Dialect/WasmSSA/`.
Author
Parents
Loading