This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/33953] [4.3 regression] internal compiler error: vector VEC(tree,base) index domain error, in vectorizable_operation at tree-vect-transform.c:4017
- From: "irar at il dot ibm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Oct 2007 12:57:42 -0000
- Subject: [Bug tree-optimization/33953] [4.3 regression] internal compiler error: vector VEC(tree,base) index domain error, in vectorizable_operation at tree-vect-transform.c:4017
- References: <bug-33953-5606@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from irar at il dot ibm dot com 2007-10-31 12:57 -------
I am testing the following patch:
Index: tree-vect-transform.c
===================================================================
--- tree-vect-transform.c (revision 129627)
+++ tree-vect-transform.c (working copy)
@@ -3915,10 +3915,14 @@ vectorizable_operation (tree stmt, block
/* Handle def. */
vec_dest = vect_create_destination_var (scalar_dest, vectype);
- if (!slp_node)
- vec_oprnds0 = VEC_alloc (tree, heap, 1);
- if (op_type == binary_op)
- vec_oprnds1 = VEC_alloc (tree, heap, 1);
+ if (slp_node && op_type == binary_op)
+ vec_oprnds1 = VEC_alloc (tree, heap, slp_node->vec_stmts_size);
+ else
+ {
+ vec_oprnds0 = VEC_alloc (tree, heap, 1);
+ if (op_type == binary_op)
+ vec_oprnds1 = VEC_alloc (tree, heap, 1);
+ }
/* In case the vectorization factor (VF) is bigger than the number
of elements that we can fit in a vectype (nunits), we have to generate
@@ -3993,6 +3997,11 @@ vectorizable_operation (tree stmt, block
fprintf (vect_dump, "operand 1 using scalar mode.");
vec_oprnd1 = op1;
VEC_quick_push (tree, vec_oprnds1, vec_oprnd1);
+ if (slp_node)
+ {
+ for (i = 0; i < slp_node->vec_stmts_size - 1; i++)
+ VEC_quick_push (tree, vec_oprnds1, vec_oprnd1);
+ }
}
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33953