Re: [PATCH] RISC-V: avoid splitting small constant in i_extrabit pattern

2023-04-11 Thread Jeff Law via Gcc-patches
On 4/9/23 23:07, Lin Sinan via Gcc-patches wrote: From: Sinan Lin there is no need to split an xori/ori with an small constant. take the test case `int foo(int idx) { return idx|3; }` as an example, rv64im_zba generates: ori a0,a0,3 ret but, rv64im_zba_zbs generates:

Re: [PATCH] RISC-V: avoid splitting small constant in i_extrabit pattern

2023-04-11 Thread Jeff Law via Gcc-patches
On 4/10/23 14:59, Philipp Tomsich wrote: On Mon, 10 Apr 2023 at 17:57, Jeff Law wrote: On 4/9/23 23:07, Lin Sinan via Gcc-patches wrote: From: Sinan Lin there is no need to split an xori/ori with an small constant. take the test case `int foo(int idx) { return idx|3; }` as an example,

Re: [PATCH] RISC-V: avoid splitting small constant in i_extrabit pattern

2023-04-10 Thread Philipp Tomsich
On Mon, 10 Apr 2023 at 17:57, Jeff Law wrote: > > > > On 4/9/23 23:07, Lin Sinan via Gcc-patches wrote: > > From: Sinan Lin > > > > there is no need to split an xori/ori with an small constant. take the test > > case `int foo(int idx) { return idx|3; }` as an example, > > > > rv64im_zba generates

Re: [PATCH] RISC-V: avoid splitting small constant in i_extrabit pattern

2023-04-10 Thread Jeff Law via Gcc-patches
On 4/9/23 23:07, Lin Sinan via Gcc-patches wrote: From: Sinan Lin there is no need to split an xori/ori with an small constant. take the test case `int foo(int idx) { return idx|3; }` as an example, rv64im_zba generates: ori a0,a0,3 ret but, rv64im_zba_zbs generates:

[PATCH] RISC-V: avoid splitting small constant in i_extrabit pattern

2023-04-09 Thread Lin Sinan via Gcc-patches
From: Sinan Lin there is no need to split an xori/ori with an small constant. take the test case `int foo(int idx) { return idx|3; }` as an example, rv64im_zba generates: ori a0,a0,3 ret but, rv64im_zba_zbs generates: ori a0,a0,1 ori a0,a0,2 re