This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix gcc.dg/vect/pr32421.c type error
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 28 Apr 2009 14:14:56 +0200 (CEST)
- Subject: [PATCH] Fix gcc.dg/vect/pr32421.c type error
This fixes the regression of gcc.dg/vect/pr32421.c.
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk.
Richard.
2009-04-28 Richard Guenther <rguenther@suse.de>
* tree-vect-stmts.c (vect_get_vec_def_for_operand): Fix
type error.
Index: gcc/tree-vect-stmts.c
===================================================================
*** gcc/tree-vect-stmts.c (revision 146876)
--- gcc/tree-vect-stmts.c (working copy)
*************** vect_get_vec_def_for_operand (tree op, g
*** 890,895 ****
--- 890,898 ----
/* 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;
*************** vect_get_vec_def_for_operand (tree op, g
*** 901,908 ****
{
t = tree_cons (NULL_TREE, op, t);
}
! vec_cst = build_vector (vectype, t);
! return vect_init_vector (stmt, vec_cst, vectype, NULL);
}
/* Case 2: operand is defined outside the loop - loop invariant. */
--- 904,911 ----
{
t = tree_cons (NULL_TREE, op, t);
}
! 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. */