===================================================================
@@ -6873,7 +6873,7 @@ fold_builtin_expect (location_t loc, tre
/* Distribute the expected value over short-circuiting operators.
See through the cast from truthvalue_type_node to long. */
inner = arg0;
- while (TREE_CODE (inner) == NOP_EXPR
+ while (CONVERT_EXPR_P (inner)
&& INTEGRAL_TYPE_P (TREE_TYPE (inner))
&& INTEGRAL_TYPE_P (TREE_TYPE (TREE_OPERAND (inner, 0))))
inner = TREE_OPERAND (inner, 0);
@@ -7028,7 +7028,7 @@ integer_valued_real_p (tree t)
case REAL_CST:
return real_isinteger (TREE_REAL_CST_PTR (t), TYPE_MODE (TREE_TYPE (t)));
- case NOP_EXPR:
+ CASE_CONVERT:
{
tree type = TREE_TYPE (TREE_OPERAND (t, 0));
if (TREE_CODE (type) == INTEGER_TYPE)
@@ -13843,7 +13843,7 @@ fold_call_stmt (gimple stmt, bool ignore
if (gimple_has_location (stmt))
{
tree realret = ret;
- if (TREE_CODE (ret) == NOP_EXPR)
+ if (CONVERT_EXPR_P (ret))
realret = TREE_OPERAND (ret, 0);
if (CAN_HAVE_LOCATION_P (realret)
&& !EXPR_HAS_LOCATION (realret))
===================================================================
@@ -8348,7 +8348,7 @@ fold_offsetof_1 (tree expr, tree stop_re
gcc_assert (integer_zerop (expr));
return size_zero_node;
- case NOP_EXPR:
+ CASE_CONVERT:
case INDIRECT_REF:
base = fold_offsetof_1 (TREE_OPERAND (expr, 0), stop_ref);
gcc_assert (base == error_mark_node || base == size_zero_node);
===================================================================
@@ -318,7 +318,7 @@ c_finish_omp_for (location_t locus, tree
We want to force:
i < (int)n; */
- if (TREE_CODE (op0) == NOP_EXPR
+ if (CONVERT_EXPR_P (op0)
&& decl == TREE_OPERAND (op0, 0))
{
TREE_OPERAND (cond, 0) = TREE_OPERAND (op0, 0);
@@ -326,7 +326,7 @@ c_finish_omp_for (location_t locus, tree
= fold_build1_loc (elocus, NOP_EXPR, TREE_TYPE (decl),
TREE_OPERAND (cond, 1));
}
- else if (TREE_CODE (op1) == NOP_EXPR
+ else if (CONVERT_EXPR_P (op1)
&& decl == TREE_OPERAND (op1, 0))
{
TREE_OPERAND (cond, 1) = TREE_OPERAND (op1, 0);
===================================================================
@@ -992,8 +992,8 @@ pp_c_complex_expr (c_pretty_printer *pp,
tree imagexpr = TREE_OPERAND (e, 1);
/* Cast of an COMPLEX_TYPE expression to a different COMPLEX_TYPE. */
- if (TREE_CODE (realexpr) == NOP_EXPR
- && TREE_CODE (imagexpr) == NOP_EXPR
+ if (CONVERT_EXPR_P (realexpr)
+ && CONVERT_EXPR_P (imagexpr)
&& TREE_TYPE (realexpr) == TREE_TYPE (type)
&& TREE_TYPE (imagexpr) == TREE_TYPE (type)
&& TREE_CODE (TREE_OPERAND (realexpr, 0)) == REALPART_EXPR
@@ -1011,7 +1011,7 @@ pp_c_complex_expr (c_pretty_printer *pp,
&& TREE_TYPE (realexpr) == TREE_TYPE (type))
{
pp_c_type_cast (pp, type);
- if (TREE_CODE (realexpr) == NOP_EXPR)
+ if (CONVERT_EXPR_P (realexpr))
realexpr = TREE_OPERAND (realexpr, 0);
pp_expression (pp, realexpr);
return;
===================================================================
@@ -2630,7 +2630,7 @@ build_function_call_vec (location_t loc,
else
result = fold_build_call_array_loc (loc, TREE_TYPE (fntype),
function, nargs, argarray);
- if (TREE_CODE (result) == NOP_EXPR
+ if (CONVERT_EXPR_P (result)
&& TREE_CODE (TREE_OPERAND (result, 0)) == INTEGER_CST)
STRIP_TYPE_NOPS (result);
}
@@ -3193,7 +3193,7 @@ build_unary_op (location_t location,
switch (code)
{
- case CONVERT_EXPR:
+ CASE_CONVERT:
/* This is used for unary plus, because a CONVERT_EXPR
is enough to prevent anybody from looking inside for
associativity, but won't generate any code. */
@@ -4537,6 +4537,7 @@ build_modify_expr (location_t location,
/* If a binary op has been requested, combine the old LHS value with the RHS
producing the value we should actually store into the LHS. */
+ gcc_assert (modifycode != CONVERT_EXPR);
if (modifycode != NOP_EXPR)
{
lhs = c_fully_fold (lhs, false, NULL);
@@ -8693,7 +8694,7 @@ c_finish_stmt_expr (location_t loc, tree
/* Unwrap a no-op NOP_EXPR as added by c_finish_expr_stmt. This avoids
tree_expr_nonnegative_p giving up immediately. */
val = last;
- if (TREE_CODE (val) == NOP_EXPR
+ if (CONVERT_EXPR_P (val)
&& TREE_TYPE (val) == TREE_TYPE (TREE_OPERAND (val, 0)))
val = TREE_OPERAND (val, 0);
===================================================================
@@ -2383,8 +2383,7 @@ expand_debug_expr (tree exp)
adjust_mode:
case PAREN_EXPR:
- case NOP_EXPR:
- case CONVERT_EXPR:
+ CASE_CONVERT:
{
enum machine_mode inner_mode = GET_MODE (op0);
===================================================================
@@ -772,7 +772,7 @@ convert_to_integer (tree type, tree expr
TREE_OPERAND (expr, 0))));
}
- case NOP_EXPR:
+ CASE_CONVERT:
/* Don't introduce a
"can't convert between vector values of different size" error. */
if (TREE_CODE (TREE_TYPE (TREE_OPERAND (expr, 0))) == VECTOR_TYPE
===================================================================
@@ -363,13 +363,12 @@ do_jump (tree exp, rtx if_false_label, r
break;
#endif
- case NOP_EXPR:
+ CASE_CONVERT:
if (TREE_CODE (TREE_OPERAND (exp, 0)) == COMPONENT_REF
|| TREE_CODE (TREE_OPERAND (exp, 0)) == BIT_FIELD_REF
|| TREE_CODE (TREE_OPERAND (exp, 0)) == ARRAY_REF
|| TREE_CODE (TREE_OPERAND (exp, 0)) == ARRAY_RANGE_REF)
goto normal;
- case CONVERT_EXPR:
/* If we are narrowing the operand, we have to do the compare in the
narrower mode. */
if ((TYPE_PRECISION (TREE_TYPE (exp))
===================================================================
@@ -674,6 +674,7 @@ add_type_for_runtime (tree type)
tree *slot;
/* If TYPE is NOP_EXPR, it means that it already is a runtime type. */
+ gcc_assert (TREE_CODE (type) != CONVERT_EXPR);
if (TREE_CODE (type) == NOP_EXPR)
return;
@@ -692,6 +693,7 @@ lookup_type_for_runtime (tree type)
tree *slot;
/* If TYPE is NOP_EXPR, it means that it already is a runtime type. */
+ gcc_assert (TREE_CODE (type) != CONVERT_EXPR);
if (TREE_CODE (type) == NOP_EXPR)
return type;
===================================================================
@@ -1197,7 +1197,7 @@ negate_expr_p (tree t)
return negate_expr_p (TREE_OPERAND (t, 1))
|| negate_expr_p (TREE_OPERAND (t, 0));
- case NOP_EXPR:
+ CASE_CONVERT:
/* Negate -((double)float) as (double)(-float). */
if (TREE_CODE (type) == REAL_TYPE)
{
@@ -1388,7 +1388,7 @@ fold_negate_expr (location_t loc, tree t
}
break;
- case NOP_EXPR:
+ CASE_CONVERT:
/* Convert -((double)float) into (double)(-float). */
if (TREE_CODE (type) == REAL_TYPE)
{
@@ -4471,7 +4471,7 @@ sign_bit_p (tree exp, const_tree val)
return exp;
/* Handle extension from a narrower type. */
- if (TREE_CODE (exp) == NOP_EXPR
+ if (CONVERT_EXPR_P (exp)
&& TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (exp, 0))) < width)
return sign_bit_p (TREE_OPERAND (exp, 0), val);
@@ -8626,8 +8626,8 @@ fold_unary_loc (location_t loc, enum tre
if (POINTER_TYPE_P (type)
&& TREE_CODE (arg0) == POINTER_PLUS_EXPR
&& (TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST
- || TREE_CODE (TREE_OPERAND (arg0, 0)) == NOP_EXPR
- || TREE_CODE (TREE_OPERAND (arg0, 1)) == NOP_EXPR))
+ || CONVERT_EXPR_P (TREE_OPERAND (arg0, 0))
+ || CONVERT_EXPR_P (TREE_OPERAND (arg0, 1))))
{
tree arg00 = TREE_OPERAND (arg0, 0);
tree arg01 = TREE_OPERAND (arg0, 1);
@@ -8727,7 +8727,7 @@ fold_unary_loc (location_t loc, enum tre
else if (TREE_CODE (arg0) == NEGATE_EXPR)
return fold_build1_loc (loc, ABS_EXPR, type, TREE_OPERAND (arg0, 0));
/* Convert fabs((double)float) into (double)fabsf(float). */
- else if (TREE_CODE (arg0) == NOP_EXPR
+ else if (CONVERT_EXPR_P (arg0)
&& TREE_CODE (type) == REAL_TYPE)
{
tree targ0 = strip_float_extensions (arg0);
@@ -11649,7 +11649,7 @@ fold_binary_loc (location_t loc,
if (t1 != NULL_TREE)
return t1;
/* Simplify ((int)c & 0377) into (int)c, if c is unsigned char. */
- if (TREE_CODE (arg1) == INTEGER_CST && TREE_CODE (arg0) == NOP_EXPR
+ if (TREE_CODE (arg1) == INTEGER_CST && CONVERT_EXPR_P (arg0)
&& TYPE_UNSIGNED (TREE_TYPE (TREE_OPERAND (arg0, 0))))
{
unsigned int prec
@@ -11725,7 +11725,7 @@ fold_binary_loc (location_t loc,
tree arg00 = TREE_OPERAND (arg0, 0);
/* See if more bits can be proven as zero because of
zero extension. */
- if (TREE_CODE (arg00) == NOP_EXPR
+ if (CONVERT_EXPR_P (arg00)
&& TYPE_UNSIGNED (TREE_TYPE (TREE_OPERAND (arg00, 0))))
{
tree inner_type = TREE_TYPE (TREE_OPERAND (arg00, 0));
@@ -14771,7 +14771,7 @@ multiple_of_p (tree type, const_tree top
}
return 0;
- case NOP_EXPR:
+ CASE_CONVERT:
/* Can't handle conversions from non-integral or wider integral type. */
if ((TREE_CODE (TREE_TYPE (TREE_OPERAND (top, 0))) != INTEGER_TYPE)
|| (TYPE_PRECISION (type)
@@ -14843,7 +14843,7 @@ tree_unary_nonnegative_warnv_p (enum tre
return tree_expr_nonnegative_warnv_p (op0,
strict_overflow_p);
- case NOP_EXPR:
+ CASE_CONVERT:
{
tree inner_type = TREE_TYPE (op0);
tree outer_type = type;
@@ -14906,8 +14906,8 @@ tree_binary_nonnegative_warnv_p (enum tr
/* zero_extend(x) + zero_extend(y) is non-negative if x and y are
both unsigned and at least 2 bits shorter than the result. */
if (TREE_CODE (type) == INTEGER_TYPE
- && TREE_CODE (op0) == NOP_EXPR
- && TREE_CODE (op1) == NOP_EXPR)
+ && CONVERT_EXPR_P (op0)
+ && CONVERT_EXPR_P (op1))
{
tree inner1 = TREE_TYPE (TREE_OPERAND (op0, 0));
tree inner2 = TREE_TYPE (TREE_OPERAND (op1, 0));
@@ -14936,13 +14936,13 @@ tree_binary_nonnegative_warnv_p (enum tr
/* zero_extend(x) * zero_extend(y) is non-negative if x and y are
both unsigned and their total bits is shorter than the result. */
if (TREE_CODE (type) == INTEGER_TYPE
- && (TREE_CODE (op0) == NOP_EXPR || TREE_CODE (op0) == INTEGER_CST)
- && (TREE_CODE (op1) == NOP_EXPR || TREE_CODE (op1) == INTEGER_CST))
+ && (CONVERT_EXPR_P (op0) || TREE_CODE (op0) == INTEGER_CST)
+ && (CONVERT_EXPR_P (op1) || TREE_CODE (op1) == INTEGER_CST))
{
- tree inner0 = (TREE_CODE (op0) == NOP_EXPR)
+ tree inner0 = CONVERT_EXPR_P (op0)
? TREE_TYPE (TREE_OPERAND (op0, 0))
: TREE_TYPE (op0);
- tree inner1 = (TREE_CODE (op1) == NOP_EXPR)
+ tree inner1 = CONVERT_EXPR_P (op1)
? TREE_TYPE (TREE_OPERAND (op1, 0))
: TREE_TYPE (op1);
@@ -15353,7 +15353,7 @@ tree_unary_nonzero_warnv_p (enum tree_co
return tree_expr_nonzero_warnv_p (op0,
strict_overflow_p);
- case NOP_EXPR:
+ CASE_CONVERT:
{
tree inner_type = TREE_TYPE (op0);
tree outer_type = type;
===================================================================
@@ -2927,7 +2927,7 @@ tree
canonicalize_cond_expr_cond (tree t)
{
/* For (bool)x use x != 0. */
- if (TREE_CODE (t) == NOP_EXPR
+ if (CONVERT_EXPR_P (t)
&& TREE_TYPE (t) == boolean_type_node)
{
tree top0 = TREE_OPERAND (t, 0);
===================================================================
@@ -6966,7 +6966,7 @@ gimplify_expr (tree *expr_p, gimple_seq
break;
}
/* Convert (void *)&a + 4 into (void *)&a[1]. */
- if (TREE_CODE (TREE_OPERAND (*expr_p, 0)) == NOP_EXPR
+ if (CONVERT_EXPR_P (TREE_OPERAND (*expr_p, 0))
&& TREE_CODE (TREE_OPERAND (*expr_p, 1)) == INTEGER_CST
&& POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (TREE_OPERAND (*expr_p,
0),0)))
===================================================================
@@ -298,7 +298,7 @@ ipcp_lattice_from_jfunc (struct ipa_node
return;
cst = caller_lat->constant;
- if (jfunc->value.pass_through.operation != NOP_EXPR)
+ if (! CONVERT_EXPR_CODE_P (jfunc->value.pass_through.operation))
cst = fold_binary (jfunc->value.pass_through.operation,
TREE_TYPE (cst), cst,
jfunc->value.pass_through.operand);
===================================================================
@@ -1674,8 +1674,7 @@ likely_eliminated_by_inlining_p (gimple
/* Casts of parameters, loads from parameters passed by reference
and stores to return value or parameters are probably free after
inlining. */
- if (gimple_assign_rhs_code (stmt) == CONVERT_EXPR
- || gimple_assign_rhs_code (stmt) == NOP_EXPR
+ if (CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (stmt))
|| gimple_assign_rhs_code (stmt) == VIEW_CONVERT_EXPR
|| gimple_assign_rhs_class (stmt) == GIMPLE_SINGLE_RHS)
{
===================================================================
@@ -304,7 +304,7 @@ ipa_print_node_jump_functions (FILE *f,
jump_func->value.pass_through.formal_id,
tree_code_name[(int)
jump_func->value.pass_through.operation]);
- if (jump_func->value.pass_through.operation != NOP_EXPR)
+ if (! CONVERT_EXPR_CODE_P (jump_func->value.pass_through.operation))
print_generic_expr (dump_file,
jump_func->value.pass_through.operand, 0);
fprintf (dump_file, "\n");
@@ -997,7 +997,7 @@ update_jump_functions_after_inlining (st
/* We must check range due to calls with variable number of arguments and
we cannot combine jump functions with operations. */
- if (dst->value.pass_through.operation != NOP_EXPR
+ if (! CONVERT_EXPR_CODE_P (dst->value.pass_through.operation)
|| (dst->value.pass_through.formal_id
>= ipa_get_cs_argument_count (top)))
{
@@ -1064,7 +1064,7 @@ update_call_notes_after_inlining (struct
jfunc = ipa_get_ith_jump_func (top, nt->formal_id);
if (jfunc->type == IPA_JF_PASS_THROUGH
- && jfunc->value.pass_through.operation == NOP_EXPR)
+ && CONVERT_EXPR_CODE_P (jfunc->value.pass_through.operation))
nt->formal_id = jfunc->value.pass_through.formal_id;
else if (jfunc->type == IPA_JF_CONST
|| jfunc->type == IPA_JF_CONST_MEMBER_PTR)
===================================================================
@@ -588,7 +588,7 @@ aff_combination_expand (aff_tree *comb A
type = TREE_TYPE (e);
name = e;
/* Look through some conversions. */
- if (TREE_CODE (e) == NOP_EXPR
+ if (CONVERT_EXPR_P (e)
&& (TYPE_PRECISION (type)
>= TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (e, 0)))))
name = TREE_OPERAND (e, 0);
===================================================================
@@ -1924,7 +1924,7 @@ initialize_matrix_A (lambda_matrix A, tr
return chrec_fold_op (TREE_CODE (chrec), chrec_type (chrec), op0, op1);
}
- case NOP_EXPR:
+ CASE_CONVERT:
{
tree op = initialize_matrix_A (A, TREE_OPERAND (chrec, 0), index, mult);
return chrec_convert (chrec_type (chrec), op, NULL);
===================================================================
@@ -1505,7 +1505,7 @@ copy_bb (copy_body_data *id, basic_block
/* With return slot optimization we can end up with
non-gimple (foo *)&this->m, fix that here. */
if (is_gimple_assign (stmt)
- && gimple_assign_rhs_code (stmt) == NOP_EXPR
+ && CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (stmt))
&& !is_gimple_val (gimple_assign_rhs1 (stmt)))
{
tree new_rhs;
===================================================================
@@ -196,7 +196,7 @@ dump_decl_name (pretty_printer *buffer,
static void
dump_function_name (pretty_printer *buffer, tree node, int flags)
{
- if (TREE_CODE (node) == NOP_EXPR)
+ if (CONVERT_EXPR_P (node))
node = TREE_OPERAND (node, 0);
if (DECL_NAME (node) && (flags & TDF_ASMNAME) == 0)
pp_string (buffer, lang_hooks.decl_printable_name (node, 1));
@@ -2679,7 +2679,7 @@ print_call_name (pretty_printer *buffer,
case ADDR_EXPR:
case INDIRECT_REF:
- case NOP_EXPR:
+ CASE_CONVERT:
op0 = TREE_OPERAND (op0, 0);
goto again;
===================================================================
@@ -3517,7 +3517,7 @@ sra_ipa_modify_expr (tree *expr, gimple_
|| TREE_CODE (*expr) == IMAGPART_EXPR
|| TREE_CODE (*expr) == REALPART_EXPR)
expr = &TREE_OPERAND (*expr, 0);
- while (TREE_CODE (*expr) == NOP_EXPR
+ while (CONVERT_EXPR_P (*expr)
|| TREE_CODE (*expr) == VIEW_CONVERT_EXPR)
expr = &TREE_OPERAND (*expr, 0);
===================================================================
@@ -1167,7 +1167,7 @@ simplify_gimple_switch (gimple stmt)
def_stmt = SSA_NAME_DEF_STMT (cond);
if (is_gimple_assign (def_stmt))
{
- if (gimple_assign_rhs_code (def_stmt) == NOP_EXPR)
+ if (CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (def_stmt)))
{
int need_precision;
bool fail;
===================================================================
@@ -993,8 +993,7 @@ find_bswap_1 (gimple stmt, struct symbol
&& code != RSHIFT_EXPR
&& code != LROTATE_EXPR
&& code != RROTATE_EXPR
- && code != NOP_EXPR
- && code != CONVERT_EXPR)
+ && !CONVERT_EXPR_CODE_P (code))
return NULL_TREE;
source_expr1 = find_bswap_1 (rhs1_stmt, n, limit - 1);
===================================================================
@@ -1227,7 +1227,7 @@ do_unary:
arg0->op0,
arg1 ? arg1->op0 : NULL);
if (folded
- && TREE_CODE (folded) == NOP_EXPR)
+ && CONVERT_EXPR_P (folded))
folded = TREE_OPERAND (folded, 0);
if (folded
&& is_gimple_min_invariant (folded))
===================================================================
@@ -417,14 +417,12 @@ expand_vector_operations_1 (gimple_stmt_
if (TREE_CODE (type) != VECTOR_TYPE)
return;
- if (code == NOP_EXPR
+ if (CONVERT_EXPR_CODE_P (code)
|| code == FLOAT_EXPR
|| code == FIX_TRUNC_EXPR
|| code == VIEW_CONVERT_EXPR)
return;
- gcc_assert (code != CONVERT_EXPR);
-
/* The signedness is determined from input argument. */
if (code == VEC_UNPACK_FLOAT_HI_EXPR
|| code == VEC_UNPACK_FLOAT_LO_EXPR)
===================================================================
@@ -91,7 +91,7 @@ widened_name_p (tree name, gimple use_st
if (!is_gimple_assign (*def_stmt))
return false;
- if (gimple_assign_rhs_code (*def_stmt) != NOP_EXPR)
+ if (! CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (*def_stmt)))
return false;
oprnd0 = gimple_assign_rhs1 (*def_stmt);
===================================================================
@@ -1399,7 +1399,7 @@ extract_range_from_assert (value_range_t
/* Find VAR in the ASSERT_EXPR conditional. */
if (var == TREE_OPERAND (cond, 0)
|| TREE_CODE (TREE_OPERAND (cond, 0)) == PLUS_EXPR
- || TREE_CODE (TREE_OPERAND (cond, 0)) == NOP_EXPR)
+ || CONVERT_EXPR_P (TREE_OPERAND (cond, 0)))
{
/* If the predicate is of the form VAR COMP LIMIT, then we just
take LIMIT from the RHS and use the same comparison code. */
@@ -1461,7 +1461,7 @@ extract_range_from_assert (value_range_t
as well build the range [b_4, +INF] for it.
One special case we handle is extracting a range from a
range test encoded as (unsigned)var + CST <= limit. */
- if (TREE_CODE (cond) == NOP_EXPR
+ if (CONVERT_EXPR_P (cond)
|| TREE_CODE (cond) == PLUS_EXPR)
{
if (TREE_CODE (cond) == PLUS_EXPR)
@@ -4680,7 +4680,8 @@ find_assert_locations_1 (basic_block bb,
gimple def_stmt = SSA_NAME_DEF_STMT (t);
while (is_gimple_assign (def_stmt)
- && gimple_assign_rhs_code (def_stmt) == NOP_EXPR
+ && CONVERT_EXPR_CODE_P
+ (gimple_assign_rhs_code (def_stmt))
&& TREE_CODE
(gimple_assign_rhs1 (def_stmt)) == SSA_NAME
&& POINTER_TYPE_P
===================================================================
@@ -3547,7 +3547,7 @@ build1_stat (enum tree_code code, tree t
#endif
tree t;
- if (code == CONVERT_EXPR)
+ if (0 && code == CONVERT_EXPR)
code = NOP_EXPR;
#ifdef GATHER_STATISTICS
@@ -7593,7 +7593,7 @@ get_narrower (tree op, int *unsignedp_pt
tree win = op;
int typekind = kind_of_type (TREE_TYPE (op));
- while (TREE_CODE (op) == NOP_EXPR)
+ while (CONVERT_EXPR_P (op))
{
int bitschange
= (TYPE_PRECISION (TREE_TYPE (op))
===================================================================
@@ -4449,7 +4449,7 @@ output_constant (tree exp, unsigned HOST
to the address of some declaration somewhere. If the target says
the mode is valid for pointers, assume the target has a way of
resolving it. */
- if (TREE_CODE (exp) == NOP_EXPR
+ if (CONVERT_EXPR_P (exp)
&& POINTER_TYPE_P (TREE_TYPE (exp))
&& targetm.valid_pointer_mode (TYPE_MODE (TREE_TYPE (exp))))
{
@@ -4457,7 +4457,7 @@ output_constant (tree exp, unsigned HOST
/* Peel off any intermediate conversions-to-pointer for valid
pointer modes. */
- while (TREE_CODE (exp) == NOP_EXPR
+ while (CONVERT_EXPR_P (exp)
&& POINTER_TYPE_P (TREE_TYPE (exp))
&& targetm.valid_pointer_mode (TYPE_MODE (TREE_TYPE (exp))))
exp = TREE_OPERAND (exp, 0);