This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]