[PATCH i386 11/8] [AVX512] [1/2] Rename vmov* intrinsics according to EAS.

Kirill Yukhin kirill.yukhin@gmail.com
Tue Jan 21 15:07:00 GMT 2014


Hello,
On 15 Jan 20:53, Uros Bizjak wrote:
> On Tue, Jan 14, 2014 at 7:13 AM, Kirill Yukhin <kirill.yukhin@gmail.com> wrote:
> > I have a doubts about changes to sse.md.
> > I've splitted existing (SF-only) patterns into 2: DF and SF.
> > As far as insn operands and final instruction have no such data
> > type discrimination I set this data type to (mem:..) part.
> > Having this (for SF):
> >   (define_expand "avx512pf_scatterpf<mode>sf"
> >     [(unspec
> >        [(match_operand:<avx512fmaskmode> 0 "register_or_constm1_operand")
> >         (mem:SF
> >   ...
> >
> > instead of this:
> >   (define_expand "avx512pf_scatterpf<mode>"
> >     [(unspec
> >        [(match_operand:<avx512fmaskmode> 0 "register_or_constm1_operand")
> >         (mem:<ssescalarmode>
> >   ...
> >
> > Not sure if this (DI/SI) mode for mem is needed. Moreover, not sure what
> > that data type represents.
> 
> Did you try to add DF/SF mode to the unspec? I am not familiar with
> this insn, but shouldn't the mode of mem access be somehow similar to
> the avx512f_scattersi<mode> access?
> 
> Also, you can use double macroization with MODEF iterator for SF and DFmode.

It seems that patch is (at last!) non-trivial, so I am splitting out trivial part
in order to reduce volume.

It is in the bottom.

Bootstrapped, avx-512* tests pass, sse-* tests pass. Ok for trunk?

--
Thanks, K

---
 gcc/config/i386/avx512fintrin.h                     | 4 ++--
 gcc/testsuite/gcc.target/i386/avx512f-vmovdqu32-1.c | 4 ++--
 gcc/testsuite/gcc.target/i386/avx512f-vmovdqu32-2.c | 4 ++--
 gcc/testsuite/gcc.target/i386/avx512f-vpcmpd-2.c    | 4 ++--
 gcc/testsuite/gcc.target/i386/avx512f-vpcmpq-2.c    | 4 ++--
 gcc/testsuite/gcc.target/i386/avx512f-vpcmpud-2.c   | 4 ++--
 gcc/testsuite/gcc.target/i386/avx512f-vpcmpuq-2.c   | 4 ++--
 7 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/gcc/config/i386/avx512fintrin.h b/gcc/config/i386/avx512fintrin.h
index 26f8cb6..4e94174 100644
--- a/gcc/config/i386/avx512fintrin.h
+++ b/gcc/config/i386/avx512fintrin.h
@@ -5570,7 +5570,7 @@ _mm512_mask_storeu_epi64 (void *__P, __mmask8 __U, __m512i __A)
 
 extern __inline __m512i
 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_loadu_si512 (void const *__P)
+_mm512_loadu_epi32 (void const *__P)
 {
   return (__m512i) __builtin_ia32_loaddqusi512_mask ((const __v16si *) __P,
 						     (__v16si)
@@ -5599,7 +5599,7 @@ _mm512_maskz_loadu_epi32 (__mmask16 __U, void const *__P)
 
 extern __inline void
 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_storeu_si512 (void *__P, __m512i __A)
+_mm512_storeu_epi32 (void *__P, __m512i __A)
 {
   __builtin_ia32_storedqusi512_mask ((__v16si *) __P, (__v16si) __A,
 				     (__mmask16) -1);
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovdqu32-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovdqu32-1.c
index 79dbf9d..66e358a 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-vmovdqu32-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovdqu32-1.c
@@ -15,10 +15,10 @@ volatile __mmask16 m;
 void extern
 avx512f_test (void)
 {
-  x = _mm512_loadu_si512 (p);
+  x = _mm512_loadu_epi32 (p);
   x = _mm512_mask_loadu_epi32 (x, m, p);
   x = _mm512_maskz_loadu_epi32 (m, p);
 
-  _mm512_storeu_si512 (p, x);
+  _mm512_storeu_epi32 (p, x);
   _mm512_mask_storeu_epi32 (p, m, x);
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovdqu32-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovdqu32-2.c
index f1ae73c..0333d31 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-vmovdqu32-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovdqu32-2.c
@@ -33,8 +33,8 @@ TEST (void)
     }
 
 #if AVX512F_LEN == 512
-  res1.x = _mm512_loadu_si512 (s1.a);
-  _mm512_storeu_si512 (res2.a, s2.x);
+  res1.x = _mm512_loadu_epi32 (s1.a);
+  _mm512_storeu_epi32 (res2.a, s2.x);
 #endif
   res3.x = INTRINSIC (_mask_loadu_epi32) (res3.x, mask, s1.a);
   res4.x = INTRINSIC (_maskz_loadu_epi32) (mask, s1.a);
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpd-2.c
index 600dfd2..c044f42 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpd-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpd-2.c
@@ -17,8 +17,8 @@
     {							\
       dst_ref = ((rel) << i) | dst_ref;			\
     }							\
-    source1.x = _mm512_loadu_si512 (s1);		\
-    source2.x = _mm512_loadu_si512 (s2);		\
+    source1.x = _mm512_loadu_epi32 (s1);		\
+    source2.x = _mm512_loadu_epi32 (s2);		\
     dst1 = _mm512_cmp_epi32_mask (source1.x, source2.x, imm);\
     dst2 = _mm512_mask_cmp_epi32_mask (mask, source1.x, source2.x, imm);\
     if (dst_ref != dst1) abort();			\
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpq-2.c
index 2a9ceb6..e3a90d8 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpq-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpq-2.c
@@ -18,8 +18,8 @@ __mmask8 dst_ref;
     {							\
       dst_ref = ((rel) << i) | dst_ref;			\
     }							\
-    source1.x = _mm512_loadu_si512 (s1);		\
-    source2.x = _mm512_loadu_si512 (s2);		\
+    source1.x = _mm512_loadu_epi32 (s1);		\
+    source2.x = _mm512_loadu_epi32 (s2);		\
     dst1 = _mm512_cmp_epi64_mask (source1.x, source2.x, imm);\
     dst2 = _mm512_mask_cmp_epi64_mask (mask, source1.x, source2.x, imm);\
     if (dst_ref != dst1) abort();			\
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpud-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpud-2.c
index c0bb978..a90baf9 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpud-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpud-2.c
@@ -17,8 +17,8 @@
     {							\
       dst_ref = ((rel) << i) | dst_ref;			\
     }							\
-    source1.x = _mm512_loadu_si512 (s1);		\
-    source2.x = _mm512_loadu_si512 (s2);		\
+    source1.x = _mm512_loadu_epi32 (s1);		\
+    source2.x = _mm512_loadu_epi32 (s2);		\
     dst1 = _mm512_cmp_epu32_mask (source1.x, source2.x, imm);\
     dst2 = _mm512_mask_cmp_epu32_mask (mask, source1.x, source2.x, imm);\
     if (dst_ref != dst1) abort();			\
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpuq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpuq-2.c
index 3bd1b86..c49f5e4 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpuq-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpuq-2.c
@@ -17,8 +17,8 @@
     {							\
       dst_ref = ((rel) << i) | dst_ref;			\
     }							\
-    source1.x = _mm512_loadu_si512 (s1);		\
-    source2.x = _mm512_loadu_si512 (s2);		\
+    source1.x = _mm512_loadu_epi32 (s1);		\
+    source2.x = _mm512_loadu_epi32 (s2);		\
     dst1 = _mm512_cmp_epu64_mask (source1.x, source2.x, imm);\
     dst2 = _mm512_mask_cmp_epu64_mask (mask, source1.x, source2.x, imm);\
     if (dst_ref != dst1) abort();			\



More information about the Gcc-patches mailing list