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] Fix allocation of reg_known_value


On Fri, Nov 30, 2012 at 11:42 AM, Steven Bosscher <stevenb.gcc@gmail.com> wrote:
> On Fri, Nov 30, 2012 at 11:39 AM, Paolo Bonzini <bonzini@gnu.org> wrote:
>> Il 29/11/2012 23:47, Uros Bizjak ha scritto:
>>> This one-liner causes following runtime test failure [1] for
>>> alphaev68-linux-gnu:
>>>
>>> FAIL: gfortran.fortran-torture/execute/save_1.f90 execution,  -O2
>>> FAIL: gfortran.fortran-torture/execute/save_1.f90 execution,  -O2
>>> -fomit-frame-pointer -finline-functions
>>> FAIL: gfortran.fortran-torture/execute/save_1.f90 execution,  -O2
>>> -fomit-frame-pointer -finline-functions -funroll-loops
>>> FAIL: gfortran.fortran-torture/execute/save_1.f90 execution,  -O2
>>> -fbounds-check
>>>
>>> The patch miscompiles libgfortran library.
>>>
>>> I will provide more info tomorrow, any hint what/where should I look
>>> for differences?
>>
>> Anywhere.  The bug disabled a large part of alias analysis.
>>
>> Perhaps you can bisect it and backport the fix along the steps.
>
> Or open a PR and assign it to me, ultimately I'm responsible for this breakage.

I have found the problem. Luckily, it is the testcase that is
miscompiled. The problem is in sched1 pass that moves write to an
address "addrX" that happens to be aliased with AND mutilated address
"addrY & -7". The improved alias analysis does not notice that the
write is inside (addr & -7) region, allowing write to be moved after
read.

I'm preparing a detailed PR.

Thanks,
Uros.


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