[Mlir-commits] [mlir] [MLIR] Implement emulation of static indexing subbyte type vector stores (PR #115922)
Han-Chung Wang
llvmlistbot at llvm.org
Wed Dec 4 09:05:13 PST 2024
================
@@ -309,6 +314,90 @@ emulatedVectorLoad(OpBuilder &rewriter, Location loc, Value base,
newLoad);
}
+/// Emits `memref.generic_atomic_rmw` op to store a subbyte-sized value to a
+/// byte in memory, with a mask. The `valueToStore` is a vector of subbyte-sized
+/// elements, with size of 8 bits, and the mask is used to select which elements
+/// to store.
+///
+/// Before:
+/// memory = |ab|cd|ef|12| : <4xi2> (<1xi8>)
+/// valueToStore = |01|23|45|67| : vector<4xi2>
+/// mask = |0|0|1|1| : vector<4xi1>
+/// After:
+/// memory = |ab|cd|45|67| : <4xi2> (<1xi8>)
----------------
hanhanW wrote:
Perhaps we can use `|aa|bb|cc|dd|` or `|ab|cd|ef|gh|`?
https://github.com/llvm/llvm-project/pull/115922
More information about the Mlir-commits
mailing list