[Mlir-commits] [mlir] [mlir] Add `areLoopIterArgTypesCompatible` to `LoopLikeOpInterface` (PR #184116)

Oleksandr Alex Zinenko llvmlistbot at llvm.org
Mon Mar 2 06:35:29 PST 2026


================
@@ -291,6 +291,15 @@ def LoopLikeOpInterface : OpInterface<"LoopLikeOpInterface"> {
       /*defaultImplementation=*/[{
         return ::mlir::failure();
       }]
+    >,
+    InterfaceMethod<[{
+        This method is called to compare types along control-flow edges. By
+        default, the types are checked as equal.
+      }],
+      /*retTy=*/"bool",
+      /*methodName=*/"areLoopIterArgTypesCompatible",
+      /*args=*/(ins "::mlir::Type":$lhs, "::mlir::Type":$rhs), [{}],
----------------
ftynse wrote:

```suggestion
      /*args=*/(ins "::mlir::Type":$lhs, "::mlir::Type":$rhs), 
      /*methodBody=*/[{}],
```

let's not have magic incantations in the code.

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


More information about the Mlir-commits mailing list