[Mlir-commits] [mlir] [mlir][vector] Canonicalize gathers/scatters with trivial offsets (PR #117939)
Ivan Butygin
llvmlistbot at llvm.org
Fri Dec 27 13:16:26 PST 2024
Hardcode84 wrote:
Added `vector.step` support and rebased but I don't want to do non-zero start offset and broadcast as part of this PR.
> I would say the other way around. We may want vector.step to be the canonical form for vector constants that fall into that category as vector.step holds valuable information that has to be inferred by inspecting the values of a constant op.
If we really want `vector.step` to be a canonical representation, we will need to always canonicalize `[0,1,2...]` constants to it (and it to be part of `canonicalize` pass and not just some random set of patterns), otherwise relevant patterns like this one will need to always check both forms. I'm still not convinced `vector.step` (for non-scalable) if useful as checking for relevant constant pattern is trivial and actually gives you more freedom (e.g. you can check for non-zero start offsets mentioned earlier) but I will leave this fight for someone else.
https://github.com/llvm/llvm-project/pull/117939
More information about the Mlir-commits
mailing list