https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87047
--- Comment #13 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Alexander Monakov from comment #12) > Created attachment 46911 [details] > patch for scaled cost calculation > > Attaching a patch that implements the tactic outlined in comment #10. One issue is that we quite aggressively convert control to data dependences on GIMPLE via phiopt and friends but later during RTL expansion create code with control dependences. Original edge probabilities are lost during the first conversion and cannot be recovered during RTL expansion. There are also conditional moves generated by RTL expansion of MIN/MAX_EXPR if the target supports them and those can be bad as well (which was a reason to tackle this in the x86 machine-specific STV pass). Other than that the patch looks like a good idea but I fear benchmarking will show up the single bad case in one important benchmark :/