[Mlir-commits] [mlir] [mlir][func] Fix ReturnOp issue #112146 (PR #112385)
Fabian Mora
llvmlistbot at llvm.org
Tue Oct 29 14:14:30 PDT 2024
fabianmcg wrote:
Yes there are tests: https://github.com/llvm/llvm-project/blob/main/mlir/unittests/Interfaces/ControlFlowInterfacesTest.cpp for the interface.
This issue is specific to the implementation of `func::FuncOp` and `func::ReturnOp`. I would also say it's quite easy to overlook because `ReturnLike` is the one attaching the region branch interface (we should change the trait's name). One option to spot similar errors would be adding a verifier to `RegionBranchTerminatorOpInterface` and make sure the parent is always valid. However, it's likely we would undo that change in the future with early exit.
https://github.com/llvm/llvm-project/pull/112385
More information about the Mlir-commits
mailing list