[Mlir-commits] [mlir] [MLIR][Vector] Make transfer in_bounds index-aware (PR #193920)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Fri Apr 24 02:24:26 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- mlir/lib/Dialect/Vector/Utils/VectorUtils.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/lib/Dialect/Vector/Utils/VectorUtils.cpp b/mlir/lib/Dialect/Vector/Utils/VectorUtils.cpp
index b283b1f34..dda7a9f9f 100644
--- a/mlir/lib/Dialect/Vector/Utils/VectorUtils.cpp
+++ b/mlir/lib/Dialect/Vector/Utils/VectorUtils.cpp
@@ -485,9 +485,8 @@ static SmallVector<bool> computeInBoundsFromStaticShapeAndIndices(
// Relax unknown-index handling to preserve previous behavior for
// loop-structured code paths while still preferring index-aware proofs.
- inBounds[vecDim] = unknownIndexRequiresExactSize
- ? (baseDimSize == vecSize)
- : (baseDimSize >= vecSize);
+ inBounds[vecDim] = unknownIndexRequiresExactSize ? (baseDimSize == vecSize)
+ : (baseDimSize >= vecSize);
}
return inBounds;
}
@@ -506,9 +505,9 @@ computeReadInBoundsFromStaticShape(ArrayRef<int64_t> sourceShape,
for (auto [dim, _] : llvm::enumerate(vectorShape))
sourceDims.push_back(dim);
- return computeInBoundsFromStaticShapeAndIndices(sourceShape, vectorShape,
- sourceDims, readIndices,
- /*unknownIndexRequiresExactSize=*/true);
+ return computeInBoundsFromStaticShapeAndIndices(
+ sourceShape, vectorShape, sourceDims, readIndices,
+ /*unknownIndexRequiresExactSize=*/true);
}
/// Compute in_bounds for transfer_write where write indices are expressed in
@@ -532,9 +531,9 @@ computeWriteInBoundsFromStaticShape(ArrayRef<int64_t> destShape,
alignedIndices.push_back(writeIndices[destDim]);
}
- return computeInBoundsFromStaticShapeAndIndices(destShape, vectorShape,
- destDims, alignedIndices,
- /*unknownIndexRequiresExactSize=*/false);
+ return computeInBoundsFromStaticShapeAndIndices(
+ destShape, vectorShape, destDims, alignedIndices,
+ /*unknownIndexRequiresExactSize=*/false);
}
Value vector::createReadOrMaskedRead(OpBuilder &builder, Location loc,
``````````
</details>
https://github.com/llvm/llvm-project/pull/193920
More information about the Mlir-commits
mailing list