gcc/ChangeLog:
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / swaps-p8-26.c
blob28ce1cd39e45e25513830405030e4a61383a670c
1 /* { dg-do compile { target { powerpc64le-*-* } } } */
2 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
3 /* { dg-options "-mcpu=power8 -O3 " } */
4 /* { dg-final { scan-assembler-times "lxvd2x" 2 } } */
5 /* { dg-final { scan-assembler "stxvd2x" } } */
6 /* { dg-final { scan-assembler-not "xxpermdi" } } */
8 /* Verify that swap optimization does not interfere with unaligned
9 loads and stores. */
11 /* Test case to resolve PR79044. */
13 #include <altivec.h>
15 void pr79044 (float *x, float *y, float *z)
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);