* config/i386/avx512fintrin.h (_mm512_mask_cvtepi32_storeu_epi8): New.
(_mm512_mask_cvtsepi32_storeu_epi8): Ditto.
(_mm512_mask_cvtusepi32_storeu_epi8): Ditto.
(_mm512_mask_cvtepi32_storeu_epi16): Ditto.
(_mm512_mask_cvtsepi32_storeu_epi16): Ditto.
(_mm512_mask_cvtusepi32_storeu_epi16): Ditto.
(_mm512_mask_cvtepi64_storeu_epi32): Ditto.
(_mm512_mask_cvtsepi64_storeu_epi32): Ditto.
(_mm512_mask_cvtusepi64_storeu_epi32): Ditto.
(_mm512_mask_cvtepi64_storeu_epi16): Ditto.
(_mm512_mask_cvtsepi64_storeu_epi16): Ditto.
(_mm512_mask_cvtusepi64_storeu_epi16): Ditto.
(_mm512_mask_cvtepi64_storeu_epi8): Ditto.
(_mm512_mask_cvtsepi64_storeu_epi8): Ditto.
(_mm512_mask_cvtusepi64_storeu_epi8): Ditto.
(_mm512_storeu_epi64): Ditto.
(_mm512_cmpge_epi32_mask): Ditto.
(_mm512_cmpge_epu32_mask): Ditto.
(_mm512_cmpge_epi64_mask): Ditto.
(_mm512_cmpge_epu64_mask): Ditto.
(_mm512_cmple_epi32_mask): Ditto.
(_mm512_cmple_epu32_mask): Ditto.
(_mm512_cmple_epi64_mask): Ditto.
(_mm512_cmple_epu64_mask): Ditto.
(_mm512_cmplt_epi32_mask): Ditto.
(_mm512_cmplt_epu32_mask): Ditto.
(_mm512_cmplt_epi64_mask): Ditto.
(_mm512_cmplt_epu64_mask): Ditto.
(_mm512_cmpneq_epi32_mask): Ditto.
(_mm512_cmpneq_epu32_mask): Ditto.
(_mm512_cmpneq_epi64_mask): Ditto.
(_mm512_cmpneq_epu64_mask): Ditto.
(_mm512_expand_pd): Ditto.
(_mm512_expand_ps): Ditto.
* config/i386/i386-builtin-types.def: Add PV16QI, PV16QI, PV16HI,
VOID_PV8SI_V8DI_QI, VOID_PV8HI_V8DI_QI, VOID_PV16QI_V8DI_QI,
VOID_PV16QI_V16SI_HI, VOID_PV16HI_V16SI_HI.
* config/i386/i386.c (ix86_builtins): Add
IX86_BUILTIN_EXPANDPD512_NOMASK, IX86_BUILTIN_EXPANDPS512_NOMASK,
IX86_BUILTIN_PMOVDB512_MEM, IX86_BUILTIN_PMOVDW512_MEM,
IX86_BUILTIN_PMOVQB512_MEM, IX86_BUILTIN_PMOVQD512_MEM,
IX86_BUILTIN_PMOVQW512_MEM, IX86_BUILTIN_PMOVSDB512_MEM,
IX86_BUILTIN_PMOVSDW512_MEM, IX86_BUILTIN_PMOVSQB512_MEM,
IX86_BUILTIN_PMOVSQD512_MEM, IX86_BUILTIN_PMOVSQW512_MEM,
IX86_BUILTIN_PMOVUSDB512_MEM, IX86_BUILTIN_PMOVUSDW512_MEM,
IX86_BUILTIN_PMOVUSQB512_MEM, IX86_BUILTIN_PMOVUSQD512_MEM,
IX86_BUILTIN_PMOVUSQW512_MEM.
(bdesc_special_args): Add __builtin_ia32_pmovusqd512mem_mask,
__builtin_ia32_pmovsqd512mem_mask,
__builtin_ia32_pmovqd512mem_mask,
__builtin_ia32_pmovusqw512mem_mask,
__builtin_ia32_pmovsqw512mem_mask,
__builtin_ia32_pmovqw512mem_mask,
__builtin_ia32_pmovusdw512mem_mask,
__builtin_ia32_pmovsdw512mem_mask,
__builtin_ia32_pmovdw512mem_mask,
__builtin_ia32_pmovqb512mem_mask,
__builtin_ia32_pmovusqb512mem_mask,
__builtin_ia32_pmovsqb512mem_mask,
__builtin_ia32_pmovusdb512mem_mask,
__builtin_ia32_pmovsdb512mem_mask,
__builtin_ia32_pmovdb512mem_mask.
(bdesc_args): Add __builtin_ia32_expanddf512,
__builtin_ia32_expandsf512.
(ix86_expand_special_args_builtin): Handle VOID_FTYPE_PV8SI_V8DI_QI,
VOID_FTYPE_PV8HI_V8DI_QI, VOID_FTYPE_PV16HI_V16SI_HI,
VOID_FTYPE_PV16QI_V8DI_QI, VOID_FTYPE_PV16QI_V16SI_HI.
* config/i386/sse.md (unspec): Add UNSPEC_EXPAND_NOMASK.
(avx512f_<code><pmov_src_lower><mode>2_mask_store): New.
(*avx512f_<code>v8div16qi2_store_mask): Renamed to ...
(avx512f_<code>v8div16qi2_mask_store): This.
(avx512f_expand<mode>): New.
testsuite/
* gcc.target/i386/avx512f-vexpandpd-1.c: Also test _mm512_expand_pd.
* gcc.target/i386/avx512f-vexpandpd-2.c: Ditto.
* gcc.target/i386/avx512f-vexpandps-1.c: Also test _mm512_expand_ps.
* gcc.target/i386/avx512f-vexpandps-2.c: Ditto.
* gcc.target/i386/avx512f-vmovdqu64-1.c: Also test _mm512_storeu_epi64.
* gcc.target/i386/avx512f-vmovdqu64-2.c: Ditto.
* gcc.target/i386/avx512f-vpcmpged-1.c: New.
* gcc.target/i386/avx512f-vpcmpged-2.c: Ditto.
* gcc.target/i386/avx512f-vpcmpgeq-1.c: Ditto.
* gcc.target/i386/avx512f-vpcmpgeq-2.c: Ditto.
* gcc.target/i386/avx512f-vpcmpgeud-1.c: Ditto.
* gcc.target/i386/avx512f-vpcmpgeud-2.c: Ditto.
* gcc.target/i386/avx512f-vpcmpgeuq-1.c: Ditto.
* gcc.target/i386/avx512f-vpcmpgeuq-2.c: Ditto.
* gcc.target/i386/avx512f-vpcmpled-1.c: Ditto.
* gcc.target/i386/avx512f-vpcmpled-2.c: Ditto.
* gcc.target/i386/avx512f-vpcmpleq-1.c: Ditto.
* gcc.target/i386/avx512f-vpcmpleq-2.c: Ditto.
* gcc.target/i386/avx512f-vpcmpleud-1.c: Ditto.
* gcc.target/i386/avx512f-vpcmpleud-2.c: Ditto.
* gcc.target/i386/avx512f-vpcmpleuq-1.c: Ditto.
* gcc.target/i386/avx512f-vpcmpleuq-2.c: Ditto.
* gcc.target/i386/avx512f-vpcmpltd-1.c: Ditto.
* gcc.target/i386/avx512f-vpcmpltd-2.c: Ditto.
* gcc.target/i386/avx512f-vpcmpltq-1.c: Ditto.
* gcc.target/i386/avx512f-vpcmpltq-2.c: Ditto.
* gcc.target/i386/avx512f-vpcmpltud-1.c: Ditto.
* gcc.target/i386/avx512f-vpcmpltud-2.c: Ditto.
* gcc.target/i386/avx512f-vpcmpltuq-1.c: Ditto.
* gcc.target/i386/avx512f-vpcmpltuq-2.c: Ditto.
* gcc.target/i386/avx512f-vpcmpneqd-1.c: Ditto.
* gcc.target/i386/avx512f-vpcmpneqd-2.c: Ditto.
* gcc.target/i386/avx512f-vpcmpneqq-1.c: Ditto.
* gcc.target/i386/avx512f-vpcmpneqq-2.c: Ditto.
* gcc.target/i386/avx512f-vpcmpnequd-1.c: Ditto.
* gcc.target/i386/avx512f-vpcmpnequd-2.c: Ditto.
* gcc.target/i386/avx512f-vpcmpnequq-1.c: Ditto.
* gcc.target/i386/avx512f-vpcmpnequq-2.c: Ditto.
* gcc.target/i386/avx512f-vpmovdb-1.c: Also test
_mm512_mask_cvtepi32_storeu_epi8.
* gcc.target/i386/avx512f-vpmovdb-2.c: Ditto.
* gcc.target/i386/avx512f-vpmovdw-1.c: Also test
_mm512_mask_cvtepi32_storeu_epi16.
* gcc.target/i386/avx512f-vpmovdw-2.c: Ditto.
* gcc.target/i386/avx512f-vpmovqb-1.c: Also test
_mm512_mask_cvtepi64_storeu_epi8.
* gcc.target/i386/avx512f-vpmovqb-2.c: Ditto.
* gcc.target/i386/avx512f-vpmovqw-1.c: Also test
_mm512_mask_cvtepi64_storeu_epi16.
* gcc.target/i386/avx512f-vpmovqw-2.c: Ditto.
* gcc.target/i386/avx512f-vpmovqd-1.c: Also test
_mm512_mask_cvtepi64_storeu_epi32.
* gcc.target/i386/avx512f-vpmovqd-2.c: Ditto.
* gcc.target/i386/avx512f-vpmovsdb-1.c: Also test
_mm512_mask_cvtsepi32_storeu_epi8.
* gcc.target/i386/avx512f-vpmovsdb-2.c: Ditto.
* gcc.target/i386/avx512f-vpmovsdw-1.c: Also test
_mm512_mask_cvtsepi32_storeu_epi16.
* gcc.target/i386/avx512f-vpmovsdw-2.c: Ditto.
* gcc.target/i386/avx512f-vpmovsqb-1.c: Also test
_mm512_mask_cvtsepi64_storeu_epi8.
* gcc.target/i386/avx512f-vpmovsqb-2.c: Ditto.
* gcc.target/i386/avx512f-vpmovsqw-1.c: Also test
_mm512_mask_cvtsepi64_storeu_epi16.
* gcc.target/i386/avx512f-vpmovsqw-2.c: Ditto.
* gcc.target/i386/avx512f-vpmovsqd-1.c: Also test
_mm512_mask_cvtsepi64_storeu_epi32.
* gcc.target/i386/avx512f-vpmovsqd-2.c: Ditto.
* gcc.target/i386/avx512f-vpmovusdb-1.c: Also test
_mm512_mask_cvtusepi32_storeu_epi8.
* gcc.target/i386/avx512f-vpmovusdb-2.c: Ditto.
* gcc.target/i386/avx512f-vpmovusdw-1.c: Also test
_mm512_mask_cvtusepi32_storeu_epi16.
* gcc.target/i386/avx512f-vpmovusdw-2.c: Ditto.
* gcc.target/i386/avx512f-vpmovusqb-1.c: Also test
_mm512_mask_cvtusepi64_storeu_epi8.
* gcc.target/i386/avx512f-vpmovusqb-2.c: Ditto.
* gcc.target/i386/avx512f-vpmovusqw-1.c: Also test
_mm512_mask_cvtusepi64_storeu_epi16.
* gcc.target/i386/avx512f-vpmovusqw-2.c: Ditto.
* gcc.target/i386/avx512f-vpmovusqd-1.c: Also test
_mm512_mask_cvtusepi64_storeu_epi32.
* gcc.target/i386/avx512f-vpmovusqd-2.c: Ditto.
* gcc.target/i386/m128-check.h: Add checkVs, checkVb.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207150
138bc75d-0d04-0410-961f-
82ee72b054a4
+2014-01-27 Ilya Tocar <ilya.tocar@intel.com>
+
+ * config/i386/avx512fintrin.h (_mm512_mask_cvtepi32_storeu_epi8): New.
+ (_mm512_mask_cvtsepi32_storeu_epi8): Ditto.
+ (_mm512_mask_cvtusepi32_storeu_epi8): Ditto.
+ (_mm512_mask_cvtepi32_storeu_epi16): Ditto.
+ (_mm512_mask_cvtsepi32_storeu_epi16): Ditto.
+ (_mm512_mask_cvtusepi32_storeu_epi16): Ditto.
+ (_mm512_mask_cvtepi64_storeu_epi32): Ditto.
+ (_mm512_mask_cvtsepi64_storeu_epi32): Ditto.
+ (_mm512_mask_cvtusepi64_storeu_epi32): Ditto.
+ (_mm512_mask_cvtepi64_storeu_epi16): Ditto.
+ (_mm512_mask_cvtsepi64_storeu_epi16): Ditto.
+ (_mm512_mask_cvtusepi64_storeu_epi16): Ditto.
+ (_mm512_mask_cvtepi64_storeu_epi8): Ditto.
+ (_mm512_mask_cvtsepi64_storeu_epi8): Ditto.
+ (_mm512_mask_cvtusepi64_storeu_epi8): Ditto.
+ (_mm512_storeu_epi64): Ditto.
+ (_mm512_cmpge_epi32_mask): Ditto.
+ (_mm512_cmpge_epu32_mask): Ditto.
+ (_mm512_cmpge_epi64_mask): Ditto.
+ (_mm512_cmpge_epu64_mask): Ditto.
+ (_mm512_cmple_epi32_mask): Ditto.
+ (_mm512_cmple_epu32_mask): Ditto.
+ (_mm512_cmple_epi64_mask): Ditto.
+ (_mm512_cmple_epu64_mask): Ditto.
+ (_mm512_cmplt_epi32_mask): Ditto.
+ (_mm512_cmplt_epu32_mask): Ditto.
+ (_mm512_cmplt_epi64_mask): Ditto.
+ (_mm512_cmplt_epu64_mask): Ditto.
+ (_mm512_cmpneq_epi32_mask): Ditto.
+ (_mm512_cmpneq_epu32_mask): Ditto.
+ (_mm512_cmpneq_epi64_mask): Ditto.
+ (_mm512_cmpneq_epu64_mask): Ditto.
+ (_mm512_expand_pd): Ditto.
+ (_mm512_expand_ps): Ditto.
+ * config/i386/i386-builtin-types.def: Add PV16QI, PV16QI, PV16HI,
+ VOID_PV8SI_V8DI_QI, VOID_PV8HI_V8DI_QI, VOID_PV16QI_V8DI_QI,
+ VOID_PV16QI_V16SI_HI, VOID_PV16HI_V16SI_HI.
+ * config/i386/i386.c (ix86_builtins): Add
+ IX86_BUILTIN_EXPANDPD512_NOMASK, IX86_BUILTIN_EXPANDPS512_NOMASK,
+ IX86_BUILTIN_PMOVDB512_MEM, IX86_BUILTIN_PMOVDW512_MEM,
+ IX86_BUILTIN_PMOVQB512_MEM, IX86_BUILTIN_PMOVQD512_MEM,
+ IX86_BUILTIN_PMOVQW512_MEM, IX86_BUILTIN_PMOVSDB512_MEM,
+ IX86_BUILTIN_PMOVSDW512_MEM, IX86_BUILTIN_PMOVSQB512_MEM,
+ IX86_BUILTIN_PMOVSQD512_MEM, IX86_BUILTIN_PMOVSQW512_MEM,
+ IX86_BUILTIN_PMOVUSDB512_MEM, IX86_BUILTIN_PMOVUSDW512_MEM,
+ IX86_BUILTIN_PMOVUSQB512_MEM, IX86_BUILTIN_PMOVUSQD512_MEM,
+ IX86_BUILTIN_PMOVUSQW512_MEM.
+ (bdesc_special_args): Add __builtin_ia32_pmovusqd512mem_mask,
+ __builtin_ia32_pmovsqd512mem_mask,
+ __builtin_ia32_pmovqd512mem_mask,
+ __builtin_ia32_pmovusqw512mem_mask,
+ __builtin_ia32_pmovsqw512mem_mask,
+ __builtin_ia32_pmovqw512mem_mask,
+ __builtin_ia32_pmovusdw512mem_mask,
+ __builtin_ia32_pmovsdw512mem_mask,
+ __builtin_ia32_pmovdw512mem_mask,
+ __builtin_ia32_pmovqb512mem_mask,
+ __builtin_ia32_pmovusqb512mem_mask,
+ __builtin_ia32_pmovsqb512mem_mask,
+ __builtin_ia32_pmovusdb512mem_mask,
+ __builtin_ia32_pmovsdb512mem_mask,
+ __builtin_ia32_pmovdb512mem_mask.
+ (bdesc_args): Add __builtin_ia32_expanddf512,
+ __builtin_ia32_expandsf512.
+ (ix86_expand_special_args_builtin): Handle VOID_FTYPE_PV8SI_V8DI_QI,
+ VOID_FTYPE_PV8HI_V8DI_QI, VOID_FTYPE_PV16HI_V16SI_HI,
+ VOID_FTYPE_PV16QI_V8DI_QI, VOID_FTYPE_PV16QI_V16SI_HI.
+ * config/i386/sse.md (unspec): Add UNSPEC_EXPAND_NOMASK.
+ (avx512f_<code><pmov_src_lower><mode>2_mask_store): New.
+ (*avx512f_<code>v8div16qi2_store_mask): Renamed to ...
+ (avx512f_<code>v8div16qi2_mask_store): This.
+ (avx512f_expand<mode>): New.
+
2014-01-27 Kirill Yukhin <kirill.yukhin@intel.com>
* config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i32gather_pd): New.
(__mmask16) -1);
}
+extern __inline void
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_cvtepi32_storeu_epi8 (void * __P, __mmask16 __M, __m512i __A)
+{
+ __builtin_ia32_pmovdb512mem_mask ((__v16qi *) __P, (__v16si) __A, __M);
+}
+
extern __inline __m128i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_mask_cvtepi32_epi8 (__m128i __O, __mmask16 __M, __m512i __A)
(__mmask16) -1);
}
+extern __inline void
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_cvtsepi32_storeu_epi8 (void * __P, __mmask16 __M, __m512i __A)
+{
+ __builtin_ia32_pmovsdb512mem_mask ((__v16qi *) __P, (__v16si) __A, __M);
+}
+
extern __inline __m128i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_mask_cvtsepi32_epi8 (__m128i __O, __mmask16 __M, __m512i __A)
(__mmask16) -1);
}
+extern __inline void
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_cvtusepi32_storeu_epi8 (void * __P, __mmask16 __M, __m512i __A)
+{
+ __builtin_ia32_pmovusdb512mem_mask ((__v16qi *) __P, (__v16si) __A, __M);
+}
+
extern __inline __m128i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_mask_cvtusepi32_epi8 (__m128i __O, __mmask16 __M, __m512i __A)
(__mmask16) -1);
}
+extern __inline void
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_cvtepi32_storeu_epi16 (void * __P, __mmask16 __M, __m512i __A)
+{
+ __builtin_ia32_pmovdw512mem_mask ((__v16hi *) __P, (__v16si) __A, __M);
+}
+
extern __inline __m256i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_mask_cvtepi32_epi16 (__m256i __O, __mmask16 __M, __m512i __A)
(__mmask16) -1);
}
+extern __inline void
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_cvtsepi32_storeu_epi16 (void *__P, __mmask16 __M, __m512i __A)
+{
+ __builtin_ia32_pmovsdw512mem_mask ((__v16hi*) __P, (__v16si) __A, __M);
+}
+
extern __inline __m256i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_mask_cvtsepi32_epi16 (__m256i __O, __mmask16 __M, __m512i __A)
(__mmask16) -1);
}
+extern __inline void
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_cvtusepi32_storeu_epi16 (void *__P, __mmask16 __M, __m512i __A)
+{
+ __builtin_ia32_pmovusdw512mem_mask ((__v16hi*) __P, (__v16si) __A, __M);
+}
+
extern __inline __m256i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_mask_cvtusepi32_epi16 (__m256i __O, __mmask16 __M, __m512i __A)
(__mmask8) -1);
}
+extern __inline void
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_cvtepi64_storeu_epi32 (void* __P, __mmask8 __M, __m512i __A)
+{
+ __builtin_ia32_pmovqd512mem_mask ((__v8si *) __P, (__v8di) __A, __M);
+}
+
extern __inline __m256i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_mask_cvtepi64_epi32 (__m256i __O, __mmask8 __M, __m512i __A)
(__mmask8) -1);
}
+extern __inline void
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_cvtsepi64_storeu_epi32 (void *__P, __mmask8 __M, __m512i __A)
+{
+ __builtin_ia32_pmovsqd512mem_mask ((__v8si *) __P, (__v8di) __A, __M);
+}
+
extern __inline __m256i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_mask_cvtsepi64_epi32 (__m256i __O, __mmask8 __M, __m512i __A)
(__mmask8) -1);
}
+extern __inline
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_cvtusepi64_storeu_epi32 (void* __P, __mmask8 __M, __m512i __A)
+{
+ __builtin_ia32_pmovusqd512mem_mask ((__v8si*) __P, (__v8di) __A, __M);
+}
+
extern __inline __m256i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_mask_cvtusepi64_epi32 (__m256i __O, __mmask8 __M, __m512i __A)
(__mmask8) -1);
}
+extern __inline void
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_cvtepi64_storeu_epi16 (void *__P, __mmask8 __M, __m512i __A)
+{
+ __builtin_ia32_pmovqw512mem_mask ((__v8hi *) __P, (__v8di) __A, __M);
+}
+
extern __inline __m128i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_mask_cvtepi64_epi16 (__m128i __O, __mmask8 __M, __m512i __A)
(__mmask8) -1);
}
+extern __inline void
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_cvtsepi64_storeu_epi16 (void * __P, __mmask8 __M, __m512i __A)
+{
+ __builtin_ia32_pmovsqw512mem_mask ((__v8hi *) __P, (__v8di) __A, __M);
+}
+
extern __inline __m128i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_mask_cvtsepi64_epi16 (__m128i __O, __mmask8 __M, __m512i __A)
(__mmask8) -1);
}
+extern __inline void
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_cvtusepi64_storeu_epi16 (void *__P, __mmask8 __M, __m512i __A)
+{
+ __builtin_ia32_pmovusqw512mem_mask ((__v8hi*) __P, (__v8di) __A, __M);
+}
+
extern __inline __m128i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_mask_cvtusepi64_epi16 (__m128i __O, __mmask8 __M, __m512i __A)
(__mmask8) -1);
}
+extern __inline void
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_cvtepi64_storeu_epi8 (void * __P, __mmask8 __M, __m512i __A)
+{
+ __builtin_ia32_pmovqb512mem_mask ((__v16qi *) __P, (__v8di) __A, __M);
+}
+
extern __inline __m128i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_mask_cvtepi64_epi8 (__m128i __O, __mmask8 __M, __m512i __A)
(__mmask8) -1);
}
+extern __inline void
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_cvtsepi64_storeu_epi8 (void * __P, __mmask8 __M, __m512i __A)
+{
+ __builtin_ia32_pmovsqb512mem_mask ((__v16qi *) __P, (__v8di) __A, __M);
+}
+
extern __inline __m128i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_mask_cvtsepi64_epi8 (__m128i __O, __mmask8 __M, __m512i __A)
(__mmask8) -1);
}
+extern __inline void
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_mask_cvtusepi64_storeu_epi8 (void * __P, __mmask8 __M, __m512i __A)
+{
+ __builtin_ia32_pmovusqb512mem_mask ((__v16qi *) __P, (__v8di) __A, __M);
+}
+
extern __inline __m128i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_mask_cvtusepi64_epi8 (__m128i __O, __mmask8 __M, __m512i __A)
(__mmask8) __U);
}
+extern __inline void
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_storeu_epi64 (void *__P, __m512i __A)
+{
+ __builtin_ia32_storedqudi512_mask ((__v8di *) __P, (__v8di) __A,
+ (__mmask8) -1);
+}
+
extern __inline __m512i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_loadu_epi32 (void const *__P)
(__mmask8) -1);
}
+extern __inline __mmask16
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_cmpge_epi32_mask (__m512i __X, __m512i __Y)
+{
+ return (__mmask16) __builtin_ia32_cmpd512_mask ((__v16si) __X,
+ (__v16si) __Y, 5,
+ (__mmask16) -1);
+}
+
+extern __inline __mmask16
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_cmpge_epu32_mask (__m512i __X, __m512i __Y)
+{
+ return (__mmask16) __builtin_ia32_ucmpd512_mask ((__v16si) __X,
+ (__v16si) __Y, 5,
+ (__mmask16) -1);
+}
+
+extern __inline __mmask8
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_cmpge_epi64_mask (__m512i __X, __m512i __Y)
+{
+ return (__mmask8) __builtin_ia32_cmpq512_mask ((__v8di) __X,
+ (__v8di) __Y, 5,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask8
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_cmpge_epu64_mask (__m512i __X, __m512i __Y)
+{
+ return (__mmask8) __builtin_ia32_ucmpq512_mask ((__v8di) __X,
+ (__v8di) __Y, 5,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask16
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_cmple_epi32_mask (__m512i __X, __m512i __Y)
+{
+ return (__mmask16) __builtin_ia32_cmpd512_mask ((__v16si) __X,
+ (__v16si) __Y, 2,
+ (__mmask16) -1);
+}
+
+extern __inline __mmask16
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_cmple_epu32_mask (__m512i __X, __m512i __Y)
+{
+ return (__mmask16) __builtin_ia32_ucmpd512_mask ((__v16si) __X,
+ (__v16si) __Y, 2,
+ (__mmask16) -1);
+}
+
+extern __inline __mmask8
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_cmple_epi64_mask (__m512i __X, __m512i __Y)
+{
+ return (__mmask8) __builtin_ia32_cmpq512_mask ((__v8di) __X,
+ (__v8di) __Y, 2,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask8
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_cmple_epu64_mask (__m512i __X, __m512i __Y)
+{
+ return (__mmask8) __builtin_ia32_ucmpq512_mask ((__v8di) __X,
+ (__v8di) __Y, 2,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask16
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_cmplt_epi32_mask (__m512i __X, __m512i __Y)
+{
+ return (__mmask16) __builtin_ia32_cmpd512_mask ((__v16si) __X,
+ (__v16si) __Y, 1,
+ (__mmask16) -1);
+}
+
+extern __inline __mmask16
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_cmplt_epu32_mask (__m512i __X, __m512i __Y)
+{
+ return (__mmask16) __builtin_ia32_ucmpd512_mask ((__v16si) __X,
+ (__v16si) __Y, 1,
+ (__mmask16) -1);
+}
+
+extern __inline __mmask8
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_cmplt_epi64_mask (__m512i __X, __m512i __Y)
+{
+ return (__mmask8) __builtin_ia32_cmpq512_mask ((__v8di) __X,
+ (__v8di) __Y, 1,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask8
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_cmplt_epu64_mask (__m512i __X, __m512i __Y)
+{
+ return (__mmask8) __builtin_ia32_ucmpq512_mask ((__v8di) __X,
+ (__v8di) __Y, 1,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask16
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_cmpneq_epi32_mask (__m512i __X, __m512i __Y)
+{
+ return (__mmask16) __builtin_ia32_cmpd512_mask ((__v16si) __X,
+ (__v16si) __Y, 4,
+ (__mmask16) -1);
+}
+
+extern __inline __mmask16
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_cmpneq_epu32_mask (__m512i __X, __m512i __Y)
+{
+ return (__mmask16) __builtin_ia32_ucmpd512_mask ((__v16si) __X,
+ (__v16si) __Y, 4,
+ (__mmask16) -1);
+}
+
+extern __inline __mmask8
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_cmpneq_epi64_mask (__m512i __X, __m512i __Y)
+{
+ return (__mmask8) __builtin_ia32_cmpq512_mask ((__v8di) __X,
+ (__v8di) __Y, 4,
+ (__mmask8) -1);
+}
+
+extern __inline __mmask8
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_cmpneq_epu64_mask (__m512i __X, __m512i __Y)
+{
+ return (__mmask8) __builtin_ia32_ucmpq512_mask ((__v8di) __X,
+ (__v8di) __Y, 4,
+ (__mmask8) -1);
+}
+
#define _MM_CMPINT_EQ 0x0
#define _MM_CMPINT_LT 0x1
#define _MM_CMPINT_LE 0x2
extern __inline __m512d
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_expand_pd (__m512d __A)
+{
+ return (__m512d) __builtin_ia32_expanddf512 ((__v8df) __A);
+}
+
+extern __inline __m512d
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_mask_expand_pd (__m512d __W, __mmask8 __U, __m512d __A)
{
return (__m512d) __builtin_ia32_expanddf512_mask ((__v8df) __A,
extern __inline __m512
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm512_expand_ps (__m512 __A)
+{
+ return (__m512) __builtin_ia32_expandsf512 ((__v16sf) __A);
+}
+
+extern __inline __m512
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_mask_expand_ps (__m512 __W, __mmask16 __U, __m512 __A)
{
return (__m512) __builtin_ia32_expandsf512_mask ((__v16sf) __A,
DEF_POINTER_TYPE (PV8DF, V8DF)
DEF_POINTER_TYPE (PV8SF, V8SF)
DEF_POINTER_TYPE (PV4SI, V4SI)
+DEF_POINTER_TYPE (PV8HI, V8HI)
DEF_POINTER_TYPE (PV8SI, V8SI)
DEF_POINTER_TYPE (PV8DI, V8DI)
+DEF_POINTER_TYPE (PV16QI, V16QI)
+DEF_POINTER_TYPE (PV16HI, V16HI)
DEF_POINTER_TYPE (PV16SI, V16SI)
DEF_POINTER_TYPE (PV16SF, V16SF)
DEF_FUNCTION_TYPE (V8HI, V8DI, V8HI, QI)
DEF_FUNCTION_TYPE (V16QI, V8DI, V16QI, QI)
DEF_FUNCTION_TYPE (VOID, PV8DF, V8DF, QI)
+DEF_FUNCTION_TYPE (VOID, PV8SI, V8DI, QI)
+DEF_FUNCTION_TYPE (VOID, PV8HI, V8DI, QI)
DEF_FUNCTION_TYPE (VOID, PV16SF, V16SF, HI)
DEF_FUNCTION_TYPE (VOID, PV8DI, V8DI, QI)
DEF_FUNCTION_TYPE (VOID, PV16SI, V16SI, HI)
+DEF_FUNCTION_TYPE (VOID, PV16HI, V16SI, HI)
+DEF_FUNCTION_TYPE (VOID, PV16QI, V16SI, HI)
+DEF_FUNCTION_TYPE (VOID, PV16QI, V8DI, QI)
DEF_FUNCTION_TYPE (VOID, PDOUBLE, V2DF, QI)
DEF_FUNCTION_TYPE (VOID, PFLOAT, V4SF, QI)
DEF_FUNCTION_TYPE (V16SI, V16SF, V16SI, HI)
IX86_BUILTIN_DIVPS512,
IX86_BUILTIN_DIVSD_ROUND,
IX86_BUILTIN_DIVSS_ROUND,
+ IX86_BUILTIN_EXPANDPD512_NOMASK,
IX86_BUILTIN_EXPANDPD512,
IX86_BUILTIN_EXPANDPD512Z,
IX86_BUILTIN_EXPANDPDLOAD512,
IX86_BUILTIN_EXPANDPDLOAD512Z,
+ IX86_BUILTIN_EXPANDPS512_NOMASK,
IX86_BUILTIN_EXPANDPS512,
IX86_BUILTIN_EXPANDPS512Z,
IX86_BUILTIN_EXPANDPSLOAD512,
IX86_BUILTIN_PMINUD512,
IX86_BUILTIN_PMINUQ512,
IX86_BUILTIN_PMOVDB512,
+ IX86_BUILTIN_PMOVDB512_MEM,
IX86_BUILTIN_PMOVDW512,
+ IX86_BUILTIN_PMOVDW512_MEM,
IX86_BUILTIN_PMOVQB512,
+ IX86_BUILTIN_PMOVQB512_MEM,
IX86_BUILTIN_PMOVQD512,
+ IX86_BUILTIN_PMOVQD512_MEM,
IX86_BUILTIN_PMOVQW512,
+ IX86_BUILTIN_PMOVQW512_MEM,
IX86_BUILTIN_PMOVSDB512,
+ IX86_BUILTIN_PMOVSDB512_MEM,
IX86_BUILTIN_PMOVSDW512,
+ IX86_BUILTIN_PMOVSDW512_MEM,
IX86_BUILTIN_PMOVSQB512,
+ IX86_BUILTIN_PMOVSQB512_MEM,
IX86_BUILTIN_PMOVSQD512,
+ IX86_BUILTIN_PMOVSQD512_MEM,
IX86_BUILTIN_PMOVSQW512,
+ IX86_BUILTIN_PMOVSQW512_MEM,
IX86_BUILTIN_PMOVSXBD512,
IX86_BUILTIN_PMOVSXBQ512,
IX86_BUILTIN_PMOVSXDQ512,
IX86_BUILTIN_PMOVSXWD512,
IX86_BUILTIN_PMOVSXWQ512,
IX86_BUILTIN_PMOVUSDB512,
+ IX86_BUILTIN_PMOVUSDB512_MEM,
IX86_BUILTIN_PMOVUSDW512,
+ IX86_BUILTIN_PMOVUSDW512_MEM,
IX86_BUILTIN_PMOVUSQB512,
+ IX86_BUILTIN_PMOVUSQB512_MEM,
IX86_BUILTIN_PMOVUSQD512,
+ IX86_BUILTIN_PMOVUSQD512_MEM,
IX86_BUILTIN_PMOVUSQW512,
+ IX86_BUILTIN_PMOVUSQW512_MEM,
IX86_BUILTIN_PMOVZXBD512,
IX86_BUILTIN_PMOVZXBQ512,
IX86_BUILTIN_PMOVZXDQ512,
{ OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_storedquv16si_mask, "__builtin_ia32_storedqusi512_mask", IX86_BUILTIN_STOREDQUSI512, UNKNOWN, (int) VOID_FTYPE_PV16SI_V16SI_HI },
{ OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_storedquv8di_mask, "__builtin_ia32_storedqudi512_mask", IX86_BUILTIN_STOREDQUDI512, UNKNOWN, (int) VOID_FTYPE_PV8DI_V8DI_QI },
{ OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_storeupd512_mask, "__builtin_ia32_storeupd512_mask", IX86_BUILTIN_STOREUPD512, UNKNOWN, (int) VOID_FTYPE_PV8DF_V8DF_QI },
+ { OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_us_truncatev8div8si2_mask_store, "__builtin_ia32_pmovusqd512mem_mask", IX86_BUILTIN_PMOVUSQD512_MEM, UNKNOWN, (int) VOID_FTYPE_PV8SI_V8DI_QI },
+ { OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_ss_truncatev8div8si2_mask_store, "__builtin_ia32_pmovsqd512mem_mask", IX86_BUILTIN_PMOVSQD512_MEM, UNKNOWN, (int) VOID_FTYPE_PV8SI_V8DI_QI },
+ { OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_truncatev8div8si2_mask_store, "__builtin_ia32_pmovqd512mem_mask", IX86_BUILTIN_PMOVQD512_MEM, UNKNOWN, (int) VOID_FTYPE_PV8SI_V8DI_QI },
+ { OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_us_truncatev8div8hi2_mask_store, "__builtin_ia32_pmovusqw512mem_mask", IX86_BUILTIN_PMOVUSQW512_MEM, UNKNOWN, (int) VOID_FTYPE_PV8HI_V8DI_QI },
+ { OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_ss_truncatev8div8hi2_mask_store, "__builtin_ia32_pmovsqw512mem_mask", IX86_BUILTIN_PMOVSQW512_MEM, UNKNOWN, (int) VOID_FTYPE_PV8HI_V8DI_QI },
+ { OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_truncatev8div8hi2_mask_store, "__builtin_ia32_pmovqw512mem_mask", IX86_BUILTIN_PMOVQW512_MEM, UNKNOWN, (int) VOID_FTYPE_PV8HI_V8DI_QI },
+ { OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_us_truncatev16siv16hi2_mask_store, "__builtin_ia32_pmovusdw512mem_mask", IX86_BUILTIN_PMOVUSDW512_MEM, UNKNOWN, (int) VOID_FTYPE_PV16HI_V16SI_HI },
+ { OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_ss_truncatev16siv16hi2_mask_store, "__builtin_ia32_pmovsdw512mem_mask", IX86_BUILTIN_PMOVSDW512_MEM, UNKNOWN, (int) VOID_FTYPE_PV16HI_V16SI_HI },
+ { OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_truncatev16siv16hi2_mask_store, "__builtin_ia32_pmovdw512mem_mask", IX86_BUILTIN_PMOVDW512_MEM, UNKNOWN, (int) VOID_FTYPE_PV16HI_V16SI_HI },
+ { OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_truncatev8div16qi2_mask_store, "__builtin_ia32_pmovqb512mem_mask", IX86_BUILTIN_PMOVQB512_MEM, UNKNOWN, (int) VOID_FTYPE_PV16QI_V8DI_QI },
+ { OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_us_truncatev8div16qi2_mask_store, "__builtin_ia32_pmovusqb512mem_mask", IX86_BUILTIN_PMOVUSQB512_MEM, UNKNOWN, (int) VOID_FTYPE_PV16QI_V8DI_QI },
+ { OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_ss_truncatev8div16qi2_mask_store, "__builtin_ia32_pmovsqb512mem_mask", IX86_BUILTIN_PMOVSQB512_MEM, UNKNOWN, (int) VOID_FTYPE_PV16QI_V8DI_QI },
+ { OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_us_truncatev16siv16qi2_mask_store, "__builtin_ia32_pmovusdb512mem_mask", IX86_BUILTIN_PMOVUSDB512_MEM, UNKNOWN, (int) VOID_FTYPE_PV16QI_V16SI_HI },
+ { OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_ss_truncatev16siv16qi2_mask_store, "__builtin_ia32_pmovsdb512mem_mask", IX86_BUILTIN_PMOVSDB512_MEM, UNKNOWN, (int) VOID_FTYPE_PV16QI_V16SI_HI },
+ { OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_truncatev16siv16qi2_mask_store, "__builtin_ia32_pmovdb512mem_mask", IX86_BUILTIN_PMOVDB512_MEM, UNKNOWN, (int) VOID_FTYPE_PV16QI_V16SI_HI },
{ OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_storeups512_mask, "__builtin_ia32_storeups512_mask", IX86_BUILTIN_STOREUPS512, UNKNOWN, (int) VOID_FTYPE_PV16SF_V16SF_HI },
{ OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_storev16sf_mask, "__builtin_ia32_storeaps512_mask", IX86_BUILTIN_STOREAPS512, UNKNOWN, (int) VOID_FTYPE_PV16SF_V16SF_HI },
{ OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_storev16si_mask, "__builtin_ia32_movdqa32store512_mask", IX86_BUILTIN_MOVDQA32STORE512, UNKNOWN, (int) VOID_FTYPE_PV16SI_V16SI_HI },
{ OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_vcvtps2ph512_mask, "__builtin_ia32_vcvtps2ph512_mask", IX86_BUILTIN_CVTPS2PH512, UNKNOWN, (int) V16HI_FTYPE_V16SF_INT_V16HI_HI },
{ OPTION_MASK_ISA_AVX512F, CODE_FOR_ufloatv8siv8df_mask, "__builtin_ia32_cvtudq2pd512_mask", IX86_BUILTIN_CVTUDQ2PD512, UNKNOWN, (int) V8DF_FTYPE_V8SI_V8DF_QI },
{ OPTION_MASK_ISA_AVX512F, CODE_FOR_cvtusi2sd32, "__builtin_ia32_cvtusi2sd32", IX86_BUILTIN_CVTUSI2SD32, UNKNOWN, (int) V2DF_FTYPE_V2DF_UINT },
+ { OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_expandv8df, "__builtin_ia32_expanddf512", IX86_BUILTIN_EXPANDPD512_NOMASK, UNKNOWN, (int) V8DF_FTYPE_V8DF },
{ OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_expandv8df_mask, "__builtin_ia32_expanddf512_mask", IX86_BUILTIN_EXPANDPD512, UNKNOWN, (int) V8DF_FTYPE_V8DF_V8DF_QI },
{ OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_expandv8df_maskz, "__builtin_ia32_expanddf512_maskz", IX86_BUILTIN_EXPANDPD512Z, UNKNOWN, (int) V8DF_FTYPE_V8DF_V8DF_QI },
+ { OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_expandv16sf, "__builtin_ia32_expandsf512", IX86_BUILTIN_EXPANDPS512_NOMASK, UNKNOWN, (int) V16SF_FTYPE_V16SF },
{ OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_expandv16sf_mask, "__builtin_ia32_expandsf512_mask", IX86_BUILTIN_EXPANDPS512, UNKNOWN, (int) V16SF_FTYPE_V16SF_V16SF_HI },
{ OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_expandv16sf_maskz, "__builtin_ia32_expandsf512_maskz", IX86_BUILTIN_EXPANDPS512Z, UNKNOWN, (int) V16SF_FTYPE_V16SF_V16SF_HI },
{ OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_vextractf32x4_mask, "__builtin_ia32_extractf32x4_mask", IX86_BUILTIN_EXTRACTF32X4, UNKNOWN, (int) V4SF_FTYPE_V16SF_INT_V4SF_QI },
case VOID_FTYPE_PV2DI_V2DI_V2DI:
case VOID_FTYPE_PDOUBLE_V2DF_QI:
case VOID_FTYPE_PFLOAT_V4SF_QI:
+ case VOID_FTYPE_PV8SI_V8DI_QI:
+ case VOID_FTYPE_PV8HI_V8DI_QI:
+ case VOID_FTYPE_PV16HI_V16SI_HI:
+ case VOID_FTYPE_PV16QI_V8DI_QI:
+ case VOID_FTYPE_PV16QI_V16SI_HI:
nargs = 2;
klass = store;
/* Reserve memory operand for target. */
UNSPEC_COMPRESS
UNSPEC_COMPRESS_STORE
UNSPEC_EXPAND
+ UNSPEC_EXPAND_NOMASK
UNSPEC_MASKED_EQ
UNSPEC_MASKED_GT
(set_attr "prefix" "evex")
(set_attr "mode" "<sseinsnmode>")])
+(define_expand "avx512f_<code><pmov_src_lower><mode>2_mask_store"
+ [(set (match_operand:PMOV_DST_MODE 0 "memory_operand")
+ (vec_merge:PMOV_DST_MODE
+ (any_truncate:PMOV_DST_MODE
+ (match_operand:<pmov_src_mode> 1 "register_operand"))
+ (match_dup 0)
+ (match_operand:<avx512fmaskmode> 2 "register_operand")))]
+ "TARGET_AVX512F")
+
(define_insn "*avx512f_<code>v8div16qi2"
[(set (match_operand:V16QI 0 "register_operand" "=v")
(vec_concat:V16QI
(set_attr "prefix" "evex")
(set_attr "mode" "TI")])
-(define_insn "*avx512f_<code>v8div16qi2_store_mask"
+(define_insn "avx512f_<code>v8div16qi2_mask_store"
[(set (match_operand:V16QI 0 "memory_operand" "=m")
(vec_concat:V16QI
(vec_merge:V8QI
"TARGET_AVX512F"
"operands[2] = CONST0_RTX (<MODE>mode);")
+(define_insn "avx512f_expand<mode>"
+ [(set (match_operand:VI48F_512 0 "register_operand" "=v,v")
+ (unspec:VI48F_512
+ [(match_operand:VI48F_512 1 "nonimmediate_operand" "v,m")]
+ UNSPEC_EXPAND_NOMASK))]
+ "TARGET_AVX512F"
+ "v<sseintprefix>expand<ssemodesuffix>\t{%1, %0|%0, %1}"
+ [(set_attr "type" "ssemov")
+ (set_attr "prefix" "evex")
+ (set_attr "memory" "none,load")
+ (set_attr "mode" "<sseinsnmode>")])
+
(define_insn "avx512f_expand<mode>_mask"
[(set (match_operand:VI48F_512 0 "register_operand" "=v,v")
(unspec:VI48F_512
+2014-01-27 Ilya Tocar <ilya.tocar@intel.com>
+
+ * gcc.target/i386/avx512f-vexpandpd-1.c: Also test _mm512_expand_pd.
+ * gcc.target/i386/avx512f-vexpandpd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vexpandps-1.c: Also test _mm512_expand_ps.
+ * gcc.target/i386/avx512f-vexpandps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vmovdqu64-1.c: Also test _mm512_storeu_epi64.
+ * gcc.target/i386/avx512f-vmovdqu64-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpged-1.c: New.
+ * gcc.target/i386/avx512f-vpcmpged-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpgeq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpgeq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpgeud-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpgeud-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpgeuq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpgeuq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpled-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpled-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpleq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpleq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpleud-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpleud-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpleuq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpleuq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpltd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpltd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpltq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpltq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpltud-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpltud-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpltuq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpltuq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpneqd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpneqd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpneqq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpneqq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpnequd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpnequd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpnequq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpnequq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovdb-1.c: Also test
+ _mm512_mask_cvtepi32_storeu_epi8.
+ * gcc.target/i386/avx512f-vpmovdb-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovdw-1.c: Also test
+ _mm512_mask_cvtepi32_storeu_epi16.
+ * gcc.target/i386/avx512f-vpmovdw-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovqb-1.c: Also test
+ _mm512_mask_cvtepi64_storeu_epi8.
+ * gcc.target/i386/avx512f-vpmovqb-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovqw-1.c: Also test
+ _mm512_mask_cvtepi64_storeu_epi16.
+ * gcc.target/i386/avx512f-vpmovqw-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovqd-1.c: Also test
+ _mm512_mask_cvtepi64_storeu_epi32.
+ * gcc.target/i386/avx512f-vpmovqd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovsdb-1.c: Also test
+ _mm512_mask_cvtsepi32_storeu_epi8.
+ * gcc.target/i386/avx512f-vpmovsdb-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovsdw-1.c: Also test
+ _mm512_mask_cvtsepi32_storeu_epi16.
+ * gcc.target/i386/avx512f-vpmovsdw-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovsqb-1.c: Also test
+ _mm512_mask_cvtsepi64_storeu_epi8.
+ * gcc.target/i386/avx512f-vpmovsqb-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovsqw-1.c: Also test
+ _mm512_mask_cvtsepi64_storeu_epi16.
+ * gcc.target/i386/avx512f-vpmovsqw-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovsqd-1.c: Also test
+ _mm512_mask_cvtsepi64_storeu_epi32.
+ * gcc.target/i386/avx512f-vpmovsqd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovusdb-1.c: Also test
+ _mm512_mask_cvtusepi32_storeu_epi8.
+ * gcc.target/i386/avx512f-vpmovusdb-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovusdw-1.c: Also test
+ _mm512_mask_cvtusepi32_storeu_epi16.
+ * gcc.target/i386/avx512f-vpmovusdw-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovusqb-1.c: Also test
+ _mm512_mask_cvtusepi64_storeu_epi8.
+ * gcc.target/i386/avx512f-vpmovusqb-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovusqw-1.c: Also test
+ _mm512_mask_cvtusepi64_storeu_epi16.
+ * gcc.target/i386/avx512f-vpmovusqw-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovusqd-1.c: Also test
+ _mm512_mask_cvtusepi64_storeu_epi32.
+ * gcc.target/i386/avx512f-vpmovusqd-2.c: Ditto.
+ * gcc.target/i386/m128-check.h: Add checkVs, checkVb.
+
2014-01-27 Kirill Yukhin <kirill.yukhin@intel.com>
* gcc.target/i386/avx512pf-vgatherpf0dpd-1.c: New.
#if SIZE <= 8
#define MASK_TYPE __mmask8
#define MASK_VALUE 0xB9
+#define MASK_ALL_ONES 0xFF
#elif SIZE <= 16
#define MASK_TYPE __mmask16
#define MASK_VALUE 0xA6BA
+#define MASK_ALL_ONES 0xFFFF
#endif
/* { dg-do compile } */
/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vexpandpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]" 5 } } */
/* { dg-final { scan-assembler-times "vexpandpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
/* { dg-final { scan-assembler-times "vexpandpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
void extern
avx512f_test (void)
{
+ x = _mm512_expand_pd (x);
x = _mm512_mask_expand_pd (x, m, x);
x = _mm512_maskz_expand_pd (m, x);
static void
TEST (void)
{
- UNION_TYPE (AVX512F_LEN, d) s1, res1, res2, res3, res4;
+ UNION_TYPE (AVX512F_LEN, d) s1, res1, res2, res3, res4, res5;
MASK_TYPE mask = MASK_VALUE;
double s2[SIZE];
double res_ref1[SIZE];
double res_ref2[SIZE];
+ double res_ref3[SIZE];
int i, sign = 1;
for (i = 0; i < SIZE; i++)
{
s1.a[i] = 123.456 * (i + 200) * sign;
s2[i] = 789.012 * (i + 300) * sign;
- res1.a[i] = DEFAULT_VALUE;
- res3.a[i] = DEFAULT_VALUE;
+ res2.a[i] = DEFAULT_VALUE;
+ res4.a[i] = DEFAULT_VALUE;
sign = -sign;
}
- res1.x = INTRINSIC (_mask_expand_pd) (res1.x, mask, s1.x);
- res2.x = INTRINSIC (_maskz_expand_pd) (mask, s1.x);
- res3.x = INTRINSIC (_mask_expandloadu_pd) (res3.x, mask, s2);
- res4.x = INTRINSIC (_maskz_expandloadu_pd) (mask, s2);
+ res1.x = INTRINSIC (_expand_pd) (s1.x);
+ res2.x = INTRINSIC (_mask_expand_pd) (res2.x, mask, s1.x);
+ res3.x = INTRINSIC (_maskz_expand_pd) (mask, s1.x);
+ res4.x = INTRINSIC (_mask_expandloadu_pd) (res4.x, mask, s2);
+ res5.x = INTRINSIC (_maskz_expandloadu_pd) (mask, s2);
- CALC (s1.a, res_ref1, mask);
- CALC (s2, res_ref2, mask);
+ /* no mask is the same as all ones mask. */
+ CALC (s1.a, res_ref1, MASK_ALL_ONES);
+ CALC (s1.a, res_ref2, mask);
+ CALC (s2, res_ref3, mask);
- MASK_MERGE (d) (res_ref1, mask, SIZE);
if (UNION_CHECK (AVX512F_LEN, d) (res1, res_ref1))
abort ();
- MASK_ZERO (d) (res_ref1, mask, SIZE);
- if (UNION_CHECK (AVX512F_LEN, d) (res2, res_ref1))
+ MASK_MERGE (d) (res_ref2, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res2, res_ref2))
abort ();
- MASK_MERGE (d) (res_ref2, mask, SIZE);
+ MASK_ZERO (d) (res_ref2, mask, SIZE);
if (UNION_CHECK (AVX512F_LEN, d) (res3, res_ref2))
abort ();
- MASK_ZERO (d) (res_ref2, mask, SIZE);
- if (UNION_CHECK (AVX512F_LEN, d) (res4, res_ref2))
+ MASK_MERGE (d) (res_ref3, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res4, res_ref3))
+ abort ();
+
+ MASK_ZERO (d) (res_ref3, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res5, res_ref3))
abort ();
}
/* { dg-do compile } */
/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vexpandps\[ \\t\]+\[^\n\]*%zmm\[0-9\]" 5 } } */
/* { dg-final { scan-assembler-times "vexpandps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
/* { dg-final { scan-assembler-times "vexpandps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
void extern
avx512f_test (void)
{
+ x = _mm512_expand_ps (x);
x = _mm512_mask_expand_ps (x, m, x);
x = _mm512_maskz_expand_ps (m, x);
static void
TEST (void)
{
- UNION_TYPE (AVX512F_LEN, ) s1, res1, res2, res3, res4;
+ UNION_TYPE (AVX512F_LEN, ) s1, res1, res2, res3, res4, res5;
MASK_TYPE mask = MASK_VALUE;
float s2[SIZE];
float res_ref1[SIZE];
float res_ref2[SIZE];
+ float res_ref3[SIZE];
int i, sign = 1;
for (i = 0; i < SIZE; i++)
{
s1.a[i] = 123.456 * (i + 200) * sign;
s2[i] = 789.012 * (i + 300) * sign;
- res1.a[i] = DEFAULT_VALUE;
- res3.a[i] = DEFAULT_VALUE;
+ res2.a[i] = DEFAULT_VALUE;
+ res4.a[i] = DEFAULT_VALUE;
sign = -sign;
}
- res1.x = INTRINSIC (_mask_expand_ps) (res1.x, mask, s1.x);
- res2.x = INTRINSIC (_maskz_expand_ps) (mask, s1.x);
- res3.x = INTRINSIC (_mask_expandloadu_ps) (res3.x, mask, s2);
- res4.x = INTRINSIC (_maskz_expandloadu_ps) (mask, s2);
+ res1.x = INTRINSIC (_expand_ps) (s1.x);
+ res2.x = INTRINSIC (_mask_expand_ps) (res2.x, mask, s1.x);
+ res3.x = INTRINSIC (_maskz_expand_ps) (mask, s1.x);
+ res4.x = INTRINSIC (_mask_expandloadu_ps) (res4.x, mask, s2);
+ res5.x = INTRINSIC (_maskz_expandloadu_ps) (mask, s2);
- CALC (s1.a, res_ref1, mask);
- CALC (s2, res_ref2, mask);
+ CALC (s1.a, res_ref1, MASK_ALL_ONES);
+ CALC (s1.a, res_ref2, mask);
+ CALC (s2, res_ref3, mask);
- MASK_MERGE () (res_ref1, mask, SIZE);
if (UNION_CHECK (AVX512F_LEN, ) (res1, res_ref1))
abort ();
- MASK_ZERO () (res_ref1, mask, SIZE);
- if (UNION_CHECK (AVX512F_LEN, ) (res2, res_ref1))
+ MASK_MERGE () (res_ref2, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (res2, res_ref2))
abort ();
- MASK_MERGE () (res_ref2, mask, SIZE);
+ MASK_ZERO () (res_ref2, mask, SIZE);
if (UNION_CHECK (AVX512F_LEN, ) (res3, res_ref2))
abort ();
- MASK_ZERO () (res_ref2, mask, SIZE);
- if (UNION_CHECK (AVX512F_LEN, ) (res4, res_ref2))
+ MASK_MERGE () (res_ref3, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (res4, res_ref3))
+ abort ();
+
+ MASK_ZERO () (res_ref3, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (res5, res_ref3))
abort ();
}
/* { dg-final { scan-assembler-times "vmovdqu64\[ \\t\]+\[^\n\]*\\)\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vmovdqu64\[ \\t\]+\[^\n\]*\\)\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
/* { dg-final { scan-assembler-times "vmovdqu64\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*\\)\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vmovdqu64\[ \\t\]+\[^\n\]*%zmm\[0-9\]" 4 } } */
#include <immintrin.h>
x = _mm512_maskz_loadu_epi64 (m, p);
_mm512_mask_storeu_epi64 (p, m, x);
+ _mm512_storeu_epi64 (p, x);
}
TEST (void)
{
UNION_TYPE (AVX512F_LEN, i_q) s2, res1, res2;
- EVAL(unaligned_array, AVX512F_LEN,) s1, res3;
+ EVAL(unaligned_array, AVX512F_LEN,) s1, res3, res4;
MASK_TYPE mask = MASK_VALUE;
int i, sign = 1;
res1.x = INTRINSIC (_mask_loadu_epi64) (res1.x, mask, s1.a);
res2.x = INTRINSIC (_maskz_loadu_epi64) (mask, s1.a);
INTRINSIC (_mask_storeu_epi64) (res3.a, mask, s2.x);
+ INTRINSIC (_storeu_epi64) (res4.a, s2.x);
MASK_MERGE (i_q) (s1.a, mask, SIZE);
if (UNION_CHECK (AVX512F_LEN, i_q) (res1, s1.a))
if (UNION_CHECK (AVX512F_LEN, i_q) (res2, s1.a))
abort ();
+ if (UNION_CHECK (AVX512F_LEN, i_q) (s2, res4.a))
+ abort ();
+
MASK_MERGE (i_q) (s2.a, mask, SIZE);
if (UNION_CHECK (AVX512F_LEN, i_q) (s2, res3.a))
abort ();
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcmpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmpge_epi32_mask (x, x);
+}
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *r, int *s1, int *s2)
+{
+ int i;
+ *r = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (s1[i] >= s2[i])
+ *r = *r | (one << i);
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_d) src1, src2;
+ MASK_TYPE res_ref, res1;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ src1.a[i * 2] = i;
+ src1.a[i * 2 + 1] = i * i;
+ src2.a[i * 2] = 2 * i;
+ src2.a[i * 2 + 1] = i * i;
+ }
+
+ res1 = INTRINSIC (_cmpge_epi32_mask) (src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res_ref != res1)
+ abort ();
+}
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcmpq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmpge_epi64_mask (x, x);
+}
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *r, long long *s1, long long *s2)
+{
+ int i;
+ *r = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (s1[i] >= s2[i])
+ *r = *r | (one << i);
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_q) src1, src2;
+ MASK_TYPE res1, res_ref;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ src1.a[i * 2] = i;
+ src1.a[i * 2 + 1] = i * i;
+ src2.a[i * 2] = 2 * i;
+ src2.a[i * 2 + 1] = i * i;
+ }
+
+ res1 = INTRINSIC (_cmpge_epi64_mask) (src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res1 != res_ref)
+ abort ();
+}
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcmpud\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmpge_epu32_mask (x, x);
+}
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *r, int *s1, int *s2)
+{
+ int i;
+ *r = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (s1[i] >= s2[i])
+ *r = *r | (one << i);
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_d) src1, src2;
+ MASK_TYPE res_ref, res1;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ src1.a[i * 2] = i;
+ src1.a[i * 2 + 1] = i * i;
+ src2.a[i * 2] = 2 * i;
+ src2.a[i * 2 + 1] = i * i;
+ }
+
+ res1 = INTRINSIC (_cmpge_epu32_mask) (src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res_ref != res1)
+ abort ();
+}
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcmpuq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmpge_epu64_mask (x, x);
+}
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *r, long long *s1, long long *s2)
+{
+ int i;
+ *r = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (s1[i] >= s2[i])
+ *r = *r | (one << i);
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_q) src1, src2;
+ MASK_TYPE res1, res_ref;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ src1.a[i * 2] = i;
+ src1.a[i * 2 + 1] = i * i;
+ src2.a[i * 2] = 2 * i;
+ src2.a[i * 2 + 1] = i * i;
+ }
+
+ res1 = INTRINSIC (_cmpge_epu64_mask) (src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res1 != res_ref)
+ abort ();
+}
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcmpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmple_epi32_mask (x, x);
+}
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *r, int *s1, int *s2)
+{
+ int i;
+ *r = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (s1[i] <= s2[i])
+ *r = *r | (one << i);
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_d) src1, src2;
+ MASK_TYPE res_ref, res1;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ src1.a[i * 2] = i;
+ src1.a[i * 2 + 1] = i * i;
+ src2.a[i * 2] = 2 * i;
+ src2.a[i * 2 + 1] = i * i;
+ }
+
+ res1 = INTRINSIC (_cmple_epi32_mask) (src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res_ref != res1)
+ abort ();
+}
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcmpq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmple_epi64_mask (x, x);
+}
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *r, long long *s1, long long *s2)
+{
+ int i;
+ *r = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (s1[i] <= s2[i])
+ *r = *r | (one << i);
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_q) src1, src2;
+ MASK_TYPE res1, res_ref;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ src1.a[i * 2] = i;
+ src1.a[i * 2 + 1] = i * i;
+ src2.a[i * 2] = 2 * i;
+ src2.a[i * 2 + 1] = i * i;
+ }
+
+ res1 = INTRINSIC (_cmple_epi64_mask) (src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res1 != res_ref)
+ abort ();
+}
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcmpud\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmple_epu32_mask (x, x);
+}
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *r, int *s1, int *s2)
+{
+ int i;
+ *r = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (s1[i] <= s2[i])
+ *r = *r | (one << i);
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_d) src1, src2;
+ MASK_TYPE res_ref, res1;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ src1.a[i * 2] = i;
+ src1.a[i * 2 + 1] = i * i;
+ src2.a[i * 2] = 2 * i;
+ src2.a[i * 2 + 1] = i * i;
+ }
+
+ res1 = INTRINSIC (_cmple_epu32_mask) (src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res_ref != res1)
+ abort ();
+}
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcmpuq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmple_epu64_mask (x, x);
+}
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *r, long long *s1, long long *s2)
+{
+ int i;
+ *r = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (s1[i] <= s2[i])
+ *r = *r | (one << i);
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_q) src1, src2;
+ MASK_TYPE res1, res_ref;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ src1.a[i * 2] = i;
+ src1.a[i * 2 + 1] = i * i;
+ src2.a[i * 2] = 2 * i;
+ src2.a[i * 2 + 1] = i * i;
+ }
+
+ res1 = INTRINSIC (_cmple_epu64_mask) (src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res1 != res_ref)
+ abort ();
+}
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcmpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmplt_epi32_mask (x, x);
+}
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *r, int *s1, int *s2)
+{
+ int i;
+ *r = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (s1[i] < s2[i])
+ *r = *r | (one << i);
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_d) src1, src2;
+ MASK_TYPE res_ref, res1;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ src1.a[i * 2] = i;
+ src1.a[i * 2 + 1] = i * i;
+ src2.a[i * 2] = 2 * i;
+ src2.a[i * 2 + 1] = i * i;
+ }
+
+ res1 = INTRINSIC (_cmplt_epi32_mask) (src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res_ref != res1)
+ abort ();
+}
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcmpq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmplt_epi64_mask (x, x);
+}
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *r, long long *s1, long long *s2)
+{
+ int i;
+ *r = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (s1[i] < s2[i])
+ *r = *r | (one << i);
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_q) src1, src2;
+ MASK_TYPE res1, res_ref;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ src1.a[i * 2] = i;
+ src1.a[i * 2 + 1] = i * i;
+ src2.a[i * 2] = 2 * i;
+ src2.a[i * 2 + 1] = i * i;
+ }
+
+ res1 = INTRINSIC (_cmplt_epi64_mask) (src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res1 != res_ref)
+ abort ();
+}
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcmpud\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmplt_epu32_mask (x, x);
+}
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *r, int *s1, int *s2)
+{
+ int i;
+ *r = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (s1[i] < s2[i])
+ *r = *r | (one << i);
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_d) src1, src2;
+ MASK_TYPE res_ref, res1;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ src1.a[i * 2] = i;
+ src1.a[i * 2 + 1] = i * i;
+ src2.a[i * 2] = 2 * i;
+ src2.a[i * 2 + 1] = i * i;
+ }
+
+ res1 = INTRINSIC (_cmplt_epu32_mask) (src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res_ref != res1)
+ abort ();
+}
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcmpuq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmplt_epu64_mask (x, x);
+}
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *r, long long *s1, long long *s2)
+{
+ int i;
+ *r = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (s1[i] < s2[i])
+ *r = *r | (one << i);
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_q) src1, src2;
+ MASK_TYPE res1, res_ref;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ src1.a[i * 2] = i;
+ src1.a[i * 2 + 1] = i * i;
+ src2.a[i * 2] = 2 * i;
+ src2.a[i * 2 + 1] = i * i;
+ }
+
+ res1 = INTRINSIC (_cmplt_epu64_mask) (src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res1 != res_ref)
+ abort ();
+}
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcmpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmpneq_epi32_mask (x, x);
+}
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *r, int *s1, int *s2)
+{
+ int i;
+ *r = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (s1[i] != s2[i])
+ *r = *r | (one << i);
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_d) src1, src2;
+ MASK_TYPE res_ref, res1;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ src1.a[i * 2] = i;
+ src1.a[i * 2 + 1] = i * i;
+ src2.a[i * 2] = 2 * i;
+ src2.a[i * 2 + 1] = i * i;
+ }
+
+ res1 = INTRINSIC (_cmpneq_epi32_mask) (src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res_ref != res1)
+ abort ();
+}
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcmpq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmpneq_epi64_mask (x, x);
+}
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *r, long long *s1, long long *s2)
+{
+ int i;
+ *r = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (s1[i] != s2[i])
+ *r = *r | (one << i);
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_q) src1, src2;
+ MASK_TYPE res1, res_ref;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ src1.a[i * 2] = i;
+ src1.a[i * 2 + 1] = i * i;
+ src2.a[i * 2] = 2 * i;
+ src2.a[i * 2 + 1] = i * i;
+ }
+
+ res1 = INTRINSIC (_cmpneq_epi64_mask) (src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res1 != res_ref)
+ abort ();
+}
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcmpud\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmpneq_epu32_mask (x, x);
+}
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *r, int *s1, int *s2)
+{
+ int i;
+ *r = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (s1[i] != s2[i])
+ *r = *r | (one << i);
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_d) src1, src2;
+ MASK_TYPE res_ref, res1;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ src1.a[i * 2] = i;
+ src1.a[i * 2 + 1] = i * i;
+ src2.a[i * 2] = 2 * i;
+ src2.a[i * 2 + 1] = i * i;
+ }
+
+ res1 = INTRINSIC (_cmpneq_epu32_mask) (src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res_ref != res1)
+ abort ();
+}
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcmpuq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmpneq_epu64_mask (x, x);
+}
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *r, long long *s1, long long *s2)
+{
+ int i;
+ *r = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (s1[i] != s2[i])
+ *r = *r | (one << i);
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_q) src1, src2;
+ MASK_TYPE res1, res_ref;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ src1.a[i * 2] = i;
+ src1.a[i * 2 + 1] = i * i;
+ src2.a[i * 2] = 2 * i;
+ src2.a[i * 2 + 1] = i * i;
+ }
+
+ res1 = INTRINSIC (_cmpneq_epu64_mask) (src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res1 != res_ref)
+ abort ();
+}
/* { dg-do compile } */
/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovdb\[ \\t\]+\[^\n\]*" 4 } } */
/* { dg-final { scan-assembler-times "vpmovdb\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vpmovdb\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vpmovdb\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
res = _mm512_cvtepi32_epi8 (s);
res = _mm512_mask_cvtepi32_epi8 (res, m, s);
res = _mm512_maskz_cvtepi32_epi8 (m, s);
+ _mm512_mask_cvtepi32_storeu_epi8 ((void *) &res, m, s);
}
{
int i, sign;
UNION_TYPE (128, i_b) res1, res2, res3;
+ char res4[16];
UNION_TYPE (AVX512F_LEN, i_d) src;
MASK_TYPE mask = MASK_VALUE;
char res_ref[16];
src.a[i] = 1 + 34 * i * sign;
sign = sign * -1;
res2.a[i] = DEFAULT_VALUE;
+ res4[i] = DEFAULT_VALUE;
}
res1.x = INTRINSIC (_cvtepi32_epi8) (src.x);
res2.x = INTRINSIC (_mask_cvtepi32_epi8) (res2.x, mask, src.x);
res3.x = INTRINSIC (_maskz_cvtepi32_epi8) (mask, src.x);
+ INTRINSIC (_mask_cvtepi32_storeu_epi8) (res4, mask, src.x);
CALC (res_ref, src.a);
if (UNION_CHECK (128, i_b) (res2, res_ref))
abort ();
+ if (checkVc (res4, res_ref, 16))
+ abort ();
+
MASK_ZERO (i_b) (res_ref, mask, SIZE);
if (UNION_CHECK (128, i_b) (res3, res_ref))
abort ();
/* { dg-do compile } */
/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovdw\[ \\t\]+\[^\n\]*" 4 } } */
/* { dg-final { scan-assembler-times "vpmovdw\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vpmovdw\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vpmovdw\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
res = _mm512_cvtepi32_epi16 (s);
res = _mm512_mask_cvtepi32_epi16 (res, m, s);
res = _mm512_maskz_cvtepi32_epi16 (m, s);
+ _mm512_mask_cvtepi32_storeu_epi16 ((void *) &res, m, s);
}
{
int i, sign;
UNION_TYPE (AVX512F_LEN_HALF, i_w) res1, res2, res3;
+ short res4[SIZE_HALF];
UNION_TYPE (AVX512F_LEN, i_d) src;
MASK_TYPE mask = MASK_VALUE;
short res_ref[SIZE_HALF];
src.a[i] = 1 + 34 * i * sign;
sign = sign * -1;
res2.a[i] = DEFAULT_VALUE;
+ res4[i] = DEFAULT_VALUE;
}
res1.x = INTRINSIC (_cvtepi32_epi16) (src.x);
res2.x = INTRINSIC (_mask_cvtepi32_epi16) (res2.x, mask, src.x);
res3.x = INTRINSIC (_maskz_cvtepi32_epi16) (mask, src.x);
+ INTRINSIC (_mask_cvtepi32_storeu_epi16) (res4, mask, src.x);
CALC (res_ref, src.a);
if (UNION_CHECK (AVX512F_LEN_HALF, i_w) (res2, res_ref))
abort ();
+ if (checkVs (res4, res_ref, SIZE_HALF))
+ abort ();
+
MASK_ZERO (i_w) (res_ref, mask, SIZE);
if (UNION_CHECK (AVX512F_LEN_HALF, i_w) (res3, res_ref))
abort ();
/* { dg-do compile } */
/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovqb\[ \\t\]+\[^\n\]*" 4 } } */
/* { dg-final { scan-assembler-times "vpmovqb\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vpmovqb\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vpmovqb\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
res = _mm512_cvtepi64_epi8 (s);
res = _mm512_mask_cvtepi64_epi8 (res, m, s);
res = _mm512_maskz_cvtepi64_epi8 (m, s);
+ _mm512_mask_cvtepi64_storeu_epi8 ((void *) &res, m, s);
}
#define SIZE (AVX512F_LEN / 64)
#include "avx512f-mask-type.h"
-CALC (char *r, long long *s)
+CALC (char *r, long long *s, int mem)
{
int i;
- for (i = 0; i < 16; i++)
+ /* Don't zero out upper half if destination is memory. */
+ int len = mem ? 8 : 16;
+ for (i = 0; i < len; i++)
{
r[i] = (i < SIZE) ? (char) s[i] : 0;
}
{
int i, sign;
UNION_TYPE (128, i_b) res1, res2, res3;
+ char res4[16];
UNION_TYPE (AVX512F_LEN, i_q) src;
MASK_TYPE mask = MASK_VALUE;
char res_ref[16];
+ char res_ref2[16];
sign = -1;
for (i = 0; i < SIZE; i++)
src.a[i] = 1 + 34 * i * sign;
sign = sign * -1;
res2.a[i] = DEFAULT_VALUE;
+ res4[i] = DEFAULT_VALUE;
+ }
+
+ for (i = SIZE; i < 16; i++)
+ {
+ /* To check that memory is not touched. */
+ res4[i] = DEFAULT_VALUE * 2;
+ res_ref2[i] = DEFAULT_VALUE * 2;
}
res1.x = INTRINSIC (_cvtepi64_epi8) (src.x);
res2.x = INTRINSIC (_mask_cvtepi64_epi8) (res2.x, mask, src.x);
res3.x = INTRINSIC (_maskz_cvtepi64_epi8) (mask, src.x);
- CALC (res_ref, src.a);
+ CALC (res_ref, src.a, 0);
if (UNION_CHECK (128, i_b) (res1, res_ref))
abort ();
MASK_ZERO (i_b) (res_ref, mask, SIZE);
if (UNION_CHECK (128, i_b) (res3, res_ref))
abort ();
+
+
+ INTRINSIC (_mask_cvtepi64_storeu_epi8) (res4, mask, src.x);
+
+ CALC (res_ref2, src.a, 1);
+ MASK_MERGE (i_b) (res_ref2, mask, SIZE);
+
+ if (checkVc (res4, res_ref2, 16))
+ abort ();
}
/* { dg-do compile } */
/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovqd\[ \\t\]+\[^\n\]*" 4 } } */
/* { dg-final { scan-assembler-times "vpmovqd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vpmovqd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vpmovqd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
res = _mm512_cvtepi64_epi32 (s);
res = _mm512_mask_cvtepi64_epi32 (res, m, s);
res = _mm512_maskz_cvtepi64_epi32 (m, s);
+ _mm512_mask_cvtepi64_storeu_epi32 ((void *) &res, m, s);
}
TEST (void)
{
int i, sign;
- UNION_TYPE (AVX512F_LEN_HALF, i_d) res1, res2, res3;
+ UNION_TYPE (AVX512F_LEN_HALF, i_d) res1, res2, res3, res5;
+ int res4[SIZE_HALF];
UNION_TYPE (AVX512F_LEN, i_q) src;
MASK_TYPE mask = MASK_VALUE;
int res_ref[SIZE_HALF];
src.a[i] = 1 + 34 * i * sign;
sign = sign * -1;
res2.a[i] = DEFAULT_VALUE;
+ res4[i] = DEFAULT_VALUE;
}
res1.x = INTRINSIC (_cvtepi64_epi32) (src.x);
res2.x = INTRINSIC (_mask_cvtepi64_epi32) (res2.x, mask, src.x);
res3.x = INTRINSIC (_maskz_cvtepi64_epi32) (mask, src.x);
+ INTRINSIC (_mask_cvtepi64_storeu_epi32) (res4, mask, src.x);
+
CALC (res_ref, src.a);
if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res2, res_ref))
abort ();
+ if (checkVi (res4, res_ref, SIZE_HALF))
+ abort ();
+
MASK_ZERO (i_d) (res_ref, mask, SIZE);
if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res3, res_ref))
abort ();
/* { dg-do compile } */
/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovqw\[ \\t\]+\[^\n\]*" 4 } } */
/* { dg-final { scan-assembler-times "vpmovqw\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vpmovqw\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vpmovqw\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
res = _mm512_cvtepi64_epi16 (s);
res = _mm512_mask_cvtepi64_epi16 (res, m, s);
res = _mm512_maskz_cvtepi64_epi16 (m, s);
+ _mm512_mask_cvtepi64_storeu_epi16 ((void *) &res, m, s);
}
{
int i, sign;
UNION_TYPE (128, i_w) res1, res2, res3;
+ short res4[8];
UNION_TYPE (AVX512F_LEN, i_q) src;
MASK_TYPE mask = MASK_VALUE;
short res_ref[8];
src.a[i] = 1 + 34 * i * sign;
sign = sign * -1;
res2.a[i] = DEFAULT_VALUE;
+ res4[i] = DEFAULT_VALUE;
}
res1.x = INTRINSIC (_cvtepi64_epi16) (src.x);
res2.x = INTRINSIC (_mask_cvtepi64_epi16) (res2.x, mask, src.x);
res3.x = INTRINSIC (_maskz_cvtepi64_epi16) (mask, src.x);
+ INTRINSIC (_mask_cvtepi64_storeu_epi16) (res4, mask, src.x);
CALC (res_ref, src.a);
if (UNION_CHECK (128, i_w) (res2, res_ref))
abort ();
+ if (checkVs (res4, res_ref, 8))
+ abort ();
+
MASK_ZERO (i_w) (res_ref, mask, SIZE);
if (UNION_CHECK (128, i_w) (res3, res_ref))
abort ();
/* { dg-do compile } */
/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovsdb\[ \\t\]+\[^\n\]*" 4 } } */
/* { dg-final { scan-assembler-times "vpmovsdb\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vpmovsdb\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vpmovsdb\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
res = _mm512_cvtsepi32_epi8 (s);
res = _mm512_mask_cvtsepi32_epi8 (res, m, s);
res = _mm512_maskz_cvtsepi32_epi8 (m, s);
+ _mm512_mask_cvtsepi32_storeu_epi8 ((void *) &res, m, s);
}
{
int i, sign;
UNION_TYPE (128, i_b) res1, res2, res3;
+ char res4[16];
UNION_TYPE (AVX512F_LEN, i_d) src;
MASK_TYPE mask = MASK_VALUE;
char res_ref[16];
src.a[i] = 1 + 34 * i * sign;
sign = sign * -1;
res2.a[i] = DEFAULT_VALUE;
+ res4[i] = DEFAULT_VALUE;
}
res1.x = INTRINSIC (_cvtsepi32_epi8) (src.x);
res2.x = INTRINSIC (_mask_cvtsepi32_epi8) (res2.x, mask, src.x);
res3.x = INTRINSIC (_maskz_cvtsepi32_epi8) (mask, src.x);
+ INTRINSIC (_mask_cvtsepi32_storeu_epi8) (res4, mask, src.x);
CALC (res_ref, src.a);
if (UNION_CHECK (128, i_b) (res2, res_ref))
abort ();
+ if (checkVc (res4, res_ref, 16))
+ abort ();
+
MASK_ZERO (i_b) (res_ref, mask, SIZE);
if (UNION_CHECK (128, i_b) (res3, res_ref))
abort ();
/* { dg-do compile } */
/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovsdw\[ \\t\]+\[^\n\]*" 4 } } */
/* { dg-final { scan-assembler-times "vpmovsdw\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vpmovsdw\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vpmovsdw\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
res = _mm512_cvtsepi32_epi16 (s);
res = _mm512_mask_cvtsepi32_epi16 (res, m, s);
res = _mm512_maskz_cvtsepi32_epi16 (m, s);
+ _mm512_mask_cvtsepi32_storeu_epi16 ((void *) &res, m, s);
}
{
int i, sign;
UNION_TYPE (AVX512F_LEN_HALF, i_w) res1, res2, res3;
+ short res4[SIZE_HALF];
UNION_TYPE (AVX512F_LEN, i_d) src;
MASK_TYPE mask = MASK_VALUE;
short res_ref[SIZE_HALF];
src.a[i] = 1 + 34 * i * sign;
sign = sign * -1;
res2.a[i] = DEFAULT_VALUE;
+ res4[i] = DEFAULT_VALUE;
}
res1.x = INTRINSIC (_cvtsepi32_epi16) (src.x);
res2.x = INTRINSIC (_mask_cvtsepi32_epi16) (res2.x, mask, src.x);
res3.x = INTRINSIC (_maskz_cvtsepi32_epi16) (mask, src.x);
+ INTRINSIC (_mask_cvtsepi32_storeu_epi16) (res4, mask, src.x);
CALC (res_ref, src.a);
if (UNION_CHECK (AVX512F_LEN_HALF, i_w) (res2, res_ref))
abort ();
+ if (checkVs (res4, res_ref, SIZE_HALF))
+ abort ();
+
MASK_ZERO (i_w) (res_ref, mask, SIZE);
if (UNION_CHECK (AVX512F_LEN_HALF, i_w) (res3, res_ref))
abort ();
/* { dg-do compile } */
/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovsqb\[ \\t\]+\[^\n\]*" 4 } } */
/* { dg-final { scan-assembler-times "vpmovsqb\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vpmovsqb\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vpmovsqb\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
res = _mm512_cvtsepi64_epi8 (s);
res = _mm512_mask_cvtsepi64_epi8 (res, m, s);
res = _mm512_maskz_cvtsepi64_epi8 (m, s);
+ _mm512_mask_cvtsepi64_storeu_epi8 ((void *) &res, m, s);
}
#include "avx512f-mask-type.h"
#include <limits.h>
-CALC (char *r, long long *s)
+CALC (char *r, long long *s, int mem)
{
int i;
- for (i = 0; i < 16; i++)
+ int len = mem ? 8 : 16;
+ for (i = 0; i < len; i++)
{
if (s[i] < CHAR_MIN)
r[i] = CHAR_MIN;
{
int i, sign;
UNION_TYPE (128, i_b) res1, res2, res3;
+ char res4[16];
UNION_TYPE (AVX512F_LEN, i_q) src;
MASK_TYPE mask = MASK_VALUE;
char res_ref[16];
+ char res_ref2[16];
sign = -1;
for (i = 0; i < SIZE; i++)
src.a[i] = 1 + 34 * i * sign;
sign = sign * -1;
res2.a[i] = DEFAULT_VALUE;
+ res4[i] = DEFAULT_VALUE;
+ }
+
+ for (i = SIZE; i < 16; i++)
+ {
+ res_ref2[i] = DEFAULT_VALUE * 2;
+ res4[i] = DEFAULT_VALUE * 2;
}
res1.x = INTRINSIC (_cvtsepi64_epi8) (src.x);
res2.x = INTRINSIC (_mask_cvtsepi64_epi8) (res2.x, mask, src.x);
res3.x = INTRINSIC (_maskz_cvtsepi64_epi8) (mask, src.x);
- CALC (res_ref, src.a);
+ CALC (res_ref, src.a, 0);
if (UNION_CHECK (128, i_b) (res1, res_ref))
abort ();
MASK_ZERO (i_b) (res_ref, mask, SIZE);
if (UNION_CHECK (128, i_b) (res3, res_ref))
abort ();
+
+ INTRINSIC (_mask_cvtsepi64_storeu_epi8) (res4, mask, src.x);
+
+ CALC (res_ref2, src.a, 1);
+ MASK_MERGE (i_b) (res_ref2, mask, SIZE);
+
+ if (checkVc (res4, res_ref2, 16))
+ abort ();
}
/* { dg-do compile } */
/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovsqd\[ \\t\]+\[^\n\]*" 4 } } */
/* { dg-final { scan-assembler-times "vpmovsqd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vpmovsqd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vpmovsqd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
res = _mm512_cvtsepi64_epi32 (s);
res = _mm512_mask_cvtsepi64_epi32 (res, m, s);
res = _mm512_maskz_cvtsepi64_epi32 (m, s);
+ _mm512_mask_cvtsepi64_storeu_epi32 ((void *) &res, m, s);
}
{
int i, sign;
UNION_TYPE (AVX512F_LEN_HALF, i_d) res1, res2, res3;
+ int res4[SIZE_HALF];
UNION_TYPE (AVX512F_LEN, i_q) src;
MASK_TYPE mask = MASK_VALUE;
int res_ref[SIZE_HALF];
src.a[i] = 1 + 34 * i * sign;
sign = sign * -1;
res2.a[i] = DEFAULT_VALUE;
+ res4[i] = DEFAULT_VALUE;
}
res1.x = INTRINSIC (_cvtsepi64_epi32) (src.x);
res2.x = INTRINSIC (_mask_cvtsepi64_epi32) (res2.x, mask, src.x);
res3.x = INTRINSIC (_maskz_cvtsepi64_epi32) (mask, src.x);
+ INTRINSIC (_mask_cvtsepi64_storeu_epi32) (res4, mask, src.x);
CALC (res_ref, src.a);
if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res2, res_ref))
abort ();
+ if (checkVi (res4, res_ref, SIZE_HALF))
+ abort ();
+
MASK_ZERO (i_d) (res_ref, mask, SIZE);
if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res3, res_ref))
abort ();
/* { dg-do compile } */
/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovsqw\[ \\t\]+\[^\n\]*" 4 } } */
/* { dg-final { scan-assembler-times "vpmovsqw\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vpmovsqw\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vpmovsqw\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
res = _mm512_cvtsepi64_epi16 (s);
res = _mm512_mask_cvtsepi64_epi16 (res, m, s);
res = _mm512_maskz_cvtsepi64_epi16 (m, s);
+ _mm512_mask_cvtsepi64_storeu_epi16 ((void *) &res, m, s);
}
{
int i, sign;
UNION_TYPE (128, i_w) res1, res2, res3;
+ short res4[8];
UNION_TYPE (AVX512F_LEN, i_q) src;
MASK_TYPE mask = MASK_VALUE;
short res_ref[8];
src.a[i] = 1 + 34 * i * sign;
sign = sign * -1;
res2.a[i] = DEFAULT_VALUE;
+ res4[i] = DEFAULT_VALUE;
}
res1.x = INTRINSIC (_cvtsepi64_epi16) (src.x);
res2.x = INTRINSIC (_mask_cvtsepi64_epi16) (res2.x, mask, src.x);
res3.x = INTRINSIC (_maskz_cvtsepi64_epi16) (mask, src.x);
+ INTRINSIC (_mask_cvtsepi64_storeu_epi16) (res4, mask, src.x);
CALC (res_ref, src.a);
if (UNION_CHECK (128, i_w) (res2, res_ref))
abort ();
+ if (checkVs (res4, res_ref, 8))
+ abort ();
+
MASK_ZERO (i_w) (res_ref, mask, SIZE);
if (UNION_CHECK (128, i_w) (res3, res_ref))
abort ();
/* { dg-do compile } */
/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovusdb\[ \\t\]+\[^\n\]*" 4 } } */
/* { dg-final { scan-assembler-times "vpmovusdb\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vpmovusdb\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vpmovusdb\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
res = _mm512_cvtusepi32_epi8 (s);
res = _mm512_mask_cvtusepi32_epi8 (res, m, s);
res = _mm512_maskz_cvtusepi32_epi8 (m, s);
+ _mm512_mask_cvtusepi32_storeu_epi8 ((void *) &res, m, s);
}
{
int i, sign;
UNION_TYPE (128, i_b) res1, res2, res3;
+ unsigned char res4[16];
UNION_TYPE (AVX512F_LEN, i_d) src;
MASK_TYPE mask = MASK_VALUE;
unsigned char res_ref[16];
{
src.a[i] = 1 + 34 * i;
res2.a[i] = DEFAULT_VALUE;
+ res4[i] = DEFAULT_VALUE;
}
res1.x = INTRINSIC (_cvtusepi32_epi8) (src.x);
res2.x = INTRINSIC (_mask_cvtusepi32_epi8) (res2.x, mask, src.x);
res3.x = INTRINSIC (_maskz_cvtusepi32_epi8) (mask, src.x);
+ INTRINSIC (_mask_cvtusepi32_storeu_epi8) (res4, mask, src.x);
CALC (res_ref, src.a);
if (UNION_CHECK (128, i_b) (res2, res_ref))
abort ();
+ if (checkVc (res4, res_ref, 16))
+ abort ();
+
MASK_ZERO (i_b) (res_ref, mask, SIZE);
if (UNION_CHECK (128, i_b) (res3, res_ref))
abort ();
/* { dg-do compile } */
/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovusdw\[ \\t\]+\[^\n\]*" 4 } } */
/* { dg-final { scan-assembler-times "vpmovusdw\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vpmovusdw\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vpmovusdw\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
res = _mm512_cvtusepi32_epi16 (s);
res = _mm512_mask_cvtusepi32_epi16 (res, m, s);
res = _mm512_maskz_cvtusepi32_epi16 (m, s);
+ _mm512_mask_cvtusepi32_storeu_epi16 ((void *) &res, m, s);
}
{
int i, sign;
UNION_TYPE (AVX512F_LEN_HALF, i_w) res1, res2, res3;
+ unsigned short res4[SIZE_HALF];
UNION_TYPE (AVX512F_LEN, i_d) src;
MASK_TYPE mask = MASK_VALUE;
unsigned short res_ref[SIZE_HALF];
{
src.a[i] = 1 + 34 * i;
res2.a[i] = DEFAULT_VALUE;
+ res4[i] = DEFAULT_VALUE;
}
res1.x = INTRINSIC (_cvtusepi32_epi16) (src.x);
res2.x = INTRINSIC (_mask_cvtusepi32_epi16) (res2.x, mask, src.x);
res3.x = INTRINSIC (_maskz_cvtusepi32_epi16) (mask, src.x);
+ INTRINSIC (_mask_cvtusepi32_storeu_epi16) (res4, mask, src.x);
CALC (res_ref, src.a);
if (UNION_CHECK (AVX512F_LEN_HALF, i_w) (res2, res_ref))
abort ();
+ if (checkVs (res4, res_ref, SIZE_HALF))
+ abort ();
+
MASK_ZERO (i_w) (res_ref, mask, SIZE);
if (UNION_CHECK (AVX512F_LEN_HALF, i_w) (res3, res_ref))
abort ();
/* { dg-do compile } */
/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovusqb\[ \\t\]+\[^\n\]*" 4 } } */
/* { dg-final { scan-assembler-times "vpmovusqb\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vpmovusqb\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vpmovusqb\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
res = _mm512_cvtusepi64_epi8 (s);
res = _mm512_mask_cvtusepi64_epi8 (res, m, s);
res = _mm512_maskz_cvtusepi64_epi8 (m, s);
+ _mm512_mask_cvtusepi64_storeu_epi8 ((void *) &res, m, s);
}
#include "avx512f-mask-type.h"
#include <limits.h>
-CALC (unsigned char *r, unsigned long long *s)
+CALC (unsigned char *r, unsigned long long *s, int mem)
{
int i;
- for (i = 0; i < 16; i++)
+ int len = mem ? 8 : 16;
+ for (i = 0; i < len; i++)
{
r[i] = (s[i] > UCHAR_MAX) ? UCHAR_MAX : s[i];
r[i] = (i < SIZE) ? r[i] : 0;
{
int i, sign;
UNION_TYPE (128, i_b) res1, res2, res3;
+ unsigned char res4[16];
UNION_TYPE (AVX512F_LEN, i_q) src;
MASK_TYPE mask = MASK_VALUE;
unsigned char res_ref[16];
+ unsigned char res_ref2[16];
for (i = 0; i < SIZE; i++)
{
src.a[i] = 1 + 34 * i;
res2.a[i] = DEFAULT_VALUE;
+ res4[i] = DEFAULT_VALUE;
+ }
+
+ for (i = SIZE; i < 16; i++)
+ {
+ res4[i] = DEFAULT_VALUE * 2;
+ res_ref2[i] = DEFAULT_VALUE * 2;
}
res1.x = INTRINSIC (_cvtusepi64_epi8) (src.x);
res2.x = INTRINSIC (_mask_cvtusepi64_epi8) (res2.x, mask, src.x);
res3.x = INTRINSIC (_maskz_cvtusepi64_epi8) (mask, src.x);
- CALC (res_ref, src.a);
+ CALC (res_ref, src.a, 0);
if (UNION_CHECK (128, i_b) (res1, res_ref))
abort ();
MASK_ZERO (i_b) (res_ref, mask, SIZE);
if (UNION_CHECK (128, i_b) (res3, res_ref))
abort ();
+
+ INTRINSIC (_mask_cvtusepi64_storeu_epi8) (res4, mask, src.x);
+
+ CALC (res_ref2, src.a, 1);
+ MASK_MERGE (i_b) (res_ref2, mask, SIZE);
+
+ if (checkVc (res4, res_ref2, 16))
+ abort ();
+
}
/* { dg-do compile } */
/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovusqd\[ \\t\]+\[^\n\]*" 4 } } */
/* { dg-final { scan-assembler-times "vpmovusqd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vpmovusqd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vpmovusqd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
res = _mm512_cvtusepi64_epi32 (s);
res = _mm512_mask_cvtusepi64_epi32 (res, m, s);
res = _mm512_maskz_cvtusepi64_epi32 (m, s);
+ _mm512_mask_cvtusepi64_storeu_epi32 ((void *) &res, m, s);
}
{
int i, sign;
UNION_TYPE (AVX512F_LEN_HALF, i_d) res1, res2, res3;
+ unsigned int res4[SIZE_HALF];
UNION_TYPE (AVX512F_LEN, i_q) src;
MASK_TYPE mask = MASK_VALUE;
unsigned int res_ref[SIZE_HALF];
{
src.a[i] = 1 + 34 * i;
res2.a[i] = DEFAULT_VALUE;
+ res4[i] = DEFAULT_VALUE;
}
res1.x = INTRINSIC (_cvtusepi64_epi32) (src.x);
res2.x = INTRINSIC (_mask_cvtusepi64_epi32) (res2.x, mask, src.x);
res3.x = INTRINSIC (_maskz_cvtusepi64_epi32) (mask, src.x);
+ INTRINSIC (_mask_cvtusepi64_storeu_epi32) (res4, mask, src.x);
CALC (res_ref, src.a);
if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res2, res_ref))
abort ();
+ if (checkVi (res4, res_ref, SIZE_HALF))
+ abort ();
+
MASK_ZERO (i_d) (res_ref, mask, SIZE);
if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res3, res_ref))
abort ();
/* { dg-do compile } */
/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovusqw\[ \\t\]+\[^\n\]*" 4 } } */
/* { dg-final { scan-assembler-times "vpmovusqw\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vpmovusqw\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
/* { dg-final { scan-assembler-times "vpmovusqw\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
res = _mm512_cvtusepi64_epi16 (s);
res = _mm512_mask_cvtusepi64_epi16 (res, m, s);
res = _mm512_maskz_cvtusepi64_epi16 (m, s);
+ _mm512_mask_cvtusepi64_storeu_epi16 ((void *) &res, m, s);
}
{
int i, sign;
UNION_TYPE (128, i_w) res1, res2, res3;
+ unsigned short res4[8];
UNION_TYPE (AVX512F_LEN, i_q) src;
MASK_TYPE mask = MASK_VALUE;
unsigned short res_ref[8];
{
src.a[i] = 1 + 34 * i;
res2.a[i] = DEFAULT_VALUE;
+ res4[i] = DEFAULT_VALUE;
}
res1.x = INTRINSIC (_cvtusepi64_epi16) (src.x);
res2.x = INTRINSIC (_mask_cvtusepi64_epi16) (res2.x, mask, src.x);
res3.x = INTRINSIC (_maskz_cvtusepi64_epi16) (mask, src.x);
+ INTRINSIC (_mask_cvtusepi64_storeu_epi16) (res4, mask, src.x);
CALC (res_ref, src.a);
if (UNION_CHECK (128, i_w) (res2, res_ref))
abort ();
+ if (checkVs (res4, res_ref, 8))
+ abort ();
+
MASK_ZERO (i_w) (res_ref, mask, SIZE);
if (UNION_CHECK (128, i_w) (res3, res_ref))
abort ();
return err; \
}
+CHECK_ARRAY(c, char, "0x%hhx")
+CHECK_ARRAY(s, short, "0x%hx")
CHECK_ARRAY(i, int, "0x%x")
CHECK_ARRAY(l, long long, "0x%llx")