This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH PR87022]Check all bits in dist-vector rather than the fisrt in loop distribution


On Sun, Oct 14, 2018 at 1:10 PM bin.cheng <bin.cheng@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.cheng@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.cheng@linux.alibaba.com>
>
>         PR tree-optimization/87022
>         * gcc.dg/tree-ssa/pr87022.c: New test.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]