aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/powerpc/paired-1.c
blob: 19a66a15b30b20a1a94b4b12cdcd9471a0a43536 (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
/* { dg-do compile { target { powerpc-*-linux*paired* && ilp32} } } */
/* { dg-options "-mpaired -ffinite-math-only " } */

/* Test PowerPC PAIRED extensions.  */

#include <paired.h>

static float in1[2] __attribute__ ((aligned (8))) =
{6.0, 7.0};
static float in2[2] __attribute__ ((aligned (8))) =
{4.0, 3.0};

static float out[2] __attribute__ ((aligned (8)));

vector float a, b, c, d;
void
test_api ()
{
  b = paired_lx (0, in1);
  c = paired_lx (0, in2);

  a = paired_sub (b, c);

  paired_stx (a, 0, out);
}

int
main ()
{
  test_api ();
  return (0);
}