summaryrefslogtreecommitdiff
path: root/gcc/rtlanal.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-18 18:21:01 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-18 18:21:01 +0000
commit826174ed5baf39165e89813106f5df7bc36021c7 (patch)
treec5651906fcad1a544db024c9999917678418e7e9 /gcc/rtlanal.c
parenta54ee4a82bea1be122cbca03c4717e56b3233032 (diff)
downloadgcc-826174ed5baf39165e89813106f5df7bc36021c7.tar.gz
gcc/
* rtlanal.c (subreg_offset_representable_p): Check HARD_REGNO_MODE_OK. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139207 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/rtlanal.c')
-rw-r--r--gcc/rtlanal.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c
index fb4a5df7dc8..6337156eacb 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. */