Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.target / s390 / memcpy-1.c
blob58c1b490b6724a3af8d475f50b4ba78f0f57902e
1 /* Make sure that short memcpy's with constant length are emitted
2 without loop statements. */
4 /* { dg-do compile } */
5 /* { dg-options "-O3 -mzarch" } */
7 /* 3 MVCs */
8 void
9 *memcpy1(void *dest, const void *src)
11 return __builtin_memcpy (dest, src, 700);
14 /* NOP */
15 void
16 *memcpy2(void *dest, const void *src)
18 return __builtin_memcpy (dest, src, 0);
21 /* 1 MVC */
22 void
23 *memcpy3(void *dest, const void *src)
25 return __builtin_memcpy (dest, src, 256);
28 /* 2 MVCs */
29 void
30 *memcpy4(void *dest, const void *src)
32 return __builtin_memcpy (dest, src, 512);
35 /* 3 MVCs */
36 void
37 *memcpy5(void *dest, const void *src)
39 return __builtin_memcpy (dest, src, 768);
42 /* Loop with 2 MVCs */
43 void
44 *memcpy6(void *dest, const void *src)
46 return __builtin_memcpy (dest, src, 1537);
49 /* memcpy6 uses a loop - check for the two load address instructions
50 used to increment src and dest. */
51 /* { dg-final { scan-assembler-times "la" 2 } } */
53 /* { dg-final { scan-assembler-times "mvc" 11 } } */