diff options
author | Marc Glisse <marc.glisse@inria.fr> | 2012-10-11 16:59:18 +0200 |
---|---|---|
committer | Marc Glisse <glisse@gcc.gnu.org> | 2012-10-11 14:59:18 +0000 |
commit | 0fdce8752b88cdc8b05cf09d90fec25468b12e6f (patch) | |
tree | 8bc53d876fc7f8a83c3c5ae647a87e8a2f14540d /gcc | |
parent | 2ef3fcf7cbb136ce134f218d13611e66e9daa74b (diff) | |
download | gcc-0fdce8752b88cdc8b05cf09d90fec25468b12e6f.zip gcc-0fdce8752b88cdc8b05cf09d90fec25468b12e6f.tar.gz gcc-0fdce8752b88cdc8b05cf09d90fec25468b12e6f.tar.bz2 |
extend.texi (Vector Extensions): C++ improvements.
2012-10-11 Marc Glisse <marc.glisse@inria.fr>
* doc/extend.texi (Vector Extensions): C++ improvements.
* doc/generic.texi (LSHIFT_EXPR, RSHIFT_EXPR): Mixed vector-scalar.
(LT_EXPR, LE_EXPR, GT_EXPR, GE_EXPR, EQ_EXPR, NE_EXPR): Specify
the vector case.
(VEC_COND_EXPR): Document it.
From-SVN: r192363
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/doc/extend.texi | 2 | ||||
-rw-r--r-- | gcc/doc/generic.texi | 25 |
3 files changed, 28 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ccb0b79..3ed1e8a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2012-10-11 Marc Glisse <marc.glisse@inria.fr> + + * doc/extend.texi (Vector Extensions): C++ improvements. + * doc/generic.texi (LSHIFT_EXPR, RSHIFT_EXPR): Mixed vector-scalar. + (LT_EXPR, LE_EXPR, GT_EXPR, GE_EXPR, EQ_EXPR, NE_EXPR): Specify + the vector case. + (VEC_COND_EXPR): Document it. + 2012-10-11 Terry Guo <terry.guo@arm.com> * config/arm/arm.c (arm_arch6m): New variable to denote armv6-m diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 9fd2f27..a07539a 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -6864,7 +6864,7 @@ a1, @dots{}, an@} >> @{b0, b1, @dots{}, bn@} == @{a0 >> b0, a1 >> b1, @dots{}, an >> bn@}}@. Vector operands must have the same number of elements. -For the convenience in C it is allowed to use a binary vector operation +For convenience, it is allowed to use a binary vector operation where one operand is a scalar. In that case the compiler will transform the scalar operand into a vector where each element is the scalar from the operation. The transformation will happen only if the scalar could be diff --git a/gcc/doc/generic.texi b/gcc/doc/generic.texi index c48b663..082a528 100644 --- a/gcc/doc/generic.texi +++ b/gcc/doc/generic.texi @@ -1388,7 +1388,8 @@ shift. Right shift should be treated as arithmetic, i.e., the high-order bits should be zero-filled when the expression has unsigned type and filled with the sign bit when the expression has signed type. Note that the result is undefined if the second operand is larger -than or equal to the first operand's type size. +than or equal to the first operand's type size. Unlike most nodes, these +can have a vector as first operand and a scalar as second operand. @item BIT_IOR_EXPR @@ -1482,11 +1483,12 @@ allows the backend to choose between the faster of @code{TRUNC_DIV_EXPR}, @itemx NE_EXPR These nodes represent the less than, less than or equal to, greater than, greater than or equal to, equal, and not equal comparison -operators. The first and second operand with either be both of integral -type or both of floating type. The result type of these expressions -will always be of integral or boolean type. These operations return -the result type's zero value for false, and the result type's one value -for true. +operators. The first and second operands will either be both of integral +type, both of floating type or both of vector type. The result type of +these expressions will always be of integral, boolean or signed integral +vector type. These operations return the result type's zero value for +false, the result type's one value for true, and a vector whose elements +are zero (false) or minus one (true) for vectors. For floating point comparisons, if we honor IEEE NaNs and either operand is NaN, then @code{NE_EXPR} always returns true and the remaining operators @@ -1769,6 +1771,17 @@ 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. + +@item VEC_COND_EXPR +These nodes represent @code{?:} expressions. The three operands must be +vectors of the same size and number of elements. The second and third +operands must have the same type as the entire expression. The first +operand is of signed integral vector type. If an element of the first +operand evaluates to a zero value, the corresponding element of the +result is taken from the third operand. If it evaluates to a minus one +value, it is taken from the second operand. It should never evaluate to +any other value. In contrast with a @code{COND_EXPR}, all operands are +always evaluated. @end table |