From: linkw Date: Fri, 11 Oct 2019 06:01:30 +0000 (+0000) Subject: 2019-10-11 Kewen Lin X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43c3467f12d54c1daf1b7591eff5f4255f1dee8d;p=thirdparty%2Fgcc.git 2019-10-11 Kewen Lin * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Lower vec_promote_demote cost to 1 for non-Power7 VSX architectures. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@276859 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3d9af72764ab..df124f077118 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-10-11 Kewen Lin + + * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Lower + vec_promote_demote cost to 1 for non-Power7 VSX architectures. + 2019-10-10 Joseph Myers * ginclude/float.h [!__DEC32_MANT_DIG__]: Do not define DFP diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 3421faf813f3..d1434a9f7433 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -4781,10 +4781,11 @@ rs6000_builtin_vectorization_cost (enum vect_cost_for_stmt type_of_cost, return 1; case vec_promote_demote: - if (TARGET_VSX) - return 4; - else - return 1; + /* Power7 has only one permute/pack unit, make it a bit expensive. */ + if (TARGET_VSX && rs6000_tune == PROCESSOR_POWER7) + return 4; + else + return 1; case cond_branch_taken: return 3;