From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21855 invoked by alias); 2 Feb 2012 13:42:50 -0000 Received: (qmail 21841 invoked by uid 22791); 2 Feb 2012 13:42:49 -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; Thu, 02 Feb 2012 13:42:35 +0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/52091] [4.7 Regression] ICE: verify_gimple failed Date: Thu, 02 Feb 2012 13: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: 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: 2012-02/txt/msg00221.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52091 --- Comment #6 from Jakub Jelinek 2012-02-02 13:41:01 UTC --- (In reply to comment #5) > I think we should fail to vectorize D.2030_19 = prephitmp.17_21 & 65535, or any > other non-phi/not vect_double_reduction_def stmt with a double reduction phi as > a def_stmt. > > We can either check this in every vectorizable_* for every operand, like this: > Index: tree-vect-stmts.c > =================================================================== > --- tree-vect-stmts.c (revision 183125) > +++ tree-vect-stmts.c (working copy) > @@ -3326,7 +3326,8 @@ vectorizable_operation (gimple stmt, gimple_stmt_i > > op0 = gimple_assign_rhs1 (stmt); > if (!vect_is_simple_use_1 (op0, loop_vinfo, bb_vinfo, > - &def_stmt, &def, &dt[0], &vectype)) > + &def_stmt, &def, &dt[0], &vectype) > + || dt[0] == vect_double_reduction_def) > { > if (vect_print_dump_info (REPORT_DETAILS)) > fprintf (vect_dump, "use not simple."); > > > or pass stmt or stmt_info to vect_is_simple_use and check it there. Are you going to write a patch for this? Not sure how exactly would you like it to look up. > > OT, it is strange that we are creating a reduction for a loop which loops > > exactly as many times as there are units in the vector, that doesn't seem to be > > profitable. > > > > Right, but doesn't cost model catch this? For simple testcases it does apparently.