]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
aarch64: Update br_mispredict_factor for generic tunings
authorSoumya AR <soumyaa@nvidia.com>
Mon, 27 Apr 2026 20:47:57 +0000 (20:47 +0000)
committerSoumya AR <soumyaa@nvidia.com>
Mon, 27 Apr 2026 21:01:41 +0000 (02:31 +0530)
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 <soumyaa@nvidia.com>
gcc/ChangeLog:

* config/aarch64/tuning_models/generic.h: Update br_mispredict_factor
to 7.

gcc/config/aarch64/tuning_models/generic.h

index 76071c695e0bee89c94f047a366a77ec13fb3cbc..af013e478d45805a7d79d955dfe41b1c164796e5 100644 (file)
@@ -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.  */