On Thu, Aug 10, 2023 at 7:13 PM Richard Biener <richard.guent...@gmail.com> wrote: > > On Thu, Aug 10, 2023 at 11:16 AM Hongtao Liu <crazy...@gmail.com> wrote: > > > > On Thu, Aug 10, 2023 at 4:07 PM Hongtao Liu <crazy...@gmail.com> wrote: > > > > > > On Thu, Aug 10, 2023 at 3:55 PM Hongtao Liu <crazy...@gmail.com> wrote: > > > > > > > > On Thu, Aug 10, 2023 at 3:49 PM Richard Biener via Gcc-patches > > > > <gcc-patches@gcc.gnu.org> wrote: > > > > > > > > > > On Thu, Aug 10, 2023 at 9:42 AM Uros Bizjak <ubiz...@gmail.com> wrote: > > > > > > > > > > > > On Thu, Aug 10, 2023 at 9:40 AM Richard Biener > > > > > > <richard.guent...@gmail.com> wrote: > > > > > > > > > > > > > > On Thu, Aug 10, 2023 at 3:13 AM liuhongt <hongtao....@intel.com> > > > > > > > wrote: > > > > > > > > > > > > > > > > Currently we have 3 different independent tunes for gather > > > > > > > > "use_gather,use_gather_2parts,use_gather_4parts", > > > > > > > > similar for scatter, there're > > > > > > > > "use_scatter,use_scatter_2parts,use_scatter_4parts" > > > > > > > > > > > > > > > > The patch support 2 standardizing options to enable/disable > > > > > > > > vectorization for all gather/scatter instructions. The options > > > > > > > > is > > > > > > > > interpreted by driver to 3 tunes. > > > > > > > > > > > > > > > > bootstrapped and regtested on x86_64-pc-linux-gnu. > > > > > > > > Ok for trunk? > > > > > > > > > > > > > > I think -mgather/-mscatter are too close to -mfma suggesting they > > > > > > > enable part of an ISA but they won't disable the use of intrinsics > > > > > > > or enable gather/scatter on CPUs where the ISA doesn't have them. > > > > > > > > > > > > > > May I suggest to invent a more generic "short-cut" to > > > > > > > -mtune-ctrl=^X, maybe -mdisable=X? And for gather/scatter > > > > > > > tunables add ^use_gather_any to cover all cases? (or > > > > > > > change what use_gather controls - it seems we changed its > > > > > > > meaning before, and instead add use_gather_8parts and > > > > > > > use_gather_16parts) > > > > > > > > > > > > > > That is, what's the point of this? > > The point of this is to keep consistent between GCC, LLVM, and > > ICX(Intel® oneAPI DPC++/C++ Compiler) . > > LLVM,ICX will support that option. > > GCC has very many options that are not the same as LLVM or ICX, > I don't see a good reason to special case this one. As said, it's > a very bad name IMHO. In general terms, yes. But this is a new option, shouldn't it be better to be consistent? And the problem with mfma is mainly that the cpuid is just called fma, but we don't have a cpuid called gather/scatter, with clear document that the option is only for auto-vectorization, -m{no-,}{gather,scattter} looks fine to me. As Honza mentioned, users need to option to turn on/off gather/scatter auto vectorization, I don't think they will expect the option is also valid for intrinsic. If -mtune-crtl= is not suitable for direct exposure to usersusers, then the original proposal should be ok? Developers will manintain the relation between mgather/scatter and -mtune-crtl=XXX to make it consistent between GCC versions. > > Richard. > > > > > > > > > > > > > https://www.phoronix.com/review/downfall > > > > > > > > > > > > that caused: > > > > > > > > > > > > https://www.phoronix.com/review/intel-downfall-benchmarks > > > > > > > > > > Yes, I know. But there's -mtune-ctl=<very long line> doing the trick. > > > > > GCC 11 had only 'use_gather', covering all number of lanes. I suggest > > > > > to resurrect that behavior and add use_gather_8+parts (or two, IIRC > > > > > gather works only on SI/SFmode or larger). > > > > > > > > > > Then -mtune-ctl=^use_gather works which I think is nice enough? > > > > So basically, -mtune-ctrl=^use_gather is used to turn off all gather > > > > vectorization, but -mtune-ctrl=use_gather doesn't turn on all of them? > > > > We don't have an extrat explicit flag for target tune, just single bit > > > > - ix86_tune_features[X86_TUNE_USE_GATHER] > > > Looks like I can handle it specially in parse_mtune_ctrl_str, let me try. > > > > > > > > > > Richard. > > > > > > > > > > > Uros. > > > > > > > > > > > > > > > > -- > > > > BR, > > > > Hongtao > > > > > > > > > > > > -- > > > BR, > > > Hongtao > > > > > > > > -- > > BR, > > Hongtao
-- BR, Hongtao