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 @@
  • 'cast .. to' Instruction
  • 'select' Instruction
  • 'extractelement' Instruction
  • +
  • 'insertelement' Instruction
  • 'call' Instruction
  • 'va_arg' Instruction
  • @@ -1099,6 +1100,11 @@ following is the syntax for constant expressions:

    Perform the extractelement operation on constants. +
    insertelement ( VAL, ELT, IDX )
    + +
    Perform the insertelement + operation on constants. +
    OPCODE ( LHS, RHS )
    Perform the specified operation of the LHS and RHS constants. OPCODE may @@ -2261,7 +2267,7 @@ value argument; otherwise, it returns the second value argument.

    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. + +
    + 'insertelement' Instruction +
    + +
    + +
    Syntax:
    + +
    +  <result> = insertelement <n x <ty>> <val>, <ty> <elt>, uint <idx>    ; yields <n x <ty>>
    +
    + +
    Overview:
    + +

    +The 'insertelement' instruction inserts a scalar +element into a packed vector at a specified index. +

    + + +
    Arguments:
    + +

    +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.

    + +
    Semantics:
    + +

    +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. +

    + +
    Example:
    + +
    +  %result = insertelement <4 x int> %vec, int 1, uint 0    ; yields <4 x int>
    +
    +
    + +
    'call' Instruction