https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90984

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
So if you read the original Altivec PEM (and I think it is included in Power
ISA books and maybe others) and GCC document:
https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/Vector-Extensions.html#Vector-Extensions


Casts are just bitwise conversion, rather than element wise conversion.

To do element wise conversion, __builtin_convertvector can be used if you have
new enough GCC.


Vector conversion is available using the __builtin_convertvector (vec, vectype)
function. vec must be an expression with integral or floating vector type and
vectype an integral or floating vector type with the same number of elements.
The result has vectype type and value of a C cast of every element of vec to
the element type of vectype.


Otherwise, there are some vec_* functions which can be used for Altivec/PowerPC
vectors.

Reply via email to