aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2018-08-15 04:09:45 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2018-08-15 04:09:45 +0000
commit0860d354cf190582ad5c4f8207ce9009bf68ef4b (patch)
treea424f0e3f30bc796f461e229cf7b32c26a4aa842
parentb8b28f1c38e302d4382326d8967ccc1b6c88943e (diff)
PR target/86547
* lra-lives.c (remove_some_program_points_and_update_live_ranges): Check whether lra_live_max_point is 0 before dividing. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@263548 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/lra-lives.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 97ea6bcdaa0..84f81f6c898 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
+
+ PR target/86547
+ * lra-lives.c (remove_some_program_points_and_update_live_ranges):
+ Check whether lra_live_max_point is 0 before dividing.
+
2018-08-14 Martin Sebor <msebor@redhat.com>
PR tree-optimization/86650
diff --git a/gcc/lra-lives.c b/gcc/lra-lives.c
index 433c819d9e3..565c68b430a 100644
--- a/gcc/lra-lives.c
+++ b/gcc/lra-lives.c
@@ -1153,7 +1153,8 @@ remove_some_program_points_and_update_live_ranges (void)
n++;
if (lra_dump_file != NULL)
fprintf (lra_dump_file, "Compressing live ranges: from %d to %d - %d%%\n",
- lra_live_max_point, n, 100 * n / lra_live_max_point);
+ lra_live_max_point, n,
+ lra_live_max_point ? 100 * n / lra_live_max_point : 100);
if (n < lra_live_max_point)
{
lra_live_max_point = n;