Merge -r 127928:132243 from trunk
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / paired-2.c
blobef409027fd2cf370377c0d365d73fd942d4a4860
1 /* { dg-do compile { target powerpc-*-linux*paired* } } */
2 /* { dg-options "-mpaired -m32 -ffinite-math-only" } */
4 /* Test PowerPC PAIRED extensions. */
6 #include <paired.h>
7 #include <stdlib.h>
9 static float out[2] __attribute__ ((aligned (8)));
11 vector float b = { 3.0, 8.0 };
12 vector float c = { 3.0, 5.0 };
14 vector float a = { 0.0, 0.0 };
15 void
16 test_api ()
19 if (paired_cmpu0_eq (b, c))
21 a = paired_sub (b, c);
22 paired_stx (a, 0, out);
25 if ((out[1]) != 3.0)
26 abort ();
29 int
30 main ()
32 test_api ();
33 return (0);