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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
even for:
void foo(char *a, int n)
{
   int i;

   for (i=0; i<n; i++)
      a[i] = 0;

   for (i=0; i<n; i++)
      a[i] = 1;
}

We don't remove one of the memset's:

  _17 = (unsigned int) n_10(D);
  _5 = (sizetype) _17;
  __builtin_memset (a_11(D), 0, _5);
  __builtin_memset (a_11(D), 1, _5); [tail call]

Reply via email to