aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-sink.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-11-21 11:59:27 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2019-11-21 11:59:27 +0100
commit01a0fba62602d008fe838aafa0ee5b1b35369e06 (patch)
tree753363427bb25a48beabf8bf11526e1020f99d4e /gcc/tree-ssa-sink.c
parent141793d5e91cac12a59ed3a4a8d432824ea753ee (diff)
downloadgcc-01a0fba62602d008fe838aafa0ee5b1b35369e06.zip
gcc-01a0fba62602d008fe838aafa0ee5b1b35369e06.tar.gz
gcc-01a0fba62602d008fe838aafa0ee5b1b35369e06.tar.bz2
re PR tree-optimization/91355 (optimized code does not call destructor while unwinding after exception)
PR tree-optimization/91355 * tree-ssa-sink.c (select_best_block): Use >= rather than > for early_bb scaled count with best_bb count comparison. * g++.dg/torture/pr91355.C: New test. From-SVN: r278548
Diffstat (limited to 'gcc/tree-ssa-sink.c')
-rw-r--r--gcc/tree-ssa-sink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree-ssa-sink.c b/gcc/tree-ssa-sink.c
index eebff65..dbf1529 100644
--- a/gcc/tree-ssa-sink.c
+++ b/gcc/tree-ssa-sink.c
@@ -228,7 +228,7 @@ select_best_block (basic_block early_bb,
/* If result of comparsion is unknown, prefer EARLY_BB.
Thus use !(...>=..) rather than (...<...) */
&& !(best_bb->count.apply_scale (100, 1)
- > (early_bb->count.apply_scale (threshold, 1))))
+ >= early_bb->count.apply_scale (threshold, 1)))
return best_bb;
/* No better block found, so return EARLY_BB, which happens to be the