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 PR71734] Add missed check that reference defined inside loop.


Hi Richard.

It turned out that the fix proposed by you does not work for liggomp
tests simd3 and simd4.
The reason is that we can't change safelen value for references not
defined inside loop. So I add missed check on it to patch.
Is it OK for trunk?
ChangeLog:
2016-07-29  Yuri Rumyantsev  <ysrumyan@gmail.com>

PR tree-optimization/71734
* tree-ssa-loop-im.c (ref_defined_in_loop_p): New function.
(ref_indep_loop_p_2): Change SAFELEN value for REF defined inside LOOP.

2016-07-29 13:08 GMT+03:00 Yuri Rumyantsev <ysrumyan@gmail.com>:
> Sorry H.J.
>
> I checked both these tests manually but forgot to pass "-fopenmp" option.
> I will fix the issue asap.
>
> 2016-07-29 0:33 GMT+03:00 H.J. Lu <hjl.tools@gmail.com>:
>> On Thu, Jul 28, 2016 at 6:49 AM, Yuri Rumyantsev <ysrumyan@gmail.com> wrote:
>>> Richard,
>>>
>>> I prepare a patch which is based on yours. New test is also included.
>>> Bootstrapping and regression testing did not show any new failures.
>>> Is it OK for trunk?
>>>
>>> Thanks.
>>> ChangeLog:
>>> 2016-07-28  Yuri Rumyantsev  <ysrumyan@gmail.com>
>>>
>>> PR tree-optimization/71734
>>> * tree-ssa-loop-im.c (ref_indep_loop_p_1): Pass value of safelen
>>> attribute instead of REF_LOOP and use it.
>>> (ref_indep_loop_p_2): Use SAFELEN argument instead of REF_LOOP and
>>> set it for Loops having non-zero safelen attribute.
>>> (ref_indep_loop_p): Pass zero as initial value for safelen.
>>> gcc/testsuite/ChangeLog:
>>>         * g++.dg/vect/pr70729-nest.cc: New test.
>>>
>>
>> Does this cause
>>
>> FAIL: libgomp.fortran/pr71734-1.f90   -O3 -fomit-frame-pointer
>> -funroll-loops -fpeel-loops -ftracer -finline-functions  execution
>> test
>> FAIL: libgomp.fortran/pr71734-1.f90   -O3 -g  execution test
>> FAIL: libgomp.fortran/pr71734-2.f90   -O3 -fomit-frame-pointer
>> -funroll-loops -fpeel-loops -ftracer -finline-functions  execution
>> test
>> FAIL: libgomp.fortran/pr71734-2.f90   -O3 -g  execution test
>>
>> on AVX machines and
>>
>> FAIL: libgomp.fortran/simd3.f90   -O3 -fomit-frame-pointer
>> -funroll-loops -fpeel-loops -ftracer -finline-functions  execution
>> test
>> FAIL: libgomp.fortran/simd3.f90   -O3 -g  execution test
>> FAIL: libgomp.fortran/simd4.f90   -O3 -fomit-frame-pointer
>> -funroll-loops -fpeel-loops -ftracer -finline-functions  execution
>> test
>> FAIL: libgomp.fortran/simd4.f90   -O3 -g  execution test
>>
>> on non-AVX machines?
>>
>> --
>> H.J.

Attachment: 71734.patch.3
Description: Binary data


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