blob: 1a08618b367483d304416e572963540e4de0cf9e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
/* Verify that overloaded built-ins for vec_abs with float and
double inputs for VSX produce the right results. */
/* { dg-do compile } */
/* { dg-require-effective-target powerpc_vsx_ok } */
/* { dg-options "-mvsx -O2" } */
#include <altivec.h>
vector float
test1 (vector float x)
{
return vec_abs (x);
}
vector double
test2 (vector double x)
{
return vec_abs (x);
}
/* { dg-final { scan-assembler-times "xvabssp" 1 } } */
/* { dg-final { scan-assembler-times "xvabsdp" 1 } } */
|