(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
powerpc/
sse2-pmullw-1.c
       1  /* { dg-do run } */
       2  /* { dg-options "-O3 -mpower8-vector -Wno-psabi" } */
       3  /* { dg-require-effective-target p8vector_hw } */
       4  
       5  #define NO_WARN_X86_INTRINSICS 1
       6  
       7  #ifndef CHECK_H
       8  #define CHECK_H "sse2-check.h"
       9  #endif
      10  
      11  #include CHECK_H
      12  
      13  #ifndef TEST
      14  #define TEST sse2_test_pmullw_1
      15  #endif
      16  
      17  #include <emmintrin.h>
      18  
      19  static __m128i
      20  __attribute__((noinline, unused))
      21  test (__m128i s1, __m128i s2)
      22  {
      23    __asm("" : "+v"(s1), "+v"(s2));
      24    return _mm_mullo_epi16 (s1, s2); 
      25  }
      26  
      27  static void
      28  TEST (void)
      29  {
      30    union128i_w u, s1, s2;
      31    short e[8];
      32    int i, tmp;
      33     
      34    s1.x = _mm_set_epi16 (10,2067,-3033,90,80,40,-1000,15);
      35    s2.x = _mm_set_epi16 (11, 9834, 7444, -10222, 34, -7833, 39, 14);
      36    u.x = test (s1.x, s2.x); 
      37     
      38    for (i = 0; i < 8; i++)
      39      {
      40        tmp = s1.a[i] * s2.a[i];
      41      
      42        e[i] = tmp;
      43      }
      44  
      45    if (check_union128i_w (u, e))
      46      abort ();
      47  }