Index: docs/LangRef.rst =================================================================== --- docs/LangRef.rst +++ docs/LangRef.rst @@ -12922,6 +12922,37 @@ %loadlal = load <16 x float>, <16 x float>* %ptr, align 4 %res = select <16 x i1> %mask, <16 x float> %loadlal, <16 x float> %passthru +.. _int_mexpandload: + +'``llvm.masked.expandload.*``' Intrinsics +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" +This is an overloaded intrinsic. The loaded data is a vector of any integer, floating-point or pointer data type. + +:: + + declare <16 x float> @llvm.masked.expandload.v16f32(float* , <16 x i1> , <16 x float> ) + declare <2 x double> @llvm.masked.expandload.v2f64(double* , <2 x i1> , <2 x double> ) + +Overview: +""""""""" + +Reads contiguous values from memory to sparse elements in the result vector selected by the provided mask. The masked-off lanes in the result vector are taken from the corresponding lanes of the '``passthru``' operand. + + +Arguments: +"""""""""" + +The first operand is the base pointer for the load. The second operand, mask, is a vector of boolean values with the same number of elements as the return type. The fourth is a pass-through value that is used to fill the masked-off lanes of the result. The return type and the type of the '``passthru``' operand are the same vector types. The pointer type is the element type of the vector. + + +Semantics: +"""""""""" + +The '``llvm.masked.expandload``' intrinsic is designed for conditional expansion of vector elements from memory in a single IR operation. It is useful for targets that support expanding vector masked loads. Other targets may support this intrinsic differently, for example by lowering it into a sequence of branches that guard scalar load operations. + .. _int_mstore: '``llvm.masked.store.*``' Intrinsics @@ -12966,6 +12997,35 @@ %res = select <16 x i1> %mask, <16 x float> %value, <16 x float> %oldval store <16 x float> %res, <16 x float>* %ptr, align 4 +.. _int_mcompressstore: + +'``llvm.masked.compressstore.*``' Intrinsics +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: +""""""" +This is an overloaded intrinsic. The data stored in memory is a vector of any integer, floating-point or pointer data type. + +:: + + declare void @llvm.masked.compressstore.v8i32(<8 x i32> , i32* , <8 x i1> ) + declare void @llvm.masked.compressstore.v16f32(<16 x float> , float* , <16 x i1> ) + +Overview: +""""""""" + +Writes contiguous memory according by compressing source elements according to the provided mask. The mask holds a bit for each vector lane. If the mask bit is not set that element will not be written to memory. + +Arguments: +"""""""""" + +The first operand is the vector value to be written to memory. The second operand is the base pointer for the store, its type is the element type of the value operand. The third operand, mask, is a vector of boolean values. The types of the mask and the value operand must have the same number of vector elements. + + +Semantics: +"""""""""" + +The '``llvm.masked.compressstore``' intrinsics is designed for conditional writing of selected vector elements in a single IR operation. It is useful for targets that support vector masked compressed store. Other targets may support this intrinsic differently, for example by lowering it into a sequence of branches that guard scalar store operations. Masked Vector Gather and Scatter Intrinsics -------------------------------------------