From 6439c358063d3660e08a7931d720b901282879f8 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Tue, 30 Jan 2018 13:46:19 +0100 Subject: [PATCH] profile-count.c (profile_count::combine_with_ipa_count): Handle zeros correctly. * profile-count.c (profile_count::combine_with_ipa_count): Handle zeros correctly. From-SVN: r257182 --- gcc/ChangeLog | 5 +++++ gcc/profile-count.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7be83e9930d..f20ec74acbd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-01-30 Jan Hubicka + + * profile-count.c (profile_count::combine_with_ipa_count): Handle + zeros correctly. + 2018-01-30 Richard Biener PR tree-optimization/83008 diff --git a/gcc/profile-count.c b/gcc/profile-count.c index c3b115f0b81..3d411cfbfb3 100644 --- a/gcc/profile-count.c +++ b/gcc/profile-count.c @@ -321,7 +321,7 @@ profile_count::combine_with_ipa_count (profile_count ipa) ipa = ipa.ipa (); if (ipa.nonzero_p ()) return ipa; - if (!ipa.initialized_p ()) + if (!ipa.initialized_p () || *this == profile_count::zero ()) return *this; if (ipa == profile_count::zero ()) return this->global0 (); -- 2.30.2