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/53366] wrong code generation by tree vectorizer using AVX


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

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-05-17 08:55:36 UTC ---
Indeed,

--- gcc/tree-vect-slp.c.jj    2012-04-19 11:09:13.000000000 +0200
+++ gcc/tree-vect-slp.c    2012-05-17 10:47:30.124290361 +0200
@@ -1199,7 +1199,8 @@ vect_supported_load_permutation_p (slp_i

   /* We checked that this case ok, so there is no need to proceed with 
      permutation tests.  */
-  if (complex_numbers == 2)
+  if (complex_numbers == 2
+      && VEC_length (slp_tree, SLP_INSTANCE_LOADS (slp_instn)) == 2)
     {
       VEC_free (slp_tree, heap, SLP_INSTANCE_LOADS (slp_instn));
       VEC_free (int, heap, SLP_INSTANCE_LOAD_PERMUTATION (slp_instn));

alone fixes this as the further load permutation checks fail.  Whether this is
the right fix and whether it is sufficient, no idea unfortunately, not familiar
enough with the interleaving code.  Richard or Michael, any thoughts?


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