[Mlir-commits] [mlir] 16b6af3 - [mlir] Fix op comparisons in extensible dialects (#186637)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sat Mar 14 22:39:55 PDT 2026


Author: Krzysztof Drewniak
Date: 2026-03-14T22:39:50-07:00
New Revision: 16b6af32eb16b8bc51c48f1b4a6d5c502d798df5

URL: https://github.com/llvm/llvm-project/commit/16b6af32eb16b8bc51c48f1b4a6d5c502d798df5
DIFF: https://github.com/llvm/llvm-project/commit/16b6af32eb16b8bc51c48f1b4a6d5c502d798df5.diff

LOG: [mlir] Fix op comparisons in extensible dialects (#186637)

The extensible dialect system defined `compareProperties` to false
because it doesn't use properties. However, this should have been
`true`, as the empty properties are trivially always equal to
themselves. Doing otherwise means that no operations in extensible
dialects that aren't the exact same operation will ever compare equal
for the purposes of operations like CSE.

Added: 
    

Modified: 
    mlir/include/mlir/IR/ExtensibleDialect.h

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/IR/ExtensibleDialect.h b/mlir/include/mlir/IR/ExtensibleDialect.h
index e52306f79378a..dcbf6813506d5 100644
--- a/mlir/include/mlir/IR/ExtensibleDialect.h
+++ b/mlir/include/mlir/IR/ExtensibleDialect.h
@@ -566,7 +566,7 @@ class DynamicOpDefinition : public OperationName::Impl {
   Attribute getPropertiesAsAttr(Operation *op) final { return {}; }
   void copyProperties(OpaqueProperties lhs, OpaqueProperties rhs) final {}
   bool compareProperties(OpaqueProperties, OpaqueProperties) final {
-    return false;
+    return true;
   }
   llvm::hash_code hashProperties(OpaqueProperties prop) final { return {}; }
 


        


More information about the Mlir-commits mailing list