Re: [PATCH] [RISC-V] optimize Zicond conditional select cases.

2024-04-15 Thread Fei Gao
Committed. Thanks Kito and Jeff for the reveiw.  BR Fei > > >On 4/15/24 7:27 PM, Fei Gao wrote: >> On 2024-04-15 21:04  Jeff Law wrote: >>> >>> >>> >>> On 4/15/24 6:58 AM, Kito Cheng wrote: It's simple enough, so LGTM for trunk :) >>> We're already doing this internally.  I just hadn't submi

Re: [PATCH] [RISC-V] optimize Zicond conditional select cases.

2024-04-15 Thread Jeff Law
On 4/15/24 7:27 PM, Fei Gao wrote: On 2024-04-15 21:04  Jeff Law wrote: On 4/15/24 6:58 AM, Kito Cheng wrote: It's simple enough, so LGTM for trunk :) We're already doing this internally.  I just hadn't submitted it due to being deep into stage4. Jeff Hi Jeff Would you like me to co

Re: Re: [PATCH] [RISC-V] optimize Zicond conditional select cases.

2024-04-15 Thread Fei Gao
On 2024-04-15 21:04  Jeff Law wrote: > > > >On 4/15/24 6:58 AM, Kito Cheng wrote: >> It's simple enough, so LGTM for trunk :) >We're already doing this internally.  I just hadn't submitted it due to >being deep into stage4. > >Jeff Hi Jeff Would you like me to commit it now or leave it to you w

Re: [PATCH] [RISC-V] optimize Zicond conditional select cases.

2024-04-15 Thread Jeff Law
On 4/15/24 6:58 AM, Kito Cheng wrote: It's simple enough, so LGTM for trunk :) We're already doing this internally. I just hadn't submitted it due to being deep into stage4. Jeff

Re: [PATCH] [RISC-V] optimize Zicond conditional select cases.

2024-04-15 Thread Kito Cheng
It's simple enough, so LGTM for trunk :) Fei Gao 於 2024年4月15日 週一 14:38 寫道: > When one of the two input operands is 0, ADD and IOR are functionally > equivalent. > ADD is slightly preferred over IOR because ADD has a higher likelihood > of being implemented as a compressed instruction when compar

[PATCH] [RISC-V] optimize Zicond conditional select cases.

2024-04-14 Thread Fei Gao
When one of the two input operands is 0, ADD and IOR are functionally equivalent. ADD is slightly preferred over IOR because ADD has a higher likelihood of being implemented as a compressed instruction when compared to IOR. C.ADD uses the CR format with any of the 32 RVI registers availble, while C