From: Saurabh Jha <[email protected]>

Currently, we underestimate vector comparison costs for Neoverse V3.
This leads to unnecessary vectorisation in cases where scalar code would
have been more performant.

This patch increases the SVE int comparison cost from 0 to 2 and SVE int
comparison cost from 0 to 1, while keeping SVE comparison predication
costs to 0.

This change led to around 5% improvement in the execution time of SPEC
2017 541.leela_r benchmark against current master while using the
compiler options '-Ofast -mcpu=neoverse-v3' on a Neoverse V3 core.

gcc/ChangeLog:

        * config/aarch64/tuning_models/neoversev3.h: Increase
        int_cmp_ops from 0 to 2 and fp_cmp_ops from 0 to 1.
---
 gcc/config/aarch64/tuning_models/neoversev3.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/config/aarch64/tuning_models/neoversev3.h 
b/gcc/config/aarch64/tuning_models/neoversev3.h
index c6b8b0a411998..cafbb9e5c7cdb 100644
--- a/gcc/config/aarch64/tuning_models/neoversev3.h
+++ b/gcc/config/aarch64/tuning_models/neoversev3.h
@@ -161,9 +161,9 @@ static const aarch64_sve_vec_issue_info 
neoversev3_sve_issue_info =
   },
   2, /* pred_ops_per_cycle  */
   1, /* while_pred_ops  */
-  0, /* int_cmp_ops  */
+  2, /* int_cmp_ops  */
   0, /* int_cmp_pred_ops  */
-  0, /* fp_cmp_ops  */
+  1, /* fp_cmp_ops  */
   0, /* fp_cmp_pred_ops  */
   1, /* gather_scatter_pair_general_ops  */
   1 /* gather_scatter_pair_pred_ops  */
-- 
2.56.0

Reply via email to