diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2018-01-11 08:02:26 +0000 |
---|---|---|
committer | Jan Hubicka <hubicka@ucw.cz> | 2018-01-11 08:02:26 +0000 |
commit | 26946835167ec13c5a8b0728188ca96c903c022f (patch) | |
tree | 0eb2546f8e091da200fb62167784111eba90f386 | |
parent | d98c59e40d8aad31e2516642e470802d7862aee7 (diff) |
PR middle-end/83575
* cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
when in layout mode.
(cfg_layout_finalize): Do not verify cfg before we are out of layout.
* cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
partition fixup.
* gcc.c-torture/compile/pr83575.c: New testcase.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@256479 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/cfgcleanup.c | 6 | ||||
-rw-r--r-- | gcc/cfgrtl.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr83575.c | 33 |
5 files changed, 52 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7eb6c1cc47c..1a55b201090 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2018-01-10 Jan Hubicka <hubicka@ucw.cz> + + PR middle-end/83575 + * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition + when in layout mode. + (cfg_layout_finalize): Do not verify cfg before we are out of layout. + * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing + partition fixup. + 2018-01-10 Michael Collison <michael.collison@arm.com> * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE. diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index eebbe8f7959..c33022c1bb5 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -3013,8 +3013,10 @@ try_optimize_cfg (int mode) is only visible after newly unreachable blocks are deleted, which will be done in fixup_partitions. */ if ((mode & CLEANUP_NO_PARTITIONING) == 0) - fixup_partitions (); - checking_verify_flow_info (); + { + fixup_partitions (); + checking_verify_flow_info (); + } } changed_overall |= changed; diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index f47a78cfcee..6ff80fd5c01 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -2615,7 +2615,8 @@ rtl_verify_edges (void) /* If there are partitions, do a sanity check on them: A basic block in a cold partition cannot dominate a basic block in a hot partition. */ - if (crtl->has_bb_partition && !err) + if (crtl->has_bb_partition && !err + && current_ir_type () == IR_RTL_CFGLAYOUT) { vec<basic_block> bbs_to_fix = find_partition_fixes (true); err = !bbs_to_fix.is_empty (); @@ -4322,7 +4323,6 @@ break_superblocks (void) void cfg_layout_finalize (void) { - checking_verify_flow_info (); free_dominance_info (CDI_DOMINATORS); force_one_exit_fallthru (); rtl_register_cfg_hooks (); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 209d6d896bd..68fe8ef65be 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2018-01-10 Jan Hubicka <hubicka@ucw.cz> + + * gcc.c-torture/compile/pr83575.c: New testcase. + 2018-01-10 Michael Collison <michael.collison@arm.com> gcc.target/aarch64/fp16_fmul_high_1.c: New testcase. diff --git a/gcc/testsuite/gcc.c-torture/compile/pr83575.c b/gcc/testsuite/gcc.c-torture/compile/pr83575.c new file mode 100644 index 00000000000..1c554e982ac --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr83575.c @@ -0,0 +1,33 @@ +/* { dg-options "-O2 -funroll-loops -fno-tree-dominator-opts -fno-tree-loop-im -fno-code-hoisting -fno-tree-pre -fno-guess-branch-probability" } */ +int tw, be; + +void +fp (void) +{ + if (tw == 0) + goto gq; + else if (be == 0) + goto ob; + else + return; + + for (;;) + if (tw < 1) + { + while (tw < 1) + { + gq: + tw = 0; + } + + while (be < 1) + { + ob: + tw = 0; + } + + while (be < 1) + ++be; + } +} + |