*** empty log message ***
authormycroft <mycroft@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 8 Jul 1992 23:16:28 +0000 (23:16 +0000)
committermycroft <mycroft@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 8 Jul 1992 23:16:28 +0000 (23:16 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@1533 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/expr.c
gcc/tree.c
gcc/varasm.c

index 7f480f3..4c4aff8 100644 (file)
@@ -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
index bbdffeb..c90bd4e 100644 (file)
@@ -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)
index 38ce48f..69afc66 100644 (file)
@@ -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))
        {