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

            Bug ID: 126487
           Summary: Another missing smin detection
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

Take:
```
unsigned
f1 (unsigned int a, unsigned tt)
{
  unsigned t = a;
  unsigned t1 = -1u;
  return a > __INT_MAX__ ? t : t1;
}
```


This should be detected as smin (a, -1).  LLVM is able to detect it.

Reply via email to