[Mlir-commits] [mlir] [mlir] [presburger] Add IntegerRelation::rangeProduct (PR #148092)
Jeremy Kun
llvmlistbot at llvm.org
Wed Jul 16 07:57:25 PDT 2025
================
@@ -2488,28 +2488,31 @@ IntegerRelation IntegerRelation::rangeProduct(const IntegerRelation &rel) {
assert(getNumDomainVars() == rel.getNumDomainVars() &&
"Range product is only defined for relations with equal domains");
- // explicit copy of the context relation
+ // explicit copy of `this`
IntegerRelation result = *this;
- unsigned srcOffset = getVarKindOffset(VarKind::Range);
- unsigned newNumRangeVars = rel.getNumRangeVars();
+ unsigned relRangeVarStart = rel.getVarKindOffset(VarKind::Range);
----------------
j2kun wrote:
The problem was that I used the wrong object. I copied the equality from `rel`, but was using the offset from `this`. The rest of the changes in this commit are intended to help clarify that.
https://github.com/llvm/llvm-project/pull/148092
More information about the Mlir-commits
mailing list