blob: efad62cca9fdd37b3c084f43c9ccb4cd5f74d027 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
/* { dg-require-effective-target powerpc_vsx_ok } */
/* { dg-options "-O2 -mvsx" } */
#include <altivec.h>
double
add_double_0 (vector double *p, double x)
{
return vec_extract (*p, 0) + x;
}
double
add_double_1 (vector double *p, double x)
{
return vec_extract (*p, 1) + x;
}
long
add_long_0 (vector long *p, long x)
{
return vec_extract (*p, 0) + x;
}
long
add_long_1 (vector long *p, long x)
{
return vec_extract (*p, 1) + x;
}
/* { dg-final { scan-assembler-not "lxvd2x" } } */
/* { dg-final { scan-assembler-not "lxvw4x" } } */
/* { dg-final { scan-assembler-not "lxvx" } } */
/* { dg-final { scan-assembler-not "lxv" } } */
/* { dg-final { scan-assembler-not "lvx" } } */
/* { dg-final { scan-assembler-not "xxpermdi" } } */
|