[PATCH] Fix thinko in estimate_local_effects in IPA-CP
authorMartin Jambor <mjambor@suse.cz>
Fri, 31 Aug 2018 12:14:37 +0000 (14:14 +0200)
committerMartin Jambor <jamborm@gcc.gnu.org>
Fri, 31 Aug 2018 12:14:37 +0000 (14:14 +0200)
2018-08-31  Martin Jambor  <mjambor@suse.cz>

* ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.

From-SVN: r264015

gcc/ChangeLog
gcc/ipa-cp.c

index 62918c311ae227f7e18c1386c878ba753c0421b0..d1a081066bca846c4bc67120c497e2432c7feabf 100644 (file)
@@ -1,3 +1,7 @@
+2018-08-31  Martin Jambor  <mjambor@suse.cz>
+
+       * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
+
 2018-08-31  Martin Liska  <mliska@suse.cz>
 
        * ipa-icf.c (sem_item::add_type): Use
index 4838194cd7365da9caed7b9a7ce18e4ff762fa27..afc45969558d17ca3bfaa0a194a56e4bd7ee0d36 100644 (file)
@@ -2910,7 +2910,7 @@ estimate_local_effects (struct cgraph_node *node)
                     "known contexts, code not going to grow.\n");
        }
       else if (good_cloning_opportunity_p (node,
-                                          MAX ((base_time - time).to_int (),
+                                          MIN ((base_time - time).to_int (),
                                                65536),
                                           stats.freq_sum, stats.count_sum,
                                           size))