From 8eebb47f9706b2016f2f6b772955066bf07249d7 Mon Sep 17 00:00:00 2001 From: Groverkss Date: Sun, 22 May 2022 01:20:50 +0530 Subject: [PATCH] [MLIR][Presburger] Update equality and subset checks asserts in IntegerRelation This patch updates asserts in IntegerRelation::isEqual and IntegerRelation::isCompatible to allow these functions when number of local identifiers are different. This change is done to reflect the algorithmic changes done before this patch. --- mlir/lib/Analysis/Presburger/IntegerRelation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mlir/lib/Analysis/Presburger/IntegerRelation.cpp b/mlir/lib/Analysis/Presburger/IntegerRelation.cpp index 14f05e0..73ae0eb 100644 --- a/mlir/lib/Analysis/Presburger/IntegerRelation.cpp +++ b/mlir/lib/Analysis/Presburger/IntegerRelation.cpp @@ -61,12 +61,12 @@ IntegerRelation IntegerRelation::intersect(IntegerRelation other) const { } bool IntegerRelation::isEqual(const IntegerRelation &other) const { - assert(space.isEqual(other.getSpace()) && "Spaces must be equal."); + assert(space.isCompatible(other.getSpace()) && "Spaces must be compatible."); return PresburgerRelation(*this).isEqual(PresburgerRelation(other)); } bool IntegerRelation::isSubsetOf(const IntegerRelation &other) const { - assert(space.isEqual(other.getSpace()) && "Spaces must be equal."); + assert(space.isCompatible(other.getSpace()) && "Spaces must be compatible."); return PresburgerRelation(*this).isSubsetOf(PresburgerRelation(other)); } -- 2.7.4