This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Unreviewed^2 patches - bootstrap failure
- From: "Ulrich Weigand" <weigand at i1 dot informatik dot uni-erlangen dot de>
- To: zack at codesourcery dot com (Zack Weinberg)
- Cc: weigand at i1 dot informatik dot uni-erlangen dot de (Ulrich Weigand), gcc-patches at gcc dot gnu dot org
- Date: Mon, 25 Aug 2003 22:02:56 +0200 (CEST)
- Subject: Re: Unreviewed^2 patches - bootstrap failure
Zack Weinberg wrote:
> "Ulrich Weigand" <weigand@i1.informatik.uni-erlangen.de> writes:
>
> > Hello,
> >
> > the following patch fixing a bootstrap failure on s390 has
> > been unreviewed for some time; likewise the others.
Thanks very much for the review!
> > [PATCH] Fix RTL-sharing bug in combine - bootstrap failure
> > http://gcc.gnu.org/ml/gcc-patches/2003-07/msg01672.html
>
> This is OK for mainline provided that you add a comment explaining
> that true_rtx and false_rtx come from if_then_else_cond and therefore
> may be shared with something that should not be modified.
I'll do so.
> I don't think it should be applied for 3.3 as long as this is merely a
> latent problem, but feel free to convince Mark otherwise.
Fine with me.
> > [PATCH] Fix ICE when profiling on s390
> > http://gcc.gnu.org/ml/gcc-patches/2003-07/msg01705.html
>
> This is OK for both mainline and 3.3 (since this does fix an actual,
> non-latent regression relative to 3.0).
Thanks.
> > [PATCH] Simplify more non-paradoxical subregs in simplify_comparison
> > http://gcc.gnu.org/ml/gcc-patches/2003-07/msg02247.html
>
> It is not clear to me why the change in this patch enables the
> optimization only for non-paradoxical subregs. Could you please
> clarify?
Maybe it's seen most clearly by looking at the full expressions
before and after the patch:
before:
if (GET_CODE (op0) == SUBREG && subreg_lowpart_p (op0)
/* Case 3 above, to sometimes allow (subreg (mem x)), isn't
implemented. */
&& GET_CODE (SUBREG_REG (op0)) == REG
&& GET_MODE_CLASS (GET_MODE (op0)) == MODE_INT
&& GET_MODE_CLASS (GET_MODE (SUBREG_REG (op0))) == MODE_INT
&& (code == NE || code == EQ))
{
if (GET_MODE_SIZE (GET_MODE (op0))
> GET_MODE_SIZE (GET_MODE (SUBREG_REG (op0))))
{
op0 = SUBREG_REG (op0);
op1 = gen_lowpart_for_combine (GET_MODE (op0), op1);
}
else if ((GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (op0)))
<= HOST_BITS_PER_WIDE_INT)
&& (nonzero_bits (SUBREG_REG (op0),
GET_MODE (SUBREG_REG (op0)))
& ~GET_MODE_MASK (GET_MODE (op0))) == 0)
{
tem = gen_lowpart_for_combine (GET_MODE (SUBREG_REG (op0)), op1);
if ((nonzero_bits (tem, GET_MODE (SUBREG_REG (op0)))
& ~GET_MODE_MASK (GET_MODE (op0))) == 0)
op0 = SUBREG_REG (op0), op1 = tem;
}
}
after:
if (GET_CODE (op0) == SUBREG && subreg_lowpart_p (op0)
&& GET_MODE_CLASS (GET_MODE (op0)) == MODE_INT
&& GET_MODE_CLASS (GET_MODE (SUBREG_REG (op0))) == MODE_INT
&& (code == NE || code == EQ))
{
if (GET_MODE_SIZE (GET_MODE (op0))
> GET_MODE_SIZE (GET_MODE (SUBREG_REG (op0))))
{
/* For paradoxical subregs, allow case 1 as above. Case 3 isn't
implemented. */
if (GET_CODE (SUBREG_REG (op0)) == REG)
{
op0 = SUBREG_REG (op0);
op1 = gen_lowpart_for_combine (GET_MODE (op0), op1);
}
}
else if ((GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (op0)))
<= HOST_BITS_PER_WIDE_INT)
&& (nonzero_bits (SUBREG_REG (op0),
GET_MODE (SUBREG_REG (op0)))
& ~GET_MODE_MASK (GET_MODE (op0))) == 0)
{
tem = gen_lowpart_for_combine (GET_MODE (SUBREG_REG (op0)), op1);
if ((nonzero_bits (tem, GET_MODE (SUBREG_REG (op0)))
& ~GET_MODE_MASK (GET_MODE (op0))) == 0)
op0 = SUBREG_REG (op0), op1 = tem;
}
}
The overall effect is simply that the test GET_CODE (SUBREG_REG (op0)) == REG
is moved from the outer if, where it affects both the paraxocical and the
non-paradoxical case, to a location inside the first inner if, where it
affects only the paradoxical case.
This means that the optimization in the paradoxical case is done only
for REG subregs, as before, while in the non-paradoxical case it is
now done for both REG and MEM subregs.
Bye,
Ulrich
--
Dr. Ulrich Weigand
weigand@informatik.uni-erlangen.de