[0/4] x86: fold a number of VEX and EVEX templates

Message ID 0690c179-ac98-d127-5ff4-b5abb725b6ae@suse.com
Headers
Series x86: fold a number of VEX and EVEX templates |

Message

Jan Beulich Sept. 15, 2023, 8:46 a.m. UTC
  The last two patches are explicitly RFC, for having a possibly unwanted
side effect.

1: fold certain VEX and EVEX templates
2: fold VAES/VPCLMULQDQ VEX and EVEX templates
3: fold FMA VEX and EVEX templates
4: fold F16C VEX and EVEX templates

Jan
  

Comments

Hongtao Liu Sept. 18, 2023, 1:58 a.m. UTC | #1
On Fri, Sep 15, 2023 at 4:46 PM Jan Beulich via Binutils
<binutils@sourceware.org> wrote:
>
> The last two patches are explicitly RFC, for having a possibly unwanted
> side effect.
We're about to send out APX patches, @Lili Cui  cloud you take a look
at the series?
>
> 1: fold certain VEX and EVEX templates
> 2: fold VAES/VPCLMULQDQ VEX and EVEX templates
> 3: fold FMA VEX and EVEX templates
> 4: fold F16C VEX and EVEX templates
>
> Jan
  
Frager, Neal via Binutils Sept. 18, 2023, 5:47 a.m. UTC | #2
> -----Original Message-----
> From: Hongtao Liu <crazylht@gmail.com>
> Sent: Monday, September 18, 2023 9:58 AM
> To: Cui, Lili <lili.cui@intel.com>
> Cc: Binutils <binutils@sourceware.org>; H.J. Lu <hjl.tools@gmail.com>;
> Beulich, Jan <JBeulich@suse.com>
> Subject: Re: [PATCH 0/4] x86: fold a number of VEX and EVEX templates
> 
> On Fri, Sep 15, 2023 at 4:46 PM Jan Beulich via Binutils
> <binutils@sourceware.org> wrote:
> >
> > The last two patches are explicitly RFC, for having a possibly
> > unwanted side effect.
> We're about to send out APX patches, @Lili Cui  cloud you take a look at the
> series?

Since APX only needs to promote the VEX instructions without corresponding EVEX, these folding VEX and EVEX template patches has no effect on our internal APX patches. Since Jan has some predictions on APX. I will send some of APX AFC patches, which need Jan to help review, thanks.

Lili.
> >
> > 1: fold certain VEX and EVEX templates
> > 2: fold VAES/VPCLMULQDQ VEX and EVEX templates
> > 3: fold FMA VEX and EVEX templates
> > 4: fold F16C VEX and EVEX templates
> >
> > Jan
> 
> 
> 
> --
> BR,
> Hongtao
  
Jan Beulich Sept. 18, 2023, 9:38 a.m. UTC | #3
On 18.09.2023 07:47, Cui, Lili wrote:
>> -----Original Message-----
>> From: Hongtao Liu <crazylht@gmail.com>
>> Sent: Monday, September 18, 2023 9:58 AM
>>
>> On Fri, Sep 15, 2023 at 4:46 PM Jan Beulich via Binutils
>> <binutils@sourceware.org> wrote:
>>>
>>> The last two patches are explicitly RFC, for having a possibly
>>> unwanted side effect.
>> We're about to send out APX patches, @Lili Cui  cloud you take a look at the
>> series?
> 
> Since APX only needs to promote the VEX instructions without corresponding EVEX, these folding VEX and EVEX template patches has no effect on our internal APX patches.

I don't follow: As soon as you have an insn with both a VEX and an EVEX encoding,
there can be potential for folding (ideally right when APX is being introduced,
rather than once again leaving it to me to clean up later).

Jan
  
Frager, Neal via Binutils Sept. 18, 2023, 11:18 a.m. UTC | #4
> -----Original Message-----
> From: Jan Beulich <jbeulich@suse.com>
> Sent: Monday, September 18, 2023 5:38 PM
> To: Cui, Lili <lili.cui@intel.com>
> Cc: Binutils <binutils@sourceware.org>; H.J. Lu <hjl.tools@gmail.com>;
> Hongtao Liu <crazylht@gmail.com>
> Subject: Re: [PATCH 0/4] x86: fold a number of VEX and EVEX templates
> 
> On 18.09.2023 07:47, Cui, Lili wrote:
> >> -----Original Message-----
> >> From: Hongtao Liu <crazylht@gmail.com>
> >> Sent: Monday, September 18, 2023 9:58 AM
> >>
> >> On Fri, Sep 15, 2023 at 4:46 PM Jan Beulich via Binutils
> >> <binutils@sourceware.org> wrote:
> >>>
> >>> The last two patches are explicitly RFC, for having a possibly
> >>> unwanted side effect.
> >> We're about to send out APX patches, @Lili Cui  cloud you take a look
> >> at the series?
> >
> > Since APX only needs to promote the VEX instructions without
> corresponding EVEX, these folding VEX and EVEX template patches has no
> effect on our internal APX patches.
> 
> I don't follow: As soon as you have an insn with both a VEX and an EVEX
> encoding, there can be potential for folding (ideally right when APX is being
> introduced, rather than once again leaving it to me to clean up later).

