Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mlir] fix copypaste typos in asserts #119878

Merged
merged 1 commit into from
Dec 13, 2024
Merged

[mlir] fix copypaste typos in asserts #119878

merged 1 commit into from
Dec 13, 2024

Conversation

klensy
Copy link
Contributor

@klensy klensy commented Dec 13, 2024

This fixes few copypaste typos

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

unsigned SimplexBase::addZeroRow(bool makeRestricted) {
// Resize the tableau to accommodate the extra row.
unsigned newRow = tableau.appendExtraRow();
assert(getNumRows() == getNumRows() && "Inconsistent tableau size");
rowUnknown.emplace_back(~con.size());

@llvmbot
Copy link
Member

llvmbot commented Dec 13, 2024

@llvm/pr-subscribers-mlir

Author: klensy (klensy)

Changes

This fixes few copypaste typos

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

unsigned SimplexBase::addZeroRow(bool makeRestricted) {
// Resize the tableau to accommodate the extra row.
unsigned newRow = tableau.appendExtraRow();
assert(getNumRows() == getNumRows() && "Inconsistent tableau size");
rowUnknown.emplace_back(~con.size());


Full diff: https://github.com/llvm/llvm-project/pull/119878.diff

1 Files Affected:

  • (modified) mlir/lib/Interfaces/ValueBoundsOpInterface.cpp (+6-6)
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

@klensy klensy changed the title [mlir] fix copypase typos in asserts [mlir] fix copypaste typos in asserts Dec 13, 2024
@joker-eph joker-eph merged commit 9f2dd08 into llvm:main Dec 13, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants