* gcc.target/powerpc/builtins-1-be.c <vclzb>: Rename duplicate test
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / sse2-psllq-1.c
blob06904c50217bdd07d4c72f2cc83dfb7cdcb67221
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 #ifndef CHECK_H
7 #define CHECK_H "sse2-check.h"
8 #endif
10 #include CHECK_H
12 #ifndef TEST
13 #define TEST sse2_test_psllq_1
14 #endif
16 #define N 60
18 #include <emmintrin.h>
20 #ifdef _ARCH_PWR8
21 static __m128i
22 __attribute__((noinline, unused))
23 test (__m128i s1)
25 return _mm_slli_epi64 (s1, N);
27 #endif
29 static void
30 TEST (void)
32 #ifdef _ARCH_PWR8
33 union128i_q u, s;
34 long long e[2] = {0};
35 int i;
37 s.x = _mm_set_epi64x (-1, 0xf);
39 u.x = test (s.x);
41 if (N < 64)
42 for (i = 0; i < 2; i++)
43 e[i] = s.a[i] << N;
45 if (check_union128i_q (u, e))
46 abort ();
47 #endif