aboutsummaryrefslogtreecommitdiff
path: root/gcc/reload.c
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2008-08-28 20:02:54 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2008-08-28 20:02:54 +0000
commiteef302d277ea42968569a454ed89ba5c236fe156 (patch)
treef924db7c9c66de457eab2a6629f8d764877ab80c /gcc/reload.c
parent9b3f31f2ed0f19d5c740684d85afd71152a473c0 (diff)
downloadgcc-eef302d277ea42968569a454ed89ba5c236fe156.zip
gcc-eef302d277ea42968569a454ed89ba5c236fe156.tar.gz
gcc-eef302d277ea42968569a454ed89ba5c236fe156.tar.bz2
rtl.h (simplify_subreg_regno): Declare.
gcc/ * rtl.h (simplify_subreg_regno): Declare. * rtlanal.c (simplify_subreg_regno): New function, split out from... * simplify-rtx.c (simplify_subreg): ...here. * reload.c (find_reloads): Use simplify_subreg_regno instead of subreg_offset_representable_p. From-SVN: r139736
Diffstat (limited to 'gcc/reload.c')
-rw-r--r--gcc/reload.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/gcc/reload.c b/gcc/reload.c
index 8163700..e353c50 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -2999,12 +2999,11 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
if (REG_P (SUBREG_REG (operand))
&& REGNO (SUBREG_REG (operand)) < FIRST_PSEUDO_REGISTER)
{
- if (!subreg_offset_representable_p
- (REGNO (SUBREG_REG (operand)),
- GET_MODE (SUBREG_REG (operand)),
- SUBREG_BYTE (operand),
- GET_MODE (operand)))
- force_reload = 1;
+ if (simplify_subreg_regno (REGNO (SUBREG_REG (operand)),
+ GET_MODE (SUBREG_REG (operand)),
+ SUBREG_BYTE (operand),
+ GET_MODE (operand)) < 0)
+ force_reload = 1;
offset += subreg_regno_offset (REGNO (SUBREG_REG (operand)),
GET_MODE (SUBREG_REG (operand)),
SUBREG_BYTE (operand),