Re: [PATCH 0/2] loongarch: improve code generation for integer division

2022-07-09 Thread Xi Ruoyao via Gcc-patches
On Sun, 2022-07-10 at 10:20 +0800, Lulu Cheng wrote: > > 在 2022/7/7 上午10:23, Xi Ruoyao 写道: > > We were generating some unnecessary instructions for integer > > division. > > These two patches improve the code generation to compile > > > > template T div(T a, T b) { return a / b; } > > > >

Re: [PATCH 0/2] loongarch: improve code generation for integer division

2022-07-09 Thread Lulu Cheng
在 2022/7/7 上午10:23, Xi Ruoyao 写道: We were generating some unnecessary instructions for integer division. These two patches improve the code generation to compile template T div(T a, T b) { return a / b; } into a single division instruction (along with a return instruction of course) as

Re: [PATCH 0/2] loongarch: improve code generation for integer division

2022-07-07 Thread Lulu Cheng
在 2022/7/7 上午10:23, Xi Ruoyao 写道: We were generating some unnecessary instructions for integer division. These two patches improve the code generation to compile template T div(T a, T b) { return a / b; } into a single division instruction (along with a return instruction of course) as

[PATCH 0/2] loongarch: improve code generation for integer division

2022-07-06 Thread Xi Ruoyao via Gcc-patches
We were generating some unnecessary instructions for integer division. These two patches improve the code generation to compile template T div(T a, T b) { return a / b; } into a single division instruction (along with a return instruction of course) as we expected for T in {int32_t, uint32_t