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 allows us to provide a way based on the target-specific cost estimate, to prevent unwanted size growth due to excessive conditional moves on optimizing for size. 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. 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. Jeff