Fix register elimination problem
authorBernd Schmidt <bernds@redhat.com>
Thu, 1 Mar 2001 13:35:13 +0000 (13:35 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Thu, 1 Mar 2001 13:35:13 +0000 (13:35 +0000)
From-SVN: r40147

gcc/ChangeLog
gcc/reload1.c

index 40a88ef46be667d5b39715a5305519b685aaddec..879827b9f163142199816193c2151edf644bdd30 100644 (file)
@@ -1,5 +1,8 @@
 2001-03-01  Bernd Schmidt  <bernds@redhat.com>
 
+       * reload1.c (eliminate_regs_in_insn): Restrict the special case
+       code not to try to optimize adds with anything but a REG destination.
+
        * sched-int.h (struct haifa_insn_data): Add new member priority_known.
        (INSN_PRIORITY_KNOWN): New accessor macro.
        * haifa-sched.c (priority): Use it instead of testing priority against
index 13d609ef75517502ea2b57eb61904995ab7fa829..077c410d82586d7d3603d5bfb1a22e48b2d3e479 100644 (file)
@@ -3016,6 +3016,7 @@ eliminate_regs_in_insn (insn, replace)
      currently support: a single set with the source being a PLUS of an
      eliminable register and a constant.  */
   if (old_set
+      && GET_CODE (SET_DEST (old_set)) == REG
       && GET_CODE (SET_SRC (old_set)) == PLUS
       && GET_CODE (XEXP (SET_SRC (old_set), 0)) == REG
       && GET_CODE (XEXP (SET_SRC (old_set), 1)) == CONST_INT