Use conditional internal functions in if-conversion
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / sse2-pmullw-1.c
blob3dca01ab3a8d3c296f1cb3674a060ccf6b68b79a
1 /* { dg-do run } */
2 /* { dg-options "-O3 -mpower8-vector -Wno-psabi" } */
3 /* { dg-require-effective-target lp64 } */
4 /* { dg-require-effective-target p8vector_hw } */
6 #define NO_WARN_X86_INTRINSICS 1
8 #ifndef CHECK_H
9 #define CHECK_H "sse2-check.h"
10 #endif
12 #include CHECK_H
14 #ifndef TEST
15 #define TEST sse2_test_pmullw_1
16 #endif
18 #include <emmintrin.h>
20 static __m128i
21 __attribute__((noinline, unused))
22 test (__m128i s1, __m128i s2)
24 __asm("" : "+v"(s1), "+v"(s2));
25 return _mm_mullo_epi16 (s1, s2);
28 static void
29 TEST (void)
31 union128i_w u, s1, s2;
32 short e[8];
33 int i, tmp;
35 s1.x = _mm_set_epi16 (10,2067,-3033,90,80,40,-1000,15);
36 s2.x = _mm_set_epi16 (11, 9834, 7444, -10222, 34, -7833, 39, 14);
37 u.x = test (s1.x, s2.x);
39 for (i = 0; i < 8; i++)
41 tmp = s1.a[i] * s2.a[i];
43 e[i] = tmp;
46 if (check_union128i_w (u, e))
47 abort ();