]> gcc.gnu.org Git - gcc.git/commitdiff
combine.c (subst): Honour CLASS_CANNOT_CHANGE_SIZE when substituting the REG in a...
authorGeoff Keating <geoffk@cygnus.com>
Sun, 28 May 2000 01:06:11 +0000 (01:06 +0000)
committerGeoffrey Keating <geoffk@gcc.gnu.org>
Sun, 28 May 2000 01:06:11 +0000 (01:06 +0000)
* combine.c (subst): Honour CLASS_CANNOT_CHANGE_SIZE when
substituting the REG in a (subreg:X (reg:Y ...)).

From-SVN: r34217

gcc/ChangeLog
gcc/combine.c

index a2d525367eacc854035988dfc608f4511719ba16..f491f3c7edf98af2085771dfcee23cd60d6b9475 100644 (file)
@@ -1,3 +1,8 @@
+2000-05-27  Geoff Keating  <geoffk@cygnus.com>
+
+       * combine.c (subst): Honour CLASS_CANNOT_CHANGE_SIZE when
+       substituting the REG in a (subreg:X (reg:Y ...)).
+
 2000-05-28  Neil Booth  <NeilB@earthling.net>
 
        * cpplex.c (_cpp_lex_line): Merge vertical space.  Flag
index c9d6a52f294c8a43eca8939ee52f3ee78ab39a90..8a14d806c68ef73b963514d1636c3ada4533884f 100644 (file)
@@ -3400,6 +3400,18 @@ subst (x, from, to, in_dest, unique_copy)
                      )
                    return gen_rtx_CLOBBER (VOIDmode, const0_rtx);
 
+#ifdef CLASS_CANNOT_CHANGE_SIZE
+                 if (code == SUBREG
+                     && GET_CODE (to) == REG
+                     && REGNO (to) < FIRST_PSEUDO_REGISTER
+                     && (TEST_HARD_REG_BIT
+                         (reg_class_contents[(int) CLASS_CANNOT_CHANGE_SIZE],
+                          REGNO (to)))
+                     && (GET_MODE_BITSIZE (GET_MODE (to)) 
+                         != GET_MODE_BITSIZE (GET_MODE (x))))
+                   return gen_rtx_CLOBBER (VOIDmode, const0_rtx);
+#endif
+
                  new = (unique_copy && n_occurrences ? copy_rtx (to) : to);
                  n_occurrences++;
                }
This page took 0.101338 seconds and 5 git commands to generate.