From b19d2e5e1a895ee5e331c20f7eec02f3081b3d79 Mon Sep 17 00:00:00 2001 From: Kewen Lin Date: Sun, 29 Sep 2019 09:18:22 +0000 Subject: [PATCH] vec_perm cost to 1 for non-Power7 VSX architectures gcc/ChangeLog 2019-09-29 Kewen Lin * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Lower vec_perm cost to 1 for non-Power7 VSX architectures. From-SVN: r276267 --- gcc/ChangeLog | 5 +++++ gcc/config/rs6000/rs6000.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9714e98..2c7a847 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2019-09-29 Kewen Lin + * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Lower + vec_perm cost to 1 for non-Power7 VSX architectures. + +2019-09-29 Kewen Lin + * config/rs6000/vsx.md (vec_pack[su]_float_v2di): New define_expand. (vec_unpack_[su]fix_trunc_hi_v4sf): Likewise. (vec_unpack_[su]fix_trunc_lo_v4sf): Likewise. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index f136dcb..a344153 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -4774,7 +4774,8 @@ rs6000_builtin_vectorization_cost (enum vect_cost_for_stmt type_of_cost, return 1; case vec_perm: - if (TARGET_VSX) + /* Power7 has only one permute unit, make it a bit expensive. */ + if (TARGET_VSX && rs6000_tune == PROCESSOR_POWER7) return 3; else return 1; -- 2.7.4