This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, x86] Use vector moves in memmove expanding


> Changes were checked into trunk:
> http://gcc.gnu.org/ml/gcc-cvs/2013-07/msg00179.html

The patch miscompiles the MPFR library on x86 Pentium Pro.  Reduced testcase 
attached, compile for x86 with -mtune=pentiumpro.

-- 
Eric Botcazou
static void __attribute__((noinline, noclone))
my_memcpy (char *dest, const char *src, int n)
{
  __builtin_memcpy (dest, src, n);
}

int
main (void)
{
  char a1[4], a2[4];
  __builtin_memset (a1, 'a', 4);
  __builtin_memset (a2, 'b', 4);
  my_memcpy (a2, a1, 4);
  if (a2[0] != 'a')
    __builtin_abort ();
  return 0;
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]