aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorSudakshina Das <sudi.das@arm.com>2019-12-09 10:22:01 +0000
committerSudakshina Das <sudi@gcc.gnu.org>2019-12-09 10:22:01 +0000
commite3126e5f649c8eebe07fc517d86f10d6867b7eec (patch)
tree666f91365cb8eb2177a3b7b04ea599caacd740ca /libgcc
parent49647b7b25673273262fb630598027c6d841690f (diff)
downloadgcc-e3126e5f649c8eebe07fc517d86f10d6867b7eec.zip
gcc-e3126e5f649c8eebe07fc517d86f10d6867b7eec.tar.gz
gcc-e3126e5f649c8eebe07fc517d86f10d6867b7eec.tar.bz2
[GCC, Vect] Fix costing for vector shifts
While looking at the vectorization for following example, we realized that even though vectorizable_shift function was distinguishing vector shifted by vector from vector shifted by scalar, while modelling the cost it would always add the cost of building a vector constant despite not needing it for vector shifted by scalar. This patch fixes this by using scalar_shift_arg to determine whether we need to build a vector for the second operand or not. This causes the test case below to now vectorize. gcc/ChangeLog: 2019-12-09 Sudakshina Das <sudi.das@arm.com> Richard Sandiford <richard.sandiford@arm.com> * tree-vect-stmt.c (vectorizable_shift): Condition ndts for vect_model_simple_cost call on scalar_shift_arg. gcc/testsuite/ChangeLog: 2019-12-09 Sudakshina Das <sudi.das@arm.com> * gcc.dg/vect/vect-shift-5.c: New test. Co-Authored-By: Richard Sandiford <richard.sandiford@arm.com> From-SVN: r279114
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions