Re: [PATCH] LoongArch: Increase division costs

2024-03-31 Thread Xi Ruoyao
On Mon, 2024-04-01 at 10:22 +0800, chenglulu wrote: > > 在 2024/4/1 上午9:29, Xi Ruoyao 写道: > > On Fri, 2024-03-29 at 09:23 +0800, chenglulu wrote: > > > > > I tested spec2006. In the floating-point program, the test items with > > > large > > > > > > fluctuations are removed, and the rest is basi

Re: [PATCH] LoongArch: Increase division costs

2024-03-31 Thread chenglulu
在 2024/4/1 上午9:29, Xi Ruoyao 写道: On Fri, 2024-03-29 at 09:23 +0800, chenglulu wrote: I tested spec2006. In the floating-point program, the test items with large fluctuations are removed, and the rest is basically unchanged. The fixed-point 464.h264ref (10,10) was 6.7% higher than (5,5) and

Re: [PATCH] LoongArch: Increase division costs

2024-03-31 Thread Xi Ruoyao
On Fri, 2024-03-29 at 09:23 +0800, chenglulu wrote: > I tested spec2006. In the floating-point program, the test items with large > > fluctuations are removed, and the rest is basically unchanged. > > The fixed-point 464.h264ref (10,10) was 6.7% higher than (5,5) and (10,22). So IIUC (10,10) is

Re: [PATCH] LoongArch: Increase division costs

2024-03-28 Thread chenglulu
在 2024/3/27 下午8:42, Xi Ruoyao 写道: On Wed, 2024-03-27 at 18:39 +0800, Xi Ruoyao wrote: On Wed, 2024-03-27 at 10:38 +0800, chenglulu wrote: 在 2024/3/26 下午5:48, Xi Ruoyao 写道: The latency of LA464 and LA664 division instructions depends on the input.  When I updated the costs in r14-6642, I unin

Re: [PATCH] LoongArch: Increase division costs

2024-03-27 Thread chenglulu
在 2024/3/27 下午8:42, Xi Ruoyao 写道: On Wed, 2024-03-27 at 18:39 +0800, Xi Ruoyao wrote: On Wed, 2024-03-27 at 10:38 +0800, chenglulu wrote: 在 2024/3/26 下午5:48, Xi Ruoyao 写道: The latency of LA464 and LA664 division instructions depends on the input.  When I updated the costs in r14-6642, I unin

Re: [PATCH] LoongArch: Increase division costs

2024-03-27 Thread Xi Ruoyao
On Wed, 2024-03-27 at 18:39 +0800, Xi Ruoyao wrote: > On Wed, 2024-03-27 at 10:38 +0800, chenglulu wrote: > > > > 在 2024/3/26 下午5:48, Xi Ruoyao 写道: > > > The latency of LA464 and LA664 division instructions depends on the > > > input.  When I updated the costs in r14-6642, I unintentionally set th

Re: [PATCH] LoongArch: Increase division costs

2024-03-27 Thread Richard Biener
On Wed, Mar 27, 2024 at 1:20 PM Xi Ruoyao wrote: > > On Wed, 2024-03-27 at 08:54 +0100, Richard Biener wrote: > > On Tue, Mar 26, 2024 at 10:52 AM Xi Ruoyao wrote: > > > > > > The latency of LA464 and LA664 division instructions depends on the > > > input. When I updated the costs in r14-6642, I

Re: [PATCH] LoongArch: Increase division costs

2024-03-27 Thread Xi Ruoyao
On Wed, 2024-03-27 at 08:54 +0100, Richard Biener wrote: > On Tue, Mar 26, 2024 at 10:52 AM Xi Ruoyao wrote: > > > > The latency of LA464 and LA664 division instructions depends on the > > input.  When I updated the costs in r14-6642, I unintentionally set the > > division costs to the best-case

Re: [PATCH] LoongArch: Increase division costs

2024-03-27 Thread Xi Ruoyao
On Wed, 2024-03-27 at 10:38 +0800, chenglulu wrote: > > 在 2024/3/26 下午5:48, Xi Ruoyao 写道: > > The latency of LA464 and LA664 division instructions depends on the > > input.  When I updated the costs in r14-6642, I unintentionally set the > > division costs to the best-case latency (when the first

Re: [PATCH] LoongArch: Increase division costs

2024-03-27 Thread Richard Biener
On Tue, Mar 26, 2024 at 10:52 AM Xi Ruoyao wrote: > > The latency of LA464 and LA664 division instructions depends on the > input. When I updated the costs in r14-6642, I unintentionally set the > division costs to the best-case latency (when the first operand is 0). > Per a recent discussion [1]

Re: [PATCH] LoongArch: Increase division costs

2024-03-26 Thread chenglulu
在 2024/3/26 下午5:48, Xi Ruoyao 写道: The latency of LA464 and LA664 division instructions depends on the input. When I updated the costs in r14-6642, I unintentionally set the division costs to the best-case latency (when the first operand is 0). Per a recent discussion [1] we should use "somethi

[PATCH] LoongArch: Increase division costs

2024-03-26 Thread Xi Ruoyao
The latency of LA464 and LA664 division instructions depends on the input. When I updated the costs in r14-6642, I unintentionally set the division costs to the best-case latency (when the first operand is 0). Per a recent discussion [1] we should use "something sensible" instead of it. Use the a