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

--- Comment #2 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> 
---
FWIW, it doesn't look like this is specific to POLY_INT_CST.
A gimple reproducer shows a similar thing:

void __GIMPLE (ssa, startwith("vrp2"))
foo (volatile int *x)
{
  int i;

__BB(2):
  goto __BB3;

__BB(3):
  i_1 = __PHI (__BB2: 0, __BB4: i_2);
  *x = i_1;
  i_2 = i_1 + 1;
  if (i_2 != 2)
    goto __BB4;
  else
    goto __BB5;

__BB(4):
  goto __BB3;

__BB(5):
  return;
}

It works with a bound of 3 rather than 2.

Reply via email to