[Mlir-commits] [mlir] [mlir][vector] Remove unit-stride check in Gather1DToConditionalLoads (PR #189178)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Sun Mar 29 11:20:09 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:
OK, thanks!
> Each scalarized load is vector<1xelemTy>, valid regardless of stride.
Do we always lower to scalar loads though? Normally I'd check myself, but I am reading this on my phone - I'm OOO ATM.
In principle, based on the test, this looks OK. However, mindful of #187215, I want to make sure that we give this proper consideration. Sadly, I won't be able to properly engage with this PR until after Easter. Sorry for the delay!
https://github.com/llvm/llvm-project/pull/189178
More information about the Mlir-commits
mailing list