1  /* PR target/86036 */
       2  /* { dg-do run } */
       3  /* { dg-options "-O -mavx512bw" } */
       4  /* { dg-require-effective-target avx512bw } */
       5  
       6  #define AVX512BW
       7  #include "avx512f-helper.h"
       8  
       9  typedef unsigned short V __attribute__ ((vector_size (64)));
      10  
      11  __attribute__((noipa)) V
      12  foo (V a)
      13  {
      14    return a >= 3;
      15  }
      16  
      17  __attribute__((noipa)) V
      18  bar (V a)
      19  {
      20    return a != 0;
      21  }
      22  
      23  __attribute__((noipa)) V
      24  baz (V a)
      25  {
      26    return a == 0;
      27  }
      28  
      29  void
      30  TEST (void)
      31  {
      32    V a = (V) { 3, 17, 2, 0, 9, 1, 2, 3, 0, 0, 0, 3, 3, 3, 3, 3,
      33  	      9, 16387, 9, 3, 3, 0, 0, 3, 3, 3, 0, 0, 0, 0, 3, 3 };
      34    V b = foo (a);
      35    V c = (V) { -1, -1, 0, 0, -1, 0, 0, -1, 0, 0, 0, -1, -1, -1, -1, -1,
      36  	      -1, -1, -1, -1, -1, 0, 0, -1, -1, -1, 0, 0, 0, 0, -1, -1 };
      37    if (__builtin_memcmp (&b, &c, sizeof (b)))
      38      abort ();
      39    V d = bar (a);
      40    V e = (V) { -1, -1, -1, 0, -1, -1, -1, -1, 0, 0, 0, -1, -1, -1, -1, -1,
      41  	      -1, -1, -1, -1, -1, 0, 0, -1, -1, -1, 0, 0, 0, 0, -1, -1 };
      42    if (__builtin_memcmp (&d, &e, sizeof (d)))
      43      abort ();
      44    V f = baz (a);
      45    V g = ~e;
      46    if (__builtin_memcmp (&f, &g, sizeof (f)))
      47      abort ();
      48  }