Skip to content

Commit

Permalink
Rename nonzero_bits to known_zero_bits.
Browse files Browse the repository at this point in the history
The name nonzero_bits is confusing.  We're not tracking nonzero bits.
We're tracking known-zero bits, or at the worst we're tracking "maye
nonzero bits".  But really, the only thing we're sure about in the
"nonzero" bits are the bits that are zero, which are known to be 0.
We're not tracking nonzero bits.

I know we've been carrying around this name forever, but the fact that
both of the maintainers of the code *HATE* it, should be telling.
Also, we'd also like to track known-one bits in the irange, so it's
best to keep the nomenclature consistent.

Andrew, are you ok with this naming, or would you prefer something
else?

gcc/ChangeLog:

	* asan.cc (handle_builtin_alloca): Rename *nonzero* to *known_zero*.
	* fold-const.cc (expr_not_equal_to): Same.
	(tree_nonzero_bits): Same.
	* gimple-range-op.cc: Same.
	* ipa-cp.cc (ipcp_bits_lattice::get_value_and_mask): Same.
	* ipa-prop.cc (ipa_compute_jump_functions_for_edge): Same.
	(ipcp_update_bits): Same.
	* match.pd: Same.
	* range-op.cc (operator_lt::fold_range): Same.
	(operator_cast::fold_range): Same.
	(operator_bitwise_and::fold_range): Same.
	(set_nonzero_range_from_mask): Same.
	(set_known_zero_range_from_mask): Same.
	(operator_bitwise_and::simple_op1_range_solver): Same.
	(operator_bitwise_and::op1_range): Same.
	(range_op_cast_tests): Same.
	(range_op_bitwise_and_tests): Same.
	* tree-data-ref.cc (split_constant_offset): Same.
	* tree-ssa-ccp.cc (get_default_value): Same.
	(ccp_finalize): Same.
	(evaluate_stmt): Same.
	* tree-ssa-dom.cc
	(dom_opt_dom_walker::set_global_ranges_from_unreachable_edges): Same.
	* tree-ssa-reassoc.cc (optimize_range_tests_var_bound): Same.
	* tree-ssanames.cc (set_nonzero_bits): Same.
	(set_known_zero_bits): Same.
	(get_nonzero_bits): Same.
	(get_known_zero_bits): Same.
	(ssa_name_has_boolean_range): Same.
	* tree-ssanames.h (set_nonzero_bits): Same.
	(get_nonzero_bits): Same.
	(set_known_zero_bits): Same.
	(get_known_zero_bits): Same.
	* tree-vect-patterns.cc (vect_get_range_info): Same.
	* tree-vrp.cc (maybe_set_nonzero_bits): Same.
	(maybe_set_known_zero_bits): Same.
	(vrp_asserts::remove_range_assertions): Same.
	* tree-vrp.h (maybe_set_nonzero_bits): Same.
	(maybe_set_known_zero_bits): Same.
	* tree.cc (tree_ctz): Same.
	* value-range-pretty-print.cc
	(vrange_printer::print_irange_bitmasks): Same.
	* value-range-storage.cc (irange_storage_slot::set_irange): Same.
	(irange_storage_slot::get_irange): Same.
	(irange_storage_slot::dump): Same.
	* value-range-storage.h: Same.
	* value-range.cc (irange::operator=): Same.
	(irange::copy_to_legacy): Same.
	(irange::irange_set): Same.
	(irange::irange_set_anti_range): Same.
	(irange::set): Same.
	(irange::verify_range): Same.
	(irange::legacy_equal_p): Same.
	(irange::operator==): Same.
	(irange::contains_p): Same.
	(irange::irange_single_pair_union): Same.
	(irange::irange_union): Same.
	(irange::irange_intersect): Same.
	(irange::invert): Same.
	(irange::get_nonzero_bits_from_range): Same.
	(irange::get_known_zero_bits_from_range): Same.
	(irange::set_range_from_nonzero_bits): Same.
	(irange::set_range_from_known_zero_bits): Same.
	(irange::set_nonzero_bits): Same.
	(irange::set_known_zero_bits): Same.
	(irange::get_nonzero_bits): Same.
	(irange::get_known_zero_bits): Same.
	(irange::intersect_nonzero_bits): Same.
	(irange::intersect_known_zero_bits): Same.
	(irange::union_nonzero_bits): Same.
	(irange::union_known_zero_bits): Same.
	(range_tests_nonzero_bits): Same.
	* value-range.h (irange::varying_compatible_p): Same.
	(gt_ggc_mx): Same.
	(gt_pch_nx): Same.
	(irange::set_undefined): Same.
	(irange::set_varying): Same.
  • Loading branch information
