diff options
| author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-04-17 20:20:13 +0000 |
|---|---|---|
| committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-04-17 20:20:13 +0000 |
| commit | a6c18cd61135d70a8ba06c8aeb532ae9cb07f790 (patch) | |
| tree | fd3a82b478110f82a5e0a42f3921e1aed5771e01 | |
| parent | cdb04b8418692622610b98288d6362347b75c184 (diff) | |
| download | ppe42-gcc-a6c18cd61135d70a8ba06c8aeb532ae9cb07f790.tar.gz ppe42-gcc-a6c18cd61135d70a8ba06c8aeb532ae9cb07f790.zip | |
gcc/
PR rtl-optimization/35838
* dse.c (find_shift_sequence): Use subreg_lowpart_offset to work
out the byte offset of the first subreg.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@134411 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 6 | ||||
| -rw-r--r-- | gcc/dse.c | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 89983b940d3..9e5fcfa4f81 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2008-04-17 Richard Sandiford <rsandifo@nildram.co.uk> + + PR rtl-optimization/35838 + * dse.c (find_shift_sequence): Use subreg_lowpart_offset to work + out the byte offset of the first subreg. + 2008-04-17 Uros Bizjak <ubizjak@gmail.com> * config/i386/i386.md (addti3 splitter): Pass arrays of 3 operands diff --git a/gcc/dse.c b/gcc/dse.c index 9dab6259c17..9d19b7071ee 100644 --- a/gcc/dse.c +++ b/gcc/dse.c @@ -1446,7 +1446,7 @@ find_shift_sequence (int access_size, new_mode = GET_MODE_WIDER_MODE (new_mode)) { rtx target, new_reg, shift_seq, insn, new_lhs; - int cost; + int cost, offset; /* Try a wider mode if truncating the store mode to NEW_MODE requires a real instruction. */ @@ -1460,8 +1460,9 @@ find_shift_sequence (int access_size, if (!CONSTANT_P (store_info->rhs) && !MODES_TIEABLE_P (new_mode, store_mode)) continue; + offset = subreg_lowpart_offset (new_mode, store_mode); new_lhs = simplify_gen_subreg (new_mode, copy_rtx (store_info->rhs), - store_mode, 0); + store_mode, offset); if (new_lhs == NULL_RTX) continue; |

