aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8.1/gcc/testsuite/gcc.target/i386/pr51393.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.8.1/gcc/testsuite/gcc.target/i386/pr51393.c')
-rw-r--r--gcc-4.8.1/gcc/testsuite/gcc.target/i386/pr51393.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc-4.8.1/gcc/testsuite/gcc.target/i386/pr51393.c b/gcc-4.8.1/gcc/testsuite/gcc.target/i386/pr51393.c
new file mode 100644
index 000000000..51175c87a
--- /dev/null
+++ b/gcc-4.8.1/gcc/testsuite/gcc.target/i386/pr51393.c
@@ -0,0 +1,21 @@
+/* { dg-do run { target { ! { ia32 } } } } */
+/* { dg-require-effective-target avx } */
+/* { 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 ();
+}