From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22726 invoked by alias); 15 Sep 2011 11:41:40 -0000 Received: (qmail 22715 invoked by uid 22791); 15 Sep 2011 11:41:38 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 15 Sep 2011 11:41:25 +0000 From: "irar at il dot ibm.com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/50412] gfortran -Ofast ICE in vect_do_peeling_for_loop_bound Date: Thu, 15 Sep 2011 11:42:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: irar at il dot ibm.com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: irar at il dot ibm.com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Status CC AssignedTo Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-09/txt/msg01063.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50412 Ira Rosen 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 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; } }