On Mon, May 23, 2016 at 19:11:53 +0300, Ilya Verbin wrote:
> This patch adds missed 512-bit rounding builtins for vectorization.
> Regtested on x86_64-linux and i686-linux.  OK for trunk?
> 
> gcc/
>       * config/i386/i386-builtin-types.def: Add V16SI_FTYPE_V16SF,
>       V8DF_FTYPE_V8DF_ROUND, V16SF_FTYPE_V16SF_ROUND, V16SI_FTYPE_V16SF_ROUND.
>       * config/i386/i386.c (enum ix86_builtins): Add
>       IX86_BUILTIN_CVTPS2DQ512_MASK, IX86_BUILTIN_FLOORPS512,
>       IX86_BUILTIN_FLOORPD512, IX86_BUILTIN_CEILPS512, IX86_BUILTIN_CEILPD512,
>       IX86_BUILTIN_TRUNCPS512, IX86_BUILTIN_TRUNCPD512,
>       IX86_BUILTIN_CVTPS2DQ512, IX86_BUILTIN_VEC_PACK_SFIX512,
>       IX86_BUILTIN_FLOORPS_SFIX512, IX86_BUILTIN_CEILPS_SFIX512,
>       IX86_BUILTIN_ROUNDPS_AZ_SFIX512.
>       (builtin_description bdesc_args): Add __builtin_ia32_floorps512,
>       __builtin_ia32_ceilps512, __builtin_ia32_truncps512,
>       __builtin_ia32_floorpd512, __builtin_ia32_ceilpd512,
>       __builtin_ia32_truncpd512, __builtin_ia32_cvtps2dq512,
>       __builtin_ia32_vec_pack_sfix512, __builtin_ia32_roundps_az_sfix512,
>       __builtin_ia32_floorps_sfix512, __builtin_ia32_ceilps_sfix512.
>       Change IX86_BUILTIN_CVTPS2DQ512 to IX86_BUILTIN_CVTPS2DQ512_MASK for
>       __builtin_ia32_cvtps2dq512_mask.
>       (ix86_expand_args_builtin): Handle V8DF_FTYPE_V8DF_ROUND,
>       V16SF_FTYPE_V16SF_ROUND, V16SI_FTYPE_V16SF_ROUND, V16SI_FTYPE_V16SF.
>       (ix86_builtin_vectorized_function): Handle builtins mentioned above.
>       * config/i386/sse.md
>       (<mask_codefor>avx512f_fix_notruncv16sfv16si<mask_name><round_name>):
>       Rename to ...
>       (avx512f_fix_notruncv16sfv16si<mask_name><round_name>): ... this.
>       (<mask_codefor>avx512f_cvtpd2dq512<mask_name><round_name>): Rename
>       to ...
>       (avx512f_cvtpd2dq512<mask_name><round_name>): ... this.
>       (avx512f_vec_pack_sfix_v8df): New define_expand.
>       (avx512f_roundpd512): Rename to ...
>       (avx512f_round<castmode>512): ... this.  Change iterator.
>       (avx512f_roundps512_sfix): New define_expand.
>       (round<mode>2_sfix): Change iterator.
> gcc/testsuite/
>       * gcc.target/i386/avx512f-ceil-vec-1.c: New test.
>       * gcc.target/i386/avx512f-ceil-vec-2.c: New test.
>       * gcc.target/i386/avx512f-ceilf-sfix-vec-1.c: New test.
>       * gcc.target/i386/avx512f-ceilf-sfix-vec-2.c: New test.
>       * gcc.target/i386/avx512f-ceilf-vec-1.c: New test.
>       * gcc.target/i386/avx512f-ceilf-vec-2.c: New test.
>       * gcc.target/i386/avx512f-floor-vec-1.c: New test.
>       * gcc.target/i386/avx512f-floor-vec-2.c: New test.
>       * gcc.target/i386/avx512f-floorf-sfix-vec-1.c: New test.
>       * gcc.target/i386/avx512f-floorf-sfix-vec-2.c: New test.
>       * gcc.target/i386/avx512f-floorf-vec-1.c: New test.
>       * gcc.target/i386/avx512f-floorf-vec-2.c: New test.
>       * gcc.target/i386/avx512f-rint-sfix-vec-1.c: New test.
>       * gcc.target/i386/avx512f-rint-sfix-vec-2.c: New test.
>       * gcc.target/i386/avx512f-rintf-sfix-vec-1.c: New test.
>       * gcc.target/i386/avx512f-rintf-sfix-vec-2.c: New test.
>       * gcc.target/i386/avx512f-round-sfix-vec-1.c: New test.
>       * gcc.target/i386/avx512f-round-sfix-vec-2.c: New test.
>       * gcc.target/i386/avx512f-roundf-sfix-vec-1.c: New test.
>       * gcc.target/i386/avx512f-roundf-sfix-vec-2.c: New test.
>       * gcc.target/i386/avx512f-trunc-vec-1.c: New test.
>       * gcc.target/i386/avx512f-trunc-vec-2.c: New test.
>       * gcc.target/i386/avx512f-truncf-vec-1.c: New test.
>       * gcc.target/i386/avx512f-truncf-vec-2.c: New test.

Is it OK for gcc-6-branch?

  -- Ilya

Reply via email to