From 370e2b8b816e7394cfb2a73e5f79a5866881f1d5 Mon Sep 17 00:00:00 2001 From: geoffk Date: Sun, 28 May 2000 01:06:11 +0000 Subject: [PATCH] * combine.c (subst): Honour CLASS_CANNOT_CHANGE_SIZE when substituting the REG in a (subreg:X (reg:Y ...)). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34217 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/combine.c | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a2d5253..f491f3c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2000-05-27 Geoff Keating + + * combine.c (subst): Honour CLASS_CANNOT_CHANGE_SIZE when + substituting the REG in a (subreg:X (reg:Y ...)). + 2000-05-28 Neil Booth * cpplex.c (_cpp_lex_line): Merge vertical space. Flag diff --git a/gcc/combine.c b/gcc/combine.c index c9d6a52..8a14d80 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -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++; } -- 2.7.4