[Mlir-commits] [mlir] [MLIR][Vector] Allow any strided memref for one-element vector.load in lowering vector.gather (PR #122437)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Fri Jan 10 02:06:18 PST 2025
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 86b1b0671cafd462c0aa681e2d320ce597300f69 e8f3a28d7b4a6f8b39c0b291bce77217c45b4389 --extensions cpp -- mlir/lib/Dialect/Vector/Transforms/LowerVectorGather.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/lib/Dialect/Vector/Transforms/LowerVectorGather.cpp b/mlir/lib/Dialect/Vector/Transforms/LowerVectorGather.cpp
index 4a8ad4eafd..4aff565b81 100644
--- a/mlir/lib/Dialect/Vector/Transforms/LowerVectorGather.cpp
+++ b/mlir/lib/Dialect/Vector/Transforms/LowerVectorGather.cpp
@@ -210,7 +210,8 @@ struct Gather1DToConditionalLoads : OpRewritePattern<vector::GatherOp> {
if (auto memType = dyn_cast<MemRefType>(base.getType())) {
if (auto stridesAttr =
dyn_cast_if_present<StridedLayoutAttr>(memType.getLayout())) {
- if (stridesAttr.getStrides().back() != 1 && resultTy.getNumElements() != 1)
+ if (stridesAttr.getStrides().back() != 1 &&
+ resultTy.getNumElements() != 1)
return failure();
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/122437
More information about the Mlir-commits
mailing list