On Sun, Oct 14, 2018 at 1:10 PM bin.cheng <bin.ch...@linux.alibaba.com> wrote: > > Hi, > This patch fixes PR87022. The root cause is the original code checks the > first bit > in dist vector for zero and we still do that after enabling loop nest > distribution. > For the test case, the first bit is for outer loop while the dependence > happens in > the inner loop, as a result, the direction of dependence is not correctly > reverted. > This patch fixes the issue by checking all bits in dist vector. > > Bootstrap and test on x86_64, is it OK?
OK. Thanks and welcome back. Richard. > Thanks, > bin > > 2018-10-14 Bin Cheng <bin.ch...@linux.alibaba.com> > > PR tree-optimization/87022 > * tree-loop-distribution.c (pg_add_dependence_edges): Check all > bits in dist vector rather than the first one. > > 2018-10-14 Bin Cheng <bin.ch...@linux.alibaba.com> > > PR tree-optimization/87022 > * gcc.dg/tree-ssa/pr87022.c: New test.