[Bug tree-optimization/126695] New: Drop a redundant nested fmin or fmax

"ktkachov 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=126695

            Bug ID: 126695
           Summary: Drop a redundant nested fmin or fmax
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Keywords: easyhack, missed-optimization
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ktkachov at gcc dot gnu.org
  Target Milestone: ---

double f (double x, double y)
  { return __builtin_fmin (__builtin_fmin (x, y), y); }

Should generate on aarch64 just:
f:
        fminnm  d0, d0, d1
        ret
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.