Hello,

Here is the one-liner that fixes the incorrect
vec_perm cost for thunderx2t99 chip.
With the patch applied 526.blender of CPU2017
gets ~5% improvement with no measurable changes
for other benchmarks.

Bootstrapped OK on aarch64-linux-gnu.

OK for trunk?

2019-11-01 Anton Youdkevitch <anton.youdkevi...@bell-sw.com>

        * gcc/config/aarch64/aarch64.c (thunderx2t99_vector_cost):
        change vec_perm field

-- 
  Thanks,
  Anton
>From 42eab5c85a39a5c5ed7be00245f13f73c3f6b946 Mon Sep 17 00:00:00 2001
From: Anton Youdkevitch <anton.youdkevi...@bell-sw.com>
Date: Wed, 30 Oct 2019 14:42:41 +0000
Subject: [PATCH] [Aarch64] Fix vec_perm cost for thunderx2t99

The vec_perm cost for thunderx2t99 was set to 3
which was too low and resulted in non-beneficial
permutations neing generated.
Changed it to 10 (2-register form tbl cost) to more
accurately represent the timings wrt the actual
TX2 hardware.
---
 gcc/config/aarch64/aarch64.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 599d07a..f28fe80 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -585,7 +585,7 @@ static const struct cpu_vector_cost thunderx2t99_vector_cost =
   1, /* scalar_store_cost  */
   5, /* vec_int_stmt_cost  */
   6, /* vec_fp_stmt_cost  */
-  3, /* vec_permute_cost  */
+  10, /* vec_permute_cost  */
   6, /* vec_to_scalar_cost  */
   5, /* scalar_to_vec_cost  */
   8, /* vec_align_load_cost  */
-- 
2.7.4

Reply via email to