public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/40030] New: vector float * vector float + vector float should produce only vmaddfp
@ 2009-05-05 18:03 pinskia at gcc dot gnu dot org
2009-05-05 18:03 ` [Bug target/40030] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-05-05 18:03 UTC (permalink / raw)
To: gcc-bugs
Take:
#define vector __vector
vector float f(vector float a, vector float b, vector float c)
{
return a * b + c;
}
--- CUT ---
Currently for Powerpc (with -O2 -maltivec), we get:
vspltisw 0,-1
vslw 0,0,0
vmaddfp 3,2,3,0
vaddfp 2,3,4
But this should really just produce:
vmaddfp 2,2,3,4
--
Summary: vector float * vector float + vector float should
produce only vmaddfp
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
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=40030
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug target/40030] vector float * vector float + vector float should produce only vmaddfp
2009-05-05 18:03 [Bug target/40030] New: vector float * vector float + vector float should produce only vmaddfp pinskia at gcc dot gnu dot org
@ 2009-05-05 18:03 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-05-05 18:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2009-05-05 18:03 -------
Another testcase but using intrinsics:
#include <altivec.h>
vector float f(vector float a, vector float b, vector float c)
{
vector float d = (vector float)(-0.0f);
return vec_add (c, vec_madd (a, b, d));
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40030
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-05-05 18:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-05 18:03 [Bug target/40030] New: vector float * vector float + vector float should produce only vmaddfp pinskia at gcc dot gnu dot org
2009-05-05 18:03 ` [Bug target/40030] " 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).