summaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2011-11-07 21:37:37 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2011-11-07 21:37:37 +0000
commitd5d8f1ccc6d3972dc5cfc0949e85e0b1c9e24ee0 (patch)
treeaafad3cd1390671a3ebbc69ca18e38ca4d4d4e8d /gcc/config
parent83ba0b6d6aa42aaf4a5089fc5766b11d2d416d62 (diff)
downloadgcc-d5d8f1ccc6d3972dc5cfc0949e85e0b1c9e24ee0.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181122 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/i386/i386-builtin-types.def1
-rw-r--r--gcc/config/i386/i386.c14
2 files changed, 12 insertions, 3 deletions
diff --git a/gcc/config/i386/i386-builtin-types.def b/gcc/config/i386/i386-builtin-types.def
index 84667488780..5f64b08505c 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 4c2c800056c..bce100a138c 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: