This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR72772
- From: "Bin.Cheng" <amker dot cheng at gmail dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 9 Aug 2016 16:14:19 +0100
- Subject: Re: [PATCH] Fix PR72772
- Authentication-results: sourceware.org; auth=none
- References: <alpine.LSU.2.11.1608051242260.26629@t29.fhfr.qr>
On Fri, Aug 5, 2016 at 11:48 AM, Richard Biener <rguenther@suse.de> wrote:
>
> This fixes PR72772 by avoing placing a degenerate PHI in each
> forwarder block loop init creates when creating simple preheaders.
> The solution is to simply split the single loop entry edge which
> is also way cheaper than using the forwarder block creation path.
>
> You've seen a load of fallout fixes already, so this is the final
> patch adjusting two testcases (for gcc.dg/tree-ssa/pr59597.c we
> no longer register the unwanted threadings as the forwarders
> no longer contain PHIs).
>
> This patch will cause
>
> +FAIL: gcc.dg/graphite/scop-dsyr2k.c scan-tree-dump-times graphite "number
> of SCoPs: 1" 1
> +FAIL: gcc.dg/graphite/scop-dsyrk.c scan-tree-dump-times graphite "number
> of SCoPs: 1" 1
>
> on x86_64 with -m32 as niter analysis is confused by us now generating
> an optimized loop nest via threading that has all redundant checks
> removed. We no longer can prove that the loops do not eventually
> iterate zero times. I will open a PR for this (it is a latent issue).
> The tests would pass with VRP disabled but I choose to leave them
> FAILing for now.
>
> Bootstrapped / tested many times on x86_64-unknown-linux-gnu, re-doing
> this after the latest fallout fix now.
>
> Richard.
>
> 2016-08-05 Richard Biener <rguenther@suse.de>
>
> PR tree-optimization/72772
> * cfgloopmanip.c (create_preheader): Use split_edge if there
> is a single loop entry, avoiding degenerate PHIs.
>
> * gcc.dg/tree-ssa/ldist-24.c: New testcase.
FYI, I committed the same test as gcc.dg/tree-ssa/pr72772.c. If it's
appropriate, this ldist test can be saved here.
Thanks,
bin