On 6/19/23 00:56, Robin Dapp wrote:
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;
Ah.  That's not where I expected to find it.  Thanks for pointing it out.

Jeff

Reply via email to