12088Ssos/* { dg-do run } */
2228976Suqs/* { dg-options "-O2 -msse2" } */
32088Ssos/* { dg-require-effective-target sse2 } */
42088Ssos
52088Ssos#ifndef CHECK_H
62088Ssos#define CHECK_H "sse2-check.h"
72088Ssos#endif
82088Ssos
95994Ssos#ifndef TEST
105994Ssos#define TEST sse2_test
112088Ssos#endif
122088Ssos
132088Ssos#include CHECK_H
142088Ssos
1597748Sschweikh#include <emmintrin.h>
162088Ssos
172088Ssosstatic __m128i
182088Ssos__attribute__((noinline, unused))
192088Ssostest (__m128i s1, __m128i c)
202088Ssos{
212088Ssos  return _mm_sll_epi32 (s1, c);
222088Ssos}
232088Ssos
242088Ssosstatic void
252088SsosTEST (void)
262088Ssos{
272088Ssos  union128i_d u, s;
282088Ssos  union128i_q c;
29114601Sobrien  int e[4] = {0};
30114601Sobrien  int i;
3129603Scharnier
322088Ssos  s.x = _mm_set_epi32 (2, -3, 0x7000, 0x9000);
3329603Scharnier  c.x = _mm_set_epi64x (12, 23);
342088Ssos
3529603Scharnier  u.x = test (s.x, c.x);
363864Sswallace
3729603Scharnier  if (c.a[0] < 32)
3842505Syokota    for (i = 0; i < 4; i++)
3966834Sphk      e[i] = s.a[i] << c.a[0];
4066834Sphk
41267540Sray  if (check_union128i_d (u, e))
422088Ssos    abort ();
432088Ssos}
442088Ssos