[cfe-dev] Casting scalars to vectors
john.thompson.jtsoftware at gmail.com
Mon Apr 19 11:45:27 PDT 2010
According to the AltiVec standard (section 2.4.6 in
a scalar to a vector is illegal, yet gcc seems to support it, as seen in
many of those little files in the PS3 SDK in target\ppu\include\bits, which
have statements like:
vec_uint4 mask = (vec_uint4)(vec_int4)(-1);
where vec_uint4 and vec_int4 are typedefs for vector types, i.e.:
typedef vector int vec_int4;
What does this actually do? I'm guessing it's supposed to fill the vector
components with -1.
How should this be handled in Clang?
I filed a Bugzilla bug 6846 on this.
If Clang should support it, I might be able to take a crack at it, with a
John.Thompson.JTSoftware at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev