aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2014-09-22 07:36:59 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2014-09-22 07:36:59 +0000
commit7af3b946a4181ba5ae292a4a2ff905a4ae999073 (patch)
tree85b775fbbda18d475c50ade22299ac69b66598f1 /gcc/combine.c
parent0cb07998ae317e89dbf9695db731bfc8aa5f9d41 (diff)
downloadgcc-7af3b946a4181ba5ae292a4a2ff905a4ae999073.zip
gcc-7af3b946a4181ba5ae292a4a2ff905a4ae999073.tar.gz
gcc-7af3b946a4181ba5ae292a4a2ff905a4ae999073.tar.bz2
combine.c (subst): Use simplify_subreg_regno rather than REG_CANNOT_CHANGE_MODE_P to detect...
gcc/ * combine.c (subst): Use simplify_subreg_regno rather than REG_CANNOT_CHANGE_MODE_P to detect invalid mode changes. From-SVN: r215448
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index bce5545..1328486 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++;