------- Comment #4 from pinskia at gmail dot com 2006-11-30 18:10 ------- Subject: Re: [4.0/4.1/4.2/4.3 Regression] internal compiler error: in convert_move, at expr.c:362
On Thu, 2006-11-30 at 15:55 +0000, dimock at csail dot mit dot edu wrote: > > (2a) [portability and performance] The standard way of handling the vector > extensions in gcc is to make a union of the vector and an array of the same > size so that the vector can be loaded or unloaded without making use of > machine-specific (non-portable) intrinsics or builtins. I noticed that in my > machine-generated code which used unions everywhere, that gcc was able to > better optimize code if I took out unions where they were not needed (removing > unused unions produced different .s files on -mcpu=G4 on a PowerPC, and the > code with unions removed ran faster. Performance not checked on pentium/SSE > since my real target is PPE/SPE.) The best portability (and better for performance) way is to make a temporary variable. Though unions are not that good for performance. For SPU, you can use spu_extract/spu_insert to get better performance. Thanks, Andrew Pinski a SPU maintainer (and a Cell guy in gneral) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30016