PATCH [6/n] X32: Supprot 32bit address

Uros Bizjak ubizjak@gmail.com
Tue Jul 19 16:56:00 GMT 2011


On Tue, Jul 19, 2011 at 4:42 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Tue, Jul 19, 2011 at 7:04 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
>> On Tue, Jul 19, 2011 at 3:47 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>
>>>> Attached patch simply removes these two checks, as it seems they are
>>>> not needed. This also follows how other Pmode != ptr_mode targets.
>>>>
>>>> 2011-07-19  Uros Bizjak  <ubizjak@gmail.com>
>>>>
>>>>        PR target/49780
>>>>        * config/i386/i386.c (ix86_legitimate_address_p): Remove checks that
>>>>        base and index registers are in Pmode.
>>>>
>>>> Patch was bootstrapped and regression tested on x86_64-pc-linux-gnu
>>>> {,-m32}. Can you please re-test it on x32?
>>>
>>> Comparing with my patch, which only allows DImode and SImode,
>>> it caused the following regressions:
>>>
>>> FAIL: libgomp.fortran/omp_atomic1.f90  -O1  execution test
>>> FAIL: libgomp.fortran/omp_atomic1.f90  -O2  execution test
>>> FAIL: libgomp.fortran/omp_atomic1.f90  -O3 -fomit-frame-pointer  execution test
>>> FAIL: libgomp.fortran/omp_atomic1.f90  -O3 -fomit-frame-pointer
>>> -funroll-all-loops -finline-functions  execution test
>>> FAIL: libgomp.fortran/omp_atomic1.f90  -O3 -fomit-frame-pointer
>>> -funroll-loops  execution test
>>> FAIL: libgomp.fortran/omp_atomic1.f90  -O3 -g  execution test
>>> FAIL: libgomp.fortran/omp_atomic1.f90  -Os  execution test
>>>
>>>> BTW: I still think that template should return the same address
>>>> structure as expansion, but this won't crash the compiler anymore.
>>
>> There is no non-DImode addresses in insn stream, so I doubt the bug is
>> due to my change.
>>
>
> I saw the same failures on x86-64:
>
> http://gcc.gnu.org/ml/gcc-testresults/2011-07/msg02224.html
>
> Can you take a look?

Sometimes, the compiler is really creative in inventing instructions:

(insn 47 46 49 7 (set (reg:SI 68 [ D.1686 ])
        (subreg:SI (plus:SF (reg:SF 159 [ D.1685 ])
                (reg:SF 159 [ D.1685 ])) 0)) omp_atomic1.f90:17 247 {*lea_2}
     (expr_list:REG_DEAD (reg:SF 159 [ D.1685 ])
        (nil)))

Really funny.

Uros.



More information about the Gcc-patches mailing list