On Tue, Apr 27, 2021 at 10:22 PM Jeff Law <jeffreya...@gmail.com> wrote: > > This change: > > d8e1f1d24179690fd9c0f63c27b12e030010d9ea is the first bad commit > commit d8e1f1d24179690fd9c0f63c27b12e030010d9ea > Author: Richard Biener <rguent...@suse.de> > Date: Wed Apr 7 12:09:44 2021 +0200 > > tree-optimization/99912 - schedule DSE before SRA > > For the testcase in the PR the main SRA pass is unable to do some > important scalarizations because dead stores of addresses make > the candiate variables disqualified. The following patch adds > another DSE pass before SRA forming a DCE/DSE pair and moves the > DSE pass that is currently closely after SRA up to after the > next DCE pass, forming another DCE/DSE pair now residing after PRE. > > 2021-04-07 Richard Biener <rguent...@suse.de> > > PR tree-optimization/99912 > * passes.def (pass_all_optimizations): Add pass_dse before > the first pass_dce, move the first pass_dse before the > pass_dce following pass_pre. > > * gcc.dg/tree-ssa/ldist-33.c: Disable PRE and LIM. > * gcc.dg/tree-ssa/pr96789.c: Adjust dump file scanned. > * gcc.dg/tree-ssa/ssa-dse-28.c: Likewise. > * gcc.dg/tree-ssa/ssa-dse-29.c: Likewise. > > Is breaking gcc.dg/Wrestrict-8.c on various targets (bfin-elf, lm32-elf, > nds32le-elf, or1k-elf rx-elf). I haven't dug into it all except for > quickly bisecting. > > http://3.14.90.209:8080/job/bfin-elf/ > > > If you want the full logs...
With a followup patch I see FAILs on x86_64-linux as well. The issue is the testcase does things like T (&a8_1[0], &a8_1[i], 5); /* { dg-warning "accessing 5 bytes at offsets 0 and \\\[0, 8] overlaps between 2 and 5 bytes at offset \\\[0, 3\\\]" } */ T (&a8_1[0], &a8_1[i], 6); /* { dg-warning "accessing 6 bytes at offsets 0 and \\\[0, 8] overlaps between 4 and 6 bytes at offset \\\[0, 2\\\]" } */ where T == memcpy. The first memcpy is dead and we can eliminate it (but only when an intermediate memcpy lowered to load/store is there). I'm changing the testcase to alias T to memcpy (..); foo (..); to place an artificial use of the destination memory after the memcpy. Richard. > > Jeff >