aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringBase.cpp
diff options
context:
space:
mode:
authorMomchil Velikov <momchil.velikov@arm.com>2025-06-23 14:12:56 +0100
committerGitHub <noreply@github.com>2025-06-23 14:12:56 +0100
commitc7d9b6ed5d6d438ec3bcb0cad5f4d63f8e3e5eed (patch)
treecbc0c08e96d23239799a3f9e01098ac1f385b53f /llvm/lib/CodeGen/TargetLoweringBase.cpp
parentfb209929e1b1abbbebae4f3fdbd080c8e54023a1 (diff)
downloadllvm-c7d9b6ed5d6d438ec3bcb0cad5f4d63f8e3e5eed.zip
llvm-c7d9b6ed5d6d438ec3bcb0cad5f4d63f8e3e5eed.tar.gz
llvm-c7d9b6ed5d6d438ec3bcb0cad5f4d63f8e3e5eed.tar.bz2
[MLIR] Fix incorrect slice contiguity inference in `vector::isContiguousSlice` (#142422)
Previously, slices were sometimes marked as non-contiguous when they were actually contiguous. This occurred when the vector type had leading unit dimensions, e.g., `vector<1x1x...x1xd0xd1x...xdn-1xT>`. In such cases, only the trailing `n` dimensions of the memref need to be contiguous, not the entire vector rank. This affects how `FlattenContiguousRowMajorTransfer{Read,Write}Pattern` flattens `transfer_read` and `transfer_write` ops. The patterns used to collapse a number of dimensions equal to the vector rank which missed some opportunities when the leading unit dimensions of the vector span non-contiguous dimensions of the memref. Now that the contiguity of the slice is determined correctly, there is a choice how many dimensions of the memref to collapse, ranging from a) the number of vector dimensions after ignoring the leading unit dimensions, up to b) the maximum number of contiguous memref dimensions This patch makes a choice to do minimal memref collapsing. The rationale behind this decision is that this way the least amount of information is discarded. (It follows that in some cases where the patterns used to trigger and collapse some memref dimensions, after this patch the patterns may collapse less dimensions).
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp')
0 files changed, 0 insertions, 0 deletions