re PR target/86547 (s390x: Maximum number of LRA assignment passes is achieved (30...
authorIlya Leoshkevich <iii@linux.ibm.com>
Wed, 15 Aug 2018 04:09:45 +0000 (04:09 +0000)
committerJeff Law <law@gcc.gnu.org>
Wed, 15 Aug 2018 04:09:45 +0000 (22:09 -0600)
        PR target/86547
* lra-lives.c (remove_some_program_points_and_update_live_ranges):
        Check whether lra_live_max_point is 0 before dividing.

From-SVN: r263548

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;