On Mon, Feb 12, 2018 at 05:12:20PM +0100, Jakub Jelinek wrote:
> On Mon, Feb 12, 2018 at 03:59:05PM +0000, Segher Boessenkool wrote:
> > If there is a LOG_LINK between two insns, this means those two insns
> > can be combined, as far as dataflow is concerned. There never should
> > be a LOG_LINK between two unrelated insns. If there is one, combine
> > will try to combine the insns without doing all the needed checks if
> > the earlier destination is used before the later insn, etc.
> >
> > Unfortunately we do not update the LOG_LINKs correctly in some cases.
> > This patch fixes at least some of those cases.
> >
> > This fixes the PR's testcase on aarch64. Also tested on 30+ cross
> > compiler, and on powerpc64-linux {-m32,-m64}. Will test on x86_64
> > as well before committing.
>
> Will you check in the testcase too?
Yes, but it is dg-do run and I don't have a native aarch compiler built
for it yet, so that will be a later patch.
> My preference would be something like following, so that it can
> be torture-tested on all targets.
Thanks!
Segher