Update docs for mergeLocalIds

GitOrigin-RevId: 06a119a3bd54a3b8bdaa6bd4f6270fa353b436e2
diff --git a/include/mlir/Analysis/AffineStructures.h b/include/mlir/Analysis/AffineStructures.h
index 4db0358..4a52971 100644
--- a/include/mlir/Analysis/AffineStructures.h
+++ b/include/mlir/Analysis/AffineStructures.h
@@ -441,10 +441,11 @@
   /// variables.
   void convertDimToLocal(unsigned dimStart, unsigned dimLimit);
 
-  /// Merge local ids of `this` and `other`. This is done by appending local ids
-  /// of `other` to `this` and inserting local ids of `this` to `other` at start
-  /// of its local ids. Number of dimension and symbol ids should match in
-  /// `this` and `other`.
+  /// Merge and align local ids of `this` and `other`. Any local identifiers
+  /// which can be represented as divisions in terms of dimension and symbol
+  /// ids with constant denominator are extracted and local ids with same
+  /// division representation are merged. Number of dimension and symbol ids
+  /// should match in `this` and `other`.
   void mergeLocalIds(FlatAffineConstraints &other);
 
   /// Removes all equalities and inequalities.
diff --git a/lib/Analysis/AffineStructures.cpp b/lib/Analysis/AffineStructures.cpp
index 30c8e09..c361f11 100644
--- a/lib/Analysis/AffineStructures.cpp
+++ b/lib/Analysis/AffineStructures.cpp
@@ -1960,10 +1960,11 @@
   fac.removeId(pos2);
 }
 
-/// Merge local ids of `this` and `other`. This is done by appending local ids
-/// of `other` to `this` and inserting local ids of `this` to `other` at start
-/// of its local ids. Number of dimension and symbol ids should match in
-/// `this` and `other`.
+/// Merge and align local ids of `this` and `other`. Any local identifiers
+/// which can be represented as divisions in terms of dimension and symbol
+/// ids with constant denominator are extracted and local ids with same
+/// division representation are merged. Number of dimension and symbol ids
+/// should match in `this` and `other`.
 void FlatAffineConstraints::mergeLocalIds(FlatAffineConstraints &other) {
   assert(getNumDimIds() == other.getNumDimIds() &&
          "Number of dimension ids should match");