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_pslld_1
16 #include <emmintrin.h>
18 #define TEST_FUNC(id, N) \
20 __attribute__((noinline, unused)) \
21 test##id (__m128i s1) \
23 return _mm_slli_epi32 (s1, N); \
34 TEST_FUNC(neg128
, -128)
36 #define TEST_CODE(id, N) \
41 s.x = _mm_set_epi32 (1, -2, 3, 4); \
42 u.x = test##id (s.x); \
43 if (N >= 0 && N < 32) \
44 for (i = 0; i < 4; i++) \
45 e[i] = s.a[i] << (N * (N >= 0)); \
46 if (check_union128i_d (u, e)) \
58 TEST_CODE(neg16
, -16);
59 TEST_CODE(neg32
, -32);
60 TEST_CODE(neg64
, -64);
61 TEST_CODE(neg128
, -128);