aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2017-06-06 13:30:54 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2017-06-06 11:30:54 +0000
commit86fdda05914d35026362dbf8bee8520d7e549525 (patch)
tree86f1d163af120b271b2aa90c1062335d826fa2f9 /gcc/tree-cfg.c
parentd2537732ca4c5545bac24d68df55dffc703bf4f6 (diff)
downloadgcc-86fdda05914d35026362dbf8bee8520d7e549525.zip
gcc-86fdda05914d35026362dbf8bee8520d7e549525.tar.gz
gcc-86fdda05914d35026362dbf8bee8520d7e549525.tar.bz2
re PR bootstrap/80978 (LTO/PGO bootstrap broken by r248863)
PR bootstrap/80978 * tree-cfg.c (execute_fixup_cfg): Fix condition on when to rescale profile. From-SVN: r248915
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 1d5271a..c84e99d 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -9077,7 +9077,9 @@ execute_fixup_cfg (void)
cgraph_node *node = cgraph_node::get (current_function_decl);
profile_count num = node->count;
profile_count den = ENTRY_BLOCK_PTR_FOR_FN (cfun)->count;
- bool scale = num.initialized_p () && den.initialized_p () && !(num == den);
+ bool scale = num.initialized_p ()
+ && (den > 0 || num == profile_count::zero ())
+ && !(num == den);
if (scale)
{