While looking into PR 118616, I noticed that
supportable_indirect_convert_operation only pushes up to 2 into its vec.
And the 2 places which call supportable_indirect_convert_operation,
use an auto_vec but without an internal storage. In this case an internal
storage of 2 elements would save both memory and slight compile time performance.
Bootstrapped and tested on x86_64-linux-gnu.
PR tree-optimization/118617
gcc/ChangeLog:
* tree-vect-generic.cc (expand_vector_conversion): Have 2 elements
as internal storage for converts.
* tree-vect-stmts.cc (vectorizable_conversion): Likewise.
Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
else if (ret_elt_bits > arg_elt_bits)
modifier = WIDEN;
- auto_vec<std::pair<tree, tree_code> > converts;
+ auto_vec<std::pair<tree, tree_code>, 2> converts;
if (supportable_indirect_convert_operation (code, ret_type, arg_type,
converts))
{
scalar_mode lhs_mode = SCALAR_TYPE_MODE (lhs_type);
scalar_mode rhs_mode = SCALAR_TYPE_MODE (rhs_type);
opt_scalar_mode rhs_mode_iter;
- auto_vec<std::pair<tree, tree_code> > converts;
+ auto_vec<std::pair<tree, tree_code>, 2> converts;
/* Supportable by target? */
switch (modifier)