Re: [PATCH] [i386] GLC tuning: Break false dependency for dest register.

2022-01-15 Thread Hongtao Liu via Gcc-patches
On Sun, Jan 16, 2022 at 12:44 AM Uros Bizjak via Gcc-patches wrote: > > On Sat, Jan 15, 2022 at 5:39 PM Hongyu Wang wrote: > > > > Thanks for the suggestion, here is the updated patch that survived > > bootstrap/regtest. > > LGTM for me, but please get the final approval from Hongtao. > Ok, thank

Re: [PATCH] [i386] GLC tuning: Break false dependency for dest register.

2022-01-15 Thread Uros Bizjak via Gcc-patches
On Sat, Jan 15, 2022 at 5:39 PM Hongyu Wang wrote: > > Thanks for the suggestion, here is the updated patch that survived > bootstrap/regtest. LGTM for me, but please get the final approval from Hongtao. Thanks, Uros. > > Please note reg_mentioned_p in the above condition. This function > > ret

Re: [PATCH] [i386] GLC tuning: Break false dependency for dest register.

2022-01-15 Thread Hongyu Wang via Gcc-patches
_AVX512F > - rename "mask3_dest_false_dep_attr" to "mask3_false_dep_for_avx512f_cond" > > Please note reg_mentioned_p in the above condition. This function > returns nonzero if register op0 appears somewhere within op1 and is > critical for the correct operation of your patch. > > Uros. From ac

Re: [PATCH] [i386] GLC tuning: Break false dependency for dest register.

2022-01-14 Thread Uros Bizjak via Gcc-patches
On Fri, Jan 14, 2022 at 2:44 PM Hongyu Wang wrote: > > > Are there any technical obstacles to introduce subst to > > define_{,insn_and_}split? > > gccint says: define_subst can be used only in define_insn and > define_expand, it cannot be used in other expressions (e.g. in > define_insn_and_split)

Re: [PATCH] [i386] GLC tuning: Break false dependency for dest register.

2022-01-14 Thread Hongyu Wang via Gcc-patches
> Are there any technical obstacles to introduce subst to > define_{,insn_and_}split? gccint says: define_subst can be used only in define_insn and define_expand, it cannot be used in other expressions (e.g. in define_insn_and_split). I have no idea how to implement it in current infrastructure.

Re: [PATCH] [i386] GLC tuning: Break false dependency for dest register.

2022-01-14 Thread Uros Bizjak via Gcc-patches
On Fri, Jan 14, 2022 at 7:11 AM Hongyu Wang wrote: > > > > No, the approach is wrong. You have to solve output clearing on RTL > > > level, please look at how e.g. tzcnt false dep is solved: > > > > Actually we have considered such approach before, but we found we need > > to break original define

Re: [PATCH] [i386] GLC tuning: Break false dependency for dest register.

2022-01-14 Thread Uros Bizjak via Gcc-patches
On Fri, Jan 14, 2022 at 6:46 AM Hongyu Wang wrote: > > > No, the approach is wrong. You have to solve output clearing on RTL > > level, please look at how e.g. tzcnt false dep is solved: > > Actually we have considered such approach before, but we found we need > to break original define_insn to r

Re: [PATCH] [i386] GLC tuning: Break false dependency for dest register.

2022-01-13 Thread Hongyu Wang via Gcc-patches
> > No, the approach is wrong. You have to solve output clearing on RTL > > level, please look at how e.g. tzcnt false dep is solved: > > Actually we have considered such approach before, but we found we need > to break original define_insn to remove the mask/rounding subst, > since define_split co

Re: [PATCH] [i386] GLC tuning: Break false dependency for dest register.

2022-01-13 Thread Hongyu Wang via Gcc-patches
> No, the approach is wrong. You have to solve output clearing on RTL > level, please look at how e.g. tzcnt false dep is solved: Actually we have considered such approach before, but we found we need to break original define_insn to remove the mask/rounding subst, since define_split could not ado

Re: [PATCH] [i386] GLC tuning: Break false dependency for dest register.

2022-01-12 Thread Uros Bizjak via Gcc-patches
On Thu, Jan 13, 2022 at 8:28 AM Hongyu Wang wrote: > > From: wwwhhhyyy > > Hi, > > For GoldenCove micro-architecture, force insert zero-idiom in asm > template to break false dependency of dest register for several insns. > > The related insns are: > > VPERM/D/Q/PS/PD > VRANGEPD/PS/SD/SS > VGETMA

[PATCH] [i386] GLC tuning: Break false dependency for dest register.

2022-01-12 Thread Hongyu Wang via Gcc-patches
From: wwwhhhyyy Hi, For GoldenCove micro-architecture, force insert zero-idiom in asm template to break false dependency of dest register for several insns. The related insns are: VPERM/D/Q/PS/PD VRANGEPD/PS/SD/SS VGETMANTSS/SD/SH VGETMANDPS/PD - mem version only VPMULLQ VFMULCSH/PH VFCMULCSH/