This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/32110] New: vector "extract" and then vector "splat" is not optimized
- 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: 27 May 2007 21:46:46 -0000
- Subject: [Bug target/32110] New: vector "extract" and then vector "splat" is not optimized
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Testcase:
#define vector __attribute__((vector_size(16) ))
typedef vector int t;
t f(t a)
{
int b = *(int*)&a;
return (vector int){b,b,b,b};
}
----------------- CUT --------
This should just produce :
vspltw v2,v2,0
blr
But right now we do:
_f:
addi r2,r1,-16
stvewx v2,0,r2
lvewx v2,0,r2
vspltw v2,v2,0
blr
Which is not good at all, as it causes a load hit store hazzard to happen on
the Cell and it also causes the dispatch group to be rejected for the
power4/power5/970.
This is related to PR 32107.
--
Summary: vector "extract" and then vector "splat" is not
optimized
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
GCC target triplet: powerpc*-*-*
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32110