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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #3)
> 08:57 < richi> jakub: can we delay scatter/gather store recog to 
>                vectorizable_store/load, thus always detect the dataref
> pattern 
>                but only later decide if we can vectorize it?
> 08:58 < richi> jakub: this way we could also decide, based on cost, to do 
>                strided accesses / vector construction instead (might be 
>                profitable for V2DF for example)

Had a look at this, and I doubt it is possible, while the
          gather_scatter_info gs_info;
          if (!vect_check_gather_scatter (stmt_info,
                                          as_a <loop_vec_info> (vinfo),
                                          &gs_info)
              || !get_vectype_for_scalar_type (TREE_TYPE (gs_info.offset)))
            return opt_result::failure_at
              (stmt_info->stmt,
               (gatherscatter == GATHER) ?
               "not vectorized: not suitable for gather load %G" :
               "not vectorized: not suitable for scatter store %G",
               stmt_info->stmt);
hunk could be moved from vect_analyze_data_refs slightly later, I'm afraid we
need it already in vect_mark_stmts_to_be_vectorized so that we can call
process_use there.  And that call is still in the fatal = true; area
(furthermore, for SLP we don't really call that).

Reply via email to