[Mlir-commits] [mlir] Fixed wrong check OperationEquivalenceTest.HashWorksWithFlags (PR #142210)
Aviad Cohen
llvmlistbot at llvm.org
Fri May 30 13:27:48 PDT 2025
https://github.com/AviadCo created https://github.com/llvm/llvm-project/pull/142210
The check was meant to check `IgnoreProperties` works as expected but operated on the wrong operation.
>From 34846acb470e6ed66f7a810e4bd0dfbf2bcfc9f5 Mon Sep 17 00:00:00 2001
From: Aviad Cohen <aviad.cohen2 at mobileye.com>
Date: Fri, 30 May 2025 23:24:22 +0300
Subject: [PATCH] Fixed wrong check OperationEquivalenceTest.HashWorksWithFlags
The check was meant to check `IgnoreProperties` works as expected but
operated on the wrong operation.
---
mlir/unittests/IR/OperationSupportTest.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mlir/unittests/IR/OperationSupportTest.cpp b/mlir/unittests/IR/OperationSupportTest.cpp
index b18512817969e..18ee9d71cb9fc 100644
--- a/mlir/unittests/IR/OperationSupportTest.cpp
+++ b/mlir/unittests/IR/OperationSupportTest.cpp
@@ -350,10 +350,10 @@ TEST(OperationEquivalenceTest, HashWorksWithFlags) {
auto req2 = b.getI32IntegerAttr(60);
Operation *opWithProperty2 = b.create<test::OpAttrMatch1>(
b.getUnknownLoc(), req2, nullptr, nullptr, req2);
- EXPECT_NE(getHash(op1, OperationEquivalence::None),
- getHash(op2, OperationEquivalence::None));
EXPECT_EQ(getHash(opWithProperty1, OperationEquivalence::IgnoreProperties),
getHash(opWithProperty2, OperationEquivalence::IgnoreProperties));
+ EXPECT_NE(getHash(opWithProperty1, OperationEquivalence::None),
+ getHash(opWithProperty2, OperationEquivalence::None));
opWithProperty1->destroy();
opWithProperty2->destroy();
}
More information about the Mlir-commits
mailing list