This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/41833] New: vec_splat followed by vec_splat could be improved
- 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: 26 Oct 2009 16:44:25 -0000
- Subject: [Bug rtl-optimization/41833] New: vec_splat followed by vec_splat could be improved
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Take:
#include <altivec.h>
vector float f(vector float a)
{
vector float b = vec_splat (a, 2);
return vec_splat (b, 0);
}
--- CUT ---
The second vec_splat could be removed as we already splatted the value across
the vector once, there is no need to do it again.
--
Summary: vec_splat followed by vec_splat could be improved
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: rtl-optimization
AssignedTo: pinskia 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=41833