]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR rtl-optimization/14282 (ICE in sh-elf-gcc with -m4-single-only and -O2)
authorDJ Delorie <dj@redhat.com>
Thu, 4 Mar 2004 19:03:02 +0000 (14:03 -0500)
committerDJ Delorie <dj@gcc.gnu.org>
Thu, 4 Mar 2004 19:03:02 +0000 (14:03 -0500)
PR optimization/14282
* sched-deps.c (sched_analyze_insn): Allow a stack adjustment
between a call and the assignment of its return value.

From-SVN: r78925

gcc/ChangeLog
gcc/sched-deps.c

index 03a47a36e80d43843060f88262ef91ac4f5278c1..4f53e6ba9a7c2945eee8af6be3e9fa64306cb1f1 100644 (file)
@@ -1,3 +1,9 @@
+2004-03-04  DJ Delorie  <dj@redhat.com>
+
+       PR optimization/14282
+       * sched-deps.c (sched_analyze_insn): Allow a stack adjustment
+       between a call and the assignment of its return value.
+
 2004-03-04  Kazu Hirata  <kazu@cs.umass.edu>
 
        * config/h8300/h8300.c: Put a comment for every function.
index 754142f137c3f2e356f749c24710c073e5fb42f1..ad96281b093b0744c0d5a4a21c650b4e69633059 100644 (file)
@@ -1127,7 +1127,13 @@ sched_analyze_insn (struct deps *deps, rtx x, rtx insn, rtx loop_notes)
       tmp = SET_SRC (set);
       if (GET_CODE (tmp) == SUBREG)
        tmp = SUBREG_REG (tmp);
-      if (GET_CODE (tmp) == REG)
+      if ((GET_CODE (tmp) == PLUS
+          || GET_CODE (tmp) == MINUS)
+         && GET_CODE (XEXP (tmp, 0)) == REG
+         && REGNO (XEXP (tmp, 0)) == STACK_POINTER_REGNUM
+         && dest_regno == STACK_POINTER_REGNUM)
+       src_regno = STACK_POINTER_REGNUM;
+      else if (GET_CODE (tmp) == REG)
        src_regno = REGNO (tmp);
       else
        goto end_call_group;