https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68920
--- Comment #4 from Yuri Rumyantsev <ysrumyan at gmail dot com> --- You are quite right - the cost model is very poor. We did simple experiment and set up the branch cost to 1 but noticed performance regressions on other benchmarks. when we set it to 2 we did not see any difference since likely branch deletion is preferred for equal costs. Is there any tuned option in if-converter to revert this decision? Secondly, we must enhance cost model by adding cost of conditional move for all targets but this is for GCC 7.