From f903ba0b58e38eb6d46b5a1b94ebf206a4e85a77 Mon Sep 17 00:00:00 2001 From: marxin Date: Tue, 25 Sep 2018 07:14:38 +0000 Subject: [PATCH] Fix scaling of a sreal number. 2018-09-25 Martin Liska * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two integers and not by a float value. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@264563 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/ipa-fnsummary.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e5891f6b7c18..780cf78cf607 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-09-25 Martin Liska + + * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two + integers and not by a float value. + 2018-09-25 Martin Liska PR fortran/87394 diff --git a/gcc/ipa-fnsummary.c b/gcc/ipa-fnsummary.c index 62095c6cf6f1..9cb7d41ccc5a 100644 --- a/gcc/ipa-fnsummary.c +++ b/gcc/ipa-fnsummary.c @@ -2742,7 +2742,7 @@ estimate_node_size_and_time (struct cgraph_node *node, gcc_checking_assert (time >= 0); /* nonspecialized_time should be always bigger than specialized time. Roundoff issues however may get into the way. */ - gcc_checking_assert ((nonspecialized_time - time * 0.99) >= -1); + gcc_checking_assert ((nonspecialized_time - time * 99 / 100) >= -1); /* Roundoff issues may make specialized time bigger than nonspecialized time. We do not really want that to happen because some heurstics -- 2.39.5