summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/testimm-7.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-20 19:52:08 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-20 19:52:08 +0000
commit34bbbb0670a7df57036c2e158857ef655548bca5 (patch)
treea40370cacb124a35a15e8df7766262292b7f292e /gcc/testsuite/gcc.target/i386/testimm-7.c
parentefff306159648aee52fe35120a1ee0270034bda0 (diff)
downloadgcc-34bbbb0670a7df57036c2e158857ef655548bca5.tar.gz
2011-06-20 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 175225 using svnmerge. Using c_register_pragma_with_expansion_and_data is now possible... git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@175227 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/testimm-7.c')
-rw-r--r--gcc/testsuite/gcc.target/i386/testimm-7.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/testimm-7.c b/gcc/testsuite/gcc.target/i386/testimm-7.c
new file mode 100644
index 00000000000..9b16fc7f0e2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/testimm-7.c
@@ -0,0 +1,46 @@
+/* PR target/49411 */
+/* { dg-do assemble } */
+/* { dg-options "-O0 -mxop" } */
+/* { dg-require-effective-target xop } */
+
+#include <x86intrin.h>
+
+__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, 3);
+ e1 = _mm256_permute2_pd (e2, e3, l1, 3);
+ a1 = _mm_permute2_ps (a2, a3, i1, 3);
+ b1 = _mm256_permute2_ps (b2, b3, l1, 3);
+ d1 = _mm_permute2_pd (d2, d3, i1, 0);
+ e1 = _mm256_permute2_pd (e2, e3, l1, 0);
+ a1 = _mm_permute2_ps (a2, a3, i1, 0);
+ b1 = _mm256_permute2_ps (b2, b3, l1, 0);
+}
+
+void
+test2args (void)
+{
+ i1 = _mm_extracti_si64 (i2, 255, 0);
+ i1 = _mm_extracti_si64 (i2, 0, 255);
+ i1 = _mm_inserti_si64 (i2, i3, 255, 0);
+ i2 = _mm_inserti_si64 (i2, i3, 0, 255);
+ i1 = _mm_extracti_si64 (i2, 255, 255);
+ i1 = _mm_extracti_si64 (i2, 255, 255);
+ i1 = _mm_inserti_si64 (i2, i3, 255, 255);
+ i2 = _mm_inserti_si64 (i2, i3, 255, 255);
+ i1 = _mm_extracti_si64 (i2, 0, 0);
+ i1 = _mm_extracti_si64 (i2, 0, 0);
+ i1 = _mm_inserti_si64 (i2, i3, 0, 0);
+ i2 = _mm_inserti_si64 (i2, i3, 0, 0);
+}