1 /* { dg-do compile } */
2 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
3 /* { dg-require-effective-target powerpc_vsx_ok } */
4 /* { dg-options "-O3 -mdejagnu-cpu=power7 -mabi=altivec -ffast-math" } */
5 /* { dg-final { scan-assembler "xvadddp" } } */
6 /* { dg-final { scan-assembler "xvmindp" } } */
7 /* { dg-final { scan-assembler "xvmaxdp" } } */
15 double values
[SIZE
] __attribute__((__aligned__(32)));
23 for (i
= 0; i
< SIZE
; i
++)
33 double min
= values
[0];
35 for (i
= 0; i
< SIZE
; i
++)
36 min
= __builtin_fmin (min
, values
[i
]);
45 double max
= values
[0];
47 for (i
= 0; i
< SIZE
; i
++)
48 max
= __builtin_fmax (max
, values
[i
]);