[Bug tree-optimization/70291] New: muldc3 code generation could be smarter
ramana at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Mar 18 12:43:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70291
Bug ID: 70291
Summary: muldc3 code generation could be smarter
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: ramana at gcc dot gnu.org
Target Milestone: ---
__complex double x;
__complex double y;
__complex double z;
double a, b, c, d;
int main (void)
{
x = y * z;
return 0;
}
Could well be implemented as:
int main (void)
{
x = y * z;
if (isnan (__real x) && isnan (__imag__ x))
x = __muldc3 (y, z);
return 0;
}
essentially opencoding this as the standard suggests in G.5.1 => 6for C99.
spotted while looking at profiles that were reported on aarch64 with code
compiled at O2 / O3.
I note that lowering this in this form in tree-complex.c will need a bit of
book-keeping given that it's sort of bounded on the phi nodes and ssa_names
before lowering begins but this could well be another math-optimization done
later rather than munging it with the existing lowering.
More information about the Gcc-bugs
mailing list