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

            Bug ID: 122938
           Summary: vect: No fallback to non-partial vect when
                    IFN_LEN_FOLD_EXTRACT_LAST is available.
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rdapp at gcc dot gnu.org
  Target Milestone: ---
            Target: riscv

Haven't done any analysis, just filing for bookkeeping so I have something to
refer to in the source (not yet upstream).

When riscv VLS modes for load/store and len_fold_extract_last in particular are
available vect/vect-cond-2.c is not vectorized anymore.

If the optab is not available we do

          else if (!nested_cycle_p)
            {
              if (dump_enabled_p ())
                dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
                                 "conditional reduction prevents the use"
                                 " of partial vectors.\n");
              LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo) = false;

and fall back to non-partial vectors, vectorizing the loop.

If it is available we fail to analyze a part of the reduction and give up.
Will fill in more information here once I get to it.

Reply via email to