This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/47968] ICE: in gen_lowpart_general, at rtlhooks.c:51 when converting vector of double to vector of float
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 3 Mar 2011 17:50:51 +0000
- Subject: [Bug middle-end/47968] ICE: in gen_lowpart_general, at rtlhooks.c:51 when converting vector of double to vector of float
- Auto-submitted: auto-generated
- References: <bug-47968-4@http.gcc.gnu.org/bugzilla/>
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