[Bug tree-optimization/37416] [4.4 Regression] Failure to return number of loop iterations
jakub at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Dec 9 20:38:00 GMT 2008
------- 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
More information about the Gcc-bugs
mailing list