http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50412
Ira Rosen <irar at il dot ibm.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |irar at il dot ibm.com AssignedTo|unassigned at gcc dot |irar at il dot ibm.com |gnu.org | --- Comment #2 from Ira Rosen <irar at il dot ibm.com> 2011-09-15 11:40:59 UTC --- The problem is that we don't support loop peeling for outer loops, but we support single element interleaving that may require peeling. I'll test this patch: Index: tree-vect-data-refs.c =================================================================== --- tree-vect-data-refs.c (revision 178780) +++ tree-vect-data-refs.c (working copy) @@ -2055,6 +2059,10 @@ vect_analyze_group_access (struct data_r HOST_WIDE_INT dr_step = TREE_INT_CST_LOW (step); HOST_WIDE_INT stride, last_accessed_element = 1; bool slp_impossible = false; + struct loop *loop = NULL; + + if (loop_vinfo) + loop = LOOP_VINFO_LOOP (loop_vinfo); /* For interleaving, STRIDE is STEP counted in elements, i.e., the size of the interleaving group (including gaps). */ @@ -2085,11 +2093,17 @@ vect_analyze_group_access (struct data_r if (loop_vinfo) { - LOOP_VINFO_PEELING_FOR_GAPS (loop_vinfo) = true; - if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "Data access with gaps requires scalar " "epilogue loop"); + if (loop->inner) + { + if (vect_print_dump_info (REPORT_DETAILS)) + fprintf (vect_dump, "Peeling for outer loop is not supported"); + return false; + } + + LOOP_VINFO_PEELING_FOR_GAPS (loop_vinfo) = true; } return true; @@ -2272,10 +2286,17 @@ vect_analyze_group_access (struct data_r /* There is a gap in the end of the group. */ if (stride - last_accessed_element > 0 && loop_vinfo) { - LOOP_VINFO_PEELING_FOR_GAPS (loop_vinfo) = true; if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "Data access with gaps requires scalar " "epilogue loop"); + if (loop->inner) + { + if (vect_print_dump_info (REPORT_DETAILS)) + fprintf (vect_dump, "Peeling for outer loop is not supported"); + return false; + } + + LOOP_VINFO_PEELING_FOR_GAPS (loop_vinfo) = true; } }