pushed: [PATCH] LoongArch: implement count_{leading,trailing}_zeros

2022-10-13 Thread Xi Ruoyao via Gcc-patches
On Thu, 2022-10-13 at 16:43 +0800, Lulu Cheng wrote: > Looks good to me! > > Thanks! Pushed r13-3269. > > 在 2022/10/12 下午10:23, Xi Ruoyao 写道: > > LoongArch always support clz and ctz instructions, so we can always > > use > > __builtin_{clz,ctz} for count_{leading,trailing}_zeros.  This > > imp

Re: [PATCH] LoongArch: implement count_{leading,trailing}_zeros

2022-10-13 Thread Lulu Cheng
Looks good to me! Thanks! 在 2022/10/12 下午10:23, Xi Ruoyao 写道: LoongArch always support clz and ctz instructions, so we can always use __builtin_{clz,ctz} for count_{leading,trailing}_zeros. This improves the code of libgcc, and also benefits Glibc once we merge longlong.h there. Bootstrapped

[PATCH] LoongArch: implement count_{leading,trailing}_zeros

2022-10-12 Thread Xi Ruoyao via Gcc-patches
LoongArch always support clz and ctz instructions, so we can always use __builtin_{clz,ctz} for count_{leading,trailing}_zeros. This improves the code of libgcc, and also benefits Glibc once we merge longlong.h there. Bootstrapped and regtested on loongarch64-linux-gnu. include/ChangeLog: