Debian Codegraph @

gcc/testsuite/gcc.target/powerpc/p8vector-vectorize-2.c

raw
1 /* { dg-do compile { target { powerpc*-*-* } } } */
2 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
3 /* { dg-options "-mdejagnu-cpu=power8 -mvsx -O2 -ftree-vectorize -fvect-cost-model=dynamic" } */
4 /* { dg-require-effective-target powerpc_vsx } */
5
6 #include <stddef.h>
7
8 #ifndef SIZE
9 #define SIZE 1024
10 #endif
11
12 #ifndef ALIGN
13 #define ALIGN 32
14 #endif
15
16 #define ALIGN_ATTR __attribute__((__aligned__(ALIGN)))
17
18 long long sign_ll[SIZE] ALIGN_ATTR;
19 int sign_i [SIZE] ALIGN_ATTR;
20
21 void copy_int_to_long_long (void)
22 {
23 size_t i;
24
25 for (i = 0; i < SIZE; i++)
26 sign_ll[i] = sign_i[i];
27 }
28
29 /* { dg-final { scan-assembler "vupkhsw" } } */
30 /* { dg-final { scan-assembler "vupklsw" } } */