On Fri, Aug 5, 2016 at 11:48 AM, Richard Biener <rguent...@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 <rguent...@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