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



--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> 2013-04-10 
15:05:44 UTC ---

Like with the simple



Index: gcc/tree-vect-data-refs.c

===================================================================

--- gcc/tree-vect-data-refs.c   (revision 196872)

+++ gcc/tree-vect-data-refs.c   (working copy)

@@ -1454,6 +1454,12 @@ vect_enhance_data_refs_alignment (loop_v

                          = STMT_VINFO_SAME_ALIGN_REFS (stmt_info).length ();

                       dr0 = dr;

                     }

+                 /* If DR has an invariant base address, prefer it.  */

+                 else if (same_align_drs_max

+                          == STMT_VINFO_SAME_ALIGN_REFS (stmt_info).length ()

+                          && TREE_CODE (DR_BASE_ADDRESS (dr)) == SSA_NAME

+                          && SSA_NAME_IS_DEFAULT_DEF (DR_BASE_ADDRESS (dr)))

+                   dr0 = dr;



                   if (!first_store && DR_IS_WRITE (dr))

                     first_store = dr;



to be improved tomorrow to cover more cases.

Reply via email to