(fold): Don't do anything with evaluated SAVE_EXPR.
authorRichard Kenner <kenner@gcc.gnu.org>
Thu, 6 Jun 1996 22:21:16 +0000 (18:21 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Thu, 6 Jun 1996 22:21:16 +0000 (18:21 -0400)
From-SVN: r12185

gcc/fold-const.c

index 82e51c0ee7644b38748b5d48aa5747b85d0dbeca..b5a3d397222585ab771ac4ee1eb72909b190427b 100644 (file)
@@ -3100,8 +3100,9 @@ fold (expr)
 
   int wins = 1;
 
-  /* Don't try to process an RTL_EXPR since its operands aren't trees.  */
-  if (code == RTL_EXPR)
+  /* Don't try to process an RTL_EXPR since its operands aren't trees. 
+     Likewise for a SAVE_EXPR that's already been evaluated.  */
+  if (code == RTL_EXPR || (code == SAVE_EXPR && SAVE_EXPR_RTL (t)) != 0)
     return t;
 
   /* Return right away if already constant.  */