This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/14559] casts between vector pointer types are very slow
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Mar 2004 17:46:16 -0000
- Subject: [Bug optimization/14559] casts between vector pointer types are very slow
- References: <20040312173757.14559.michaelni@gmx.at>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-03-12 17:46 -------
This time this is invalid as you should be using an union instead of a cast as the vecotrs types are in
two different aliasing sets.
The following code produces the code you want.
typedef short mmxw __attribute__ ((mode(V4HI)));
typedef int mmxdw __attribute__ ((mode(V2SI)));
union t
{
mmxw t1;
mmxdw t2;
};
mmxdw test(mmxw w){
union t t3;
t3.t1 = w;
return t3.t2;
}
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
Summary|casts between vector pointer|casts between vector pointer
|types are very slow |types are very slow
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14559