[Bug target/112454] csinc (csel is though) is not being used when there is matches twice

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Nov 9 17:57:28 GMT 2023


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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
here is another testcase which shows the issue with pulling the constant one
out of the loop when it could have been merged with the csel to use csinc:
```
int f(int *a, int n, int *b, int d)
{
  for(int i = 0; i < n; i++)
    b[i] = a[i] == 100 ? 1 : d;
  return 0;
}
```


More information about the Gcc-bugs mailing list