[PATCH 4/5] x86/APX: extend SSE2AVX coverage
Jan Beulich
jbeulich@suse.com
Wed Apr 3 10:22:39 GMT 2024
On 03.04.2024 11:17, Jiang, Haochen wrote:
>
>
>> On 03.04.2024 09:59, Cui, Lili wrote:
>>>>> This conversion is clever, although the mnemonic has changed, but
>>>> considering it is controlled by -msse2avx, maybe we can mention in the
>>>> option that it might change the mnemonic. Judging from the option name
>>>> alone, it is difficult for users to predict that the mnemonic will change
>>>> (traditionally, it seems to just add V).
>>>>
>>>> I don't think doc adjustment is needed here. We already have at least one
>>>> example where the mnemonic also changes: CVTPI2PD -> VCVTDQ2PD.
>>>>
>>>
>>> Oh, there has been such a conversion before. Another thing that comes to
>> mind is that sse2avx was previously used to support sse to vex conversion.
>> This option works on machines that don't support evex. We now extend sse to
>> evex, which makes this option unavailable on machines that do not support
>> the evex instruction (e.g. hybrid machines like Alderlake). Do you think we
>> should add a new option?
>>
>> That's a question I've tentatively answered with "No". SSE => VEX requires
>> systems supporting AVX. SSE-with-eGPR requires systems with APX.
>> SSE-with-eGPR => EVEX similarly can rely on APX being there, and I expect
>> all such systems will support at least AVX10/128. If that is deemed a wrong
>> assumption, then indeed we may need to consider adding a new option (but
>> not -msse2avx512 as you suggest further down, as SSE only ever covers 128-
>> bit operations; -msse2avx10 maybe).
>
> Just to clarify one thing, is the behavior change for -msse2avx happen only with
> EGPRs?
Yes, or if the programmer uses {evex}.
Jan
> If answer is no, no matter the assumption is right or not, I suppose the problem is
> if we change the behavior for legacy -msse2avx to also promote to EVEX silently,
> from my understanding, it will cause on current hybrid clients and upcoming Sierra
> Forest and Clearwater Forest, EVEX instructions will appear under these platforms,
> which is not aligned with previous behavior for -msse2avx. Eventually it will crash
> since on those machines, there are no EVEX instructions. It might be a surprise to
> users.
>
> Thx,
> Haochen
More information about the Binutils
mailing list