Use conditional internal functions in if-conversion
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / p9-lxvx-stxvx-1.c
blob0956420b59c9d580408cc245b38485646e90bf14
1 /* { dg-do compile { target { powerpc64le-*-* } } } */
2 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
3 /* { dg-require-effective-target powerpc_p9vector_ok } */
4 /* { dg-options "-mcpu=power9 -O3" } */
5 /* { dg-final { scan-assembler "lxvx" } } */
6 /* { dg-final { scan-assembler "stxvx" } } */
7 /* { dg-final { scan-assembler-not "lxvd2x" } } */
8 /* { dg-final { scan-assembler-not "stxvd2x" } } */
9 /* { dg-final { scan-assembler-not "xxpermdi" } } */
11 /* Verify P9 vector loads and stores are used rather than the
12 load-swap/swap-store workarounds for P8. */
13 #define N 16
15 signed char ca[N] __attribute__((aligned(16)));
16 signed char cb[] __attribute__((aligned(16)))
17 = {8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7};
18 signed char cc[] __attribute__((aligned(16)))
19 = {1, 1, 2, 2, 3, 3, 2, 2, 1, 1, 0, 0, -1, -1, -2, -2};
21 __attribute__((noinline)) void foo ()
23 int i;
24 for (i = 0; i < N; i++) {
25 ca[i] = cb[i] - cc[i];