From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15255 invoked by alias); 29 Aug 2011 10:45:19 -0000 Received: (qmail 15245 invoked by uid 22791); 29 Aug 2011 10:45:17 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_TM 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; Mon, 29 Aug 2011 10:45:03 +0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/50208] [4.7 Regression] ICE: in vinfo_for_stmt at tree-vectorizer.h:598 with -ftree-vectorize -fno-tree-fre -fno-tree-pre Date: Mon, 29 Aug 2011 11:05: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: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.7.0 X-Bugzilla-Changed-Fields: 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-08/txt/msg02284.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50208 --- Comment #2 from Jakub Jelinek 2011-08-29 10:44:42 UTC --- The problem is that def_stmt is a gimple stmt from before the loop and new_loop_vec_info only initializes gimple_uid of stmts in the loop being processed. So perhaps before testing for vinfo_for_stmt it should || !gimple_bb (def_stmt) || !flow_bb_inside_loop_p (loop, gimple_bb (def_stmt)) and perhaps give up in those cases too? Loop would need to be initialized, perhaps similarly to vect_recog_dot_prod_pattern? loop_vec_info loop_info = STMT_VINFO_LOOP_VINFO (vinfo_for_stmt (stmt)); struct loop *loop = LOOP_VINFO_LOOP (loop_info); ? I have no idea whether this can be invoked from slp vectorizer and what to do in that case.