From 7569a6cc2a7a381ea23f17a2a705b7e5c39e9569 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Tue, 28 Apr 2009 12:16:22 +0000 Subject: [PATCH] tree-vect-stmts.c (vect_get_vec_def_for_operand): Fix type error. 2009-04-28 Richard Guenther * tree-vect-stmts.c (vect_get_vec_def_for_operand): Fix type error. From-SVN: r146888 --- gcc/ChangeLog | 5 +++++ gcc/tree-vect-stmts.c | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 042041881bb..e971e53c9b2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2009-04-28 Richard Guenther + + * tree-vect-stmts.c (vect_get_vec_def_for_operand): Fix + type error. + 2009-04-28 Ramana Radhakrishnan * config/arm/arm-cores.def: Add support for arm1156t2f-s. diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index 7afaef3f02a..0ab9883887c 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -890,6 +890,9 @@ vect_get_vec_def_for_operand (tree op, gimple stmt, tree *scalar_def) /* Case 1: operand is a constant. */ case vect_constant_def: { + vector_type = get_vectype_for_scalar_type (TREE_TYPE (op)); + gcc_assert (vector_type); + if (scalar_def) *scalar_def = op; @@ -901,8 +904,8 @@ vect_get_vec_def_for_operand (tree op, gimple stmt, tree *scalar_def) { t = tree_cons (NULL_TREE, op, t); } - vec_cst = build_vector (vectype, t); - return vect_init_vector (stmt, vec_cst, vectype, NULL); + vec_cst = build_vector (vector_type, t); + return vect_init_vector (stmt, vec_cst, vector_type, NULL); } /* Case 2: operand is defined outside the loop - loop invariant. */