llvm-project
1e61b374 - [mlir][vector] Tighten the semantics of vector.gather (#135749)

Commit
242 days ago
[mlir][vector] Tighten the semantics of vector.gather (#135749) This patch restricts `vector.gather` to only accept tensors and memrefs as valid sources. Currently, the source is typed as `AnyShaped`, which also includes vectors—allowing the following (invalid) construct to pass verification: ```mlir %0 = vector.gather %base[%c0][%indices], %mask, %pass_thru : vector<16xf32>, vector<16xi32>, vector<16xi1>, vector<16xf32> into vector<16xf32> ``` (Note: the source %base here is a vector, which is incorrect.) In contrast, `vector.scatter` currently only accepts memrefs, so some asymmetry remains between the two ops. This PR is a step toward aligning their semantics.
Author
Parents
Loading