aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/powerpc/pr43154.c
blob: eb1919743b5cb8b8b175b641a0f89bacf60a9908 (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
/* { dg-do compile { target { powerpc*-*-* } } } */
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
/* { dg-skip-if "" { powerpc*le-*-* } { "*" } { "" } } */
/* { 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);
}