/* Recognize and save a masking operation. Combine it with an
incoming mask. */
if (pand_mask && gimple_binop_def_p (BIT_AND_EXPR, exp, res_ops)
- && uniform_integer_cst_p (res_ops[1]))
+ && TREE_CODE (res_ops[1]) == INTEGER_CST)
{
loc[1] = gimple_location (SSA_NAME_DEF_STMT (exp));
exp = res_ops[0];
/* Take note of shifts. */
if (gimple_binop_def_p (RSHIFT_EXPR, exp, res_ops)
- && uniform_integer_cst_p (res_ops[1]))
+ && TREE_CODE (res_ops[1]) == INTEGER_CST)
{
loc[2] = gimple_location (SSA_NAME_DEF_STMT (exp));
exp = res_ops[0];
else if ((lcode == LT_EXPR || lcode == GE_EXPR)
&& INTEGRAL_TYPE_P (TREE_TYPE (ll_arg))
&& TYPE_UNSIGNED (TREE_TYPE (ll_arg))
- && uniform_integer_cst_p (lr_arg)
+ && TREE_CODE (lr_arg) == INTEGER_CST
&& wi::popcount (wi::to_wide (lr_arg)) == 1)
{
ll_and_mask = ~(wi::to_wide (lr_arg) - 1);
else if ((lcode == LE_EXPR || lcode == GT_EXPR)
&& INTEGRAL_TYPE_P (TREE_TYPE (ll_arg))
&& TYPE_UNSIGNED (TREE_TYPE (ll_arg))
- && uniform_integer_cst_p (lr_arg)
+ && TREE_CODE (lr_arg) == INTEGER_CST
&& wi::popcount (wi::to_wide (lr_arg) + 1) == 1)
{
ll_and_mask = ~wi::to_wide (lr_arg);
else if ((rcode == LT_EXPR || rcode == GE_EXPR)
&& INTEGRAL_TYPE_P (TREE_TYPE (rl_arg))
&& TYPE_UNSIGNED (TREE_TYPE (rl_arg))
- && uniform_integer_cst_p (rr_arg)
+ && TREE_CODE (rr_arg) == INTEGER_CST
&& wi::popcount (wi::to_wide (rr_arg)) == 1)
{
rl_and_mask = ~(wi::to_wide (rr_arg) - 1);
else if ((rcode == LE_EXPR || rcode == GT_EXPR)
&& INTEGRAL_TYPE_P (TREE_TYPE (rl_arg))
&& TYPE_UNSIGNED (TREE_TYPE (rl_arg))
- && uniform_integer_cst_p (rr_arg)
+ && TREE_CODE (rr_arg) == INTEGER_CST
&& wi::popcount (wi::to_wide (rr_arg) + 1) == 1)
{
rl_and_mask = ~wi::to_wide (rr_arg);
HOST_WIDE_INT ll_align = TYPE_ALIGN (TREE_TYPE (ll_inner));
poly_uint64 ll_end_region = 0;
if (TYPE_SIZE (TREE_TYPE (ll_inner))
- && uniform_integer_cst_p (TYPE_SIZE (TREE_TYPE (ll_inner))))
+ && tree_fits_poly_uint64_p (TYPE_SIZE (TREE_TYPE (ll_inner))))
ll_end_region = tree_to_poly_uint64 (TYPE_SIZE (TREE_TYPE (ll_inner)));
if (get_best_mode (end_bit - first_bit, first_bit, 0, ll_end_region,
ll_align, BITS_PER_WORD, volatilep, &lnmode))
HOST_WIDE_INT lr_align = TYPE_ALIGN (TREE_TYPE (lr_inner));
poly_uint64 lr_end_region = 0;
if (TYPE_SIZE (TREE_TYPE (lr_inner))
- && uniform_integer_cst_p (TYPE_SIZE (TREE_TYPE (lr_inner))))
+ && tree_fits_poly_uint64_p (TYPE_SIZE (TREE_TYPE (lr_inner))))
lr_end_region = tree_to_poly_uint64 (TYPE_SIZE (TREE_TYPE (lr_inner)));
if (!get_best_mode (end_bit - first_bit, first_bit, 0, lr_end_region,
lr_align, BITS_PER_WORD, volatilep, &rnmode))