diff options
author | Kewen Lin <linkw@gcc.gnu.org> | 2019-10-11 06:01:30 +0000 |
---|---|---|
committer | Kewen Lin <linkw@gcc.gnu.org> | 2019-10-11 06:01:30 +0000 |
commit | 1e99e6fe6bb61ad2011030324cfdf84d2a67e75d (patch) | |
tree | a2adae682dce6c25a4677c6245af816136ff3136 /gcc | |
parent | 192eaafbaa6404523c96f2926ff41b773c905a4d (diff) | |
download | gcc-1e99e6fe6bb61ad2011030324cfdf84d2a67e75d.zip gcc-1e99e6fe6bb61ad2011030324cfdf84d2a67e75d.tar.gz gcc-1e99e6fe6bb61ad2011030324cfdf84d2a67e75d.tar.bz2 |
vec_promote_demote cost to 1 for non-Power7 VSX architectures
2019-10-11 Kewen Lin <linkw@gcc.gnu.org>
* config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Lower
vec_promote_demote cost to 1 for non-Power7 VSX architectures.
From-SVN: r276859
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 9 |
2 files changed, 10 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3d9af72..df124f07 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-10-11 Kewen Lin <linkw@gcc.gnu.org> + + * 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 <joseph@codesourcery.com> * 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 3421faf..d1434a9 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; |