diff options
author | Jakub Jelinek <jakub@redhat.com> | 2011-11-07 22:37:37 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2011-11-07 22:37:37 +0100 |
commit | c8694a801c2d31e2c22c64329f7090ea1ba99085 (patch) | |
tree | aafad3cd1390671a3ebbc69ca18e38ca4d4d4e8d /gcc | |
parent | 06cadf63202db6f5e2874981cf5c0f50637b1185 (diff) | |
download | gcc-c8694a801c2d31e2c22c64329f7090ea1ba99085.zip gcc-c8694a801c2d31e2c22c64329f7090ea1ba99085.tar.gz gcc-c8694a801c2d31e2c22c64329f7090ea1ba99085.tar.bz2 |
i386-bultin-types.def (V8SI_FTYPE_V4DF_V4DF): Add.
* config/i386/i386-bultin-types.def (V8SI_FTYPE_V4DF_V4DF): Add.
* config/i386/i386.c (enum ix86_builtins): Add
IX86_BUILTIN_VEC_PACK_SFIX256.
(bdesc_args): Add __builtin_ia32_vec_pack_sfix256.
(ix86_expand_args_builtin): Handle V8SI_FTYPE_V4DF_V4DF.
(ix86_builtin_vectorized_function): Also vectorize lrint using
256-bit vectors for -mavx.
From-SVN: r181122
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/config/i386/i386-builtin-types.def | 1 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 14 |
3 files changed, 22 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index db6749b..279d795 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2011-11-07 Jakub Jelinek <jakub@redhat.com> + + * config/i386/i386-bultin-types.def (V8SI_FTYPE_V4DF_V4DF): Add. + * config/i386/i386.c (enum ix86_builtins): Add + IX86_BUILTIN_VEC_PACK_SFIX256. + (bdesc_args): Add __builtin_ia32_vec_pack_sfix256. + (ix86_expand_args_builtin): Handle V8SI_FTYPE_V4DF_V4DF. + (ix86_builtin_vectorized_function): Also vectorize lrint using + 256-bit vectors for -mavx. + 2011-11-07 Anatoly Sokolov <aesok@post.ru> * config/cris/constraints.md: New file. diff --git a/gcc/config/i386/i386-builtin-types.def b/gcc/config/i386/i386-builtin-types.def index 8466748..5f64b08 100644 --- a/gcc/config/i386/i386-builtin-types.def +++ b/gcc/config/i386/i386-builtin-types.def @@ -332,6 +332,7 @@ DEF_FUNCTION_TYPE (V16HI, V16HI, INT) DEF_FUNCTION_TYPE (V16HI, V16HI, SI) DEF_FUNCTION_TYPE (V16HI, V16HI, V16HI, INT) DEF_FUNCTION_TYPE (V32QI, V32QI, V32QI, INT) +DEF_FUNCTION_TYPE (V8SI, V4DF, V4DF) DEF_FUNCTION_TYPE (V8SI, V8SI, V4SI) DEF_FUNCTION_TYPE (V8SI, V8SI, V8SI) DEF_FUNCTION_TYPE (V8SI, V16HI, V16HI) diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 4c2c800..bce100a 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -24830,6 +24830,7 @@ enum ix86_builtins IX86_BUILTIN_VEC_SET_V16QI, IX86_BUILTIN_VEC_PACK_SFIX, + IX86_BUILTIN_VEC_PACK_SFIX256, /* SSE4.2. */ IX86_BUILTIN_CRC32QI, @@ -26358,6 +26359,8 @@ static const struct builtin_description bdesc_args[] = { OPTION_MASK_ISA_AVX, CODE_FOR_copysignv8sf3, "__builtin_ia32_copysignps256", IX86_BUILTIN_CPYSGNPS256, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF }, { OPTION_MASK_ISA_AVX, CODE_FOR_copysignv4df3, "__builtin_ia32_copysignpd256", IX86_BUILTIN_CPYSGNPD256, UNKNOWN, (int) V4DF_FTYPE_V4DF_V4DF }, + { OPTION_MASK_ISA_AVX, CODE_FOR_vec_pack_sfix_v4df, "__builtin_ia32_vec_pack_sfix256 ", IX86_BUILTIN_VEC_PACK_SFIX256, UNKNOWN, (int) V8SI_FTYPE_V4DF_V4DF }, + /* AVX2 */ { OPTION_MASK_ISA_AVX2, CODE_FOR_avx2_mpsadbw, "__builtin_ia32_mpsadbw256", IX86_BUILTIN_MPSADBW256, UNKNOWN, (int) V32QI_FTYPE_V32QI_V32QI_INT }, { OPTION_MASK_ISA_AVX2, CODE_FOR_absv32qi2, "__builtin_ia32_pabsb256", IX86_BUILTIN_PABSB256, UNKNOWN, (int) V32QI_FTYPE_V32QI }, @@ -28048,6 +28051,7 @@ ix86_expand_args_builtin (const struct builtin_description *d, case V32QI_FTYPE_V32QI_V32QI: case V16HI_FTYPE_V32QI_V32QI: case V16HI_FTYPE_V16HI_V16HI: + case V8SI_FTYPE_V4DF_V4DF: case V8SI_FTYPE_V8SI_V8SI: case V8SI_FTYPE_V16HI_V16HI: case V4DI_FTYPE_V4DI_V4DI: @@ -29271,9 +29275,13 @@ ix86_builtin_vectorized_function (tree fndecl, tree type_out, case BUILT_IN_IRINT: case BUILT_IN_LRINT: case BUILT_IN_LLRINT: - if (out_mode == SImode && out_n == 4 - && in_mode == DFmode && in_n == 2) - return ix86_builtins[IX86_BUILTIN_VEC_PACK_SFIX]; + if (out_mode == SImode && in_mode == DFmode) + { + if (out_n == 4 && in_n == 2) + return ix86_builtins[IX86_BUILTIN_VEC_PACK_SFIX]; + else if (out_n == 8 && in_n == 4) + return ix86_builtins[IX86_BUILTIN_VEC_PACK_SFIX256]; + } break; case BUILT_IN_IRINTF: |