Re: [PATCH v2] LoongArch: Define LOGICAL_OP_NON_SHORT_CIRCUIT.

2023-12-12 Thread Xi Ruoyao
On Wed, 2023-12-13 at 14:32 +0800, Jiahao Xu wrote: > > 在 2023/12/13 下午2:21, Xi Ruoyao 写道: > > On Wed, 2023-12-13 at 14:17 +0800, Jiahao Xu wrote: > > > This test was extracted from the hot functions of 526.blender_r. Setting > > > LOGICAL_OP_NON_SHORT_CIRCUIT to 0 resulted in a 26% decrease in dy

Re: [PATCH v2] LoongArch: Define LOGICAL_OP_NON_SHORT_CIRCUIT.

2023-12-12 Thread Jiahao Xu
在 2023/12/13 下午2:21, Xi Ruoyao 写道: On Wed, 2023-12-13 at 14:17 +0800, Jiahao Xu wrote: This test was extracted from the hot functions of 526.blender_r. Setting LOGICAL_OP_NON_SHORT_CIRCUIT to 0 resulted in a 26% decrease in dynamic instruction count and a 13.4% performance improvement. After a

Re: [PATCH v2] LoongArch: Define LOGICAL_OP_NON_SHORT_CIRCUIT.

2023-12-12 Thread Xi Ruoyao
On Wed, 2023-12-13 at 14:17 +0800, Jiahao Xu wrote: > This test was extracted from the hot functions of 526.blender_r. Setting > LOGICAL_OP_NON_SHORT_CIRCUIT to 0 resulted in a 26% decrease in dynamic > instruction count and a 13.4% performance improvement. After applying > the patch mentioned a

Re: [PATCH v2] LoongArch: Define LOGICAL_OP_NON_SHORT_CIRCUIT.

2023-12-12 Thread Jiahao Xu
在 2023/12/13 上午2:27, Xi Ruoyao 写道: On Tue, 2023-12-12 at 20:39 +0800, Xi Ruoyao wrote: On Tue, 2023-12-12 at 19:59 +0800, Jiahao Xu wrote: I guess here the problem is floating-point compare instruction is much more costly than other instructions but the fact is not correctly modeled yet.  Cou

Re: [PATCH v2] LoongArch: Define LOGICAL_OP_NON_SHORT_CIRCUIT.

2023-12-12 Thread chenglulu
在 2023/12/13 上午2:27, Xi Ruoyao 写道: On Tue, 2023-12-12 at 20:39 +0800, Xi Ruoyao wrote: fld.s $f1,$r4,0 fld.s $f0,$r4,4 fld.s $f3,$r4,8 fld.s $f2,$r4,12 fcmp.slt.s $fcc1,$f0,$f3 fcmp.sgt.s $fcc0,$f1,$f2 movcf2gr$r

Re: [PATCH v2] LoongArch: Define LOGICAL_OP_NON_SHORT_CIRCUIT.

2023-12-12 Thread chenglulu
在 2023/12/13 上午2:27, Xi Ruoyao 写道: fld.s $f1,$r4,0 fld.s $f0,$r4,4 fld.s $f3,$r4,8 fld.s $f2,$r4,12 fcmp.slt.s $fcc1,$f0,$f3 fcmp.sgt.s $fcc0,$f1,$f2 movcf2gr$r13,$fcc1 movcf2gr$r12,$fcc0 o

Re: [PATCH v2] LoongArch: Define LOGICAL_OP_NON_SHORT_CIRCUIT.

2023-12-12 Thread Xi Ruoyao
On Tue, 2023-12-12 at 20:39 +0800, Xi Ruoyao wrote: > On Tue, 2023-12-12 at 19:59 +0800, Jiahao Xu wrote: > > > I guess here the problem is floating-point compare instruction is much > > > more costly than other instructions but the fact is not correctly > > > modeled yet.  Could you try > > > http

Re: [PATCH v2] LoongArch: Define LOGICAL_OP_NON_SHORT_CIRCUIT.

2023-12-12 Thread Xi Ruoyao
On Tue, 2023-12-12 at 19:59 +0800, Jiahao Xu wrote: > > I guess here the problem is floating-point compare instruction is much > > more costly than other instructions but the fact is not correctly > > modeled yet.  Could you try > > https://gcc.gnu.org/pipermail/gcc-patches/2023-December/640012.htm

Re: [PATCH v2] LoongArch: Define LOGICAL_OP_NON_SHORT_CIRCUIT.

2023-12-12 Thread Jiahao Xu
在 2023/12/12 下午7:26, Xi Ruoyao 写道: On Tue, 2023-12-12 at 19:14 +0800, Jiahao Xu wrote: Define LOGICAL_OP_NON_SHORT_CIRCUIT as 0, for a short-circuit branch, use the short-circuit operation instead of the non-short-circuit operation. This gives a 1.8% improvement in SPECCPU 2017 fprate on 3A60

Re: [PATCH v2] LoongArch: Define LOGICAL_OP_NON_SHORT_CIRCUIT.

2023-12-12 Thread Xi Ruoyao
On Tue, 2023-12-12 at 19:14 +0800, Jiahao Xu wrote: > Define LOGICAL_OP_NON_SHORT_CIRCUIT as 0, for a short-circuit branch, use the > short-circuit operation instead of the non-short-circuit operation. > > This gives a 1.8% improvement in SPECCPU 2017 fprate on 3A6000. In r14-15 we removed LOGICA

[PATCH v2] LoongArch: Define LOGICAL_OP_NON_SHORT_CIRCUIT.

2023-12-12 Thread Jiahao Xu
Define LOGICAL_OP_NON_SHORT_CIRCUIT as 0, for a short-circuit branch, use the short-circuit operation instead of the non-short-circuit operation. This gives a 1.8% improvement in SPECCPU 2017 fprate on 3A6000. gcc/ChangeLog: * config/loongarch/loongarch.h (LOGICAL_OP_NON_SHORT_CIRCUIT):