[Mlir-commits] [mlir] [MLIR] extend `getCompressedMaskOp` support in `VectorEmulateNarrowType` (PR #116122)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Thu Nov 14 09:34:45 PST 2024
================
@@ -74,6 +74,55 @@ func.func @vector_cst_maskedload_i2(%passthru: vector<5xi2>) -> vector<3x5xi2> {
// -----
+// This tests the correctness of generating compressed mask with `vector.create_mask` and a dynamic input.
+// Specifically, the program masked loads a vector<5xi2> from `vector<3x5xi2>[1, 0]`, with an unknown mask generator `m`.
+// After emulation transformation, it masked loads 2 bytes from linearized index `vector<4xi8>[1]`, with a new compressed mask
+// given by `ceildiv(m + 1, 4)`.
+func.func @check_unaligned_create_mask_dynamic_i2(%m : index, %passthru: vector<5xi2>) -> vector<5xi2> {
----------------
banach-space wrote:
[nit] From what I can tell, this is the first set of tests with `vector.create_mask` in this file? If yes, then I would skip "check" in func name (adds no info) and instead re-use a name of an exisiting test that this is a variation of. For example: `@check_unaligned_create_mask_dynamic_i2` --> `@vector_create_mask_maskedload_i2` or sth similar.
In fact, I'd rename `@vector_cst_maskedload_i2` as `@vector_constant_mask_maskedload_i2` and then you'd have consistent naming scheme that would allow easy identification of the tested corner cases.
https://github.com/llvm/llvm-project/pull/116122
More information about the Mlir-commits
mailing list