This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/28436] New: accessing an element via a "pointer" on a vector does not cause vec_extract to be used
- 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: 19 Jul 2006 14:16:32 -0000
- Subject: [Bug middle-end/28436] New: accessing an element via a "pointer" on a vector does not cause vec_extract to be used
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Just like PR 28367:
#define vector __attribute__((vector_size(16)))
float f(vector float t)
{
return *(float*)&t;
}
We get a full vector store which we can get around with a stvewx which just
stores that one element and we can get that via a vec_extract pattern.
On x86_64 has the same issue, maybe even worse as there is no need to go
through memory there.
X86_64 produces:
f:
.LFB2:
movaps %xmm0, -24(%rsp)
movss -24(%rsp), %xmm0
ret
When really it should produce just a ret.
--
Summary: accessing an element via a "pointer" on a vector does
not cause vec_extract to be used
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28436