(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
i386/
avx-vtestps-1.c
       1  /* { dg-do run } */
       2  /* { dg-require-effective-target avx } */
       3  /* { dg-options "-O2 -mavx -DNEED_IEEE754_FLOAT" } */
       4  
       5  #include "avx-check.h"
       6  
       7  static void
       8  avx_test ()
       9  {
      10      int i;
      11      union128 source1, source2;
      12      float s1[4] = {0, -5463, 86456, 0};
      13      float s2[4] = {0, -1223, 0,     0};
      14      int   d[1];
      15      int   e[1];
      16  
      17      source1.x = _mm_loadu_ps(s1);
      18      source2.x = _mm_loadu_ps(s2);
      19      d[0] = _mm_testz_ps(source1.x, source2.x);
      20  
      21      e[0] = 1;
      22      for (i = 0; i < 4; i++) {
      23  	union ieee754_float u1, u2;
      24  	u1.d = s1[i];
      25  	u2.d = s2[i];
      26  	if (u1.bits.sign && u2.bits.sign)
      27              e[0] = 0;
      28      }
      29  
      30      if (checkVi (d, e, 1))
      31        abort ();
      32  }
      33