[Mlir-commits] [mlir] [mlir][memref-to-spirv]: Reverse Image Load Coordinates (PR #160495)
Jakub Kuderski
llvmlistbot at llvm.org
Mon Sep 29 07:12:33 PDT 2025
================
@@ -755,13 +785,16 @@ ImageLoadOpPattern::matchAndRewrite(memref::LoadOp loadOp, OpAdaptor adaptor,
// Build a vector of coordinates or just a scalar index if we have a 1D image.
Value coords;
- if (memrefType.getRank() != 1) {
+ if (memrefType.getRank() == 1) {
+ coords = adaptor.getIndices()[0];
+ } else {
+ auto maybeCoords = extractLoadCoordsForComposite(loadOp, adaptor, rewriter);
----------------
kuhar wrote:
also here: spell out the type
https://github.com/llvm/llvm-project/pull/160495
More information about the Mlir-commits
mailing list