(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
powerpc/
sse2-psrlq-2.c
       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_psrlq_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_srl_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    unsigned long long tmp;
      33    int i;
      34   
      35    s.x = _mm_set_epi64x (-1, 0xf);
      36    c.x = _mm_set_epi64x (60,50);
      37  
      38    __asm("" : "+v"(s.x), "+v"(c.x));
      39    u.x = test (s.x, c.x);
      40  
      41    if (c.a[0] < 64)
      42      for (i = 0; i < 2; i++){
      43        tmp = s.a[i];
      44        e[i] =tmp >> c.a[0];
      45      } 
      46  
      47    if (check_union128i_q (u, e))
      48      abort (); 
      49  #endif
      50  }