> I also believe that we should keep the before one. The main problem I suppose > would be the extra ucomi here. It is an even bigger problem than the > conditional > jmp vs cmov originally in that PR.
The conversion noce_try_cmove_arith succeeds now, with the skylake+ arch. The cost for the before sequence is 32. The ifcvt'ed sequence has the same cost and that's why we choose it. I find both slightly surprising. The before seq seems expensive (for a maximum of two insns and a jump) and the after seq is a bit cheap (five insns) if cmov and ucomi are not preferable. The branch costs are no factor as -mbranch-cost doesn't make a difference. I'll check the individual insn costs next but it won't hurt if somebody with a better grasp of x86 costing can chime in. -- Regards Robin
