Commit 1dc8d15b by Jan Hubicka Committed by Jan Hubicka

pr36648.cc: Disable cunrolli

	* g++.dg/vect/pr36648.cc: Disable cunrolli
	* tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix estimation
	of comparsions in the last iteration.

From-SVN: r237527
parent 0ae207e9
2016-06-16 Jan Hubicka <hubicka@ucw.cz>
* tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix estimation
of comparsions in the last iteration.
2016-06-16 Claudiu Zissulescu <claziss@synopsys.com>
Joern Rennecke <joern.rennecke@embecosm.com>
......
2016-06-16 Jan Hubicka <hubicka@ucw.cz>
* g++.dg/vect/pr36648.cc: Disable cunrolli
2016-06-16 Jakub Jelinek <jakub@redhat.com>
PR target/71554
......
/* { dg-require-effective-target vect_float } */
// { dg-additional-options "-fdisable-tree-cunrolli" }
struct vector
{
......
......@@ -255,10 +255,10 @@ tree_estimate_loop_size (struct loop *loop, edge exit, edge edge_to_cancel,
/* Look for reasons why we might optimize this stmt away. */
if (gimple_has_side_effects (stmt))
;
if (!gimple_has_side_effects (stmt))
{
/* Exit conditional. */
else if (exit && body[i] == exit->src
if (exit && body[i] == exit->src
&& stmt == last_stmt (exit->src))
{
if (dump_file && (dump_flags & TDF_DETAILS))
......@@ -266,7 +266,7 @@ tree_estimate_loop_size (struct loop *loop, edge exit, edge edge_to_cancel,
"in peeled copies.\n");
likely_eliminated_peeled = true;
}
else if (edge_to_cancel && body[i] == edge_to_cancel->src
if (edge_to_cancel && body[i] == edge_to_cancel->src
&& stmt == last_stmt (edge_to_cancel->src))
{
if (dump_file && (dump_flags & TDF_DETAILS))
......@@ -275,7 +275,7 @@ tree_estimate_loop_size (struct loop *loop, edge exit, edge edge_to_cancel,
likely_eliminated_last = true;
}
/* Sets of IV variables */
else if (gimple_code (stmt) == GIMPLE_ASSIGN
if (gimple_code (stmt) == GIMPLE_ASSIGN
&& constant_after_peeling (gimple_assign_lhs (stmt), stmt, loop))
{
if (dump_file && (dump_flags & TDF_DETAILS))
......@@ -286,8 +286,8 @@ tree_estimate_loop_size (struct loop *loop, edge exit, edge edge_to_cancel,
/* Assignments of IV variables. */
else if (gimple_code (stmt) == GIMPLE_ASSIGN
&& TREE_CODE (gimple_assign_lhs (stmt)) == SSA_NAME
&& constant_after_peeling (gimple_assign_rhs1 (stmt), stmt,
loop)
&& constant_after_peeling (gimple_assign_rhs1 (stmt),
stmt, loop)
&& (gimple_assign_rhs_class (stmt) != GIMPLE_BINARY_RHS
|| constant_after_peeling (gimple_assign_rhs2 (stmt),
stmt, loop)))
......@@ -307,18 +307,22 @@ tree_estimate_loop_size (struct loop *loop, edge exit, edge edge_to_cancel,
/* We don't simplify all constant compares so make sure
they are not both constant already. See PR70288. */
&& (! is_gimple_min_invariant (gimple_cond_lhs (stmt))
|| ! is_gimple_min_invariant (gimple_cond_rhs (stmt))))
|| ! is_gimple_min_invariant
(gimple_cond_rhs (stmt))))
|| (gimple_code (stmt) == GIMPLE_SWITCH
&& constant_after_peeling (gimple_switch_index (
as_a <gswitch *> (stmt)),
as_a <gswitch *>
(stmt)),
stmt, loop)
&& ! is_gimple_min_invariant
(gimple_switch_index (as_a <gswitch *> (stmt)))))
(gimple_switch_index
(as_a <gswitch *> (stmt)))))
{
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, " Constant conditional.\n");
likely_eliminated = true;
}
}
size->overall += num;
if (likely_eliminated || likely_eliminated_peeled)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment