From 554fd8c5195424bdbcabf5de30fdc183aba391bd Mon Sep 17 00:00:00 2001 From: upstream source tree Date: Sun, 15 Mar 2015 20:14:05 -0400 Subject: obtained gcc-4.6.4.tar.bz2 from upstream website; verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository. --- gcc/testsuite/gcc.target/i386/testimm-6.c | 41 +++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 gcc/testsuite/gcc.target/i386/testimm-6.c (limited to 'gcc/testsuite/gcc.target/i386/testimm-6.c') diff --git a/gcc/testsuite/gcc.target/i386/testimm-6.c b/gcc/testsuite/gcc.target/i386/testimm-6.c new file mode 100644 index 000000000..087a6ffa5 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/testimm-6.c @@ -0,0 +1,41 @@ +/* PR target/49411 */ +/* { dg-do compile } */ +/* { dg-options "-O0 -mxop" } */ + +#include + +__m128i i1, i2, i3, i4; +__m128 a1, a2, a3, a4; +__m128d d1, d2, d3, d4; +__m256i l1, l2, l3, l4; +__m256 b1, b2, b3, b4; +__m256d e1, e2, e3, e4; +__m64 m1, m2, m3, m4; +int k1, k2, k3, k4; +float f1, f2, f3, f4; + +void +test2bit (void) +{ + d1 = _mm_permute2_pd (d2, d3, i1, 17); /* { dg-error "the last argument must be a 2-bit immediate" } */ + e1 = _mm256_permute2_pd (e2, e3, l1, 17); /* { dg-error "the last argument must be a 2-bit immediate" } */ + a1 = _mm_permute2_ps (a2, a3, i1, 17); /* { dg-error "the last argument must be a 2-bit immediate" } */ + b1 = _mm256_permute2_ps (b2, b3, l1, 17); /* { dg-error "the last argument must be a 2-bit immediate" } */ + d1 = _mm_permute2_pd (d2, d3, i1, k4); /* { dg-error "the last argument must be a 2-bit immediate" } */ + e1 = _mm256_permute2_pd (e2, e3, l1, k4); /* { dg-error "the last argument must be a 2-bit immediate" } */ + a1 = _mm_permute2_ps (a2, a3, i1, k4); /* { dg-error "the last argument must be a 2-bit immediate" } */ + b1 = _mm256_permute2_ps (b2, b3, l1, k4); /* { dg-error "the last argument must be a 2-bit immediate" } */ +} + +void +test2args (void) +{ + i1 = _mm_extracti_si64 (i2, 256, 0); /* { dg-error "the next to last argument must be an 8-bit immediate" } */ + i1 = _mm_extracti_si64 (i2, 0, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */ + i1 = _mm_inserti_si64 (i2, i3, 256, 0); /* { dg-error "the next to last argument must be an 8-bit immediate" } */ + i2 = _mm_inserti_si64 (i2, i3, 0, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */ + i1 = _mm_extracti_si64 (i2, k4, 0); /* { dg-error "the next to last argument must be an 8-bit immediate" } */ + i1 = _mm_extracti_si64 (i2, 0, k4); /* { dg-error "the last argument must be an 8-bit immediate" } */ + i1 = _mm_inserti_si64 (i2, i3, k4, 0); /* { dg-error "the next to last argument must be an 8-bit immediate" } */ + i2 = _mm_inserti_si64 (i2, i3, 0, k4); /* { dg-error "the last argument must be an 8-bit immediate" } */ +} -- cgit v1.2.3