[Mlir-commits] [mlir] [mlir][vector] Remove unit-stride check in Gather1DToConditionalLoads (PR #189178)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Sat Mar 28 11:00:17 PDT 2026
================
@@ -195,16 +195,6 @@ struct Gather1DToConditionalLoads : OpRewritePattern<vector::GatherOp> {
// correct N-D load indices from the 1-D gather index.
bool useDelinearization = false;
if (auto memType = dyn_cast<MemRefType>(base.getType())) {
- // vector.load requires the most minor memref dim to have unit stride
- // (unless reading exactly 1 element).
- if (auto stridesAttr =
- dyn_cast_if_present<StridedLayoutAttr>(memType.getLayout())) {
- if (stridesAttr.getStrides().back() != 1 &&
- resultTy.getNumElements() != 1)
----------------
banach-space wrote:
> Each scalars ed load is vector<1xelemTy>, valid regardless of stride
This will already exclude 1-element loads, no? As in, this change is not required if w care about vector<1xelemTy>.
https://github.com/llvm/llvm-project/pull/189178
More information about the Mlir-commits
mailing list