1  /* { dg-do run } */
       2  /* { dg-options "-O3 -mpower8-vector -Wno-psabi" } */
       3  /* { dg-require-effective-target p8vector_hw } */
       4  
       5  #ifndef CHECK_H
       6  #define CHECK_H "sse2-check.h"
       7  #endif
       8  
       9  #include CHECK_H
      10  
      11  #ifndef TEST
      12  #define TEST sse2_test_psllq_2
      13  #endif
      14  
      15  #include <emmintrin.h>
      16  
      17  #ifdef _ARCH_PWR8
      18  static __m128i
      19  __attribute__((noinline, unused))
      20  test (__m128i s1, __m128i c)
      21  {
      22    return _mm_sll_epi64 (s1, c); 
      23  }
      24  #endif
      25  
      26  static void
      27  TEST (void)
      28  {
      29  #ifdef _ARCH_PWR8
      30    union128i_q u, s, c;
      31    long long e[2] = {0};
      32    int i;
      33   
      34    s.x = _mm_set_epi64x (-1, 0xf);
      35    c.x = _mm_set_epi64x (60,50);
      36  
      37    __asm("" : "+v"(s.x), "+v"(c.x));
      38    u.x = test (s.x, c.x);
      39  
      40    if (c.a[0] < 64)
      41      for (i = 0; i < 2; i++)
      42        e[i] = s.a[i] << c.a[0]; 
      43  
      44    if (check_union128i_q (u, e))
      45      abort (); 
      46  #endif
      47  }