[Bug optimization/14559] casts between vector pointer types are very slow

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Mar 12 17:46:00 GMT 2004


------- 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



More information about the Gcc-bugs mailing list