+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
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. */
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;