aldyh authored and ouuleilei-bot committed Oct 21, 2022
1 parent bf3b532 commit 6e6f30a
Show file tree
Hide file tree
Showing 22 changed files with 148 additions and 148 deletions.
2 changes: 1 addition & 1 deletion gcc/asan.cc
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ handle_builtin_alloca (gcall *call, gimple_stmt_iterator *iter)
tree redzone_size = build_int_cst (size_type_node, ASAN_RED_ZONE_SIZE);

/* Extract lower bits from old_size. */
wide_int size_nonzero_bits = get_nonzero_bits (old_size);
wide_int size_nonzero_bits = get_known_zero_bits (old_size);
wide_int rz_mask
= wi::uhwi (redzone_mask, wi::get_precision (size_nonzero_bits));
wide_int old_size_lower_bits = wi::bit_and (size_nonzero_bits, rz_mask);
Expand Down
4 changes: 2 additions & 2 deletions gcc/fold-const.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10815,7 +10815,7 @@ expr_not_equal_to (tree t, const wide_int &w)
return true;
/* If T has some known zero bits and W has any of those bits set,
then T is known not to be equal to W. */
if (wi::ne_p (wi::zext (wi::bit_and_not (w, get_nonzero_bits (t)),
if (wi::ne_p (wi::zext (wi::bit_and_not (w, get_known_zero_bits (t)),
TYPE_PRECISION (TREE_TYPE (t))), 0))
return true;
return false;
Expand Down Expand Up @@ -16508,7 +16508,7 @@ tree_nonzero_bits (const_tree t)
case INTEGER_CST:
return wi::to_wide (t);
case SSA_NAME:
return get_nonzero_bits (t);
return get_known_zero_bits (t);
case NON_LVALUE_EXPR:
case SAVE_EXPR:
return tree_nonzero_bits (TREE_OPERAND (t, 0));
Expand Down
2 changes: 1 addition & 1 deletion gcc/gimple-range-op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ class cfn_popcount : public cfn_ffs
if (lh.undefined_p ())
return false;
unsigned prec = TYPE_PRECISION (type);
wide_int nz = lh.get_nonzero_bits ();
wide_int nz = lh.get_known_zero_bits ();
wide_int pop = wi::shwi (wi::popcount (nz), prec);
// Calculating the popcount of a singleton is trivial.
if (lh.singleton_p ())
Expand Down
2 changes: 1 addition & 1 deletion gcc/ipa-cp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,7 @@ ipcp_bits_lattice::known_nonzero_p () const
void
ipcp_bits_lattice::get_value_and_mask (tree operand, widest_int *valuep, widest_int *maskp)
{
wide_int get_nonzero_bits (const_tree);
wide_int get_known_zero_bits (const_tree);

if (TREE_CODE (operand) == INTEGER_CST)
{
Expand Down
4 changes: 2 additions & 2 deletions gcc/ipa-prop.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2331,7 +2331,7 @@ ipa_compute_jump_functions_for_edge (struct ipa_func_body_info *fbi,
{
if (TREE_CODE (arg) == SSA_NAME)
ipa_set_jfunc_bits (jfunc, 0,
widest_int::from (get_nonzero_bits (arg),
widest_int::from (get_known_zero_bits (arg),
TYPE_SIGN (TREE_TYPE (arg))));
else
ipa_set_jfunc_bits (jfunc, wi::to_widest (arg), 0);
Expand Down Expand Up @@ -5816,7 +5816,7 @@ ipcp_update_bits (struct cgraph_node *node)

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);
set_known_zero_bits (ddef, nonzero_bits);
}
else
{
Expand Down
14 changes: 7 additions & 7 deletions gcc/match.pd
Original file line number Diff line number Diff line change
Expand Up @@ -1199,7 +1199,7 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
(simplify
(bit_and (bit_not SSA_NAME@0) INTEGER_CST@1)
(if (INTEGRAL_TYPE_P (TREE_TYPE (@0))
&& wi::bit_and_not (get_nonzero_bits (@0), wi::to_wide (@1)) == 0)
&& wi::bit_and_not (get_known_zero_bits (@0), wi::to_wide (@1)) == 0)
(bit_xor @0 @1)))

/* For constants M and N, if M == (1LL << cst) - 1 && (N & M) == M,
Expand Down Expand Up @@ -1317,7 +1317,7 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
(simplify
(bit_and SSA_NAME@0 INTEGER_CST@1)
(if (INTEGRAL_TYPE_P (TREE_TYPE (@0))
&& wi::bit_and_not (get_nonzero_bits (@0), wi::to_wide (@1)) == 0)
&& wi::bit_and_not (get_known_zero_bits (@0), wi::to_wide (@1)) == 0)
@0))
#endif

Expand Down Expand Up @@ -2286,7 +2286,7 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
(if (TREE_INT_CST_LOW (@1) & 1)
{ constant_boolean_node (cmp == NE_EXPR, type); })))

/* Arguments on which one can call get_nonzero_bits to get the bits
/* Arguments on which one can call get_known_zero_bits to get the bits
possibly set. */
(match with_possible_nonzero_bits
INTEGER_CST@0)
Expand All @@ -2300,7 +2300,7 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
(bit_and:c with_possible_nonzero_bits@0 @2))

/* Same for bits that are known to be set, but we do not have
an equivalent to get_nonzero_bits yet. */
an equivalent to get_known_zero_bits yet. */
(match (with_certain_nonzero_bits2 @0)
INTEGER_CST@0)
(match (with_certain_nonzero_bits2 @0)
Expand All @@ -2310,7 +2310,7 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
(for cmp (eq ne)
(simplify
(cmp:c (with_possible_nonzero_bits2 @0) (with_certain_nonzero_bits2 @1))
(if (wi::bit_and_not (wi::to_wide (@1), get_nonzero_bits (@0)) != 0)
(if (wi::bit_and_not (wi::to_wide (@1), get_known_zero_bits (@0)) != 0)
{ constant_boolean_node (cmp == NE_EXPR, type); })))

/* ((X inner_op C0) outer_op C1)
Expand All @@ -2336,7 +2336,7 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
wide_int cst_emit;

if (TREE_CODE (@2) == SSA_NAME)
zero_mask_not = get_nonzero_bits (@2);
zero_mask_not = get_known_zero_bits (@2);
else
fail = true;

Expand Down Expand Up @@ -3562,7 +3562,7 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
int width = ceil_log2 (element_precision (TREE_TYPE (@0)));
int prec = TYPE_PRECISION (TREE_TYPE (@1));
}
(if ((get_nonzero_bits (@1) & wi::mask (width, false, prec)) == 0)
(if ((get_known_zero_bits (@1) & wi::mask (width, false, prec)) == 0)
@0)))))
#endif

Expand Down
28 changes: 14 additions & 14 deletions gcc/range-op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -804,8 +804,8 @@ operator_lt::fold_range (irange &r, tree type,
r = range_true (type);
else if (!wi::lt_p (op1.lower_bound (), op2.upper_bound (), sign))
r = range_false (type);
// Use nonzero bits to determine if < 0 is false.
else if (op2.zero_p () && !wi::neg_p (op1.get_nonzero_bits (), sign))
// Use known-zero bits to determine if < 0 is false.
else if (op2.zero_p () && !wi::neg_p (op1.get_known_zero_bits (), sign))
r = range_false (type);
else
r = range_true_and_false (type);
Expand Down Expand Up @@ -2552,16 +2552,16 @@ operator_cast::fold_range (irange &r, tree type ATTRIBUTE_UNUSED,
return true;
}

// Update the nonzero mask. Truncating casts are problematic unless
// Update the known-zero mask. Truncating casts are problematic unless
// the conversion fits in the resulting outer type.
wide_int nz = inner.get_nonzero_bits ();
wide_int nz = inner.get_known_zero_bits ();
if (truncating_cast_p (inner, outer)
&& wi::rshift (nz, wi::uhwi (TYPE_PRECISION (outer.type ()),
TYPE_PRECISION (inner.type ())),
TYPE_SIGN (inner.type ())) != 0)
return true;
nz = wide_int::from (nz, TYPE_PRECISION (type), TYPE_SIGN (inner.type ()));
r.set_nonzero_bits (nz);
r.set_known_zero_bits (nz);

return true;
}
Expand Down Expand Up @@ -2794,8 +2794,8 @@ operator_bitwise_and::fold_range (irange &r, tree type,
if (range_operator::fold_range (r, type, lh, rh))
{
if (!lh.undefined_p () && !rh.undefined_p ())
r.set_nonzero_bits (wi::bit_and (lh.get_nonzero_bits (),
rh.get_nonzero_bits ()));
r.set_known_zero_bits (wi::bit_and (lh.get_known_zero_bits (),
rh.get_known_zero_bits ()));
return true;
}
return false;
Expand All @@ -2805,7 +2805,7 @@ operator_bitwise_and::fold_range (irange &r, tree type,
// Optimize BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR of signed types
// by considering the number of leading redundant sign bit copies.
// clrsb (X op Y) = min (clrsb (X), clrsb (Y)), so for example
// [-1, 0] op [-1, 0] is [-1, 0] (where nonzero_bits doesn't help).
// [-1, 0] op [-1, 0] is [-1, 0] (where known-zero bits doesn't help).
static bool
wi_optimize_signed_bitwise_op (irange &r, tree type,
const wide_int &lh_lb, const wide_int &lh_ub,
Expand Down Expand Up @@ -3046,7 +3046,7 @@ operator_bitwise_and::wi_fold (irange &r, tree type,
}

static void
set_nonzero_range_from_mask (irange &r, tree type, const irange &lhs)
set_known_zero_range_from_mask (irange &r, tree type, const irange &lhs)
{
if (!lhs.contains_p (build_zero_cst (type)))
r = range_nonzero (type);
Expand All @@ -3064,7 +3064,7 @@ operator_bitwise_and::simple_op1_range_solver (irange &r, tree type,
{
if (!op2.singleton_p ())
{
set_nonzero_range_from_mask (r, type, lhs);
set_known_zero_range_from_mask (r, type, lhs);
return;
}
unsigned int nprec = TYPE_PRECISION (type);
Expand Down Expand Up @@ -3157,14 +3157,14 @@ operator_bitwise_and::op1_range (irange &r, tree type,
r.union_ (res);
}
if (r.undefined_p ())
set_nonzero_range_from_mask (r, type, lhs);
set_known_zero_range_from_mask (r, type, lhs);

// For 0 = op1 & MASK, op1 is ~MASK.
if (lhs.zero_p () && op2.singleton_p ())
{
wide_int nz = wi::bit_not (op2.get_nonzero_bits ());
wide_int nz = wi::bit_not (op2.get_known_zero_bits ());
int_range<2> tmp (type);
tmp.set_nonzero_bits (nz);
tmp.set_known_zero_bits (nz);
r.intersect (tmp);
}
return true;
Expand Down Expand Up @@ -4851,7 +4851,7 @@ range_op_bitwise_and_tests ()
int_range<2> mask = int_range<2> (INT (7), INT (7));
op_bitwise_and.op1_range (res, integer_type_node, zero, mask);
wide_int inv = wi::shwi (~7U, TYPE_PRECISION (integer_type_node));
ASSERT_TRUE (res.get_nonzero_bits () == inv);
ASSERT_TRUE (res.get_known_zero_bits () == inv);
}

// (NONZERO | X) is nonzero.
Expand Down
2 changes: 1 addition & 1 deletion gcc/tree-data-ref.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,7 @@ split_constant_offset (tree exp, tree *var, tree *off, value_range *exp_range,
wide_int var_min = wi::to_wide (vr.min ());
wide_int var_max = wi::to_wide (vr.max ());
value_range_kind vr_kind = vr.kind ();
wide_int var_nonzero = get_nonzero_bits (exp);
wide_int var_nonzero = get_known_zero_bits (exp);
vr_kind = intersect_range_with_nonzero_bits (vr_kind,
&var_min, &var_max,
var_nonzero,
Expand Down
8 changes: 4 additions & 4 deletions gcc/tree-ssa-ccp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ get_default_value (tree var)
val.mask = -1;
if (flag_tree_bit_ccp)
{
wide_int nonzero_bits = get_nonzero_bits (var);
wide_int nonzero_bits = get_known_zero_bits (var);
tree value;
widest_int mask;

Expand Down Expand Up @@ -1013,8 +1013,8 @@ ccp_finalize (bool nonzero_p)
wide_int nonzero_bits
= (wide_int::from (val->mask, precision, UNSIGNED)
| wi::to_wide (val->value));
nonzero_bits &= get_nonzero_bits (name);
set_nonzero_bits (name, nonzero_bits);
nonzero_bits &= get_known_zero_bits (name);
set_known_zero_bits (name, nonzero_bits);
}
}

Expand Down Expand Up @@ -2438,7 +2438,7 @@ evaluate_stmt (gimple *stmt)
&& TREE_CODE (gimple_get_lhs (stmt)) == SSA_NAME)
{
tree lhs = gimple_get_lhs (stmt);
wide_int nonzero_bits = get_nonzero_bits (lhs);
wide_int nonzero_bits = get_known_zero_bits (lhs);
if (nonzero_bits != -1)
{
if (!is_constant)
Expand Down
2 changes: 1 addition & 1 deletion gcc/tree-ssa-dom.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1380,7 +1380,7 @@ dom_opt_dom_walker::set_global_ranges_from_unreachable_edges (basic_block bb)
&& !r.undefined_p ())
{
set_range_info (name, r);
maybe_set_nonzero_bits (pred_e, name);
maybe_set_known_zero_bits (pred_e, name);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions gcc/tree-ssa-reassoc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3858,7 +3858,7 @@ optimize_range_tests_var_bound (enum tree_code opcode, int first, int length,
/* maybe_optimize_range_tests allows statements without side-effects
in the basic blocks as long as they are consumed in the same bb.
Make sure rhs2's def stmt is not among them, otherwise we can't
use safely get_nonzero_bits on it. E.g. in:
use safely get_known_zero_bits on it. E.g. in:
# RANGE [-83, 1] NONZERO 173
# k_32 = PHI <k_47(13), k_12(9)>
...
Expand Down Expand Up @@ -3925,7 +3925,7 @@ optimize_range_tests_var_bound (enum tree_code opcode, int first, int length,
if (rhs2 == NULL_TREE)
continue;

wide_int nz = get_nonzero_bits (rhs2);
wide_int nz = get_known_zero_bits (rhs2);
if (wi::neg_p (nz))
continue;

Expand Down
14 changes: 7 additions & 7 deletions gcc/tree-ssanames.cc
Original file line number Diff line number Diff line change
Expand Up @@ -456,23 +456,23 @@ set_ptr_nonnull (tree name)
pi->pt.null = 0;
}

/* Update the non-zero bits bitmask of NAME. */
/* Update the known-zero bits bitmask of NAME. */

void
set_nonzero_bits (tree name, const wide_int_ref &mask)
set_known_zero_bits (tree name, const wide_int_ref &mask)
{
gcc_assert (!POINTER_TYPE_P (TREE_TYPE (name)));

int_range<2> r (TREE_TYPE (name));
r.set_nonzero_bits (mask);
r.set_known_zero_bits (mask);
set_range_info (name, r);
}

/* Return a widest_int with potentially non-zero bits in SSA_NAME
/* Return a widest_int with potentially known-zero bits in SSA_NAME
NAME, the constant for INTEGER_CST, or -1 if unknown. */

wide_int
get_nonzero_bits (const_tree name)
get_known_zero_bits (const_tree name)
{
if (TREE_CODE (name) == INTEGER_CST)
return wi::to_wide (name);
Expand All @@ -497,7 +497,7 @@ get_nonzero_bits (const_tree name)
through vrange_storage. */
irange_storage_slot *ri
= static_cast <irange_storage_slot *> (SSA_NAME_RANGE_INFO (name));
return ri->get_nonzero_bits ();
return ri->get_known_zero_bits ();
}

/* Return TRUE is OP, an SSA_NAME has a range of values [0..1], false
Expand Down Expand Up @@ -534,7 +534,7 @@ ssa_name_has_boolean_range (tree op)
if (get_range_query (cfun)->range_of_expr (r, op) && r == onezero)
return true;

if (wi::eq_p (get_nonzero_bits (op), 1))
if (wi::eq_p (get_known_zero_bits (op), 1))
return true;
}

Expand Down
4 changes: 2 additions & 2 deletions gcc/tree-ssanames.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ struct GTY(()) ptr_info_def

/* Sets the value range to SSA. */
extern bool set_range_info (tree, const vrange &);
extern void set_nonzero_bits (tree, const wide_int_ref &);
extern wide_int get_nonzero_bits (const_tree);
extern void set_known_zero_bits (tree, const wide_int_ref &);
extern wide_int get_known_zero_bits (const_tree);
extern bool ssa_name_has_boolean_range (tree);
extern void init_ssanames (struct function *, int);
extern void fini_ssanames (struct function *);
Expand Down
2 changes: 1 addition & 1 deletion gcc/tree-vect-patterns.cc
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ vect_get_range_info (tree var, wide_int *min_value, wide_int *max_value)
*min_value = wi::to_wide (vr.min ());
*max_value = wi::to_wide (vr.max ());
value_range_kind vr_type = vr.kind ();
wide_int nonzero = get_nonzero_bits (var);
wide_int nonzero = get_known_zero_bits (var);
signop sgn = TYPE_SIGN (TREE_TYPE (var));
if (intersect_range_with_nonzero_bits (vr_type, min_value, max_value,
nonzero, sgn) == VR_RANGE)
Expand Down
6 changes: 3 additions & 3 deletions gcc/tree-vrp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2242,7 +2242,7 @@ register_edge_assert_for (tree name, edge e,
from the non-zero bitmask. */

void
maybe_set_nonzero_bits (edge e, tree var)
maybe_set_known_zero_bits (edge e, tree var)
{
basic_block cond_bb = e->src;
gimple *stmt = last_stmt (cond_bb);
Expand Down Expand Up @@ -2276,7 +2276,7 @@ maybe_set_nonzero_bits (edge e, tree var)
return;
}
cst = gimple_assign_rhs2 (stmt);
set_nonzero_bits (var, wi::bit_and_not (get_nonzero_bits (var),
set_known_zero_bits (var, wi::bit_and_not (get_known_zero_bits (var),
wi::to_wide (cst)));
}

Expand Down Expand Up @@ -3754,7 +3754,7 @@ vrp_asserts::remove_range_assertions ()
SSA_NAME_RANGE_INFO (var) = NULL;
}
duplicate_ssa_name_range_info (var, lhs);
maybe_set_nonzero_bits (single_pred_edge (bb), var);
maybe_set_known_zero_bits (single_pred_edge (bb), var);
}
}

Expand Down
2 changes: 1 addition & 1 deletion gcc/tree-vrp.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ extern tree find_case_label_range (gswitch *, const irange *vr);
extern bool find_case_label_index (gswitch *, size_t, tree, size_t *);
extern bool overflow_comparison_p (tree_code, tree, tree, bool, tree *);
extern tree get_single_symbol (tree, bool *, tree *);
extern void maybe_set_nonzero_bits (edge, tree);
extern void maybe_set_known_zero_bits (edge, tree);
extern wide_int masked_increment (const wide_int &val_in, const wide_int &mask,
const wide_int &sgnbit, unsigned int prec);

Expand Down
2 changes: 1 addition & 1 deletion gcc/tree.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3025,7 +3025,7 @@ tree_ctz (const_tree expr)
ret1 = wi::ctz (wi::to_wide (expr));
return MIN (ret1, prec);
case SSA_NAME:
ret1 = wi::ctz (get_nonzero_bits (expr));
ret1 = wi::ctz (get_known_zero_bits (expr));
return MIN (ret1, prec);
case PLUS_EXPR:
case MINUS_EXPR:
Expand Down
Loading

0 comments on commit 6e6f30a

Please sign in to comment.