summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/pr43154.c
blob: d083e977b2fd972d23bc7fb28093dd087f8d7e77 (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
/* { dg-do compile { target { powerpc*-*-* } } } */
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
/* { dg-require-effective-target powerpc_vsx_ok } */
/* { dg-options "-O2 -mcpu=power7" } */

/* Make sure that vec_mergel and vec_mergeh are supported for V2DF/V2DI types.  */
/* { dg-final { scan-assembler-times "xxpermdi" 4 } } */

#include <altivec.h>

void vec_high_v2df (vector double *a, vector double *b, vector double *c)
{
  *a = vec_mergeh (*b, *c);
}

void vec_low_v2df (vector double *a, vector double *b, vector double *c)
{
  *a = vec_mergel (*b, *c);
}

void vec_high_v2di (vector long long *a, vector long long *b, vector long long *c)
{
  *a = vec_mergeh (*b, *c);
}

void vec_low_v2di (vector long long *a, vector long long *b, vector long long *c)
{
  *a = vec_mergel (*b, *c);
}