Previous: Unary and Binary Expressions, Up: Expression trees


11.6.4 Vectors

VEC_LSHIFT_EXPR
VEC_RSHIFT_EXPR
These nodes represent whole vector left and right shifts, respectively. The first operand is the vector to shift; it will always be of vector type. The second operand is an expression for the number of bits by which to shift. Note that the result is undefined if the second operand is larger than or equal to the first operand's type size.
VEC_WIDEN_MULT_HI_EXPR
VEC_WIDEN_MULT_LO_EXPR
These nodes represent widening vector multiplication of the high and low parts of the two input vectors, respectively. Their operands are vectors that contain the same number of elements (N) of the same integral type. The result is a vector that contains half as many elements, of an integral type whose size is twice as wide. In the case of VEC_WIDEN_MULT_HI_EXPR the high N/2 elements of the two vector are multiplied to produce the vector of N/2 products. In the case of VEC_WIDEN_MULT_LO_EXPR the low N/2 elements of the two vector are multiplied to produce the vector of N/2 products.
VEC_UNPACK_HI_EXPR
VEC_UNPACK_LO_EXPR
These nodes represent unpacking of the high and low parts of the input vector, respectively. The single operand is a vector that contains N elements of the same integral or floating point type. The result is a vector that contains half as many elements, of an integral or floating point type whose size is twice as wide. In the case of VEC_UNPACK_HI_EXPR the high N/2 elements of the vector are extracted and widened (promoted). In the case of VEC_UNPACK_LO_EXPR the low N/2 elements of the vector are extracted and widened (promoted).
VEC_UNPACK_FLOAT_HI_EXPR
VEC_UNPACK_FLOAT_LO_EXPR
These nodes represent unpacking of the high and low parts of the input vector, where the values are converted from fixed point to floating point. The single operand is a vector that contains N elements of the same integral type. The result is a vector that contains half as many elements of a floating point type whose size is twice as wide. In the case of VEC_UNPACK_HI_EXPR the high N/2 elements of the vector are extracted, converted and widened. In the case of VEC_UNPACK_LO_EXPR the low N/2 elements of the vector are extracted, converted and widened.
VEC_PACK_TRUNC_EXPR
This node represents packing of truncated elements of the two input vectors into the output vector. Input operands are vectors that contain the same number of elements of the same integral or floating point type. The result is a vector that contains twice as many elements of an integral or floating point type whose size is half as wide. The elements of the two vectors are demoted and merged (concatenated) to form the output vector.
VEC_PACK_SAT_EXPR
This node represents packing of elements of the two input vectors into the output vector using saturation. Input operands are vectors that contain the same number of elements of the same integral type. The result is a vector that contains twice as many elements of an integral type whose size is half as wide. The elements of the two vectors are demoted and merged (concatenated) to form the output vector.
VEC_PACK_FIX_TRUNC_EXPR
This node represents packing of elements of the two input vectors into the output vector, where the values are converted from floating point to fixed point. Input operands are vectors that contain the same number of elements of a floating point type. The result is a vector that contains twice as many elements of an integral type whose size is half as wide. The elements of the two vectors are merged (concatenated) to form the output vector.
VEC_EXTRACT_EVEN_EXPR
VEC_EXTRACT_ODD_EXPR
These nodes represent extracting of the even/odd elements of the two input vectors, respectively. Their operands and result are vectors that contain the same number of elements of the same type.
VEC_INTERLEAVE_HIGH_EXPR
VEC_INTERLEAVE_LOW_EXPR
These nodes represent merging and interleaving of the high/low elements of the two input vectors, respectively. The operands and the result are vectors that contain the same number of elements (N) of the same type. In the case of VEC_INTERLEAVE_HIGH_EXPR, the high N/2 elements of the first input vector are interleaved with the high N/2 elements of the second input vector. In the case of VEC_INTERLEAVE_LOW_EXPR, the low N/2 elements of the first input vector are interleaved with the low N/2 elements of the second input vector.