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" } */
9 *memcpy1(void *dest
, const void *src
)
11 return __builtin_memcpy (dest
, src
, 700);
16 *memcpy2(void *dest
, const void *src
)
18 return __builtin_memcpy (dest
, src
, 0);
23 *memcpy3(void *dest
, const void *src
)
25 return __builtin_memcpy (dest
, src
, 256);
30 *memcpy4(void *dest
, const void *src
)
32 return __builtin_memcpy (dest
, src
, 512);
37 *memcpy5(void *dest
, const void *src
)
39 return __builtin_memcpy (dest
, src
, 768);
42 /* Loop with 2 MVCs */
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 } } */