Re: Ping: [PATCH v2] LoongArch: Tweak IOR rtx_cost for bstrins

2024-06-26 Thread Lulu Cheng
LGTM! Thanks very much! 在 2024/6/26 下午3:53, Xi Ruoyao 写道: Ping. On Sun, 2024-06-16 at 01:50 +0800, Xi Ruoyao wrote: Consider     c &= 0xfff;     a &= ~0xfff;     b &= ~0xfff;     a |= c;     b |= c; This can be done with 2 bstrins instructions.  But we need to recognize it in loongarc

Ping: [PATCH v2] LoongArch: Tweak IOR rtx_cost for bstrins

2024-06-26 Thread Xi Ruoyao
Ping. On Sun, 2024-06-16 at 01:50 +0800, Xi Ruoyao wrote: > Consider > >     c &= 0xfff; >     a &= ~0xfff; >     b &= ~0xfff; >     a |= c; >     b |= c; > > This can be done with 2 bstrins instructions.  But we need to > recognize > it in loongarch_rtx_costs or the compiler will not propagate

[PATCH v2] LoongArch: Tweak IOR rtx_cost for bstrins

2024-06-15 Thread Xi Ruoyao
Consider c &= 0xfff; a &= ~0xfff; b &= ~0xfff; a |= c; b |= c; This can be done with 2 bstrins instructions. But we need to recognize it in loongarch_rtx_costs or the compiler will not propagate "c & 0xfff" forward. gcc/ChangeLog: * config/loongarch/loongarch.cc: