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

#include "avx-check.h"
#include <immintrin.h>

static void
__attribute__((noinline))
avx_test (void)
{
  long long in = 0x800000000ll;
  long long out;

  __m256i zero = _mm256_setzero_si256();
  __m256i tmp  = _mm256_insert_epi64 (zero, in, 0);
  out = _mm256_extract_epi64(tmp, 0);

  if (in != out)
    abort ();
}