On Sun, Apr 02, 2017 at 08:44:03PM +0200, Uros Bizjak wrote: > x86 part LGTM. > > Hopefully, this infrastructure will allow us to fix (or it already > fixes) PR 56309 [1].
I think only allows to. The target hook has access to the if_info structure which contains the original basic blocks, their edges, frequencies, and can inspect both the new sequence as well as the original basic blocks etc. I really don't know in detail what the problem with cmov is (latency, or that it blocks some CPU units, something else?). In any case, any change will need lots of benchmarking, because apparently cmov is extremely important to get right (for not well predictable branches use it, for other not really). Another question is if say setcc has similar problem or not. > [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56309 Jakub