diff options
Diffstat (limited to 'gcc/config/i386/i386.c')
-rw-r--r-- | gcc/config/i386/i386.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 91e7e00..0c7a6b7 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -150,6 +150,7 @@ const struct processor_costs *ix86_cost = NULL; #define m_ICELAKE_CLIENT (HOST_WIDE_INT_1U<<PROCESSOR_ICELAKE_CLIENT) #define m_ICELAKE_SERVER (HOST_WIDE_INT_1U<<PROCESSOR_ICELAKE_SERVER) #define m_GOLDMONT (HOST_WIDE_INT_1U<<PROCESSOR_GOLDMONT) +#define m_GOLDMONT_PLUS (HOST_WIDE_INT_1U<<PROCESSOR_GOLDMONT_PLUS) #define m_INTEL (HOST_WIDE_INT_1U<<PROCESSOR_INTEL) #define m_GEODE (HOST_WIDE_INT_1U<<PROCESSOR_GEODE) @@ -860,6 +861,7 @@ static const struct ptt processor_target_table[PROCESSOR_max] = {"bonnell", &atom_cost, 16, 15, 16, 7, 16}, {"silvermont", &slm_cost, 16, 15, 16, 7, 16}, {"goldmont", &slm_cost, 16, 15, 16, 7, 16}, + {"goldmont-plus", &slm_cost, 16, 15, 16, 7, 16}, {"knl", &slm_cost, 16, 15, 16, 7, 16}, {"knm", &slm_cost, 16, 15, 16, 7, 16}, {"skylake", &skylake_cost, 16, 10, 16, 10, 16}, @@ -3492,6 +3494,8 @@ ix86_option_override_internal (bool main_args_p, const wide_int_bitmask PTA_GOLDMONT = PTA_SILVERMONT | PTA_SHA | PTA_XSAVE | PTA_RDSEED | PTA_XSAVEC | PTA_XSAVES | PTA_CLFLUSHOPT | PTA_XSAVEOPT | PTA_FSGSBASE; + const wide_int_bitmask PTA_GOLDMONT_PLUS = PTA_GOLDMONT | PTA_RDPID + | PTA_SGX; const wide_int_bitmask PTA_KNM = PTA_KNL | PTA_AVX5124VNNIW | PTA_AVX5124FMAPS | PTA_AVX512VPOPCNTDQ; @@ -3568,6 +3572,7 @@ ix86_option_override_internal (bool main_args_p, {"silvermont", PROCESSOR_SILVERMONT, CPU_SLM, PTA_SILVERMONT}, {"slm", PROCESSOR_SILVERMONT, CPU_SLM, PTA_SILVERMONT}, {"goldmont", PROCESSOR_GOLDMONT, CPU_GLM, PTA_GOLDMONT}, + {"goldmont-plus", PROCESSOR_GOLDMONT_PLUS, CPU_GLM, PTA_GOLDMONT_PLUS}, {"knl", PROCESSOR_KNL, CPU_SLM, PTA_KNL}, {"knm", PROCESSOR_KNM, CPU_SLM, PTA_KNM}, {"intel", PROCESSOR_INTEL, CPU_SLM, PTA_NEHALEM}, @@ -21244,7 +21249,8 @@ ix86_lea_outperforms (rtx_insn *insn, unsigned int regno0, unsigned int regno1, /* For Silvermont if using a 2-source or 3-source LEA for non-destructive destination purposes, or due to wanting ability to use SCALE, the use of LEA is justified. */ - if (TARGET_SILVERMONT || TARGET_GOLDMONT || TARGET_INTEL) + if (TARGET_SILVERMONT || TARGET_GOLDMONT || TARGET_GOLDMONT_PLUS + || TARGET_INTEL) { if (has_scale) return true; @@ -32419,10 +32425,14 @@ get_builtin_code_for_version (tree decl, tree *predicate_list) arg_str = "silvermont"; priority = P_PROC_SSE4_2; break; - case PROCESSOR_GOLDMONT: + case PROCESSOR_GOLDMONT: arg_str = "goldmont"; priority = P_PROC_SSE4_2; break; + case PROCESSOR_GOLDMONT_PLUS: + arg_str = "goldmont-plus"; + priority = P_PROC_SSE4_2; + break; case PROCESSOR_AMDFAM10: arg_str = "amdfam10h"; priority = P_PROC_SSE4_A; @@ -33128,7 +33138,8 @@ fold_builtin_cpu (tree fndecl, tree *args) M_INTEL_COREI7_CANNONLAKE, M_INTEL_COREI7_ICELAKE_CLIENT, M_INTEL_COREI7_ICELAKE_SERVER, - M_INTEL_GOLDMONT + M_INTEL_GOLDMONT, + M_INTEL_GOLDMONT_PLUS }; static struct _arch_names_table @@ -33158,6 +33169,7 @@ fold_builtin_cpu (tree fndecl, tree *args) {"bonnell", M_INTEL_BONNELL}, {"silvermont", M_INTEL_SILVERMONT}, {"goldmont", M_INTEL_GOLDMONT}, + {"goldmont-plus", M_INTEL_GOLDMONT_PLUS}, {"knl", M_INTEL_KNL}, {"knm", M_INTEL_KNM}, {"amdfam10h", M_AMDFAM10H}, @@ -50757,8 +50769,8 @@ ix86_add_stmt_cost (void *data, int count, enum vect_cost_for_stmt kind, /* We need to multiply all vector stmt cost by 1.7 (estimated cost) for Silvermont as it has out of order integer pipeline and can execute 2 scalar instruction per tick, but has in order SIMD pipeline. */ - if ((TARGET_SILVERMONT || TARGET_GOLDMONT || TARGET_INTEL) - && stmt_info && stmt_info->stmt) + if ((TARGET_SILVERMONT || TARGET_GOLDMONT || TARGET_GOLDMONT_PLUS + || TARGET_INTEL) && stmt_info && stmt_info->stmt) { tree lhs_op = gimple_get_lhs (stmt_info->stmt); if (lhs_op && TREE_CODE (TREE_TYPE (lhs_op)) == INTEGER_TYPE) |