>>>If the pattern is not allowed to fail, then what code enforces the bias >>>argument's restrictions? I don't see it in the generic expander code. > > I have no ideal since this is just copied from len_load/len_store which is > s390 target dependent stuff. > > I have sent V7 patch with fixing doc by following your suggestion. >
We have: signed char internal_len_load_store_bias (internal_fn ifn, machine_mode mode) { optab optab = direct_internal_fn_optab (ifn); insn_code icode = direct_optab_handler (optab, mode); if (icode != CODE_FOR_nothing) { /* For now we only support biases of 0 or -1. Try both of them. */ if (insn_operand_matches (icode, 3, GEN_INT (0))) return 0; if (insn_operand_matches (icode, 3, GEN_INT (-1))) return -1; } return VECT_PARTIAL_BIAS_UNSUPPORTED; } This is used here: static bool vect_verify_loop_lens (loop_vec_info loop_vinfo) { [..] signed char partial_load_bias = internal_len_load_store_bias (IFN_LEN_LOAD, len_load_mode); signed char partial_store_bias = internal_len_load_store_bias (IFN_LEN_STORE, len_store_mode); gcc_assert (partial_load_bias == partial_store_bias); if (partial_load_bias == VECT_PARTIAL_BIAS_UNSUPPORTED) return false; /* If the backend requires a bias of -1 for LEN_LOAD, we must not emit len_loads with a length of zero. In order to avoid that we prohibit more than one loop length here. */ if (partial_load_bias == -1 && LOOP_VINFO_LENS (loop_vinfo).length () > 1) return false; Regards Robin