Pushed: [GCC14 PATCH v2] LoongArch: Optimize additions with immediates

2023-04-17 Thread Xi Ruoyao via Gcc-patches
Pushed r14-19. On Tue, 2023-04-04 at 17:09 +0800, Lulu Cheng wrote: > > 在 2023/4/4 下午4:38, Xi Ruoyao 写道: > > 1. Use addu16i.d for TARGET_64BIT and suitable immediates. > > 2. Split one addition with immediate into two addu16i.d or > > addi.{d/w} > >     instructions if possible.  This can avoid u

Re: [GCC14 PATCH v2] LoongArch: Optimize additions with immediates

2023-04-04 Thread Lulu Cheng
在 2023/4/4 下午4:38, Xi Ruoyao 写道: 1. Use addu16i.d for TARGET_64BIT and suitable immediates. 2. Split one addition with immediate into two addu16i.d or addi.{d/w} instructions if possible. This can avoid using a temp register w/o increase the count of instructions. Inspired by https://

[GCC14 PATCH v2] LoongArch: Optimize additions with immediates

2023-04-04 Thread Xi Ruoyao via Gcc-patches
1. Use addu16i.d for TARGET_64BIT and suitable immediates. 2. Split one addition with immediate into two addu16i.d or addi.{d/w} instructions if possible. This can avoid using a temp register w/o increase the count of instructions. Inspired by https://reviews.llvm.org/D143710 and https://re