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: One more path to fix PR70478


On Tue, Apr 11, 2017 at 5:26 PM, Christophe Lyon
<christophe.lyon@linaro.org> wrote:
> On 11 April 2017 at 17:42, Vladimir Makarov <vmakarov@redhat.com> wrote:
>>
>>
>> On 04/11/2017 03:30 AM, Christophe Lyon wrote:
>>>
>>> Hi Vladimir,
>>>
>>> On 10 April 2017 at 17:05, Vladimir Makarov <vmakarov@redhat.com> wrote:
>>>>
>>>>    This is the second try to fix
>>>>
>>>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70478
>>>>
>>>>    The first try patch triggered a latent bug and broke one Fortran
>>>> testcase
>>>> on x86-64.
>>>>
>>>>    The patch was successfully bootstrapped on x86-64 and tested on
>>>> x86-64,
>>>> ppc64, and aarch64.
>>>>
>>>>    Committed as rev. 246808.
>>>>
>>>>
>>> I would have to re--run the build/test manually to get the generated
>>> code, let me know if it's needed.
>>
>> Yes, Christophe.  It would be helpful.  I've tried to reproduce it but I
>> don't see the difference in the generated code.
>>
>
> Here is what I observed (the "with-patch file is with your commit r246808,
> the other is r246807)
>
> --- armv8_2-fp16-move-1.s       2017-04-11 16:23:46.795264234 +0000
> +++ armv8_2-fp16-move-1.s.with-patch    2017-04-11 15:54:52.563210963 +0000
> @@ -37,8 +37,8 @@
>         @ frame_needed = 0, uses_anonymous_args = 0
>         @ link register save eliminated.
>         lsl     r1, r1, #1
> -       add     r3, r0, r1
> -       vld1.16 {d0[0]}, [r3]
> +       ldrh    r3, [r0, r1]    @ __fp16
> +       vmov.f16        s0, r3  @ __fp16
>         bx      lr
>         .size   test_load_2, .-test_load_2
>         .align  2
> @@ -64,9 +64,9 @@
>         @ args = 0, pretend = 0, frame = 0
>         @ frame_needed = 0, uses_anonymous_args = 0
>         @ link register save eliminated.
> +       vmov.f16        r3, s0  @ __fp16
>         lsl     r1, r1, #1
> -       add     r3, r0, r1
> -       vst1.16 {d0[0]}, [r3]
> +       strh    r3, [r0, r1]    @ __fp16
>         bx      lr
>         .size   test_store_2, .-test_store_2
>         .align  2
>

That's actually bad because we've now introduced additional moves
between the integer and FP register files. It could be something in
the backend but this is worth investigating further

Ramana

>
> Christophe


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