[Mlir-commits] [mlir] 7e5d300 - [mlir][Analysis] Fix assertion in FlatLinearConstraints
Matthias Springer
llvmlistbot at llvm.org
Sat Mar 25 04:59:15 PDT 2023
Author: Matthias Springer
Date: 2023-03-25T12:54:17+01:00
New Revision: 7e5d300d0a6d1865b6897d386be3308b5a0c3276
URL: https://github.com/llvm/llvm-project/commit/7e5d300d0a6d1865b6897d386be3308b5a0c3276
DIFF: https://github.com/llvm/llvm-project/commit/7e5d300d0a6d1865b6897d386be3308b5a0c3276.diff
LOG: [mlir][Analysis] Fix assertion in FlatLinearConstraints
Differential Revision: https://reviews.llvm.org/D146869
Added:
Modified:
mlir/lib/Analysis/FlatLinearValueConstraints.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Analysis/FlatLinearValueConstraints.cpp b/mlir/lib/Analysis/FlatLinearValueConstraints.cpp
index 24c8d871ff97c..b2d8bd9d113fb 100644
--- a/mlir/lib/Analysis/FlatLinearValueConstraints.cpp
+++ b/mlir/lib/Analysis/FlatLinearValueConstraints.cpp
@@ -457,7 +457,7 @@ void FlatLinearConstraints::getSliceBounds(unsigned offset, unsigned num,
SmallVectorImpl<AffineMap> *lbMaps,
SmallVectorImpl<AffineMap> *ubMaps,
bool closedUB) {
- assert(num < getNumDimVars() && "invalid range");
+ assert(offset + num <= getNumDimVars() && "invalid range");
// Basic simplification.
normalizeConstraintsByGCD();
More information about the Mlir-commits
mailing list