From b46f680981be1a5455fea46342cc0cc6f6073daa Mon Sep 17 00:00:00 2001 From: rsandifo Date: Mon, 22 Sep 2014 07:36:59 +0000 Subject: [PATCH] gcc/ * combine.c (subst): Use simplify_subreg_regno rather than REG_CANNOT_CHANGE_MODE_P to detect invalid mode changes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215448 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/combine.c | 8 +++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9227427c161b..830b2efad749 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-09-22 Richard Sandiford + + * combine.c (subst): Use simplify_subreg_regno rather than + REG_CANNOT_CHANGE_MODE_P to detect invalid mode changes. + 2014-09-22 Richard Sandiford * rtl.h (subreg_info): Expand commentary diff --git a/gcc/combine.c b/gcc/combine.c index bce554509938..13284865a497 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -5121,15 +5121,13 @@ subst (rtx x, rtx from, rtx to, int in_dest, int in_cond, int unique_copy) ) return gen_rtx_CLOBBER (VOIDmode, const0_rtx); -#ifdef CANNOT_CHANGE_MODE_CLASS if (code == SUBREG && REG_P (to) && REGNO (to) < FIRST_PSEUDO_REGISTER - && REG_CANNOT_CHANGE_MODE_P (REGNO (to), - GET_MODE (to), - GET_MODE (x))) + && simplify_subreg_regno (REGNO (to), GET_MODE (to), + SUBREG_BYTE (x), + GET_MODE (x)) < 0) return gen_rtx_CLOBBER (VOIDmode, const0_rtx); -#endif new_rtx = (unique_copy && n_occurrences ? copy_rtx (to) : to); n_occurrences++; -- 2.47.2