]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR target/86547
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Aug 2018 04:09:45 +0000 (04:09 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Aug 2018 04:09:45 +0000 (04:09 +0000)
* lra-lives.c (remove_some_program_points_and_update_live_ranges):
        Check whether lra_live_max_point is 0 before dividing.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263548 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/lra-lives.c

index 97ea6bcdaa05884abfc4fa746233d1bfae12c8c9..84f81f6c898fc0b920759eefc5026fe9421395ff 100644 (file)
@@ -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
index 433c819d9e3fcdae0bd6b67aa64ddfc878acbbe9..565c68b430a72fdb0459beccef0054fda8d0b2ff 100644 (file)
@@ -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;