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

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Slightly simplified/cleaned up testcase:
/* { dg-do run } */
/* { dg-options "-O2 -fno-vect-cost-model" } */
/* { dg-additional-options "-mavx" { target avx_runtime } } */

struct S { int a; long b; int c; } s;

__attribute__((noipa)) struct S *
foo (void)
{
  return &s;
}

int
main ()
{
  struct S r = *foo ();
  long t = 10412095L - r.b;
  struct { long d; int e; } f[4] = { {}, {}, {}, { __LONG_MAX__, 0 } };
  for (unsigned i = 0; i < 4; ++i)
    if (t <= f[i].d)
      return f[i].e;
  __builtin_abort ();
}

Reply via email to