[Mlir-commits] [mlir] [mlir]: Added properties/attributes ignore flags to OperationEquivalence (PR #141664)
Mehdi Amini
llvmlistbot at llvm.org
Tue May 27 13:20:43 PDT 2025
================
@@ -325,10 +326,24 @@ TEST(OperationEquivalenceTest, HashWorksWithFlags) {
op, OperationEquivalence::ignoreHashValue,
OperationEquivalence::ignoreHashValue, flags);
};
+ // Check ignore location.
EXPECT_EQ(getHash(op1, OperationEquivalence::IgnoreLocations),
getHash(op2, OperationEquivalence::IgnoreLocations));
EXPECT_NE(getHash(op1, OperationEquivalence::None),
getHash(op2, OperationEquivalence::None));
+ // Check ignore dictionary attributes.
+ op1->setLoc(NameLoc::get(StringAttr::get(&context, "foo")));
+ EXPECT_EQ(getHash(op1, OperationEquivalence::IgnoreDictionaryAttrs),
+ getHash(op2, OperationEquivalence::IgnoreDictionaryAttrs));
----------------
joker-eph wrote:
Shouldn't the test come after you set the attribute?
https://github.com/llvm/llvm-project/pull/141664
More information about the Mlir-commits
mailing list