This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/47968] ICE: in gen_lowpart_general, at rtlhooks.c:51 when converting vector of double to vector of float


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47968

--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-03-03 17:50:38 UTC ---
(In reply to comment #4)
> Btw, I wonder since when (and why) we accept
> 
>   float4 f4 = (float4) d2;
> 
> as valid code.

Because it is documented as being valid code that is you can cast between the
same size of the vectors (not to mention integers that are the same size as the
vector also).  It acts like a bitwise conversion rather than a promotion.  This
is needed for compatibility with the Altivec and SPU specs.

-- Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]