diff options
| author | Han-Chung Wang <hanhan0912@gmail.com> | 2025-05-20 14:53:02 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-20 14:53:02 -0700 |
| commit | c39915fa2ea2f8cc7f51d3692d17cbc8a968714c (patch) | |
| tree | 4137e76be34c4934df11d935d118e801b9480492 /mlir/lib/Dialect/Vector/Transforms/VectorTransferOpTransforms.cpp | |
| parent | de3e8fff20700f305270644d0ae9dc9e5598f089 (diff) | |
[mlir][NFC] Simplify constant checks with isOneInteger and renamed isZeroInteger. (#139340)
The revision adds isOneInteger helper, and simplifies the existing code
with the two methods. It removes some lambda, which makes code cleaner.
For downstream users, you can update the code with the below script.
```bash
sed -i "s/isZeroIndex/isZeroInteger/g" **/*.h
sed -i "s/isZeroIndex/isZeroInteger/g" **/*.cpp
```
---------
Signed-off-by: hanhanW <hanhan0912@gmail.com>
Diffstat (limited to 'mlir/lib/Dialect/Vector/Transforms/VectorTransferOpTransforms.cpp')
| -rw-r--r-- | mlir/lib/Dialect/Vector/Transforms/VectorTransferOpTransforms.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mlir/lib/Dialect/Vector/Transforms/VectorTransferOpTransforms.cpp b/mlir/lib/Dialect/Vector/Transforms/VectorTransferOpTransforms.cpp index d4d07c7eadc7..7dbb7a334fe6 100644 --- a/mlir/lib/Dialect/Vector/Transforms/VectorTransferOpTransforms.cpp +++ b/mlir/lib/Dialect/Vector/Transforms/VectorTransferOpTransforms.cpp @@ -538,7 +538,7 @@ static SmallVector<Value> getCollapsedIndices(RewriterBase &rewriter, indices.begin(), indices.begin() + firstDimToCollapse); SmallVector<Value> indicesToCollapse(indices.begin() + firstDimToCollapse, indices.end()); - if (llvm::all_of(indicesToCollapse, isZeroIndex)) { + if (llvm::all_of(indicesToCollapse, isZeroInteger)) { indicesAfterCollapsing.push_back(indicesToCollapse[0]); return indicesAfterCollapsing; } |
