From: Richard Sandiford Date: Mon, 18 Aug 2008 18:21:01 +0000 (+0000) Subject: rtlanal.c (subreg_offset_representable_p): Check HARD_REGNO_MODE_OK. X-Git-Tag: releases/gcc-4.4.0~3088 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=808cc41726a4f1b3ab1b87521e086baf3de66432;p=thirdparty%2Fgcc.git rtlanal.c (subreg_offset_representable_p): Check HARD_REGNO_MODE_OK. gcc/ * rtlanal.c (subreg_offset_representable_p): Check HARD_REGNO_MODE_OK. From-SVN: r139207 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 36e15f2e2178..c3ddeabbedc2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2008-08-18 Richard Sandiford + + * rtlanal.c (subreg_offset_representable_p): Check HARD_REGNO_MODE_OK. + 2008-08-18 Tomas Bily * tree.h (IS_CONVERT_EXPR_CODE_P): Renamed to CONVERT_EXPR_CODE_P. diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index fb4a5df7dc85..6337156eacbf 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -3241,7 +3241,8 @@ subreg_offset_representable_p (unsigned int xregno, enum machine_mode xmode, { struct subreg_info info; subreg_get_info (xregno, xmode, offset, ymode, &info); - return info.representable_p; + return (info.representable_p + && HARD_REGNO_MODE_OK (xregno + info.offset, ymode)); } /* Return the final regno that a subreg expression refers to. */