Re: [PATCH] ifcvt.cc: Prevent excessive if-conversion for conditional moves

2024-06-09 Thread YunQiang Su
> > The rtx_cost may consider the compare operation in `seq` as quite expensive. > Overall it sounds like a target issue to me -- ie, now that we're > testing for profitability instead of just assuming it's profitable some > targets need adjustment. Either in their costing model or in the > testsu

Re: [PATCH] ifcvt.cc: Prevent excessive if-conversion for conditional moves

2024-06-09 Thread Jeff Law
On 6/9/24 5:28 AM, YunQiang Su wrote: YunQiang Su 于2024年6月9日周日 18:25写道: gcc/ChangeLog: * ifcvt.cc (cond_move_process_if_block): Consider the result of targetm.noce_conversion_profitable_p() when replacing the original sequence with the converted one. THanks. I push

Re: [PATCH] ifcvt.cc: Prevent excessive if-conversion for conditional moves

2024-06-09 Thread YunQiang Su
YunQiang Su 于2024年6月9日周日 18:25写道: > > > > > > > gcc/ChangeLog: > > > > > > * ifcvt.cc (cond_move_process_if_block): > > > Consider the result of targetm.noce_conversion_profitable_p() > > > when replacing the original sequence with the converted one. > > THanks. I pushed this to

Re: [PATCH] ifcvt.cc: Prevent excessive if-conversion for conditional moves

2024-06-09 Thread YunQiang Su
> > > > gcc/ChangeLog: > > > > * ifcvt.cc (cond_move_process_if_block): > > Consider the result of targetm.noce_conversion_profitable_p() > > when replacing the original sequence with the converted one. > THanks. I pushed this to the trunk. > Sorry for the delay report. With thi

Re: [PATCH] ifcvt.cc: Prevent excessive if-conversion for conditional moves

2023-04-18 Thread Jeff Law via Gcc-patches
On 1/10/23 21:20, Takayuki 'January June' Suwa via Gcc-patches wrote: Currently, cond_move_process_if_block() does the conversion without balancing the cost of the converted sequence with the original one, but this should be checked by calling targetm.noce_conversion_profitable_p(). Doing so

Re: [PATCH] ifcvt.cc: Prevent excessive if-conversion for conditional moves

2023-03-11 Thread Jeff Law via Gcc-patches
On 1/10/23 21:20, Takayuki 'January June' Suwa via Gcc-patches wrote: Currently, cond_move_process_if_block() does the conversion without balancing the cost of the converted sequence with the original one, but this should be checked by calling targetm.noce_conversion_profitable_p(). Doing so

Re: [PATCH] ifcvt.cc: Prevent excessive if-conversion for conditional moves

2023-01-11 Thread Takayuki 'January June' Suwa via Gcc-patches
On 2023/01/11 17:02, Robin Dapp wrote: > Hi, Hi! > >> On optimizing for speed, default_noce_conversion_profitable_p() allows >> plenty of headroom, so this patch has little impact. >> >> Also, if the target-specific cost estimate is accurate or allows for >> margins, the impact should be similar

Re: [PATCH] ifcvt.cc: Prevent excessive if-conversion for conditional moves

2023-01-11 Thread Robin Dapp via Gcc-patches
Hi, > On optimizing for speed, default_noce_conversion_profitable_p() allows > plenty of headroom, so this patch has little impact. > > Also, if the target-specific cost estimate is accurate or allows for > margins, the impact should be similarly small. I believe this part of ifcvt does/did not

[PATCH] ifcvt.cc: Prevent excessive if-conversion for conditional moves

2023-01-10 Thread Takayuki 'January June' Suwa via Gcc-patches
Currently, cond_move_process_if_block() does the conversion without balancing the cost of the converted sequence with the original one, but this should be checked by calling targetm.noce_conversion_profitable_p(). Doing so allows us to provide a way based on the target-specific cost estimate, to p