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/32421] [4.3 Regression] -ftree-vectorize -msse2 ICEs in build2_stat when vectorizing POINTER_PLUS_EXPR



------- Comment #3 from pinskia at gcc dot gnu dot org  2007-06-22 00:01 -------
Patch which fixes the ICE:
Index: tree-vect-transform.c
===================================================================
--- tree-vect-transform.c       (revision 125927)
+++ tree-vect-transform.c       (working copy)
@@ -2968,6 +2968,12 @@

   operation = GIMPLE_STMT_OPERAND (stmt, 1);
   code = TREE_CODE (operation);
+
+  /* For pointer addition, we should use the normal plus for
+     the vector addition.  */
+  if (code == POINTER_PLUS_EXPR)
+    code = PLUS_EXPR;
+
   optab = optab_for_tree_code (code, vectype);

   /* Support only unary or binary operations.  */


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32421


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