On Tue, Aug 22, 2023 at 09:35:44PM +0800, Hongtao Liu wrote: > Ok, then we can't avoid TARGET_AVX10_1 in those existing 256/128-bit > evex instruction patterns.
Why? Internally for md etc. purposes, we should have the current TARGET_AVX512* etc. ISA flags, plus one new one, whatever we call it (TARGET_EVEX512 even if it is not completely descriptive because of kandq etc., or some other name) which says if 512-bit vector modes can be used, if g modifier can be used, if the 64-bit mask operations can be used etc. Plus, if AVX10.1 contains any instructions not covered in the preexisting TARGET_AVX512* sets, TARGET_AVX10_1 which covers that delta, otherwise keep -mavx10.1 just as an command line option which enables/disables other stuff. The current common/config/i386/i386-common.cc OPTION_MASK_ISA*SET* would be like now, except that the current AVX512* sets imply also EVEX512/whatever it will be called, that option itself enables nothing (or TARGET_AVX512F), and unsetting it doesn't disable all the TARGET_AVX512*. -mavx10.1 would enable the AVX512* sets without EVEX512/whatever. At the end of the option processing, if EVEX512/whatever is set but TARGET_AVX512VL is not, disable TARGET_AVX512F with all its dependencies, because VL is a precondition of 128/256-bit EVEX and if 512-bit EVEX is not enabled, there is nothing left. Jakub