[Bug tree-optimization/126417] [17 Regression] Incorrect floating-point re-association

"rguenth at gcc dot gnu.org via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126417

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
           Keywords|                            |wrong-code
      Known to work|                            |16.1.1
   Target Milestone|---                         |17.0
            Summary|Incorrect floating-point    |[17 Regression] Incorrect
                   |re-association              |floating-point
                   |                            |re-association
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2026-07-27

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Huh.  I must somehow mis-written the in-order requirement check.  Yep:

      /* Two-element reductions do not need special-handling for fold-left,
         other cases are not yet implemented.  remain_defs also have to
         be included here.  */  
      || (needs_fold_left_reduction_p (TREE_TYPE (vectype), reduc_code)
          && (!instance->remain_defs.is_empty ()
              || maybe_ne (TYPE_VECTOR_SUBPARTS (vectype), 2u))))

of course I need to check the total number of lanes here.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.