* profile-count.h (profile_count::split): Give better result when
splitting profile_probability::always.
From-SVN: r266584
+2018-11-28 Jan Hubicka <jh@suse.cz>
+
+ * profile-count.h (profile_count::split): Give better result when
+ splitting profile_probability::always.
+
2018-11-28 Vladimir Makarov <vmakarov@redhat.com>
PR target/88207
{
profile_probability ret = *this * cprob;
/* The following is equivalent to:
- *this = cprob.invert () * *this / ret.invert (); */
- *this = (*this - ret) / ret.invert ();
+ *this = cprob.invert () * *this / ret.invert ();
+ Avoid scaling when overall outcome is supposed to be always.
+ Without knowing that one is inverse of toher, the result would be
+ conservative. */
+ if (!(*this == profile_probability::always ()))
+ *this = (*this - ret) / ret.invert ();
return ret;
}