From: Soumya AR Date: Mon, 27 Apr 2026 20:47:57 +0000 (+0000) Subject: aarch64: Update br_mispredict_factor for generic tunings X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=bc9bd4e9dcd3f4bc5617606b1a370b2c9b2b825e;p=thirdparty%2Fgcc.git aarch64: Update br_mispredict_factor for generic tunings After some testing, we have found that a br_mispredict_factor of 7 is more suitable than the default factor of 6 that was proposed in d7aebc72899. 6 can be too restrictive on certain workloads and reject cheaper csels in favour of conditional branches. On an Olympus core, this change improves SPEC2017 fp rate geomean by 1% while the int rate geomean is unchanged. There are no visible regressions >1%. Additionally, github.com/facebook/zstd retains the performance improvement this patch introduced. Signed-off-by: Soumya AR gcc/ChangeLog: * config/aarch64/tuning_models/generic.h: Update br_mispredict_factor to 7. --- diff --git a/gcc/config/aarch64/tuning_models/generic.h b/gcc/config/aarch64/tuning_models/generic.h index 76071c695e0..af013e478d4 100644 --- a/gcc/config/aarch64/tuning_models/generic.h +++ b/gcc/config/aarch64/tuning_models/generic.h @@ -129,7 +129,7 @@ static const struct cpu_branch_cost generic_branch_cost = { 1, /* Predictable. */ 3, /* Unpredictable. */ - 6, /* br_mispredict_factor. */ + 7, /* br_mispredict_factor. */ }; /* Generic approximation modes. */