aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2023-07-14 12:24:29 +0200
committerAldy Hernandez <aldyh@redhat.com>2023-07-17 12:03:36 +0200
commit64c727131133d8d2abf02ff4df5026749d9bd253 (patch)
treecd68df3ec9b7523b49b5b996d29547f35ace7297
parentc29584fc29df0c5075ad57cce5bea447b1d061a3 (diff)
downloadgcc-64c727131133d8d2abf02ff4df5026749d9bd253.zip
gcc-64c727131133d8d2abf02ff4df5026749d9bd253.tar.gz
gcc-64c727131133d8d2abf02ff4df5026749d9bd253.tar.bz2
Export value/mask known bits from IPA.
Currently IPA throws away the known 1 bits because VRP and irange have traditionally only had a way of tracking known 0s (set_nonzero_bits). With the ability to keep all the known bits in the irange, we can now save this between passes. gcc/ChangeLog: * ipa-prop.cc (ipcp_update_bits): Export value/mask known bits.
-rw-r--r--gcc/ipa-prop.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/ipa-prop.cc b/gcc/ipa-prop.cc
index d2b998f..5d790ff 100644
--- a/gcc/ipa-prop.cc
+++ b/gcc/ipa-prop.cc
@@ -5853,10 +5853,9 @@ ipcp_update_bits (struct cgraph_node *node, ipcp_transformation *ts)
{
unsigned prec = TYPE_PRECISION (TREE_TYPE (ddef));
signop sgn = TYPE_SIGN (TREE_TYPE (ddef));
-
- wide_int nonzero_bits = wide_int::from (bits[i]->mask, prec, UNSIGNED)
- | wide_int::from (bits[i]->value, prec, sgn);
- set_nonzero_bits (ddef, nonzero_bits);
+ wide_int mask = wide_int::from (bits[i]->mask, prec, UNSIGNED);
+ wide_int value = wide_int::from (bits[i]->value, prec, sgn);
+ set_bitmask (ddef, value, mask);
}
else
{