summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-sink.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@linaro.org>2017-11-20 16:02:55 +0000
committerRichard Sandiford <richard.sandiford@linaro.org>2017-11-20 16:02:55 +0000
commitd58952aefb03632bbb5b441d5c0bd330711f0af1 (patch)
treed046e56bfbd6a40106ae6ab96fafc954f1dfc955 /gcc/tree-ssa-sink.c
parent648f8fc59b2cc39abd24f4c22388b346cdebcc31 (diff)
parent50221fae802a10fafe95e61d40504a58da33e98f (diff)
downloadgcc-linaro-dev/sve.tar.gz
Merge trunk into svelinaro-dev/sve
Diffstat (limited to 'gcc/tree-ssa-sink.c')
-rw-r--r--gcc/tree-ssa-sink.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/tree-ssa-sink.c b/gcc/tree-ssa-sink.c
index 1c5d7dd7556..5d801d35921 100644
--- a/gcc/tree-ssa-sink.c
+++ b/gcc/tree-ssa-sink.c
@@ -226,8 +226,10 @@ select_best_block (basic_block early_bb,
/* If BEST_BB is at the same nesting level, then require it to have
significantly lower execution frequency to avoid gratutious movement. */
if (bb_loop_depth (best_bb) == bb_loop_depth (early_bb)
- && best_bb->count.to_frequency (cfun)
- < (early_bb->count.to_frequency (cfun) * threshold / 100.0))
+ /* If result of comparsion is unknown, preffer EARLY_BB.
+ Thus use !(...>=..) rather than (...<...) */
+ && !(best_bb->count.apply_scale (100, 1)
+ > (early_bb->count.apply_scale (threshold, 1))))
return best_bb;
/* No better block found, so return EARLY_BB, which happens to be the