Don't assign a cost to vectorizable_assignment
authorRichard Sandiford <richard.sandiford@arm.com>
Wed, 13 Nov 2019 09:03:07 +0000 (09:03 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Wed, 13 Nov 2019 09:03:07 +0000 (09:03 +0000)
commite4020b28d02a00d478a3a769855ae6a8d9cc6b26
tree8795d85f2e900a5d8c52ef2b19865109b138051a
parent3f446c27195400aea98ff9c37ed2651ab54f7c03
Don't assign a cost to vectorizable_assignment

vectorizable_assignment handles true SSA-to-SSA copies (which hopefully
we don't see in practice) and no-op conversions that are required
to maintain correct gimple, such as changes between signed and
unsigned types.  These cases shouldn't generate any code and so
shouldn't count against either the scalar or vector costs.

Later patches test this, but it seemed worth splitting out.

2019-11-13  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* tree-vectorizer.h (vect_nop_conversion_p): Declare.
* tree-vect-stmts.c (vect_nop_conversion_p): New function.
(vectorizable_assignment): Don't add a cost for nop conversions.
* tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
Likewise.
* tree-vect-slp.c (vect_bb_slp_scalar_cost): Likewise.

From-SVN: r278122
gcc/ChangeLog
gcc/tree-vect-loop.c
gcc/tree-vect-slp.c
gcc/tree-vect-stmts.c
gcc/tree-vectorizer.h