[Mlir-commits] [mlir] [mlir][memref-to-spirv]: Reverse Image Load Coordinates (PR #160495)
Jack Frankland
llvmlistbot at llvm.org
Mon Sep 29 09:17:28 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);
----------------
FranklandJack wrote:
Good catch, fixed.
https://github.com/llvm/llvm-project/pull/160495
More information about the Mlir-commits
mailing list