libstdc++: Remove std::__is_pointer and std::__is_scalar [PR115497]
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / swaps-p8-23.c
blob83533d1bf4dae48c185a83c10645a4156d73a5de
1 /* { dg-do compile { target le } } */
2 /* { dg-options "-mdejagnu-cpu=power8 -mvsx -O3 -ffast-math" } */
3 /* { dg-require-effective-target powerpc_vsx } */
4 /* { dg-final { scan-assembler "lxvd2x" } } */
5 /* { dg-final { scan-assembler-not "xxpermdi" { target le } } } */
7 /* Verify that swap optimization works correctly in the presence of
8 a V2DFmode reduction. */
10 extern double optvalue;
11 extern void obfuscate (double, unsigned int);
13 void
14 foo (double *x, double *y, unsigned int n, unsigned int m)
16 unsigned int i, j;
17 double sacc;
18 for (j = 0; j < m; ++j)
20 sacc = 0.0;
21 for (i = 0; i < n; ++i)
22 sacc += x[i] * y[i];
23 obfuscate (sacc, n);
25 optvalue = n * 2.0 * m;