This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH PR87022]Check all bits in dist-vector rather than the fisrt in loop distribution
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: bin dot cheng at linux dot alibaba dot com
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 15 Oct 2018 11:16:10 +0200
- Subject: Re: [PATCH PR87022]Check all bits in dist-vector rather than the fisrt in loop distribution
- References: <df7d24c5-478c-44e3-ae66-b39a58ca66c6.bin.cheng@linux.alibaba.com>
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.