summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-08-06 12:48:00 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-08-06 18:19:40 -0700
commitd9d4d480dd4b2554e29cb11230a16bd91ee5fe55 (patch)
tree4fb64e575620b8be5a6df98b25305a781fff8f65
parent322ea700ec6f0fbe64b7d6a678132ffb1793a6c9 (diff)
downloadgcc-hjl/pr81743/master.tar.gz
i386: Set priority to P_AES for Westmerehjl/pr81743/master
The difference between Nehalem and Westmere is AES. We should set priority to P_AES for Westmere, not P_PROC_SSE4_2 which is for Nehalem. Otherwise, we will pick Nehalem implementation on Westmere. Tested on Westmere. PR target/81743 * config/i386/i386.c (get_builtin_code_for_version): Set priority to P_AES for Westmere.
-rw-r--r--gcc/config/i386/i386.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index a5984659eb2..c0b6015991d 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -33417,13 +33417,18 @@ get_builtin_code_for_version (tree decl, tree *predicate_list)
break;
case PROCESSOR_NEHALEM:
if (new_target->x_ix86_isa_flags & OPTION_MASK_ISA_AES)
- arg_str = "westmere";
+ {
+ arg_str = "westmere";
+ priority = P_AES;
+ }
else
- /* We translate "arch=corei7" and "arch=nehalem" to
- "corei7" so that it will be mapped to M_INTEL_COREI7
- as cpu type to cover all M_INTEL_COREI7_XXXs. */
- arg_str = "corei7";
- priority = P_PROC_SSE4_2;
+ {
+ /* We translate "arch=corei7" and "arch=nehalem" to
+ "corei7" so that it will be mapped to M_INTEL_COREI7
+ as cpu type to cover all M_INTEL_COREI7_XXXs. */
+ arg_str = "corei7";
+ priority = P_PROC_SSE4_2;
+ }
break;
case PROCESSOR_SANDYBRIDGE:
if (new_target->x_ix86_isa_flags & OPTION_MASK_ISA_F16C)