summaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>2004-12-31 16:24:48 +0000
committerhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>2004-12-31 16:24:48 +0000
commit9c61a71b065ed706f13a0a7069c52358554ae2e4 (patch)
tree6472fae54cd2a808f7ac4b8ac0e6aa0b3ac2c1ac /gcc/combine.c
parentd3992d8e283a2f5728e14e838e80a0fec47ed2ec (diff)
downloadgcc-9c61a71b065ed706f13a0a7069c52358554ae2e4.tar.gz
PR target/18701
* combine.c (gen_lowpart_for_combine): When stripping SUBREG of MEM, adjust imode and isize. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92760 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index 800e65ea100..61b93dd3048 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -9355,8 +9355,16 @@ gen_lowpart_for_combine (enum machine_mode omode, rtx x)
if (GET_CODE (x) == SUBREG && MEM_P (SUBREG_REG (x)))
{
x = SUBREG_REG (x);
- if (GET_MODE (x) == omode)
+
+ /* For use in case we fall down into the address adjustments
+ further below, we need to adjust the known mode and size of
+ x; imode and isize, since we just adjusted x. */
+ imode = GET_MODE (x);
+
+ if (imode == omode)
return x;
+
+ isize = GET_MODE_SIZE (imode);
}
result = gen_lowpart_common (omode, x);