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

            Bug ID: 120823
           Summary: FOLD_LEFT_REDUCTION code generation cannot handle
                    calls
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

FOLD_LEFT_REDUCTION code generation has

  if (reduction_type == FOLD_LEFT_REDUCTION)
    {
      internal_fn reduc_fn = STMT_VINFO_REDUC_FN (reduc_info);
      gcc_assert (code.is_tree_code () || cond_fn_p);
      return vectorize_fold_left_reduction
...

so it cannot handle a reduction with an .FMA stmt.  STMT_VINFO_REDUC_CODE
is a PLUS_EXPR, so the question is why it looks at the original scalar
stmt code at all.

I defered thinking about this, thus this bug.

Reply via email to