(preserve_rtl_expr_result): find_temp_slot_from_address now used.
authorRichard Kenner <kenner@gcc.gnu.org>
Fri, 11 Nov 1994 22:37:45 +0000 (17:37 -0500)
committerRichard Kenner <kenner@gcc.gnu.org>
Fri, 11 Nov 1994 22:37:45 +0000 (17:37 -0500)
Don't bring the temp slot to an inner level than it was.

From-SVN: r8427

gcc/function.c

index 821d61ac7101f77ad49448a1a30b7104e06d97b6..688fd3a3104c2030b5997a8e57f1d11ff7e6fce6 100644 (file)
@@ -1098,14 +1098,14 @@ preserve_rtl_expr_result (x)
   if (x == 0 || GET_CODE (x) != MEM || CONSTANT_P (XEXP (x, 0)))
     return;
 
-  /* If we can find a match, move it to our level.  */
-  for (p = temp_slots; p; p = p->next)
-    if (p->in_use && rtx_equal_p (x, p->slot))
-      {
-       p->level = temp_slot_level;
-       p->rtl_expr = 0;
-       return;
-      }
+  /* If we can find a match, move it to our level unless it is already at
+     an upper level.  */
+  p = find_temp_slot_from_address (XEXP (x, 0));
+  if (p != 0)
+    {
+      p->level = MIN (p->level, temp_slot_level);
+      p->rtl_expr = 0;
+    }
 
   return;
 }