[Mlir-commits] [mlir] [mlir][vector] Take dim sizes into account in DropInnerMostUnitDims. (PR #71752)
Diego Caballero
llvmlistbot at llvm.org
Wed Nov 8 22:01:02 PST 2023
================
@@ -1185,9 +1185,12 @@ class DropInnerMostUnitDims : public OpRewritePattern<vector::TransferReadOp> {
return failure();
size_t dimsToDrop = 0;
- for (size_t i = 1; i < srcStrides.size(); ++i) {
- int dim = srcType.getRank() - i - 1;
- if (srcStrides[dim] == 1) {
+ int rankDiff = srcType.getRank() - targetType.getRank();
+ for (int64_t i = 0; i < targetType.getRank(); ++i) {
----------------
dcaballe wrote:
nit: move ub to variable
https://github.com/llvm/llvm-project/pull/71752
More information about the Mlir-commits
mailing list