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 } */
7 #define CHECK_H "sse2-check.h"
13 #define TEST sse2_test_psllw_1
16 #include <emmintrin.h>
18 #define TEST_FUNC(id, N) \
20 __attribute__((noinline, unused)) \
21 test##id (__m128i s1) \
23 return _mm_slli_epi16 (s1, N); \
33 TEST_FUNC(neg128
, -128)
35 #define TEST_CODE(id, N) \
40 s.x = _mm_set_epi16 (1, 2, 3, 4, 5, 6, 0x7000, 0x9000); \
41 u.x = test##id (s.x); \
42 if (N >= 0 && N < 16) \
43 for (i = 0; i < 8; i++) \
44 e[i] = s.a[i] << (N * (N >= 0)); \
45 if (check_union128i_w (u, e)) \
56 TEST_CODE(neg16
, -16);
57 TEST_CODE(neg32
, -32);
58 TEST_CODE(neg64
, -64);
59 TEST_CODE(neg128
, -128);