This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch][i386, AVX] Adding missing mask[z]_sqrt_round_s[d,s] intrinsics


Hi,

This patch adds missing intrinsics for _mm_mask[z]_sqrt_round_[sd,ss].

21.11.2017 Olga Makhotina  <olga.makhotina@intel.com>

gcc/
              * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd,
              _mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss,
              _mm_maskz_sqrt_round_ss): New intrinsics.
              (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
              (__builtin_ia32_sqrtsd_mask_round,
              __builtin_ia32_sqrtss_mask_round): New builtins.
              * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round,
              __builtin_ia32_sqrtss_round): Remove.
              (__builtin_ia32_sqrtsd_mask_round,
              __builtin_ia32_sqrtss_mask_round): New builtins.
              * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
              (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
              ((match_operand:VF_128 1 "vector_operand" 
              "xBm,<round_constraint>")): Changed to ...
              ((match_operand:VF_128 1 "vector_operand" 
              "xBm,<round_scalar_constraint>")): ... this.
              (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
              %0, %2, %<iptr>1<round_op3>}): Changed to ...
              (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2, 
              %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2, 
              %<iptr>1<round_scalar_mask_op3>}): ... this.
              ((set_attr "prefix" "<round_prefix>")): Changed to ...
              ((set_attr "prefix" "<round_scalar_prefix>")): ... this.

21.11.2017 Olga Makhotina  <olga.makhotina@intel.com>

gcc/testsuite/
              * gcc.target/i386/avx512f-vsqrtsd-1.c (_mm_mask_sqrt_round_sd,
              _mm_maskz_sqrt_round_sd): Test new intrinsics.
              * gcc.target/i386/avx512f-vsqrtsd-2.c (_mm_sqrt_round_sd,
              _mm_mask_sqrt_round_sd, _mm_maskz_sqrt_round_sd): Test new intrinsics.
              * gcc.target/i386/avx512f-vsqrtss-1.c (_mm_mask_sqrt_round_ss,
              _mm_maskz_sqrt_round_ss): Test new intrinsics.
              * gcc.target/i386/avx512f-vsqrtss-2.c (_mm_sqrt_round_ss,
              _mm_mask_sqrt_round_ss,      _mm_maskz_sqrt_round_ss): Test new intrinsics.
              * gcc.target/i386/avx-1.c (__builtin_ia32_sqrtsd_round,
              __builtin_ia32_sqrtss_round): Remove builtins.
              (__builtin_ia32_sqrtsd_mask_round,
              __builtin_ia32_sqrtss_mask_round): Test new builtins.
              * gcc.target/i386/sse-13.c: Ditto.
              * gcc.target/i386/sse-23.c: Ditto.

Is it ok for trunk?

Thanks,
Olga

Attachment: 0001-sqrt.patch
Description: 0001-sqrt.patch


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]