summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/avx-vzeroall-2.c
blob: f49a0da424df2bf59e0e32edba7fabbdd824493d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* { dg-do run } */
/* { dg-require-effective-target avx } */
/* { dg-options "-O2 -mavx" } */

#include "avx-check.h"

static int s[4] = {234566, 8723467, 6576856, 19832468};
static int d[4] = {1,1,1,1};

static void
avx_test (void)
{
  __m128i src;

  src = _mm_loadu_si128 ((__m128i*) s);
  _mm256_zeroall ();
  _mm_storeu_si128 ((__m128i*) d, src);

  if (__builtin_memcmp (d, s, sizeof (d)))
    abort ();
}