From 5036f628c7968180d01d7664adb09491493a3ff8 Mon Sep 17 00:00:00 2001 From: Martin Jambor Date: Fri, 31 Aug 2018 14:14:37 +0200 Subject: [PATCH] [PATCH] Fix thinko in estimate_local_effects in IPA-CP 2018-08-31 Martin Jambor * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN. From-SVN: r264015 --- gcc/ChangeLog | 4 ++++ gcc/ipa-cp.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 62918c311ae..d1a081066bc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2018-08-31 Martin Jambor + + * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN. + 2018-08-31 Martin Liska * ipa-icf.c (sem_item::add_type): Use diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c index 4838194cd73..afc45969558 100644 --- a/gcc/ipa-cp.c +++ b/gcc/ipa-cp.c @@ -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)) -- 2.30.2