[Mlir-commits] [mlir] [mlir][memref] Introduce `memref.distinct_objects` op (PR #156913)

Krzysztof Drewniak llvmlistbot at llvm.org
Wed Sep 24 00:46:55 PDT 2025


================
@@ -542,6 +542,25 @@ OpFoldResult AssumeAlignmentOp::fold(FoldAdaptor adaptor) {
   return getMemref();
 }
 
+//===----------------------------------------------------------------------===//
+// DistinctObjectsOp
+//===----------------------------------------------------------------------===//
+
+LogicalResult DistinctObjectsOp::verify() {
+  if (getOperandTypes() != getResultTypes())
+    return emitOpError("operand types and result types must match");
+  return success();
+}
+
+LogicalResult DistinctObjectsOp::inferReturnTypes(
----------------
krzysz00 wrote:

We could probably add a constraint - something like EachTypeMatches<"src", "res"> - and possibly use it to do return type inference 

But that's a separate PR

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


More information about the Mlir-commits mailing list