aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/sparc/sparc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/sparc/sparc.c')
-rw-r--r--gcc/config/sparc/sparc.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 54e7a0e..a8d363c 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -57,6 +57,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-pass.h"
#include "context.h"
#include "builtins.h"
+#include "tree-vector-builder.h"
/* This file should be included last. */
#include "target-def.h"
@@ -11752,14 +11753,14 @@ sparc_fold_builtin (tree fndecl, int n_args ATTRIBUTE_UNUSED,
tree inner_type = TREE_TYPE (rtype);
unsigned i;
- auto_vec<tree, 32> n_elts (VECTOR_CST_NELTS (arg0));
+ tree_vector_builder n_elts (rtype, VECTOR_CST_NELTS (arg0), 1);
for (i = 0; i < VECTOR_CST_NELTS (arg0); ++i)
{
unsigned HOST_WIDE_INT val
= TREE_INT_CST_LOW (VECTOR_CST_ELT (arg0, i));
n_elts.quick_push (build_int_cst (inner_type, val << 4));
}
- return build_vector (rtype, n_elts);
+ return n_elts.build ();
}
break;
@@ -11774,9 +11775,9 @@ sparc_fold_builtin (tree fndecl, int n_args ATTRIBUTE_UNUSED,
if (TREE_CODE (arg0) == VECTOR_CST && TREE_CODE (arg1) == VECTOR_CST)
{
tree inner_type = TREE_TYPE (rtype);
- auto_vec<tree, 32> n_elts (VECTOR_CST_NELTS (arg0));
+ tree_vector_builder n_elts (rtype, VECTOR_CST_NELTS (arg0), 1);
sparc_handle_vis_mul8x16 (&n_elts, code, inner_type, arg0, arg1);
- return build_vector (rtype, n_elts);
+ return n_elts.build ();
}
break;
@@ -11788,7 +11789,7 @@ sparc_fold_builtin (tree fndecl, int n_args ATTRIBUTE_UNUSED,
if (TREE_CODE (arg0) == VECTOR_CST && TREE_CODE (arg1) == VECTOR_CST)
{
- auto_vec<tree, 32> n_elts (2 * VECTOR_CST_NELTS (arg0));
+ tree_vector_builder n_elts (rtype, 2 * VECTOR_CST_NELTS (arg0), 1);
unsigned i;
for (i = 0; i < VECTOR_CST_NELTS (arg0); ++i)
{
@@ -11796,7 +11797,7 @@ sparc_fold_builtin (tree fndecl, int n_args ATTRIBUTE_UNUSED,
n_elts.quick_push (VECTOR_CST_ELT (arg1, i));
}
- return build_vector (rtype, n_elts);
+ return n_elts.build ();
}
break;