[Bug rtl-optimization/29881] union causes inefficient code
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sat Nov 18 11:18:00 GMT 2006
------- Comment #3 from pinskia at gcc dot gnu dot org 2006-11-18 11:17 -------
(In reply to comment #2)
> Thanks for the hint! Assembly looks ok right now - didn't expect that this kind
> of casting would work (it doesn't in msvc compilers). Anyway it would be nice
> if the compiler would detect such a optimization opportunity (union case) as a
> valid one.
It is a documented extension for GCC, though it is a standard feature with
altivec(VMX, powerpc) and SPU compilers which is why it is included with GCC.
http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Vector-Extensions.html
It is possible to cast from one vector type to another, provided they are of
the same size (in fact, you can also cast vectors to and from other datatypes
of the same size).
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
GCC build triplet|x86_64-unknown-linux-gnu |
GCC host triplet|x86_64-unknown-linux-gnu |
GCC target triplet|x86_64-unknown-linux-gnu |i?86-*-* x86_64-*-*
Keywords| |missed-optimization
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29881
More information about the Gcc-bugs
mailing list