1  /* { dg-do run } */
       2  /* { dg-options "-mavx2 -O2" } */
       3  /* { dg-require-effective-target avx2 } */
       4  
       5  #include "avx2-check.h"
       6  
       7  void static
       8  avx2_test (void)
       9  {
      10    union256i_d u, s1, s2;
      11    int e[8];
      12    unsigned i;
      13  
      14    s1.x = _mm256_set_epi32 (100, 74, 50000, 4, 6999, 39999, 1000, 4);
      15    s2.x = _mm256_set_epi32 (88, 44, 33, 220, 4556, 2999, 2, 9000000);
      16  
      17    u.x = _mm256_sub_epi32 (s1.x, s2.x);
      18  
      19    for (i = 0; i < 8; i++)
      20      e[i] = s1.a[i] - s2.a[i];
      21  
      22    if (check_union256i_d (u, e))
      23      abort ();
      24  }