diff options
author | CoprDistGit <infra@openeuler.org> | 2025-02-28 10:03:49 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2025-02-28 10:03:49 +0000 |
commit | 73127104a245052cd5cf29cdaaca3e5c32c70348 (patch) | |
tree | 8e28b63e478c43c252f18b49836dff7313affe54 /0314-bugfix-Modify-the-hip09-tune-flags.patch | |
parent | 49d3feaf4665cdb07576fc1a2382a4d82a612d35 (diff) |
automatic import of gccopeneuler24.03_LTS_SP1
Diffstat (limited to '0314-bugfix-Modify-the-hip09-tune-flags.patch')
-rw-r--r-- | 0314-bugfix-Modify-the-hip09-tune-flags.patch | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/0314-bugfix-Modify-the-hip09-tune-flags.patch b/0314-bugfix-Modify-the-hip09-tune-flags.patch new file mode 100644 index 0000000..1809731 --- /dev/null +++ b/0314-bugfix-Modify-the-hip09-tune-flags.patch @@ -0,0 +1,56 @@ +From e94bf3e1ad12211ec037c9e04a1698e1ed16c87a Mon Sep 17 00:00:00 2001 +From: Mingchuan Wu <wumingchuan1992@foxmail.com> +Date: Tue, 3 Dec 2024 21:02:39 +0800 +Subject: [PATCH 8/8] [bugfix] Modify the hip09 tune flags. + +--- + gcc/config/aarch64/aarch64-tuning-flags.def | 3 +++ + gcc/config/aarch64/aarch64.cc | 11 +++++++++-- + 2 files changed, 12 insertions(+), 2 deletions(-) + +diff --git a/gcc/config/aarch64/aarch64-tuning-flags.def b/gcc/config/aarch64/aarch64-tuning-flags.def +index b4a8f99a6..293f6fb7e 100644 +--- a/gcc/config/aarch64/aarch64-tuning-flags.def ++++ b/gcc/config/aarch64/aarch64-tuning-flags.def +@@ -49,6 +49,9 @@ AARCH64_EXTRA_TUNING_OPTION ("no_ldp_combine", NO_LDP_COMBINE) + + AARCH64_EXTRA_TUNING_OPTION ("rename_load_regs", RENAME_LOAD_REGS) + ++/* Prefer Advanced SIMD over SVE for auto-vectorization. */ ++AARCH64_EXTRA_TUNING_OPTION ("prefer_advsimd_autovec", PREFER_ADVSIMD_AUTOVEC) ++ + AARCH64_EXTRA_TUNING_OPTION ("cse_sve_vl_constants", CSE_SVE_VL_CONSTANTS) + + AARCH64_EXTRA_TUNING_OPTION ("use_new_vector_costs", USE_NEW_VECTOR_COSTS) +diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc +index 1d479f270..829e0da8f 100644 +--- a/gcc/config/aarch64/aarch64.cc ++++ b/gcc/config/aarch64/aarch64.cc +@@ -1934,8 +1934,7 @@ static const struct tune_params hip09_tunings = + 2, /* min_div_recip_mul_df. */ + 0, /* max_case_values. */ + tune_params::AUTOPREFETCHER_WEAK, /* autoprefetcher_model. */ +- (AARCH64_EXTRA_TUNE_USE_NEW_VECTOR_COSTS +- | AARCH64_EXTRA_TUNE_MATCHED_VECTOR_THROUGHPUT), /* tune_flags. */ ++ (AARCH64_EXTRA_TUNE_PREFER_ADVSIMD_AUTOVEC), /* tune_flags. */ + &hip09_prefetch_tune + }; + +@@ -20250,6 +20249,14 @@ aarch64_override_options_internal (struct gcc_options *opts) + SET_OPTION_IF_UNSET (opts, &global_options_set, + param_sched_autopref_queue_depth, queue_depth); + ++ /* If the core wants only AdvancedSIMD autovectorization, do this through ++ aarch64_autovec_preference. If the user set it explicitly, they should ++ know what they want. */ ++ if (aarch64_tune_params.extra_tuning_flags ++ & AARCH64_EXTRA_TUNE_PREFER_ADVSIMD_AUTOVEC) ++ SET_OPTION_IF_UNSET (opts, &global_options_set, ++ aarch64_autovec_preference, 1); ++ + /* If using Advanced SIMD only for autovectorization disable SVE vector costs + comparison. */ + if (aarch64_autovec_preference == 1) +-- +2.33.0 + |