]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR bootstrap/54688 (violation of implicit restriction "No_Elaboration_Code" on...
authorBernd Schmidt <bernds@codesourcery.com>
Fri, 28 Sep 2012 20:32:55 +0000 (20:32 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Fri, 28 Sep 2012 20:32:55 +0000 (20:32 +0000)
PR bootstrap/54688
* sched-deps.c (parse_add_or_inc): Remove MINUS handling.  Take
STACK_GROWS_DOWNWARD into account.

From-SVN: r191838

gcc/ChangeLog
gcc/sched-deps.c

index 6f2fb9f40770c1aa0218a123675abc0457e117ae..7851337f434d4abfc4fd85e5747074a1ab26f2f6 100644 (file)
@@ -1,3 +1,9 @@
+2012-09-20  Bernd Schmidt  <bernds@codesourcery.com>
+
+       PR bootstrap/54688
+       * sched-deps.c (parse_add_or_inc): Remove MINUS handling.  Take
+       STACK_GROWS_DOWNWARD into account.
+
 2012-09-28  Jakub Jelinek  <jakub@redhat.com>
 
        PR target/54716
index f53caddf73542ce527162c9a7397f53187e91090..6625a53a699b4333d5b9a6fbec1bb594d7915a84 100644 (file)
@@ -4600,8 +4600,7 @@ parse_add_or_inc (struct mem_inc_info *mii, rtx insn, bool before_mem)
   if (!REG_P (SET_DEST (pat)))
     return false;
 
-  if (GET_CODE (SET_SRC (pat)) != PLUS
-      && GET_CODE (SET_SRC (pat)) != MINUS)
+  if (GET_CODE (SET_SRC (pat)) != PLUS)
     return false;
 
   mii->inc_insn = insn;
@@ -4629,9 +4628,14 @@ parse_add_or_inc (struct mem_inc_info *mii, rtx insn, bool before_mem)
     }
 
   if (regs_equal && REGNO (SET_DEST (pat)) == STACK_POINTER_REGNUM)
-    /* Note that the sign has already been reversed for !before_mem.  */
-    return mii->inc_constant > 0;
-
+    {
+      /* Note that the sign has already been reversed for !before_mem.  */
+#ifdef STACK_GROWS_DOWNWARD
+      return mii->inc_constant > 0;
+#else
+      return mii->inc_constant < 0;
+#endif
+    }
   return true;
 }