https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120830

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This looks wrong:
  else if (CONST_VECTOR_P (op))
    {
      rtx first = XVECEXP (op, 0, 0);
      for (int i = 1; i < nunits; ++i)
        {
          rtx tmp = XVECEXP (op, 0, i);
          /* Vector duplicate value.  */
          if (!rtx_equal_p (tmp, first))
            return nullptr;
        }
      *scalar_mode_p = GET_MODE (first);
      *insn_p = nullptr;
      return first;
    }


A const_vector can full of const_int which have a mode of VOIDmode. So the
scalar mode should be the inner mode of the op rather than the mode of the
first element of the const_vector.

But I am not sure this is the problem.

Reply via email to