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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note here is testcase that would show a missed lim on the gimple level due to
trapping:

```
#include <arm_sve.h>

#define vect4f __attribute__((vector_size(4*sizeof(float))))

svfloat32_t f(float a, int t, bool *b)
{
  svfloat32_t tt = svdup_f32(0.0);
  for (int i =0 ;i < t; i++)
  {
    if (b[i])
    tt = svadd_f32_z(svptrue_b32(),tt,svdup_f32(a));
  }
  return tt;
}

float f1(float a, int t, bool *b, float c)
{
  float tt = {};
  for (int i =0 ;i < t; i++)
  {
    if (b[i])
      tt += __builtin_assoc_barrier (-a);
  }
  return tt;
}
```

Compile with: "-O2 --param=lim-expensive=1 -march=armv8.5-a+sve2". So it is not
just about exceptions; it has an effect on LIM too.

Reply via email to