gcc/testsuite/gcc.target/powerpc/ppc-vector-memcpy.c
raw| 1 | /* { dg-do compile { target powerpc*-*-* } } */ |
| 2 | /* { dg-options "-O -maltivec -mno-vsx" } */ |
| 3 | /* { dg-require-effective-target powerpc_altivec } */ |
| 4 | /* { dg-final { scan-assembler "lvx" } } */ |
| 5 | |
| 6 | #include <string.h> |
| 7 | |
| 8 | void bar (int *); |
| 9 | |
| 10 | void foo(void) |
| 11 | { |
| 12 | extern int x[8] __attribute__((aligned(128))); |
| 13 | int y[8] __attribute__((aligned(128))); |
| 14 | memcpy (y, x, sizeof (x)); |
| 15 | bar (y); |
| 16 | } |