Oh, I got your point. After your patches checked in,  I will fold VEX and EVEX  after we have promoted-EVEX. 

Thanks,
Lili.

> 
> Jan
  
Jan Beulich Sept. 18, 2023, 11:49 a.m. UTC | #5
On 18.09.2023 13:18, Cui, Lili wrote:
>> -----Original Message-----
>> From: Jan Beulich <jbeulich@suse.com>
>> Sent: Monday, September 18, 2023 5:38 PM
>> To: Cui, Lili <lili.cui@intel.com>
>> Cc: Binutils <binutils@sourceware.org>; H.J. Lu <hjl.tools@gmail.com>;
>> Hongtao Liu <crazylht@gmail.com>
>> Subject: Re: [PATCH 0/4] x86: fold a number of VEX and EVEX templates
>>
>> On 18.09.2023 07:47, Cui, Lili wrote:
>>>> -----Original Message-----
>>>> From: Hongtao Liu <crazylht@gmail.com>
>>>> Sent: Monday, September 18, 2023 9:58 AM
>>>>
>>>> On Fri, Sep 15, 2023 at 4:46 PM Jan Beulich via Binutils
>>>> <binutils@sourceware.org> wrote:
>>>>>
>>>>> The last two patches are explicitly RFC, for having a possibly
>>>>> unwanted side effect.
>>>> We're about to send out APX patches, @Lili Cui  cloud you take a look
>>>> at the series?
>>>
>>> Since APX only needs to promote the VEX instructions without
>> corresponding EVEX, these folding VEX and EVEX template patches has no
>> effect on our internal APX patches.
>>
>> I don't follow: As soon as you have an insn with both a VEX and an EVEX
>> encoding, there can be potential for folding (ideally right when APX is being
>> introduced, rather than once again leaving it to me to clean up later).
> 
> Oh, I got your point. After your patches checked in,  I will fold VEX and EVEX  after we have promoted-EVEX. 

Just fyi that I'll likely need a v2 of those patches. While thinking of how
to remove the odd behavior of the latter two patches, I also spotted an
anomaly (even if largely benign right now) in the first one. I'll have to
think about that some more (just to be reasonably sure not to introduce yet
new quirks), so I won't post right away.

Jan
  
Frager, Neal via Binutils Sept. 18, 2023, 12:03 p.m. UTC | #6
> -----Original Message-----
> From: Jan Beulich <jbeulich@suse.com>
> Sent: Monday, September 18, 2023 7:50 PM
> To: Cui, Lili <lili.cui@intel.com>
> Cc: Binutils <binutils@sourceware.org>; H.J. Lu <hjl.tools@gmail.com>;
> Hongtao Liu <crazylht@gmail.com>
> Subject: Re: [PATCH 0/4] x86: fold a number of VEX and EVEX templates
> 
> On 18.09.2023 13:18, Cui, Lili wrote:
> >> -----Original Message-----
> >> From: Jan Beulich <jbeulich@suse.com>
> >> Sent: Monday, September 18, 2023 5:38 PM
> >> To: Cui, Lili <lili.cui@intel.com>
> >> Cc: Binutils <binutils@sourceware.org>; H.J. Lu
> >> <hjl.tools@gmail.com>; Hongtao Liu <crazylht@gmail.com>
> >> Subject: Re: [PATCH 0/4] x86: fold a number of VEX and EVEX templates
> >>
> >> On 18.09.2023 07:47, Cui, Lili wrote:
> >>>> -----Original Message-----
> >>>> From: Hongtao Liu <crazylht@gmail.com>
> >>>> Sent: Monday, September 18, 2023 9:58 AM
> >>>>
> >>>> On Fri, Sep 15, 2023 at 4:46 PM Jan Beulich via Binutils
> >>>> <binutils@sourceware.org> wrote:
> >>>>>
> >>>>> The last two patches are explicitly RFC, for having a possibly
> >>>>> unwanted side effect.
> >>>> We're about to send out APX patches, @Lili Cui  cloud you take a
> >>>> look at the series?
> >>>
> >>> Since APX only needs to promote the VEX instructions without
> >> corresponding EVEX, these folding VEX and EVEX template patches has
> >> no effect on our internal APX patches.
> >>
> >> I don't follow: As soon as you have an insn with both a VEX and an
> >> EVEX encoding, there can be potential for folding (ideally right when
> >> APX is being introduced, rather than once again leaving it to me to clean up
> later).
> >
> > Oh, I got your point. After your patches checked in,  I will fold VEX and EVEX
> after we have promoted-EVEX.
> 
> Just fyi that I'll likely need a v2 of those patches. While thinking of how to
> remove the odd behavior of the latter two patches, I also spotted an anomaly
> (even if largely benign right now) in the first one. I'll have to think about that
> some more (just to be reasonably sure not to introduce yet new quirks), so I
> won't post right away.

Ok, your patches will enter the mainline before the APX patch, I will pay attention to this place. 

Thanks.
Lili.

> 
> Jan