From d964285ca2090dbdc538fcf16f0a42da36f89d0f Mon Sep 17 00:00:00 2001 From: Charles Hannum Date: Wed, 8 Jul 1992 23:16:28 +0000 Subject: [PATCH] *** empty log message *** From-SVN: r1533 --- gcc/expr.c | 7 ++----- gcc/tree.c | 22 ++++++++-------------- gcc/varasm.c | 4 ++-- 3 files changed, 12 insertions(+), 21 deletions(-) diff --git a/gcc/expr.c b/gcc/expr.c index 7f480f3d0d3..4c4aff832fc 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -6546,11 +6546,8 @@ do_store_flag (exp, target, mode, only_cheap) if (operand_mode == BLKmode) return 0; - while (TREE_CODE (arg0) == NON_LVALUE_EXPR) - arg0 = TREE_OPERAND (arg0, 0); - - while (TREE_CODE (arg1) == NON_LVALUE_EXPR) - arg1 = TREE_OPERAND (arg1, 0); + STRIP_NOPS (arg0); + STRIP_NOPS (arg1); /* Get the rtx comparison code to use. We know that EXP is a comparison operation of some type. Some comparisons against 1 and -1 can be diff --git a/gcc/tree.c b/gcc/tree.c index bbdffebcc1d..c90bd4e6c3e 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -1217,8 +1217,7 @@ int integer_zerop (expr) tree expr; { - while (TREE_CODE (expr) == NON_LVALUE_EXPR) - expr = TREE_OPERAND (expr, 0); + STRIP_NOPS (expr); return (TREE_CODE (expr) == INTEGER_CST && TREE_INT_CST_LOW (expr) == 0 @@ -1231,8 +1230,7 @@ int integer_onep (expr) tree expr; { - while (TREE_CODE (expr) == NON_LVALUE_EXPR) - expr = TREE_OPERAND (expr, 0); + STRIP_NOPS (expr); return (TREE_CODE (expr) == INTEGER_CST && TREE_INT_CST_LOW (expr) == 1 @@ -1249,8 +1247,7 @@ integer_all_onesp (expr) register int prec; register int uns; - while (TREE_CODE (expr) == NON_LVALUE_EXPR) - expr = TREE_OPERAND (expr, 0); + STRIP_NOPS (expr); if (TREE_CODE (expr) != INTEGER_CST) return 0; @@ -1292,8 +1289,7 @@ integer_pow2p (expr) { HOST_WIDE_INT high, low; - while (TREE_CODE (expr) == NON_LVALUE_EXPR) - expr = TREE_OPERAND (expr, 0); + STRIP_NOPS (expr); if (TREE_CODE (expr) != INTEGER_CST) return 0; @@ -1314,8 +1310,7 @@ int real_zerop (expr) tree expr; { - while (TREE_CODE (expr) == NON_LVALUE_EXPR) - expr = TREE_OPERAND (expr, 0); + STRIP_NOPS (expr); return (TREE_CODE (expr) == REAL_CST && REAL_VALUES_EQUAL (TREE_REAL_CST (expr), dconst0)); @@ -1327,8 +1322,7 @@ int real_onep (expr) tree expr; { - while (TREE_CODE (expr) == NON_LVALUE_EXPR) - expr = TREE_OPERAND (expr, 0); + STRIP_NOPS (expr); return (TREE_CODE (expr) == REAL_CST && REAL_VALUES_EQUAL (TREE_REAL_CST (expr), dconst1)); @@ -1340,8 +1334,7 @@ int real_twop (expr) tree expr; { - while (TREE_CODE (expr) == NON_LVALUE_EXPR) - expr = TREE_OPERAND (expr, 0); + STRIP_NOPS (expr); return (TREE_CODE (expr) == REAL_CST && REAL_VALUES_EQUAL (TREE_REAL_CST (expr), dconst2)); @@ -1353,6 +1346,7 @@ int really_constant_p (exp) tree exp; { + /* This is not quite the same as STRIP_NOPS. It does more. */ while (TREE_CODE (exp) == NOP_EXPR || TREE_CODE (exp) == CONVERT_EXPR || TREE_CODE (exp) == NON_LVALUE_EXPR) diff --git a/gcc/varasm.c b/gcc/varasm.c index 38ce48fa28a..69afc66baac 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -2678,8 +2678,8 @@ output_constructor (exp, size) field = TREE_PURPOSE (link); /* Eliminate the marker that makes a cast not be an lvalue. */ - if (val != 0 && TREE_CODE (val) == NON_LVALUE_EXPR) - val = TREE_OPERAND (val, 0); + if (val != 0) + STRIP_NOPS (val); if (field == 0 || !DECL_BIT_FIELD (field)) { -- 2.30.2