pred-1.C: New testcase

* g++.dg/tree-ssa/pred-1.C: New testcase
	* gcc.dg/tree-ssa/pred-1.c: New testcase
	* cp-gimplify.c (genericize_continue_stmt): Force addition of
	predict stmt.

From-SVN: r237068
This commit is contained in:
Jan Hubicka 2016-06-03 15:47:15 +02:00 committed by Jan Hubicka
parent 859b0bae8e
commit bfeee8acaa
5 changed files with 42 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2016-06-02 Jan Hubicka <jh@suse.cz>
* cp-gimplify.c (genericize_continue_stmt): Force addition of
predict stmt.
2016-06-02 Paolo Carlini <paolo.carlini@oracle.com>
* decl.c (xref_tag_1): Change pairs of errors to error + inform.

View file

@ -362,7 +362,7 @@ genericize_continue_stmt (tree *stmt_p)
tree label = get_bc_label (bc_continue);
location_t location = EXPR_LOCATION (*stmt_p);
tree jump = build1_loc (location, GOTO_EXPR, void_type_node, label);
append_to_statement_list (pred, &stmt_list);
append_to_statement_list_force (pred, &stmt_list);
append_to_statement_list (jump, &stmt_list);
*stmt_p = stmt_list;
}

View file

@ -1,3 +1,8 @@
2016-06-03 Jan Hubicka <jh@suse.cz>
* g++.dg/tree-ssa/pred-1.C: New testcase
* gcc.dg/tree-ssa/pred-1.c: New testcase
2016-06-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR target/70957

View file

@ -0,0 +1,15 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-profile_estimate" } */
int a[100];
void foo(int);
main()
{
int i;
for (i=0;i<100;i++)
{
if (a[i])
continue;
foo(i);
}
}
// { dg-final { scan-tree-dump "continue heuristics" "profile_estimate" } }

View file

@ -0,0 +1,16 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-profile_estimate" } */
int a[100];
void foo(int);
int
main()
{
int i;
for (i=0;i<100;i++)
{
if (a[i])
continue;
foo(i);
}
}
// { dg-final { scan-tree-dump "continue heuristics" "profile_estimate" } }