On Wed, Jul 6, 2016 at 11:50 AM, Yuri Rumyantsev <ysrum...@gmail.com> wrote:
> Richard,
>
> I pointed out in the commentary that REF is defined inside loop and
> this check is related to this statement. Should I clarify it?
>
> +  /* We consider REF defined in LOOP as independent if at least 2 loop
> +     iterations are not dependent.  */

Yes, I fail to see why x[0] should not be disambiguated against y[i] in

#pragma GCC loop ivdep
  for (i...)
    {
      y[i] = ...;
      for (j...)
        ... = x[0];
    }

REF is always inside the loop nest with LOOP being the outermost loop.

Richard.

>
> 2016-07-06 12:38 GMT+03:00 Richard Biener <richard.guent...@gmail.com>:
>> On Tue, Jul 5, 2016 at 4:56 PM, Yuri Rumyantsev <ysrum...@gmail.com> wrote:
>>> Hi All,
>>>
>>> Here is a simple fix to cure regressions introduced by my fix for
>>> 70729. Patch also contains minor changes in test found by Jakub.
>>>
>>> Bootstrapping and regression testing did not show any new failures.
>>>
>>> Is it OK for trunk?
>>
>> +      && bitmap_bit_p (&memory_accesses.refs_in_loop[loop->num], ref->id))
>>
>> So safelen does not apply to refs in nested loops?  The added comment only
>> explains the safelen check change but this also requires explanation.
>>
>> Richard.
>>
>>> ChangeLog:
>>> 2016-07-05  Yuri Rumyantsev  <ysrum...@gmail.com>
>>>
>>> PR tree-optimization/71734
>>> * tree-ssa-loop-im.c (ref_indep_loop_p_1): Consider REF defined in
>>> LOOP as independent if at least two loop iterations are not dependent.
>>> gcc/testsuite/ChangeLog:
>>>         * g++.dg/vect/pr70729.cc: Delete redundant dg options, fix style.

Reply via email to