[Mlir-commits] [mlir] [mlir] fix copypase typos in asserts (PR #119878)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Dec 13 05:57:38 PST 2024


https://github.com/klensy created https://github.com/llvm/llvm-project/pull/119878

This fixes few copypaste typos

I've also spotted weird `getNumRows() == getNumRows()`: looks like leftover after refactoring

https://github.com/llvm/llvm-project/blob/ea8e328ae2bea9d9a7d556ef4d791fa116f7de18/mlir/lib/Analysis/Presburger/Simplex.cpp#L107-L111

>From 1b4e45a2ed02f27136a28e41b28691301705df89 Mon Sep 17 00:00:00 2001
From: klensy <nightouser at gmail.com>
Date: Fri, 13 Dec 2024 16:50:39 +0300
Subject: [PATCH] fix copypaste typo

---
 mlir/lib/Interfaces/ValueBoundsOpInterface.cpp | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/mlir/lib/Interfaces/ValueBoundsOpInterface.cpp b/mlir/lib/Interfaces/ValueBoundsOpInterface.cpp
index 505e84e3ca0cf3..87f883c2e64850 100644
--- a/mlir/lib/Interfaces/ValueBoundsOpInterface.cpp
+++ b/mlir/lib/Interfaces/ValueBoundsOpInterface.cpp
@@ -777,11 +777,11 @@ FailureOr<bool>
 ValueBoundsConstraintSet::areOverlappingSlices(MLIRContext *ctx,
                                                HyperrectangularSlice slice1,
                                                HyperrectangularSlice slice2) {
-  assert(slice1.getMixedOffsets().size() == slice1.getMixedOffsets().size() &&
+  assert(slice1.getMixedOffsets().size() == slice2.getMixedOffsets().size() &&
          "expected slices of same rank");
-  assert(slice1.getMixedSizes().size() == slice1.getMixedSizes().size() &&
+  assert(slice1.getMixedSizes().size() == slice2.getMixedSizes().size() &&
          "expected slices of same rank");
-  assert(slice1.getMixedStrides().size() == slice1.getMixedStrides().size() &&
+  assert(slice1.getMixedStrides().size() == slice2.getMixedStrides().size() &&
          "expected slices of same rank");
 
   Builder b(ctx);
@@ -842,11 +842,11 @@ FailureOr<bool>
 ValueBoundsConstraintSet::areEquivalentSlices(MLIRContext *ctx,
                                               HyperrectangularSlice slice1,
                                               HyperrectangularSlice slice2) {
-  assert(slice1.getMixedOffsets().size() == slice1.getMixedOffsets().size() &&
+  assert(slice1.getMixedOffsets().size() == slice2.getMixedOffsets().size() &&
          "expected slices of same rank");
-  assert(slice1.getMixedSizes().size() == slice1.getMixedSizes().size() &&
+  assert(slice1.getMixedSizes().size() == slice2.getMixedSizes().size() &&
          "expected slices of same rank");
-  assert(slice1.getMixedStrides().size() == slice1.getMixedStrides().size() &&
+  assert(slice1.getMixedStrides().size() == slice2.getMixedStrides().size() &&
          "expected slices of same rank");
 
   // The two slices are equivalent if all of their offsets, sizes and strides



More information about the Mlir-commits mailing list