(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
powerpc/
sse2-psrlq-1.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_1
      13  #endif
      14  
      15  #define N 60
      16  
      17  #include <emmintrin.h>
      18  
      19  #ifdef _ARCH_PWR8
      20  static __m128i
      21  __attribute__((noinline, unused))
      22  test (__m128i s1)
      23  {
      24    return _mm_srli_epi64 (s1, N); 
      25  }
      26  #endif
      27  
      28  static void
      29  TEST (void)
      30  {
      31  #ifdef _ARCH_PWR8
      32    union128i_q u, s;
      33    long long e[2] = {0};
      34    unsigned long long tmp;
      35    int i;
      36   
      37    s.x = _mm_set_epi64x (-1, 0xf);
      38  
      39    u.x = test (s.x);
      40  
      41    if (N < 64)
      42      for (i = 0; i < 2; i++) {
      43        tmp = s.a[i]; 
      44        e[i] = tmp >> N;
      45      }
      46  
      47    if (check_union128i_q (u, e))
      48      abort (); 
      49  #endif
      50  }