diff options
Diffstat (limited to 'gcc/rtlanal.c')
-rw-r--r-- | gcc/rtlanal.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index 0b6e1e0..8e4762c 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -3657,6 +3657,16 @@ subreg_get_info (unsigned int xregno, machine_mode xmode, info->offset = offset / regsize_xmode; return; } + /* It's not valid to extract a subreg of mode YMODE at OFFSET that + would go outside of XMODE. */ + if (!rknown + && GET_MODE_SIZE (ymode) + offset > GET_MODE_SIZE (xmode)) + { + info->representable_p = false; + info->nregs = nregs_ymode; + info->offset = offset / regsize_xmode; + return; + } /* Quick exit for the simple and common case of extracting whole subregisters from a multiregister value. */ /* ??? It would be better to integrate this into the code below, |