[Mlir-commits] [mlir] [mlir][Vector] Support 0-d vectors natively in VectorStoreToMemrefStoreLowering. (PR #112937)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Thu Nov 7 05:40:54 PST 2024
================
@@ -530,15 +530,9 @@ struct VectorStoreToMemrefStoreLowering
return rewriter.notifyMatchFailure(storeOp, "not single element vector");
Value extracted;
- if (vecType.getRank() == 0) {
- // TODO: Unifiy once ExtractOp supports 0-d vectors.
- extracted = rewriter.create<vector::ExtractElementOp>(
- storeOp.getLoc(), storeOp.getValueToStore());
- } else {
- SmallVector<int64_t> indices(vecType.getRank(), 0);
- extracted = rewriter.create<vector::ExtractOp>(
- storeOp.getLoc(), storeOp.getValueToStore(), indices);
- }
+ SmallVector<int64_t> indices(vecType.getRank(), 0);
----------------
banach-space wrote:
The comment is still referring to `vector.extractelement`, which your patch gets rid of the `vector.extractelement` path.
https://github.com/llvm/llvm-project/pull/112937
More information about the Mlir-commits
mailing list