1 /* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
2 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
3 /* { dg-require-effective-target powerpc_altivec_ok } */
4 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power6" } } */
5 /* { dg-options "-O2 -ftree-vectorize -mcpu=power6 -maltivec" } */
6 /* { dg-final { scan-assembler "vsel" } } */
7 /* { dg-final { scan-assembler "vrfim" } } */
8 /* { dg-final { scan-assembler "vrfip" } } */
9 /* { dg-final { scan-assembler "vrfiz" } } */
15 float a
[SIZE
] __attribute__((__aligned__(32)));
16 float b
[SIZE
] __attribute__((__aligned__(32)));
17 float c
[SIZE
] __attribute__((__aligned__(32)));
18 float d
[SIZE
] __attribute__((__aligned__(32)));
19 float e
[SIZE
] __attribute__((__aligned__(32)));
21 extern float floorf (float);
22 extern float ceilf (float);
23 extern float truncf (float);
24 extern float copysignf (float, float);
31 for (i
= 0; i
< SIZE
; i
++)
40 for (i
= 0; i
< SIZE
; i
++)
49 for (i
= 0; i
< SIZE
; i
++)
54 vector_copysign (void)
58 for (i
= 0; i
< SIZE
; i
++)
59 a
[i
] = copysignf (b
[i
], c
[i
]);