+2004-01-22 Roger Sayle <roger@eyesopen.com>
+
+ PR optimization/13821
+ * simplify-rtx.c (simplify_subreg): Use subreg_lowpart_offset to
+ correctly calculate the lowpart offset of the contracted subreg.
+
2004-01-22 Ian Lance Taylor <ian@wasabisystems.com>
* doc/invoke.texi (Optimize Options): Note that --param arguments
if (outermode == origmode)
return XEXP (op, 0);
if (GET_MODE_BITSIZE (outermode) <= GET_MODE_BITSIZE (origmode))
- return simplify_gen_subreg (outermode, XEXP (op, 0),
- origmode, byte);
+ return simplify_gen_subreg (outermode, XEXP (op, 0), origmode,
+ subreg_lowpart_offset (outermode,
+ origmode));
if (SCALAR_INT_MODE_P (outermode))
return simplify_gen_unary (GET_CODE (op), outermode,
XEXP (op, 0), origmode);