https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116979
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> --- This changed in GCC 12 with r12-4240, with additional -ftree-vectorize flag with r12-1912 aka PR95045 fix when vec_addsubv2sf3 has been introduced. Before those, mul just wasn't vectorized at all, so widening_mul saw _12 = __r$_M_value$real_8 * _10; _13 = __r$_M_value$imag_9 * _11; _14 = __r$_M_value$real_8 * _11; _15 = __r$_M_value$imag_9 * _10; _16 = _12 - _13; _17 = _14 + _15; and turned that into _13 = __r$_M_value$imag_9 * _11; _15 = __r$_M_value$imag_9 * _10; _5 = -_13; _16 = .FMS (__r$_M_value$real_8, _10, _13); _17 = .FMA (__r$_M_value$real_8, _11, _15); So, 2 scalar multiplications, 2 scalar fmas. Now, vectorization turns that into vect__12.26_31 = vect___r__M_value_real_8.22_24 * vect__10.25_28; vect__10.34_40 = VEC_PERM_EXPR <vect__10.25_28, vect__10.25_28, { 1, 0 }>; vect__13.35_43 = vect___r__M_value_real_8.30_35 * vect__10.34_40; vect__4.36_44 = .VEC_ADDSUB (vect__12.26_31, vect__13.35_43); So 2 vector multiplications, one permutation and one addsub. Now, since r12-2051 we have the .VEC_FMADDSUB and .VEC_FMSUBADD ifns. Shall the widening_mul pass turn from that vect__12.26_31 = vect___r__M_value_real_8.22_24 * vect__10.25_28; ... vect__4.36_44 = .VEC_ADDSUB (vect__12.26_31, vect__13.35_43); into vect__4.36_44 = .VEC_FMADDSUB (vect___r__M_value_real_8.22_24, vect__10.25_28, vect__13.35_43); ?