-
- Downloads
Fix target_clone ("arch=graniterapids-d")
Both "graniterapid-d" and "graniterapids" are attached with PROCESSOR_GRANITERAPID in processor_alias_table but mapped to different __cpu_subtype in get_intel_cpu. And get_builtin_code_for_version will try to match the first PROCESSOR_GRANITERAPIDS in processor_alias_table which maps to "granitepraids" here. 861 else if (new_target->arch_specified && new_target->arch > 0) 1862 for (i = 0; i < pta_size; i++) 1863 if (processor_alias_table[i].processor == new_target->arch) 1864 { 1865 const pta *arch_info = &processor_alias_table[i]; 1866 switch (arch_info->priority) 1867 { 1868 default: 1869 arg_str = arch_info->name; This mismatch makes dispatch_function_versions check the preidcate of__builtin_cpu_is ("graniterapids") for "graniterapids-d" and causes the issue. The patch explicitly PROCESSOR_GRANITERAPIDS_D to make a distinction. For "alderlake","raptorlake", "meteorlake" they share same isa, cost, tuning, and mapped to the same __cpu_type/__cpu_subtype in get_intel_cpu, so no need to add PROCESSOR_RAPTORLAKE and others. gcc/ChangeLog: * common/config/i386/i386-common.cc (processor_names): Add new member graniterapids-s. * config/i386/i386-options.cc (processor_alias_table): Update PROCESSOR_GRANITERAPIDS_D. (m_GRANITERAPID_D): New macro. (m_CORE_AVX512): Add m_GRANITERAPIDS_D. (processor_cost_table): Add icelake_cost for PROCESSOR_GRANITERAPIDS_D. * config/i386/i386.h (enum processor_type): Add new member PROCESSOR_GRANITERAPIDS_D. * config/i386/i386-c.cc (ix86_target_macros_internal): Handle PROCESSOR_GRANITERAPIDS_D. (cherry picked from commit afe15e97)
Showing
- gcc/common/config/i386/i386-common.cc 4 additions, 2 deletionsgcc/common/config/i386/i386-common.cc
- gcc/config/i386/i386-c.cc 7 additions, 0 deletionsgcc/config/i386/i386-c.cc
- gcc/config/i386/i386-options.cc 3 additions, 1 deletiongcc/config/i386/i386-options.cc
- gcc/config/i386/i386.h 2 additions, 1 deletiongcc/config/i386/i386.h
Loading
Please register or sign in to comment