https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81478
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2017-07-19 Summary|By default, GCC emits a |By default, GCC emits a |function call for complex |function call for complex |multiplication |multiplication, should | |partially inline that Ever confirmed|0 |1 --- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- Confirmed. It shouldn't be very difficult to do, gcc/tree-complex.c:expand_complex_multiplication would need to emit if (isnan(rr) || isnan(ri)) <expand_complex_libcall>. Unless we want to optimize the corner case futher by skipping the multiplication in the libcall in which case we need a new entry in libgcc. Note that the same optimization applies to division.