[Mlir-commits] [mlir] c94cfe6 - [MLIR] fix parse bound error message
Mehdi Amini
llvmlistbot at llvm.org
Sun Mar 15 19:57:42 PDT 2020
Author: Uday Bondhugula
Date: 2020-03-16T02:57:23Z
New Revision: c94cfe6ea7f4c2115f817c5836b1481060907e0d
URL: https://github.com/llvm/llvm-project/commit/c94cfe6ea7f4c2115f817c5836b1481060907e0d
DIFF: https://github.com/llvm/llvm-project/commit/c94cfe6ea7f4c2115f817c5836b1481060907e0d.diff
LOG: [MLIR] fix parse bound error message
- fix parse error message for affine for op's bounds
Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>
Differential Revision: https://reviews.llvm.org/D76198
Added:
Modified:
mlir/lib/Dialect/AffineOps/AffineOps.cpp
mlir/test/IR/invalid.mlir
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/AffineOps/AffineOps.cpp b/mlir/lib/Dialect/AffineOps/AffineOps.cpp
index 5b1df2b6d734..f47fe62963f2 100644
--- a/mlir/lib/Dialect/AffineOps/AffineOps.cpp
+++ b/mlir/lib/Dialect/AffineOps/AffineOps.cpp
@@ -1185,14 +1185,14 @@ static ParseResult parseBound(bool isLower, OperationState &result,
if (map.getNumDims() != numDims)
return p.emitError(
p.getNameLoc(),
- "dim operand count and integer set dim count must match");
+ "dim operand count and affine map dim count must match");
unsigned numDimAndSymbolOperands =
result.operands.size() - currentNumOperands;
if (numDims + map.getNumSymbols() != numDimAndSymbolOperands)
return p.emitError(
p.getNameLoc(),
- "symbol operand count and integer set symbol count must match");
+ "symbol operand count and affine map symbol count must match");
// If the map has multiple results, make sure that we parsed the min/max
// prefix.
diff --git a/mlir/test/IR/invalid.mlir b/mlir/test/IR/invalid.mlir
index 80b83fe60ec3..2c008be930fd 100644
--- a/mlir/test/IR/invalid.mlir
+++ b/mlir/test/IR/invalid.mlir
@@ -535,7 +535,7 @@ func @undefined_function() {
func @bound_symbol_mismatch(%N : index) {
affine.for %i = #map1(%N) to 100 {
- // expected-error at -1 {{symbol operand count and integer set symbol count must match}}
+ // expected-error at -1 {{symbol operand count and affine map symbol count must match}}
}
return
}
@@ -546,7 +546,7 @@ func @bound_symbol_mismatch(%N : index) {
func @bound_dim_mismatch(%N : index) {
affine.for %i = #map1(%N, %N)[%N] to 100 {
- // expected-error at -1 {{dim operand count and integer set dim count must match}}
+ // expected-error at -1 {{dim operand count and affine map dim count must match}}
}
return
}
More information about the Mlir-commits
mailing list