Debian Codegraph @

gcc/testsuite/gcc.target/powerpc/swaps-p8-26.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-mdejagnu-cpu=power8 -mvsx -O3 " } */
3 /* { dg-require-effective-target powerpc_vsx } */
4 /* { dg-final { scan-assembler-times "lxvd2x" 2 } } */
5 /* { dg-final { scan-assembler "stxvd2x" } } */
6 /* { dg-final { scan-assembler-not "xxpermdi" } } */
7
8 /* Verify that swap optimization does not interfere with unaligned
9 loads and stores. */
10
11 /* Test case to resolve PR79044. */
12
13 #include <altivec.h>
14
15 void pr79044 (float *x, float *y, float *z)
16 {
17 vector float a = __builtin_vec_xl (0, x);
18 vector float b = __builtin_vec_xl (0, y);
19 vector float c = __builtin_vec_mul (a, b);
20 __builtin_vec_xst (c, 0, z);
21 }