re PR target/68924 (No intrinsic for x86 `MOVQ m64, %xmm` in 32bit mode.)
authorUros Bizjak <ubizjak@gmail.com>
Fri, 8 Mar 2019 15:53:47 +0000 (16:53 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Fri, 8 Mar 2019 15:53:47 +0000 (16:53 +0100)
PR target/68924
PR target/78782
PR target/87558
* config/i386/emmintrin.h (_mm_loadu_si64): New intrinsic.
(_mm_storeu_si64): Ditto.

testsuite/ChangeLog:

PR target/68924
PR target/78782
PR target/87558
* gcc.target/i386/pr78782.c: New test.
* gcc.target/i386/pr87558.c: Ditto.

From-SVN: r269497

gcc/ChangeLog
gcc/config/i386/emmintrin.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr78782.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr87558.c [new file with mode: 0644]

index 5e737bd1842d49057007a4e2176f92ab9665e0ac..9ecc07d0d28d7344805f31e4c6848d9a9cf891c6 100644 (file)
@@ -1,3 +1,11 @@
+2019-03-08  Uroš Bizjak  <ubizjak@gmail.com>
+
+       PR target/68924
+       PR target/78782
+       PR target/87558
+       * config/i386/emmintrin.h (_mm_loadu_si64): New intrinsic.
+       (_mm_storeu_si64): Ditto.
+
 2019-03-08  Martin Liska  <mliska@suse.cz>
 
        PR target/86952
index d9bc3f7f28f649495d4dfc1c6e054b26c7e8fa5b..f9e7b33b0ddf49b932bce29089382bd72c4c586f 100644 (file)
@@ -709,6 +709,12 @@ _mm_loadl_epi64 (__m128i_u const *__P)
   return _mm_set_epi64 ((__m64)0LL, *(__m64_u *)__P);
 }
 
+extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm_loadu_si64 (void const *__P)
+{
+  return _mm_loadl_epi64 ((__m128i_u *)__P);
+}
+
 extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
 _mm_store_si128 (__m128i *__P, __m128i __B)
 {
@@ -727,6 +733,12 @@ _mm_storel_epi64 (__m128i_u *__P, __m128i __B)
   *(__m64_u *)__P = (__m64) ((__v2di)__B)[0];
 }
 
+extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm_storeu_si64 (void *__P, __m128i __B)
+{
+  _mm_storel_epi64 ((__m128i_u *)__P, __B);
+}
+
 extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
 _mm_movepi64_pi64 (__m128i __B)
 {
index b566c624aaabf76bd54a749536274c6590a42096..a58b29dbfd23a7913daf1806424a51ac71abaa7f 100644 (file)
@@ -1,3 +1,11 @@
+2019-03-08  Uroš Bizjak  <ubizjak@gmail.com>
+
+       PR target/68924
+       PR target/78782
+       PR target/87558
+       * gcc.target/i386/pr78782.c: New test.
+       * gcc.target/i386/pr87558.c: Ditto.
+
 2019-03-08  Jakub Jelinek  <jakub@redhat.com>
 
        PR c/85870
diff --git a/gcc/testsuite/gcc.target/i386/pr78782.c b/gcc/testsuite/gcc.target/i386/pr78782.c
new file mode 100644 (file)
index 0000000..e91d953
--- /dev/null
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -msse2" } */
+
+#include <emmintrin.h>
+
+__m128i foo (unsigned char *p)
+{
+  return _mm_loadu_si64 ((void *)p);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr87558.c b/gcc/testsuite/gcc.target/i386/pr87558.c
new file mode 100644 (file)
index 0000000..c210507
--- /dev/null
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -msse2" } */
+
+#include <emmintrin.h>
+
+void foo (unsigned char *p, __m128i x)
+{
+  _mm_storeu_si64 ((void *)p, x);
+}