aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2025-04-24 18:35:54 +0200
committerJan Hubicka <hubicka@ucw.cz>2025-04-24 18:36:17 +0200
commitcfb04e0de6aa438df9d8b83a3d8c7f93789b5c9f (patch)
tree42f332663e65d5adfd519641744294bfd7deb278 /gcc
parent8ef0518bce489c4c0c252a0e0c44193c5f7cf777 (diff)
downloadgcc-cfb04e0de6aa438df9d8b83a3d8c7f93789b5c9f.zip
gcc-cfb04e0de6aa438df9d8b83a3d8c7f93789b5c9f.tar.gz
gcc-cfb04e0de6aa438df9d8b83a3d8c7f93789b5c9f.tar.bz2
Fix ICE building deepsjeng with -fprofile-use
The problem here is division by zero, since adjusted 0 > precise 0. Fixed by using right test. gcc/ChangeLog: PR ipa/119924 * ipa-cp.cc (update_counts_for_self_gen_clones): Use nonzero_p. (update_profiling_info): Likewise. (update_specialized_profile): Likewise.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ipa-cp.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/ipa-cp.cc b/gcc/ipa-cp.cc
index abde64b..b4b9699 100644
--- a/gcc/ipa-cp.cc
+++ b/gcc/ipa-cp.cc
@@ -4639,7 +4639,7 @@ update_counts_for_self_gen_clones (cgraph_node *orig_node,
const vec<cgraph_node *> &self_gen_clones)
{
profile_count redist_sum = orig_node->count.ipa ();
- if (!(redist_sum > profile_count::zero ()))
+ if (!redist_sum.nonzero_p ())
return;
if (dump_file)
@@ -4710,7 +4710,7 @@ update_counts_for_self_gen_clones (cgraph_node *orig_node,
it. */
for (cgraph_node *n : self_gen_clones)
{
- if (!(n->count.ipa () > profile_count::zero ()))
+ if (!n->count.ipa ().nonzero_p ())
continue;
desc_incoming_count_struct desc;
@@ -4756,7 +4756,7 @@ update_profiling_info (struct cgraph_node *orig_node,
profile_count new_sum;
profile_count remainder, orig_node_count = orig_node->count.ipa ();
- if (!(orig_node_count > profile_count::zero ()))
+ if (!orig_node_count.nonzero_p ())
return;
if (dump_file)
@@ -4920,7 +4920,7 @@ update_specialized_profile (struct cgraph_node *new_node,
orig_node_count.dump (dump_file);
fprintf (dump_file, "\n");
}
- if (!(orig_node_count > profile_count::zero ()))
+ if (!orig_node_count.nonzero_p ())
return;
new_node_count = new_node->count;