1 /* { dg-do compile } */
2 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
3 /* { dg-skip-if "" { powerpc*le-*-* } } */
4 /* { dg-require-effective-target powerpc_vsx_ok } */
5 /* { dg-options "-O3 -mdejagnu-cpu=power7 -mabi=altivec -ffast-math -fno-unroll-loops" } */
6 /* { dg-final { scan-assembler-times "xvaddsp" 3 } } */
7 /* { dg-final { scan-assembler-times "xvminsp" 3 } } */
8 /* { dg-final { scan-assembler-times "xvmaxsp" 3 } } */
9 /* { dg-final { scan-assembler-times "xxsldwi" 6 } } */
10 /* { dg-final { scan-assembler-times "xscvspdp" 3 } } */
11 /* { dg-final { scan-assembler-not "stvewx" } } */
12 /* { dg-final { scan-assembler-not "stvx" } } */
13 /* { dg-final { scan-assembler-not "stxvd2x" } } */
14 /* { dg-final { scan-assembler-not "stxvw4x" } } */
22 float values
[SIZE
] __attribute__((__aligned__(32)));
30 for (i
= 0; i
< SIZE
; i
++)
40 float min
= values
[0];
42 for (i
= 0; i
< SIZE
; i
++)
43 min
= __builtin_fminf (min
, values
[i
]);
52 float max
= values
[0];
54 for (i
= 0; i
< SIZE
; i
++)
55 max
= __builtin_fmaxf (max
, values
[i
]);