Message ID | AANLkTikhFGbPbtsCRCxqTHqkU7Wjgpr_MB4QRfjrho=o@mail.gmail.com |
---|---|
State | New |
Headers | show |
> This RTX breaks GET_MODE_INNER, but we can win the game with another > trick in the sleeve: Playing tricks on the 4.3/4.4 branches doesn't seem very appropriate to me at this stage. PR middle-end/44569 wasn't a regression so I wonder why the patch was even installed on the 4.5 branch; and there is no testcase AFAICS.
On Wed, Nov 3, 2010 at 10:38 PM, Eric Botcazou <ebotcazou@adacore.com> wrote: >> This RTX breaks GET_MODE_INNER, but we can win the game with another >> trick in the sleeve: > > Playing tricks on the 4.3/4.4 branches doesn't seem very appropriate to me at > this stage. PR middle-end/44569 wasn't a regression so I wonder why the > patch was even installed on the 4.5 branch; and there is no testcase AFAICS. It was "obvious" in the sense that avoided ICE by correcting VOIDmode for vector mode operands. So, it was either ICE or to dig a little deeper in the operand itself for a correct mode. Due to this logic, the patch can't cause any regression. Uros.
> It was "obvious" in the sense that avoided ICE by correcting VOIDmode > for vector mode operands. So, it was either ICE or to dig a little > deeper in the operand itself for a correct mode. Due to this logic, > the patch can't cause any regression. But that's backward, the patch must fix a regression to be put on branches; at a minimum, there must be a testcase to show that there is a real problem to be fixed on the branches. There is neither in this case AFAICS.
On Wed, Nov 3, 2010 at 11:13 PM, Eric Botcazou <ebotcazou@adacore.com> wrote: >> It was "obvious" in the sense that avoided ICE by correcting VOIDmode >> for vector mode operands. So, it was either ICE or to dig a little >> deeper in the operand itself for a correct mode. Due to this logic, >> the patch can't cause any regression. > > But that's backward, the patch must fix a regression to be put on branches; at > a minimum, there must be a testcase to show that there is a real problem to > be fixed on the branches. There is neither in this case AFAICS. OK, I can revert the patch on branches. Uros.
> OK, I can revert the patch on branches.
Thanks.
The patch is OK for mainline if you add a comment explaining where these 2
kinds of CONCATN come from, e.g.:
/* VECTOR_CSTs in debug expressions are expanded into CONCATN instead of
regular CONST_VECTORs. They have vector or integer modes, depending
on the capabilities of the target. Cope with them. */
if (partmode == VOIDmode && VECTOR_MODE_P (innermode))
partmode = GET_MODE_INNER (innermode);
else if (partmode == VOIDmode)
{
enum mode_class mclass = GET_MODE_CLASS (innermode);
partmode = mode_for_size (inner_size * BITS_PER_UNIT, mclass, 0);
}
Index: lower-subreg.c =================================================================== --- lower-subreg.c (revision 166266) +++ lower-subreg.c (working copy) @@ -411,10 +411,13 @@ simplify_subreg_concatn (enum machine_mo part = XVECEXP (op, 0, byte / inner_size); partmode = GET_MODE (part); + if (partmode == VOIDmode && VECTOR_MODE_P (innermode)) + partmode = GET_MODE_INNER (innermode); + if (partmode == VOIDmode) { - gcc_assert (VECTOR_MODE_P (innermode)); - partmode = GET_MODE_INNER (innermode); + enum mode_class mclass = GET_MODE_CLASS (innermode); + partmode = mode_for_size (inner_size * BITS_PER_UNIT, mclass, 0); } final_offset = byte % inner_size;