re PR rtl-optimization/10352 (ICE in find_reloads_toplev)

PR opt/10352
        Tue Jul 23 21:49:24 2002  J"orn Rennecke <joern.rennecke@superh.com>
        * simplify-rtx.c (simplify_subreg): When converting to a non-int
        mode, try to convert to an integer mode of matching size first.
	* g++.dg/opt/reload2.C: New.

From-SVN: r65441
This commit is contained in:
Richard Henderson 2003-04-10 15:17:36 -07:00 committed by Richard Henderson
parent 73ae1804d5
commit b9de9ea4b1
2 changed files with 21 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2003-04-09 Richard Henderson <rth@redhat.com>
PR opt/10352
Tue Jul 23 21:49:24 2002 J"orn Rennecke <joern.rennecke@superh.com>
* simplify-rtx.c (simplify_subreg): When converting to a non-int
mode, try to convert to an integer mode of matching size first.
2003-04-09 Alan Modra <amodra@bigpond.net.au>
* config/rs6000/rs6000.c (rs6000_emit_prologue): Use correct mode to

View File

@ -2484,6 +2484,20 @@ simplify_subreg (outermode, op, innermode, byte)
return new;
}
if (GET_MODE_CLASS (outermode) != MODE_INT
&& GET_MODE_CLASS (outermode) != MODE_CC)
{
enum machine_mode new_mode = int_mode_for_mode (outermode);
if (new_mode != innermode || byte != 0)
{
op = simplify_subreg (new_mode, op, innermode, byte);
if (! op)
return NULL_RTX;
return simplify_subreg (outermode, op, new_mode, 0);
}
}
offset = byte * BITS_PER_UNIT;
switch (GET_CODE (op))
{