llvm-project
0ccd67c6 - [mlir][vector] Allow single-element strided load/store in LLVM lowering (#241579)

Commit
22 hours ago
[mlir][vector] Allow single-element strided load/store in LLVM lowering (#241579) The verifier allows a non-unit stride in the most minor memref dim when `vector.load`/`vector.store` accesses a single element. The LLVM lowering still asserts unit stride, so this crashes `-convert-vector-to-llvm`: ```mlir func.func @f(%m: memref<4xf32, strided<[3]>>, %i: index) -> vector<1xf32> { %0 = vector.load %m[%i] : memref<4xf32, strided<[3]>>, vector<1xf32> return %0 : vector<1xf32> } ``` This patch moves the verifier condition into `vector::isValidLoadStoreMemRefLayout` and uses it in both places, so they cannot diverge again. Fixes #239720
Author
Parents
Loading