diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-12-23 17:04:07 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-12-23 17:04:07 +0000 |
commit | 2811363aeb7014c7966c2fcbb5e9f29d4b3c60bf (patch) | |
tree | f98113a149d7e5bfc953898164d3d9844ea58714 /gcc/combine.c | |
parent | 8fe443dc76ca493aff5d4dab38f67c1841460ecd (diff) | |
download | gcc-2811363aeb7014c7966c2fcbb5e9f29d4b3c60bf.tar.gz |
PR rtl-optimization/42475
* combine.c (make_compound_operation) <case SUBREG>: Use mode of
SUBREG_REG (x) instead of tem's mode.
* gcc.dg/pr42475.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155430 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 2c60ae5640f..5ae557c180a 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -7306,15 +7306,14 @@ make_compound_operation (rtx x, enum rtx_code in_code) tem = make_compound_operation (SUBREG_REG (x), in_code); { - rtx simplified; - simplified = simplify_subreg (GET_MODE (x), tem, GET_MODE (tem), - SUBREG_BYTE (x)); + rtx simplified = simplify_subreg (mode, tem, GET_MODE (SUBREG_REG (x)), + SUBREG_BYTE (x)); if (simplified) tem = simplified; if (GET_CODE (tem) != GET_CODE (SUBREG_REG (x)) - && GET_MODE_SIZE (mode) < GET_MODE_SIZE (GET_MODE (tem)) + && GET_MODE_SIZE (mode) < GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))) && subreg_lowpart_p (x)) { rtx newer = force_to_mode (tem, mode, ~(HOST_WIDE_INT) 0, |