https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77579
Bug ID: 77579
Summary: Missed multiple add (int) for CSEd case
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: pinskia at gcc dot gnu.org
Target Milestone: ---
Target: aarch64*-*-*
Take:
float g(float);
void f(float x, float y, float z, float *s)
{
float t = y * z;
s[0] = t+x;
s[1] = x - t;
}
--- CUT ---
This works at -O2. Now if you change float to int (-Dfloat=int), we don't get
madd/msub but if we disable either stores, we do get them.
This might be solved by changing "madd<mode>" to "fma<mode>4" (and making sure
the correct order of the operands). Obviously I have not tried it yet and
might not have time any time soon.