This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, i386] false dependencies fix
- From: Jeff Law <law at redhat dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Cc: "Nesterovskiy, Alexander" <alexander dot nesterovskiy at intel dot com>
- Date: Thu, 28 Jun 2018 07:56:29 -0600
- Subject: Re: [patch, i386] false dependencies fix
- References: <CAFULd4bazoZpD27WwsQ5_tkZ=P0E7o_goNqjAqo+9Mx5+yKSZA@mail.gmail.com>
On 06/28/2018 01:16 AM, Uros Bizjak wrote:
> Hello!
>
>>> --- i386.md (revision 259756)
>>> +++ i386.md (working copy)
>>> @@ -3547,7 +3547,7 @@
>>> {
>>> case MODE_DF:
>>> if (TARGET_AVX && REG_P (operands[0]) && REG_P (operands[1]))
>>> - return "vmovsd\t{%1, %0, %0|%0, %0, %1}";
>>> + return "%vmovsd\t{%d1, %0|%0, %d1}";
>>> return "%vmovsd\t{%1, %0|%0, %1}";
>>>
>>> case MODE_V4SF:
>>> @@ -3748,7 +3748,7 @@
>>> {
>>> case MODE_SF:
>>> if (TARGET_AVX && REG_P (operands[0]) && REG_P (operands[1]))
>>> - return "vmovss\t{%1, %0, %0|%0, %0, %1}";
>>> + return "%vmovss\t{%d1, %0|%0, %d1}";
>>> return "%vmovss\t{%1, %0|%0, %1}";
>> So what I'm confused about is in the original output template operand 0
>> is duplicated. In the new template operand 1 is duplicated.
>>
>> Presumably what you're trying to accomplish is avoiding a false read on
>> operand 0 (the destination)? Can you please confirm?
>
>> Knowing that should also help me evaluate the changes to recp and rsqrt
>> since they're being changed to the same style encoding when operating
>> strictly on registers.
>
> Please don't change "v" -> "%v" for TARGET_AVX templates. We know that
> in this case, all insn mnemonics are prefixed with "v".
ACK on that Uros -- I'd convinced myself that v->%v for TARGET_AVX
couldn't hurt anything since we already had the v prefix in place. I'm
happy to ensure this follows your preferred convention.
I was mostly trying to make sure I understood the other aspects of the
proposed change.
Cheers,
jeff