------- 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