Add missing mask[z]_roundscale_[round]_s[d,s] intrinsics
authorHongtao Liu <liuhongt@gcc.gnu.org>
Tue, 15 Oct 2019 07:44:15 +0000 (07:44 +0000)
committerHongtao Liu <liuhongt@gcc.gnu.org>
Tue, 15 Oct 2019 07:44:15 +0000 (07:44 +0000)
commita7c4d6d1c29b62d97014d30848ee542e309dbe9c
treef77ae6bbe7715b5dc4dbdbf7440e13775e951c96
parente622a32db78300821fc1327637ec6413febc2c66
Add missing mask[z]_roundscale_[round]_s[d,s] intrinsics

gcc/
* config/i386/avx512fintrin.h (_mm_mask_roundscale_ss,
_mm_maskz_roundscale_ss, _mm_maskz_roundscale_round_ss,
_mm_maskz_roundscale_round_ss, _mm_mask_roundscale_sd,
_mm_maskz_roundscale_sd, _mm_mask_roundscale_round_sd,
_mm_maskz_roundscale_round_sd): New intrinsics.
(_mm_roundscale_ss, _mm_roundscale_round_ss): Use
__builtin_ia32_rndscales?_mask_round builtins instead of
__builtin_ia32_rndscales?_round.
* config/i386/i386-builtin.def (__builtin_ia32_rndscaless_round,
__builtin_ia32_rndscalesd_round): Remove.
(__builtin_ia32_rndscaless_mask_round,
__builtin_ia32_rndscalesd_mask_round): New intrinsics.
* config/i386/sse.md
(avx512f_rndscale<mode><round_saeonly_name>): Renamed to ...
(avx512f_rndscale<mode><mask_scalar_name><round_saeonly_scalar_name>):
 ... this, adjust and add subst atrributes to make it maskable.

gcc/testsuite/
* gcc.target/i386/avx512f-vrndscaless-1.c: Add scan-assembler-times
directives for newly expected instructions.
* gcc.target/i386/avx512f-vrndscalesd-1.c: Likewise.
* gcc.target/i386/avx512f-vrndscaless-2.c
(avx512f_test): Add tests for new intrinsics.
* gcc.target/i386/avx512f-vrndscalesd-2.c: Likewise.
* gcc.target/i386/avx-1.c (__builtin_ia32_rndscalefss_round,
__builtin_ia32_rndscalefsd_round): Remove.
(__builtin_ia32_rndscalefss_mask_round,
__builtin_ia32_rndscalefsd_mask_round): Define.
* gcc.target/i386/sse-13.c: Ditto.
* gcc.target/i386/sse-23.c: Ditto.

From-SVN: r276986
12 files changed:
gcc/ChangeLog
gcc/config/i386/avx512fintrin.h
gcc/config/i386/i386-builtin.def
gcc/config/i386/sse.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/avx-1.c
gcc/testsuite/gcc.target/i386/avx512f-vrndscalesd-1.c
gcc/testsuite/gcc.target/i386/avx512f-vrndscalesd-2.c
gcc/testsuite/gcc.target/i386/avx512f-vrndscaless-1.c
gcc/testsuite/gcc.target/i386/avx512f-vrndscaless-2.c
gcc/testsuite/gcc.target/i386/sse-13.c
gcc/testsuite/gcc.target/i386/sse-23.c