Rebased all three patches and made some small changes to the second one: - removed sub and abd optabs from commutative_optab_p, I suspect this was a copy paste mistake, - removed what I believe to be a superfluous switch case in vectorizable conversion, the one that was here: + if (code.is_fn_code ()) + { + internal_fn ifn = as_internal_fn (code.as_fn_code ()); + int ecf_flags = internal_fn_flags (ifn); + gcc_assert (ecf_flags & ECF_MULTI); + + switch (code.as_fn_code ()) + { + case CFN_VEC_WIDEN_PLUS: + break; + case CFN_VEC_WIDEN_MINUS: + break; + case CFN_LAST: + default: + return false; + } + + internal_fn lo, hi; + lookup_multi_internal_fn (ifn, &lo, &hi); + *code1 = as_combined_fn (lo); + *code2 = as_combined_fn (hi); + optab1 = lookup_multi_ifn_optab (lo, !TYPE_UNSIGNED (vectype)); + optab2 = lookup_multi_ifn_optab (hi, !TYPE_UNSIGNED (vectype)); } I don't think we need to check they are a specfic fn code, as we look-up optabs and if they succeed then surely we can vectorize? OK for trunk? Kind regards, Andre