From: Jan Hubicka Date: Fri, 3 Jun 2016 13:47:15 +0000 (+0200) Subject: pred-1.C: New testcase X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bfeee8acaabebf2eb6d4587731b2a639f530293e;p=gcc.git 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 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index fba9aa9e048..69d3da17c9e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2016-06-02 Jan Hubicka + + * cp-gimplify.c (genericize_continue_stmt): Force addition of + predict stmt. + 2016-06-02 Paolo Carlini * decl.c (xref_tag_1): Change pairs of errors to error + inform. diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c index 4fc8ba1afca..72ba50ee723 100644 --- a/gcc/cp/cp-gimplify.c +++ b/gcc/cp/cp-gimplify.c @@ -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; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 00e4ce6e721..c567f756408 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-06-03 Jan Hubicka + + * g++.dg/tree-ssa/pred-1.C: New testcase + * gcc.dg/tree-ssa/pred-1.c: New testcase + 2016-06-03 Bill Schmidt PR target/70957 diff --git a/gcc/testsuite/g++.dg/tree-ssa/pred-1.C b/gcc/testsuite/g++.dg/tree-ssa/pred-1.C new file mode 100644 index 00000000000..01b065ee966 --- /dev/null +++ b/gcc/testsuite/g++.dg/tree-ssa/pred-1.C @@ -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" } } diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pred-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pred-1.c new file mode 100644 index 00000000000..97e3cb78198 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pred-1.c @@ -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" } }