diff --git a/docs/LangRef.html b/docs/LangRef.html index f3f82d9d212..c92e7eabfcc 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -101,6 +101,7 @@
The 'extractelement' instruction extracts a single scalar -element from a vector at a specified index. +element from a packed vector at a specified index.
@@ -2290,6 +2296,53 @@ results are undefined. + + + ++ <result> = insertelement <n x <ty>> <val>, <ty> <elt>, uint <idx> ; yields <n x <ty>> ++ +
+The 'insertelement' instruction inserts a scalar +element into a packed vector at a specified index. +
+ + ++The first operand of an 'insertelement' instruction is a +value of packed type. The second operand is a +scalar value whose type must equal the element type of the first +operand. The third operand is an index indicating the position at +which to insert the value. The index may be a variable.
+ ++The result is a packed vector of the same type as val. Its +element values are those of val except at position +idx, where it gets the value elt. If idx +exceeds the length of val, the results are undefined. +
+ ++ %result = insertelement <4 x int> %vec, int 1, uint 0 ; yields <4 x int> ++