This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Propagate out predicate inversions in forwprop
- From: Andrew Pinski <pinskia at gmail dot com>
- To: Richard Guenther <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 7 Sep 2011 12:25:54 -0700
- Subject: Re: [PATCH] Propagate out predicate inversions in forwprop
- References: <alpine.LNX.2.00.1109071339110.2130@zhemvz.fhfr.qr>
On Wed, Sep 7, 2011 at 4:46 AM, Richard Guenther <rguenther@suse.de> wrote:
>
> This makes sure that we propagate comparisons that we cannot invert
> into inverted conditions by swapping edges or the conditional ops.
> For the testcase it transforms
>
> <bb 2>:
> ÂD.2724_4 = xx_2(D) < xy_3(D);
> Âp_5 = (int) D.2724_4;
> ÂD.2725_6 = p_5 == 0;
> Ânp_7 = (int) D.2725_6;
> Âif (np_7 != 0)
>
> to
>
> <bb 2>:
> Âif (xx_2(D) < xy_3(D))
>
> while without the patch we would be left with
>
> <bb 2>:
> ÂD.2724_4 = xx_2(D) < xy_3(D);
> Âif (D.2724_4 == 0)
This sounds like PR 15558.
Thanks,
Andrew Pinski