[Mlir-commits] [mlir] 60076a9 - [mlir][sparse] fix switch statement bug on two binary ops
Aart Bik
llvmlistbot at llvm.org
Tue Aug 9 11:58:14 PDT 2022
Author: Aart Bik
Date: 2022-08-09T11:58:05-07:00
New Revision: 60076a9eaf5e1c0d66a5238aff3a776078911e4e
URL: https://github.com/llvm/llvm-project/commit/60076a9eaf5e1c0d66a5238aff3a776078911e4e
DIFF: https://github.com/llvm/llvm-project/commit/60076a9eaf5e1c0d66a5238aff3a776078911e4e.diff
LOG: [mlir][sparse] fix switch statement bug on two binary ops
They appeared at the wrong place in the switch, treating
them as unary op rather than binary op.
Reviewed By: bixia
Differential Revision: https://reviews.llvm.org/D131509
Added:
Modified:
mlir/unittests/Dialect/SparseTensor/MergerTest.cpp
Removed:
################################################################################
diff --git a/mlir/unittests/Dialect/SparseTensor/MergerTest.cpp b/mlir/unittests/Dialect/SparseTensor/MergerTest.cpp
index 621e50247f871..a44f1f67054c2 100644
--- a/mlir/unittests/Dialect/SparseTensor/MergerTest.cpp
+++ b/mlir/unittests/Dialect/SparseTensor/MergerTest.cpp
@@ -260,8 +260,6 @@ class MergerTestBase : public ::testing::Test {
case kBitCast:
case kBinaryBranch:
case kUnary:
- case kShlI:
- case kBinary:
return compareExpression(tensorExp.children.e0, pattern->e0);
// Binary operations.
case kMulF:
@@ -282,6 +280,8 @@ class MergerTestBase : public ::testing::Test {
case kXorI:
case kShrS:
case kShrU:
+ case kShlI:
+ case kBinary:
return compareExpression(tensorExp.children.e0, pattern->e0) &&
compareExpression(tensorExp.children.e1, pattern->e1);
}
More information about the Mlir-commits
mailing list