[RS6000] Tests that use int128_t and -m32
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / sse2-psllq-2.c
blob253793e1932dbd55ab97be27acc604c79c3bd3e4
1 /* { dg-do run } */
2 /* { dg-options "-O3 -mpower8-vector -Wno-psabi" } */
3 /* { dg-require-effective-target p8vector_hw } */
5 #ifndef CHECK_H
6 #define CHECK_H "sse2-check.h"
7 #endif
9 #include CHECK_H
11 #ifndef TEST
12 #define TEST sse2_test_psllq_2
13 #endif
15 #include <emmintrin.h>
17 #ifdef _ARCH_PWR8
18 static __m128i
19 __attribute__((noinline, unused))
20 test (__m128i s1, __m128i c)
22 return _mm_sll_epi64 (s1, c);
24 #endif
26 static void
27 TEST (void)
29 #ifdef _ARCH_PWR8
30 union128i_q u, s, c;
31 long long e[2] = {0};
32 int i;
34 s.x = _mm_set_epi64x (-1, 0xf);
35 c.x = _mm_set_epi64x (60,50);
37 __asm("" : "+v"(s.x), "+v"(c.x));
38 u.x = test (s.x, c.x);
40 if (c.a[0] < 64)
41 for (i = 0; i < 2; i++)
42 e[i] = s.a[i] << c.a[0];
44 if (check_union128i_q (u, e))
45 abort ();
46 #endif