From: Julia Koval Date: Mon, 11 Jun 2018 11:10:38 +0000 (+0200) Subject: Remove redundant intrinsics X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0c5a38a5f78d88226c14fc1f42208c1fd07dd896;p=gcc.git Remove redundant intrinsics gcc/ * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128) _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove. * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove. gcc/testsuite/ * gcc.target/i386/avx512fvl-vaes-1.c: Remove 128bit versions from test. * gcc.target/i386/vpclmulqdq.c: Ditto. From-SVN: r261433 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2f745a5fbdf..a046620b307 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-06-11 Julia Koval + + * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128) + _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove. + * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove. + 2018-06-11 Olivier Hainque * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83 diff --git a/gcc/config/i386/vaesintrin.h b/gcc/config/i386/vaesintrin.h index cfca363235d..5d9e03f1385 100644 --- a/gcc/config/i386/vaesintrin.h +++ b/gcc/config/i386/vaesintrin.h @@ -108,44 +108,4 @@ _mm512_aesenclast_epi128 (__m512i __A, __m512i __B) #pragma GCC pop_options #endif /* __DISABLE_VAES__ */ -#if !defined(__VAES__) || !defined(__AVX512VL__) -#pragma GCC push_options -#pragma GCC target("vaes,avx512vl") -#define __DISABLE_VAESVL__ -#endif /* __VAES__ */ - -extern __inline __m128i -__attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_aesdec_epi128 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_vaesdec_v16qi ((__v16qi) __A, (__v16qi) __B); -} - -extern __inline __m128i -__attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_aesdeclast_epi128 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_vaesdeclast_v16qi ((__v16qi) __A, - (__v16qi) __B); -} - -extern __inline __m128i -__attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_aesenc_epi128 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_vaesenc_v16qi ((__v16qi) __A, (__v16qi) __B); -} - -extern __inline __m128i -__attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_aesenclast_epi128 (__m128i __A, __m128i __B) -{ - return (__m128i)__builtin_ia32_vaesenclast_v16qi ((__v16qi) __A, - (__v16qi) __B); -} - -#ifdef __DISABLE_VAESVL__ -#undef __DISABLE_VAESVL__ -#pragma GCC pop_options -#endif /* __DISABLE_VAES__ */ #endif /* __VAESINTRIN_H_INCLUDED */ diff --git a/gcc/config/i386/vpclmulqdqintrin.h b/gcc/config/i386/vpclmulqdqintrin.h index c70c5039b50..3d383047c3c 100644 --- a/gcc/config/i386/vpclmulqdqintrin.h +++ b/gcc/config/i386/vpclmulqdqintrin.h @@ -53,31 +53,6 @@ _mm512_clmulepi64_epi128 (__m512i __A, __m512i __B, const int __C) #pragma GCC pop_options #endif /* __DISABLE_VPCLMULQDQF__ */ -#if !defined(__VPCLMULQDQ__) || !defined(__AVX512VL__) -#pragma GCC push_options -#pragma GCC target("vpclmulqdq,avx512vl") -#define __DISABLE_VPCLMULQDQVL__ -#endif /* __VPCLMULQDQVL__ */ - -#ifdef __OPTIMIZE__ -extern __inline __m128i -__attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_clmulepi64_epi128 (__m128i __A, __m128i __B, const int __C) -{ - return (__m128i) __builtin_ia32_vpclmulqdq_v2di ((__v2di)__A, - (__v2di) __B, __C); -} -#else -#define _mm_clmulepi64_epi128(A, B, C) \ - ((__m128i) __builtin_ia32_vpclmulqdq_v2di ((__v2di)(__m128i)(A), \ - (__v2di)(__m128i)(B), (int)(C))) -#endif - -#ifdef __DISABLE_VPCLMULQDQVL__ -#undef __DISABLE_VPCLMULQDQVL__ -#pragma GCC pop_options -#endif /* __DISABLE_VPCLMULQDQVL__ */ - #if !defined(__VPCLMULQDQ__) || !defined(__AVX512VL__) #pragma GCC push_options #pragma GCC target("vpclmulqdq,avx512vl") diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0bdd3aa4cfa..4d38f53ebaf 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-06-11 Julia Koval + + * gcc.target/i386/avx512fvl-vaes-1.c: Remove 128bit versions from test. + * gcc.target/i386/vpclmulqdq.c: Ditto. + 2018-06-11 Olivier Hainque * gnat.dg/lang-dw2.adb: New test. diff --git a/gcc/testsuite/gcc.target/i386/avx512fvl-vaes-1.c b/gcc/testsuite/gcc.target/i386/avx512fvl-vaes-1.c index 19507a45e14..c65b570cd47 100644 --- a/gcc/testsuite/gcc.target/i386/avx512fvl-vaes-1.c +++ b/gcc/testsuite/gcc.target/i386/avx512fvl-vaes-1.c @@ -10,16 +10,10 @@ /* { dg-final { scan-assembler-times "vaesenc\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\{\n\]*%ymm\[0-9\]+\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ /* { dg-final { scan-assembler-times "vaesenclast\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\{\n\]*%ymm\[0-9\]+\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ -/* { dg-final { scan-assembler-times "vaesdec\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\{\n\]*%xmm\[0-9\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ -/* { dg-final { scan-assembler-times "vaesdeclast\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\{\n\]*%xmm\[0-9\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ -/* { dg-final { scan-assembler-times "vaesenc\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\{\n\]*%xmm\[0-9\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ -/* { dg-final { scan-assembler-times "vaesenclast\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\{\n\]*%xmm\[0-9\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ - #include volatile __m512i x,y; volatile __m256i x256, y256; -volatile __m128i x128, y128; void extern avx512f_test (void) @@ -33,9 +27,4 @@ avx512f_test (void) x256 = _mm256_aesdeclast_epi128 (x256, y256); x256 = _mm256_aesenc_epi128 (x256, y256); x256 = _mm256_aesenclast_epi128 (x256, y256); - - x128 = _mm_aesdec_epi128 (x128, y128); - x128 = _mm_aesdeclast_epi128 (x128, y128); - x128 = _mm_aesenc_epi128 (x128, y128); - x128 = _mm_aesenclast_epi128 (x128, y128); } diff --git a/gcc/testsuite/gcc.target/i386/vpclmulqdq.c b/gcc/testsuite/gcc.target/i386/vpclmulqdq.c index 0ce1a061298..d93f776803f 100644 --- a/gcc/testsuite/gcc.target/i386/vpclmulqdq.c +++ b/gcc/testsuite/gcc.target/i386/vpclmulqdq.c @@ -2,19 +2,16 @@ /* { dg-options "-mvpclmulqdq -mavx512vl -mavx512f -O2" } */ /* { dg-final { scan-assembler-times "vpclmulqdq\[ \\t\]+\[^\{\n\]*\\\$3\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ /* { dg-final { scan-assembler-times "vpclmulqdq\[ \\t\]+\[^\{\n\]*\\\$3\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ -/* { dg-final { scan-assembler-times "vpclmulqdq\[ \\t\]+\[^\{\n\]*\\\$3\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ #include volatile __m512i x1, x2; volatile __m256i x3, x4; -volatile __m128i x5, x6; void extern avx512vl_test (void) { x1 = _mm512_clmulepi64_epi128(x1, x2, 3); x3 = _mm256_clmulepi64_epi128(x3, x4, 3); - x5 = _mm_clmulepi64_epi128(x5, x6, 3); }