Commit 3115c00d by Andy Hutchinson Committed by Andy Hutchinson

re PR middle-end/36447 (simplify_subreg ICE with right shift more than length type AVR)

PR middle-end/36447
* simplify-rtx.c (simplify_subreg): Add check for shift count greater than size.

From-SVN: r136602
parent 5cb0cd01
2008-06-09 Andy Hutchinson <hutchinsonandy@aim.com>
PR middle-end/36447
* simplify-rtx.c (simplify_subreg): Add check for shift count
greater than size.
2008-06-09 Richard Sandiford <rdsandiford@googlemail.com> 2008-06-09 Richard Sandiford <rdsandiford@googlemail.com>
* doc/md.texi: Synchronize with later constraints.md change. * doc/md.texi: Synchronize with later constraints.md change.
......
...@@ -5265,6 +5265,7 @@ simplify_subreg (enum machine_mode outermode, rtx op, ...@@ -5265,6 +5265,7 @@ simplify_subreg (enum machine_mode outermode, rtx op,
&& GET_MODE_BITSIZE (innermode) >= (2 * GET_MODE_BITSIZE (outermode)) && GET_MODE_BITSIZE (innermode) >= (2 * GET_MODE_BITSIZE (outermode))
&& GET_CODE (XEXP (op, 1)) == CONST_INT && GET_CODE (XEXP (op, 1)) == CONST_INT
&& (INTVAL (XEXP (op, 1)) & (GET_MODE_BITSIZE (outermode) - 1)) == 0 && (INTVAL (XEXP (op, 1)) & (GET_MODE_BITSIZE (outermode) - 1)) == 0
&& INTVAL (XEXP (op, 1)) < GET_MODE_BITSIZE (innermode)
&& byte == subreg_lowpart_offset (outermode, innermode)) && byte == subreg_lowpart_offset (outermode, innermode))
{ {
int shifted_bytes = INTVAL (XEXP (op, 1)) / BITS_PER_UNIT; int shifted_bytes = INTVAL (XEXP (op, 1)) / BITS_PER_UNIT;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment