From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4089 invoked by alias); 10 Aug 2010 10:24:21 -0000 Received: (qmail 3960 invoked by uid 48); 10 Aug 2010 10:24:00 -0000 Date: Tue, 10 Aug 2010 10:24:00 -0000 Message-ID: <20100810102400.3959.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/45241] CPU2006 465.tonto ICE in the vectorizer with -fno-tree-pre In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "irar at il dot ibm dot com" 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: 2010-08/txt/msg00730.txt.bz2 ------- Comment #5 from irar at il dot ibm dot com 2010-08-10 10:23 ------- (In reply to comment #1) > This patch should be a valid fix, because the recognition of the dot_prod > pattern is known to be fail at this point if the stmt is outside the loop. > (I am not sure whether we should not see this case in the vectorizer at this > point -- should previous analysis already filter out?): > I don't understand this. Where do we check if the stmt (which one?) is outside the loop? > diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c > index 19f0ae6..5f81a73 100644 > --- a/gcc/tree-vect-patterns.c > +++ b/gcc/tree-vect-patterns.c > @@ -259,6 +259,10 @@ vect_recog_dot_prod_pattern (gimple last_stmt, tree > *type_in, tree *type_out) > inside the loop (in case we are analyzing an outer-loop). */ > if (!is_gimple_assign (stmt)) > return NULL; > + > + if (!flow_bb_inside_loop_p (loop, gimple_bb (stmt))) > + return NULL; > + > stmt_vinfo = vinfo_for_stmt (stmt); > gcc_assert (stmt_vinfo); > if (STMT_VINFO_DEF_TYPE (stmt_vinfo) != vect_internal_def) > I was looking at PR 45239 and didn't notice that there is another PR and didn't see this comment. So I tested the same fix (successfully on x86_64-suse-linux). You can commit it if you like (just please notice, that the bug exists on 4.5 as well). Thanks, Ira -- irar at il dot ibm dot com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2010-08-10 10:24:00 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45241