The following replaces vec_to_scalar handling where now vec_deconstruct
is expected.
* config/i386/i386.cc (ix86_default_vector_cost): Handle
vec_deconstruct like vec_construct.
(ix86_vector_costs::add_stmt_cost): Expect vec_deconstruct
where formerly handling vec_to_scalar for emulated
gather/scatter, elementwise and strided accesses.
---
gcc/config/i386/i386.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc
index bd0ecfddbbc..c0a0204b9b6 100644
--- a/gcc/config/i386/i386.cc
+++ b/gcc/config/i386/i386.cc
@@ -25724,6 +25724,7 @@ ix86_default_vector_cost (enum vect_cost_for_stmt
type_of_cost,
return ix86_vec_cost (mode, ix86_cost->sse_op);
case vec_construct:
+ case vec_deconstruct:
return ix86_vector_cd_cost (mode, GET_MODE_INNER (mode));
default:
@@ -26727,7 +26728,7 @@ ix86_vector_costs::add_stmt_cost (int count,
vect_cost_for_stmt kind,
latency and execution resources for the many scalar loads
(AGU and load ports). Try to account for this by scaling the
construction cost by the number of elements involved. */
- if ((kind == vec_construct || kind == vec_to_scalar)
+ if ((kind == vec_construct || kind == vec_deconstruct)
&& ((node
&& (((SLP_TREE_MEMORY_ACCESS_TYPE (node) == VMAT_ELEMENTWISE
|| (SLP_TREE_MEMORY_ACCESS_TYPE (node) == VMAT_STRIDED_SLP
--
2.51.0