[Bug tree-optimization/105175] [12 Regression] Pointless warning about missed vector optimization

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Apr 6 08:49:47 GMT 2022


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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
So vectorizable_operation correctly says target_support_p == false and then
goes
on with

      target_support_p = (optab_handler (optab, vec_mode)
                          != CODE_FOR_nothing);
    }

  bool using_emulated_vectors_p = vect_emulated_vector_p (vectype);
  if (!target_support_p)
    {
      if (dump_enabled_p ())
        dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
                         "op not supported by target.\n");
      /* Check only during analysis.  */
      if (maybe_ne (GET_MODE_SIZE (vec_mode), UNITS_PER_WORD)
          || (!vec_stmt && !vect_can_vectorize_without_simd_p (code)))
        return false;
      if (dump_enabled_p ())
        dump_printf_loc (MSG_NOTE, vect_location,
                         "proceeding using word mode.\n");
      using_emulated_vectors_p = true;

using emulated (word-mode) vectors.  In the end it will still emit code
using v2si types which will have V2SImode.  For those it will rely on
vector lowering to perform this very lowering.

So the vectorization works as desired and the lowering as well.  But I agree
the diagnostic in this case is questionable.


More information about the Gcc-bugs mailing list