diff --git a/mlir/lib/Analysis/FlatLinearValueConstraints.cpp b/mlir/lib/Analysis/FlatLinearValueConstraints.cpp --- a/mlir/lib/Analysis/FlatLinearValueConstraints.cpp +++ b/mlir/lib/Analysis/FlatLinearValueConstraints.cpp @@ -1078,10 +1078,11 @@ other.swapVar(s, loc); else other.insertSymbolVar(s - other.getNumDimVars(), *maybeValue); - } else + } else { // if the symbol has no Value attached, we have to add it as a new symbol // to `other` other.insertSymbolVar(s - other.getNumDimVars()); + } s++; }