]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2009-04-28 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 28 Apr 2009 12:16:22 +0000 (12:16 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 28 Apr 2009 12:16:22 +0000 (12:16 +0000)
* tree-vect-stmts.c (vect_get_vec_def_for_operand): Fix
type error.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146888 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree-vect-stmts.c

index 042041881bbd123e545c18c6a8b1eea55f709f78..e971e53c9b2dc691dd88b65fac9e21af59fd2a51 100644 (file)
@@ -1,3 +1,8 @@
+2009-04-28  Richard Guenther  <rguenther@suse.de>
+
+       * tree-vect-stmts.c (vect_get_vec_def_for_operand): Fix
+       type error.
+
 2009-04-28  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
 
        * config/arm/arm-cores.def: Add support for arm1156t2f-s.
index 7afaef3f02a6e777c439b8e8719ab4e5a5f0f67e..0ab9883887cb90600d0a496423e7a807f1cb01e0 100644 (file)
@@ -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.  */