diff options
author | Richard Sandiford <rsandifo@nildram.co.uk> | 2008-04-17 20:20:13 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2008-04-17 20:20:13 +0000 |
commit | de907943a5e2c5c869c6af7cf7578e52172bc733 (patch) | |
tree | fd3a82b478110f82a5e0a42f3921e1aed5771e01 /gcc/dse.c | |
parent | c2b814b9ff90dbf5440b5c611cb791a403239723 (diff) | |
download | gcc-de907943a5e2c5c869c6af7cf7578e52172bc733.zip gcc-de907943a5e2c5c869c6af7cf7578e52172bc733.tar.gz gcc-de907943a5e2c5c869c6af7cf7578e52172bc733.tar.bz2 |
re PR rtl-optimization/35838 (FAIL: 22_locale/num_get/get/char/16.cc execution test, and 76 others)
gcc/
PR rtl-optimization/35838
* dse.c (find_shift_sequence): Use subreg_lowpart_offset to work
out the byte offset of the first subreg.
From-SVN: r134411
Diffstat (limited to 'gcc/dse.c')
-rw-r--r-- | gcc/dse.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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; |