+2006-12-21 Joseph Myers <joseph@codesourcery.com>
+
+ * rtlanal.c (subreg_get_info): Do not make register size
+ computations for mode sizes not divisible by the number of
+ registers.
+
2006-12-21 Daniel Berlin <dberlin@dberlin.org>
* tree-ssa-structalias.c (build_constraint_graph): Insert complex
/* If registers store different numbers of bits in the different
modes, we cannot generally form this subreg. */
if (!HARD_REGNO_NREGS_HAS_PADDING (xregno, xmode)
- && !HARD_REGNO_NREGS_HAS_PADDING (xregno, ymode))
+ && !HARD_REGNO_NREGS_HAS_PADDING (xregno, ymode)
+ && (GET_MODE_SIZE (xmode) % nregs_xmode) == 0
+ && (GET_MODE_SIZE (ymode) % nregs_ymode) == 0)
{
regsize_xmode = GET_MODE_SIZE (xmode) / nregs_xmode;
- gcc_assert (regsize_xmode * nregs_xmode == GET_MODE_SIZE (xmode));
regsize_ymode = GET_MODE_SIZE (ymode) / nregs_ymode;
- gcc_assert (regsize_ymode * nregs_ymode == GET_MODE_SIZE (ymode));
if (!rknown && regsize_xmode > regsize_ymode && nregs_ymode > 1)
{
info->representable_p = false;