> + if (ot_plus == unknown_optab > + || ot_minus == unknown_optab > + || optab_handler (ot_minus, TYPE_MODE (step_vectype)) == > CODE_FOR_nothing > + || optab_handler (ot_plus, TYPE_MODE (step_vectype)) == > + CODE_FOR_nothing) > return false; > > Won't optab_handler just return CODE_FOR_nothing for unknown_optab?
I was taking the check used in directly_supported_p return (optab != unknown_optab$ && optab_handler (optab, TYPE_MODE (type)) != CODE_FOR_nothing);$ > Anyway, I think best would be to write it as: > if (!target_supports_op_p (step_vectype, PLUS_EXPR, optab_default) > || !target_supports_op_p (step_vectype, MINUS_EXPR, optab_default)) > return false; Looks good to me. Patch attached. Tests running on gcc-11 on aarch64. Ok for 11 once tests come back?
0001-vect-loop-fix-build.patch
Description: 0001-vect-loop-fix-build.patch