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
This commit is contained in:
parent
0ae207e947
commit
1dc8d15bc6
4 changed files with 75 additions and 61 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
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>
|
2016-06-16 Claudiu Zissulescu <claziss@synopsys.com>
|
||||||
Joern Rennecke <joern.rennecke@embecosm.com>
|
Joern Rennecke <joern.rennecke@embecosm.com>
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
2016-06-16 Jan Hubicka <hubicka@ucw.cz>
|
||||||
|
|
||||||
|
* g++.dg/vect/pr36648.cc: Disable cunrolli
|
||||||
|
|
||||||
2016-06-16 Jakub Jelinek <jakub@redhat.com>
|
2016-06-16 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
PR target/71554
|
PR target/71554
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/* { dg-require-effective-target vect_float } */
|
/* { dg-require-effective-target vect_float } */
|
||||||
|
// { dg-additional-options "-fdisable-tree-cunrolli" }
|
||||||
|
|
||||||
struct vector
|
struct vector
|
||||||
{
|
{
|
||||||
|
|
|
@ -255,69 +255,73 @@ tree_estimate_loop_size (struct loop *loop, edge exit, edge edge_to_cancel,
|
||||||
|
|
||||||
/* Look for reasons why we might optimize this stmt away. */
|
/* 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
|
|
||||||
&& stmt == last_stmt (exit->src))
|
|
||||||
{
|
{
|
||||||
if (dump_file && (dump_flags & TDF_DETAILS))
|
/* Exit conditional. */
|
||||||
fprintf (dump_file, " Exit condition will be eliminated "
|
if (exit && body[i] == exit->src
|
||||||
"in peeled copies.\n");
|
&& stmt == last_stmt (exit->src))
|
||||||
likely_eliminated_peeled = true;
|
{
|
||||||
}
|
if (dump_file && (dump_flags & TDF_DETAILS))
|
||||||
else if (edge_to_cancel && body[i] == edge_to_cancel->src
|
fprintf (dump_file, " Exit condition will be eliminated "
|
||||||
&& stmt == last_stmt (edge_to_cancel->src))
|
"in peeled copies.\n");
|
||||||
{
|
likely_eliminated_peeled = true;
|
||||||
if (dump_file && (dump_flags & TDF_DETAILS))
|
}
|
||||||
fprintf (dump_file, " Exit condition will be eliminated "
|
if (edge_to_cancel && body[i] == edge_to_cancel->src
|
||||||
"in last copy.\n");
|
&& stmt == last_stmt (edge_to_cancel->src))
|
||||||
likely_eliminated_last = true;
|
{
|
||||||
}
|
if (dump_file && (dump_flags & TDF_DETAILS))
|
||||||
/* Sets of IV variables */
|
fprintf (dump_file, " Exit condition will be eliminated "
|
||||||
else if (gimple_code (stmt) == GIMPLE_ASSIGN
|
"in last copy.\n");
|
||||||
&& constant_after_peeling (gimple_assign_lhs (stmt), stmt, loop))
|
likely_eliminated_last = true;
|
||||||
{
|
}
|
||||||
if (dump_file && (dump_flags & TDF_DETAILS))
|
/* Sets of IV variables */
|
||||||
fprintf (dump_file, " Induction variable computation will"
|
if (gimple_code (stmt) == GIMPLE_ASSIGN
|
||||||
" be folded away.\n");
|
&& constant_after_peeling (gimple_assign_lhs (stmt), stmt, loop))
|
||||||
likely_eliminated = true;
|
{
|
||||||
}
|
if (dump_file && (dump_flags & TDF_DETAILS))
|
||||||
/* Assignments of IV variables. */
|
fprintf (dump_file, " Induction variable computation will"
|
||||||
else if (gimple_code (stmt) == GIMPLE_ASSIGN
|
" be folded away.\n");
|
||||||
&& TREE_CODE (gimple_assign_lhs (stmt)) == SSA_NAME
|
likely_eliminated = true;
|
||||||
&& constant_after_peeling (gimple_assign_rhs1 (stmt), stmt,
|
}
|
||||||
loop)
|
/* Assignments of IV variables. */
|
||||||
&& (gimple_assign_rhs_class (stmt) != GIMPLE_BINARY_RHS
|
else if (gimple_code (stmt) == GIMPLE_ASSIGN
|
||||||
|| constant_after_peeling (gimple_assign_rhs2 (stmt),
|
&& TREE_CODE (gimple_assign_lhs (stmt)) == SSA_NAME
|
||||||
stmt, loop)))
|
&& constant_after_peeling (gimple_assign_rhs1 (stmt),
|
||||||
{
|
|
||||||
size->constant_iv = true;
|
|
||||||
if (dump_file && (dump_flags & TDF_DETAILS))
|
|
||||||
fprintf (dump_file,
|
|
||||||
" Constant expression will be folded away.\n");
|
|
||||||
likely_eliminated = true;
|
|
||||||
}
|
|
||||||
/* Conditionals. */
|
|
||||||
else if ((gimple_code (stmt) == GIMPLE_COND
|
|
||||||
&& constant_after_peeling (gimple_cond_lhs (stmt), stmt,
|
|
||||||
loop)
|
|
||||||
&& constant_after_peeling (gimple_cond_rhs (stmt), stmt,
|
|
||||||
loop)
|
|
||||||
/* 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))))
|
|
||||||
|| (gimple_code (stmt) == GIMPLE_SWITCH
|
|
||||||
&& constant_after_peeling (gimple_switch_index (
|
|
||||||
as_a <gswitch *> (stmt)),
|
|
||||||
stmt, loop)
|
stmt, loop)
|
||||||
&& ! is_gimple_min_invariant
|
&& (gimple_assign_rhs_class (stmt) != GIMPLE_BINARY_RHS
|
||||||
(gimple_switch_index (as_a <gswitch *> (stmt)))))
|
|| constant_after_peeling (gimple_assign_rhs2 (stmt),
|
||||||
{
|
stmt, loop)))
|
||||||
if (dump_file && (dump_flags & TDF_DETAILS))
|
{
|
||||||
fprintf (dump_file, " Constant conditional.\n");
|
size->constant_iv = true;
|
||||||
likely_eliminated = true;
|
if (dump_file && (dump_flags & TDF_DETAILS))
|
||||||
|
fprintf (dump_file,
|
||||||
|
" Constant expression will be folded away.\n");
|
||||||
|
likely_eliminated = true;
|
||||||
|
}
|
||||||
|
/* Conditionals. */
|
||||||
|
else if ((gimple_code (stmt) == GIMPLE_COND
|
||||||
|
&& constant_after_peeling (gimple_cond_lhs (stmt), stmt,
|
||||||
|
loop)
|
||||||
|
&& constant_after_peeling (gimple_cond_rhs (stmt), stmt,
|
||||||
|
loop)
|
||||||
|
/* 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))))
|
||||||
|
|| (gimple_code (stmt) == GIMPLE_SWITCH
|
||||||
|
&& constant_after_peeling (gimple_switch_index (
|
||||||
|
as_a <gswitch *>
|
||||||
|
(stmt)),
|
||||||
|
stmt, loop)
|
||||||
|
&& ! is_gimple_min_invariant
|
||||||
|
(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;
|
size->overall += num;
|
||||||
|
|
Loading…
Add table
Reference in a new issue