Debian Codegraph @

gcc/testsuite/gcc.target/powerpc/sse2-pmullw-1.c

raw
1 /* { dg-do run } */
2 /* { dg-options "-O3 -mvsx -Wno-psabi" } */
3 /* { dg-additional-options "-mdejagnu-cpu=power8" { target { ! has_arch_pwr8 } } } */
4 /* { dg-require-effective-target p8vector_hw } */
5
6 #define NO_WARN_X86_INTRINSICS 1
7
8 #ifndef CHECK_H
9 #define CHECK_H "sse2-check.h"
10 #endif
11
12 #include CHECK_H
13
14 #ifndef TEST
15 #define TEST sse2_test_pmullw_1
16 #endif
17
18 #include <emmintrin.h>
19
20 static __m128i
21 __attribute__((noinline, unused))
22 test (__m128i s1, __m128i s2)
23 {
24 __asm("" : "+v"(s1), "+v"(s2));
25 return _mm_mullo_epi16 (s1, s2);
26 }
27
28 static void
29 TEST (void)
30 {
31 union128i_w u, s1, s2;
32 short e[8];
33 int i, tmp;
34
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);
38
39 for (i = 0; i < 8; i++)
40 {
41 tmp = s1.a[i] * s2.a[i];
42
43 e[i] = tmp;
44 }
45
46 if (check_union128i_w (u, e))
47 abort ();
48 }