From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22023 invoked by alias); 9 Dec 2008 20:38:39 -0000 Received: (qmail 20967 invoked by uid 48); 9 Dec 2008 20:37:06 -0000 Date: Tue, 09 Dec 2008 20:38:00 -0000 Message-ID: <20081209203706.20966.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/37416] [4.4 Regression] Failure to return number of loop iterations In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jakub at gcc dot gnu dot org" 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: 2008-12/txt/msg00892.txt.bz2 ------- Comment #4 from jakub at gcc dot gnu dot org 2008-12-09 20:37 ------- Indeed, tuplification bug. The following makes the testcase vectorizable again. gcc 4.3 had: Symbolic number of iterations is (short unsigned int) y_3(D) + 65534 and so does trunk with this patch: --- gcc/tree-scalar-evolution.c.jj 2008-11-10 10:28:26.000000000 +0100 +++ gcc/tree-scalar-evolution.c 2008-12-09 21:17:10.000000000 +0100 @@ -1229,6 +1229,18 @@ follow_ssa_edge_in_rhs (struct loop *loo case GIMPLE_SINGLE_RHS: return follow_ssa_edge_expr (loop, stmt, gimple_assign_rhs1 (stmt), halting_phi, evolution_of_loop, limit); + case GIMPLE_UNARY_RHS: + if (code == NOP_EXPR) + { + /* This assignment is under the form "a_1 = (cast) rhs. */ + t_bool res + = follow_ssa_edge_expr (loop, stmt, gimple_assign_rhs1 (stmt), + halting_phi, evolution_of_loop, limit); + *evolution_of_loop = chrec_convert (type, *evolution_of_loop, stmt); + return res; + } + /* FALLTHRU */ + default: return t_false; } -- jakub at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |jakub at gcc dot gnu dot org |dot org | Status|NEW |ASSIGNED Last reconfirmed|2008-11-22 15:47:53 |2008-12-09 20:37:03 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37416