public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/14559] New: casts between vector pointer types are very slow
@ 2004-03-12 17:38 michaelni at gmx dot at
2004-03-12 17:39 ` [Bug optimization/14559] " michaelni at gmx dot at
2004-03-12 17:46 ` pinskia at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: michaelni at gmx dot at @ 2004-03-12 17:38 UTC (permalink / raw)
To: gcc-bugs
see attached trivial code (return *(mmxdw*)&w;)
gcc testyy.c -O3 -mtune=pentium3 -march=pentium3 -fomit-frame-pointer
generates:
test:
subl $20, %esp
movl 24(%esp), %eax
movq %mm0, 8(%esp)
movl 8(%esp), %ecx
movl 12(%esp), %edx
movl %ecx, (%esp)
movl %edx, 4(%esp)
movq (%esp), %mm0
movq %mm0, (%eax)
addl $20, %esp
ret $4
human generator:
movl 4(%esp), %eax
movq %mm0, (%eax)
ret $4
additionally note, that reading after writing from the same address with a
different size may cause partial memory stalls
--
Summary: casts between vector pointer types are very slow
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: michaelni at gmx dot at
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: pentium3-debian-linux
GCC target triplet: pentium3-debian-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14559
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug optimization/14559] casts between vector pointer types are very slow
2004-03-12 17:38 [Bug optimization/14559] New: casts between vector pointer types are very slow michaelni at gmx dot at
@ 2004-03-12 17:39 ` michaelni at gmx dot at
2004-03-12 17:46 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: michaelni at gmx dot at @ 2004-03-12 17:39 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From michaelni at gmx dot at 2004-03-12 17:39 -------
Created an attachment (id=5910)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5910&action=view)
the source
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14559
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug optimization/14559] casts between vector pointer types are very slow
2004-03-12 17:38 [Bug optimization/14559] New: casts between vector pointer types are very slow michaelni at gmx dot at
2004-03-12 17:39 ` [Bug optimization/14559] " michaelni at gmx dot at
@ 2004-03-12 17:46 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-12 17:46 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-03-12 17:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-12 17:38 [Bug optimization/14559] New: casts between vector pointer types are very slow michaelni at gmx dot at
2004-03-12 17:39 ` [Bug optimization/14559] " michaelni at gmx dot at
2004-03-12 17:46 ` pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).