[llvm] clarify semantics of masked vector load/store (PR #82469)

Ralf Jung via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 20 23:45:41 PST 2024


================
@@ -23752,6 +23752,7 @@ Semantics:
 
 The '``llvm.masked.load``' intrinsic is designed for conditional reading of selected vector elements in a single IR operation. It is useful for targets that support vector masked loads and allows vectorizing predicated basic blocks on these targets. Other targets may support this intrinsic differently, for example by lowering it into a sequence of branches that guard scalar load operations.
 The result of this operation is equivalent to a regular vector load instruction followed by a 'select' between the loaded and the passthru values, predicated on the same mask. However, using this intrinsic prevents exceptions on memory access to masked-off lanes.
+In particular, this means that only the masked-on lanes of the vector need to be inbounds of an allocation (but all these lanes need to be inbounds of the same allocation).
----------------
RalfJung wrote:

Is "masked-on" the opposite of "masked-off"? Or is there some other term I could use?

https://github.com/llvm/llvm-project/pull/82469


More information about the llvm-commits mailing list